diff --git a/BUILD/FINISH.sh b/BUILD/FINISH.sh index e0d505a948f..75d3ef16402 100644 --- a/BUILD/FINISH.sh +++ b/BUILD/FINISH.sh @@ -1,3 +1,20 @@ +# Copyright (C) 2000, 2005 MySQL AB, 2008 Sun Microsystems, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA + cflags="$c_warnings $extra_flags" cxxflags="$cxx_warnings $base_cxxflags $extra_flags" extra_configs="$extra_configs $local_infile_configs" diff --git a/BUILD/SETUP.sh b/BUILD/SETUP.sh index a58360cc063..2642788e360 100755 --- a/BUILD/SETUP.sh +++ b/BUILD/SETUP.sh @@ -1,5 +1,22 @@ #!/bin/sh +# Copyright (C) 2000, 2007 MySQL AB +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA + ######################################################################## get_key_value() diff --git a/BUILD/autorun.sh b/BUILD/autorun.sh index e4ca52f00fe..e9d92c4ebae 100755 --- a/BUILD/autorun.sh +++ b/BUILD/autorun.sh @@ -1,4 +1,22 @@ #!/bin/sh + +# Copyright (C) 2005 MySQL AB +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA + # Create MySQL cmake configure wrapper die() { echo "$@"; exit 1; } diff --git a/BUILD/build_mccge.sh b/BUILD/build_mccge.sh index 004194961d5..ca77dfb84d7 100755 --- a/BUILD/build_mccge.sh +++ b/BUILD/build_mccge.sh @@ -1,5 +1,22 @@ #!/bin/sh +# Copyright (c) 2008, 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 Library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA + die() { echo "ERROR: $@"; exit 1; diff --git a/BUILD/check-cpu b/BUILD/check-cpu index 070e7de0125..deae27656a4 100755 --- a/BUILD/check-cpu +++ b/BUILD/check-cpu @@ -1,4 +1,20 @@ #!/bin/sh + +# Copyright (C) 2005, 2008 MySQL AB, 2009 Sun Microsystems, Inc. +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + # # Check cpu of current machine and find the # best compiler optimization flags for gcc diff --git a/BUILD/cleanup b/BUILD/cleanup index 518c5722d87..1ae29368fa7 100755 --- a/BUILD/cleanup +++ b/BUILD/cleanup @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2003 MySQL AB +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/cmake_configure.sh b/BUILD/cmake_configure.sh index f5efc13e011..887408f9bfa 100644 --- a/BUILD/cmake_configure.sh +++ b/BUILD/cmake_configure.sh @@ -1,5 +1,22 @@ #!/bin/sh +# 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 Library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA + # Ensure cmake and perl are there cmake -P cmake/check_minimal_version.cmake >/dev/null 2>&1 || HAVE_CMAKE=no perl --version >/dev/null 2>&1 || HAVE_PERL=no diff --git a/BUILD/compile-alpha b/BUILD/compile-alpha index ce5050fee72..a0b98ecb2a5 100755 --- a/BUILD/compile-alpha +++ b/BUILD/compile-alpha @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2000, 2002 MySQL AB +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-alpha-debug b/BUILD/compile-alpha-debug index 94fe8a2b414..51895d3c230 100755 --- a/BUILD/compile-alpha-debug +++ b/BUILD/compile-alpha-debug @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2000, 2005 MySQL AB +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + /bin/rm -f */.deps/*.P */*.o make -k maintainer-clean /bin/rm -f */.deps/*.P */*.o diff --git a/BUILD/compile-amd64-debug-max b/BUILD/compile-amd64-debug-max index f08e068135a..273942df5f8 100755 --- a/BUILD/compile-amd64-debug-max +++ b/BUILD/compile-amd64-debug-max @@ -1,4 +1,20 @@ #! /bin/sh + +# Copyright (C) 2005 MySQL AB +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" extra_flags="$amd64_cflags $debug_cflags" diff --git a/BUILD/compile-amd64-debug-max-no-ndb b/BUILD/compile-amd64-debug-max-no-ndb index 8babab44481..0eaabe99108 100755 --- a/BUILD/compile-amd64-debug-max-no-ndb +++ b/BUILD/compile-amd64-debug-max-no-ndb @@ -1,4 +1,22 @@ #! /bin/sh + +# Copyright (C) 2005, 2006 MySQL AB +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA + path=`dirname $0` . "$path/SETUP.sh" extra_flags="$amd64_cflags $debug_cflags" diff --git a/BUILD/compile-amd64-gcov b/BUILD/compile-amd64-gcov index 239a4aed0fb..2b33b5c81ab 100755 --- a/BUILD/compile-amd64-gcov +++ b/BUILD/compile-amd64-gcov @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2007 MySQL AB +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-amd64-gprof b/BUILD/compile-amd64-gprof index 6cfb8a4302c..6545013771b 100755 --- a/BUILD/compile-amd64-gprof +++ b/BUILD/compile-amd64-gprof @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2007 MySQL AB +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-amd64-max b/BUILD/compile-amd64-max index 30db275c7ae..c14f0d7104c 100755 --- a/BUILD/compile-amd64-max +++ b/BUILD/compile-amd64-max @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2005 MySQL AB +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" extra_flags="$amd64_cflags $fast_cflags -g" diff --git a/BUILD/compile-amd64-max-sci b/BUILD/compile-amd64-max-sci index 4afa9004742..dcb6967850b 100644 --- a/BUILD/compile-amd64-max-sci +++ b/BUILD/compile-amd64-max-sci @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2007 MySQL AB +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" extra_flags="$amd64_cflags $fast_cflags -g" diff --git a/BUILD/compile-amd64-valgrind-max b/BUILD/compile-amd64-valgrind-max index d9072ef56dd..5b5c6bfda92 100755 --- a/BUILD/compile-amd64-valgrind-max +++ b/BUILD/compile-amd64-valgrind-max @@ -1,5 +1,22 @@ #! /bin/sh +# Copyright (c) 2007, 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 Library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-darwin-mwcc b/BUILD/compile-darwin-mwcc index 9ad8d5d40b5..88747de77af 100755 --- a/BUILD/compile-darwin-mwcc +++ b/BUILD/compile-darwin-mwcc @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2005 MySQL AB +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-dist b/BUILD/compile-dist index 9fe3aaf8bb5..a95e6b42461 100755 --- a/BUILD/compile-dist +++ b/BUILD/compile-dist @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright (C) 2009 Sun Microsystems, Inc +# Copyright (C) 2004, 2006 MySQL AB, 2008, 2009 Sun Microsystems, Inc. # # 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 diff --git a/BUILD/compile-hpux11-parisc2-aCC b/BUILD/compile-hpux11-parisc2-aCC index 0e825715663..5d0df465bc9 100755 --- a/BUILD/compile-hpux11-parisc2-aCC +++ b/BUILD/compile-hpux11-parisc2-aCC @@ -1,5 +1,20 @@ #!/bin/sh +# Copyright (C) 2004, 2005 MySQL AB +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + if [ ! -f "sql/mysqld.cc" ]; then echo "You must run this script from the MySQL top-level directory." exit 1 diff --git a/BUILD/compile-ia64-debug-max b/BUILD/compile-ia64-debug-max index e9b534c302e..85807e3752e 100755 --- a/BUILD/compile-ia64-debug-max +++ b/BUILD/compile-ia64-debug-max @@ -1,3 +1,20 @@ +#! /bin/sh + +# Copyright (C) 2001, 2005 MySQL AB +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + gmake -k maintainer-clean || true /bin/rm -f */.deps/*.P config.cache storage/innobase/config.cache diff --git a/BUILD/compile-irix-mips64-mipspro b/BUILD/compile-irix-mips64-mipspro index 5e34df20c28..a8433c715ab 100755 --- a/BUILD/compile-irix-mips64-mipspro +++ b/BUILD/compile-irix-mips64-mipspro @@ -1,5 +1,20 @@ #!/bin/sh +# Copyright (C) 2004, 2005 MySQL AB +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + if [ ! -f "sql/mysqld.cc" ]; then echo "You must run this script from the MySQL top-level directory." exit 1 diff --git a/BUILD/compile-ndb-autotest b/BUILD/compile-ndb-autotest index 6f86eeb7464..e14855f1489 100755 --- a/BUILD/compile-ndb-autotest +++ b/BUILD/compile-ndb-autotest @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2006 MySQL AB +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-pentium b/BUILD/compile-pentium index b8f8d028e1f..0b8caa763ce 100755 --- a/BUILD/compile-pentium +++ b/BUILD/compile-pentium @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2000, 2002 MySQL AB +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-pentium-cybozu b/BUILD/compile-pentium-cybozu index 841635985a1..86445715fba 100755 --- a/BUILD/compile-pentium-cybozu +++ b/BUILD/compile-pentium-cybozu @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2005 MySQL AB +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-pentium-debug b/BUILD/compile-pentium-debug index 37381cc47df..83de3c68152 100755 --- a/BUILD/compile-pentium-debug +++ b/BUILD/compile-pentium-debug @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2000, 2007 MySQL AB +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-pentium-debug-max b/BUILD/compile-pentium-debug-max index 5c56ceb37ba..37e4a30337b 100755 --- a/BUILD/compile-pentium-debug-max +++ b/BUILD/compile-pentium-debug-max @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2001, 2007 MySQL AB +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-pentium-debug-max-no-embedded b/BUILD/compile-pentium-debug-max-no-embedded index 2cae5eff694..55aede7536f 100755 --- a/BUILD/compile-pentium-debug-max-no-embedded +++ b/BUILD/compile-pentium-debug-max-no-embedded @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2004, 2005 MySQL AB +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-pentium-debug-max-no-ndb b/BUILD/compile-pentium-debug-max-no-ndb index f1e14b73ecd..cb8dbc7e364 100755 --- a/BUILD/compile-pentium-debug-max-no-ndb +++ b/BUILD/compile-pentium-debug-max-no-ndb @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2005, 2007 MySQL AB +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-pentium-debug-openssl b/BUILD/compile-pentium-debug-openssl index 7026e0fde05..67e2327cb08 100755 --- a/BUILD/compile-pentium-debug-openssl +++ b/BUILD/compile-pentium-debug-openssl @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2001, 2003 MySQL AB +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-pentium-debug-yassl b/BUILD/compile-pentium-debug-yassl index 3f9a36ce5a1..29242a6853b 100755 --- a/BUILD/compile-pentium-debug-yassl +++ b/BUILD/compile-pentium-debug-yassl @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2005 MySQL AB +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-pentium-gcov b/BUILD/compile-pentium-gcov index 42666b2632c..26dc85382bf 100755 --- a/BUILD/compile-pentium-gcov +++ b/BUILD/compile-pentium-gcov @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2000, 2007 MySQL AB +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + # Need to disable ccache, or we loose the gcov-needed compiler output files. USING_GCOV=1 diff --git a/BUILD/compile-pentium-gprof b/BUILD/compile-pentium-gprof index 4aebc1d2e02..f04d7154888 100755 --- a/BUILD/compile-pentium-gprof +++ b/BUILD/compile-pentium-gprof @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2001, 2007 MySQL AB +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-pentium-icc b/BUILD/compile-pentium-icc index bf550a4b574..0c41b6045af 100755 --- a/BUILD/compile-pentium-icc +++ b/BUILD/compile-pentium-icc @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2005 MySQL AB +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-pentium-icc-valgrind-max b/BUILD/compile-pentium-icc-valgrind-max index 0babf9ee881..ebefb1b3fd0 100755 --- a/BUILD/compile-pentium-icc-valgrind-max +++ b/BUILD/compile-pentium-icc-valgrind-max @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2005 MySQL AB +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-pentium-icc-yassl b/BUILD/compile-pentium-icc-yassl index 53b191e4db3..78a547d91e0 100644 --- a/BUILD/compile-pentium-icc-yassl +++ b/BUILD/compile-pentium-icc-yassl @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2005 MySQL AB +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-pentium-max b/BUILD/compile-pentium-max index 8272e3406d3..7bd063cd24a 100755 --- a/BUILD/compile-pentium-max +++ b/BUILD/compile-pentium-max @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2001, 2005 MySQL AB +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-pentium-myodbc b/BUILD/compile-pentium-myodbc index 4fcfc7e49dc..2d5a06f5f78 100755 --- a/BUILD/compile-pentium-myodbc +++ b/BUILD/compile-pentium-myodbc @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2000 MySQL AB +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-pentium-pgcc b/BUILD/compile-pentium-pgcc index c13a6ff14f7..383cd288bf1 100755 --- a/BUILD/compile-pentium-pgcc +++ b/BUILD/compile-pentium-pgcc @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2000, 2005 MySQL AB +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + AM_MAKEFLAGS="-j 2" gmake -k maintainer-clean || true /bin/rm -f */.deps/*.P config.cache diff --git a/BUILD/compile-pentium-valgrind-max b/BUILD/compile-pentium-valgrind-max index 9b58c4321c9..ef4d7267e5f 100755 --- a/BUILD/compile-pentium-valgrind-max +++ b/BUILD/compile-pentium-valgrind-max @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2002, 2005 MySQL AB +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-pentium-valgrind-max-no-ndb b/BUILD/compile-pentium-valgrind-max-no-ndb index b78303fb136..b5573bc6d29 100755 --- a/BUILD/compile-pentium-valgrind-max-no-ndb +++ b/BUILD/compile-pentium-valgrind-max-no-ndb @@ -1,5 +1,22 @@ #! /bin/sh +# Copyright (c) 2008, 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 Library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-pentium64 b/BUILD/compile-pentium64 index 3a8fad51fea..6d24f681d73 100755 --- a/BUILD/compile-pentium64 +++ b/BUILD/compile-pentium64 @@ -1,5 +1,22 @@ #! /bin/sh +# Copyright (C) 2006, 2007 MySQL AB +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-pentium64-debug b/BUILD/compile-pentium64-debug index 7d11ee9df76..01c15836a54 100755 --- a/BUILD/compile-pentium64-debug +++ b/BUILD/compile-pentium64-debug @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2005, 2007 MySQL AB +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-pentium64-debug-max b/BUILD/compile-pentium64-debug-max index 322b232a20c..375f15e9908 100755 --- a/BUILD/compile-pentium64-debug-max +++ b/BUILD/compile-pentium64-debug-max @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2005, 2007 MySQL AB +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-pentium64-gcov b/BUILD/compile-pentium64-gcov index 5a99b7f8796..72cfa2cbcf8 100755 --- a/BUILD/compile-pentium64-gcov +++ b/BUILD/compile-pentium64-gcov @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2007 MySQL AB +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-pentium64-gprof b/BUILD/compile-pentium64-gprof index f64dee6d196..c74ea7ba775 100755 --- a/BUILD/compile-pentium64-gprof +++ b/BUILD/compile-pentium64-gprof @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2007 MySQL AB +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-pentium64-max b/BUILD/compile-pentium64-max index 9acd5e7c460..39dcd86ef89 100755 --- a/BUILD/compile-pentium64-max +++ b/BUILD/compile-pentium64-max @@ -1,5 +1,22 @@ #! /bin/sh +# Copyright (C) 2007 MySQL AB +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-pentium64-max-sci b/BUILD/compile-pentium64-max-sci index 9ebb1988475..e6b7e3b02df 100644 --- a/BUILD/compile-pentium64-max-sci +++ b/BUILD/compile-pentium64-max-sci @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2007 MySQL AB +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-pentium64-valgrind-max b/BUILD/compile-pentium64-valgrind-max index ebc7fc68b88..e29fa64d261 100755 --- a/BUILD/compile-pentium64-valgrind-max +++ b/BUILD/compile-pentium64-valgrind-max @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2005 MySQL AB +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-ppc b/BUILD/compile-ppc index d248ecf2677..d0845b3ddd2 100755 --- a/BUILD/compile-ppc +++ b/BUILD/compile-ppc @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2004 MySQL AB +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-ppc-debug b/BUILD/compile-ppc-debug index 99e9364a5e2..76b6bf65ce4 100755 --- a/BUILD/compile-ppc-debug +++ b/BUILD/compile-ppc-debug @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2004 MySQL AB +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-ppc-debug-max b/BUILD/compile-ppc-debug-max index 7c1a593869f..b2c7ec18b3e 100755 --- a/BUILD/compile-ppc-debug-max +++ b/BUILD/compile-ppc-debug-max @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2004, 2005 MySQL AB +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-ppc-debug-max-no-ndb b/BUILD/compile-ppc-debug-max-no-ndb index 7b39aa25dff..e77c517b302 100755 --- a/BUILD/compile-ppc-debug-max-no-ndb +++ b/BUILD/compile-ppc-debug-max-no-ndb @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2005 MySQL AB +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-ppc-max b/BUILD/compile-ppc-max index c2eb95dffea..cd2ada87dd8 100755 --- a/BUILD/compile-ppc-max +++ b/BUILD/compile-ppc-max @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2004, 2005 MySQL AB +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-solaris-amd64 b/BUILD/compile-solaris-amd64 index f128fb12973..af44d4f3aa8 100755 --- a/BUILD/compile-solaris-amd64 +++ b/BUILD/compile-solaris-amd64 @@ -1,5 +1,22 @@ #!/usr/bin/bash +# Copyright (C) 2007 MySQL AB +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA + function _find_mysql_root () ( while [ "x$PWD" != "x/" ]; do # Check if some directories are present diff --git a/BUILD/compile-solaris-amd64-debug b/BUILD/compile-solaris-amd64-debug index ad1c298907f..f2cdb1f56c3 100644 --- a/BUILD/compile-solaris-amd64-debug +++ b/BUILD/compile-solaris-amd64-debug @@ -1,4 +1,20 @@ #! /bin/sh + +# Copyright (C) 2007 MySQL AB +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" amd64_cflags="-m64 -mtune=athlon64" diff --git a/BUILD/compile-solaris-amd64-forte b/BUILD/compile-solaris-amd64-forte index 03a566a0d12..ebdc0c9a6fc 100755 --- a/BUILD/compile-solaris-amd64-forte +++ b/BUILD/compile-solaris-amd64-forte @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2007 MySQL AB +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + gmake -k clean || true /bin/rm -f */.deps/*.P config.cache diff --git a/BUILD/compile-solaris-amd64-forte-debug b/BUILD/compile-solaris-amd64-forte-debug index 4b0726bb3ce..749b6216399 100644 --- a/BUILD/compile-solaris-amd64-forte-debug +++ b/BUILD/compile-solaris-amd64-forte-debug @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2007 MySQL AB +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + gmake -k clean || true /bin/rm -f */.deps/*.P config.cache diff --git a/BUILD/compile-solaris-sparc b/BUILD/compile-solaris-sparc index b287baa6845..ce76f39d9a8 100755 --- a/BUILD/compile-solaris-sparc +++ b/BUILD/compile-solaris-sparc @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2000, 2005 MySQL AB +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + make -k clean || true /bin/rm -f */.deps/*.P config.cache diff --git a/BUILD/compile-solaris-sparc-debug b/BUILD/compile-solaris-sparc-debug index 43cabd644fa..8e4a4672f2e 100755 --- a/BUILD/compile-solaris-sparc-debug +++ b/BUILD/compile-solaris-sparc-debug @@ -1,5 +1,20 @@ #!/bin/sh +# Copyright (C) 2001, 2005 MySQL AB +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + make -k clean || true /bin/rm -f */.deps/*.P config.cache diff --git a/BUILD/compile-solaris-sparc-forte b/BUILD/compile-solaris-sparc-forte index f4bf86517d1..087fe22a591 100755 --- a/BUILD/compile-solaris-sparc-forte +++ b/BUILD/compile-solaris-sparc-forte @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2001, 2005 MySQL AB +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + # Assume Forte is installed in /opt/SUNWSpro and ld is installed in # /usr/ccs/bin diff --git a/BUILD/compile-solaris-sparc-purify b/BUILD/compile-solaris-sparc-purify index 08308f05f4e..1083835ba43 100755 --- a/BUILD/compile-solaris-sparc-purify +++ b/BUILD/compile-solaris-sparc-purify @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2000, 2005 MySQL AB +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + mode="" cxxfilt="" diff --git a/client/completion_hash.h b/client/completion_hash.h index b91d6e4d187..8e1b2d6e453 100644 --- a/client/completion_hash.h +++ b/client/completion_hash.h @@ -1,11 +1,11 @@ /* Copyright (C) 2000-2002 MySQL AB - This library is free software; you can redistribute it and/or + This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; version 2 of the License. - This library is distributed in the hope that it will be useful, + 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 Library General Public License for more details. diff --git a/client/mysqltest.cc b/client/mysqltest.cc index a755e11890e..f266197116b 100644 --- a/client/mysqltest.cc +++ b/client/mysqltest.cc @@ -8284,6 +8284,14 @@ int main(int argc, char **argv) var_set_int("$VIEW_PROTOCOL", view_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'", result_file_name ? result_file_name : "")); verbose_msg("Results saved in '%s'.", @@ -8430,20 +8438,62 @@ int main(int argc, char **argv) case Q_DISCONNECT: case Q_DIRTY_CLOSE: do_close_connection(command); break; - case Q_ENABLE_QUERY_LOG: disable_query_log=0; break; - case Q_DISABLE_QUERY_LOG: disable_query_log=1; break; - case Q_ENABLE_ABORT_ON_ERROR: abort_on_error=1; break; - case Q_DISABLE_ABORT_ON_ERROR: abort_on_error=0; break; - case Q_ENABLE_RESULT_LOG: disable_result_log=0; break; - case Q_DISABLE_RESULT_LOG: disable_result_log=1; break; - case Q_ENABLE_CONNECT_LOG: disable_connect_log=0; break; - case Q_DISABLE_CONNECT_LOG: disable_connect_log=1; break; - case Q_ENABLE_WARNINGS: disable_warnings=0; break; - case Q_DISABLE_WARNINGS: disable_warnings=1; break; - case Q_ENABLE_INFO: disable_info=0; break; - case Q_DISABLE_INFO: disable_info=1; break; - case Q_ENABLE_METADATA: display_metadata=1; break; - case Q_DISABLE_METADATA: display_metadata=0; break; + case Q_ENABLE_QUERY_LOG: + disable_query_log= 0; + var_set_int("$ENABLED_QUERY_LOG", 1); + break; + case Q_DISABLE_QUERY_LOG: + disable_query_log= 1; + var_set_int("$ENABLED_QUERY_LOG", 0); + break; + case Q_ENABLE_ABORT_ON_ERROR: + abort_on_error= 1; + var_set_int("$ENABLED_ABORT_ON_ERROR", 1); + break; + case Q_DISABLE_ABORT_ON_ERROR: + 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_SLEEP: do_sleep(command, 0); break; case Q_REAL_SLEEP: do_sleep(command, 1); break; diff --git a/cmake/os/SunOS.cmake b/cmake/os/SunOS.cmake index e932e6c2b74..9e8ca0ef11f 100644 --- a/cmake/os/SunOS.cmake +++ b/cmake/os/SunOS.cmake @@ -17,7 +17,6 @@ INCLUDE(CheckSymbolExists) INCLUDE(CheckCSourceRuns) INCLUDE(CheckCSourceCompiles) -SET(TARGET_OS_SOLARIS 1) # Enable 64 bit file offsets SET(_FILE_OFFSET_BITS 64) diff --git a/config.h.cmake b/config.h.cmake index 54567df4548..e51dcf51f32 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -226,6 +226,7 @@ #cmakedefine HAVE_PTHREAD_THREADMASK 1 #cmakedefine HAVE_PTHREAD_YIELD_NP 1 #cmakedefine HAVE_PTHREAD_YIELD_ZERO_ARG 1 +#cmakedefine PTHREAD_ONCE_INITIALIZER @PTHREAD_ONCE_INITIALIZER@ #cmakedefine HAVE_PUTENV 1 #cmakedefine HAVE_RE_COMP 1 #cmakedefine HAVE_REGCOMP 1 @@ -406,7 +407,6 @@ #cmakedefine TARGET_OS_LINUX 1 -#cmakedefine TARGET_OS_SOLARIS 1 #cmakedefine HAVE_WCTYPE_H 1 #cmakedefine HAVE_WCHAR_H 1 diff --git a/configure.cmake b/configure.cmake index cba9e79ff23..954b60a45f6 100644 --- a/configure.cmake +++ b/configure.cmake @@ -269,6 +269,49 @@ ENDIF() # 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 + 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 + 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 # diff --git a/dbug/dbug_add_tags.pl b/dbug/dbug_add_tags.pl index 3e51a54c707..e6daa352823 100755 --- a/dbug/dbug_add_tags.pl +++ b/dbug/dbug_add_tags.pl @@ -1,5 +1,20 @@ #!/usr/bin/perl +# Copyright (C) 2002 MySQL AB +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + die "No files specified\n" unless $ARGV[0]; $ctags="exctags -x -f - --c-types=f -u"; diff --git a/extra/yassl/examples/client/client.cpp b/extra/yassl/examples/client/client.cpp index 6c3cdf04dc1..a80a8c2f1a2 100644 --- a/extra/yassl/examples/client/client.cpp +++ b/extra/yassl/examples/client/client.cpp @@ -1,3 +1,21 @@ +/* + Copyright (C) 2006 MySQL AB + + 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; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ + /* client.cpp */ #include "../../testsuite/test.hpp" diff --git a/extra/yassl/examples/echoclient/echoclient.cpp b/extra/yassl/examples/echoclient/echoclient.cpp index e2c33c7cda2..787e554f8bf 100644 --- a/extra/yassl/examples/echoclient/echoclient.cpp +++ b/extra/yassl/examples/echoclient/echoclient.cpp @@ -1,3 +1,21 @@ +/* + Copyright (C) 2006 MySQL AB + + 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; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ + /* echoclient.cpp */ #include "../../testsuite/test.hpp" diff --git a/extra/yassl/examples/echoserver/echoserver.cpp b/extra/yassl/examples/echoserver/echoserver.cpp index 92613744ba0..a3ba8c12c60 100644 --- a/extra/yassl/examples/echoserver/echoserver.cpp +++ b/extra/yassl/examples/echoserver/echoserver.cpp @@ -1,3 +1,21 @@ +/* + Copyright (C) 2006 MySQL AB + + 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; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ + /* echoserver.cpp */ #include "../../testsuite/test.hpp" diff --git a/extra/yassl/examples/server/server.cpp b/extra/yassl/examples/server/server.cpp index 75ce4224770..8b8066eace5 100644 --- a/extra/yassl/examples/server/server.cpp +++ b/extra/yassl/examples/server/server.cpp @@ -1,3 +1,21 @@ +/* + Copyright (C) 2006 MySQL AB + + 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; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ + /* server.cpp */ diff --git a/extra/yassl/include/lock.hpp b/extra/yassl/include/lock.hpp index 99829b0b6de..ae875001633 100644 --- a/extra/yassl/include/lock.hpp +++ b/extra/yassl/include/lock.hpp @@ -1,5 +1,5 @@ /* - Copyright (C) 2000-2007 MySQL AB + Copyright (c) 2005, 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 diff --git a/extra/yassl/include/openssl/crypto.h b/extra/yassl/include/openssl/crypto.h index f53e5231027..22bbbbf594e 100644 --- a/extra/yassl/include/openssl/crypto.h +++ b/extra/yassl/include/openssl/crypto.h @@ -1,3 +1,21 @@ +/* + Copyright (C) 2005, 2007 MySQL AB + + 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; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ + /* crypto.h for openSSL */ #ifndef ysSSL_crypto_h__ diff --git a/extra/yassl/include/openssl/des.h b/extra/yassl/include/openssl/des.h index 67be7eecfb9..6e2ebbd83f5 100644 --- a/extra/yassl/include/openssl/des.h +++ b/extra/yassl/include/openssl/des.h @@ -1 +1,19 @@ +/* + Copyright (C) 2005 MySQL AB + + 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; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ + /* des.h for openssl */ diff --git a/extra/yassl/include/openssl/des_old.h b/extra/yassl/include/openssl/des_old.h index 40e8fbc02af..1223a38056c 100644 --- a/extra/yassl/include/openssl/des_old.h +++ b/extra/yassl/include/openssl/des_old.h @@ -1 +1,19 @@ +/* + Copyright (C) 2007 MySQL AB + + 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; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ + /* des_old.h for openvn */ diff --git a/extra/yassl/include/openssl/engine.h b/extra/yassl/include/openssl/engine.h index 39952fcae84..cadb05a92b4 100644 --- a/extra/yassl/include/openssl/engine.h +++ b/extra/yassl/include/openssl/engine.h @@ -1,3 +1,21 @@ +/* + Copyright (C) 2006 MySQL AB + + 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; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ + /* engine.h for libcurl */ #undef HAVE_OPENSSL_ENGINE_H diff --git a/extra/yassl/include/openssl/err.h b/extra/yassl/include/openssl/err.h index 45ac1ca2469..23f2f1393ab 100644 --- a/extra/yassl/include/openssl/err.h +++ b/extra/yassl/include/openssl/err.h @@ -1,3 +1,21 @@ +/* + Copyright (C) 2005, 2006 MySQL AB + + 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; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ + /* err.h for openssl */ #ifndef yaSSL_err_h__ diff --git a/extra/yassl/include/openssl/evp.h b/extra/yassl/include/openssl/evp.h index 1d66b08df46..eccdcdffda6 100644 --- a/extra/yassl/include/openssl/evp.h +++ b/extra/yassl/include/openssl/evp.h @@ -1,3 +1,21 @@ +/* + Copyright (C) 2007 MySQL AB + + 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; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ + /* evp.h for openSSL */ #ifndef SSLEAY_NUMBER_DEFINED diff --git a/extra/yassl/include/openssl/generate_prefix_files.pl b/extra/yassl/include/openssl/generate_prefix_files.pl index da591b31332..f74d79c8143 100755 --- a/extra/yassl/include/openssl/generate_prefix_files.pl +++ b/extra/yassl/include/openssl/generate_prefix_files.pl @@ -1,4 +1,20 @@ #!/usr/bin/perl + +# Copyright (C) 2006 MySQL AB +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + # # This script generates defines for all functions # in yassl/include/openssl/ so they are renamed to diff --git a/extra/yassl/include/openssl/hmac.h b/extra/yassl/include/openssl/hmac.h index a2eae4c08c1..478d92e087d 100644 --- a/extra/yassl/include/openssl/hmac.h +++ b/extra/yassl/include/openssl/hmac.h @@ -1 +1,19 @@ +/* + Copyright (C) 2007 MySQL AB + + 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; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ + /* hmac.h for openvpn */ diff --git a/extra/yassl/include/openssl/lhash.h b/extra/yassl/include/openssl/lhash.h index 01f8535f869..34bc34c3f11 100644 --- a/extra/yassl/include/openssl/lhash.h +++ b/extra/yassl/include/openssl/lhash.h @@ -1,2 +1,20 @@ +/* + Copyright (C) 2005 MySQL AB + + 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; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ + /* lhash.h for openSSL */ diff --git a/extra/yassl/include/openssl/md4.h b/extra/yassl/include/openssl/md4.h index 2e99f977fca..2718d170fcf 100644 --- a/extra/yassl/include/openssl/md4.h +++ b/extra/yassl/include/openssl/md4.h @@ -1 +1,19 @@ +/* + Copyright (C) 2006 MySQL AB + + 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; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ + /* md4.h for libcurl */ diff --git a/extra/yassl/include/openssl/md5.h b/extra/yassl/include/openssl/md5.h index dfaf9799c44..9400649ebd8 100644 --- a/extra/yassl/include/openssl/md5.h +++ b/extra/yassl/include/openssl/md5.h @@ -1,3 +1,21 @@ +/* + Copyright (C) 2005, 2006 MySQL AB + + 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; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ + /* md5.h for openssl */ #include "ssl.h" /* in there for now */ diff --git a/extra/yassl/include/openssl/objects.h b/extra/yassl/include/openssl/objects.h index 99f2326e51b..ec00e04e213 100644 --- a/extra/yassl/include/openssl/objects.h +++ b/extra/yassl/include/openssl/objects.h @@ -1 +1,19 @@ +/* + Copyright (C) 2007 MySQL AB + + 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; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ + /* objects.h for openvpn */ diff --git a/extra/yassl/include/openssl/opensslv.h b/extra/yassl/include/openssl/opensslv.h index d932130684f..bafcfaec8a3 100644 --- a/extra/yassl/include/openssl/opensslv.h +++ b/extra/yassl/include/openssl/opensslv.h @@ -1,3 +1,21 @@ +/* + Copyright (C) 2005 MySQL AB + + 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; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ + /* opensslv.h compatibility */ #ifndef yaSSL_opensslv_h__ diff --git a/extra/yassl/include/openssl/pem.h b/extra/yassl/include/openssl/pem.h index b4c63d56a4d..3762b9597a4 100644 --- a/extra/yassl/include/openssl/pem.h +++ b/extra/yassl/include/openssl/pem.h @@ -1 +1,19 @@ +/* + Copyright (C) 2006 MySQL AB + + 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; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ + /* pem.h for libcurl */ diff --git a/extra/yassl/include/openssl/pkcs12.h b/extra/yassl/include/openssl/pkcs12.h index e452fc879c4..71ba287ede0 100644 --- a/extra/yassl/include/openssl/pkcs12.h +++ b/extra/yassl/include/openssl/pkcs12.h @@ -1,3 +1,21 @@ +/* + Copyright (C) 2006 MySQL AB + + 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; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ + /* pkcs12.h for libcurl */ diff --git a/extra/yassl/include/openssl/prefix_crypto.h b/extra/yassl/include/openssl/prefix_crypto.h index 3fa5f32c627..ff3aea14b0e 100644 --- a/extra/yassl/include/openssl/prefix_crypto.h +++ b/extra/yassl/include/openssl/prefix_crypto.h @@ -1 +1,19 @@ +/* + Copyright (C) 2006 MySQL AB + + 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; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ + #define SSLeay_version yaSSLeay_version diff --git a/extra/yassl/include/openssl/prefix_ssl.h b/extra/yassl/include/openssl/prefix_ssl.h index 138d9fb8821..fcd91cd5b9a 100644 --- a/extra/yassl/include/openssl/prefix_ssl.h +++ b/extra/yassl/include/openssl/prefix_ssl.h @@ -1,3 +1,21 @@ +/* + Copyright (C) 2006, 2007 MySQL AB + + 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; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ + #define Copyright yaCopyright #define yaSSL_CleanUp yayaSSL_CleanUp #define BN_bin2bn yaBN_bin2bn diff --git a/extra/yassl/include/openssl/rand.h b/extra/yassl/include/openssl/rand.h index df9c9020346..136a01459e2 100644 --- a/extra/yassl/include/openssl/rand.h +++ b/extra/yassl/include/openssl/rand.h @@ -1,2 +1,20 @@ +/* + Copyright (C) 2005 MySQL AB + + 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; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ + /* rand.h for openSSL */ diff --git a/extra/yassl/include/openssl/rsa.h b/extra/yassl/include/openssl/rsa.h index fe64e655bdc..b20da32be24 100644 --- a/extra/yassl/include/openssl/rsa.h +++ b/extra/yassl/include/openssl/rsa.h @@ -1,3 +1,21 @@ +/* + Copyright (C) 2005, 2006 MySQL AB + + 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; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ + /* rsa.h for openSSL */ diff --git a/extra/yassl/include/openssl/sha.h b/extra/yassl/include/openssl/sha.h index bb487c05c2e..79b46ec83ce 100644 --- a/extra/yassl/include/openssl/sha.h +++ b/extra/yassl/include/openssl/sha.h @@ -1 +1,19 @@ +/* + Copyright (C) 2007 MySQL AB + + 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; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ + /* sha.h for openvpn */ diff --git a/extra/yassl/include/openssl/x509.h b/extra/yassl/include/openssl/x509.h index dcd847c0337..eb60bcbc0a6 100644 --- a/extra/yassl/include/openssl/x509.h +++ b/extra/yassl/include/openssl/x509.h @@ -1 +1,19 @@ +/* + Copyright (C) 2006 MySQL AB + + 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; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ + /* x509.h for libcurl */ diff --git a/extra/yassl/include/openssl/x509v3.h b/extra/yassl/include/openssl/x509v3.h index adf94af8f48..1215826f53f 100644 --- a/extra/yassl/include/openssl/x509v3.h +++ b/extra/yassl/include/openssl/x509v3.h @@ -1 +1,19 @@ +/* + Copyright (C) 2006 MySQL AB + + 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; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ + /* x509v3.h for libcurl */ diff --git a/extra/yassl/src/lock.cpp b/extra/yassl/src/lock.cpp index 6e85fefa14d..9eb41408ff7 100644 --- a/extra/yassl/src/lock.cpp +++ b/extra/yassl/src/lock.cpp @@ -1,5 +1,5 @@ /* - Copyright (C) 2000-2007 MySQL AB + Copyright (c) 2005, 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 diff --git a/extra/yassl/src/make.bat b/extra/yassl/src/make.bat index dde305721a7..cccd11dbd17 100644 --- a/extra/yassl/src/make.bat +++ b/extra/yassl/src/make.bat @@ -1,3 +1,18 @@ +REM Copyright (C) 2006, 2007 MySQL AB +REM +REM This program is free software; you can redistribute it and/or modify +REM it under the terms of the GNU General Public License as published by +REM the Free Software Foundation; version 2 of the License. +REM +REM This program is distributed in the hope that it will be useful, +REM but WITHOUT ANY WARRANTY; without even the implied warranty of +REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +REM GNU General Public License for more details. +REM +REM You should have received a copy of the GNU General Public License +REM along with this program; if not, write to the Free Software +REM Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + REM quick and dirty build file for testing different MSDEVs setlocal diff --git a/extra/yassl/taocrypt/benchmark/benchmark.cpp b/extra/yassl/taocrypt/benchmark/benchmark.cpp index bb725a90187..55e94275b20 100644 --- a/extra/yassl/taocrypt/benchmark/benchmark.cpp +++ b/extra/yassl/taocrypt/benchmark/benchmark.cpp @@ -1,3 +1,21 @@ +/* + Copyright (C) 2006, 2007 MySQL AB + + 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; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ + // benchmark.cpp // TaoCrypt benchmark diff --git a/extra/yassl/taocrypt/benchmark/make.bat b/extra/yassl/taocrypt/benchmark/make.bat index bf1383f5e97..1457521bce9 100644 --- a/extra/yassl/taocrypt/benchmark/make.bat +++ b/extra/yassl/taocrypt/benchmark/make.bat @@ -1,3 +1,18 @@ +REM Copyright (C) 2006, 2007 MySQL AB +REM +REM This program is free software; you can redistribute it and/or modify +REM it under the terms of the GNU General Public License as published by +REM the Free Software Foundation; version 2 of the License. +REM +REM This program is distributed in the hope that it will be useful, +REM but WITHOUT ANY WARRANTY; without even the implied warranty of +REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +REM GNU General Public License for more details. +REM +REM You should have received a copy of the GNU General Public License +REM along with this program; if not, write to the Free Software +REM Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + REM quick and dirty build file for testing different MSDEVs setlocal diff --git a/extra/yassl/taocrypt/src/make.bat b/extra/yassl/taocrypt/src/make.bat index 0aa1350f7d8..ecd3023f5ab 100644 --- a/extra/yassl/taocrypt/src/make.bat +++ b/extra/yassl/taocrypt/src/make.bat @@ -1,3 +1,18 @@ +REM Copyright (C) 2006, 2007 MySQL AB +REM +REM This program is free software; you can redistribute it and/or modify +REM it under the terms of the GNU General Public License as published by +REM the Free Software Foundation; version 2 of the License. +REM +REM This program is distributed in the hope that it will be useful, +REM but WITHOUT ANY WARRANTY; without even the implied warranty of +REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +REM GNU General Public License for more details. +REM +REM You should have received a copy of the GNU General Public License +REM along with this program; if not, write to the Free Software +REM Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + REM quick and dirty build file for testing different MSDEVs setlocal diff --git a/extra/yassl/taocrypt/test/make.bat b/extra/yassl/taocrypt/test/make.bat index 7b53e9abc90..d6d62b984a8 100644 --- a/extra/yassl/taocrypt/test/make.bat +++ b/extra/yassl/taocrypt/test/make.bat @@ -1,3 +1,18 @@ +REM Copyright (C) 2006, 2007 MySQL AB +REM +REM This program is free software; you can redistribute it and/or modify +REM it under the terms of the GNU General Public License as published by +REM the Free Software Foundation; version 2 of the License. +REM +REM This program is distributed in the hope that it will be useful, +REM but WITHOUT ANY WARRANTY; without even the implied warranty of +REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +REM GNU General Public License for more details. +REM +REM You should have received a copy of the GNU General Public License +REM along with this program; if not, write to the Free Software +REM Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + REM quick and dirty build file for testing different MSDEVs setlocal diff --git a/extra/yassl/taocrypt/test/memory.cpp b/extra/yassl/taocrypt/test/memory.cpp index a879a497800..bac8f9c2e97 100644 --- a/extra/yassl/taocrypt/test/memory.cpp +++ b/extra/yassl/taocrypt/test/memory.cpp @@ -1,3 +1,21 @@ +/* + Copyright (c) 2006, 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; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ + // memory.cpp #include "../../include/lock.hpp" // locking #include // std::bad_alloc diff --git a/extra/yassl/taocrypt/test/test.cpp b/extra/yassl/taocrypt/test/test.cpp index 0af278404ab..f8177b31e2f 100644 --- a/extra/yassl/taocrypt/test/test.cpp +++ b/extra/yassl/taocrypt/test/test.cpp @@ -1,3 +1,21 @@ +/* + Copyright (C) 2006, 2007 MySQL AB + + 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; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ + // test.cpp // test taocrypt functionality diff --git a/extra/yassl/testsuite/make.bat b/extra/yassl/testsuite/make.bat index ea2677db481..941e499d7e6 100644 --- a/extra/yassl/testsuite/make.bat +++ b/extra/yassl/testsuite/make.bat @@ -1,3 +1,18 @@ +REM Copyright (C) 2006, 2007 MySQL AB +REM +REM This program is free software; you can redistribute it and/or modify +REM it under the terms of the GNU General Public License as published by +REM the Free Software Foundation; version 2 of the License. +REM +REM This program is distributed in the hope that it will be useful, +REM but WITHOUT ANY WARRANTY; without even the implied warranty of +REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +REM GNU General Public License for more details. +REM +REM You should have received a copy of the GNU General Public License +REM along with this program; if not, write to the Free Software +REM Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + REM quick and dirty build file for testing different MSDEVs setlocal diff --git a/extra/yassl/testsuite/test.hpp b/extra/yassl/testsuite/test.hpp index 283c929a2e1..e7de3268ec4 100644 --- a/extra/yassl/testsuite/test.hpp +++ b/extra/yassl/testsuite/test.hpp @@ -1,3 +1,21 @@ +/* + Copyright (C) 2006, 2007 MySQL AB + + 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; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ + // test.hpp #ifndef yaSSL_TEST_HPP diff --git a/extra/yassl/testsuite/testsuite.cpp b/extra/yassl/testsuite/testsuite.cpp index 3cd832ebb03..5ddb9bb4dab 100644 --- a/extra/yassl/testsuite/testsuite.cpp +++ b/extra/yassl/testsuite/testsuite.cpp @@ -1,3 +1,21 @@ +/* + Copyright (C) 2006, 2007 MySQL AB + + 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; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ + // testsuite.cpp #include "test.hpp" diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index 5334fc0f5ae..e89929d159d 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -59,6 +59,4 @@ SET(HEADERS ) 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") diff --git a/include/my_handler.h b/include/my_handler.h index 977c0042938..ba0d3fc313f 100644 --- a/include/my_handler.h +++ b/include/my_handler.h @@ -1,11 +1,11 @@ /* Copyright (C) 2002-2006 MySQL AB - This library is free software; you can redistribute it and/or + This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; version 2 of the License. - This library is distributed in the hope that it will be useful, + 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 Library General Public License for more details. diff --git a/include/my_pthread.h b/include/my_pthread.h index bec88a716fe..c71ad9bf321 100644 --- a/include/my_pthread.h +++ b/include/my_pthread.h @@ -214,7 +214,11 @@ int pthread_cancel(pthread_t thread); typedef void *(* pthread_handler)(void *); #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 +#endif #define my_pthread_once(C,F) pthread_once(C,F) /* Test first for RTS or FSU threads */ diff --git a/include/my_sys.h b/include/my_sys.h index 50abfb124f5..6e2cbd4c0b3 100644 --- a/include/my_sys.h +++ b/include/my_sys.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2003 MySQL AB, 2008-2009 Sun Microsystems, Inc +/* Copyright (c) 2000, 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 diff --git a/include/mysql/psi/mysql_file.h b/include/mysql/psi/mysql_file.h index de145f642e1..6fc6689c47d 100644 --- a/include/mysql/psi/mysql_file.h +++ b/include/mysql/psi/mysql_file.h @@ -16,6 +16,8 @@ #ifndef MYSQL_FILE_H #define MYSQL_FILE_H +#include + /* For strlen() */ #include /* For MY_STAT */ diff --git a/include/mysql_com.h b/include/mysql_com.h index bc9296a6d02..f4c023721de 100644 --- a/include/mysql_com.h +++ b/include/mysql_com.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 MySQL AB +/* Copyright (c) 2000, 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 diff --git a/libmysqld/copyright b/libmysqld/copyright deleted file mode 100644 index 0b4dd1725a2..00000000000 --- a/libmysqld/copyright +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright (c) 2000 - * SWsoft company - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ diff --git a/libmysqld/examples/test-run b/libmysqld/examples/test-run index aea5b13eaba..1667280a986 100755 --- a/libmysqld/examples/test-run +++ b/libmysqld/examples/test-run @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2001, 2006 MySQL AB +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + # This is slapped together as a quick way to run the tests and # is not meant for prime time. Please hack at it and submit # changes, though, so we can gradually turn it into something diff --git a/mysql-test/collections/default.experimental b/mysql-test/collections/default.experimental index 818691e2e73..aad3c62b0ea 100644 --- a/mysql-test/collections/default.experimental +++ b/mysql-test/collections/default.experimental @@ -32,61 +32,12 @@ sys_vars.plugin_dir_basic # Bug#52223 2010-11-24 alik Test " 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 -# Declare all NDB-tests in ndb and rpl_ndb test suites experimental. -# Usually the test cases from ndb and rpl_ndb test suites are not run in PB, -# 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 - +# BUG #59055 : All ndb tests should be removed from the repository +# Leaving the sys_vars tests for now. sys_vars.all_vars.test fails on removing ndb tests sys_vars.ndb_log_update_as_write_basic sys_vars.have_ndbcluster_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.type_float # svoj: due to BUG#38965 main.type_newdecimal # svoj: due to BUG#38965 diff --git a/mysql-test/collections/default.weekly b/mysql-test/collections/default.weekly index 426bcfa53c4..99a4f2130e3 100644 --- a/mysql-test/collections/default.weekly +++ b/mysql-test/collections/default.weekly @@ -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=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_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 diff --git a/mysql-test/extra/rpl_tests/rpl_EE_err.test b/mysql-test/extra/rpl_tests/rpl_EE_err.test index 205bbe79dac..0b3fec1f605 100644 --- a/mysql-test/extra/rpl_tests/rpl_EE_err.test +++ b/mysql-test/extra/rpl_tests/rpl_EE_err.test @@ -9,10 +9,6 @@ # 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). #################################### -# 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 # file must be correctly replicated to the slave" #################################### @@ -23,8 +19,5 @@ flush tables; let $MYSQLD_DATADIR= `select @@datadir`; remove_file $MYSQLD_DATADIR/test/t1.MYI ; drop table if exists t1; -save_master_pos; -connection slave; -sync_with_master; -# End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/extra/rpl_tests/rpl_auto_increment.test b/mysql-test/extra/rpl_tests/rpl_auto_increment.test index abf3b4ec676..9bfda48df0b 100644 --- a/mysql-test/extra/rpl_tests/rpl_auto_increment.test +++ b/mysql-test/extra/rpl_tests/rpl_auto_increment.test @@ -1,14 +1,6 @@ # # 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/master-slave.inc @@ -169,7 +161,7 @@ drop table t1; # 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 # -source include/master-slave-reset.inc; +source include/rpl_reset.inc; connection master; --disable_warnings @@ -210,12 +202,10 @@ INSERT INTO t2 VALUES(4); FLUSH LOGS; sync_slave_with_master; -let $diff_table_1= master:test.t1; -let $diff_table_2= slave:test.t1; +let $diff_tables= master:t1, slave:t1; source include/diff_tables.inc; -let $diff_table_1= master:test.t2; -let $diff_table_2= slave:test.t2; +let $diff_tables= master:t2, slave:t2; source include/diff_tables.inc; connection master; @@ -228,16 +218,42 @@ let $MYSQLD_DATADIR= `SELECT @@DATADIR`; --exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000001 | $MYSQL test sync_slave_with_master; -let $diff_table_1= master:test.t1; -let $diff_table_2= slave:test.t1; +let $diff_tables= master:t1, slave:t1; source include/diff_tables.inc; -let $diff_table_1= master:test.t2; -let $diff_table_2= slave:test.t2; +let $diff_tables= master:t2, slave:t2; source include/diff_tables.inc; # End cleanup +--connection master DROP TABLE t1; DROP TABLE t2; SET SQL_MODE=''; 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 diff --git a/mysql-test/extra/rpl_tests/rpl_auto_increment_insert_view.test b/mysql-test/extra/rpl_tests/rpl_auto_increment_insert_view.test index 0bfa46de113..30b25955ecb 100644 --- a/mysql-test/extra/rpl_tests/rpl_auto_increment_insert_view.test +++ b/mysql-test/extra/rpl_tests/rpl_auto_increment_insert_view.test @@ -29,8 +29,7 @@ commit; sync_slave_with_master; --echo #Test if the results are consistent on master and slave --echo #for 'INSERT DATA INTO VIEW WHICH INVOKES TRIGGERS' -let $diff_table_1=master:test.t3; -let $diff_table_2=slave:test.t3; +let $diff_tables= master:t3, slave:t3; source include/diff_tables.inc; connection master; diff --git a/mysql-test/extra/rpl_tests/rpl_auto_increment_invoke_trigger.test b/mysql-test/extra/rpl_tests/rpl_auto_increment_invoke_trigger.test index 614d79d9c2d..f93d435349f 100644 --- a/mysql-test/extra/rpl_tests/rpl_auto_increment_invoke_trigger.test +++ b/mysql-test/extra/rpl_tests/rpl_auto_increment_invoke_trigger.test @@ -60,14 +60,11 @@ connection master; sync_slave_with_master; --echo #Test if the results are consistent on master and slave --echo #for 'INVOKES A TRIGGER with $trigger_action action' -let $diff_table_1=master:test.t2; -let $diff_table_2=slave:test.t2; +let $diff_tables= master:t2, slave:t2; source include/diff_tables.inc; -let $diff_table_1=master:test.t4; -let $diff_table_2=slave:test.t4; +let $diff_tables= master:t4, slave:t4; source include/diff_tables.inc; -let $diff_table_1=master:test.t6; -let $diff_table_2=slave:test.t6; +let $diff_tables= master:t6, slave:t6; source include/diff_tables.inc; connection master; diff --git a/mysql-test/extra/rpl_tests/rpl_autoinc_func_invokes_trigger.test b/mysql-test/extra/rpl_tests/rpl_autoinc_func_invokes_trigger.test index fece19b397d..d7c26ea42f1 100644 --- a/mysql-test/extra/rpl_tests/rpl_autoinc_func_invokes_trigger.test +++ b/mysql-test/extra/rpl_tests/rpl_autoinc_func_invokes_trigger.test @@ -41,11 +41,9 @@ connection master; sync_slave_with_master; --echo #Test if the results are consistent on master and slave --echo #for 'CALLS A FUNCTION which INVOKES A TRIGGER with $insert_action action' -let $diff_table_1=master:test.t2; -let $diff_table_2=slave:test.t2; +let $diff_tables= master:t2, slave:t2; source include/diff_tables.inc; -let $diff_table_1=master:test.t3; -let $diff_table_2=slave:test.t3; +let $diff_tables= master:t3, slave:t3; source include/diff_tables.inc; connection master; diff --git a/mysql-test/extra/rpl_tests/rpl_binlog_max_cache_size.test b/mysql-test/extra/rpl_tests/rpl_binlog_max_cache_size.test index 385a82baa77..0e7bb2d02b0 100644 --- a/mysql-test/extra/rpl_tests/rpl_binlog_max_cache_size.test +++ b/mysql-test/extra/rpl_tests/rpl_binlog_max_cache_size.test @@ -62,7 +62,8 @@ eval INSERT INTO t2 (a, data) VALUES (2, --enable_query_log # Incident event ---let $slave_sql_errno=1590 +# 1590=ER_SLAVE_INCIDENT +--let $slave_sql_errno= 1590 --source include/wait_for_slave_sql_error_and_skip.inc --disable_query_log @@ -81,15 +82,13 @@ eval UPDATE t2, t1 SET t2.data = CONCAT($data, $data, $data, $data), t1.data = CONCAT($data, $data, $data, $data); --enable_query_log -# Incident event ---let $slave_skip_counter=1 -if (`SELECT @@binlog_format = 'ROW'`) -{ - --inc $slave_skip_counter -} ---let $slave_sql_errno=1590 +# 1590=ER_SLAVE_INCIDENT +--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 ---let $slave_skip_counter= + +--let $diff_tables= master:t1,slave:t1 +--source include/diff_tables.inc --echo ######################################################################################## --echo # 2 - BEGIN - IMPLICIT COMMIT by DDL @@ -177,8 +176,9 @@ BEGIN; CREATE TABLE t5 (a int); --enable_query_log -let $diff_statement= SELECT * FROM t1; ---source include/diff_master_slave.inc +--sync_slave_with_master +--let $diff_tables= master:t1,slave:t1 +--source include/diff_tables.inc --echo ######################################################################################## --echo # 3 - BEGIN - COMMIT @@ -206,8 +206,9 @@ BEGIN; --enable_query_log COMMIT; -let $diff_statement= SELECT * FROM t1; ---source include/diff_master_slave.inc +--sync_slave_with_master +--let $diff_tables= master:t1,slave:t1 +--source include/diff_tables.inc --echo ######################################################################################## --echo # 4 - BEGIN - ROLLBACK @@ -235,8 +236,9 @@ BEGIN; --enable_query_log ROLLBACK; -let $diff_statement= SELECT * FROM t1; ---source include/diff_master_slave.inc +--sync_slave_with_master +--let $diff_tables= master:t1,slave:t1 +--source include/diff_tables.inc --echo ######################################################################################## --echo # 5 - PROCEDURE @@ -284,8 +286,9 @@ eval CALL p1($data); --enable_query_log ROLLBACK; -let $diff_statement= SELECT * FROM t1; ---source include/diff_master_slave.inc +--sync_slave_with_master +--let $diff_tables= master:t1,slave:t1 +--source include/diff_tables.inc --echo ######################################################################################## --echo # 6 - XID @@ -315,8 +318,9 @@ SAVEPOINT sv; ROLLBACK TO sv; COMMIT; -let $diff_statement= SELECT * FROM t1; ---source include/diff_master_slave.inc +--sync_slave_with_master +--let $diff_tables= master:t1,slave:t1 +--source include/diff_tables.inc --echo ######################################################################################## --echo # 7 - NON-TRANS TABLE @@ -358,8 +362,9 @@ BEGIN; --enable_query_log COMMIT; -let $diff_statement= SELECT * FROM t1; ---source include/diff_master_slave.inc +--sync_slave_with_master +--let $diff_tables= master:t1,slave:t1 +--source include/diff_tables.inc --echo ######################################################################## --echo # 8 - Bug#55375(Regression Bug) Transaction bigger than @@ -409,7 +414,7 @@ while ($n) --enable_query_log COMMIT; -connection slave; +--connection slave --let $slave_sql_errno= 1197 if (`SELECT @@binlog_format = 'ROW'`) { @@ -444,8 +449,10 @@ connection master; DROP TABLE t1; DROP TABLE t2; 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 t5; -DROP TABLE IF EXISTS t6; +--enable_warnings +DROP TABLE t5; DROP PROCEDURE p1; -source include/master-slave-end.inc; diff --git a/mysql-test/extra/rpl_tests/rpl_charset.test b/mysql-test/extra/rpl_tests/rpl_charset.test index d884bd1178c..fa83b06597d 100644 --- a/mysql-test/extra/rpl_tests/rpl_charset.test +++ b/mysql-test/extra/rpl_tests/rpl_charset.test @@ -2,11 +2,7 @@ # This test will fail if the server/client does not support enough charsets. source include/master-slave.inc; ---disable_warnings set timestamp=1000000000; -drop database if exists mysqltest2; -drop database if exists mysqltest3; ---enable_warnings create database mysqltest2 character set latin2; set @@character_set_server=latin5; @@ -149,6 +145,6 @@ eval create table `t1` ( set @p=_latin1 'test'; update t1 set pk='test' where pk=@p; drop table t1; -sync_slave_with_master; # End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/extra/rpl_tests/rpl_commit_after_flush.test b/mysql-test/extra/rpl_tests/rpl_commit_after_flush.test index 98638b0b1f6..7de4f421c35 100644 --- a/mysql-test/extra/rpl_tests/rpl_commit_after_flush.test +++ b/mysql-test/extra/rpl_tests/rpl_commit_after_flush.test @@ -1,16 +1,10 @@ -################################# -# Test updated to use a wrapper # -################################# - eval CREATE TABLE t1 (a INT) ENGINE=$engine_type; begin; insert into t1 values(1); flush tables with read lock; commit; -save_master_pos; -connection slave; -sync_with_master; +sync_slave_with_master; # cleanup connection master; unlock tables; diff --git a/mysql-test/extra/rpl_tests/rpl_conflicts.test b/mysql-test/extra/rpl_tests/rpl_conflicts.test index b20bbb15a1a..ea3c053cb0e 100644 --- a/mysql-test/extra/rpl_tests/rpl_conflicts.test +++ b/mysql-test/extra/rpl_tests/rpl_conflicts.test @@ -91,11 +91,13 @@ if (`SELECT @@global.binlog_format != 'ROW' OR @@global.slave_exec_mode = 'STRIC # key error, and stops the SQL thread. let $slave_sql_errno= 1062; # ER_DUP_ENTRY 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/ --disable_query_log --eval SELECT "$err" as 'Last_SQL_Error (expected "duplicate key" error)' --enable_query_log + SELECT * FROM t1; --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 ---- let $slave_sql_errno= 1032; # ER_KEY_NOT_FOUND 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; --echo ---- Resolve the conflict on the slave and restart SQL thread ---- @@ -168,4 +175,4 @@ connection master; DROP TABLE t1; --echo [on slave] -sync_slave_with_master; +--sync_slave_with_master diff --git a/mysql-test/extra/rpl_tests/rpl_ddl.test b/mysql-test/extra/rpl_tests/rpl_ddl.test index f1064dc268f..3b0348cc29f 100644 --- a/mysql-test/extra/rpl_tests/rpl_ddl.test +++ b/mysql-test/extra/rpl_tests/rpl_ddl.test @@ -136,14 +136,6 @@ sync_slave_with_master; connection master; 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 # working database is mysqltest1 # working table (transactional!) is mysqltest1.t1 @@ -619,6 +611,3 @@ connection master; DROP DATABASE mysqltest1; # mysqltest2 was alreday DROPPED some tests before. DROP DATABASE mysqltest3; ---enable_warnings - --- source include/master-slave-end.inc diff --git a/mysql-test/extra/rpl_tests/rpl_deadlock.test b/mysql-test/extra/rpl_tests/rpl_deadlock.test index 607348ae97b..bd446c86943 100644 --- a/mysql-test/extra/rpl_tests/rpl_deadlock.test +++ b/mysql-test/extra/rpl_tests/rpl_deadlock.test @@ -131,3 +131,4 @@ sync_slave_with_master; SET global max_relay_log_size= @my_max_relay_log_size; --echo End of 5.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/extra/rpl_tests/rpl_extraMaster_Col.test b/mysql-test/extra/rpl_tests/rpl_extra_col_master.test similarity index 97% rename from mysql-test/extra/rpl_tests/rpl_extraMaster_Col.test rename to mysql-test/extra/rpl_tests/rpl_extra_col_master.test index d4310f50909..a7b1c021c97 100644 --- a/mysql-test/extra/rpl_tests/rpl_extraMaster_Col.test +++ b/mysql-test/extra/rpl_tests/rpl_extra_col_master.test @@ -1,24 +1,7 @@ ############################################################# -# Author: Chuck -############################################################# # Purpose: To test having extra columns on the master WL#3915 # 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 @@ -1025,8 +1008,3 @@ SELECT c1,hex(c4),c5 FROM t5 ORDER BY c1; connection master; DROP TABLE t5; sync_slave_with_master; ---echo - -# END of 5.1 tests case - - diff --git a/mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test b/mysql-test/extra/rpl_tests/rpl_extra_col_slave.test similarity index 97% rename from mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test rename to mysql-test/extra/rpl_tests/rpl_extra_col_slave.test index 77b7e9a57ea..6c51b63886b 100644 --- a/mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test +++ b/mysql-test/extra/rpl_tests/rpl_extra_col_slave.test @@ -1,19 +1,10 @@ ################################################# -# Author: Jeb -# Date: 2006-09-07 # Purpose: To test having extra columns on the slave. ################################################## # Some tests in here requre partitioning -- 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 ########### ################################################# @@ -286,16 +277,14 @@ connection slave; --let $slave_sql_errno= 1677 --let $show_slave_sql_error= 1 --source include/wait_for_slave_sql_error.inc -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3; -#START SLAVE; --echo *** Drop t6 *** +--let $rpl_only_running_threads= 1 +--source include/rpl_reset.inc + connection master; DROP TABLE t6; -connection slave; -DROP TABLE t6; -START SLAVE; -#sync_slave_with_master; +--sync_slave_with_master --echo **** Diff Table Def End **** @@ -453,9 +442,9 @@ if ($engine_type != NDB) } #--echo *** Drop t9 *** -#connection master; -#DROP TABLE t9; -#sync_slave_with_master; +connection master; +DROP TABLE t9; +sync_slave_with_master; ############################################ # More columns in slave at middle of table # @@ -730,6 +719,10 @@ sync_slave_with_master; --replace_column 5 CURRENT_TIMESTAMP SELECT * FROM t14a ORDER BY c1; +--connection master +DROP TABLE t14a; +--sync_slave_with_master + #################################################### # - Alter Master Dropping columns from the middle. # # Expect: columns dropped # @@ -917,17 +910,3 @@ connection slave; connection master; DROP TABLE t17; 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 - - diff --git a/mysql-test/extra/rpl_tests/rpl_failed_optimize.test b/mysql-test/extra/rpl_tests/rpl_failed_optimize.test index cd81f2497b8..6817405b2d9 100644 --- a/mysql-test/extra/rpl_tests/rpl_failed_optimize.test +++ b/mysql-test/extra/rpl_tests/rpl_failed_optimize.test @@ -22,4 +22,5 @@ connection master; select * from t1; commit; drop table t1; --- sync_slave_with_master + +--source include/rpl_end.inc diff --git a/mysql-test/extra/rpl_tests/rpl_flsh_tbls.test b/mysql-test/extra/rpl_tests/rpl_flsh_tbls.test index 0a1a4503975..5e4fca4a4b8 100644 --- a/mysql-test/extra/rpl_tests/rpl_flsh_tbls.test +++ b/mysql-test/extra/rpl_tests/rpl_flsh_tbls.test @@ -54,7 +54,6 @@ unlock tables; connection master; drop table t3, t4, t5; -sync_slave_with_master; - # End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/extra/rpl_tests/rpl_foreign_key.test b/mysql-test/extra/rpl_tests/rpl_foreign_key.test index ea16237435c..db646a736f9 100644 --- a/mysql-test/extra/rpl_tests/rpl_foreign_key.test +++ b/mysql-test/extra/rpl_tests/rpl_foreign_key.test @@ -59,6 +59,4 @@ select count(*) from t1 /* must be zero */; connection master; drop table t2,t1; -sync_slave_with_master; - - +--source include/rpl_end.inc diff --git a/mysql-test/extra/rpl_tests/rpl_get_master_version_and_clock.test b/mysql-test/extra/rpl_tests/rpl_get_master_version_and_clock.test index c7e3d1abc03..01036f72785 100644 --- a/mysql-test/extra/rpl_tests/rpl_get_master_version_and_clock.test +++ b/mysql-test/extra/rpl_tests/rpl_get_master_version_and_clock.test @@ -40,26 +40,16 @@ if (!$debug_sync_action) } # Restart slave ---disable_warnings -stop slave; -source include/wait_for_slave_to_stop.inc; +--source include/stop_slave.inc eval SET @@global.debug= "+d,$dbug_sync_point"; -start slave; -source include/wait_for_slave_to_start.inc; +--source include/start_slave.inc --echo slave is going to hang in get_master_version_and_clock -connection master; -# Write file to make mysql-test-run.pl expect the "crash", but don't start -# it until it's told to ---exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect +--let $rpl_server_number= 1 +--source include/rpl_stop_server.inc -# 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 eval SET DEBUG_SYNC=$debug_sync_action; @@ -74,6 +64,7 @@ connection slave; # '1040' ER_CON_COUNT_ERROR # '1053' ER_SERVER_SHUTDOWN 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; # deactivate the sync point of get_master_version_and_clock() @@ -82,19 +73,12 @@ source include/wait_for_slave_io_error.inc; # unset. eval set @@global.debug = "-d,$dbug_sync_point"; -# Write file to make mysql-test-run.pl start up the server again ---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect - -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; +--let $rpl_server_number= 1 +--source include/rpl_start_server.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 diff --git a/mysql-test/extra/rpl_tests/rpl_implicit_commit_binlog.test b/mysql-test/extra/rpl_tests/rpl_implicit_commit_binlog.test index 172483e1466..549d184185d 100644 --- a/mysql-test/extra/rpl_tests/rpl_implicit_commit_binlog.test +++ b/mysql-test/extra/rpl_tests/rpl_implicit_commit_binlog.test @@ -649,8 +649,7 @@ SET AUTOCOMMIT= 1; --echo ################################################################################### --sync_slave_with_master ---let $diff_table_1= master:test.tt_1 ---let $diff_table_2= slave:test.tt_1 +--let $diff_tables= master:tt_1,slave:tt_1 --source include/diff_tables.inc --echo ################################################################################### diff --git a/mysql-test/extra/rpl_tests/rpl_innodb.test b/mysql-test/extra/rpl_tests/rpl_innodb.test index 8b9b7e7ff39..e590bd70c88 100644 --- a/mysql-test/extra/rpl_tests/rpl_innodb.test +++ b/mysql-test/extra/rpl_tests/rpl_innodb.test @@ -180,5 +180,3 @@ DROP TABLE t1; DROP TABLE t3; --echo End of 6.0 tests - ---source include/master-slave-end.inc diff --git a/mysql-test/extra/rpl_tests/rpl_insert_id.test b/mysql-test/extra/rpl_tests/rpl_insert_id.test index b542ff27231..565ab4a67ad 100644 --- a/mysql-test/extra/rpl_tests/rpl_insert_id.test +++ b/mysql-test/extra/rpl_tests/rpl_insert_id.test @@ -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() # are replicated well ############################################################ @@ -9,17 +7,10 @@ # 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 # Setup --echo # -use test; ---disable_warnings -drop table if exists t1, t2, t3; ---enable_warnings - --echo # --echo # See if queries that use both auto_increment and LAST_INSERT_ID() --echo # are replicated well @@ -30,6 +21,13 @@ drop table if exists t1, t2, t3; -- source include/master-slave.inc #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 # inserted by INSERT are immediately accessible by SELECT in another # 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 (null); insert into t2 values (null,last_insert_id()); -save_master_pos; -connection slave; -sync_with_master; +sync_slave_with_master; select * from t1 ORDER BY a; select * from t2 ORDER BY b; connection master; @@ -65,9 +61,7 @@ insert into t1 values (null),(null),(null); insert into t2 values (5,0); insert into t2 values (null,last_insert_id()); SET FOREIGN_KEY_CHECKS=1; -save_master_pos; -connection slave; -sync_with_master; +sync_slave_with_master; select * from t1; select * from t2; connection master; @@ -85,17 +79,13 @@ insert into t1 values (null),(null),(null); insert into t2 values (5,0); insert into t2 (c) select * from t1 ORDER BY a; select * from t2 ORDER BY b; -save_master_pos; -connection slave; -sync_with_master; +sync_slave_with_master; select * from t1 ORDER BY a; select * from t2 ORDER BY b; connection master; drop table t1; drop table t2; -save_master_pos; -connection slave; -sync_with_master; +sync_slave_with_master; --echo # --echo # Bug#8412: Error codes reported in binary log for CHARACTER SET, @@ -215,9 +205,7 @@ call foo(); select * from t1; select * from t2; -save_master_pos; -connection slave; -sync_with_master; +sync_slave_with_master; select * from t1; select * from t2; connection master; @@ -562,4 +550,5 @@ drop table t1, t2; drop procedure foo; SET @@global.concurrent_insert= @old_concurrent_insert; set @@session.sql_auto_is_null=default; -sync_slave_with_master; + +--source include/rpl_end.inc diff --git a/mysql-test/extra/rpl_tests/rpl_insert_id_pk.test b/mysql-test/extra/rpl_tests/rpl_insert_id_pk.test index 4a20fc48ac4..c3ecd9381c9 100644 --- a/mysql-test/extra/rpl_tests/rpl_insert_id_pk.test +++ b/mysql-test/extra/rpl_tests/rpl_insert_id_pk.test @@ -1,6 +1,4 @@ ########################################################### -# 2006-02-08: By JBM: -########################################################### # See if queries that use both auto_increment and LAST_INSERT_ID() # are replicated well ############################################################ @@ -14,15 +12,12 @@ -- source include/master-slave.inc #should work for both SBR and RBR -connection master; create table t1(a int auto_increment, primary key(a)); create table t2(b int auto_increment, c int, primary key(b)); insert into t1 values (1),(2),(3); insert into t1 values (null); insert into t2 values (null,last_insert_id()); -save_master_pos; -connection slave; -sync_with_master; +sync_slave_with_master; select * from t1 ORDER BY a; select * from t2 ORDER BY b; connection master; @@ -41,9 +36,7 @@ insert into t1 values (null),(null),(null); insert into t2 values (5,0); insert into t2 values (null,last_insert_id()); SET FOREIGN_KEY_CHECKS=1; -save_master_pos; -connection slave; -sync_with_master; +sync_slave_with_master; select * from t1; select * from t2; connection master; @@ -59,17 +52,13 @@ insert into t1 values (null),(null),(null); insert into t2 values (5,0); insert into t2 (c) select * from t1 ORDER BY a; select * from t2 ORDER BY b; -save_master_pos; -connection slave; -sync_with_master; +sync_slave_with_master; select * from t1 ORDER BY a; select * from t2 ORDER BY b; connection master; drop table t1; drop table t2; -save_master_pos; -connection slave; -sync_with_master; +sync_slave_with_master; # # 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; connection master; drop table t1; -sync_slave_with_master; + # End of 4.1 tests + +--source include/rpl_end.inc diff --git a/mysql-test/extra/rpl_tests/rpl_loaddata.test b/mysql-test/extra/rpl_tests/rpl_loaddata.test index ea2cc7b10ad..00dd736280a 100644 --- a/mysql-test/extra/rpl_tests/rpl_loaddata.test +++ b/mysql-test/extra/rpl_tests/rpl_loaddata.test @@ -11,13 +11,10 @@ # 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) +-- source include/have_binlog_format_statement.inc -- source include/master-slave.inc source include/have_innodb.inc; -connection slave; -reset master; -connection master; - --disable_query_log CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); --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; --enable_warnings -save_master_pos; -connection slave; -sync_with_master; +sync_slave_with_master; select * from t1; select * from t3; @@ -62,9 +57,7 @@ drop table t2; drop table t3; create table t1(a int, b int, unique(b)); -save_master_pos; -connection slave; -sync_with_master; +sync_slave_with_master; # 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; connection slave; -# 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_and_skip.inc # 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 # takes us directly to the end of the relay log). -set global sql_slave_skip_counter=1; -start slave; sync_with_master; -let $last_error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Errno, 1); -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; +--source include/check_slave_no_error.inc # Trigger error again to test CHANGE MASTER @@ -103,17 +91,15 @@ connection slave; # The SQL slave thread should be stopped now. # Exec_Master_Log_Pos should point to the start of Execute event # 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. -stop slave; +--source include/stop_slave_io.inc change master to master_user='test'; change master to master_user='root'; -let $last_error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Errno, 1); -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; +--source include/check_slave_no_error.inc # 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; connection slave; # 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. stop slave; reset slave; -let $last_error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Errno, 1); -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; +--source include/check_slave_no_error.inc # 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 '\n##\n' starting by '>' ignore 1 lines; connection slave; + 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; } connection master; @@ -180,11 +168,12 @@ CREATE TABLE t1 (word CHAR(20) NOT NULL PRIMARY KEY) ENGINE=INNODB; --error ER_DUP_ENTRY 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, # replication aborts --- source include/master-slave-reset.inc +-- let $rpl_only_running_threads= 1 +-- source include/rpl_reset.inc -- let $db1= b48297_db1 -- let $db2= b42897_db2 @@ -245,8 +234,7 @@ connect (conn2,localhost,root,,*NO-ONE*); -- sync_slave_with_master -- eval use $db1 -let $diff_table_1=master:$db1.t1; -let $diff_table_2=slave:$db1.t1; +let $diff_tables= master:$db1.t1, slave:$db1.t1; source include/diff_tables.inc; -- connection master @@ -257,7 +245,7 @@ source include/diff_tables.inc; -- sync_slave_with_master # BUG#49479: LOAD DATA INFILE is binlogged without escaping field names --- source include/master-slave-reset.inc +-- source include/rpl_reset.inc -- connection master use test; CREATE TABLE t1 (`key` TEXT, `text` TEXT); @@ -268,6 +256,5 @@ SELECT * FROM t1; -- sync_slave_with_master -- connection master DROP TABLE t1; --- sync_slave_with_master -# End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/extra/rpl_tests/rpl_log.test b/mysql-test/extra/rpl_tests/rpl_log.test index da251068ba1..892d926a156 100644 --- a/mysql-test/extra/rpl_tests/rpl_log.test +++ b/mysql-test/extra/rpl_tests/rpl_log.test @@ -126,7 +126,7 @@ DROP TABLE t3; # Reset binlog so that show binlog events will not show the tests # above. -source include/master-slave-reset.inc; +source include/rpl_reset.inc; connection master; create table t1(a int auto_increment primary key, b int); diff --git a/mysql-test/extra/rpl_tests/rpl_max_relay_size.test b/mysql-test/extra/rpl_tests/rpl_max_relay_size.test index 8415522ec92..d8cd4f2d284 100644 --- a/mysql-test/extra/rpl_tests/rpl_max_relay_size.test +++ b/mysql-test/extra/rpl_tests/rpl_max_relay_size.test @@ -6,9 +6,6 @@ # Requires statement logging -- 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; stop slave; connection master; @@ -117,3 +114,4 @@ set global max_binlog_size= @my_max_binlog_size; --echo # --echo # End of 4.1 tests --echo # +--source include/rpl_end.inc diff --git a/mysql-test/extra/rpl_tests/rpl_multi_query.test b/mysql-test/extra/rpl_tests/rpl_multi_query.test index 2438556450d..ae2a3aa45d2 100644 --- a/mysql-test/extra/rpl_tests/rpl_multi_query.test +++ b/mysql-test/extra/rpl_tests/rpl_multi_query.test @@ -7,9 +7,6 @@ # PS doesn't support multi-statements --disable_ps_protocol -- source include/master-slave.inc ---disable_warnings -drop database if exists mysqltest; ---enable_warnings create database mysqltest; delimiter /; @@ -25,4 +22,5 @@ select * from mysqltest.t1; connection master; source include/show_binlog_events.inc; drop database mysqltest; -sync_slave_with_master; + +--source include/rpl_end.inc diff --git a/mysql-test/extra/rpl_tests/rpl_multi_update.test b/mysql-test/extra/rpl_tests/rpl_multi_update.test index 121ae18daa8..bf7707f9d6d 100644 --- a/mysql-test/extra/rpl_tests/rpl_multi_update.test +++ b/mysql-test/extra/rpl_tests/rpl_multi_update.test @@ -19,12 +19,11 @@ SELECT * FROM t1 ORDER BY a; SELECT * FROM t2 ORDER BY a; UPDATE t1, t2 SET t1.b = t2.b WHERE t1.a = t2.a; -save_master_pos; -connection slave; -sync_with_master; +sync_slave_with_master; # End of 4.1 tests connection master; drop table t1, t2; -sync_slave_with_master; + +--source include/rpl_end.inc diff --git a/mysql-test/extra/rpl_tests/rpl_ndb_apply_status.test b/mysql-test/extra/rpl_tests/rpl_ndb_apply_status.test index 40439d59dee..bba860ab9aa 100644 --- a/mysql-test/extra/rpl_tests/rpl_ndb_apply_status.test +++ b/mysql-test/extra/rpl_tests/rpl_ndb_apply_status.test @@ -230,7 +230,7 @@ connection master; # Reset both slave and master # This should reset binlog to #1 ---source include/master-slave-reset.inc +--source include/rpl_reset.inc --echo diff --git a/mysql-test/extra/rpl_tests/rpl_not_null.test b/mysql-test/extra/rpl_tests/rpl_not_null.test index 290a0a0173f..cbb6b787f11 100644 --- a/mysql-test/extra/rpl_tests/rpl_not_null.test +++ b/mysql-test/extra/rpl_tests/rpl_not_null.test @@ -71,12 +71,10 @@ INSERT INTO t4(a) VALUES (5); sync_slave_with_master; --echo TABLES t1 and t2 must be equal otherwise an error will be thrown. -let $diff_table_1=master:test.t1; -let $diff_table_2=slave:test.t1; +let $diff_tables= master:t1, slave:t1; source include/diff_tables.inc; -let $diff_table_1=master:test.t2; -let $diff_table_2=slave:test.t2; +let $diff_tables= master:t2, slave:t2; source include/diff_tables.inc; --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; --echo TABLES t1 and t2 must be equal otherwise an error will be thrown. -let $diff_table_1=master:test.t1; -let $diff_table_2=slave:test.t1; +let $diff_tables= master:t1, slave:t1; source include/diff_tables.inc; --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 TABLES t1 and t2 must be equal otherwise an error will be thrown. sync_slave_with_master; -let $diff_table_1=master:test.t1; -let $diff_table_2=slave:test.t1; +let $diff_tables= master:t1, slave:t1; source include/diff_tables.inc; connection master; @@ -273,7 +269,7 @@ sync_slave_with_master; # SELECT * FROM t3 ORDER BY a; # connection slave; # SELECT * FROM t3 ORDER BY a; -# --source include/reset_master_and_slave.inc +# --source include/rpl_reset.inc # # connection master; # diff --git a/mysql-test/extra/rpl_tests/rpl_record_compare.test b/mysql-test/extra/rpl_tests/rpl_record_compare.test index dc27dcb1f9d..f29e4fb791a 100644 --- a/mysql-test/extra/rpl_tests/rpl_record_compare.test +++ b/mysql-test/extra/rpl_tests/rpl_record_compare.test @@ -4,7 +4,7 @@ # -- 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 -- 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 -- sync_slave_with_master --- let $diff_table_1= master:test.t1 --- let $diff_table_2= slave:test.t1 +-- let $diff_tables= master:t1, slave:t1 -- source include/diff_tables.inc --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 ## (1 column less and no varchar) --- source include/master-slave-reset.inc +-- source include/rpl_reset.inc -- 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 @@ -38,8 +37,7 @@ UPDATE t1 SET c5 = 'a'; -- enable_warnings -- sync_slave_with_master --- let $diff_table_1= master:test.t1 --- let $diff_table_2= slave:test.t1 +-- let $diff_tables= master:t1, slave:t1 -- source include/diff_tables.inc --connection master @@ -48,7 +46,7 @@ DROP TABLE t1; -- echo ## case #2 - X bit is wrongly set. --- source include/master-slave-reset.inc +-- source include/rpl_reset.inc -- connection master -- 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; -- sync_slave_with_master --- let $diff_table_1= master:test.t1 --- let $diff_table_2= slave:test.t1 +-- let $diff_tables= master:t1, slave:t1 -- source include/diff_tables.inc -- connection master diff --git a/mysql-test/extra/rpl_tests/rpl_reset_slave.test b/mysql-test/extra/rpl_tests/rpl_reset_slave.test index e76cf1530ee..14b457f601e 100644 --- a/mysql-test/extra/rpl_tests/rpl_reset_slave.test +++ b/mysql-test/extra/rpl_tests/rpl_reset_slave.test @@ -55,9 +55,9 @@ source include/check_slave_no_error.inc; change master to master_user='impossible_user_name'; start slave; 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'; source include/start_slave.inc; source include/check_slave_no_error.inc; @@ -70,8 +70,12 @@ stop slave; change master to master_user='impossible_user_name'; start slave; 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; source include/check_slave_no_error.inc; +change master to master_user='root'; + +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/extra/rpl_tests/rpl_row_UUID.test b/mysql-test/extra/rpl_tests/rpl_row_UUID.test index 9f2dbb4ce4b..368596d4fbc 100644 --- a/mysql-test/extra/rpl_tests/rpl_row_UUID.test +++ b/mysql-test/extra/rpl_tests/rpl_row_UUID.test @@ -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 # be removed at next testsuite run. -# End of 5.0 test case --- source include/master-slave-end.inc diff --git a/mysql-test/extra/rpl_tests/rpl_row_basic.test b/mysql-test/extra/rpl_tests/rpl_row_basic.test index 72d4a8ac759..7bbe4c63a7d 100644 --- a/mysql-test/extra/rpl_tests/rpl_row_basic.test +++ b/mysql-test/extra/rpl_tests/rpl_row_basic.test @@ -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`) { - SET @saved_slave_type_conversions = @@SLAVE_TYPE_CONVERSIONS; connection slave; + SET @saved_slave_type_conversions = @@SLAVE_TYPE_CONVERSIONS; eval SET GLOBAL SLAVE_TYPE_CONVERSIONS = '$bit_field_special'; } @@ -252,7 +252,7 @@ DELETE FROM t1; sync_slave_with_master; # Just to get a clean binary log -source include/reset_master_and_slave.inc; +--source include/rpl_reset.inc --echo **** On Master **** connection master; @@ -368,8 +368,7 @@ INSERT INTO t1 VALUES (1, "", 1); INSERT INTO t1 VALUES (2, repeat(_utf8'a', 16), 2); sync_slave_with_master; -let $diff_table_1=master:test.t1; -let $diff_table_2=slave:test.t1; +let $diff_tables= master:t1, slave:t1; source include/diff_tables.inc; --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); sync_slave_with_master; -let $diff_table_1=master:test.t2; -let $diff_table_2=slave:test.t2; +let $diff_tables= master:t2, slave:t2; source include/diff_tables.inc; connection slave; SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions; -connection master; -RESET MASTER; -connection slave; -STOP SLAVE; -RESET SLAVE; -START SLAVE; -source include/wait_for_slave_to_start.inc; +--let $rpl_only_running_threads= 1 +--source include/rpl_reset.inc --echo [expecting slave to replicate correctly] connection master; @@ -399,8 +392,7 @@ INSERT INTO t4 VALUES (1, "", 1); INSERT INTO t4 VALUES (2, repeat(_utf8'a', 128), 2); sync_slave_with_master; -let $diff_table_1=master:test.t4; -let $diff_table_2=slave:test.t4; +let $diff_tables= master:t4, slave:t4; source include/diff_tables.inc; --echo [expecting slave to stop] @@ -413,13 +405,8 @@ connection slave; --let $slave_sql_errno= 1677 --let $show_slave_sql_error= 1 --source include/wait_for_slave_sql_error.inc -connection master; -RESET MASTER; -connection slave; -STOP SLAVE; -RESET SLAVE; -START SLAVE; -source include/wait_for_slave_to_start.inc; + +--source include/rpl_reset.inc --echo [expecting slave to stop] connection master; @@ -431,13 +418,8 @@ connection slave; --let $slave_sql_errno= 1677 --let $show_slave_sql_error= 1 --source include/wait_for_slave_sql_error.inc -connection master; -RESET MASTER; -connection slave; -STOP SLAVE; -RESET SLAVE; -START SLAVE; -source include/wait_for_slave_to_start.inc; + +--source include/rpl_reset.inc --echo [expecting slave to replicate correctly] connection master; @@ -445,8 +427,7 @@ INSERT INTO t7 VALUES (1, "", 1); INSERT INTO t7 VALUES (2, repeat(_utf8'a', 255), 2); sync_slave_with_master; -let $diff_table_1=master:test.t7; -let $diff_table_2=slave:test.t7; +let $diff_tables= master:t7, slave:t7; source include/diff_tables.inc; connection master; @@ -466,8 +447,7 @@ UPDATE t1 SET a = 10; INSERT INTO t1 VALUES (4); sync_slave_with_master; -let $diff_table_1=master:test.t1; -let $diff_table_2=slave:test.t1; +let $diff_tables= master:t1, slave:t1; source include/diff_tables.inc; connection master; @@ -545,8 +525,7 @@ UPDATE t1 SET `int_key` = 4 ORDER BY `pk` LIMIT 6; --sync_slave_with_master --echo *** results: t2 must be consistent **** -let $diff_table_1=master:test.t2; -let $diff_table_2=master:test.t2; +let $diff_tables= master:t2, slave:t2; source include/diff_tables.inc; --connection master @@ -584,8 +563,7 @@ UPDATE t1 SET a = 8 WHERE a < 5; sync_slave_with_master; -let $diff_table_1=master:test.t1; -let $diff_table_2=slave:test.t1; +let $diff_tables= master:t1, slave:t1; source include/diff_tables.inc; connection master; @@ -604,8 +582,8 @@ connection master; # Since t1 contain a bit field, we have to do this trick to handle InnoDB if (`select char_length('$bit_field_special') > 0`) { - SET @saved_slave_type_conversions = @@SLAVE_TYPE_CONVERSIONS; connection slave; + SET @saved_slave_type_conversions = @@SLAVE_TYPE_CONVERSIONS; 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; } -let $diff_table_1=master:test.t1; -let $diff_table_2=slave:test.t1; +let $diff_tables= master:t1, slave:t1; source include/diff_tables.inc; connection master; diff --git a/mysql-test/extra/rpl_tests/rpl_row_delayed_ins.test b/mysql-test/extra/rpl_tests/rpl_row_delayed_ins.test index 214027160a9..bad308ff814 100644 --- a/mysql-test/extra/rpl_tests/rpl_row_delayed_ins.test +++ b/mysql-test/extra/rpl_tests/rpl_row_delayed_ins.test @@ -14,9 +14,8 @@ flush tables; SELECT * FROM t1 ORDER BY a; sync_slave_with_master; -connection master; -sync_slave_with_master; SELECT * FROM t1 ORDER BY a; connection master; drop table t1; -sync_slave_with_master; + +--source include/rpl_end.inc diff --git a/mysql-test/extra/rpl_tests/rpl_row_sp002.test b/mysql-test/extra/rpl_tests/rpl_row_sp002.test index 5a2ab1912b8..90c273eb026 100644 --- a/mysql-test/extra/rpl_tests/rpl_row_sp002.test +++ b/mysql-test/extra/rpl_tests/rpl_row_sp002.test @@ -1,9 +1,6 @@ ############################################################################# # This test is being created to test out the non deterministic items with # # 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# # 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# # 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/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 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 -- >; --source include/show_msg.inc -save_master_pos; -connection slave; -sync_with_master; +sync_slave_with_master; SELECT * FROM test.t1; SELECT * FROM test.t2; @@ -86,9 +65,7 @@ SELECT * FROM test.t2; let $message=< -- test 1 select slave after p2 -- >; --source include/show_msg.inc -save_master_pos; -connection slave; -sync_with_master; +sync_slave_with_master; SELECT * FROM test.t1; SELECT * FROM test.t2; @@ -136,9 +113,7 @@ SELECT * FROM test.t2; let $message=< -- test 2 select Slave after p1 -- >; --source include/show_msg.inc -save_master_pos; -connection slave; -sync_with_master; +sync_slave_with_master; SELECT * FROM test.t1; SELECT * FROM test.t2; @@ -153,9 +128,7 @@ SELECT * FROM test.t2; let $message=< -- test 1 select Slave after p2 -- >; --source include/show_msg.inc -save_master_pos; -connection slave; -sync_with_master; +sync_slave_with_master; SELECT * FROM test.t1; SELECT * FROM test.t2; @@ -195,9 +168,7 @@ while ($n) ROLLBACK; select * from test.t3; -save_master_pos; -connection slave; -sync_with_master; +sync_slave_with_master; select * from test.t3; connection master; @@ -216,9 +187,7 @@ while ($n) COMMIT; select * from test.t3; -save_master_pos; -connection slave; -sync_with_master; +sync_slave_with_master; select * from test.t3; connection master; @@ -228,12 +197,12 @@ connection master; # First lets cleanup SET AUTOCOMMIT=1; SET FOREIGN_KEY_CHECKS=0; -DROP PROCEDURE IF EXISTS test.p3; -DROP PROCEDURE IF EXISTS test.p1; -DROP PROCEDURE IF EXISTS test.p2; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -DROP TABLE IF EXISTS test.t3; -sync_slave_with_master; +DROP PROCEDURE test.p3; +DROP PROCEDURE test.p1; +DROP PROCEDURE test.p2; +DROP TABLE test.t1; +DROP TABLE test.t2; +DROP TABLE test.t3; # End of 5.0 test case +--source include/rpl_end.inc diff --git a/mysql-test/extra/rpl_tests/rpl_row_sp007.test b/mysql-test/extra/rpl_tests/rpl_row_sp007.test index 8f2b72e4d32..492cd2d88f1 100644 --- a/mysql-test/extra/rpl_tests/rpl_row_sp007.test +++ b/mysql-test/extra/rpl_tests/rpl_row_sp007.test @@ -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# # rollback to save point and then commits. # ############################################################################# @@ -10,14 +6,6 @@ -- source include/have_binlog_format_row.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 delimiter |; eval CREATE PROCEDURE test.p1(IN i INT) @@ -42,9 +30,7 @@ SELECT * FROM test.t1; let $message=< ---- Slave selects-- >; --source include/show_msg.inc -save_master_pos; -connection slave; -sync_with_master; +sync_slave_with_master; SELECT * FROM test.t1; let $message=< ---- Master selects-- >; @@ -55,16 +41,15 @@ SELECT * FROM test.t1; let $message=< ---- Slave selects-- >; --source include/show_msg.inc -save_master_pos; -connection slave; -sync_with_master; +sync_slave_with_master; SELECT * FROM test.t1; connection master; #show binlog events; -DROP PROCEDURE IF EXISTS test.p1; -DROP TABLE IF EXISTS test.t1; +DROP PROCEDURE test.p1; +DROP TABLE test.t1; # End of 5.0 test case +--source include/rpl_end.inc diff --git a/mysql-test/extra/rpl_tests/rpl_set_null.test b/mysql-test/extra/rpl_tests/rpl_set_null.test index f2aba089279..3755c8bbfa5 100644 --- a/mysql-test/extra/rpl_tests/rpl_set_null.test +++ b/mysql-test/extra/rpl_tests/rpl_set_null.test @@ -29,7 +29,7 @@ # BUG#49481: RBR: MyISAM and bit fields may cause slave to stop on # delete cant find record --- source include/master-slave-reset.inc +-- source include/rpl_reset.inc -- connection master -- 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; -- sync_slave_with_master --- let $diff_table_1=master:test.t1 --- let $diff_table_2=slave:test.t1 +-- let $diff_tables= master:t1, slave:t1 -- source include/diff_tables.inc -- connection master @@ -46,15 +45,14 @@ UPDATE t1 SET c1=NULL where c2=1; DELETE FROM t1 WHERE c2=1 LIMIT 1; -- sync_slave_with_master --- let $diff_table_1=master:test.t1 --- let $diff_table_2=slave:test.t1 +-- let $diff_tables= master:t1, slave:t1 -- source include/diff_tables.inc -- connection master DROP TABLE t1; -- sync_slave_with_master --- source include/master-slave-reset.inc +-- source include/rpl_reset.inc -- connection master @@ -68,8 +66,7 @@ SELECT * FROM t1; UPDATE t1 SET c1=NULL WHERE c1='w'; -- sync_slave_with_master --- let $diff_table_1=master:test.t1 --- let $diff_table_2=slave:test.t1 +-- let $diff_tables= master:t1, slave:t1 -- source include/diff_tables.inc -- connection master @@ -77,8 +74,7 @@ UPDATE t1 SET c1=NULL WHERE c1='w'; DELETE FROM t1 LIMIT 2; -- sync_slave_with_master --- let $diff_table_1=master:test.t1 --- let $diff_table_2=slave:test.t1 +-- let $diff_tables= master:t1, slave:t1 -- source include/diff_tables.inc -- connection master diff --git a/mysql-test/extra/rpl_tests/rpl_start_stop_slave.test b/mysql-test/extra/rpl_tests/rpl_start_stop_slave.test index 5c99fa1bc74..42250764b54 100644 --- a/mysql-test/extra/rpl_tests/rpl_start_stop_slave.test +++ b/mysql-test/extra/rpl_tests/rpl_start_stop_slave.test @@ -177,5 +177,3 @@ UNLOCK TABLES; --connection master DROP TABLE t1; sync_slave_with_master; - -# End of tests diff --git a/mysql-test/extra/rpl_tests/rpl_stm_000001.test b/mysql-test/extra/rpl_tests/rpl_stm_000001.test deleted file mode 100644 index 175d80aa183..00000000000 --- a/mysql-test/extra/rpl_tests/rpl_stm_000001.test +++ /dev/null @@ -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 diff --git a/mysql-test/extra/rpl_tests/rpl_stm_EE_err2.test b/mysql-test/extra/rpl_tests/rpl_stm_EE_err2.test index 2c396c9a209..d4140785878 100644 --- a/mysql-test/extra/rpl_tests/rpl_stm_EE_err2.test +++ b/mysql-test/extra/rpl_tests/rpl_stm_EE_err2.test @@ -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 Errno: "$errno" (expected 0) drop table t1; +--source include/stop_slave.inc +# Clear error messages. +RESET SLAVE; # End of 4.1 tests +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/extra/rpl_tests/rpl_stm_create_if_not_exists.test b/mysql-test/extra/rpl_tests/rpl_stm_create_if_not_exists.test new file mode 100644 index 00000000000..cecbd45c02a --- /dev/null +++ b/mysql-test/extra/rpl_tests/rpl_stm_create_if_not_exists.test @@ -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; + diff --git a/mysql-test/extra/rpl_tests/rpl_stop_middle_group.test b/mysql-test/extra/rpl_tests/rpl_stop_middle_group.test index d0f19e6d913..8f2246c6abf 100644 --- a/mysql-test/extra/rpl_tests/rpl_stop_middle_group.test +++ b/mysql-test/extra/rpl_tests/rpl_stop_middle_group.test @@ -139,9 +139,10 @@ set @@global.debug="-d"; # 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; drop table tm, ti; - -connection slave; # slave SQL thread is stopped -source include/stop_slave.inc; -drop table tm, ti; +--sync_slave_with_master diff --git a/mysql-test/extra/rpl_tests/rpl_stop_slave.test b/mysql-test/extra/rpl_tests/rpl_stop_slave.test index 7c88afe3532..64e69cebc32 100644 --- a/mysql-test/extra/rpl_tests/rpl_stop_slave.test +++ b/mysql-test/extra/rpl_tests/rpl_stop_slave.test @@ -9,7 +9,7 @@ # --source extra/rpl_tests/rpl_stop_slave.test # -if (`SELECT "$tmp_table_stm" = ''`) +if (!$tmp_table_stm) { --echo \$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 # So t1 on master is same to t1 on slave. -let diff_table_1=master:test.t1; -let diff_table_2=slave:test.t1; -source include/diff_tables.inc; +--let $diff_tables= master:t1, slave:t1 +--source include/diff_tables.inc connection slave; START SLAVE SQL_THREAD; diff --git a/mysql-test/extra/rpl_tests/rpl_sv_relay_space.test b/mysql-test/extra/rpl_tests/rpl_sv_relay_space.test index 3b6fe7a0ef4..1687a233914 100644 --- a/mysql-test/extra/rpl_tests/rpl_sv_relay_space.test +++ b/mysql-test/extra/rpl_tests/rpl_sv_relay_space.test @@ -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; # @@ -30,6 +21,5 @@ sync_slave_with_master; SELECT * FROM t1 ORDER BY id; connection master; DROP TABLE t1; -sync_slave_with_master; -# End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/extra/rpl_tests/rpl_test_framework.inc b/mysql-test/extra/rpl_tests/rpl_test_framework.inc new file mode 100644 index 00000000000..fb42d2efb9a --- /dev/null +++ b/mysql-test/extra/rpl_tests/rpl_test_framework.inc @@ -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= +# --let $rpl_topology= +# --let $masters= +# [--let $rpl_diff_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 diff --git a/mysql-test/extra/rpl_tests/rpl_truncate.test b/mysql-test/extra/rpl_tests/rpl_truncate.test index 7036ab126e1..c1d70b4dab2 100644 --- a/mysql-test/extra/rpl_tests/rpl_truncate.test +++ b/mysql-test/extra/rpl_tests/rpl_truncate.test @@ -1,11 +1,6 @@ -# -# Copyright 2006 MySQL. All rights reserved. -# # Test to check for the different version of truncating a table. # The statements are "TRUNCATE tbl" and "DELETE FROM tbl". We check # the behaviour of each possible value for BINLOG_FORMAT. -# -# Author(s): Mats Kindahl --source include/master-slave.inc @@ -14,3 +9,5 @@ let $trunc_stmt = TRUNCATE TABLE; let $trunc_stmt = DELETE FROM; --source extra/rpl_tests/rpl_truncate_helper.test + +--source include/rpl_end.inc diff --git a/mysql-test/extra/rpl_tests/rpl_truncate_helper.test b/mysql-test/extra/rpl_tests/rpl_truncate_helper.test index cd1ce93177a..d1d0e06e32f 100644 --- a/mysql-test/extra/rpl_tests/rpl_truncate_helper.test +++ b/mysql-test/extra/rpl_tests/rpl_truncate_helper.test @@ -1,4 +1,4 @@ -source include/reset_master_and_slave.inc; +--source include/rpl_reset.inc --echo **** On Master **** connection master; @@ -10,8 +10,7 @@ connection master; eval $trunc_stmt t1; sync_slave_with_master; -let $diff_table_1=master:test.t1; -let $diff_table_2=slave:test.t1; +let $diff_tables= master:t1, slave:t1; source include/diff_tables.inc; --echo ==== Test using a table with delete triggers ==== @@ -26,8 +25,7 @@ connection master; eval $trunc_stmt t1; sync_slave_with_master; -let $diff_table_1=master:test.t2; -let $diff_table_2=slave:test.t2; +let $diff_tables= master:t2, slave:t2; source include/diff_tables.inc; connection master; diff --git a/mysql-test/extra/rpl_tests/type_conversions.test b/mysql-test/extra/rpl_tests/type_conversions.test index 731eef8f41e..0096fda3174 100644 --- a/mysql-test/extra/rpl_tests/type_conversions.test +++ b/mysql-test/extra/rpl_tests/type_conversions.test @@ -876,7 +876,5 @@ let $can_convert = $if_is_lossy; source extra/rpl_tests/check_type.inc; -disable_warnings; -source include/reset_master_and_slave.inc; -enable_warnings; +--source include/rpl_reset.inc enable_query_log; diff --git a/mysql-test/include/analyze-sync_with_master.test b/mysql-test/include/analyze-sync_with_master.test index 684c0dbbab7..27b5a56c6b1 100644 --- a/mysql-test/include/analyze-sync_with_master.test +++ b/mysql-test/include/analyze-sync_with_master.test @@ -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); -eval SHOW BINLOG EVENTS IN '$binlog_name'; - -exit; \ No newline at end of file +--let $rpl_server_count= 0 +--let $rpl_only_current_connection= 1 +--source include/show_rpl_debug_info.inc diff --git a/mysql-test/include/assert.inc b/mysql-test/include/assert.inc new file mode 100644 index 00000000000..34cc71e7c25 --- /dev/null +++ b/mysql-test/include/assert.inc @@ -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= diff --git a/mysql-test/include/begin_include_file.inc b/mysql-test/include/begin_include_file.inc new file mode 100644 index 00000000000..1b69fb0e52d --- /dev/null +++ b/mysql-test/include/begin_include_file.inc @@ -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/ ==== +# +# and end_include_file.inc will print +# +# ==== END include/ ==== +# +# 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 diff --git a/mysql-test/include/check-testcase.test b/mysql-test/include/check-testcase.test index 6dcb01c13cf..858a89f706c 100644 --- a/mysql-test/include/check-testcase.test +++ b/mysql-test/include/check-testcase.test @@ -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 + +# 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(); --enable_query_log - - diff --git a/mysql-test/include/check_ftwrl_compatible.inc b/mysql-test/include/check_ftwrl_compatible.inc index 76c1915957c..200f8cd3d8a 100644 --- a/mysql-test/include/check_ftwrl_compatible.inc +++ b/mysql-test/include/check_ftwrl_compatible.inc @@ -34,7 +34,7 @@ if (!$err) { --echo Success: Was able to run '$statement' under FTWRL. unlock tables; -if (`SELECT "$cleanup_stmt" <> ""`) +if ($cleanup_stmt) { --eval $cleanup_stmt; } @@ -91,12 +91,12 @@ connection default; --reap } -if (`SELECT "$cleanup_stmt" <> ""`) +if ($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 @@ -147,7 +147,7 @@ connection default; } set debug_sync= "RESET"; -if (`SELECT "$cleanup_stmt" <> ""`) +if ($cleanup_stmt) { --eval $cleanup_stmt; } diff --git a/mysql-test/include/check_ftwrl_incompatible.inc b/mysql-test/include/check_ftwrl_incompatible.inc index 56deef8e92f..4787a69ea9c 100644 --- a/mysql-test/include/check_ftwrl_incompatible.inc +++ b/mysql-test/include/check_ftwrl_incompatible.inc @@ -41,11 +41,11 @@ if (!$err) { --echo Error: Was able to run '$statement' under FTWRL! unlock tables; -if (`SELECT "$cleanup_stmt1" <> ""`) +if ($cleanup_stmt1) { --eval $cleanup_stmt1; } -if (`SELECT "$cleanup_stmt2" <> ""`) +if ($cleanup_stmt2) { --eval $cleanup_stmt2; } @@ -88,16 +88,16 @@ unlock tables; connection default; --reap -if (`SELECT "$cleanup_stmt1" <> ""`) +if ($cleanup_stmt1) { --eval $cleanup_stmt1; } -if (`SELECT "$cleanup_stmt2" <> ""`) +if ($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 @@ -141,11 +141,11 @@ connection default; set debug_sync= "RESET"; -if (`SELECT "$cleanup_stmt1" <> ""`) +if ($cleanup_stmt1) { --eval $cleanup_stmt1; } -if (`SELECT "$cleanup_stmt2" <> ""`) +if ($cleanup_stmt2) { --eval $cleanup_stmt2; } diff --git a/mysql-test/include/check_slave_is_running.inc b/mysql-test/include/check_slave_is_running.inc index 51c418e6c64..88664da7fa7 100644 --- a/mysql-test/include/check_slave_is_running.inc +++ b/mysql-test/include/check_slave_is_running.inc @@ -2,25 +2,29 @@ # # Assert that the slave threads are running and don't have any errors. # +# # ==== 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 $slave_sql_running = query_get_value(SHOW SLAVE STATUS, Slave_SQL_Running, 1) ---let $slave_io_running = query_get_value(SHOW SLAVE STATUS, Slave_IO_Running, 1) +--let $include_filename= check_slave_is_running.inc +--source include/begin_include_file.inc -if ($slave_sql_running != Yes) { - --let $running= 0 -} -if ($slave_io_running != Yes) { - --let $running= 0 -} -if (!$running) { - --echo Slave not running: Slave_SQL_Running = $slave_sql_running Slave_IO_Running = $slave_io_running - --source include/show_rpl_debug_info.inc - --die Expected slave to be running, but it was not running. -} +--let $slave_param= Slave_IO_Running +--let $slave_param_value= Yes +--source include/check_slave_param.inc + +--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 diff --git a/mysql-test/include/check_slave_no_error.inc b/mysql-test/include/check_slave_no_error.inc index 371db5ed6a0..9922b426ed6 100644 --- a/mysql-test/include/check_slave_no_error.inc +++ b/mysql-test/include/check_slave_no_error.inc @@ -1,12 +1,22 @@ # ==== 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 ==== # -# --let $slave_param= Exec_Master_Log_Pos -# --let $slave_param_value= 4711 -# --source include/check_slave_running.inc +# [--let $rpl_debug= 1] +# --source include/check_slave_no_error.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_value= 0 @@ -15,3 +25,7 @@ --let $slave_param= Last_IO_Errno --let $slave_param_value= 0 --source include/check_slave_param.inc + + +--let $include_filename= check_slave_no_error.inc +--source include/end_include_file.inc diff --git a/mysql-test/include/check_slave_param.inc b/mysql-test/include/check_slave_param.inc index b27825eee6c..243e87a9b65 100644 --- a/mysql-test/include/check_slave_param.inc +++ b/mysql-test/include/check_slave_param.inc @@ -4,13 +4,33 @@ # # ==== Usage ==== # -# --let $slave_param= Exec_Master_Log_Pos -# --let $slave_param_value= 4711 +# --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_value= 4711 +# +# $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) 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 + --echo Wrong value for $slave_param. Expected '$slave_param_value', got '$_param_value' --die Wrong value for slave parameter } + + +--let $include_filename= check_slave_param.inc +--source include/end_include_file.inc diff --git a/mysql-test/include/circular_rpl_for_4_hosts_init.inc b/mysql-test/include/circular_rpl_for_4_hosts_init.inc deleted file mode 100644 index ac6654777db..00000000000 --- a/mysql-test/include/circular_rpl_for_4_hosts_init.inc +++ /dev/null @@ -1,130 +0,0 @@ -############################################################# -# -# Author: Serge Kozlov -# 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 - diff --git a/mysql-test/include/circular_rpl_for_4_hosts_sync.inc b/mysql-test/include/circular_rpl_for_4_hosts_sync.inc deleted file mode 100644 index 68aede76913..00000000000 --- a/mysql-test/include/circular_rpl_for_4_hosts_sync.inc +++ /dev/null @@ -1,23 +0,0 @@ -############################################################# -# -# Author: Serge Kozlov -# 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 diff --git a/mysql-test/include/cleanup_fake_relay_log.inc b/mysql-test/include/cleanup_fake_relay_log.inc index 269cd04ca34..921484ec695 100644 --- a/mysql-test/include/cleanup_fake_relay_log.inc +++ b/mysql-test/include/cleanup_fake_relay_log.inc @@ -1,17 +1,28 @@ # ==== Purpose ==== # -# Clean up files create by setup_fake_relay_log.inc. +# Clean up files created by setup_fake_relay_log.inc. # # ==== Usage ==== # # 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_warnings -STOP SLAVE SQL_THREAD; 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; ---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 diff --git a/mysql-test/include/diff_master_slave.inc b/mysql-test/include/diff_master_slave.inc deleted file mode 100644 index b6d79190671..00000000000 --- a/mysql-test/include/diff_master_slave.inc +++ /dev/null @@ -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; diff --git a/mysql-test/include/diff_tables.inc b/mysql-test/include/diff_tables.inc index bdd929f39a4..5f88d8d3073 100644 --- a/mysql-test/include/diff_tables.inc +++ b/mysql-test/include/diff_tables.inc @@ -1,35 +1,41 @@ # ==== Purpose ==== # -# Check if the two given tables (possibly residing on different -# master/slave servers) are equal. +# Check if all tables in the given list are equal. The tables may have +# different names, exist in different connections, and/or reside in +# different databases. +# # # ==== Usage ==== # -# The tables to check are given by the test language variables -# $diff_table_1 and $diff_table_2. They must be of the -# following form: +# --let $diff_tables= [con1:][db1.]t1, [con2:][db2.]t2, ... , [conN:][dbN.]tN +# [--let $rpl_debug= 1] +# --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 ==== # -# - 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 # system-specific format (unified diff if supported) and generates # 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 ==== # @@ -50,70 +56,135 @@ # 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 ==== ---echo Comparing tables $diff_table_1 and $diff_table_2 -disable_query_log; +# Trim off whitespace +--let $_dt_tables= `SELECT REPLACE('$diff_tables', ' ', '')` ---error 0,1 ---remove_file $MYSQLTEST_VARDIR/tmp/diff_table_1 ---error 0,1 ---remove_file $MYSQLTEST_VARDIR/tmp/diff_table_2 +# Iterate over all tables +--let $_dt_outfile= +--let $_dt_prev_outfile= +while ($_dt_tables) +{ + --let $_dt_table= `SELECT SUBSTRING_INDEX('$_dt_tables', ',', 1)` + --let $_dt_tables= `SELECT SUBSTRING('$_dt_tables', LENGTH('$_dt_table') + 2)` - -let $_diff_table=$diff_table_2; -let $_diff_i=2; -while ($_diff_i) { - - # Parse out any leading "master:" or "slave:" from the table specification -# and connect the appropriate server. - let $_pos= `SELECT LOCATE(':', '$_diff_table')`; - 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; + # Parse connection, if any + --let $_dt_colon_index= `SELECT LOCATE(':', '$_dt_table')` + if ($_dt_colon_index) + { + --let $_dt_connection= `SELECT SUBSTRING('$_dt_table', 1, $_dt_colon_index - 1)` + --let $_dt_table= `SELECT SUBSTRING('$_dt_table', $_dt_colon_index + 1)` + --let $rpl_connection_name= $_dt_connection + --source include/rpl_connection.inc } - # Sanity-check the input. - let $_diff_error= `SELECT '$_diff_table' NOT LIKE '_%._%'`; - if ($_diff_error) { - --echo !!!ERROR IN TEST: \$diff_table_$_diff_i='$_diff_table' is not in the form database.table - exit; + # Parse database name, if any + --let $_dt_database_index= `SELECT LOCATE('.', '$_dt_table')` + if ($_dt_database_index) + { + --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 - # think the files are different just because they are differently - # ordered). To this end, we first generate a query that sorts the - # table by all columns. Since ORDER BY accept column indices, we - # 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) - FROM information_schema.columns - WHERE CONCAT(table_schema, '.', table_name) = - '$_diff_table'`; - let $_diff_column_list=$_diff_column_index; - dec $_diff_column_index; - while ($_diff_column_index) { - let $_diff_column_list=$_diff_column_index, $_diff_column_list; - dec $_diff_column_index; + if ($rpl_debug) + { + --echo con='$_dt_connection' db='$_dt_database' table='$_dt_table' + --echo rest of tables='$_dt_tables' + } + + # 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 + WHERE table_schema = '$_dt_database' AND table_name = '$_dt_table'`; + # Restore group_concat_max_len. + if ($_dt_old_group_concat_max_len) + { + --let $_dt_dummy= `SET SESSION group_concat_max_len = $_dt_old_group_concat_max_len + } + if ($rpl_debug) + { + --echo using ORDER BY clause '`$_dt_column_list`' } # Now that we have the comma-separated list of columns, we can write # the table to a file. - eval SELECT * FROM $_diff_table ORDER BY $_diff_column_list - INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/diff_table_$_diff_i'; + --let $_dt_outfile= `SELECT @@datadir` + --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. - dec $_diff_i; - let $_diff_table=$diff_table_1; + # Compare files. + if ($_dt_prev_outfile) + { + 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; - ---remove_file $MYSQLTEST_VARDIR/tmp/diff_table_1 ---remove_file $MYSQLTEST_VARDIR/tmp/diff_table_2 - -enable_query_log; +--let $include_filename= diff_tables.inc [$diff_tables] +--source include/end_include_file.inc diff --git a/mysql-test/include/end_include_file.inc b/mysql-test/include/end_include_file.inc new file mode 100644 index 00000000000..1e546c1215b --- /dev/null +++ b/mysql-test/include/end_include_file.inc @@ -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= diff --git a/mysql-test/include/file_does_not_exist.inc b/mysql-test/include/file_does_not_exist.inc new file mode 100644 index 00000000000..0b02c63a0a9 --- /dev/null +++ b/mysql-test/include/file_does_not_exist.inc @@ -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 diff --git a/mysql-test/include/force_restart.inc b/mysql-test/include/force_restart.inc new file mode 100644 index 00000000000..d058e85df45 --- /dev/null +++ b/mysql-test/include/force_restart.inc @@ -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 diff --git a/mysql-test/include/force_restart_if_skipped.inc b/mysql-test/include/force_restart_if_skipped.inc new file mode 100644 index 00000000000..228e094e932 --- /dev/null +++ b/mysql-test/include/force_restart_if_skipped.inc @@ -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 diff --git a/mysql-test/include/have_innodb.inc b/mysql-test/include/have_innodb.inc index 8944cc46f3e..fa3e586834c 100644 --- a/mysql-test/include/have_innodb.inc +++ b/mysql-test/include/have_innodb.inc @@ -1,4 +1,4 @@ -disable_query_log; ---require r/true.require -select (support = 'YES' or support = 'DEFAULT' or support = 'ENABLED') as `TRUE` from information_schema.engines where engine = 'innodb'; -enable_query_log; +if (`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'innodb' AND support IN ('YES', 'DEFAULT', 'ENABLED')`) +{ + --skip Test requires InnoDB. +} diff --git a/mysql-test/include/io_thd_fault_injection.inc b/mysql-test/include/io_thd_fault_injection.inc index a76e46d772a..7cbe055dbf6 100644 --- a/mysql-test/include/io_thd_fault_injection.inc +++ b/mysql-test/include/io_thd_fault_injection.inc @@ -11,11 +11,11 @@ SET @old_debug=@@global.debug; -- eval SET GLOBAL debug="+d,$io_thd_injection_fault_flag" START SLAVE io_thread; --- source include/wait_for_slave_io_to_stop.inc -- 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 --- source include/restart_mysqld.inc +--let $rpl_server_number= 2 +--source include/rpl_restart_server.inc diff --git a/mysql-test/include/kill_query_and_diff_master_slave.inc b/mysql-test/include/kill_query_and_diff_master_slave.inc index b3846d12df1..59588551af5 100644 --- a/mysql-test/include/kill_query_and_diff_master_slave.inc +++ b/mysql-test/include/kill_query_and_diff_master_slave.inc @@ -9,19 +9,19 @@ # connection ; # let $connection_name= # let $connection_id=`SELECT CONNECTION_ID()`; -# let $diff_statement=; +# let $rpl_diff_statement=; # send ; # source include/kill_query_and_diff_master_slave.inc; # # Note: 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 source include/kill_query.inc; # 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; disable_query_log; disable_result_log; @@ -32,7 +32,7 @@ if ($debug_lock) enable_result_log; enable_query_log; -source include/diff_master_slave.inc; +--source include/rpl_diff.inc # Acquire the debug lock again if used connection master; diff --git a/mysql-test/include/master-slave-end.inc b/mysql-test/include/master-slave-end.inc deleted file mode 100644 index 74e4c7b608a..00000000000 --- a/mysql-test/include/master-slave-end.inc +++ /dev/null @@ -1,6 +0,0 @@ ---connection master ---sync_slave_with_master ---connection slave ---disable_query_log -STOP SLAVE; ---enable_query_log diff --git a/mysql-test/include/master-slave-reset.inc b/mysql-test/include/master-slave-reset.inc deleted file mode 100644 index f54f5b83eb5..00000000000 --- a/mysql-test/include/master-slave-reset.inc +++ /dev/null @@ -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; -} - diff --git a/mysql-test/include/master-slave.inc b/mysql-test/include/master-slave.inc index 134bb61ddab..9ed206b2c22 100644 --- a/mysql-test/include/master-slave.inc +++ b/mysql-test/include/master-slave.inc @@ -1,19 +1,63 @@ -# Replication tests need binlog +# ==== Purpose ==== # -# $skip_slave_start If true, the slave will not be started -source include/have_log_bin.inc; +# Configure two servers to be replication master and slave. +# +# ==== 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 - -if (!$skip_slave_start) { - connection master; - sync_slave_with_master; +--let $include_filename= master-slave.inc +if ($rpl_server_count) +{ + --let $include_filename= master-slave.inc [rpl_server_count=$rpl_server_count] } +--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 diff --git a/mysql-test/include/mtr_check.sql b/mysql-test/include/mtr_check.sql index 9db631a2615..12cb2c870a2 100644 --- a/mysql-test/include/mtr_check.sql +++ b/mysql-test/include/mtr_check.sql @@ -57,13 +57,3 @@ BEGIN mysql.user; 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|| diff --git a/mysql-test/include/mysqldump.inc b/mysql-test/include/mysqldump.inc index 6227138b012..3a53bf8e3bd 100644 --- a/mysql-test/include/mysqldump.inc +++ b/mysql-test/include/mysqldump.inc @@ -41,8 +41,7 @@ eval ALTER TABLE $table_name RENAME to $orig_table_name; --echo # Compare original and recreated tables --echo # Recreated table: $table_name --echo # Original table: $orig_table_name -let $diff_table_1 = $table_name; -let $diff_table_2 = $orig_table_name; +let $diff_tables = $table_name, $orig_table_name; --source include/diff_tables.inc --echo # Cleanup --remove_file $mysqldumpfile diff --git a/mysql-test/include/ndb_master-slave.inc b/mysql-test/include/ndb_master-slave.inc index 0bf4b701f0c..8305a310953 100644 --- a/mysql-test/include/ndb_master-slave.inc +++ b/mysql-test/include/ndb_master-slave.inc @@ -1,10 +1,4 @@ -# Replication tests need binlog -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,); +--source include/master-slave.inc connection slave; # 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 enable_query_log; --- source include/master-slave-reset.inc - # Set the default connection to 'master' connection master; diff --git a/mysql-test/include/ndb_master-slave_2ch.inc b/mysql-test/include/ndb_master-slave_2ch.inc index 52a06c01d86..17017d2b801 100644 --- a/mysql-test/include/ndb_master-slave_2ch.inc +++ b/mysql-test/include/ndb_master-slave_2ch.inc @@ -1,7 +1,6 @@ -############################################################# -# Author: Serge Kozlov -# Date: 03/17/2008 -# Purpose: Set up circular cluster replication where each +# ==== Purpose ==== +# +# Set up circular cluster replication where each # cluster has two mysqlds and replication directions are # following: # master ---> slave @@ -9,128 +8,60 @@ # cluster A cluster B # \ / # 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 -connect (master,127.0.0.1,root,,test,$MASTER_MYPORT,); -connect (master1,127.0.0.1,root,,test,$MASTER_MYPORT1,); -connect (slave,127.0.0.1,root,,test,$SLAVE_MYPORT,); -connect (slave1,127.0.0.1,root,,test,$SLAVE_MYPORT1,); +--let $rpl_connection_name= master +--let $rpl_server_number= 1 +--source include/rpl_connect.inc -# 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 ---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 +--let $rpl_connection_name= slave +--let $rpl_server_number= 2 +--source include/rpl_connect.inc ---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 +--let $rpl_connection_name= slave1 +--let $rpl_server_number= 2 +--source include/rpl_connect.inc ---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 +# 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 + --dec $_rpl_server +} # Set the default connection to 'master' (cluster A) connection master; - diff --git a/mysql-test/include/ndb_not_readonly.inc b/mysql-test/include/ndb_not_readonly.inc index f50ca0cab66..ebb343bb18d 100644 --- a/mysql-test/include/ndb_not_readonly.inc +++ b/mysql-test/include/ndb_not_readonly.inc @@ -2,6 +2,9 @@ # # wait for server to connect properly to cluster # + +--disable_query_log + set @saved_log = @@sql_log_bin; set sql_log_bin = 0; --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; set sql_log_bin = @saved_log; + +--enable_query_log + # # connected # diff --git a/mysql-test/include/report-features.test b/mysql-test/include/report-features.test index 1e4ab232490..75879f67165 100644 --- a/mysql-test/include/report-features.test +++ b/mysql-test/include/report-features.test @@ -9,4 +9,4 @@ show engines; show variables; --echo ===== STOP ===== --enable_query_log -exit; \ No newline at end of file +exit; diff --git a/mysql-test/include/reset_master_and_slave.inc b/mysql-test/include/reset_master_and_slave.inc deleted file mode 100644 index 30ba1f07a40..00000000000 --- a/mysql-test/include/reset_master_and_slave.inc +++ /dev/null @@ -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; diff --git a/mysql-test/include/restart_mysqld.inc b/mysql-test/include/restart_mysqld.inc index f750385e300..7cb9c7994d8 100644 --- a/mysql-test/include/restart_mysqld.inc +++ b/mysql-test/include/restart_mysqld.inc @@ -1,4 +1,12 @@ +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 # it until it's told to --let $_server_id= `SELECT @@server_id` diff --git a/mysql-test/include/rpl_change_topology.inc b/mysql-test/include/rpl_change_topology.inc new file mode 100644 index 00000000000..799262986e6 --- /dev/null +++ b/mysql-test/include/rpl_change_topology.inc @@ -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 diff --git a/mysql-test/include/rpl_connect.inc b/mysql-test/include/rpl_connect.inc new file mode 100644 index 00000000000..95912d57469 --- /dev/null +++ b/mysql-test/include/rpl_connect.inc @@ -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= +# --let $rpl_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 diff --git a/mysql-test/include/rpl_connection.inc b/mysql-test/include/rpl_connection.inc new file mode 100644 index 00000000000..1988568a4d2 --- /dev/null +++ b/mysql-test/include/rpl_connection.inc @@ -0,0 +1,47 @@ +# ==== Purpose ==== +# +# The same as 'connection $rpl_connection_name', but it can also +# prints the connection name. The connection is printed if $rpl_debug +# is set, or if rpl_connection.inc is not called between two +# invocations of begin_include_file.inc/end_include_file.inc. +# Otherwise the connection name is not printed. +# +# +# ==== Usage ==== +# +# --let $rpl_connection_name= master +# [--let $rpl_debug= 1] +# --source include/rpl_connection.inc +# +# Parameters: +# $rpl_connection_name +# Name of the connection to connect to. +# +# $rpl_debug +# By default, the connection name is printed only when this file +# is sourced from a top-level test script. If $rpl_debug is set, +# the connection name is also printed whenever auxiliary files +# like rpl_init.inc change connection. + + +if (!$rpl_connection_name) +{ + --die ERROR IN TEST: you must set $rpl_connection_name before sourcing rpl_connection.inc +} + +# This is the same as "if (!$_rpl_include_file_depth || $rpl_debug)", +# but the mysqltest language doesn't have boolean operations. + +if (!$_include_file_depth) +{ + --echo [connection $rpl_connection_name] +} +if ($_include_file_depth) +{ + if ($rpl_debug) + { + --echo [connection $rpl_connection_name] + } +} +--connection $rpl_connection_name +--let $rpl_connection_name= diff --git a/mysql-test/include/rpl_diff.inc b/mysql-test/include/rpl_diff.inc new file mode 100644 index 00000000000..72da06cc533 --- /dev/null +++ b/mysql-test/include/rpl_diff.inc @@ -0,0 +1,118 @@ +# ==== Purpose ==== +# +# Diff the output of a statement on all configured servers (usually +# master and slave). +# +# +# ==== Usage ===== +# +# --let $rpl_diff_statement= SELECT * FROM t1 WHERE a < 100 +# [--let $rpl_diff_servers= ,,...] +# --source include/rpl_diff.inc +# +# Parameters: +# $rpl_diff_statement +# Statement to check. For each compared server, this script will +# start a new client and pass this statement to the client. +# Note: This string will be evaluated as a single-quote-escaped +# SQL string and hence must be quoted as such. In particular, any +# single quotes in this string must be escaped. +# +# $rpl_diff_servers +# By default, this file compares all servers configured by +# rpl_init.inc. You can set $diff_servers to a comma-separated +# list of numbers: only the servers identified by these numbers +# will be compared. +# +# $rpl_diff_database +# By default, the statement will be executed on the database +# 'test'. If $rpl_diff_database is set, the statement will be +# executed on the database named $rpl_diff_database instead. + + +--let $include_filename= rpl_diff.inc +--source include/begin_include_file.inc + + +if (!$rpl_diff_statement) +{ + --die ERROR IN TEST: you must set $rpl_diff_statement before you source include/rpl_diff.inc +} + + +# Sync. +--source include/rpl_sync.inc + + +# Get database name. +--let $_rpl_diff_database= $rpl_diff_database +if (!$_rpl_diff_database) +{ + --let $_rpl_diff_database= test +} + + +# Generate list of servers. +--let $_rpl_diff_servers= $rpl_diff_servers +if (!$_rpl_diff_servers) +{ + --let $_rpl_server_i= $rpl_server_count + --let $_rpl_diff_servers= + while ($_rpl_server_i) + { + --let $_rpl_diff_servers= $_rpl_server_i,$_rpl_diff_servers + --dec $_rpl_server_i + } +} +if ($rpl_debug) +{ + --echo \$rpl_diff_servers= '$_rpl_diff_servers' +} + + +if (!$rpl_debug) +{ + --disable_query_log +} + + +# Generate file containing $rpl_diff_statement. We don't pass the +# statement on the command line, because it would be subject to shell +# substitutions. +--let $write_to_file= GENERATE +--let $write_var= $rpl_diff_statement +--source include/write_var_to_file.inc +--let $_rpl_diff_statement_file= $write_to_file + + +# Compare all servers. +--let $_rpl_diff_first= 1 +while ($_rpl_diff_servers) +{ + # Set $_rpl_diff_server_i to the first number in the list + --let $_rpl_diff_server_i= `SELECT SUBSTRING_INDEX('$_rpl_diff_servers', ',', 1)` + # Remove $_rpl_diff_server_i from the list + --let $_rpl_diff_servers= `SELECT SUBSTRING('$_rpl_diff_servers', LENGTH('$_rpl_diff_server_i') + 2)` + + # Execute statement + --let $_rpl_diff_file= $MYSQLTEST_VARDIR/tmp/_rpl_diff_server-$_rpl_diff_server_i.tmp + --exec $MYSQL --defaults-group-suffix=.$_rpl_diff_server_i $_rpl_diff_database < $_rpl_diff_statement_file > $_rpl_diff_file + + # Compare + if (!$_rpl_diff_first) + { + if ($rpl_debug) + { + --echo diffing $_rpl_diff_file and $_rpl_diff_prev_file + } + --diff_files $_rpl_diff_file $_rpl_diff_prev_file + --remove_file $_rpl_diff_prev_file + } + --let $_rpl_diff_prev_file= $_rpl_diff_file + --let $_rpl_diff_first= 0 +} +--remove_file $_rpl_diff_prev_file + + +--let $include_filename= rpl_diff.inc +--source include/end_include_file.inc diff --git a/mysql-test/include/rpl_diff_tables.inc b/mysql-test/include/rpl_diff_tables.inc deleted file mode 100644 index a82e094a209..00000000000 --- a/mysql-test/include/rpl_diff_tables.inc +++ /dev/null @@ -1,35 +0,0 @@ -# ############################################################################# -# Check whether the given table is consistent between different master and -# slaves -# -# Usage: -# --let $diff_table= test.t1 -# --let $diff_server_list= master, slave, slave2 -# --source include/rpl_diff_tables.inc -# ############################################################################# - -if (!$diff_table) -{ - --die diff_table is null. -} - ---let $_servers= master, slave -if ($diff_server_list) -{ - --let $_servers= $diff_server_list -} - ---let $_master= `SELECT SUBSTRING_INDEX('$_servers', ',', 1)` ---let $_servers= `SELECT LTRIM(SUBSTRING('$_servers', LENGTH('$_master') + 2))` -connection $_master; -while ($_servers) -{ - --let $_slave= `SELECT SUBSTRING_INDEX('$_servers', ',', 1)` - --let $_servers= `SELECT LTRIM(SUBSTRING('$_servers', LENGTH('$_slave') + 2))` - - --sync_slave_with_master $_slave - --let $diff_table_1= $_master:$diff_table - --let $diff_table_2= $_slave:$diff_table - --source include/diff_tables.inc - connection $_slave; -} diff --git a/mysql-test/include/rpl_end.inc b/mysql-test/include/rpl_end.inc new file mode 100644 index 00000000000..f671c442153 --- /dev/null +++ b/mysql-test/include/rpl_end.inc @@ -0,0 +1,103 @@ +# ==== Purpose ==== +# +# Shut down replication initialized by include/rpl_init.inc. +# +# This syncs all servers, executes STOP SLAVE on all servers, executes +# CHANGE MASTER on all servers, and disconnects all connections +# configured by rpl_init.inc. +# +# It does not execute RESET MASTER or RESET SLAVE, because that would +# remove binlogs which are possibly useful debug information in case +# the test case later fails with a result mismatch. If you need that, +# source include/rpl_reset.inc before you source this file. +# +# +# ==== Usage ==== +# +# [--let $rpl_only_running_threads= 1] +# [--let $rpl_debug= 1] +# --source include/rpl_end.inc +# +# Parameters: +# $rpl_only_running_threads +# If one or both of the IO and SQL threads is stopped, sync and +# stop only the threads that are running. See +# include/rpl_sync.inc and include/stop_slave.inc for details. +# +# $rpl_debug +# See include/rpl_init.inc +# +# Note: +# This script will fail if Last_SQL_Error or Last_IO_Error is +# nonempty. If you expect an error in the SQL thread, you should +# normally call this script as follows: +# +# --source include/wait_for_slave_sql_error.inc +# --source include/stop_slave_io.inc +# RESET SLAVE; +# --let $rpl_only_running_threads= 1 +# --source include/rpl_end.inc +# +# +# ==== Side effects ==== +# +# Changes the current connection to 'default'. + + +--let $include_filename= rpl_end.inc +--source include/begin_include_file.inc + + +if (!$rpl_inited) +{ + --die ERROR IN TEST: rpl_end.inc was sourced when replication was not configured. Most likely, rpl_end.inc was sourced twice or rpl_init.inc has not been sourced. +} + + +if ($rpl_debug) +{ + --echo ---- Check that no slave thread has an error ---- +} + +--let $_rpl_server= $rpl_server_count +while ($_rpl_server) +{ + --let $rpl_connection_name= server_$_rpl_server + --source include/rpl_connection.inc + + # Only check slave threads for error on hosts that were at some + # point configured as slave. + --let $_tmp= query_get_value(SHOW SLAVE STATUS, Master_Host, 1) + if ($_tmp != 'No such row') + { + --source include/check_slave_no_error.inc + } + + --dec $_rpl_server +} + +--source include/rpl_sync.inc +--source include/rpl_stop_slaves.inc + +# mtr configures server 2 to be a slave before it runs the test. We +# have to restore that state now, so we change topology to 1->2. +--let $rpl_topology= none +--source include/rpl_change_topology.inc + + +--connection default +--let $_rpl_server= $rpl_server_count +--let $_rpl_one= _1 +while ($_rpl_server) +{ + --disconnect server_$_rpl_server + --disconnect server_$_rpl_server$_rpl_one + --dec $_rpl_server +} + +--let $rpl_inited= 0 + +# Do not restore connection, because we have disconnected it. +--let $skip_restore_connection= 1 +--let $include_filename= rpl_end.inc +--source include/end_include_file.inc diff --git a/mysql-test/include/rpl_for_each_slave.inc b/mysql-test/include/rpl_for_each_slave.inc new file mode 100644 index 00000000000..65d242cf894 --- /dev/null +++ b/mysql-test/include/rpl_for_each_slave.inc @@ -0,0 +1,39 @@ +# ==== Purpose ==== +# +# Execute a .inc file once for each server that was configured as a +# slave by rpl_init.inc +# +# +# ==== Usage ==== +# +# --let $rpl_source_file +# [--let $rpl_debug= 1] +# --source include/rpl_for_each_slave.inc +# +# Parameters: +# $rpl_source_file +# The file that will be sourced. +# +# $rpl_debug +# See include/rpl_init.inc + + +--let $include_filename= rpl_for_each_file.inc [$rpl_source_file] +--source include/begin_include_file.inc + +--let $_rpl_server= $rpl_server_count +while ($_rpl_server) +{ + --let $_rpl_has_master= `SELECT SUBSTRING('$rpl_master_list', 1 + ($_rpl_server - 1) * $rpl_server_count_length, $rpl_server_count_length) != ''` + if ($_rpl_has_master) + { + --let $rpl_connection_name= server_$_rpl_server + --source include/rpl_connection.inc + --source $rpl_source_file + } + --dec $_rpl_server +} + + +--let $include_filename= rpl_for_each_file.inc [$rpl_source_file] +--source include/end_include_file.inc diff --git a/mysql-test/include/rpl_generate_sync_chain.inc b/mysql-test/include/rpl_generate_sync_chain.inc new file mode 100644 index 00000000000..9104c21c3b8 --- /dev/null +++ b/mysql-test/include/rpl_generate_sync_chain.inc @@ -0,0 +1,122 @@ +# ==== Purpose ==== +# +# Setup $rpl_sync_chain, which is used by rpl_sync.inc. You normally +# don't need to source this file, it should only be sourced by +# rpl_sync.inc. +# +# $rpl_sync_chain is set to a string that specifies in what order +# servers should be synchronized in include/rpl_sync.inc. This has the +# form of a sequence of "chains" (with no separator between two +# chains). Each chain begins with $rpl_server_count_length space +# characters, followed by a sequence of numbers, each number +# whitespace-padded to $rpl_server_count_length characters. Each +# number in the sequence denotes a server, and the N'th server is a +# master of the (N+1)'th server. For example, if $rpl_topology is +# '1->2,2->3,3->1,2->4,5->6', then $rpl_sync_chain is ' 56 123124'. +# +# +# ==== Usage ==== +# +# [--let $rpl_debug= 1] +# --source include/rpl_generate_sync_chain.inc +# +# Parameters: +# $rpl_debug +# See include/rpl_init.inc + + +--let $include_filename= rpl_generate_sync_chain.inc +--source include/begin_include_file.inc + + +# Algorithm: +# 0. Mark all servers as unseen and unsynced. +# 1. Let S be a server that is marked unseen. +# 2. Append S to the list of seen servers. +# 3. Check how S is marked: +# 3.1. If S has no master: append the list of seen servers (in +# order from grand-master to grand-slave) to the end of +# $rpl_sync_chain. Go to 3. +# 3.2. Elseif S is marked as synced: append the list of seen +# servers (in order from grand-master to grand-slave) to the +# end of $rpl_sync_chain. Go to 3. +# 3.3. Elseif S is marked as unsynced but seen: This means that the +# graph of visited servers has a "6-shape": it is a loop with +# a tail, such as 1->2->3->1->4->5. We should first sync the +# loop, and then the tail. To ensure all servers in the loop +# are synced, we must sync the loop two turns minus two +# servers. For example, the loop 1->2->3->4->5->1 is fully +# synced by this sequence of 1-step synchronizations: +# 1->2->3->4->5->1->2->3->4. Hence we do this: in the list of +# traversed servers (in order from grand-master to +# grand-slave), find the first occurrence of S. Take the +# sub-list starting at the 3rd server and ending at the first +# occurrence of S. Append this sub-list it to the end of +# $rpl_sync_chain. Then append the entire list of traversed +# servers (in order from grand-master to grand-slave) to +# $rpl_sync_chain. Go to 3. +# 3.4. Else (i.e., S has a master and is not marked as seen or +# synced): Mark S as seen. Set S=master(S) and go back to 2. +# 4. For each server that is marked as seen, mark it as synced. +# 5. If there are unseen servers, go back to 1. + +# $_rpl_server_marks holds the marks of all servers. The i'th character +# corresponds to the mark of server i: +# '0' = unseen & unmarked, '1' = seen & unsynced, '2' = seen & synced. +--let $_rpl_server_marks= `SELECT REPEAT('0', $rpl_server_count)` +--let $_rpl_start_server= $rpl_server_count +--let $rpl_sync_chain= +while ($_rpl_start_server) +{ + --let $_rpl_server= `SELECT RPAD('$_rpl_start_server', $rpl_server_count_length, ' ')` + --let $_rpl_seen_list= + --let $_rpl_continue_loop= 1 + while ($_rpl_continue_loop) + { + --let $_rpl_master= `SELECT SUBSTRING('$rpl_master_list', 1 + ($_rpl_server - 1) * $rpl_server_count_length, $rpl_server_count_length)` + # We need to delimit elements of $_rpl_seen_list with commas, so + # that LOCATE() below will not find spurious matches that begin in + # the middle of one element and end in the middle of next element. + --let $_rpl_seen_list= $_rpl_server,$_rpl_seen_list + # If server is marked seen or synced, or has no master + if (`SELECT SUBSTRING('$_rpl_server_marks', $_rpl_server, 1) != 0 OR '$_rpl_master' = ''`) + { + # If server is marked seen but not synced. + if (`SELECT SUBSTRING('$_rpl_server_marks', $_rpl_server, 1) = 1`) + { + # Get sub-list of servers to prepend to server list. + # E.g., if topology is 1->2->3->4->1->5, then at this point + # $_rpl_seen_list='1,2,3,4,1,5,' and we have to prepend '4,3,' + # to it. Hence, the sub-list starts at position + # 1+2*($rpl_server_count_length+1) and ends at the first + # occurrence of ',1,' in the list. + --let $_rpl_extra_list= `SELECT SUBSTRING('$_rpl_seen_list', 1 + 2 * ($rpl_server_count_length + 1), LOCATE(',$_rpl_server,', '$_rpl_seen_list') - 2 * ($rpl_server_count_length + 1))` + --let $_rpl_seen_list= $_rpl_extra_list$_rpl_seen_list + } + # Append the seen servers. Only need to append if the list + # contains at least two elements. + if (`SELECT LENGTH('$_rpl_seen_list') > $rpl_server_count_length + 1`) + { + --let $rpl_sync_chain= $rpl_sync_chain$_rpl_no_server$_rpl_seen_list + } + --let $_rpl_continue_loop= 0 + } + --let $_rpl_server_marks= `SELECT INSERT('$_rpl_server_marks', $_rpl_server, 1, '1')` + --let $_rpl_server= $_rpl_master + } + # Mark seen servers as synced + --let $_rpl_server_marks= `SELECT REPLACE('$_rpl_server_marks', '1', '2')` + # Get highest-numbered unmarked server. + --let $_rpl_start_server= `SELECT IFNULL(NULLIF($rpl_server_count + 1 - LOCATE('0', REVERSE('$_rpl_server_marks')), $rpl_server_count + 1), 0)` +} +# Strip commas: they were only needed temporarily. +--let $rpl_sync_chain= `SELECT REPLACE('$rpl_sync_chain', ',', '')` + +if ($rpl_debug) +{ + --echo Generated \$rpl_sync_chain = '$rpl_sync_chain' +} + + +--let $include_filename= rpl_generate_sync_chain.inc +--source include/end_include_file.inc diff --git a/mysql-test/include/rpl_init.inc b/mysql-test/include/rpl_init.inc new file mode 100644 index 00000000000..6419682e650 --- /dev/null +++ b/mysql-test/include/rpl_init.inc @@ -0,0 +1,242 @@ +# ==== Purpose ==== +# +# Set up replication on several servers in a specified topology. +# +# By default, this script does the following: +# - Creates the connections server_1, server_2, ..., server_N, as +# well as extra connections server_1_1, server_2_1, ..., +# server_N_1. server_I and server_I_1 are connections to the same +# server. +# - Sets up @@auto_increment_increment and @@auto_increment_increment. +# - Verifies that @@server_id of all servers are different. +# - Calls RESET MASTER, RESET SLAVE, USE test, CHANGE MASTER, START SLAVE. +# - Sets the connection to server_1 before exiting. +# +# ==== Usage ==== +# +# 1. If you are going to use more than two servers, create +# rpl_test.cfg with the following contents: +# +# !include ../my.cnf +# [mysqld.1] +# log-slave-updates +# [mysqld.2] +# log-slave-updates +# ... +# [mysqld.N] +# log-slave-updates +# +# [ENV] +# SERVER_MYPORT_3= @mysqld.3.port +# SERVER_MYPORT_4= @mysqld.4.port +# SERVER_MYPORT_5= @mysqld.5.port +# ... +# SERVER_MYPORT_N= @mysqld.N.port +# +# (It is allowed, but not required, to configure SERVER_MYPORT_1 +# and SERVER_MYPORT_2 too. If these variables are not set, the +# variables MASTER_MYPORT and SLAVE_MYPORT, configured in the +# default my.cnf used by the rpl and rpl_ndb suites, are used +# instead. In addition, in the rpl_ndb suite, SERVER_MYPORT_3 is +# not needed since MASTER_MYPORT1 can be used instead.) +# +# 2. Execute the following near the top of the test: +# +# [--let $rpl_server_count= 7] +# --let $rpl_topology= 1->2->3->1->4, 2->5, 6->7 +# [--let $rpl_check_server_ids= 1] +# [--let $rpl_skip_change_master= 1] +# [--let $rpl_skip_start_slave= 1] +# [--let $rpl_skip_reset_master_and_slave= 1] +# [--let $rpl_debug= 1] +# [--let $slave_timeout= NUMBER] +# --source include/rpl_init.inc +# +# Parameters: +# +# $rpl_server_count +# The number of servers to configure. If this is not set, the largest +# number in $rpl_topology will be used. +# +# $rpl_topology +# A comma-separated list of replication chain +# specifications. Each replication chain specification has the +# form S1->S2->...->Sn, where 1 <= S1,...Sn <= $rpl_server_count. +# This file will configure S(i+1) to be a slave of S(i). If you +# want to specify the empty topology (no server replicates at +# all), you have to set $rpl_topology=none. +# +# $rpl_check_server_ids +# If $rpl_check_server_ids is set, this script checks that the +# @@server_id of all servers are different. This is normally +# guaranteed by mtr, so it is only useful for debugging. +# +# $rpl_skip_reset_master_and_slave +# By default, this script issues RESET MASTER and RESET SLAVE +# before CHANGE MASTER and START SLAVE. RESET MASTER and RESET +# SLAVE are suppressed if $rpl_skip_reset_master_and_slave is +# set. +# +# $rpl_skip_change_master +# By default, this script issues CHANGE MASTER so that all slaves +# are ready to run as specified by $rpl_topology. CHANGE MASTER +# is suppressed if $rpl_skip_change_master is set. +# +# $rpl_skip_start_slave +# By default, this script issues START SLAVE on all slaves +# specified by $rpl_topology. START SLAVE is suppressed if +# $rpl_skip_change_master is set. +# +# $rpl_debug +# By default, this script only outputs a static text that says +# that rpl_init.inc was invoked. If $rpl_debug is set, additional +# debug info is printed. The debug info may be nondeterministic, +# so no test case should be checked in with $rpl_debug set. +# +# $slave_timeout +# Timeout used when waiting for the slave threads to start. +# See include/wait_for_slave_param.inc +# +# +# ==== Side effects ==== +# +# Changes current connection to server_1. + +--source include/have_log_bin.inc + + +--let $include_filename= rpl_init.inc [topology=$rpl_topology] +--source include/begin_include_file.inc + + +if ($rpl_debug) +{ + --echo ---- Check input ---- + --echo MASTER_MYPORT='$MASTER_MYPORT' SLAVE_MYPORT='$SLAVE_MYPORT' MASTER_MYPORT1='$MASTER_MYPORT1' SLAVE_MYPORT1='$SLAVE_MYPORT1' +} + +# Allow $MASTER_MYPORT as alias for $SERVER_MYPORT_1 +if (!$SERVER_MYPORT_1) +{ + --let SERVER_MYPORT_1= $MASTER_MYPORT +} +# Allow $SLAVE_MYPORT as alias for $SERVER_MYPORT_2 +if (!$SERVER_MYPORT_2) +{ + --let SERVER_MYPORT_2= $SLAVE_MYPORT +} +# Allow $MASTER_MYPORT1 as alias for $SERVER_MYPORT_3 +# (this alias is used by rpl_ndb tests) +if (!$SERVER_MYPORT_3) +{ + --let SERVER_MYPORT_3= $MASTER_MYPORT1 +} +# Allow $SLAVE_MYPORT1 as alias for $SERVER_MYPORT_4 +# (this alias is used by rpl_ndb tests) +if (!$SERVER_MYPORT_4) +{ + --let SERVER_MYPORT_4= $SLAVE_MYPORT1 +} +# Check that $rpl_server_count is set +if (!$rpl_server_count) +{ + --let $_compute_rpl_server_count= `SELECT REPLACE('$rpl_topology', '->', ',')` + --let $rpl_server_count= `SELECT GREATEST($_compute_rpl_server_count)` +} + + +if ($rpl_debug) +{ + --echo ---- Setup connections and reset each server ---- +} + + +if (!$rpl_debug) +{ + --disable_query_log +} + + +# Create two connections to each server; reset master/slave, select +# database, set autoinc variables. +--let $_rpl_server= $rpl_server_count +--let $_rpl_one= _1 +while ($_rpl_server) +{ + # Connect. + --let $rpl_server_number= $_rpl_server + --let $rpl_connection_name= server_$_rpl_server + --source include/rpl_connect.inc + --let $rpl_connection_name= server_$_rpl_server$_rpl_one + --source include/rpl_connect.inc + + # Configure server. + --let $rpl_connection_name= server_$_rpl_server + --source include/rpl_connection.inc + USE test; + if (!$rpl_skip_reset_master_and_slave) + { + RESET MASTER; + RESET SLAVE; + } + eval SET auto_increment_increment= $rpl_server_count; + eval SET auto_increment_offset= $_rpl_server; + + --dec $_rpl_server +} + + +# Signal that initialization is done and all connections created. +--let $rpl_inited= 1 + +# Signal that the server is in a dirty state and needs to be restarted +# if the test is skipped. If the test is not skipped, it will continue +# to the end and execute its cleanup section (and check-testcase will +# report if you forget to clean up). +--source include/force_restart_if_skipped.inc + + +# Assert that all hosts have different server_ids +if ($rpl_check_server_ids) +{ + if ($rpl_debug) + { + --echo ---- Check that @@server_id is distinct for all servers ---- + } + + --let $_rpl_server= $rpl_server_count + while ($_rpl_server) + { + --let $_rpl_server2= $_rpl_server + --dec $_rpl_server2 + while ($_rpl_server2) + { + --let $assert_text= Servers $_rpl_server and $_rpl_server2 should have different @@server_id + --let $assert_condition= [$_rpl_server:SELECT @@server_id AS i, i, 1] != [$_rpl_server2:SELECT @@server_id AS i, i, 1] + + --source include/assert.inc + --dec $_rpl_server2 + } + --dec $_rpl_server + } +} + +# $rpl_master_list must be set so that include/rpl_change_topology.inc +# knows which servers are initialized and not. +--let $rpl_master_list= `SELECT REPEAT('x', $rpl_server_count * LENGTH($rpl_server_count))` +--source include/rpl_change_topology.inc + + +if (!$rpl_skip_start_slave) +{ + --source include/rpl_start_slaves.inc +} + + +--let $rpl_connection_name= server_1 +--source include/rpl_connection.inc + + +--let $skip_restore_connection= 1 +--let $include_filename= rpl_init.inc +--source include/end_include_file.inc diff --git a/mysql-test/include/rpl_reconnect.inc b/mysql-test/include/rpl_reconnect.inc new file mode 100644 index 00000000000..cdbbd0a1bf1 --- /dev/null +++ b/mysql-test/include/rpl_reconnect.inc @@ -0,0 +1,132 @@ +# ==== Purpose ==== +# +# After a server has restarted, this waits for all clients configured +# by rpl_init.inc and/or master-slave.inc to reconnect again. +# +# For each connection, it issues this: +# --enable_reconnect +# --source include/wait_until_connected_again.inc +# --disable_reconnect +# +# +# ==== Usage ==== +# +# --let $rpl_server_number= N +# [--let $rpl_debug= 1] +# --source include/rpl_reconnect.inc +# +# Parameters: +# $rpl_server_number +# Number to identify the server that needs to reconnect. 1 is the +# master server, 2 the slave server, 3 the 3rd server, and so on. +# Cf. include/rpl_init.inc +# +# $rpl_debug +# See include/rpl_init.inc + +--let $include_filename= rpl_reconnect.inc +--source include/begin_include_file.inc + +if (!$rpl_server_number) +{ + --die ERROR IN TEST: you must set $rpl_server_number before you source rpl_connect.inc +} + + +if ($rpl_debug) +{ + --echo ---- Enable reconnect ---- +} + +--let $_rpl_server_number= $rpl_server_number + +--dec $_rpl_server_number +if (!$_rpl_server_number) +{ + --let $rpl_connection_name= default + --source include/rpl_connection.inc + --enable_reconnect + + --let $rpl_connection_name= master + --source include/rpl_connection.inc + --enable_reconnect + + --let $rpl_connection_name= master1 + --source include/rpl_connection.inc + --enable_reconnect +} + +--dec $_rpl_server_number +if (!$_rpl_server_number) +{ + --let $rpl_connection_name= slave + --source include/rpl_connection.inc + --enable_reconnect + + --let $rpl_connection_name= slave1 + --source include/rpl_connection.inc + --enable_reconnect +} + +--let $rpl_connection_name= server_$rpl_server_number +--source include/rpl_connection.inc +--enable_reconnect + +--let $_rpl_one= _1 +--let $rpl_connection_name= server_$rpl_server_number$_rpl_one +--source include/rpl_connection.inc +--enable_reconnect + +if ($rpl_debug) +{ + --echo ---- Wait for reconnect and disable reconnect on all connections ---- +} + +--let $_rpl_server_number= $rpl_server_number + +--dec $_rpl_server_number +if (!$_rpl_server_number) +{ + --let $rpl_connection_name= default + --source include/rpl_connection.inc + --source include/wait_until_connected_again.inc + --disable_reconnect + + --let $rpl_connection_name= master + --source include/rpl_connection.inc + --source include/wait_until_connected_again.inc + --disable_reconnect + + --let $rpl_connection_name= master1 + --source include/rpl_connection.inc + --source include/wait_until_connected_again.inc + --disable_reconnect +} + +--dec $_rpl_server_number +if (!$_rpl_server_number) +{ + --let $rpl_connection_name= slave + --source include/rpl_connection.inc + --source include/wait_until_connected_again.inc + --disable_reconnect + + --let $rpl_connection_name= slave1 + --source include/rpl_connection.inc + --source include/wait_until_connected_again.inc + --disable_reconnect +} + +--let $rpl_connection_name= server_$rpl_server_number +--source include/rpl_connection.inc +--source include/wait_until_connected_again.inc +--disable_reconnect + +--let $rpl_connection_name= server_$rpl_server_number$_rpl_one +--source include/rpl_connection.inc +--source include/wait_until_connected_again.inc +--disable_reconnect + + +--let $include_filename= rpl_reconnect.inc +--source include/end_include_file.inc diff --git a/mysql-test/include/rpl_reset.inc b/mysql-test/include/rpl_reset.inc new file mode 100644 index 00000000000..a94371c38fc --- /dev/null +++ b/mysql-test/include/rpl_reset.inc @@ -0,0 +1,81 @@ +# ==== Purpose ==== +# +# Reset all replication servers to a clean state: +# +# - sync all slaves, +# - stop all slaves (STOP SLAVE), +# - remove all binlogs and relay logs (RESET MASTER and RESET SLAVE), +# - start all slaves again (START SLAVE). +# +# It does not execute CHANGE MASTER, so the replication topology is +# kept intact. +# +# +# ==== Usage ==== +# +# [--let $rpl_only_running_threads= 1] +# [--let $rpl_debug= 1] +# [--let $slave_timeout= NUMBER] +# --source include/rpl_end.inc +# +# Parameters: +# $rpl_only_running_threads +# If one or both of the IO and SQL threads is stopped, sync and +# stop only the threads that are running. See +# include/rpl_sync.inc and include/stop_slave.inc for details. +# +# $rpl_debug +# See include/rpl_init.inc +# +# $slave_timeout +# Set the timeout when waiting for slave threads to stop and +# start, respectively. See include/wait_for_slave_param.inc +# +# Note: +# This script will fail if Last_SQL_Error or Last_IO_Error is +# nonempty. If you expect an error in the SQL thread, you should +# normally do this before you source include/rpl_reset.inc: +# +# --source include/wait_for_slave_sql_error.inc +# --source include/stop_slave_io.inc +# RESET SLAVE; + +--let $include_filename= rpl_reset.inc +--source include/begin_include_file.inc + + +if (!$rpl_debug) +{ + --disable_query_log +} + + +--source include/rpl_sync.inc + + +if ($rpl_debug) +{ + --echo ---- Stop and reset all servers ---- +} +--let $_rpl_server= $rpl_server_count +while ($_rpl_server) +{ + --let $rpl_connection_name= server_$_rpl_server + --source include/rpl_connection.inc + + # Check if this server is configured to have a master + if (`SELECT SUBSTRING('$rpl_master_list', 1 + ($_rpl_server - 1) * $rpl_server_count_length, $rpl_server_count_length) != ''`) + { + --source include/stop_slave.inc + RESET SLAVE; + } + RESET MASTER; + --dec $_rpl_server +} + + +--source include/rpl_start_slaves.inc + + +--let $include_filename= rpl_reset.inc +--source include/end_include_file.inc diff --git a/mysql-test/include/rpl_restart_server.inc b/mysql-test/include/rpl_restart_server.inc new file mode 100644 index 00000000000..5df2c67d3da --- /dev/null +++ b/mysql-test/include/rpl_restart_server.inc @@ -0,0 +1,39 @@ +# ==== Purpose ==== +# +# Shut down and shut up the server given by $rpl_server_number. This +# is equivalent to rpl_stop_server.inc followed by rpl_start_server.inc +# +# ==== Usage ==== +# +# --let $rpl_server_number= N +# [--let $rpl_server_parameters= --flag1 --flag2 ...] +# [--let $rpl_debug= 1] +# --source include/rpl_restart_server.inc +# +# Parameters: +# +# $rpl_server_number, $rpl_server_parameters +# See include/rpl_start_server.inc +# +# $rpl_debug +# See include/rpl_init.inc +# +# ==== See also ==== +# +# rpl_start_server.inc +# rpl_stop_server.inc + + +--let $_rpl_restart_server_args= [server_number=$rpl_server_number] +if ($rpl_server_parameters) +{ + --let $_rpl_restart_server_args= [server_number=$rpl_server_number parameters: $rpl_server_parameters] +} +--let $include_filename= rpl_restart_server.inc $_rpl_restart_server_args +--source include/begin_include_file.inc + +--source include/rpl_stop_server.inc +--source include/rpl_start_server.inc + +--let $include_filename= rpl_restart_server.inc $_rpl_restart_server_args +--source include/end_include_file.inc diff --git a/mysql-test/include/rpl_start_server.inc b/mysql-test/include/rpl_start_server.inc new file mode 100644 index 00000000000..c59c7759910 --- /dev/null +++ b/mysql-test/include/rpl_start_server.inc @@ -0,0 +1,54 @@ +# ==== Purpose ==== +# +# Start the server given by $rpl_server_number. This should normally +# be invoked after rpl_stop_server.inc. +# +# ==== Usage ==== +# +# --let $rpl_server_number= N +# [--let $rpl_server_parameters= --flag1 --flag2 ...] +# [--let $rpl_debug= 1] +# --source include/rpl_start_server.inc +# +# Parameters: +# +# $rpl_server_number +# Number to identify the server that needs to reconnect. 1 is the +# master server, 2 the slave server, 3 the 3rd server, and so on. +# Cf. include/rpl_init.inc +# +# $rpl_server_parameters +# If set, extra parameters given by this variable are passed to +# mysqld. +# +# $rpl_debug +# See include/rpl_init.inc +# +# ==== See also ==== +# +# rpl_stop_server.inc +# rpl_restart_server.inc + + +--let $_rpl_start_server_command= restart +--let $_rpl_start_server_args= [server_number=$rpl_server_number] +if ($rpl_server_parameters) +{ + --let $_rpl_start_server_command= restart:$rpl_server_parameters + --let $_rpl_start_server_args= [server_number=$rpl_server_number parameters: $rpl_server_parameters] +} + +--let $include_filename= rpl_start_server.inc $_rpl_start_server_args +--source include/begin_include_file.inc + +--let $rpl_connection_name= server_$rpl_server_number +--source include/rpl_connection.inc + +# Write file to make mysql-test-run.pl start up the server again +--exec echo "$_rpl_start_server_command" > $MYSQLTEST_VARDIR/tmp/mysqld.$rpl_server_number.expect + +--source include/rpl_reconnect.inc + + +--let $include_filename= rpl_start_server.inc $_rpl_start_server_args +--source include/end_include_file.inc diff --git a/mysql-test/include/rpl_start_slaves.inc b/mysql-test/include/rpl_start_slaves.inc new file mode 100644 index 00000000000..fdd90eb12c5 --- /dev/null +++ b/mysql-test/include/rpl_start_slaves.inc @@ -0,0 +1,32 @@ +# ==== Purpose ==== +# +# Start all slaves configured by rpl_init.inc and wait for the slave +# threads to start. +# +# Note that rpl_init.inc calls this file automatically, so you only +# need to source this file if the slaves have stopped after that. +# +# +# ==== Usage ==== +# +# [--let $rpl_debug= 1] +# [--let $slave_timeout= NUMBER] +# --source include/rpl_start_slaves.inc +# +# Parameters: +# $rpl_debug +# See include/rpl_init.inc +# +# $slave_timeout +# Set the timeout when waiting for slave threads to stop and +# start, respectively. See include/wait_for_slave_param.inc + + +--let $include_filename= rpl_start_slaves.inc +--source include/begin_include_file.inc + +--let $rpl_source_file= include/start_slave.inc +--source include/rpl_for_each_slave.inc + +--let $include_filename= rpl_start_slaves.inc +--source include/end_include_file.inc diff --git a/mysql-test/include/rpl_stop_server.inc b/mysql-test/include/rpl_stop_server.inc new file mode 100644 index 00000000000..e1f8839dd69 --- /dev/null +++ b/mysql-test/include/rpl_stop_server.inc @@ -0,0 +1,63 @@ +# ==== Purpose ==== +# +# Stop the server given by $rpl_server_number. +# +# ==== Usage ==== +# +# --let $rpl_server_number= N +# [--let $rpl_debug= 1] +# --source include/rpl_stop_server.inc +# +# Parameters: +# +# $rpl_server_number +# Number to identify the server that needs to reconnect. 1 is the +# master server, 2 the slave server, 3 the 3rd server, and so on. +# Cf. include/rpl_init.inc +# +# $rpl_debug +# See include/rpl_init.inc +# +# ==== See also ==== +# +# rpl_start_server.inc +# rpl_restart_server.inc + + +# Can't use begin_include_file / end_include_file because they require +# executing on a server and the server will go down after this script. +if (!$_include_file_depth) +{ + --echo include/rpl_stop_server.inc [server_number=$rpl_server_number] +} +--inc $_include_file_depth +--let $_rpl_stop_server_old_connection= $CURRENT_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' + --echo $_include_file_indent==== BEGIN include/$include_filename ==== +} + + +--let $rpl_connection_name= server_$rpl_server_number +--source include/rpl_connection.inc + +# Write file to make mysql-test-run.pl expect the "crash", but don't start +# it until it's told to +--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.$rpl_server_number.expect + +# Send shutdown to the connected server and give +# it 10 seconds to die before zapping it +shutdown_server 10; + +--source include/wait_until_disconnected.inc + + +--let $rpl_connection_name= $_rpl_stop_server_old_connection +--source include/rpl_connection.inc +--dec $_include_file_depth +if ($rpl_debug) +{ + --echo $_include_file_indent==== END include/rpl_stop_server.inc [server_number=$rpl_server_number] ==== + --echo $_include_file_indent con='$CURRENT_CONNECTION' warn='$ENABLED_WARNINGS' qlog='$ENABLED_QUERY_LOG' rlog='$ENABLED_RESULT_LOG' aborterr='$ENABLED_ABORT_ON_ERROR' +} diff --git a/mysql-test/include/rpl_stop_slaves.inc b/mysql-test/include/rpl_stop_slaves.inc new file mode 100644 index 00000000000..2b9199739dd --- /dev/null +++ b/mysql-test/include/rpl_stop_slaves.inc @@ -0,0 +1,33 @@ +# ==== Purpose ==== +# +# Stop all slaves configured by rpl_init.inc and waits for the slave +# threads to stop. +# +# +# ==== Usage ==== +# +# [--let $rpl_only_running_threads= 1] +# [--let $rpl_debug= 1] +# [--let $rpl_timeout= NUMBER] +# --source include/rpl_stop_slaves.inc +# +# Parameters: +# $rpl_only_running_threads +# See include/stop_slave.inc +# +# $slave_timeout +# Set the timeout when waiting for slave threads to stop. See +# include/wait_for_slave_param.inc +# +# $rpl_debug +# See include/rpl_init.inc + + +--let $include_filename= rpl_stop_slaves.inc +--source include/begin_include_file.inc + +--let $rpl_source_file= include/stop_slave.inc +--source include/rpl_for_each_slave.inc + +--let $include_filename= rpl_stop_slaves.inc +--source include/end_include_file.inc diff --git a/mysql-test/include/rpl_sync.inc b/mysql-test/include/rpl_sync.inc new file mode 100644 index 00000000000..a05bee23981 --- /dev/null +++ b/mysql-test/include/rpl_sync.inc @@ -0,0 +1,153 @@ +# ==== Purpose ==== +# +# Sync all servers in an arbitrary replication topology. This works +# only if the servers have been configured with rpl_init.inc (and +# possibly rpl_change_topology.inc). +# +# +# ==== Usage ==== +# +# [--let $rpl_only_running_threads= 1] +# [--let $rpl_debug= 1] +# [--let $slave_timeout= NUMBER] +# --source include/rpl_sync.inc +# +# Parameters: +# $rpl_only_running_threads +# By default, this script assumes that both the IO thread and the +# SQL thread are running and fails if one of them is stopped. If +# $rpl_only_running_threads is set, this script first checks +# which slave threads are running: +# - If both threads are running, sync both threads with master. +# - If only IO thread is running, sync IO thread with master. +# - If only SQL thread is running, sync SQL thread with IO thread. +# - If no thread is running, don't sync. +# +# $slave_timeout +# Set the timeout when waiting for threads to sync. See +# include/wait_for_slave_param.inc +# +# $rpl_debug +# See include/rpl_init.inc +# +# +# ==== Side effects ==== +# +# Does not change the current connection (note that this is different +# from mysqltest's built-in sync_slave_with_master command). + + +--let $include_filename= rpl_sync.inc +--source include/begin_include_file.inc + + +# Compute $rpl_sync_chain if needed. We could have done this in +# rpl_change_topology.inc, but instead we do it here because that +# means we only compute $rpl_sync_chain when it is needed. +if ($rpl_sync_chain_dirty) +{ + --source include/rpl_generate_sync_chain.inc + --let $rpl_sync_chain_dirty= 0 +} + + +if ($rpl_debug) +{ + --echo \$rpl_sync_chain = '$rpl_sync_chain' \$rpl_only_running_threads= $rpl_only_running_threads +} + +if (!$rpl_server_count_length) +{ + --die \$rpl_server_count_length is not set. Did you call rpl_init.inc? +} + + +--let $_rpl_i= 1 +--let $_rpl_connect= 0 +while ($_rpl_i) { + # $rpl_sync_chain consists of a sequence of sync chains. Each sync + # chain has the form: + # + # ... + # + # So the space character indicates that a new sync chain starts. + --let $_rpl_server= `SELECT TRIM(SUBSTR('$rpl_sync_chain', 1 + ($_rpl_i - 1) * $rpl_server_count_length, $rpl_server_count_length))` + + if ($_rpl_server) + { + if ($rpl_debug) + { + --echo [sync server_$_rpl_prev_server -> server_$_rpl_server] + } + if ($rpl_only_running_threads) + { + --connection server_$_rpl_server + --let $_rpl_slave_io_running= query_get_value(SHOW SLAVE STATUS, Slave_IO_Running, 1) + --let $_rpl_slave_sql_running= query_get_value(SHOW SLAVE STATUS, Slave_SQL_Running, 1) + if ($rpl_debug) + { + --echo Sync IO: $_rpl_slave_io_running; Sync SQL: $_rpl_slave_sql_running + } + --let $_rpl_slave_io_running= `SELECT IF('$_rpl_slave_io_running' = 'Yes', 1, '')` + --let $_rpl_slave_sql_running= `SELECT IF('$_rpl_slave_sql_running' = 'Yes', 1, '')` + if ($_rpl_slave_io_running) + { + --connection server_$_rpl_prev_server + if ($_rpl_slave_sql_running) + { + if ($rpl_debug) + { + --let $_rpl_master_file= query_get_value("SHOW MASTER STATUS", File, 1) + --let $_rpl_master_pos= query_get_value("SHOW MASTER STATUS", Position, 1) + --echo syncing master_file='$_rpl_master_file' master_pos='$_rpl_master_pos' + } + --sync_slave_with_master server_$_rpl_server + } + if (!$_rpl_slave_sql_running) + { + --let $sync_slave_connection= server_$_rpl_server + --source include/sync_slave_io_with_master.inc + } + } + if (!$_rpl_slave_io_running) + { + if ($_rpl_slave_sql_running) + { + --source include/sync_slave_sql_with_io.inc + } + } + } + if (!$rpl_only_running_threads) + { + --connection server_$_rpl_prev_server + if ($rpl_debug) + { + --let $_rpl_master_file= query_get_value("SHOW MASTER STATUS", File, 1) + --let $_rpl_master_pos= query_get_value("SHOW MASTER STATUS", Position, 1) + --echo syncing master_file='$_rpl_master_file' master_pos='$_rpl_master_pos' + } + --sync_slave_with_master server_$_rpl_server + } + } + + # This happens at the beginning of a new sync subchain and at the + # end of the full sync chain. + if (!$_rpl_server) + { + --inc $_rpl_i + --let $_rpl_server= `SELECT TRIM(SUBSTR('$rpl_sync_chain', 1 + ($_rpl_i - 1) * $rpl_server_count_length, $rpl_server_count_length))` + + if (!$_rpl_server) + { + # terminate loop + --let $_rpl_i= -1 + } + } + + --let $_rpl_prev_server= $_rpl_server + --inc $_rpl_i +} + + +--let $include_filename= rpl_sync.inc +--source include/end_include_file.inc diff --git a/mysql-test/include/save_master_pos.inc b/mysql-test/include/save_master_pos.inc new file mode 100644 index 00000000000..2c176d160cc --- /dev/null +++ b/mysql-test/include/save_master_pos.inc @@ -0,0 +1,33 @@ +# ==== Purpose ==== +# +# Save the current binlog position on the master, just like the +# built-in mysqltest command save_master_pos. The advantage of this +# script is that the saved position is available to the test script. +# +# +# ==== Usage ==== +# +# [--let $rpl_debug= 1] +# --source include/save_master_pos.inc +# +# Typically, you would use this script together with +# include/sync_io_with_master.inc +# +# Parameters: +# $rpl_debug +# See include/rpl_init.inc + + +--let $include_filename= save_master_pos.inc +--source include/begin_include_file.inc + +let $_master_file= query_get_value("SHOW MASTER STATUS", File, 1); +let $_master_pos= query_get_value("SHOW MASTER STATUS", Position, 1); + +if ($rpl_debug) +{ + --echo save_master_pos saved file='$_master_file', pos='$_master_pos' +} + +--let $include_filename= save_master_pos.inc +--source include/end_include_file.inc diff --git a/mysql-test/include/setup_fake_relay_log.inc b/mysql-test/include/setup_fake_relay_log.inc index 1b517862235..da3ce8e6038 100644 --- a/mysql-test/include/setup_fake_relay_log.inc +++ b/mysql-test/include/setup_fake_relay_log.inc @@ -29,11 +29,15 @@ # Creates a binlog file and a binlog index file, and sets # @@global.relay_log_purge=1. All this is restored when you call # cleanup_fake_relay_log.inc. -# -# Enables the query log. ---disable_query_log +--let $include_filename= setup_fake_relay_log.inc +--source include/begin_include_file.inc + +if (!$rpl_debug) +{ + --disable_query_log +} # Print message. let $_fake_relay_log_printable= `SELECT REPLACE('$fake_relay_log', '$MYSQL_TEST_DIR', 'MYSQL_TEST_DIR')`; @@ -53,35 +57,26 @@ if ($running) { --echo Error: Slave was running when test case sourced --echo include/setup_fake_replication.inc --echo Slave_IO_Running = $_io_running; Slave_SQL_Running = $_sql_running - --echo Printing some debug info: - SHOW SLAVE STATUS; - SHOW MASTER STATUS; - SHOW BINLOG EVENTS; - SHOW PROCESSLIST; + --source include/show_rpl_debug_info.inc + --die } # Read server variables. -let $MYSQLD_DATADIR= `SELECT @@datadir`; +let $_fake_datadir= `SELECT @@datadir`; let $_fake_filename= query_get_value(SHOW VARIABLES LIKE 'relay_log', Value, 1); if (!$_fake_filename) { - --echo Badly written test case: relay_log variable is empty. Please use the - --echo server option --relay-log=FILE. + --die ERROR IN TEST: relay_log variable is empty. Please use the server option --relay-log=FILE. } -let $_fake_relay_log= $MYSQLD_DATADIR/$_fake_filename-fake.000001; -let $_fake_relay_index= $MYSQLD_DATADIR/$_fake_filename.index; +let $_fake_relay_log= $_fake_datadir/$_fake_filename-fake.000001; +let $_fake_relay_index= $_fake_datadir/$_fake_filename.index; # Need to restore relay_log_purge in cleanup_fake_relay_log.inc, since # CHANGE MASTER modifies it (see the manual for CHANGE MASTER). let $_fake_relay_log_purge= `SELECT @@global.relay_log_purge`; -# Reset slave and remove relay log and index files if they exist RESET SLAVE; -error 0,1; -remove_file $MYSQLD_DATADIR/$_fake_filename.000001; -error 0,1; -remove_file $MYSQLD_DATADIR/$_fake_filename.index; # Create relay log file. -copy_file $fake_relay_log $_fake_relay_log; +--copy_file $fake_relay_log $_fake_relay_log # Create relay log index. @@ -90,17 +85,23 @@ copy_file $fake_relay_log $_fake_relay_log; # relay log before comparison, thus we need to added the directory # part (./ on unix .\ on windows) when faking the relay-log-bin.index. -if (`select convert(@@version_compile_os using latin1) IN ("Win32","Win64","Windows") = 0`) -{ - eval select './$_fake_filename-fake.000001\n' into dumpfile '$_fake_relay_index'; -} +# mysqltest currently parses backslash escapes wrong, so any sequence +# of N backslashes is collapsed to just one backslash. So we use the +# SQL function CHAR() to generate a backslash character instead. Since +# the string is interpreted in SQL context, we to escape it, so we use +# two backslashes. -if (`select convert(@@version_compile_os using latin1) IN ("Win32","Win64","Windows") != 0`) -{ - eval select '.\\\\$_fake_filename-fake.000001\n' into dumpfile '$_fake_relay_index'; -} +--let $_fake_dir= `select IF(convert(@@version_compile_os using latin1) IN ("Win32","Win64","Windows"), CONCAT('.', CHAR(92), CHAR(92)), './')` +--let $write_var= $_fake_dir$_fake_filename-fake.000001\n +--let $write_to_file= $_fake_relay_index +--source include/write_var_to_file.inc + +# Remember old settings. +--let $_fake_old_master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1) # Setup replication from existing relay log. eval CHANGE MASTER TO MASTER_HOST='dummy.localdomain', RELAY_LOG_FILE='$_fake_filename-fake.000001', RELAY_LOG_POS=4; ---enable_query_log + +--let $include_filename= setup_fake_relay_log.inc +--source include/end_include_file.inc diff --git a/mysql-test/include/show_rpl_debug_info.inc b/mysql-test/include/show_rpl_debug_info.inc index dedf689cd19..1b2b7360970 100644 --- a/mysql-test/include/show_rpl_debug_info.inc +++ b/mysql-test/include/show_rpl_debug_info.inc @@ -3,87 +3,109 @@ # Print status information for replication, typically used to debug # test failures. # -# First, the following is printed on slave: +# The following is printed on the current connection: # +# SELECT NOW() # SHOW SLAVE STATUS +# SHOW MASTER STATUS # SHOW PROCESSLIST # SHOW BINLOG EVENTS IN # # Where is the currently active binlog. # -# Then, the following is printed on master: +# Then, the same is printed from all connections configured by +# rpl_init.inc - i.e., on connection server_N, where +# 1 <= N <= $rpl_server_count # -# SHOW MASTER STATUS -# SHOW PROCESSLIST -# SHOW BINLOG EVENTS IN -# SHOW BINLOG EVENTS IN -# -# Where is the binlog name that the slave sql thread -# is currently reading from and is the binlog that -# the slave IO thread is currently reading from. # # ==== Usage ==== # -# [let $master_connection= ;] -# source include/show_rpl_debug_info.inc; +# [--let $rpl_only_current_connection= 1] +# --source include/show_rpl_debug_info.inc # -# If $master_connection is set, debug info will be retrieved from the -# connection named $master_connection. Otherwise, it will be -# retrieved from the 'master' connection if the current connection is -# 'slave'. +# Parameters: +# $rpl_only_current_connection +# By default, debug info is printed from all connections, starting +# with the current connection. If this variable is set, debug +# info is printed only for the current connection. +# +# +# ==== Side effects ==== +# +# Turns on enable_query_log, enable_result_log, enable_warnings, +# horizontal_results, and enable_abort_on_error. +# +# Prints non-deterministic output to the query log. This file should +# never be called in a test that does not fail. -let $_con= $CURRENT_CONNECTION; ---echo ---echo [on $_con] ---echo -SELECT NOW(); ---echo **** SHOW SLAVE STATUS on $_con **** -query_vertical SHOW SLAVE STATUS; ---echo ---echo **** SHOW PROCESSLIST on $_con **** -SHOW PROCESSLIST; ---echo ---echo **** SHOW BINLOG EVENTS on $_con **** -let $binlog_name= query_get_value("SHOW MASTER STATUS", File, 1); -eval SHOW BINLOG EVENTS IN '$binlog_name'; -let $_master_con= $master_connection; -if (!$_master_con) +--enable_query_log +--enable_result_log +--enable_warnings +--disable_abort_on_error +--horizontal_results + + +--let $_rpl_old_con= $CURRENT_CONNECTION +--let $_rpl_is_first_server= 1 +--let $_rpl_server= $rpl_server_count +--inc $_rpl_server + + +while ($_rpl_server) { - if ($_con == slave) + if (!$_rpl_is_first_server) { - let $_master_con= master; + --connection server_$_rpl_server } - if (!$_master_con) - { - --echo Unable to determine master connection. No debug info printed for master. - --echo Please fix the test case by setting $master_connection before sourcing - --echo show_rpl_debug_info.inc. - } -} -if ($_master_con) -{ - - let $master_binlog_name_io= query_get_value("SHOW SLAVE STATUS", Master_Log_File, 1); - let $master_binlog_name_sql= query_get_value("SHOW SLAVE STATUS", Relay_Master_Log_File, 1); --echo - --echo [on $_master_con] - connection $_master_con; + --echo ############################## $CURRENT_CONNECTION ############################## --echo - SELECT NOW(); - --echo **** SHOW MASTER STATUS on $_master_con **** + --echo **** SHOW WARNINGS on $CURRENT_CONNECTION **** + SHOW WARNINGS; + --echo + --echo **** SELECT replication-related variables on $CURRENT_CONNECTION **** + SELECT NOW(), @@SERVER_ID; + --echo + --echo **** SHOW SLAVE STATUS on $CURRENT_CONNECTION **** + query_vertical SHOW SLAVE STATUS; + --echo + --echo **** SHOW MASTER STATUS on $CURRENT_CONNECTION **** query_vertical SHOW MASTER STATUS; --echo - --echo **** SHOW PROCESSLIST on $_master_con **** + --echo **** SHOW SLAVE HOSTS on $CURRENT_CONNECTION **** + query_vertical SHOW SLAVE HOSTS; + --echo + --echo **** SHOW PROCESSLIST on $CURRENT_CONNECTION **** SHOW PROCESSLIST; --echo - --echo **** SHOW BINLOG EVENTS on $_master_con **** - eval SHOW BINLOG EVENTS IN '$master_binlog_name_sql'; - if ($master_binlog_name_io != $master_binlog_name_sql) - { - eval SHOW BINLOG EVENTS IN '$master_binlog_name_io'; - } + --echo **** SHOW BINARY LOGS on $CURRENT_CONNECTION **** + SHOW BINARY LOGS; + --echo + --echo **** SHOW BINLOG EVENTS on $CURRENT_CONNECTION **** + let $binlog_name= query_get_value("SHOW MASTER STATUS", File, 1); + --echo binlog_name = '$binlog_name' + eval SHOW BINLOG EVENTS IN '$binlog_name'; + --echo + --echo **** SHOW RELAYLOG EVENTS on $CURRENT_CONNECTION **** + let $relaylog_name= query_get_value(SHOW SLAVE STATUS, Relay_Log_File, 1); + --echo relaylog_name = '$relaylog_name' + eval SHOW RELAYLOG EVENTS IN '$relaylog_name'; - connection $_con; + + --let $_rpl_is_first_server= 0 + --dec $_rpl_server + # Don't use same connection twice. + if (`SELECT 'server_$_rpl_server' = '$_rpl_old_con'`) + { + --dec $_rpl_server + if ($rpl_only_current_connection) + { + --let $_rpl_server= 0 + } + } } + +--connection $_rpl_old_con +--enable_abort_on_error diff --git a/mysql-test/include/show_slave_status.inc b/mysql-test/include/show_slave_status.inc index d66c068e19b..67b1c987954 100644 --- a/mysql-test/include/show_slave_status.inc +++ b/mysql-test/include/show_slave_status.inc @@ -1,25 +1,75 @@ -# Include file to show the slave status, masking out some information -# that varies depending on where the test is executed. +# ==== Purpose ==== +# +# Show selected columns of output from SHOW SLAVE STATUS. +# +# Note: test cases should never call SHOW SLAVE STATUS directly, +# because that outputs more information to the query log than what is +# needed for the property that is being tested. That would cause +# maintenance problems, because (1) it is hard for a human to +# understand what property is being tested; (2) the output of many of +# the fields is non-deterministic (e.g., Slave_IO_State) or changes +# frequently (e.g., binlog positions). +# +# Instead, what you want most of the time is to source one of the +# following scripts: +# +# include/check_slave_no_error.inc +# Assert that Slave_SQL_Errno = Slave_IO_Errno = 0. +# +# include/check_slave_is_running.inc +# Assert that Slave_IO_Running = Slave_SQL_Running = 'Yes'. +# +# include/wait_for_slave_sql_error.inc +# Wait for the SQL thread to get a given error (and assert that +# it has this error). +# +# include/wait_for_slave_io_error.inc +# Wait for the IO thread to get a given error (and assert that +# it has this error). +# +# include/wait_for_slave_sql_to_stop.inc +# include/wait_for_slave_io_to_stop.inc +# include/wait_for_slave_to_stop.inc +# Wait for the SQL thread, the IO thread, or both to stop (and +# assert they stop). +# +# When none of the above applies, you may use this script instead. +# However, take care so that the test never contains explicit binlog +# coordinates. Usually you can read the binlog coordinates into a +# variable and compare it to some other coordinates. +# +# +# ==== Usage ==== +# +# --let $status_items= Column_Name[, Column_Name[, ...]] +# --source include/show_slave_status.inc +# +# Parameters: +# $status_items +# Set to the name of the column in the output of SHOW SLAVE STATUS +# that you want to display. Example: +# +# --let $status_items= Master_SSL_Allowed +# +# You can show multiple columns by setting $status_items to a +# comma-separated list. Example: +# +# --let $status_items= Master_Log_File, Relay_Master_Log_File ---let $_items=$status_items -if (`SELECT "XX$status_items" = "XX"`) + +--let $_show_slave_status_items=$status_items +if (!$status_items) { - --die 'Variable status_items is NULL' + --die Bug in test case: The mysqltest variable $status_items is not set. } ---disable_query_log ---vertical_results -while (`SELECT "XX$_items" <> "XX"`) +while ($_show_slave_status_items) { - --let $_name= `SELECT SUBSTRING_INDEX('$_items', ',', 1)` - --let $_items= `SELECT LTRIM(SUBSTRING('$_items', LENGTH('$_name') + 2))` + --let $_show_slave_status_name= `SELECT SUBSTRING_INDEX('$_show_slave_status_items', ',', 1)` + --let $_show_slave_status_items= `SELECT LTRIM(SUBSTRING('$_show_slave_status_items', LENGTH('$_show_slave_status_name') + 2))` - --let $_value= query_get_value(SHOW SLAVE STATUS, $_name, 1) - - --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR - --eval SELECT "$_value" AS $_name + --let $_show_slave_status_value= query_get_value(SHOW SLAVE STATUS, $_show_slave_status_name, 1) + --let $_show_slave_status_value= `SELECT REPLACE("$_show_slave_status_value", '$MYSQL_TEST_DIR', 'MYSQL_TEST_DIR')` + --echo $_show_slave_status_name = '$_show_slave_status_value' } - ---horizontal_results ---enable_query_log diff --git a/mysql-test/include/start_slave.inc b/mysql-test/include/start_slave.inc index 78a02736de8..d01978037b4 100644 --- a/mysql-test/include/start_slave.inc +++ b/mysql-test/include/start_slave.inc @@ -6,16 +6,34 @@ # Please use this instead of 'START SLAVE', to reduce the risk of test # case bugs. # +# # ==== Usage ==== # -# source include/wait_for_slave_to_start.inc; +# [--let $slave_timeout= NUMBER] +# [--let $rpl_debug= 1] +# --source include/start_slave.inc # -# Parameters to this macro are $slave_timeout and -# $master_connection. See wait_for_slave_param.inc for -# descriptions. +# Parameters: +# $slave_timeout +# See include/wait_for_slave_param.inc +# +# $rpl_debug +# See include/rpl_init.inc + + +--let $include_filename= start_slave.inc +--source include/begin_include_file.inc + + +if (!$rpl_debug) +{ + --disable_query_log +} + ---disable_query_log START SLAVE; ---enable_query_log ---echo include/start_slave.inc source include/wait_for_slave_to_start.inc; + + +--let $include_filename= start_slave.inc +--source include/end_include_file.inc diff --git a/mysql-test/include/stop_slave.inc b/mysql-test/include/stop_slave.inc index 7161e6fe739..64cc0d5b322 100644 --- a/mysql-test/include/stop_slave.inc +++ b/mysql-test/include/stop_slave.inc @@ -3,19 +3,86 @@ # Issues STOP SLAVE on the current connection. Then waits until both # the IO and SQL threads have stopped, or until a timeout is reached. # -# Please use this instead of 'STOP SLAVE', to reduce the risk of test -# case bugs. +# Please use this instead of 'STOP SLAVE', to reduce the risk of races +# in test cases. +# +# This will fail if the slave IO or SQL thread has an error. If you +# expect an error in the IO thread, use +# include/wait_for_slave_io_error.inc and include/stop_slave_sql.inc. +# # # ==== Usage ==== # -# source include/wait_for_slave_to_start.inc; +# [--let $rpl_only_running_threads= 1] +# [--let $slave_timeout= NUMBER] +# [--let $rpl_debug= 1] +# --source include/stop_slave.inc # -# Parameters to this macro are $slave_timeout and -# $master_connection. See wait_for_slave_param.inc for -# descriptions. +# Parameters: +# $rpl_only_running_threads +# By default, this script executes STOP SLAVE unconditionally. +# This generates a warnings if one or both slave threads are +# already stopped. If $rpl_only_running_threads is set, this +# script checks which slave threads are running, and issues either +# STOP SLAVE, STOP SLAVE SQL_THREAD, STOP SLAVE IO_THREAD, or +# nothing. +# +# $slave_timeout +# See include/wait_for_slave_param.inc +# +# $rpl_debug +# See include/rpl_init.inc ---disable_query_log -STOP SLAVE; ---enable_query_log ---echo include/stop_slave.inc -source include/wait_for_slave_to_stop.inc; + +--let $include_filename= stop_slave.inc +--source include/begin_include_file.inc + + +if (!$rpl_debug) +{ + --disable_query_log +} + + +if ($rpl_only_running_threads) +{ + --let $_slave_sql_running= query_get_value(SHOW SLAVE STATUS, Slave_SQL_Running, 1) + --let $_slave_io_running= query_get_value(SHOW SLAVE STATUS, Slave_IO_Running, 1) + if ($rpl_debug) + { + --echo Stop SQL: $_slave_sql_running; Stop IO: $_slave_io_running + } + + --let $_slave_running_bits= `SELECT IF('$_slave_io_running' = 'Yes', 1, 0) + IF('$_slave_sql_running' = 'Yes', 2, 0)` + if ($_slave_running_bits) + { + --dec $_slave_running_bits + # $_slave_running_bits=1: io thread running + if (!$_slave_running_bits) + { + --source include/stop_slave_io.inc + } + --dec $_slave_running_bits + # $_slave_running_bits=2: sql thread running + if (!$_slave_running_bits) + { + --source include/stop_slave_sql.inc + } + --dec $_slave_running_bits + # $_slave_running_bits=2: both threads running + if (!$_slave_running_bits) + { + STOP SLAVE; + --source include/wait_for_slave_to_stop.inc + } + } +} +if (!$rpl_only_running_threads) +{ + STOP SLAVE; + --source include/wait_for_slave_to_stop.inc +} + + +--let $include_filename= stop_slave.inc +--source include/end_include_file.inc diff --git a/mysql-test/include/stop_slave_io.inc b/mysql-test/include/stop_slave_io.inc new file mode 100644 index 00000000000..ddc83782311 --- /dev/null +++ b/mysql-test/include/stop_slave_io.inc @@ -0,0 +1,43 @@ +# ==== Purpose ==== +# +# Issues STOP SLAVE IO_THREAD on the current connection. Then waits +# until the IO thread has stopped, or until a timeout is reached. +# +# This will fail if the slave IO thread has an error. If you expect an +# error in the IO thread, use include/wait_for_slave_io_error.inc +# instead. +# +# Please use this instead of 'STOP SLAVE IO_THREAD', to reduce the +# risk of races in test cases. +# +# +# ==== Usage ==== +# +# [--let $slave_timeout= NUMBER] +# [--let $rpl_debug= 1] +# --source include/stop_slave_io.inc +# +# Parameters: +# $slave_timeout +# See include/wait_for_slave_param.inc +# +# $rpl_debug +# See include/rpl_init.inc + + +--let $include_filename= stop_slave_io.inc +--source include/begin_include_file.inc + + +if (!$rpl_debug) +{ + --disable_query_log +} + + +STOP SLAVE IO_THREAD; +--source include/wait_for_slave_io_to_stop.inc + + +--let $include_filename= stop_slave_io.inc +--source include/end_include_file.inc diff --git a/mysql-test/include/stop_slave_sql.inc b/mysql-test/include/stop_slave_sql.inc new file mode 100644 index 00000000000..f5075b32fda --- /dev/null +++ b/mysql-test/include/stop_slave_sql.inc @@ -0,0 +1,41 @@ +# ==== Purpose ==== +# +# Issues STOP SLAVE SQL_THREAD on the current connection. Then waits +# until the SQL thread has stopped, or until a timeout is reached. +# +# Please use this instead of 'STOP SLAVE SQL_THREAD', to reduce the +# risk of races in test cases. +# +# This will fail if the SQL thread has an error. +# +# +# ==== Usage ==== +# +# [--let $slave_timeout= NUMBER] +# [--let $rpl_debug= 1] +# --source include/stop_slave_sql.inc +# +# Parameters: +# $slave_timeout +# See include/wait_for_slave_param.inc +# +# $rpl_debug +# See include/rpl_init.inc + + +--let $include_filename= stop_slave_sql.inc +--source include/begin_include_file.inc + + +if (!$rpl_debug) +{ + --disable_query_log +} + + +STOP SLAVE SQL_THREAD; +--source include/wait_for_slave_sql_to_stop.inc + + +--let $include_filename= stop_slave_sql.inc +--source include/end_include_file.inc diff --git a/mysql-test/include/sync_io_with_master.inc b/mysql-test/include/sync_io_with_master.inc new file mode 100644 index 00000000000..34906c416f5 --- /dev/null +++ b/mysql-test/include/sync_io_with_master.inc @@ -0,0 +1,46 @@ +# ==== Purpose ==== +# +# Waits until the slave IO thread on the current connection has been +# synced up to the point saved by the last call to +# include/save_master_pos.inc (i.e., until the IO thead has copied up +# to the saved position). Does not wait for the SQL thread. +# +# +# ==== Usage ==== +# +# On master: +# --source include/save_master_pos.inc +# +# On slave: +# [--let $slave_timeout= NUMBER] +# [--let $rpl_debug= 1] +# --source include/sync_slave_io_with_master.inc +# +# Parameters: +# $slave_timeout +# See include/wait_for_slave_param.inc +# +# $rpl_debug +# See include/rpl_init.inc + + +--let $include_filename= sync_io_with_master.inc +--source include/begin_include_file.inc + + +--let $_old_slave_error_param= $slave_error_param +--let $slave_error_param= Last_IO_Errno + +--let $slave_param= Master_Log_File +--let $slave_param_value= $_master_file +source include/wait_for_slave_param.inc; + +let $slave_param= Read_Master_Log_Pos; +let $slave_param_value= $_master_pos; +source include/wait_for_slave_param.inc; + +--let $slave_error_param= $_old_slave_error_param + + +--let $include_filename= sync_io_with_master.inc +--source include/end_include_file.inc diff --git a/mysql-test/include/sync_slave_io_with_master.inc b/mysql-test/include/sync_slave_io_with_master.inc index f7dd563039c..d0fcef90cae 100644 --- a/mysql-test/include/sync_slave_io_with_master.inc +++ b/mysql-test/include/sync_slave_io_with_master.inc @@ -2,35 +2,49 @@ # # Waits until the slave IO thread has been synced, i.e., all events # have been copied over to slave. Does not care if the SQL thread is -# in sync. +# in sync (or even running). # # # ==== Usage ==== # -# source include/sync_slave_io_with_master.inc; +# [--let $sync_slave_connection= ] +# [--let $slave_timeout= NUMBER] +# [--let $rpl_debug= 1] +# --source include/sync_slave_io_with_master.inc # -# Syncs to the current position on master, as found by SHOW MASTER -# STATUS. +# Syncs slave to the current position on master, as found by SHOW +# MASTER STATUS. # # Must be called on the master. Will change connection to the slave. # -# Parameters to this macro are $slave_timeout and -# $master_connection. See wait_for_slave_param.inc for -# descriptions. +# Parameters: +# $sync_slave_connection +# By default, this script switches connection to 'slave'. If +# $sync_slave_connection is set, then '$sync_slave_connection' is +# used instead of 'slave'. +# +# $slave_timeout +# See include/wait_for_slave_param.inc. +# +# $rpl_debug +# See include/rpl_init.inc -let $_master_file= query_get_value("SHOW MASTER STATUS", File, 1); -let $_master_pos= query_get_value("SHOW MASTER STATUS", Position, 1); +--let $include_filename= sync_slave_io_with_master.inc +--source include/begin_include_file.inc -connection slave; -let $slave_error_message= Failed while waiting for slave IO thread to sync; +--source include/save_master_pos.inc -let $slave_param= Master_Log_File; -let $slave_param_value= $_master_file; -source include/wait_for_slave_param.inc; +--let $rpl_connection_name= slave +if ($sync_slave_connection) +{ + --let $rpl_connection_name= $sync_slave_connection +} +--source include/rpl_connection.inc -let $slave_param= Read_Master_Log_Pos; -let $slave_param_value= $_master_pos; -source include/wait_for_slave_param.inc; +--source include/sync_io_with_master.inc -let $slave_error_message= ; + +--let $include_filename= sync_slave_io_with_master.inc +--let $skip_restore_connection= 1 +--source include/end_include_file.inc diff --git a/mysql-test/include/sync_slave_sql_with_io.inc b/mysql-test/include/sync_slave_sql_with_io.inc new file mode 100644 index 00000000000..8048f7a177c --- /dev/null +++ b/mysql-test/include/sync_slave_sql_with_io.inc @@ -0,0 +1,50 @@ +# ==== Purpose ==== +# +# Sync the slave SQL thread with the IO thread. +# +# ==== Usage ==== +# +# [--let $slave_timeout= NUMBER] +# [--let $rpl_debug= 1] +# --source include/sync_slave_sql_with_io.inc +# +# Parameters: +# $slave_timeout +# By default, the synchronization timeouts after 300 seconds. If +# $slave_timeout is set, the synchronization timeouts after +# $slave_timeout seconds. +# +# $rpl_debug +# See include/rpl_init.inc + + +--let $include_filename= sync_slave_sql_with_io.inc +--source include/begin_include_file.inc + + +let $_slave_timeout= $slave_timeout; +if (!$_slave_timeout) +{ + let $_slave_timeout= 300; +} + +--let $_master_log_file= query_get_value(SHOW SLAVE STATUS, Master_Log_File, 1) +--let $_master_log_pos= query_get_value(SHOW SLAVE STATUS, Read_Master_Log_Pos, 1) + +if ($rpl_debug) +{ + --echo Master_Log_File='$_master_log_file' Read_Master_Log_Pos='$_master_log_pos' \$slave_timeout='$_slave_timeout' +} + +--let $_sync_slave_sql_with_io_errno= `SELECT MASTER_POS_WAIT('$_master_log_file', $_master_log_pos, $_slave_timeout)` +if (`SELECT IFNULL($_sync_slave_sql_with_io_errno, -1) < 0`) +{ + --echo #### Failed to sync slave SQL thread with slave IO thread. #### + --echo MASTER_POS_WAIT('$_master_log_file', $_master_log_pos, $_slave_timeout) returned $_sync_slave_sql_with_io_errno + --source include/show_rpl_debug_info.inc + --die Failed to sync slave SQL thread with slave IO thread. +} + + +--let $include_filename= sync_slave_sql_with_io.inc +--source include/end_include_file.inc diff --git a/mysql-test/include/wait_for_binlog_event.inc b/mysql-test/include/wait_for_binlog_event.inc index 7a55c8c2182..b251ae226d3 100644 --- a/mysql-test/include/wait_for_binlog_event.inc +++ b/mysql-test/include/wait_for_binlog_event.inc @@ -24,7 +24,7 @@ while (`SELECT INSTR("$_last_event","$wait_binlog_event") = 0`) real_sleep 0.1; let $_event= query_get_value(SHOW BINLOG EVENTS, Info, $_event_pos); let $_last_event= $_event; - while (`SELECT "$_event" != "No such row"`) + while ($_event != "No such row") { inc $_event_pos; let $_last_event= $_event; diff --git a/mysql-test/include/wait_for_query_to_fail.inc b/mysql-test/include/wait_for_query_to_fail.inc new file mode 100644 index 00000000000..471813026ee --- /dev/null +++ b/mysql-test/include/wait_for_query_to_fail.inc @@ -0,0 +1,25 @@ +# +# Run a query over and over until it fails or timeout occurs +# + + +let $counter= 100; + +disable_abort_on_error; +disable_query_log; +disable_result_log; +eval $query; +while (!$mysql_errno) +{ + eval $query; + sleep 0.1; + dec $counter; + + if (!$counter) + { + --die "Waited too long for query to fail"; + } +} +enable_abort_on_error; +enable_query_log; +enable_result_log; diff --git a/mysql-test/include/wait_for_slave_io_error.inc b/mysql-test/include/wait_for_slave_io_error.inc index ffdcf752873..e1609113b8f 100644 --- a/mysql-test/include/wait_for_slave_io_error.inc +++ b/mysql-test/include/wait_for_slave_io_error.inc @@ -4,56 +4,86 @@ # error, or until a timeout is reached. Also waits until the IO # thread has completely stopped. # +# # ==== Usage ==== # -# # Wait several errors. -# let $slave_io_errno= 1, 2, 3; -# source include/wait_for_slave_io_error.inc; -# -# # Print error message -# let $slave_io_errno= 1; -# let $show_slave_io_error= 1; -# source include/wait_for_slave_io_error.inc; +# --let $slave_io_errno= NUMBER [, NUMBER ...] +# [--let $show_slave_io_error= 1] +# [--let $slave_io_error_is_nonfatal= 1] +# [--let $rpl_debug= 1] +# [--let $slave_timeout= NUMBER] +# --source include/wait_for_slave_io_error.inc # # Parameters: +# $slave_io_errno +# The expected IO error numbers. This can be either a single +# number, or a comma-separated list of numbers. Examples: +# --let $slave_io_errno= 1040, 1053, 2002, 2003, 2006, 2013 +# --let $slave_io_errno= 1045 +# (After BUG#41956 has been fixed, this will be required to be +# symbolic names instead of numbers.) # -# $slave_io_errno -# The expected IO error numbers. This is required. -# (After BUG#41956 has been fixed, this will be required to be a -# symbolic name instead of a numbers.) +# $show_slave_io_error +# If set, will print the error to the query log. # -# $show_slave_io_error -# If set, will print the error to the query log. +# $slave_io_error_is_nonfatal +# By default, we wait for the slave IO thread to stop completely +# (i.e., until Slave_IO_State is empty). If this variable is set, +# then we don't wait. This is useful if the error is non-fatal +# (e.g., temporary connection error) and does not cause the slave +# IO thread to stop. # -# $slave_timeout -# See wait_for_slave_param.inc for description. +# $slave_timeout +# See include/wait_for_slave_param.inc # -# $master_connection -# See wait_for_slave_param.inc for description. +# $rpl_debug +# See include/rpl_init.inc + + +--let $include_filename= wait_for_slave_io_error.inc [errno=$slave_io_errno] +--source include/begin_include_file.inc -if (!$slave_io_errno) { - --die !!!ERROR IN TEST: you must set \$slave_io_errno before sourcing wait_for_slave_io_error.inc -} let $old_slave_param_comparison= $slave_param_comparison; let $slave_param= Last_IO_Errno; let $slave_param_comparison= !=; let $slave_param_value= 0; -let $slave_error_message= Failed while waiting for slave to produce an error in its sql thread; source include/wait_for_slave_param.inc; -let $slave_error_message= ; let $slave_param_comparison= $old_slave_param_comparison; -let $_error= query_get_value(SHOW SLAVE STATUS, Last_IO_Errno, 1); -if (`SELECT $_error NOT IN ($slave_io_errno)`) { - --echo **** Slave stopped with wrong error code: $_error (expected $slave_io_errno) **** +let $_wfsie_errno= query_get_value(SHOW SLAVE STATUS, Last_IO_Errno, 1); + +if ($slave_io_errno == '') { + --echo !!!ERROR IN TEST: you must set \$slave_io_errno before you source + --echo !!!wait_for_slave_sql_error.inc. The error we got this time was '$_wfsie_errno', + --echo !!!so you probably want to add the following line to your test case: + --echo !!! --let \$slave_io_errno= $_wfsie_errno + --die !!!ERROR IN TEST: you must set \$slave_io_errno before sourcing wait_for_slave_io_error.inc +} + +if (`SELECT $_wfsie_errno NOT IN ($slave_io_errno)`) { + --echo **** Slave stopped with wrong error code: $_wfsie_errno (expected $slave_io_errno) **** source include/show_rpl_debug_info.inc; - --echo **** Slave stopped with wrong error code: $_error (expected $slave_io_errno) **** + --echo **** Slave stopped with wrong error code: $_wfsie_errno (expected $slave_io_errno) **** --die Slave stopped with wrong error code } if ($show_slave_io_error) { - let $error= query_get_value("SHOW SLAVE STATUS", Last_IO_Error, 1); - echo Last_IO_Error = $error; + --let $_wait_for_slave_io_error_old_status_items= $status_items + --let $status_items= Last_IO_Error + --source include/show_slave_status.inc + --let $status_items= $_wait_for_slave_io_error_old_status_items } + +if (!$slave_io_error_is_nonfatal) +{ + --let $slave_param= Slave_IO_State + --let $slave_param_value= + --source include/wait_for_slave_param.inc +} +--let $slave_io_error_is_nonfatal= 0 + + +--let $include_filename= wait_for_slave_io_error.inc [errno=$slave_io_errno] +--source include/end_include_file.inc diff --git a/mysql-test/include/wait_for_slave_io_to_start.inc b/mysql-test/include/wait_for_slave_io_to_start.inc index abdc8339290..cd8e5d374a4 100644 --- a/mysql-test/include/wait_for_slave_io_to_start.inc +++ b/mysql-test/include/wait_for_slave_io_to_start.inc @@ -4,16 +4,43 @@ # connected to the master (i.e., until SHOW SLAVE STATUS returns Yes # in the Slave_IO_Running field), or until a timeout is reached. # +# # ==== Usage ==== # -# source include/wait_for_slave_io_to_start.inc; +# [--let $slave_timeout= NUMBER] +# [--let $rpl_debug= 1] +# [--let $rpl_allow_error= 1] +# --source include/wait_for_slave_io_to_start.inc # -# Parameters to this macro are $slave_timeout and -# $master_connection. See wait_for_slave_param.inc for -# descriptions. +# Parameters: +# $slave_timeout +# See include/wait_for_slave_param.inc +# +# $rpl_allow_error +# By default, this file fails if there is an error in the IO +# thread. However, the IO thread can recover and reconnect after +# certain errors. If such an error is expected, can set +# $rpl_allow_error=1. This will prevent this file from failing if +# there is an error in the IO thread. +# +# $rpl_debug +# See include/rpl_init.inc + + +--let $include_filename= wait_for_slave_io_to_start.inc +--source include/begin_include_file.inc + let $slave_param= Slave_IO_Running; let $slave_param_value= Yes; -let $slave_error_message= Failed while waiting for slave IO thread to start; +if (!$rpl_allow_error) +{ + --let $slave_error_param= Last_IO_Errno +} source include/wait_for_slave_param.inc; -let $slave_error_message= ; +--let $slave_error_param= +--let $rpl_allow_error= 0 + + +--let $include_filename= wait_for_slave_io_to_start.inc +--source include/end_include_file.inc diff --git a/mysql-test/include/wait_for_slave_io_to_stop.inc b/mysql-test/include/wait_for_slave_io_to_stop.inc index 512bb6b7243..d25c2ac071d 100644 --- a/mysql-test/include/wait_for_slave_io_to_stop.inc +++ b/mysql-test/include/wait_for_slave_io_to_stop.inc @@ -1,24 +1,40 @@ # ==== Purpose ==== # -# Waits until the IO thread of the current connection has stopped, or -# until a timeout is reached. +# Waits until the IO thread of the current connection has stopped +# gracefully. +# +# Note: this script will fail if the IO thread stops with an error. +# If you expect an error in the IO thread, use +# include/wait_for_slave_io_error.inc instead. +# +# This script also fails if a timeout is reached (default 300 +# seconds). +# # # ==== Usage ==== # -# source include/wait_for_slave_io_to_stop.inc; +# [--let $slave_timeout= NUMBER] +# [--let $rpl_debug= 1] +# --source include/wait_for_slave_io_to_stop.inc # -# Parameters to this macro are $slave_timeout and -# $master_connection. See wait_for_slave_param.inc for -# descriptions. +# Parameters: +# $slave_timeout +# See include/wait_for_slave_param.inc. +# +# $rpl_debug +# See include/rpl_init.inc -# if server has not used CHANGE MASTER to initiate slave, SHOW SLAVE -# STATUS will return an empty set. -let $_slave_io_running= query_get_value("SHOW SLAVE STATUS", Slave_IO_Running, 1); -if ($_slave_io_running != No such row) -{ - let $slave_param= Slave_IO_Running; - let $slave_param_value= No; - let $slave_error_message= Failed while waiting for slave IO thread to stop; - source include/wait_for_slave_param.inc; - let $slave_error_message= ; -} + +--let $include_filename= wait_for_slave_io_to_stop.inc +--source include/begin_include_file.inc + + +--let $slave_param= Slave_IO_Running +--let $slave_param_value= No +--let $slave_error_param= Last_IO_Errno +--source include/wait_for_slave_param.inc +--let $slave_error_param= + + +--let $include_filename= wait_for_slave_io_to_stop.inc +--source include/end_include_file.inc diff --git a/mysql-test/include/wait_for_slave_param.inc b/mysql-test/include/wait_for_slave_param.inc index db07692672f..131d91a8440 100644 --- a/mysql-test/include/wait_for_slave_param.inc +++ b/mysql-test/include/wait_for_slave_param.inc @@ -3,11 +3,16 @@ # Waits until SHOW SLAVE STATUS has returned a specified value, or # until a timeout is reached. # +# # ==== Usage ==== # -# let $slave_param= Slave_SQL_Running; -# let $slave_param_value= No; -# source include/slave_wait_param.inc; +# --let $slave_param= Slave_SQL_Running +# --let $slave_param_value= No +# [--let $slave_param_comparison= [ < | <= | >= | > | = | != ]] +# [--let $slave_timeout= NUMBER] +# [--let $slave_error_param= [Slave_SQL_Errno | Slave_IO_Errno]] +# [--let $rpl_debug= 1] +# --source include/slave_wait_param.inc # # Parameters: # @@ -21,36 +26,36 @@ # $slave_param_value. If you want to wait until $slave_param # becomes *unequal* to $slave_param_value, set this parameter to the # string '!=', like this: -# let $slave_param_comparison= !=; +# --let $slave_param_comparison= != # # $slave_timeout # The default timeout is 5 minutes. You can change the timeout by -# setting $slave_timeout. The unit is tenths of seconds. +# setting $slave_timeout. The unit is seconds. # -# $master_connection -# If the timeout is reached, debug info is given by calling SHOW -# SLAVE STATUS, SHOW PROCESSLIST, and SHOW BINLOG EVENTS. Then, a -# 'connection master' is then issued, and more debug info is given -# by calling SHOW MASTER STATUS, SHOW PROCESSLIST, and SHOW BINLOG -# EVENTS. If $master_connection is set, the latter three commands -# will be issued on $master_connection instead of on the host named -# 'master'. See also show_rpl_debug_info.inc +# $slave_error_param +# If set, this script will check if the column of the output from +# SHOW SLAVE STATUS named $slave_error_param is nonzero. If it is, +# this script will faile immediately. Typically, this should be set +# to Last_IO_Errno or Last_SQL_Errno. # -# $slave_error_message -# If set, this is printed when a timeout occurs. This is primarily -# intended to be used by other wait_for_slave_* macros, to indicate -# what the purpose of the wait was. (A very similar error message is -# given by default, but the wait_for_slave_* macros use this to give -# an error message identical to that in previous versions, so that -# errors are easier searchable in the pushbuild history.) +# $rpl_debug +# See include/rpl_init.inc -let $_slave_timeout_counter= $slave_timeout; -if (!$_slave_timeout_counter) + +--let $include_filename= wait_for_slave_param.inc [$slave_param] +--source include/begin_include_file.inc + + +let $_slave_timeout= $slave_timeout; +if (!$_slave_timeout) { - let $_slave_timeout_counter= 3000; + let $_slave_timeout= 300; +} + +if ($slave_error_param == '') +{ + --let $slave_error_param= 1 } -# Save resulting counter for later use. -let $slave_tcnt= $_slave_timeout_counter; let $_slave_param_comparison= $slave_param_comparison; if (!$_slave_param_comparison) @@ -58,27 +63,57 @@ if (!$_slave_param_comparison) let $_slave_param_comparison= =; } -let $_show_slave_status_value= query_get_value("SHOW SLAVE STATUS", $slave_param, 1); -while (`SELECT NOT('$_show_slave_status_value' $_slave_param_comparison '$slave_param_value') AND $_slave_timeout_counter > 0`) +if ($rpl_debug) { - dec $_slave_timeout_counter; - if ($_slave_timeout_counter) + --echo Waiting until '$slave_param' $_slave_param_comparison '$slave_param_value' [timeout='$_slave_timeout', \$slave_error_param='$slave_error_param'] +} + +--let $_slave_check_configured= query_get_value("SHOW SLAVE STATUS", Slave_IO_Running, 1) + +if ($_slave_check_configured == 'No such row') +{ + --echo **** ERROR: SHOW SLAVE STATUS returned empty result set. Slave not configured. **** + --source include/show_rpl_debug_info.inc + --die SHOW SLAVE STATUS returned empty result set. Slave not configured. +} + +# mysqltest doesn't provide any better way to multiply by 10 +--let $_wait_for_slave_param_zero= 0 +--let $_slave_timeout_counter= $_slave_timeout$zero +--let $_slave_continue= 1 +while ($_slave_continue) +{ + --let $_show_slave_status_value= query_get_value("SHOW SLAVE STATUS", $slave_param, 1) + + # Check if an error condition is reached. + if (!$slave_error_param) { - sleep 0.1; - let $_show_slave_status_value= query_get_value("SHOW SLAVE STATUS", $slave_param, 1); + --let $_show_slave_status_error_value= query_get_value("SHOW SLAVE STATUS", $slave_error_param, 1) + if ($_show_slave_status_error_value) + { + --echo **** ERROR: $slave_error_param = '$_show_slave_status_error_value' while waiting for slave parameter $slave_param $_slave_param_comparison $slave_param_value **** + --source include/show_rpl_debug_info.inc + --die Error condition reached in include/wait_for_slave_param.inc + } + } + + # Check if the termination condition is reached. + --let $_slave_continue= `SELECT NOT('$_show_slave_status_value' $_slave_param_comparison '$slave_param_value')` + + # Decrease timer, and check if the timeout is reached. + if ($_slave_continue) + { + --dec $_slave_timeout_counter + if (!$_slave_timeout_counter) + { + --echo **** ERROR: timeout after $_slave_timeout seconds while waiting for slave parameter $slave_param $_slave_param_comparison $slave_param_value **** + --source include/show_rpl_debug_info.inc + --die Timeout in include/wait_for_slave_param.inc + } + --sleep 0.1 } } -# This has to be outside the loop until BUG#41913 has been fixed -if (!$_slave_timeout_counter) -{ - --echo **** ERROR: timeout after $slave_tcnt deci-seconds while waiting for slave parameter $slave_param $_slave_param_comparison $slave_param_value **** - if ($slave_error_message) - { - --echo Message: $slave_error_message - } - --echo Current connection is '$CURRENT_CONNECTION' - echo Note: the following output may have changed since the failure was detected; - source include/show_rpl_debug_info.inc; - die; -} + +--let $include_filename= wait_for_slave_param.inc [$slave_param] +--source include/end_include_file.inc diff --git a/mysql-test/include/wait_for_slave_sql_error.inc b/mysql-test/include/wait_for_slave_sql_error.inc index 3ae34b1fb9e..4ecc8f2a5ec 100644 --- a/mysql-test/include/wait_for_slave_sql_error.inc +++ b/mysql-test/include/wait_for_slave_sql_error.inc @@ -6,43 +6,65 @@ # # ==== Usage ==== # -# source include/wait_for_slave_sql_error.inc; +# --let $slave_sql_errno= NUMBER +# [--let $show_slave_sql_error= 1] +# [--let $rpl_debug= 1] +# [--let $slave_timeout= NUMBER] +# --source include/wait_for_slave_sql_error.inc # # Parameters: +# $slave_sql_errno +# The expected SQL error number. This is required. +# (After BUG#41956 has been fixed, this will be required to be a +# symbolic name instead of a number.) # -# $slave_sql_errno -# The expected SQL error number. This is required. -# (After BUG#41956 has been fixed, this will be required to be a -# symbolic name instead of a number.) -# -# $show_slave_sql_error -# If set, will print the error to the query log. +# $show_slave_sql_error +# If set, will print the error to the query log. # -# $slave_timeout -# See wait_for_slave_param.inc for description. +# $slave_timeout +# See include/wait_for_slave_param.inc # -# $master_connection -# See wait_for_slave_param.inc for description. +# $rpl_debug +# See include/rpl_init.inc -if (!$slave_sql_errno) { + +--let $include_filename= wait_for_slave_sql_error.inc [errno=$slave_sql_errno] +--source include/begin_include_file.inc + + +# Note: here, we should not wait for Slave_SQL_Errno!=0. +# Slave_SQL_Errno and Slave_SQL_Running are not set atomically. +# Slave_SQL_Errno is set first, then Slave_SQL_Running. So we wait +# until Slave_SQL_Running=No to be sure that both conditions hold. +let $slave_param= Slave_SQL_Running; +let $slave_param_value= No; +source include/wait_for_slave_param.inc; + +let $_wfsse_errno= query_get_value(SHOW SLAVE STATUS, Last_SQL_Errno, 1); + +if ($slave_sql_errno == '') { + --echo !!!ERROR IN TEST: you must set \$slave_sql_errno before you source + --echo !!!wait_for_slave_sql_error.inc. The error we got this time was '$_wfsse_errno', + --echo !!!so you probably want to add the following line to your test case: + --echo !!! --let \$slave_sql_errno= $_wfsse_errno --die !!!ERROR IN TEST: you must set \$slave_sql_errno before sourcing wait_for_slave_sql_error.inc } -let $slave_param= Slave_SQL_Running; -let $slave_param_value= No; -let $slave_error_message= Failed while waiting for slave to stop the SQL thread (expecting error in the SQL thread); -source include/wait_for_slave_param.inc; - -let $_error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Errno, 1); -if ($_error != $slave_sql_errno) { - --echo **** Slave stopped with wrong error code: $_error (expected $slave_sql_errno) **** +if (`SELECT $_wfsse_errno NOT IN ($slave_sql_errno)`) { + --echo **** Slave stopped with wrong error code: $_wfsse_errno (expected $slave_sql_errno) **** source include/show_rpl_debug_info.inc; - --echo **** Slave stopped with wrong error code: $_error (expected $slave_sql_errno) **** + --echo **** Slave stopped with wrong error code: $_wfsse_errno (expected $slave_sql_errno) **** --die Slave stopped with wrong error code } if ($show_slave_sql_error) { - let $error= query_get_value("SHOW SLAVE STATUS", Last_SQL_Error, 1); - echo Last_SQL_Error = $error; + --let $_wait_for_slave_sql_error_old_status_items= $status_items + --let $status_items= Last_SQL_Error + --source include/show_slave_status.inc + --let $status_items= $_wait_for_slave_sql_error_old_status_items } + + +--let $include_filename= wait_for_slave_sql_error.inc [errno=$slave_sql_errno] +--source include/end_include_file.inc diff --git a/mysql-test/include/wait_for_slave_sql_error_and_skip.inc b/mysql-test/include/wait_for_slave_sql_error_and_skip.inc index 11c02c0b490..9246c1839af 100644 --- a/mysql-test/include/wait_for_slave_sql_error_and_skip.inc +++ b/mysql-test/include/wait_for_slave_sql_error_and_skip.inc @@ -5,38 +5,58 @@ # # ==== Usage ==== # -# let $slave_sql_error= ; -# source include/wait_for_slave_sql_error_and_skip.inc; +# --let $slave_sql_error= NUMBER +# [--let $show_sql_error= 1] +# [--let $slave_skip_counter= 1] +# [--let $not_switch_connection= 1] +# [--let $rpl_debug= 1] +# [--let $slave_timeout= NUMBER] +# --source include/wait_for_slave_sql_error_and_skip.inc # # Parameters: # -# $slave_sql_errno -# The error number to wait for. This is required. (See -# wait_for_slave_sql_error.inc) +# $slave_sql_errno +# The error number to wait for. This is required. (See +# wait_for_slave_sql_error.inc) # -# $show_sql_error -# If set, will print the error to the query log. -# -# $slave_timeout -# See wait_for_slave_param.inc for description. +# $show_sql_error +# If set, will print the error to the query log. # -# $master_connection -# See wait_for_slave_param.inc for description. +# $slave_skip_counter +# If set, skip this number of events. If not set, skip one event. # -# $slave_skip_counter -# If set, skip this number of events. If not set, skip one event. +# $not_switch_connection +# By default, this script executes on the connection 'slave'. If +# $not_switch_connection is set, this script executes on the current +# connection. In any case, the original connection is restored. # -# $not_switch_connection If set, don't switch to slave and don't switch back -# master. +# $slave_timeout +# See include/wait_for_slave_param.inc # +# $rpl_debug +# See include/rpl_init.inc + + +--let $include_filename= wait_for_slave_sql_error_and_skip.inc [errno=$slave_sql_errno] +--source include/begin_include_file.inc + + +if (!$rpl_debug) +{ + --disable_query_log +} + -echo --source include/wait_for_slave_sql_error_and_skip.inc; if (!$not_switch_connection) { - connection slave; + --let $rpl_connection_name= slave + --source include/rpl_connection.inc } + + source include/wait_for_slave_sql_error.inc; + # skip the erroneous statement if ($slave_skip_counter) { eval SET GLOBAL SQL_SLAVE_SKIP_COUNTER= $slave_skip_counter; @@ -45,7 +65,7 @@ if (!$slave_skip_counter) { SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; } source include/start_slave.inc; -if (!$not_switch_connection) -{ - connection master; -} + + +--let $include_filename= wait_for_slave_sql_error_and_skip.inc [errno=$slave_sql_errno] +--source include/end_include_file.inc diff --git a/mysql-test/include/wait_for_slave_sql_to_start.inc b/mysql-test/include/wait_for_slave_sql_to_start.inc index 48744f5dd13..4aea9fba569 100644 --- a/mysql-test/include/wait_for_slave_sql_to_start.inc +++ b/mysql-test/include/wait_for_slave_sql_to_start.inc @@ -5,13 +5,33 @@ # # ==== Usage ==== # -# source include/wait_for_slave_sql_to_start.inc; +# [--let $slave_timeout= NUMBER] +# [--let $rpl_debug= 1] +# --source include/wait_for_slave_sql_to_start.inc # -# Parameters to this macro are $slave_timeout and -# $master_connection. See wait_for_slave_param.inc for -# descriptions. +# Parameters: +# $slave_timeout +# See include/wait_for_slave_param.inc +# +# $rpl_debug +# See include/rpl_init.inc + + +--let $include_filename= wait_for_slave_sql_to_start.inc +--source include/begin_include_file.inc + let $slave_param= Slave_SQL_Running; let $slave_param_value= Yes; -let $slave_error_message= Failed while waiting for slave SQL to start; + +# Unfortunately, the slave sql thread sets Slave_SQL_Running=Yes +# *before* it clears Last_SQL_Errno. So we have to allow errors in +# the SQL thread here. + +#--let $slave_error_param= Last_SQL_Errno source include/wait_for_slave_param.inc; +#--let $slave_error_param= + + +--let $include_filename= wait_for_slave_sql_to_start.inc +--source include/end_include_file.inc diff --git a/mysql-test/include/wait_for_slave_sql_to_stop.inc b/mysql-test/include/wait_for_slave_sql_to_stop.inc index 50bf53e421d..492b3237be5 100644 --- a/mysql-test/include/wait_for_slave_sql_to_stop.inc +++ b/mysql-test/include/wait_for_slave_sql_to_stop.inc @@ -1,24 +1,40 @@ # ==== Purpose ==== # -# Waits the SQL thread of the current connection has stopped, or until -# a timeout is reached. +# Waits until the SQL thread of the current connection has stopped +# gracefully. +# +# Note: this script will fail if the SQL thread stops with an error. +# If you expect an error in the SQL thread, use +# include/wait_for_slave_io_error.inc instead. +# +# This script also fails if a timeout is reached (default 300 +# seconds). +# # # ==== Usage ==== # -# source include/wait_for_slave_sql_to_stop.inc; +# [--let $slave_timeout= NUMBER] +# [--let $rpl_debug= 1] +# --source include/wait_for_slave_sql_to_stop.inc # -# Parameters to this macro are $slave_timeout and -# $master_connection. See wait_for_slave_param.inc for -# descriptions. +# Parameters: +# $slave_timeout +# See include/wait_for_slave_param.inc +# +# $rpl_debug +# See include/rpl_init.inc -# if server has not used CHANGE MASTER to initiate slave, SHOW SLAVE -# STATUS will return an empty set. -let $_slave_io_running= query_get_value("SHOW SLAVE STATUS", Slave_IO_Running, 1); -if ($_slave_io_running != No such row) -{ - let $slave_param= Slave_SQL_Running; - let $slave_param_value= No; - let $slave_error_message= Failed while waiting for slave SQL thread to stop; - source include/wait_for_slave_param.inc; - let $slave_error_message= ; -} + +--let $include_filename= wait_for_slave_sql_to_stop.inc +--source include/begin_include_file.inc + + +--let $slave_param= Slave_SQL_Running +--let $slave_param_value= No +--let $slave_error_param= Last_SQL_Errno +--source include/wait_for_slave_param.inc +--let $slave_error_param= + + +--let $include_filename= wait_for_slave_sql_to_stop.inc +--source include/end_include_file.inc diff --git a/mysql-test/include/wait_for_slave_to_start.inc b/mysql-test/include/wait_for_slave_to_start.inc index 567950cc6d7..a916e2ea615 100644 --- a/mysql-test/include/wait_for_slave_to_start.inc +++ b/mysql-test/include/wait_for_slave_to_start.inc @@ -3,22 +3,28 @@ # Waits until both the IO and SQL threads of the current connection # have started, or until a timeout is reached. # +# # ==== Usage ==== # -# source include/wait_for_slave_to_start.inc; +# [--let $slave_timeout= NUMBER] +# [--let $rpl_debug= 1] +# --source include/wait_for_slave_to_start.inc # -# Parameters to this macro are $slave_timeout and -# $master_connection. See wait_for_slave_param.inc for -# descriptions. +# Parameters: +# $slave_timeout +# See include/wait_for_slave_param.inc +# +# $rpl_debug +# See include/rpl_init.inc -let $slave_error_message= Failed while waiting for slave to start; -let $slave_param= Slave_IO_Running; -let $slave_param_value= Yes; -source include/wait_for_slave_param.inc; +--let $include_filename= wait_for_slave_to_start.inc +--source include/begin_include_file.inc -let $slave_param= Slave_SQL_Running; -let $slave_param_value= Yes; -source include/wait_for_slave_param.inc; -let $slave_error_message= ; +--source include/wait_for_slave_io_to_start.inc +--source include/wait_for_slave_sql_to_start.inc + + +--let $include_filename= wait_for_slave_to_start.inc +--source include/end_include_file.inc diff --git a/mysql-test/include/wait_for_slave_to_stop.inc b/mysql-test/include/wait_for_slave_to_stop.inc index 618c5397cb7..1bfd16067c5 100644 --- a/mysql-test/include/wait_for_slave_to_stop.inc +++ b/mysql-test/include/wait_for_slave_to_stop.inc @@ -1,30 +1,38 @@ # ==== Purpose ==== # # Waits until both the IO and SQL threads of the current connection -# have stopped, or until a timeout is reached. +# have stopped gracefully. +# +# Note: this script will fail if one of the threads stops with an +# error. If you expect an error in one of the threads, use +# include/wait_for_slave_io_error.inc or +# include/wait_for_slave_sql_error.inc instead. +# +# This script also fails if a timeout is reached (default 300 +# seconds). +# # # ==== Usage ==== # -# source include/wait_for_slave_to_stop.inc; +# [--let $slave_timeout= NUMBER] +# [--let $rpl_debug= 1] +# --source include/wait_for_slave_to_stop.inc # -# Parameters to this macro are $slave_timeout and -# $master_connection. See wait_for_slave_param.inc for -# descriptions. +# Parameters: +# $slave_timeout +# See include/wait_for_slave_param.inc +# +# $rpl_debug +# See include/rpl_init.inc -# if server has not used CHANGE MASTER to initiate slave, SHOW SLAVE -# STATUS will return an empty set. -let $_slave_io_running= query_get_value("SHOW SLAVE STATUS", Slave_IO_Running, 1); -if ($_slave_io_running != No such row) -{ - let $slave_error_message= Failed while waiting for slave to stop; - let $slave_param= Slave_IO_Running; - let $slave_param_value= No; - source include/wait_for_slave_param.inc; +--let $include_filename= wait_for_slave_to_stop.inc +--source include/begin_include_file.inc - let $slave_param= Slave_SQL_Running; - let $slave_param_value= No; - source include/wait_for_slave_param.inc; - let $slave_error_message= ; -} +--source include/wait_for_slave_sql_to_stop.inc +--source include/wait_for_slave_io_to_stop.inc + + +--let $include_filename= wait_for_slave_to_stop.inc +--source include/end_include_file.inc diff --git a/mysql-test/include/write_var_to_file.inc b/mysql-test/include/write_var_to_file.inc new file mode 100644 index 00000000000..08de195ccbb --- /dev/null +++ b/mysql-test/include/write_var_to_file.inc @@ -0,0 +1,57 @@ +# ==== Purpose ==== +# +# Write the contents of $write_var to file $write_to_file. +# +# +# ==== Usage ==== +# +# --let $write_var = +# --let $write_to_file = [|GENERATE] +# --source include/write_var_to_file.inc +# +# $write_var is evaluated in sql 'string' context, so escapes like \n +# are interpolated. +# +# $write_to_file can be either a filename, or the special string +# GENERATE. If it is GENERATE, a unique filename is generated (based +# on UUID()). The filename is saved in $write_to_file so that it can +# be retrieved later. +# +# +# ==== Implementation ==== +# +# We can't use mysqltest's write_file because it does not evaluate +# variables. We can't use '--exec echo $write_var > $write_file' +# because it will use \n\r line terminator under windows. So the only +# working way is mysql's SELECT INTO DUMPFILE, which is subject to +# @@secure_file_priv. That makes this more complex than you might +# expect. + +if (!$write_to_file) +{ + --die You must set the mysqltest variable \$write_to_file before you source include/write_var_to_file.inc +} + +if ($write_to_file == 'GENERATE') +{ + --let $_wvtf_suffix= `SELECT UUID()` + --let $write_to_file= $MYSQLTEST_VARDIR/tmp/_var_file_$_wvtf_suffix.inc +} + +--error 0,1 +--remove_file $write_to_file + +if (`SELECT LENGTH(@@secure_file_priv) > 0`) +{ + --let $_wvtf_secure_file_priv= `SELECT @@secure_file_priv` + --let $_wvtf_suffix= `SELECT UUID()` + --let $_wvtf_tmp_file= $_wvtf_secure_file_priv/_wvtf_$_wvtf_suffix + + --eval SELECT '$write_var' INTO DUMPFILE '$_wvtf_tmp_file' + --copy_file $_wvtf_tmp_file $write_to_file + --remove_file $_wvtf_tmp_file +} +if (`SELECT LENGTH(@@secure_file_priv) = 0`) +{ + --eval SELECT '$write_var' INTO DUMPFILE '$write_to_file' +} diff --git a/mysql-test/lib/mtr_cases.pm b/mysql-test/lib/mtr_cases.pm index 1ab64fa3579..f1f1ac35dcd 100644 --- a/mysql-test/lib/mtr_cases.pm +++ b/mysql-test/lib/mtr_cases.pm @@ -1,6 +1,6 @@ # -*- cperl -*- -# Copyright (C) 2005-2006 MySQL AB -# +# Copyright (c) 2005, 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. diff --git a/mysql-test/lib/mtr_process.pl b/mysql-test/lib/mtr_process.pl index 26a95fa13ab..88e714f6f8d 100644 --- a/mysql-test/lib/mtr_process.pl +++ b/mysql-test/lib/mtr_process.pl @@ -1,5 +1,5 @@ # -*- cperl -*- -# Copyright (C) 2004-2006 MySQL AB +# Copyright (c) 2004, 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 diff --git a/mysql-test/lib/v1/mysql-test-run.pl b/mysql-test/lib/v1/mysql-test-run.pl index 4e4f09981cc..5abae272c36 100755 --- a/mysql-test/lib/v1/mysql-test-run.pl +++ b/mysql-test/lib/v1/mysql-test-run.pl @@ -135,7 +135,7 @@ our $default_vardir; our $opt_usage; our $opt_suites; -our $opt_suites_default= "main,binlog,rpl,rpl_ndb,ndb"; # Default suites to run +our $opt_suites_default= "main,binlog,rpl"; # Default suites to run our $opt_script_debug= 0; # Script debugging, enable with --script-debug our $opt_verbose= 0; # Verbose output, enable with --verbose diff --git a/mysql-test/mysql-stress-test.pl b/mysql-test/mysql-stress-test.pl index 504bee1ebbc..bca7731d8a7 100755 --- a/mysql-test/mysql-stress-test.pl +++ b/mysql-test/mysql-stress-test.pl @@ -1,4 +1,22 @@ #!/usr/bin/perl + +# Copyright (C) 2005, 2006 MySQL AB +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA + # ====================================================================== # MySQL server stress test system # ====================================================================== diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 21ff416221f..a7683b8d807 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -1,7 +1,7 @@ #!/usr/bin/perl # -*- cperl -*- -# Copyright (C) 2009 Sun Microsystems, Inc +# Copyright (c) 2004, 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 @@ -3543,13 +3543,14 @@ sub find_analyze_request # The test can leave a file in var/tmp/ to signal # that all servers should be restarted -sub restart_forced_by_test +sub restart_forced_by_test($) { + my $file = shift; my $restart = 0; foreach my $mysqld ( mysqlds() ) { my $datadir = $mysqld->value('datadir'); - my $force_restart_file = "$datadir/mtr/force_restart"; + my $force_restart_file = "$datadir/mtr/$file"; if ( -f $force_restart_file ) { mtr_verbose("Restart of servers forced by test"); @@ -3793,7 +3794,7 @@ sub run_testcase ($) { if ( $res == 0 ) { my $check_res; - if ( restart_forced_by_test() ) + if ( restart_forced_by_test('force_restart') ) { stop_all_servers($opt_shutdown_timeout); } @@ -3821,8 +3822,11 @@ sub run_testcase ($) { find_testcase_skipped_reason($tinfo); mtr_report_test_skipped($tinfo); # Restart if skipped due to missing perl, it may have had side effects - stop_all_servers($opt_shutdown_timeout) - if ($tinfo->{'comment'} =~ /^perl not found/); + if ( restart_forced_by_test('force_restart_if_skipped') || + $tinfo->{'comment'} =~ /^perl not found/ ) + { + stop_all_servers($opt_shutdown_timeout); + } } elsif ( $res == 65 ) { diff --git a/mysql-test/purify.supp b/mysql-test/purify.supp index 58553130c51..74ed8c42181 100644 --- a/mysql-test/purify.supp +++ b/mysql-test/purify.supp @@ -1,3 +1,20 @@ +# Copyright (C) 2005, 2007 MySQL AB +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA + suppress UMR rw_read_held; mi_open; ha_myisam::open64; handler::ha_open; openfrm suppress UMR my_end; main suppress UMR _doprnt; fprintf; my_end; main diff --git a/mysql-test/r/ctype_utf8mb4_ndb.result b/mysql-test/r/ctype_utf8mb4_ndb.result deleted file mode 100644 index 2a11c13ce57..00000000000 --- a/mysql-test/r/ctype_utf8mb4_ndb.result +++ /dev/null @@ -1,1876 +0,0 @@ -drop table if exists t1,t2; -# -# Start of 5.5 tests -# -set names utf8mb4; -select left(_utf8mb4 0xD0B0D0B1D0B2,1); -left(_utf8mb4 0xD0B0D0B1D0B2,1) -а -select right(_utf8mb4 0xD0B0D0B2D0B2,1); -right(_utf8mb4 0xD0B0D0B2D0B2,1) -в -select locate('he','hello'); -locate('he','hello') -1 -select locate('he','hello',2); -locate('he','hello',2) -0 -select locate('lo','hello',2); -locate('lo','hello',2) -4 -select locate('HE','hello'); -locate('HE','hello') -1 -select locate('HE','hello',2); -locate('HE','hello',2) -0 -select locate('LO','hello',2); -locate('LO','hello',2) -4 -select locate('HE','hello' collate utf8mb4_bin); -locate('HE','hello' collate utf8mb4_bin) -0 -select locate('HE','hello' collate utf8mb4_bin,2); -locate('HE','hello' collate utf8mb4_bin,2) -0 -select locate('LO','hello' collate utf8mb4_bin,2); -locate('LO','hello' collate utf8mb4_bin,2) -0 -select locate(_utf8mb4 0xD0B1, _utf8mb4 0xD0B0D0B1D0B2); -locate(_utf8mb4 0xD0B1, _utf8mb4 0xD0B0D0B1D0B2) -2 -select locate(_utf8mb4 0xD091, _utf8mb4 0xD0B0D0B1D0B2); -locate(_utf8mb4 0xD091, _utf8mb4 0xD0B0D0B1D0B2) -2 -select locate(_utf8mb4 0xD0B1, _utf8mb4 0xD0B0D091D0B2); -locate(_utf8mb4 0xD0B1, _utf8mb4 0xD0B0D091D0B2) -2 -select locate(_utf8mb4 0xD091, _utf8mb4 0xD0B0D0B1D0B2 collate utf8mb4_bin); -locate(_utf8mb4 0xD091, _utf8mb4 0xD0B0D0B1D0B2 collate utf8mb4_bin) -0 -select locate(_utf8mb4 0xD0B1, _utf8mb4 0xD0B0D091D0B2 collate utf8mb4_bin); -locate(_utf8mb4 0xD0B1, _utf8mb4 0xD0B0D091D0B2 collate utf8mb4_bin) -0 -select length(_utf8mb4 0xD0B1), bit_length(_utf8mb4 0xD0B1), char_length(_utf8mb4 0xD0B1); -length(_utf8mb4 0xD0B1) bit_length(_utf8mb4 0xD0B1) char_length(_utf8mb4 0xD0B1) -2 16 1 -select 'a' like 'a'; -'a' like 'a' -1 -select 'A' like 'a'; -'A' like 'a' -1 -select 'A' like 'a' collate utf8mb4_bin; -'A' like 'a' collate utf8mb4_bin -0 -select _utf8mb4 0xD0B0D0B1D0B2 like concat(_utf8mb4'%',_utf8mb4 0xD0B1,_utf8mb4 '%'); -_utf8mb4 0xD0B0D0B1D0B2 like concat(_utf8mb4'%',_utf8mb4 0xD0B1,_utf8mb4 '%') -1 -select convert(_latin1'Günter André' using utf8mb4) like CONVERT(_latin1'GÜNTER%' USING utf8mb4); -convert(_latin1'G?nter Andr?' using utf8mb4) like CONVERT(_latin1'G?NTER%' USING utf8mb4) -1 -select CONVERT(_koi8r'×ÁÓÑ' USING utf8mb4) LIKE CONVERT(_koi8r'÷áóñ' USING utf8mb4); -CONVERT(_koi8r'????' USING utf8mb4) LIKE CONVERT(_koi8r'????' USING utf8mb4) -1 -select CONVERT(_koi8r'÷áóñ' USING utf8mb4) LIKE CONVERT(_koi8r'×ÁÓÑ' USING utf8mb4); -CONVERT(_koi8r'????' USING utf8mb4) LIKE CONVERT(_koi8r'????' USING utf8mb4) -1 -SELECT 'a' = 'a '; -'a' = 'a ' -1 -SELECT 'a\0' < 'a'; -'a\0' < 'a' -1 -SELECT 'a\0' < 'a '; -'a\0' < 'a ' -1 -SELECT 'a\t' < 'a'; -'a\t' < 'a' -1 -SELECT 'a\t' < 'a '; -'a\t' < 'a ' -1 -SELECT 'a' = 'a ' collate utf8mb4_bin; -'a' = 'a ' collate utf8mb4_bin -1 -SELECT 'a\0' < 'a' collate utf8mb4_bin; -'a\0' < 'a' collate utf8mb4_bin -1 -SELECT 'a\0' < 'a ' collate utf8mb4_bin; -'a\0' < 'a ' collate utf8mb4_bin -1 -SELECT 'a\t' < 'a' collate utf8mb4_bin; -'a\t' < 'a' collate utf8mb4_bin -1 -SELECT 'a\t' < 'a ' collate utf8mb4_bin; -'a\t' < 'a ' collate utf8mb4_bin -1 -CREATE TABLE t1 (a char(10) character set utf8mb4 not null) ENGINE ndb; -INSERT INTO t1 VALUES ('a'),('a\0'),('a\t'),('a '); -SELECT hex(a),STRCMP(a,'a'), STRCMP(a,'a ') FROM t1; -hex(a) STRCMP(a,'a') STRCMP(a,'a ') -61 0 0 -61 0 0 -6100 -1 -1 -6109 -1 -1 -DROP TABLE t1; -select insert('txs',2,1,'hi'),insert('is ',4,0,'a'),insert('txxxxt',2,4,'es'); -insert('txs',2,1,'hi') insert('is ',4,0,'a') insert('txxxxt',2,4,'es') -this is a test -select insert("aa",100,1,"b"),insert("aa",1,3,"b"); -insert("aa",100,1,"b") insert("aa",1,3,"b") -aa b -select char_length(left(@a:='теÑÑ‚',5)), length(@a), @a; -char_length(left(@a:='теÑÑ‚',5)) length(@a) @a -4 8 теÑÑ‚ -create table t1 ENGINE ndb select date_format("2004-01-19 10:10:10", "%Y-%m-%d"); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `date_format("2004-01-19 10:10:10", "%Y-%m-%d")` varchar(10) CHARACTER SET utf8mb4 DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -select * from t1; -date_format("2004-01-19 10:10:10", "%Y-%m-%d") -2004-01-19 -drop table t1; -set names utf8mb4; -set LC_TIME_NAMES='fr_FR'; -create table t1 (s1 char(20) character set latin1) engine ndb; -insert into t1 values (date_format('2004-02-02','%M')); -select hex(s1) from t1; -hex(s1) -66E97672696572 -drop table t1; -create table t1 (s1 char(20) character set koi8r) engine ndb; -set LC_TIME_NAMES='ru_RU'; -insert into t1 values (date_format('2004-02-02','%M')); -insert into t1 values (date_format('2004-02-02','%b')); -insert into t1 values (date_format('2004-02-02','%W')); -insert into t1 values (date_format('2004-02-02','%a')); -select hex(s1), s1 from t1; -hex(s1) s1 -E6C5D7 Фев -E6C5D7D2C1CCD1 Ð¤ÐµÐ²Ñ€Ð°Ð»Ñ -F0CEC4 Пнд -F0CFCEC5C4C5CCD8CEC9CB Понедельник -drop table t1; -set LC_TIME_NAMES='en_US'; -set names koi8r; -create table t1 (s1 char(1) character set utf8mb4) engine ndb; -insert into t1 values (_koi8r'ÁÂ'); -Warnings: -Warning 1265 Data truncated for column 's1' at row 1 -select s1,hex(s1),char_length(s1),octet_length(s1) from t1; -s1 hex(s1) char_length(s1) octet_length(s1) -Á D0B0 1 2 -drop table t1; -create table t1 (s1 tinytext character set utf8mb4) engine ndb; -Warnings: -Warning 1478 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' -insert into t1 select repeat('a',300); -Warnings: -Warning 1265 Data truncated for column 's1' at row 1 -insert into t1 select repeat('Ñ',300); -Warnings: -Warning 1265 Data truncated for column 's1' at row 1 -insert into t1 select repeat('aÑ',300); -Warnings: -Warning 1265 Data truncated for column 's1' at row 1 -insert into t1 select repeat('Ña',300); -Warnings: -Warning 1265 Data truncated for column 's1' at row 1 -insert into t1 select repeat('ÑÑ',300); -Warnings: -Warning 1265 Data truncated for column 's1' at row 1 -select hex(s1) from t1; -hex(s1) -616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161 -61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F -D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61 -D18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18F -D18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18F -select length(s1),char_length(s1) from t1; -length(s1) char_length(s1) -254 127 -254 127 -255 170 -255 170 -255 255 -drop table t1; -create table t1 (s1 text character set utf8mb4) engine ndb; -Warnings: -Warning 1478 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' -insert into t1 select repeat('a',66000); -Warnings: -Warning 1265 Data truncated for column 's1' at row 1 -insert into t1 select repeat('Ñ',66000); -Warnings: -Warning 1265 Data truncated for column 's1' at row 1 -insert into t1 select repeat('aÑ',66000); -Warnings: -Warning 1265 Data truncated for column 's1' at row 1 -insert into t1 select repeat('Ña',66000); -Warnings: -Warning 1265 Data truncated for column 's1' at row 1 -insert into t1 select repeat('ÑÑ',66000); -Warnings: -Warning 1265 Data truncated for column 's1' at row 1 -select length(s1),char_length(s1) from t1; -length(s1) char_length(s1) -65534 32767 -65534 32767 -65535 43690 -65535 43690 -65535 65535 -drop table t1; -create table t1 (s1 char(10) character set utf8mb4) engine ndb; -insert into t1 values (0x41FF); -Warnings: -Warning 1366 Incorrect string value: '\xFF' for column 's1' at row 1 -select hex(s1) from t1; -hex(s1) -41 -drop table t1; -create table t1 (s1 varchar(10) character set utf8mb4) engine ndb; -insert into t1 values (0x41FF); -Warnings: -Warning 1366 Incorrect string value: '\xFF' for column 's1' at row 1 -select hex(s1) from t1; -hex(s1) -41 -drop table t1; -create table t1 (s1 text character set utf8mb4) engine ndb; -Warnings: -Warning 1478 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' -insert into t1 values (0x41FF); -Warnings: -Warning 1366 Incorrect string value: '\xFF' for column 's1' at row 1 -select hex(s1) from t1; -hex(s1) -41 -drop table t1; -create table t1 (a text character set utf8mb4, primary key(a(371))) engine ndb; -ERROR 42000: BLOB column 'a' can't be used in key specification with the used table type -CREATE TABLE t1 ( a varchar(10) ) CHARACTER SET utf8mb4 ENGINE ndb; -INSERT INTO t1 VALUES ( 'test' ); -SELECT a.a, b.a FROM t1 a, t1 b WHERE a.a = b.a; -a a -test test -SELECT a.a, b.a FROM t1 a, t1 b WHERE a.a = 'test' and b.a = 'test'; -a a -test test -SELECT a.a, b.a FROM t1 a, t1 b WHERE a.a = b.a and a.a = 'test'; -a a -test test -DROP TABLE t1; -create table t1 (a char(255) character set utf8mb4) engine ndb; -insert into t1 values('b'),('b'); -select * from t1 where a = 'b'; -a -b -b -select * from t1 where a = 'b' and a = 'b'; -a -b -b -select * from t1 where a = 'b' and a != 'b'; -a -drop table t1; -set collation_connection=utf8mb4_general_ci; -drop table if exists t1; -create table t1 as -select repeat(' ', 64) as s1, repeat(' ',64) as s2 -union -select null, null; -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `s1` varchar(64) CHARACTER SET utf8mb4 DEFAULT NULL, - `s2` varchar(64) CHARACTER SET utf8mb4 DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -delete from t1; -insert into t1 values('aaa','aaa'); -insert into t1 values('aaa|qqq','qqq'); -insert into t1 values('gheis','^[^a-dXYZ]+$'); -insert into t1 values('aab','^aa?b'); -insert into t1 values('Baaan','^Ba*n'); -insert into t1 values('aaa','qqq|aaa'); -insert into t1 values('qqq','qqq|aaa'); -insert into t1 values('bbb','qqq|aaa'); -insert into t1 values('bbb','qqq'); -insert into t1 values('aaa','aba'); -insert into t1 values(null,'abc'); -insert into t1 values('def',null); -insert into t1 values(null,null); -insert into t1 values('ghi','ghi['); -select HIGH_PRIORITY s1 regexp s2 from t1; -s1 regexp s2 -1 -1 -1 -1 -1 -1 -1 -0 -0 -0 -NULL -NULL -NULL -NULL -drop table t1; -set names utf8mb4; -set names utf8mb4; -select 'ваÑÑ' rlike '[[:<:]]ваÑÑ[[:>:]]'; -'ваÑÑ' rlike '[[:<:]]ваÑÑ[[:>:]]' -1 -select 'ваÑÑ ' rlike '[[:<:]]ваÑÑ[[:>:]]'; -'ваÑÑ ' rlike '[[:<:]]ваÑÑ[[:>:]]' -1 -select ' ваÑÑ' rlike '[[:<:]]ваÑÑ[[:>:]]'; -' ваÑÑ' rlike '[[:<:]]ваÑÑ[[:>:]]' -1 -select ' ваÑÑ ' rlike '[[:<:]]ваÑÑ[[:>:]]'; -' ваÑÑ ' rlike '[[:<:]]ваÑÑ[[:>:]]' -1 -select 'ваÑÑz' rlike '[[:<:]]ваÑÑ[[:>:]]'; -'ваÑÑz' rlike '[[:<:]]ваÑÑ[[:>:]]' -0 -select 'zваÑÑ' rlike '[[:<:]]ваÑÑ[[:>:]]'; -'zваÑÑ' rlike '[[:<:]]ваÑÑ[[:>:]]' -0 -select 'zваÑÑz' rlike '[[:<:]]ваÑÑ[[:>:]]'; -'zваÑÑz' rlike '[[:<:]]ваÑÑ[[:>:]]' -0 -CREATE TABLE t1 (a enum ('Y', 'N') DEFAULT 'N' COLLATE utf8mb4_unicode_ci) ENGINE ndb; -ALTER TABLE t1 ADD COLUMN b CHAR(20); -DROP TABLE t1; -set names utf8mb4; -create table t1 (a enum('aaaa','проба') character set utf8mb4) engine ndb; -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` enum('aaaa','проба') CHARACTER SET utf8mb4 DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -insert into t1 values ('проба'); -select * from t1; -a -проба -create table t2 engine ndb select ifnull(a,a) from t1; -show create table t2; -Table Create Table -t2 CREATE TABLE `t2` ( - `ifnull(a,a)` varchar(5) CHARACTER SET utf8mb4 DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -select * from t2; -ifnull(a,a) -проба -drop table t1; -drop table t2; -create table t1 ( -str varchar(255) character set utf8mb4 not null, -key str (str(2)) -) engine=ndb; -INSERT INTO t1 VALUES ('str'); -INSERT INTO t1 VALUES ('str2'); -select * from t1 where str='str'; -str -str -drop table t1; -create table t1 ( -str varchar(255) character set utf8mb4 not null, -key str (str(2)) -) engine=ndb; -INSERT INTO t1 VALUES ('str'); -INSERT INTO t1 VALUES ('str2'); -select * from t1 where str='str'; -str -str -drop table t1; -create table t1 ( -str varchar(255) character set utf8mb4 not null, -key str using btree (str(2)) -) engine=ndb; -INSERT INTO t1 VALUES ('str'); -INSERT INTO t1 VALUES ('str2'); -select * from t1 where str='str'; -str -str -drop table t1; -CREATE TABLE t1 (a varchar(32) BINARY) CHARACTER SET utf8mb4 ENGINE ndb; -INSERT INTO t1 VALUES ('test'); -SELECT a FROM t1 WHERE a LIKE '%te'; -a -DROP TABLE t1; -SET NAMES utf8mb4; -CREATE TABLE t1 ( -subject varchar(255) character set utf8mb4 collate utf8mb4_unicode_ci, -p varchar(15) character set utf8mb4 -) ENGINE= ndb DEFAULT CHARSET=latin1; -INSERT INTO t1 VALUES ('è°·å·ä¿ŠäºŒã¨ç”³ã—ã¾ã™ãŒã€ã‚¤ãƒ³ã‚¿ãƒ¼ãƒãƒƒãƒˆäºˆç´„ã®ä¼šå“¡ç™»éŒ²ã‚’ã—ã¾ã—ãŸã¨ã“ã‚ã€ãƒ¡ãƒ¼ãƒ«ã‚¢ãƒ‰ãƒ¬ã‚¹ã‚’é–“é•ãˆã¦ã—ã¾ã„会員IDãŒå—ã‘å–ã‚‹ã“ã¨ãŒå‡ºæ¥ã¾ã›ã‚“ã§ã—ãŸã€‚é–“é•ãˆã‚¢ãƒ‰ãƒ¬ã‚¹ã¯tani-shun@n.vodafone.ne.jpを書ãè¾¼ã¿ã¾ã—ãŸã€‚ã©ã†ã™ã‚Œã°ã‚ˆã„ã§ã™ã‹ï¼Ÿ ãã®ä»–ã€ä½æ‰€ç­‰ã¯é–“é•ãˆã‚ã‚Šã¾ã›ã‚“。連絡ãã ã•ã„。よã‚ã—ããŠé¡˜ã„ã—ã¾ã™ã€‚m(__)m','040312-000057'); -INSERT INTO t1 VALUES ('aaa','bbb'); -SELECT length(subject) FROM t1; -length(subject) -3 -432 -SELECT length(subject) FROM t1 ORDER BY 1; -length(subject) -3 -432 -DROP TABLE t1; -set names utf8mb4; -create table t1 ( -a int primary key, -b varchar(6), -index b3(b(3)) -) engine=ndb character set=utf8mb4; -insert into t1 values(1,'foo'),(2,'foobar'); -select * from t1 where b like 'foob%'; -a b -2 foobar -alter table t1 engine=innodb; -select * from t1 where b like 'foob%'; -a b -2 foobar -drop table t1; -create table t1 ( -a enum('петÑ','ваÑÑ','анюта') character set utf8mb4 not null default 'анюта', -b set('петÑ','ваÑÑ','анюта') character set utf8mb4 not null default 'анюта' -) engine ndb; -create table t2 engine ndb select concat(a,_utf8mb4'') as a, concat(b,_utf8mb4'')as b from t1; -show create table t2; -Table Create Table -t2 CREATE TABLE `t2` ( - `a` varchar(5) CHARACTER SET utf8mb4 NOT NULL DEFAULT '', - `b` varchar(15) CHARACTER SET utf8mb4 NOT NULL DEFAULT '' -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -drop table t2; -drop table t1; -select 'c' like '\_' as want0; -want0 -0 -SELECT SUBSTR('ваÑÑ',-2); -SUBSTR('ваÑÑ',-2) -ÑÑ -create table t1 (id integer, a varchar(100) character set utf8mb4 collate utf8mb4_unicode_ci) engine ndb; -insert into t1 values (1, 'Test'); -select * from t1 where soundex(a) = soundex('Test'); -id a -1 Test -select * from t1 where soundex(a) = soundex('TEST'); -id a -1 Test -select * from t1 where soundex(a) = soundex('test'); -id a -1 Test -drop table t1; -select soundex(_utf8mb4 0xE99885E8A788E99A8FE697B6E69BB4E696B0E79A84E696B0E997BB); -soundex(_utf8mb4 0xE99885E8A788E99A8FE697B6E69BB4E696B0E79A84E696B0E997BB) -阅000 -select hex(soundex(_utf8mb4 0xE99885E8A788E99A8FE697B6E69BB4E696B0E79A84E696B0E997BB)); -hex(soundex(_utf8mb4 0xE99885E8A788E99A8FE697B6E69BB4E696B0E79A84E696B0E997BB)) -E99885303030 -select soundex(_utf8mb4 0xD091D092D093); -soundex(_utf8mb4 0xD091D092D093) -Б000 -select hex(soundex(_utf8mb4 0xD091D092D093)); -hex(soundex(_utf8mb4 0xD091D092D093)) -D091303030 -SET collation_connection='utf8mb4_general_ci'; -create table t1 select repeat('a',4000) a; -delete from t1; -insert into t1 values ('a'), ('a '), ('a\t'); -select collation(a),hex(a) from t1 order by a; -collation(a) hex(a) -utf8mb4_general_ci 6109 -utf8mb4_general_ci 61 -utf8mb4_general_ci 6120 -drop table t1; -select @@collation_connection; -@@collation_connection -utf8mb4_general_ci -create table t1 ROW_FORMAT=DYNAMIC select repeat('a',50) as c1 ; -insert into t1 values('abcdef'); -insert into t1 values('_bcdef'); -insert into t1 values('a_cdef'); -insert into t1 values('ab_def'); -insert into t1 values('abc_ef'); -insert into t1 values('abcd_f'); -insert into t1 values('abcde_'); -select c1 as c1u from t1 where c1 like 'ab\_def'; -c1u -ab_def -select c1 as c2h from t1 where c1 like 'ab#_def' escape '#'; -c2h -ab_def -drop table t1; -drop table if exists t1; -create table t1 as select repeat(' ', 64) as s1; -select collation(s1) from t1; -collation(s1) -utf8mb4_general_ci -delete from t1; -insert into t1 values ('a'),('ae'),(_latin1 0xE4); -insert into t1 values ('o'),('oe'),(_latin1 0xF6); -insert into t1 values ('s'),('ss'),(_latin1 0xDF); -insert into t1 values ('u'),('ue'),(_latin1 0xFC); -select s1, hex(s1) from t1 order by s1, binary s1; -s1 hex(s1) -a 61 -ä C3A4 -ae 6165 -o 6F -ö C3B6 -oe 6F65 -s 73 -ß C39F -ss 7373 -u 75 -ü C3BC -ue 7565 -select group_concat(s1 order by binary s1) from t1 group by s1; -group_concat(s1 order by binary s1) -a,ä -ae -o,ö -oe -s,ß -ss -u,ü -ue -drop table t1; -SET collation_connection='utf8mb4_bin'; -create table t1 select repeat('a',4000) a; -delete from t1; -insert into t1 values ('a'), ('a '), ('a\t'); -select collation(a),hex(a) from t1 order by a; -collation(a) hex(a) -utf8mb4_bin 6109 -utf8mb4_bin 61 -utf8mb4_bin 6120 -drop table t1; -select @@collation_connection; -@@collation_connection -utf8mb4_bin -create table t1 ROW_FORMAT=DYNAMIC select repeat('a',50) as c1 ; -insert into t1 values('abcdef'); -insert into t1 values('_bcdef'); -insert into t1 values('a_cdef'); -insert into t1 values('ab_def'); -insert into t1 values('abc_ef'); -insert into t1 values('abcd_f'); -insert into t1 values('abcde_'); -select c1 as c1u from t1 where c1 like 'ab\_def'; -c1u -ab_def -select c1 as c2h from t1 where c1 like 'ab#_def' escape '#'; -c2h -ab_def -drop table t1; -CREATE TABLE t1 ( -user varchar(255) NOT NULL default '' -) ENGINE=ndb DEFAULT CHARSET=latin1; -INSERT INTO t1 VALUES ('one'),('two'); -SELECT CHARSET('a'); -CHARSET('a') -utf8mb4 -SELECT user, CONCAT('<', user, '>') AS c FROM t1; -user c -one -two -DROP TABLE t1; -create table t1 (f1 varchar(1) not null) default charset utf8mb4 engine ndb; -insert into t1 values (''), (''); -select concat(concat(_latin1'->',f1),_latin1'<-') from t1; -concat(concat(_latin1'->',f1),_latin1'<-') --><- --><- -drop table t1; -select convert(_koi8r'É' using utf8mb4) < convert(_koi8r'Ê' using utf8mb4); -convert(_koi8r'?' using utf8mb4) < convert(_koi8r'?' using utf8mb4) -1 -set names latin1; -create table t1 (a varchar(10)) character set utf8mb4 engine ndb; -insert into t1 values ('test'); -select ifnull(a,'') from t1; -ifnull(a,'') -test -drop table t1; -select repeat(_utf8mb4'+',3) as h union select NULL; -h -+++ -NULL -select ifnull(NULL, _utf8mb4'string'); -ifnull(NULL, _utf8mb4'string') -string -set names utf8mb4; -create table t1 (s1 char(5) character set utf8mb4 collate utf8mb4_lithuanian_ci) engine ndb; -insert into t1 values ('I'),('K'),('Y'); -select * from t1 where s1 < 'K' and s1 = 'Y'; -s1 -I -Y -select * from t1 where 'K' > s1 and s1 = 'Y'; -s1 -I -Y -drop table t1; -create table t1 (s1 char(5) character set utf8mb4 collate utf8mb4_czech_ci) engine ndb; -insert into t1 values ('c'),('d'),('h'),('ch'),('CH'),('cH'),('Ch'),('i'); -select * from t1 where s1 > 'd' and s1 = 'CH'; -s1 -CH -Ch -ch -select * from t1 where 'd' < s1 and s1 = 'CH'; -s1 -CH -Ch -ch -select * from t1 where s1 = 'cH' and s1 <> 'ch'; -s1 -cH -select * from t1 where 'cH' = s1 and s1 <> 'ch'; -s1 -cH -drop table t1; -create table t1 (a varchar(255)) default character set utf8mb4 engine ndb; -insert into t1 values (1.0); -drop table t1; -create table t1 ( -id int not null, -city varchar(20) not null, -key (city(7),id) -) character set=utf8mb4 engine ndb; -insert into t1 values (1,'Durban North'); -insert into t1 values (2,'Durban'); -select * from t1 where city = 'Durban'; -id city -2 Durban -select * from t1 where city = 'Durban '; -id city -2 Durban -drop table t1; -create table t1 (x set('A', 'B') default 0) character set utf8mb4 engine ndb; -ERROR 42000: Invalid default value for 'x' -create table t1 (x enum('A', 'B') default 0) character set utf8mb4 engine ndb; -ERROR 42000: Invalid default value for 'x' -SET NAMES UTF8; -CREATE TABLE t1 ( -`id` int(20) NOT NULL auto_increment, -`country` varchar(100) NOT NULL default '', -`shortcode` varchar(100) NOT NULL default '', -`operator` varchar(100) NOT NULL default '', -`momid` varchar(30) NOT NULL default '', -`keyword` varchar(160) NOT NULL default '', -`content` varchar(160) NOT NULL default '', -`second_token` varchar(160) default NULL, -`gateway_id` int(11) NOT NULL default '0', -`created` datetime NOT NULL default '0000-00-00 00:00:00', -`msisdn` varchar(15) NOT NULL default '', -PRIMARY KEY (`id`), -UNIQUE KEY `MSCCSPK_20030521130957121` (`momid`), -KEY `IX_mobile_originated_message_keyword` (`keyword`), -KEY `IX_mobile_originated_message_created` (`created`), -KEY `IX_mobile_originated_message_support` (`msisdn`,`momid`,`keyword`,`gateway_id`,`created`) -) ENGINE=ndb DEFAULT CHARSET=utf8mb4; -INSERT INTO t1 VALUES -(1,'blah','464','aaa','fkc1c9ilc20x0hgae7lx6j09','ERR','ERR Имри.Ðфимим.Ðеимимримдмримрмрирор имримримримр имридм ирбднримрфмририримрфмфмим.Ðд.Д имдимримрад.Ðдимримримрмдиримримримр м.Дадимфшьмримд им.Ðдимимрн имадми','ИМРИ.ÐФИМИМ.ÐЕИМИМРИМДМРИМРМРИРОР',3,'2005-06-01 17:30:43','1234567890'), -(2,'blah','464','aaa','haxpl2ilc20x00bj4tt2m5ti','11','11 g','G',3,'2005-06-02 22:43:10','1234567890'); -CREATE TABLE t2 ( -`msisdn` varchar(15) NOT NULL default '', -`operator_id` int(11) NOT NULL default '0', -`created` datetime NOT NULL default '0000-00-00 00:00:00', -UNIQUE KEY `PK_user` (`msisdn`) -) ENGINE=ndb DEFAULT CHARSET=utf8mb4; -INSERT INTO t2 VALUES ('1234567890',2,'2005-05-24 13:53:25'); -SELECT content, t2.msisdn FROM t1, t2 WHERE t1.msisdn = '1234567890'; -content msisdn -ERR Имри.Ðфимим.Ðеимимримдмримрмрирор имримримримр имридм ирбднримрфмририримрфмфмим.Ðд.Д имдимримрад.Ðдимримримрмдиримримримр м.Дадимфшьмримд им.Ðдимимрн имадми 1234567890 -11 g 1234567890 -DROP TABLE t1,t2; -create table t1 (a char(20) character set utf8mb4) engine ndb; -insert into t1 values ('123456'),('андрей'); -alter table t1 modify a char(2) character set utf8mb4; -Warnings: -Warning 1265 Data truncated for column 'a' at row 1 -Warning 1265 Data truncated for column 'a' at row 2 -select char_length(a), length(a), a from t1 order by a; -char_length(a) length(a) a -2 2 12 -2 4 ан -drop table t1; -set names utf8mb4; -select 'andre%' like 'andreñ%' escape 'ñ'; -'andre%' like 'andreñ%' escape 'ñ' -1 -set names utf8mb4; -select 'a\\' like 'a\\'; -'a\\' like 'a\\' -1 -select 'aa\\' like 'a%\\'; -'aa\\' like 'a%\\' -1 -create table t1 (a char(10), key(a)) character set utf8mb4 engine ndb; -insert into t1 values ("a"),("abc"),("abcd"),("hello"),("test"); -select * from t1 where a like "abc%"; -a -abc -abcd -select * from t1 where a like concat("abc","%"); -a -abc -abcd -select * from t1 where a like "ABC%"; -a -abc -abcd -select * from t1 where a like "test%"; -a -test -select * from t1 where a like "te_t"; -a -test -select * from t1 where a like "%a%"; -a -a -abc -abcd -select * from t1 where a like "%abcd%"; -a -abcd -select * from t1 where a like "%abc\d%"; -a -abcd -drop table t1; -CREATE TABLE t1 ( -a varchar(255) NOT NULL default '', -KEY a (a) -) ENGINE=ndb DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_general_ci; -insert into t1 values (_utf8mb4 0xe880bd); -insert into t1 values (_utf8mb4 0x5b); -select hex(a) from t1; -hex(a) -5B -E880BD -drop table t1; -set names 'latin1'; -create table t1 (a varchar(255)) default charset=utf8mb4 engine ndb; -select * from t1 where find_in_set('-1', a); -a -drop table t1; -create table t1 (a int) engine ndb; -insert into t1 values (48),(49),(50); -set names utf8mb4; -select distinct char(a) from t1; -char(a) -0 -1 -2 -drop table t1; -CREATE TABLE t1 (t TINYTEXT CHARACTER SET utf8mb4) ENGINE ndb; -Warnings: -Warning 1478 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' -INSERT INTO t1 VALUES(REPEAT('a', 100)); -CREATE TABLE t2 ENGINE ndb SELECT COALESCE(t) AS bug FROM t1; -Warnings: -Warning 1478 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' -SELECT LENGTH(bug) FROM t2; -LENGTH(bug) -100 -DROP TABLE t2; -DROP TABLE t1; -CREATE TABLE t1 (item varchar(255)) default character set utf8mb4 ENGINE ndb; -INSERT INTO t1 VALUES (N'\\'); -INSERT INTO t1 VALUES (_utf8mb4'\\'); -INSERT INTO t1 VALUES (N'Cote d\'Ivoire'); -INSERT INTO t1 VALUES (_utf8mb4'Cote d\'Ivoire'); -SELECT item FROM t1 ORDER BY item; -item -Cote d'Ivoire -Cote d'Ivoire -\ -\ -DROP TABLE t1; -SET NAMES utf8mb4; -DROP TABLE IF EXISTS t1; -Warnings: -Note 1051 Unknown table 't1' -CREATE TABLE t1(a VARCHAR(255), KEY(a)) ENGINE=ndb DEFAULT CHARSET=utf8mb4; -INSERT INTO t1 VALUES('uuABCDEFGHIGKLMNOPRSTUVWXYZ̈bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'); -INSERT INTO t1 VALUES('uu'); -check table t1; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -INSERT INTO t1 VALUES('uU'); -check table t1; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -INSERT INTO t1 VALUES('uu'); -check table t1; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -INSERT INTO t1 VALUES('uuABC'); -check table t1; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -INSERT INTO t1 VALUES('UuABC'); -check table t1; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -INSERT INTO t1 VALUES('uuABC'); -check table t1; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -alter table t1 add b int; -INSERT INTO t1 VALUES('uuABCDEFGHIGKLMNOPRSTUVWXYZ̈bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb',1); -INSERT INTO t1 VALUES('uuABCDEFGHIGKLMNOPRSTUVWXYZ̈bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb',2); -delete from t1 where b=1; -INSERT INTO t1 VALUES('UUABCDEFGHIGKLMNOPRSTUVWXYZ̈bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb',1); -check table t1; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -INSERT INTO t1 VALUES('uuABCDEFGHIGKLMNOPRSTUVWXYZ̈bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb',3); -INSERT INTO t1 VALUES('uuABCDEFGHIGKLMNOPRSTUVWXYZ̈bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb',4); -delete from t1 where b=3; -INSERT INTO t1 VALUES('uUABCDEFGHIGKLMNOPRSTUVWXYZ̈bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb',3); -check table t1; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -drop table t1; -set names utf8mb4; -create table t1 (s1 char(5) character set utf8mb4) engine ndb; -insert into t1 values -('a'),('b'),(null),('ペテルグル'),('ü'),('Y'); -create index it1 on t1 (s1); -select s1 as before_delete_general_ci from t1 where s1 like 'ペテ%'; -before_delete_general_ci -ペテルグル -delete from t1 where s1 = 'Y'; -select s1 as after_delete_general_ci from t1 where s1 like 'ペテ%'; -after_delete_general_ci -ペテルグル -drop table t1; -set names utf8mb4; -create table t1 (s1 char(5) character set utf8mb4 collate utf8mb4_unicode_ci) engine ndb; -insert into t1 values -('a'),('b'),(null),('ペテルグル'),('ü'),('Y'); -create index it1 on t1 (s1); -select s1 as before_delete_unicode_ci from t1 where s1 like 'ペテ%'; -before_delete_unicode_ci -ペテルグル -delete from t1 where s1 = 'Y'; -select s1 as after_delete_unicode_ci from t1 where s1 like 'ペテ%'; -after_delete_unicode_ci -ペテルグル -drop table t1; -set names utf8mb4; -create table t1 (s1 char(5) character set utf8mb4 collate utf8mb4_bin) engine ndb; -insert into t1 values -('a'),('b'),(null),('ペテルグル'),('ü'),('Y'); -create index it1 on t1 (s1); -select s1 as before_delete_bin from t1 where s1 like 'ペテ%'; -before_delete_bin -ペテルグル -delete from t1 where s1 = 'Y'; -select s1 as after_delete_bin from t1 where s1 like 'ペテ%'; -after_delete_bin -ペテルグル -drop table t1; -set names utf8mb4; -create table t1 (a varchar(30) not null primary key) -engine=ndb default character set utf8mb4 collate utf8mb4_general_ci; -insert into t1 values ('ã‚ã„ã†ãˆãŠã‹ããã‘ã“ã•ã—ã™ã›ã'); -insert into t1 values ('ã•ã—ã™ã›ãã‹ããã‘ã“ã‚ã„ã†ãˆãŠ'); -select a as gci1 from t1 where a like 'ã•ã—ã™ã›ãã‹ããã‘ã“ã‚ã„ã†ãˆãŠ%'; -gci1 -ã•ã—ã™ã›ãã‹ããã‘ã“ã‚ã„ã†ãˆãŠ -select a as gci2 from t1 where a like 'ã‚ã„ã†ãˆãŠã‹ããã‘ã“ã•ã—ã™ã›ã'; -gci2 -ã‚ã„ã†ãˆãŠã‹ããã‘ã“ã•ã—ã™ã›ã -drop table t1; -set names utf8mb4; -create table t1 (a varchar(30) not null primary key) -engine=ndb default character set utf8mb4 collate utf8mb4_unicode_ci; -insert into t1 values ('ã‚ã„ã†ãˆãŠã‹ããã‘ã“ã•ã—ã™ã›ã'); -insert into t1 values ('ã•ã—ã™ã›ãã‹ããã‘ã“ã‚ã„ã†ãˆãŠ'); -select a as uci1 from t1 where a like 'ã•ã—ã™ã›ãã‹ããã‘ã“ã‚ã„ã†ãˆãŠ%'; -uci1 -ã•ã—ã™ã›ãã‹ããã‘ã“ã‚ã„ã†ãˆãŠ -select a as uci2 from t1 where a like 'ã‚ã„ã†ãˆãŠã‹ããã‘ã“ã•ã—ã™ã›ã'; -uci2 -ã‚ã„ã†ãˆãŠã‹ããã‘ã“ã•ã—ã™ã›ã -drop table t1; -set names utf8mb4; -create table t1 (a varchar(30) not null primary key) -engine=ndb default character set utf8mb4 collate utf8mb4_bin; -insert into t1 values ('ã‚ã„ã†ãˆãŠã‹ããã‘ã“ã•ã—ã™ã›ã'); -insert into t1 values ('ã•ã—ã™ã›ãã‹ããã‘ã“ã‚ã„ã†ãˆãŠ'); -select a as bin1 from t1 where a like 'ã•ã—ã™ã›ãã‹ããã‘ã“ã‚ã„ã†ãˆãŠ%'; -bin1 -ã•ã—ã™ã›ãã‹ããã‘ã“ã‚ã„ã†ãˆãŠ -select a as bin2 from t1 where a like 'ã‚ã„ã†ãˆãŠã‹ããã‘ã“ã•ã—ã™ã›ã'; -bin2 -ã‚ã„ã†ãˆãŠã‹ããã‘ã“ã•ã—ã™ã›ã -drop table t1; -SET NAMES utf8mb4; -CREATE TABLE t1 (id int PRIMARY KEY, -a varchar(16) collate utf8mb4_unicode_ci NOT NULL default '', -b int, -f varchar(128) default 'XXX', -INDEX (a(4)) -) ENGINE=ndb DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -INSERT INTO t1(id, a, b) VALUES -(1, 'cccc', 50), (2, 'cccc', 70), (3, 'cccc', 30), -(4, 'cccc', 30), (5, 'cccc', 20), (6, 'bbbbbb', 40), -(7, 'dddd', 30), (8, 'aaaa', 10), (9, 'aaaa', 50), -(10, 'eeeee', 40), (11, 'bbbbbb', 60); -SELECT id, a, b FROM t1; -id a b -1 cccc 50 -10 eeeee 40 -11 bbbbbb 60 -2 cccc 70 -3 cccc 30 -4 cccc 30 -5 cccc 20 -6 bbbbbb 40 -7 dddd 30 -8 aaaa 10 -9 aaaa 50 -SELECT id, a, b FROM t1 WHERE a BETWEEN 'aaaa' AND 'bbbbbb'; -id a b -11 bbbbbb 60 -6 bbbbbb 40 -8 aaaa 10 -9 aaaa 50 -SELECT id, a FROM t1 WHERE a='bbbbbb'; -id a -11 bbbbbb -6 bbbbbb -SELECT id, a FROM t1 WHERE a='bbbbbb' ORDER BY b; -id a -6 bbbbbb -11 bbbbbb -DROP TABLE t1; -SET NAMES utf8mb4; -CREATE TABLE t1 ( -a CHAR(13) DEFAULT '', -INDEX(a) -) ENGINE=ndb DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; -INSERT INTO t1 VALUES -('Käli Käli 2-4'), ('Käli Käli 2-4'), -('Käli Käli 2+4'), ('Käli Käli 2+4'), -('Käli Käli 2-6'), ('Käli Käli 2-6'); -INSERT INTO t1 SELECT * FROM t1; -CREATE TABLE t2 ( -a CHAR(13) DEFAULT '', -INDEX(a) -) ENGINE=ndb DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; -INSERT INTO t2 VALUES -('Kali Kali 2-4'), ('Kali Kali 2-4'), -('Kali Kali 2+4'), ('Kali Kali 2+4'), -('Kali Kali 2-6'), ('Kali Kali 2-6'); -INSERT INTO t2 SELECT * FROM t2; -SELECT a FROM t1 WHERE a LIKE 'Käli Käli 2+4'; -a -Käli Käli 2+4 -Käli Käli 2+4 -Käli Käli 2+4 -Käli Käli 2+4 -SELECT a FROM t2 WHERE a LIKE 'Kali Kali 2+4'; -a -Kali Kali 2+4 -Kali Kali 2+4 -Kali Kali 2+4 -Kali Kali 2+4 -EXPLAIN SELECT a FROM t1 WHERE a LIKE 'Käli Käli 2+4'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range a a 53 NULL 10 Using where with pushed condition -EXPLAIN SELECT a FROM t1 WHERE a = 'Käli Käli 2+4'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref a a 53 const 10 Using where with pushed condition -EXPLAIN SELECT a FROM t2 WHERE a LIKE 'Kali Kali 2+4'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 range a a 14 NULL 10 Using where with pushed condition -EXPLAIN SELECT a FROM t2 WHERE a = 'Kali Kali 2+4'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ref a a 14 const 10 Using where with pushed condition -DROP TABLE t1,t2; -CREATE TABLE t1 ( -a char(255) DEFAULT '', -KEY(a(10)) -) ENGINE=ndb DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; -INSERT INTO t1 VALUES ('Käli Käli 2-4'); -SELECT * FROM t1 WHERE a LIKE 'Käli Käli 2%'; -a -Käli Käli 2-4 -INSERT INTO t1 VALUES ('Käli Käli 2-4'); -SELECT * FROM t1 WHERE a LIKE 'Käli Käli 2%'; -a -Käli Käli 2-4 -Käli Käli 2-4 -DROP TABLE t1; -CREATE TABLE t1 ( -a char(255) DEFAULT '' -) ENGINE=ndb DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; -INSERT INTO t1 VALUES ('Käli Käli 2-4'); -INSERT INTO t1 VALUES ('Käli Käli 2-4'); -SELECT * FROM t1 WHERE a LIKE 'Käli Käli 2%'; -a -Käli Käli 2-4 -Käli Käli 2-4 -ALTER TABLE t1 ADD KEY (a(10)); -SELECT * FROM t1 WHERE a LIKE 'Käli Käli 2%'; -a -Käli Käli 2-4 -Käli Käli 2-4 -DROP TABLE t1; -SET NAMES latin2; -create table t1(a char(200) collate utf8mb4_unicode_ci NOT NULL default '') -default charset=utf8mb4 collate=utf8mb4_unicode_ci engine ndb; -insert into t1 values (unhex('65')), (unhex('C3A9')), (unhex('65')); -explain select distinct a from t1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using temporary -SELECT COUNT(*) FROM (SELECT DISTINCT a FROM t1) AS t2; -COUNT(*) -1 -explain select a from t1 group by a; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using temporary; Using filesort -SELECT COUNT(*) FROM (SELECT a FROM t1 GROUP BY a) AS t2; -COUNT(*) -1 -drop table t1; -create table t1(a char(10)) default charset utf8mb4 engine ndb; -insert into t1 values ('123'), ('456'); -explain -select substr(Z.a,-1), Z.a from t1 as Y join t1 as Z on Y.a=Z.a order by 1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE Y ALL NULL NULL NULL NULL 2 Using temporary; Using filesort -1 SIMPLE Z ALL NULL NULL NULL NULL 2 Using where; Using join buffer -select substr(Z.a,-1), Z.a from t1 as Y join t1 as Z on Y.a=Z.a order by 1; -substr(Z.a,-1) a -3 123 -6 456 -drop table t1; -SET CHARACTER SET utf8mb4; -SHOW VARIABLES LIKE 'character\_set\_%'; -Variable_name Value -character_set_client utf8mb4 -character_set_connection latin1 -character_set_database latin1 -character_set_filesystem binary -character_set_results utf8mb4 -character_set_server latin1 -character_set_system utf8 -CREATE DATABASE crashtest DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; -USE crashtest; -CREATE TABLE crashtest (crash char(10)) DEFAULT CHARSET=utf8mb4 ENGINE ndb; -INSERT INTO crashtest VALUES ('35'), ('36'), ('37'); -SELECT * FROM crashtest ORDER BY CHAR(crash USING utf8mb4); -crash -35 -36 -37 -INSERT INTO crashtest VALUES ('-1000'); -EXPLAIN SELECT * FROM crashtest ORDER BY CHAR(crash USING utf8mb4); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE crashtest ALL NULL NULL NULL NULL 4 Using filesort -SELECT * FROM crashtest ORDER BY CHAR(crash USING utf8mb4); -crash --1000 -35 -36 -37 -Warnings: -Warning 1300 Invalid utf8mb4 character string: 'FFFFFC' -DROP TABLE crashtest; -DROP DATABASE crashtest; -USE test; -SET CHARACTER SET default; -CREATE TABLE t1(id varchar(20) NOT NULL) DEFAULT CHARSET=utf8mb4 ENGINE ndb; -INSERT INTO t1 VALUES ('xxx'), ('aa'), ('yyy'), ('aa'); -SELECT id FROM t1; -id -aa -aa -xxx -yyy -SELECT DISTINCT id FROM t1; -id -aa -xxx -yyy -SELECT DISTINCT id FROM t1 ORDER BY id; -id -aa -xxx -yyy -DROP TABLE t1; -create table t1 ( -a varchar(26) not null -) default character set utf8mb4 ENGINE ndb; -insert into t1 (a) values ('abcdefghijklmnopqrstuvwxyz'); -select * from t1; -a -abcdefghijklmnopqrstuvwxyz -alter table t1 change a a varchar(20) character set utf8mb4 not null; -Warnings: -Warning 1265 Data truncated for column 'a' at row 1 -select * from t1; -a -abcdefghijklmnopqrst -alter table t1 change a a char(15) character set utf8mb4 not null; -Warnings: -Warning 1265 Data truncated for column 'a' at row 1 -select * from t1; -a -abcdefghijklmno -alter table t1 change a a char(10) character set utf8mb4 not null; -Warnings: -Warning 1265 Data truncated for column 'a' at row 1 -select * from t1; -a -abcdefghij -alter table t1 change a a varchar(5) character set utf8mb4 not null; -Warnings: -Warning 1265 Data truncated for column 'a' at row 1 -select * from t1; -a -abcde -drop table t1; -set names utf8mb4; -select hex(char(1 using utf8mb4)); -hex(char(1 using utf8mb4)) -01 -select char(0xd1,0x8f using utf8mb4); -char(0xd1,0x8f using utf8mb4) -Ñ -select char(0xd18f using utf8mb4); -char(0xd18f using utf8mb4) -Ñ -select char(53647 using utf8mb4); -char(53647 using utf8mb4) -Ñ -select char(0xff,0x8f using utf8mb4); -char(0xff,0x8f using utf8mb4) - -Warnings: -Warning 1300 Invalid utf8mb4 character string: 'FF8F' -select convert(char(0xff,0x8f) using utf8mb4); -convert(char(0xff,0x8f) using utf8mb4) - -Warnings: -Warning 1300 Invalid utf8mb4 character string: 'FF8F' -set sql_mode=traditional; -select char(0xff,0x8f using utf8mb4); -char(0xff,0x8f using utf8mb4) -NULL -Warnings: -Warning 1300 Invalid utf8mb4 character string: 'FF8F' -select char(195 using utf8mb4); -char(195 using utf8mb4) -NULL -Warnings: -Warning 1300 Invalid utf8mb4 character string: 'C3' -select char(196 using utf8mb4); -char(196 using utf8mb4) -NULL -Warnings: -Warning 1300 Invalid utf8mb4 character string: 'C4' -select char(2557 using utf8mb4); -char(2557 using utf8mb4) -NULL -Warnings: -Warning 1300 Invalid utf8mb4 character string: 'FD' -select convert(char(0xff,0x8f) using utf8mb4); -convert(char(0xff,0x8f) using utf8mb4) -NULL -Warnings: -Warning 1300 Invalid utf8mb4 character string: 'FF8F' -select hex(convert(char(2557 using latin1) using utf8mb4)); -hex(convert(char(2557 using latin1) using utf8mb4)) -09C3BD -select hex(char(195)); -hex(char(195)) -C3 -select hex(char(196)); -hex(char(196)) -C4 -select hex(char(2557)); -hex(char(2557)) -09FD -set names utf8mb4; -create table t1 (a char(1)) default character set utf8mb4 engine ndb; -create table t2 (a char(1)) default character set utf8mb4 engine ndb; -insert into t1 values('a'),('a'),(0xE38182),(0xE38182); -insert into t1 values('i'),('i'),(0xE38184),(0xE38184); -select * from t1 union distinct select * from t2; -a -a -i -ã‚ -ã„ -drop table t1,t2; -set names utf8mb4; -create table t1 (a char(10), b varchar(10)) engine ndb; -insert into t1 values ('bar','kostja'); -insert into t1 values ('kostja','bar'); -prepare my_stmt from "select * from t1 where a=?"; -set @a:='bar'; -execute my_stmt using @a; -a b -bar kostja -set @a:='kostja'; -execute my_stmt using @a; -a b -kostja bar -set @a:=null; -execute my_stmt using @a; -a b -drop table if exists t1; -drop table if exists t1; -drop view if exists v1, v2; -set names utf8mb4; -create table t1(col1 varchar(12) character set utf8mb4 collate utf8mb4_unicode_ci) engine ndb; -insert into t1 values('t1_val'); -create view v1 as select 'v1_val' as col1; -select coercibility(col1), collation(col1) from v1; -coercibility(col1) collation(col1) -4 utf8mb4_general_ci -create view v2 as select col1 from v1 union select col1 from t1; -select coercibility(col1), collation(col1)from v2; -coercibility(col1) collation(col1) -2 utf8mb4_unicode_ci -2 utf8mb4_unicode_ci -drop view v1, v2; -create view v1 as select 'v1_val' collate utf8mb4_swedish_ci as col1; -select coercibility(col1), collation(col1) from v1; -coercibility(col1) collation(col1) -0 utf8mb4_swedish_ci -create view v2 as select col1 from v1 union select col1 from t1; -select coercibility(col1), collation(col1) from v2; -coercibility(col1) collation(col1) -0 utf8mb4_swedish_ci -0 utf8mb4_swedish_ci -drop view v1, v2; -drop table t1; -set names utf8mb4; -create table t1 (a varchar(10) character set latin1, b int) engine ndb; -insert into t1 values ('a',1); -select concat(a, if(b>10, N'x', N'y')) from t1; -concat(a, if(b>10, N'x', N'y')) -ay -select concat(a, if(b>10, N'æ', N'ß')) from t1; -ERROR HY000: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation 'concat' -drop table t1; -set names utf8mb4; -create table t1 (a varchar(10) character set latin1, b int) engine ndb; -insert into t1 values ('a',1); -select concat(a, if(b>10, _utf8mb4'x', _utf8mb4'y')) from t1; -concat(a, if(b>10, _utf8mb4'x', _utf8mb4'y')) -ay -select concat(a, if(b>10, _utf8mb4'æ', _utf8mb4'ß')) from t1; -ERROR HY000: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8mb4_general_ci,COERCIBLE) for operation 'concat' -drop table t1; -set names utf8mb4; -create table t1 (a varchar(10) character set latin1, b int) engine ndb; -insert into t1 values ('a',1); -select concat(a, if(b>10, _utf8mb4 0x78, _utf8mb4 0x79)) from t1; -concat(a, if(b>10, _utf8mb4 0x78, _utf8mb4 0x79)) -ay -select concat(a, if(b>10, _utf8mb4 0xC3A6, _utf8mb4 0xC3AF)) from t1; -ERROR HY000: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8mb4_general_ci,COERCIBLE) for operation 'concat' -drop table t1; -set names utf8mb4; -create table t1 (a varchar(10) character set latin1, b int) engine ndb; -insert into t1 values ('a',1); -select concat(a, if(b>10, 'x' 'x', 'y' 'y')) from t1; -concat(a, if(b>10, 'x' 'x', 'y' 'y')) -ayy -select concat(a, if(b>10, 'x' 'æ', 'y' 'ß')) from t1; -ERROR HY000: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8mb4_general_ci,COERCIBLE) for operation 'concat' -drop table t1; -CREATE TABLE t1 ( -colA int(11) NOT NULL, -colB varchar(255) character set utf8mb4 NOT NULL, -PRIMARY KEY (colA) -) ENGINE=ndb DEFAULT CHARSET=latin1; -INSERT INTO t1 (colA, colB) VALUES (1, 'foo'), (2, 'foo bar'); -CREATE TABLE t2 ( -colA int(11) NOT NULL, -colB varchar(255) character set utf8mb4 NOT NULL, -KEY bad (colA,colB(3)) -) ENGINE=ndb DEFAULT CHARSET=latin1; -INSERT INTO t2 (colA, colB) VALUES (1, 'foo'),(2, 'foo bar'); -SELECT * FROM t1 JOIN t2 ON t1.colA=t2.colA AND t1.colB=t2.colB -WHERE t1.colA < 3; -colA colB colA colB -1 foo 1 foo -2 foo bar 2 foo bar -DROP TABLE t1, t2; -SELECT 'н1234567890' UNION SELECT _binary '1'; -н1234567890 -н1234567890 -1 -SELECT 'н1234567890' UNION SELECT 1; -н1234567890 -н1234567890 -1 -SELECT '1' UNION SELECT 'н1234567890'; -1 -1 -н1234567890 -SELECT 1 UNION SELECT 'н1234567890'; -1 -1 -н1234567890 -CREATE TABLE t1 (c VARCHAR(11)) CHARACTER SET utf8mb4 ENGINE ndb; -CREATE TABLE t2 (b CHAR(1) CHARACTER SET binary, i INT) ENGINE ndb; -INSERT INTO t1 (c) VALUES ('н1234567890'); -INSERT INTO t2 (b, i) VALUES ('1', 1); -SELECT c FROM t1 UNION SELECT b FROM t2; -c -н1234567890 -1 -SELECT c FROM t1 UNION SELECT i FROM t2; -c -н1234567890 -1 -SELECT b FROM t2 UNION SELECT c FROM t1; -b -1 -н1234567890 -SELECT i FROM t2 UNION SELECT c FROM t1; -i -1 -н1234567890 -DROP TABLE t1, t2; -set sql_mode=traditional; -select hex(char(0xFF using utf8mb4)); -hex(char(0xFF using utf8mb4)) -NULL -Warnings: -Warning 1300 Invalid utf8mb4 character string: 'FF' -select hex(convert(0xFF using utf8mb4)); -hex(convert(0xFF using utf8mb4)) -NULL -Warnings: -Warning 1300 Invalid utf8mb4 character string: 'FF' -select hex(_utf8mb4 0x616263FF); -ERROR HY000: Invalid utf8mb4 character string: 'FF' -select hex(_utf8mb4 X'616263FF'); -ERROR HY000: Invalid utf8mb4 character string: 'FF' -select hex(_utf8mb4 B'001111111111'); -ERROR HY000: Invalid utf8mb4 character string: 'FF' -select (_utf8mb4 X'616263FF'); -ERROR HY000: Invalid utf8mb4 character string: 'FF' -set sql_mode=default; -select hex(char(0xFF using utf8mb4)); -hex(char(0xFF using utf8mb4)) - -Warnings: -Warning 1300 Invalid utf8mb4 character string: 'FF' -select hex(convert(0xFF using utf8mb4)); -hex(convert(0xFF using utf8mb4)) - -Warnings: -Warning 1300 Invalid utf8mb4 character string: 'FF' -select hex(_utf8mb4 0x616263FF); -ERROR HY000: Invalid utf8mb4 character string: 'FF' -select hex(_utf8mb4 X'616263FF'); -ERROR HY000: Invalid utf8mb4 character string: 'FF' -select hex(_utf8mb4 B'001111111111'); -ERROR HY000: Invalid utf8mb4 character string: 'FF' -select (_utf8mb4 X'616263FF'); -ERROR HY000: Invalid utf8mb4 character string: 'FF' -CREATE TABLE t1 (a INT NOT NULL, b INT NOT NULL) ENGINE ndb; -INSERT INTO t1 VALUES (70000, 1092), (70001, 1085), (70002, 1065); -SELECT CONVERT(a, CHAR), CONVERT(b, CHAR) FROM t1 GROUP BY b; -CONVERT(a, CHAR) CONVERT(b, CHAR) -70000 1092 -70001 1085 -70002 1065 -SELECT CONVERT(a, CHAR), CONVERT(b, CHAR) FROM t1; -CONVERT(a, CHAR) CONVERT(b, CHAR) -70000 1092 -70001 1085 -70002 1065 -ALTER TABLE t1 ADD UNIQUE (b); -SELECT CONVERT(a, CHAR), CONVERT(b, CHAR) FROM t1 GROUP BY b; -CONVERT(a, CHAR) CONVERT(b, CHAR) -70000 1092 -70001 1085 -70002 1065 -DROP INDEX b ON t1; -SELECT CONVERT(a, CHAR), CONVERT(b, CHAR) FROM t1 GROUP BY b; -CONVERT(a, CHAR) CONVERT(b, CHAR) -70000 1092 -70001 1085 -70002 1065 -ALTER TABLE t1 ADD INDEX (b); -SELECT CONVERT(a, CHAR), CONVERT(b, CHAR) from t1 GROUP BY b; -CONVERT(a, CHAR) CONVERT(b, CHAR) -70000 1092 -70001 1085 -70002 1065 -DROP TABLE t1; -# -# Bug#26474: Add Sinhala script (Sri Lanka) collation to MySQL -# -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -predicted_order int NOT NULL, -utf8mb4_encoding VARCHAR(10) NOT NULL -) CHARACTER SET utf8mb4 ENGINE ndb; -INSERT INTO t1 VALUES (19, x'E0B696'), (30, x'E0B69AE0B798'), (61, x'E0B6AF'), (93, x'E0B799'), (52, x'E0B6A6'), (73, x'E0B6BBE0B78AE2808D'), (3, x'E0B686'), (56, x'E0B6AA'), (55, x'E0B6A9'), (70, x'E0B6B9'), (94, x'E0B79A'), (80, x'E0B785'), (25, x'E0B69AE0B791'), (48, x'E0B6A2'), (13, x'E0B690'), (86, x'E0B793'), (91, x'E0B79F'), (81, x'E0B786'), (79, x'E0B784'), (14, x'E0B691'), (99, x'E0B78A'), (8, x'E0B68B'), (68, x'E0B6B7'), (22, x'E0B69A'), (16, x'E0B693'), (33, x'E0B69AE0B7B3'), (38, x'E0B69AE0B79D'), (21, x'E0B683'), (11, x'E0B68E'), (77, x'E0B782'), (40, x'E0B69AE0B78A'), (101, x'E0B78AE2808DE0B6BB'), (35, x'E0B69AE0B79A'), (1, x'E0B7B4'), (9, x'E0B68C'), (96, x'E0B79C'), (6, x'E0B689'), (95, x'E0B79B'), (88, x'E0B796'), (64, x'E0B6B3'), (26, x'E0B69AE0B792'), (82, x'E0B78F'), (28, x'E0B69AE0B794'), (39, x'E0B69AE0B79E'), (97, x'E0B79D'), (2, x'E0B685'), (75, x'E0B780'), (34, x'E0B69AE0B799'), (69, x'E0B6B8'), (83, x'E0B790'), (18, x'E0B695'), (90, x'E0B7B2'), (17, x'E0B694'), (72, x'E0B6BB'), (66, x'E0B6B5'), (59, x'E0B6AD'), (44, x'E0B69E'), (15, x'E0B692'), (23, x'E0B69AE0B78F'), (65, x'E0B6B4'), (42, x'E0B69C'), (63, x'E0B6B1'), (85, x'E0B792'), (47, x'E0B6A1'), (49, x'E0B6A3'), (92, x'E0B7B3'), (78, x'E0B783'), (36, x'E0B69AE0B79B'), (4, x'E0B687'), (24, x'E0B69AE0B790'), (87, x'E0B794'), (37, x'E0B69AE0B79C'), (32, x'E0B69AE0B79F'), (29, x'E0B69AE0B796'), (43, x'E0B69D'), (62, x'E0B6B0'), (100, x'E0B78AE2808DE0B6BA'), (60, x'E0B6AE'), (45, x'E0B69F'), (12, x'E0B68F'), (46, x'E0B6A0'), (50, x'E0B6A5'), (51, x'E0B6A4'), (5, x'E0B688'), (76, x'E0B781'), (89, x'E0B798'), (74, x'E0B6BD'), (10, x'E0B68D'), (57, x'E0B6AB'), (71, x'E0B6BA'), (58, x'E0B6AC'), (27, x'E0B69AE0B793'), (54, x'E0B6A8'), (84, x'E0B791'), (31, x'E0B69AE0B7B2'), (98, x'E0B79E'), (53, x'E0B6A7'), (41, x'E0B69B'), (67, x'E0B6B6'), (7, x'E0B68A'), (20, x'E0B682'); -SELECT predicted_order, hex(utf8mb4_encoding) FROM t1 ORDER BY utf8mb4_encoding COLLATE utf8mb4_sinhala_ci; -predicted_order hex(utf8mb4_encoding) -1 E0B7B4 -2 E0B685 -3 E0B686 -4 E0B687 -5 E0B688 -6 E0B689 -7 E0B68A -8 E0B68B -9 E0B68C -10 E0B68D -11 E0B68E -12 E0B68F -13 E0B690 -14 E0B691 -15 E0B692 -16 E0B693 -17 E0B694 -18 E0B695 -19 E0B696 -20 E0B682 -21 E0B683 -22 E0B69A -23 E0B69AE0B78F -24 E0B69AE0B790 -25 E0B69AE0B791 -26 E0B69AE0B792 -27 E0B69AE0B793 -28 E0B69AE0B794 -29 E0B69AE0B796 -30 E0B69AE0B798 -31 E0B69AE0B7B2 -32 E0B69AE0B79F -33 E0B69AE0B7B3 -34 E0B69AE0B799 -35 E0B69AE0B79A -36 E0B69AE0B79B -37 E0B69AE0B79C -38 E0B69AE0B79D -39 E0B69AE0B79E -40 E0B69AE0B78A -41 E0B69B -42 E0B69C -43 E0B69D -44 E0B69E -45 E0B69F -46 E0B6A0 -47 E0B6A1 -48 E0B6A2 -49 E0B6A3 -50 E0B6A5 -51 E0B6A4 -52 E0B6A6 -53 E0B6A7 -54 E0B6A8 -55 E0B6A9 -56 E0B6AA -57 E0B6AB -58 E0B6AC -59 E0B6AD -60 E0B6AE -61 E0B6AF -62 E0B6B0 -63 E0B6B1 -64 E0B6B3 -65 E0B6B4 -66 E0B6B5 -67 E0B6B6 -68 E0B6B7 -69 E0B6B8 -70 E0B6B9 -71 E0B6BA -72 E0B6BB -73 E0B6BBE0B78AE2808D -74 E0B6BD -75 E0B780 -76 E0B781 -77 E0B782 -78 E0B783 -79 E0B784 -80 E0B785 -81 E0B786 -82 E0B78F -83 E0B790 -84 E0B791 -85 E0B792 -86 E0B793 -87 E0B794 -88 E0B796 -89 E0B798 -90 E0B7B2 -91 E0B79F -92 E0B7B3 -93 E0B799 -94 E0B79A -95 E0B79B -96 E0B79C -97 E0B79D -98 E0B79E -99 E0B78A -100 E0B78AE2808DE0B6BA -101 E0B78AE2808DE0B6BB -DROP TABLE t1; -# -# Bug#32914 Character sets: illegal characters in utf8mb4 and utf32 columns -# -create table t1 (utf8mb4 char(1) character set utf8mb4) engine ndb; -Testing [F0][90..BF][80..BF][80..BF] -insert into t1 values (0xF0908080); -insert into t1 values (0xF0BFBFBF); -insert into t1 values (0xF08F8080); -Warnings: -Warning 1366 Incorrect string value: '\xF0\x8F\x80\x80' for column 'utf8mb4' at row 1 -select hex(utf8mb4) from t1; -hex(utf8mb4) - -F0908080 -F0BFBFBF -delete from t1; -Testing [F2..F3][80..BF][80..BF][80..BF] -insert into t1 values (0xF2808080); -insert into t1 values (0xF2BFBFBF); -select hex(utf8mb4) from t1; -hex(utf8mb4) -F2808080 -F2BFBFBF -delete from t1; -Testing [F4][80..8F][80..BF][80..BF] -insert into t1 values (0xF4808080); -insert into t1 values (0xF48F8080); -insert into t1 values (0xF4908080); -Warnings: -Warning 1366 Incorrect string value: '\xF4\x90\x80\x80' for column 'utf8mb4' at row 1 -select hex(utf8mb4) from t1; -hex(utf8mb4) - -F4808080 -F48F8080 -drop table t1; -# -# Check strnxfrm() with odd length -# -set max_sort_length=5; -select @@max_sort_length; -@@max_sort_length -5 -create table t1 (a varchar(128) character set utf8mb4 collate utf8mb4_general_ci) engine ndb; -insert into t1 values ('a'),('b'),('c'); -select * from t1 order by a; -a -a -b -c -alter table t1 modify a varchar(128) character set utf8mb4 collate utf8mb4_bin; -select * from t1 order by a; -a -a -b -c -drop table t1; -set max_sort_length=default; -# -# Bug#26180: Can't add columns to tables created with utf8mb4 text indexes -# -# -# Testing 4-byte values. -# -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -u_decimal int NOT NULL, -utf8mb4_encoding VARCHAR(10) NOT NULL -) CHARACTER SET utf8mb4 ENGINE ndb; -INSERT INTO t1 VALUES (119040, x'f09d8480'), -# G CLEF -(119070, x'f09d849e'), -# HALF NOTE -(119134, x'f09d859e'), -# MUSICAL SYMBOL CROIX -(119247, x'f09d878f'), -# MATHEMATICAL BOLD ITALIC CAPITAL DELTA -(120607, x'f09d9c9f'), -# SANS-SERIF BOLD ITALIC CAPITAL PI -(120735, x'f09d9e9f'), -# (last 4 byte character) -(1114111, x'f48fbfbf'), -# VARIATION SELECTOR-256 -(917999, x'f3a087af'); -INSERT INTO t1 VALUES (119070, x'f09d849ef09d859ef09d859ef09d8480f09d859ff09d859ff09d859ff09d85a0f09d85a0f09d8480'); -INSERT INTO t1 VALUES (65131, x'efb9abf09d849ef09d859ef09d859ef09d8480f09d859fefb9abefb9abf09d85a0efb9ab'); -INSERT INTO t1 VALUES (119070, x'f09d849ef09d859ef09d859ef09d8480f09d859ff09d859ff09d859ff09d85a0f09d85a0f09d8480f09d85a0'); -Warnings: -Warning 1265 Data truncated for column 'utf8mb4_encoding' at row 1 -SELECT u_decimal, hex(utf8mb4_encoding) FROM t1 ORDER BY utf8mb4_encoding COLLATE utf8mb4_general_ci, BINARY utf8mb4_encoding; -u_decimal hex(utf8mb4_encoding) -1114111 F48FBFBF -119040 F09D8480 -119070 F09D849E -119070 F09D849EF09D859EF09D859EF09D8480F09D859FF09D859FF09D859FF09D85A0F09D85A0F09D8480 -119070 F09D849EF09D859EF09D859EF09D8480F09D859FF09D859FF09D859FF09D85A0F09D85A0F09D8480 -119134 F09D859E -119247 F09D878F -120607 F09D9C9F -120735 F09D9E9F -65131 EFB9ABF09D849EF09D859EF09D859EF09D8480F09D859FEFB9ABEFB9ABF09D85A0EFB9AB -917999 F3A087AF -INSERT INTO t1 VALUES (1114111, x'f5808080'); -Warnings: -Warning 1366 Incorrect string value: '\xF5\x80\x80\x80' for column 'utf8mb4_encoding' at row 1 -SELECT character_maximum_length, character_octet_length FROM information_schema.columns WHERE -table_name= 't1' AND column_name= 'utf8mb4_encoding'; -character_maximum_length character_octet_length -10 40 -DROP TABLE IF EXISTS t2; -CREATE TABLE t2 ( -u_decimal int NOT NULL, -utf8mb3_encoding VARCHAR(10) NOT NULL -) CHARACTER SET utf8mb3 ENGINE ndb; -INSERT INTO t2 VALUES (42856, x'ea9da8'); -INSERT INTO t2 VALUES (65131, x'efb9ab'); -INSERT INTO t2 VALUES (1114111, x'f48fbfbf'); -Warnings: -Warning 1366 Incorrect string value: '\xF4\x8F\xBF\xBF' for column 'utf8mb3_encoding' at row 1 -SELECT character_maximum_length, character_octet_length FROM information_schema.columns WHERE -table_name= 't2' AND column_name= 'utf8mb3_encoding'; -character_maximum_length character_octet_length -10 30 -UPDATE t2 SET utf8mb3_encoding= x'f48fbfbd' where u_decimal= 42856; -Warnings: -Warning 1366 Incorrect string value: '\xF4\x8F\xBF\xBD' for column 'utf8mb3_encoding' at row 1 -UPDATE t2 SET utf8mb3_encoding= _utf8mb4 x'ea9da8' where u_decimal= 42856; -SELECT HEX(CONCAT(utf8mb4_encoding, _utf8 x'ea9da8')) FROM t1; -HEX(CONCAT(utf8mb4_encoding, _utf8 x'ea9da8')) -EA9DA8 -EFB9ABF09D849EF09D859EF09D859EF09D8480F09D859FEFB9ABEFB9ABF09D85A0EFB9ABEA9DA8 -F09D8480EA9DA8 -F09D849EEA9DA8 -F09D849EF09D859EF09D859EF09D8480F09D859FF09D859FF09D859FF09D85A0F09D85A0F09D8480EA9DA8 -F09D849EF09D859EF09D859EF09D8480F09D859FF09D859FF09D859FF09D85A0F09D85A0F09D8480EA9DA8 -F09D859EEA9DA8 -F09D878FEA9DA8 -F09D9C9FEA9DA8 -F09D9E9FEA9DA8 -F3A087AFEA9DA8 -F48FBFBFEA9DA8 -SELECT HEX(CONCAT(utf8mb4_encoding, utf8mb3_encoding)) FROM t1,t2; -HEX(CONCAT(utf8mb4_encoding, utf8mb3_encoding)) - -EA9DA8 -EFB9AB -EFB9ABF09D849EF09D859EF09D859EF09D8480F09D859FEFB9ABEFB9ABF09D85A0EFB9AB -EFB9ABF09D849EF09D859EF09D859EF09D8480F09D859FEFB9ABEFB9ABF09D85A0EFB9ABEA9DA8 -EFB9ABF09D849EF09D859EF09D859EF09D8480F09D859FEFB9ABEFB9ABF09D85A0EFB9ABEFB9AB -F09D8480 -F09D8480EA9DA8 -F09D8480EFB9AB -F09D849E -F09D849EEA9DA8 -F09D849EEFB9AB -F09D849EF09D859EF09D859EF09D8480F09D859FF09D859FF09D859FF09D85A0F09D85A0F09D8480 -F09D849EF09D859EF09D859EF09D8480F09D859FF09D859FF09D859FF09D85A0F09D85A0F09D8480 -F09D849EF09D859EF09D859EF09D8480F09D859FF09D859FF09D859FF09D85A0F09D85A0F09D8480EA9DA8 -F09D849EF09D859EF09D859EF09D8480F09D859FF09D859FF09D859FF09D85A0F09D85A0F09D8480EA9DA8 -F09D849EF09D859EF09D859EF09D8480F09D859FF09D859FF09D859FF09D85A0F09D85A0F09D8480EFB9AB -F09D849EF09D859EF09D859EF09D8480F09D859FF09D859FF09D859FF09D85A0F09D85A0F09D8480EFB9AB -F09D859E -F09D859EEA9DA8 -F09D859EEFB9AB -F09D878F -F09D878FEA9DA8 -F09D878FEFB9AB -F09D9C9F -F09D9C9FEA9DA8 -F09D9C9FEFB9AB -F09D9E9F -F09D9E9FEA9DA8 -F09D9E9FEFB9AB -F3A087AF -F3A087AFEA9DA8 -F3A087AFEFB9AB -F48FBFBF -F48FBFBFEA9DA8 -F48FBFBFEFB9AB -SELECT count(*) FROM t1, t2 -WHERE t1.utf8mb4_encoding > t2.utf8mb3_encoding; -count(*) -33 -ALTER TABLE t1 CONVERT TO CHARACTER SET utf8; -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `u_decimal` int(11) NOT NULL, - `utf8mb4_encoding` varchar(10) NOT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=utf8 -SELECT u_decimal,hex(utf8mb4_encoding),utf8mb4_encoding FROM t1; -u_decimal hex(utf8mb4_encoding) utf8mb4_encoding -1114111 -1114111 3F ? -119040 3F ? -119070 3F ? -119070 3F3F3F3F3F3F3F3F3F3F ?????????? -119070 3F3F3F3F3F3F3F3F3F3F ?????????? -119134 3F ? -119247 3F ? -120607 3F ? -120735 3F ? -65131 EFB9AB3F3F3F3F3FEFB9ABEFB9AB3FEFB9AB ﹫?????﹫﹫?﹫ -917999 3F ? -ALTER TABLE t2 CONVERT TO CHARACTER SET utf8mb4; -SHOW CREATE TABLE t2; -Table Create Table -t2 CREATE TABLE `t2` ( - `u_decimal` int(11) NOT NULL, - `utf8mb3_encoding` varchar(10) NOT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 -SELECT u_decimal,hex(utf8mb3_encoding) FROM t2; -u_decimal hex(utf8mb3_encoding) -1114111 -42856 EA9DA8 -65131 EFB9AB -ALTER TABLE t2 CONVERT TO CHARACTER SET utf8mb3; -SHOW CREATE TABLE t2; -Table Create Table -t2 CREATE TABLE `t2` ( - `u_decimal` int(11) NOT NULL, - `utf8mb3_encoding` varchar(10) NOT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=utf8 -SELECT u_decimal,hex(utf8mb3_encoding) FROM t2; -u_decimal hex(utf8mb3_encoding) -1114111 -42856 EA9DA8 -65131 EFB9AB -ALTER TABLE t1 MODIFY utf8mb4_encoding VARCHAR(10) CHARACTER SET utf8mb3; -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `u_decimal` int(11) NOT NULL, - `utf8mb4_encoding` varchar(10) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=utf8 -SELECT u_decimal,hex(utf8mb4_encoding) FROM t1; -u_decimal hex(utf8mb4_encoding) -1114111 -1114111 3F -119040 3F -119070 3F -119070 3F3F3F3F3F3F3F3F3F3F -119070 3F3F3F3F3F3F3F3F3F3F -119134 3F -119247 3F -120607 3F -120735 3F -65131 EFB9AB3F3F3F3F3FEFB9ABEFB9AB3FEFB9AB -917999 3F -ALTER TABLE t1 MODIFY utf8mb4_encoding VARCHAR(10) CHARACTER SET utf8mb4; -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `u_decimal` int(11) NOT NULL, - `utf8mb4_encoding` varchar(10) CHARACTER SET utf8mb4 DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=utf8 -SELECT u_decimal,hex(utf8mb4_encoding) FROM t1; -u_decimal hex(utf8mb4_encoding) -1114111 -1114111 3F -119040 3F -119070 3F -119070 3F3F3F3F3F3F3F3F3F3F -119070 3F3F3F3F3F3F3F3F3F3F -119134 3F -119247 3F -120607 3F -120735 3F -65131 EFB9AB3F3F3F3F3FEFB9ABEFB9AB3FEFB9AB -917999 3F -ALTER TABLE t2 MODIFY utf8mb3_encoding VARCHAR(10) CHARACTER SET utf8mb4; -SHOW CREATE TABLE t2; -Table Create Table -t2 CREATE TABLE `t2` ( - `u_decimal` int(11) NOT NULL, - `utf8mb3_encoding` varchar(10) CHARACTER SET utf8mb4 DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=utf8 -SELECT u_decimal,hex(utf8mb3_encoding) FROM t2; -u_decimal hex(utf8mb3_encoding) -1114111 -42856 EA9DA8 -65131 EFB9AB -DROP TABLE IF EXISTS t3; -CREATE TABLE t3 ( -u_decimal int NOT NULL, -utf8mb3_encoding VARCHAR(10) NOT NULL -) CHARACTER SET utf8 ENGINE ndb; -INSERT INTO t3 SELECT * FROM t1; -DROP TABLE IF EXISTS t4; -CREATE TABLE t4 ( -u_decimal int NOT NULL, -utf8mb4_encoding VARCHAR(10) NOT NULL -) CHARACTER SET utf8mb4 ENGINE ndb; -INSERT INTO t3 SELECT * FROM t2; -DROP TABLE t1; -DROP TABLE t2; -DROP TABLE t3; -DROP TABLE t4; -# -# Testing that mixing utf8 and utf8mb4 collations returns utf8mb4 -# -SELECT CHARSET(CONCAT(_utf8mb4'a',_utf8'b')); -CHARSET(CONCAT(_utf8mb4'a',_utf8'b')) -utf8mb4 -CREATE TABLE t1 (utf8mb4 VARCHAR(10) CHARACTER SET utf8mb4 NOT NULL) ENGINE ndb; -INSERT INTO t1 VALUES (x'ea9da8'),(x'f48fbfbf'); -SELECT CONCAT(utf8mb4, _utf8 x'ea9da8') FROM t1 LIMIT 0; -CONCAT(utf8mb4, _utf8 x'ea9da8') -CREATE TABLE t2 (utf8mb3 VARCHAR(10) CHARACTER SET utf8mb3 NOT NULL) ENGINE ndb; -INSERT INTO t2 VALUES (x'ea9da8'); -SELECT HEX(CONCAT(utf8mb4, utf8mb3)) FROM t1,t2 ORDER BY 1; -HEX(CONCAT(utf8mb4, utf8mb3)) -EA9DA8EA9DA8 -F48FBFBFEA9DA8 -SELECT CHARSET(CONCAT(utf8mb4, utf8mb3)) FROM t1, t2 LIMIT 1; -CHARSET(CONCAT(utf8mb4, utf8mb3)) -utf8mb4 -SELECT * FROM t1, t2 WHERE t1.utf8mb4 > t2.utf8mb3; -utf8mb4 utf8mb3 -ô¿¿ ê¨ -SELECT * FROM t1, t2 WHERE t1.utf8mb4 = t2.utf8mb3; -utf8mb4 utf8mb3 -ê¨ ê¨ -SELECT * FROM t1, t2 WHERE t1.utf8mb4 < t2.utf8mb3; -utf8mb4 utf8mb3 -DROP TABLE t1; -DROP TABLE t2; -# -# Check that mixing utf8mb4 with an invalid utf8 constant returns error -# -CREATE TABLE t1 (utf8mb4 VARCHAR(10) CHARACTER SET utf8mb4) ENGINE ndb; -INSERT INTO t1 VALUES (x'f48fbfbf'); -SELECT CONCAT(utf8mb4, _utf8 '¿') FROM t1; -ERROR HY000: Illegal mix of collations (utf8mb4_general_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation 'concat' -SELECT CONCAT('a', _utf8 '¿') FROM t1; -ERROR HY000: Illegal mix of collations (utf8mb4_general_ci,COERCIBLE) and (utf8_general_ci,COERCIBLE) for operation 'concat' -DROP TABLE t1; -# -# End of 5.5 tests -# -# -# End of tests -# diff --git a/mysql-test/r/func_group.result b/mysql-test/r/func_group.result index bc295ec7b44..1f6e01da0c9 100644 --- a/mysql-test/r/func_group.result +++ b/mysql-test/r/func_group.result @@ -1724,6 +1724,19 @@ m 1 DROP TABLE t1; # +# Bug#58030 crash in Item_func_geometry_from_text::val_str +# +SELECT MAX(TIMESTAMP(RAND(0))); +SELECT MIN(TIMESTAMP(RAND(0))); +# +# Bug#58177 crash and valgrind warnings in decimal and protocol sending functions... +# +SELECT MIN(GET_LOCK('aaaaaaaaaaaaaaaaa',0) / '0b1111111111111111111111111111111111111111111111111111111111111111111111111' ^ (RAND())); +SELECT MIN(GET_LOCK('aaaaaaaaaaaaaaaaa',0) / '0b1111111111111111111111111111111111111111111111111111111111111111111111111' ^ (RAND())); +SELECT MIN(GET_LOCK('aaaaaaaaaaaaaaaaa',0) / '0b1111111111111111111111111111111111111111111111111111111111111111111111111' ^ (RAND())); +SELECT MIN(GET_LOCK('aaaaaaaaaaaaaaaaa',0) / '0b1111111111111111111111111111111111111111111111111111111111111111111111111' ^ (RAND())); +SELECT RELEASE_LOCK('aaaaaaaaaaaaaaaaa'); +# End of 5.1 tests # # Bug#55648: Server crash on MIN/MAX on maximum time value diff --git a/mysql-test/r/func_math.result b/mysql-test/r/func_math.result index ac9a22a0b82..31648aae7b0 100644 --- a/mysql-test/r/func_math.result +++ b/mysql-test/r/func_math.result @@ -501,6 +501,19 @@ SHOW WARNINGS; Level Code Message Warning 1292 Truncated incorrect DECIMAL value: '' Error 1690 BIGINT value is out of range in '('123456789012345678901234567890.123456789012345678901234567890' DIV 1)' +# +# Bug#57810 case/when/then : Assertion failed: length || !scale +# +SELECT CASE(('')) WHEN (CONVERT(1, CHAR(1))) THEN (('' / 1)) END; +CASE(('')) WHEN (CONVERT(1, CHAR(1))) THEN (('' / 1)) END +NULL +CREATE TABLE t1 SELECT CAST((CASE(('')) WHEN (CONVERT(1, CHAR(1))) THEN (('' / 1)) END) AS CHAR) as C; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `C` varchar(23) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; End of 5.1 tests # # Bug #8433: Overflow must be an error diff --git a/mysql-test/r/init_file.result b/mysql-test/r/init_file.result index 43ed908ad01..6394014f3e5 100644 --- a/mysql-test/r/init_file.result +++ b/mysql-test/r/init_file.result @@ -21,4 +21,3 @@ y 11 13 drop table t1, t2; -call mtr.force_restart(); diff --git a/mysql-test/r/mysqlbinlog.result b/mysql-test/r/mysqlbinlog.result index ce83fe5b79b..0b9f6db05b8 100644 --- a/mysql-test/r/mysqlbinlog.result +++ b/mysql-test/r/mysqlbinlog.result @@ -883,3 +883,23 @@ End of 5.1 tests WARNING: The --base64-output=always flag and the --base64-output flag (with '=MODE' omitted), are deprecated. The output generated when these flags are used cannot be parsed by mysql 5.6.0 and later. The flags will be removed in a future version. Please use --base64-output=auto instead. # Expect deprecation warning again. WARNING: The --base64-output=always flag and the --base64-output flag (with '=MODE' omitted), are deprecated. The output generated when these flags are used cannot be parsed by mysql 5.6.0 and later. The flags will be removed in a future version. Please use --base64-output=auto instead. +RESET MASTER; +CREATE DATABASE test1; +USE test1; +CREATE TABLE t1(id int); +DROP DATABASE test1; +CREATE DATABASE test1; +USE test1; +CREATE TABLE t1(id int); +DROP TABLE t1; +DROP DATABASE test1; +FLUSH LOGS; +show binlog events in 'master-bin.000002' from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000002 # Query # # CREATE DATABASE test1 +master-bin.000002 # Query # # use `test1`; CREATE TABLE t1(id int) +master-bin.000002 # Query # # DROP DATABASE test1 +master-bin.000002 # Query # # CREATE DATABASE test1 +master-bin.000002 # Query # # use `test1`; CREATE TABLE t1(id int) +master-bin.000002 # Query # # use `test1`; DROP TABLE `t1` /* generated by server */ +master-bin.000002 # Query # # DROP DATABASE test1 diff --git a/mysql-test/r/mysqldump_restore.result b/mysql-test/r/mysqldump_restore.result index 16698251913..9eac8b253de 100644 --- a/mysql-test/r/mysqldump_restore.result +++ b/mysql-test/r/mysqldump_restore.result @@ -20,7 +20,7 @@ ALTER TABLE test.t1 RENAME to test.t1_orig; # Compare original and recreated tables # Recreated table: test.t1 # Original table: test.t1_orig -Comparing tables test.t1 and test.t1_orig +include/diff_tables.inc [test.t1, test.t1_orig] # Cleanup DROP TABLE test.t1, test.t1_orig; # @@ -45,7 +45,7 @@ ALTER TABLE test.t1 RENAME to test.t1_orig; # Compare original and recreated tables # Recreated table: test.t1 # Original table: test.t1_orig -Comparing tables test.t1 and test.t1_orig +include/diff_tables.inc [test.t1, test.t1_orig] # Cleanup DROP TABLE test.t1, test.t1_orig; # @@ -63,7 +63,7 @@ ALTER TABLE test.t1 RENAME to test.t1_orig; # Compare original and recreated tables # Recreated table: test.t1 # Original table: test.t1_orig -Comparing tables test.t1 and test.t1_orig +include/diff_tables.inc [test.t1, test.t1_orig] # Cleanup DROP TABLE test.t1, test.t1_orig; # @@ -82,7 +82,7 @@ ALTER TABLE test.t2 RENAME to test.t2_orig; # Compare original and recreated tables # Recreated table: test.t2 # Original table: test.t2_orig -Comparing tables test.t2 and test.t2_orig +include/diff_tables.inc [test.t2, test.t2_orig] # Cleanup DROP TABLE test.t2, test.t2_orig; DROP TABLE t1; @@ -100,7 +100,7 @@ ALTER TABLE test.t1 RENAME to test.t1_orig; # Compare original and recreated tables # Recreated table: test.t1 # Original table: test.t1_orig -Comparing tables test.t1 and test.t1_orig +include/diff_tables.inc [test.t1, test.t1_orig] # Cleanup DROP TABLE test.t1, test.t1_orig; # End tests diff --git a/mysql-test/r/rpl_mysqldump_slave.result b/mysql-test/r/rpl_mysqldump_slave.result index 2229725a61d..76caab5fcfa 100644 --- a/mysql-test/r/rpl_mysqldump_slave.result +++ b/mysql-test/r/rpl_mysqldump_slave.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] # # New --dump-slave, --apply-slave-statements functionality # @@ -15,3 +11,4 @@ START SLAVE; STOP SLAVE; CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT='MASTER_MYPORT', MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=BINLOG_START; START SLAVE; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_drop_if_exists.result b/mysql-test/suite/binlog/r/binlog_drop_if_exists.result similarity index 100% rename from mysql-test/suite/rpl/r/rpl_drop_if_exists.result rename to mysql-test/suite/binlog/r/binlog_drop_if_exists.result diff --git a/mysql-test/suite/binlog/r/binlog_old_versions.result b/mysql-test/suite/binlog/r/binlog_old_versions.result index 77289252b4c..a4850b835c8 100644 --- a/mysql-test/suite/binlog/r/binlog_old_versions.result +++ b/mysql-test/suite/binlog/r/binlog_old_versions.result @@ -1,4 +1,3 @@ -DROP TABLE IF EXISTS t1, t2, t3; ==== Read modern binlog (version 5.1.23) ==== SELECT * FROM t1 ORDER BY a; a b diff --git a/mysql-test/suite/rpl/r/rpl_binlog_query_filter_rules.result b/mysql-test/suite/binlog/r/binlog_query_filter_rules.result similarity index 100% rename from mysql-test/suite/rpl/r/rpl_binlog_query_filter_rules.result rename to mysql-test/suite/binlog/r/binlog_query_filter_rules.result diff --git a/mysql-test/suite/rpl/r/rpl_server_id.result b/mysql-test/suite/binlog/r/binlog_server_id.result similarity index 100% rename from mysql-test/suite/rpl/r/rpl_server_id.result rename to mysql-test/suite/binlog/r/binlog_server_id.result diff --git a/mysql-test/suite/rpl/r/rpl_sf.result b/mysql-test/suite/binlog/r/binlog_sf.result similarity index 100% rename from mysql-test/suite/rpl/r/rpl_sf.result rename to mysql-test/suite/binlog/r/binlog_sf.result diff --git a/mysql-test/suite/binlog/r/binlog_sql_mode.result b/mysql-test/suite/binlog/r/binlog_sql_mode.result index e306040502d..4477c94a95e 100644 --- a/mysql-test/suite/binlog/r/binlog_sql_mode.result +++ b/mysql-test/suite/binlog/r/binlog_sql_mode.result @@ -1,9 +1,3 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; SET @old_sql_mode= @@global.sql_mode; SET @old_binlog_format=@@session.binlog_format; SET SESSION sql_mode=8; @@ -27,7 +21,7 @@ DO BEGIN UPDATE t1 SET id = id +1; END;| -Chceck Result +Check Result select (@a:=load_file("MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug39526.binlog")) is not null; diff --git a/mysql-test/suite/rpl/t/rpl_drop_if_exists.test b/mysql-test/suite/binlog/t/binlog_drop_if_exists.test similarity index 100% rename from mysql-test/suite/rpl/t/rpl_drop_if_exists.test rename to mysql-test/suite/binlog/t/binlog_drop_if_exists.test diff --git a/mysql-test/suite/binlog/t/binlog_old_versions.test b/mysql-test/suite/binlog/t/binlog_old_versions.test index 0ccea406a82..b294adbc69d 100644 --- a/mysql-test/suite/binlog/t/binlog_old_versions.test +++ b/mysql-test/suite/binlog/t/binlog_old_versions.test @@ -24,9 +24,6 @@ source include/not_embedded.inc; ---disable_warnings -DROP TABLE IF EXISTS t1, t2, t3; - --echo ==== Read modern binlog (version 5.1.23) ==== @@ -161,3 +158,4 @@ DROP TABLE t1, t2, t3; #SELECT * FROM t1 ORDER BY a; #SELECT * FROM t2 ORDER BY a; #SELECT COUNT(*) FROM t3; +#--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_binlog_query_filter_rules-master.opt b/mysql-test/suite/binlog/t/binlog_query_filter_rules-master.opt similarity index 100% rename from mysql-test/suite/rpl/t/rpl_binlog_query_filter_rules-master.opt rename to mysql-test/suite/binlog/t/binlog_query_filter_rules-master.opt diff --git a/mysql-test/suite/rpl/t/rpl_binlog_query_filter_rules.test b/mysql-test/suite/binlog/t/binlog_query_filter_rules.test similarity index 100% rename from mysql-test/suite/rpl/t/rpl_binlog_query_filter_rules.test rename to mysql-test/suite/binlog/t/binlog_query_filter_rules.test diff --git a/mysql-test/suite/rpl/t/rpl_server_id.test b/mysql-test/suite/binlog/t/binlog_server_id.test similarity index 100% rename from mysql-test/suite/rpl/t/rpl_server_id.test rename to mysql-test/suite/binlog/t/binlog_server_id.test diff --git a/mysql-test/suite/rpl/t/rpl_sf.test b/mysql-test/suite/binlog/t/binlog_sf.test similarity index 94% rename from mysql-test/suite/rpl/t/rpl_sf.test rename to mysql-test/suite/binlog/t/binlog_sf.test index 4d12f3839a2..05b31afcb58 100644 --- a/mysql-test/suite/rpl/t/rpl_sf.test +++ b/mysql-test/suite/binlog/t/binlog_sf.test @@ -1,5 +1,9 @@ -- source include/have_log_bin.inc +# We change binlog format inside the test, so no need to re-run with +# more than one binlog_format. +-- source include/have_binlog_format_statement.inc + # Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR # BUG#41166 stored function requires "deterministic" if binlog_format is "statement" diff --git a/mysql-test/suite/binlog/t/binlog_sql_mode.test b/mysql-test/suite/binlog/t/binlog_sql_mode.test index 1777f8cb561..ab4f6450543 100644 --- a/mysql-test/suite/binlog/t/binlog_sql_mode.test +++ b/mysql-test/suite/binlog/t/binlog_sql_mode.test @@ -8,7 +8,6 @@ # Scan binlog file to check if the sql_mode is still set to 0 before generating binlog event # --- source include/master-slave.inc -- source include/have_log_bin.inc # BUG#39526 sql_mode not retained in binary log for CREATE PROCEDURE @@ -50,10 +49,10 @@ CREATE EVENT testEvent ON SCHEDULE END;| DELIMITER ;| ---echo Chceck Result +--echo Check Result let $MYSQLD_DATADIR= `select @@datadir`; ---exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug39526.binlog +--exec $MYSQL_BINLOG --force-if-open $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug39526.binlog --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR eval select (@a:=load_file("$MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug39526.binlog")) diff --git a/mysql-test/suite/bugs/t/rpl_bug12691.test b/mysql-test/suite/bugs/t/rpl_bug12691.test index 28d7f16935e..791cf126bfa 100644 --- a/mysql-test/suite/bugs/t/rpl_bug12691.test +++ b/mysql-test/suite/bugs/t/rpl_bug12691.test @@ -1,9 +1,6 @@ # Bug#12691: Exec_master_log_pos corrupted with SQL_SLAVE_SKIP_COUNTER -# Date: 01/31/2008 -# Added: Serge Kozlov --source include/master-slave.inc ---connection master --source include/have_binlog_format_mixed_or_statement.inc --echo @@ -47,5 +44,5 @@ SELECT COUNT(*) FROM t1; --echo --echo **** On Master **** DROP TABLE t1; ---sync_slave_with_master +--source include/rpl_end.inc diff --git a/mysql-test/suite/bugs/t/rpl_bug23533.test b/mysql-test/suite/bugs/t/rpl_bug23533.test index 397f1102f0e..337dddcef3d 100644 --- a/mysql-test/suite/bugs/t/rpl_bug23533.test +++ b/mysql-test/suite/bugs/t/rpl_bug23533.test @@ -1,7 +1,4 @@ ############################################################# -# Author: Serge Kozlov -# Date: 02/26/2008 -# Purpose: testing bug report # Bug#23533: CREATE SELECT max_binlog_cache_size test # case needed ############################################################# @@ -10,11 +7,6 @@ --source include/have_binlog_format_row.inc --source include/master-slave.inc - ---disable_warnings -DROP TABLE IF EXISTS t1,t2; ---enable_warnings - SET AUTOCOMMIT=0; SET GLOBAL max_binlog_cache_size=4096; SHOW VARIABLES LIKE 'max_binlog_cache_size'; @@ -41,3 +33,4 @@ SHOW TABLES LIKE 't%'; # 5.1 End of Test +--source include/rpl_end.inc diff --git a/mysql-test/suite/bugs/t/rpl_bug31582.test b/mysql-test/suite/bugs/t/rpl_bug31582.test index 7ba15eec8ce..6bff8ef4172 100644 --- a/mysql-test/suite/bugs/t/rpl_bug31582.test +++ b/mysql-test/suite/bugs/t/rpl_bug31582.test @@ -21,5 +21,5 @@ SELECT * FROM t1 ORDER BY a; connection master; DROP TABLE t1; -sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/bugs/t/rpl_bug31583.test b/mysql-test/suite/bugs/t/rpl_bug31583.test index 657e4984b77..ee5b7698016 100644 --- a/mysql-test/suite/bugs/t/rpl_bug31583.test +++ b/mysql-test/suite/bugs/t/rpl_bug31583.test @@ -21,5 +21,5 @@ SELECT * FROM t1 ORDER BY a; connection master; DROP TABLE t1; -sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/bugs/t/rpl_bug33029.test b/mysql-test/suite/bugs/t/rpl_bug33029.test index 494cef42ce0..f5aad4de8df 100644 --- a/mysql-test/suite/bugs/t/rpl_bug33029.test +++ b/mysql-test/suite/bugs/t/rpl_bug33029.test @@ -23,3 +23,4 @@ insert into `t1` values (); sync_slave_with_master; select * from t1; +--source include/rpl_end.inc diff --git a/mysql-test/suite/bugs/t/rpl_bug36391.test b/mysql-test/suite/bugs/t/rpl_bug36391.test index 8bca9a46c5a..3961082273d 100644 --- a/mysql-test/suite/bugs/t/rpl_bug36391.test +++ b/mysql-test/suite/bugs/t/rpl_bug36391.test @@ -15,8 +15,6 @@ --source include/master-slave.inc -drop table if exists t1; - create table t1(id int); show tables; @@ -28,3 +26,4 @@ flush logs; --exec $MYSQL_BINLOG $MYSQL_TEST_DIR/var/log/master-bin.000001 | $MYSQL test drop table t1; +--source include/rpl_end.inc diff --git a/mysql-test/suite/bugs/t/rpl_bug37426.test b/mysql-test/suite/bugs/t/rpl_bug37426.test index d2bad0fa0c1..4c7729ab837 100644 --- a/mysql-test/suite/bugs/t/rpl_bug37426.test +++ b/mysql-test/suite/bugs/t/rpl_bug37426.test @@ -1,6 +1,4 @@ ############################################################# -# Author: Mats Kindahl -# Date: 2008-06-18 # Purpose: Test for BUG#37426 # RBR breaks for CHAR() UTF8 fields > 85 chars ############################################################# @@ -20,3 +18,4 @@ SELECT * FROM char128_utf8; sync_slave_with_master; SELECT * FROM char128_utf8; +--source include/rpl_end.inc diff --git a/mysql-test/suite/bugs/t/rpl_bug38205.test b/mysql-test/suite/bugs/t/rpl_bug38205.test index 52b36636e79..550746719f4 100644 --- a/mysql-test/suite/bugs/t/rpl_bug38205.test +++ b/mysql-test/suite/bugs/t/rpl_bug38205.test @@ -163,4 +163,4 @@ start slave sql_thread; connection master; drop table t1i, t2m; -sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/funcs_1/r/is_cml_ndb.result b/mysql-test/suite/funcs_1/r/is_cml_ndb.result deleted file mode 100644 index 22f90433acf..00000000000 --- a/mysql-test/suite/funcs_1/r/is_cml_ndb.result +++ /dev/null @@ -1,98 +0,0 @@ -USE test; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 -( -f1 CHAR UNICODE, -f2 CHAR(0) UNICODE, -f3 CHAR(10) UNICODE, -f5 VARCHAR(0) UNICODE, -f6 VARCHAR(255) UNICODE, -f7 VARCHAR(260) UNICODE, -f8 TEXT UNICODE, -f9 TINYTEXT UNICODE, -f10 MEDIUMTEXT UNICODE, -f11 LONGTEXT UNICODE, -PRIMARY KEY(f1) -) ENGINE = NDB; -SELECT * FROM information_schema.columns -WHERE table_schema LIKE 'test%' -ORDER BY table_schema, table_name, column_name; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -def test t1 f1 1 NO char 1 2 NULL NULL ucs2 ucs2_general_ci char(1) PRI select,insert,update,references -def test t1 f10 9 NULL YES mediumtext 8388607 16777215 NULL NULL ucs2 ucs2_general_ci mediumtext select,insert,update,references -def test t1 f11 10 NULL YES longtext 2147483647 4294967295 NULL NULL ucs2 ucs2_general_ci longtext select,insert,update,references -def test t1 f2 2 NULL YES char 0 0 NULL NULL ucs2 ucs2_general_ci char(0) select,insert,update,references -def test t1 f3 3 NULL YES char 10 20 NULL NULL ucs2 ucs2_general_ci char(10) select,insert,update,references -def test t1 f5 4 NULL YES varchar 0 0 NULL NULL ucs2 ucs2_general_ci varchar(0) select,insert,update,references -def test t1 f6 5 NULL YES varchar 255 510 NULL NULL ucs2 ucs2_general_ci varchar(255) select,insert,update,references -def test t1 f7 6 NULL YES varchar 260 520 NULL NULL ucs2 ucs2_general_ci varchar(260) select,insert,update,references -def test t1 f8 7 NULL YES text 32767 65535 NULL NULL ucs2 ucs2_general_ci text select,insert,update,references -def test t1 f9 8 NULL YES tinytext 127 255 NULL NULL ucs2 ucs2_general_ci tinytext select,insert,update,references -########################################################################## -# Show the quotient of CHARACTER_OCTET_LENGTH and CHARACTER_MAXIMUM_LENGTH -########################################################################## -SELECT DISTINCT -CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, -DATA_TYPE, -CHARACTER_SET_NAME, -COLLATION_NAME -FROM information_schema.columns -WHERE table_schema LIKE 'test%' -AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH = 1 -ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML; -COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME -SELECT DISTINCT -CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, -DATA_TYPE, -CHARACTER_SET_NAME, -COLLATION_NAME -FROM information_schema.columns -WHERE table_schema LIKE 'test%' -AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH <> 1 -ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML; -COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME -2.0000 char ucs2 ucs2_general_ci -2.0000 longtext ucs2 ucs2_general_ci -2.0000 mediumtext ucs2 ucs2_general_ci -2.0000 text ucs2 ucs2_general_ci -2.0000 varchar ucs2 ucs2_general_ci -2.0079 tinytext ucs2 ucs2_general_ci -SELECT DISTINCT -CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, -DATA_TYPE, -CHARACTER_SET_NAME, -COLLATION_NAME -FROM information_schema.columns -WHERE table_schema LIKE 'test%' -AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH IS NULL -ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML; -COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME -NULL char ucs2 ucs2_general_ci -NULL varchar ucs2 ucs2_general_ci ---> CHAR(0) is allowed (see manual), and here both CHARACHTER_* values ---> are 0, which is intended behavior, and the result of 0 / 0 IS NULL -SELECT CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, -TABLE_SCHEMA, -TABLE_NAME, -COLUMN_NAME, -DATA_TYPE, -CHARACTER_MAXIMUM_LENGTH, -CHARACTER_OCTET_LENGTH, -CHARACTER_SET_NAME, -COLLATION_NAME, -COLUMN_TYPE -FROM information_schema.columns -WHERE table_schema LIKE 'test%' -ORDER BY TABLE_SCHEMA, TABLE_NAME, ORDINAL_POSITION; -COL_CML TABLE_SCHEMA TABLE_NAME COLUMN_NAME DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE -2.0000 test t1 f1 char 1 2 ucs2 ucs2_general_ci char(1) -NULL test t1 f2 char 0 0 ucs2 ucs2_general_ci char(0) -2.0000 test t1 f3 char 10 20 ucs2 ucs2_general_ci char(10) -NULL test t1 f5 varchar 0 0 ucs2 ucs2_general_ci varchar(0) -2.0000 test t1 f6 varchar 255 510 ucs2 ucs2_general_ci varchar(255) -2.0000 test t1 f7 varchar 260 520 ucs2 ucs2_general_ci varchar(260) -2.0000 test t1 f8 text 32767 65535 ucs2 ucs2_general_ci text -2.0079 test t1 f9 tinytext 127 255 ucs2 ucs2_general_ci tinytext -2.0000 test t1 f10 mediumtext 8388607 16777215 ucs2 ucs2_general_ci mediumtext -2.0000 test t1 f11 longtext 2147483647 4294967295 ucs2 ucs2_general_ci longtext -DROP TABLE t1; diff --git a/mysql-test/suite/funcs_1/r/is_columns_ndb.result b/mysql-test/suite/funcs_1/r/is_columns_ndb.result deleted file mode 100644 index 8a1691ec7d2..00000000000 --- a/mysql-test/suite/funcs_1/r/is_columns_ndb.result +++ /dev/null @@ -1,228 +0,0 @@ -DROP DATABASE IF EXISTS test1; -CREATE DATABASE test1; -USE test; -USE test; -USE test; -DROP TABLE IF EXISTS t1, t2, t4, t10, t11; -CREATE TABLE t1 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -ENGINE = ndb; -CREATE TABLE t2 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -ENGINE = ndb; -CREATE TABLE t4 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -ENGINE = ndb; -CREATE TABLE t10 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -ENGINE = ndb; -CREATE TABLE t11 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -ENGINE = ndb; -LOAD DATA INFILE '/std_data/funcs_1/t4.txt' INTO TABLE t1; -LOAD DATA INFILE '/std_data/funcs_1/t4.txt' INTO TABLE t2; -LOAD DATA INFILE '/std_data/funcs_1/t4.txt' INTO TABLE t4; -LOAD DATA INFILE '/std_data/funcs_1/t4.txt' INTO TABLE t10; -LOAD DATA INFILE '/std_data/funcs_1/t4.txt' INTO TABLE t11; -drop TABLE if exists t3; -CREATE TABLE t3 (f1 char(20), f2 char(20), f3 integer) ENGINE = ndb; -LOAD DATA INFILE '/std_data/funcs_1/t3.txt' INTO TABLE t3; -drop database if exists test4; -CREATE database test4; -use test4; -CREATE TABLE t6 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) -ENGINE = ndb; -LOAD DATA INFILE '/std_data/funcs_1/t4.txt' INTO TABLE t6; -use test; -drop TABLE if exists t7, t8; -CREATE TABLE t7 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = ndb; -CREATE TABLE t8 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = ndb; -LOAD DATA INFILE '/std_data/funcs_1/t7.txt' INTO TABLE t7; -Warnings: -Warning 1265 Data truncated for column 'f3' at row 1 -Warning 1265 Data truncated for column 'f3' at row 2 -Warning 1265 Data truncated for column 'f3' at row 3 -Warning 1265 Data truncated for column 'f3' at row 4 -Warning 1265 Data truncated for column 'f3' at row 5 -Warning 1265 Data truncated for column 'f3' at row 6 -Warning 1265 Data truncated for column 'f3' at row 7 -Warning 1265 Data truncated for column 'f3' at row 8 -Warning 1265 Data truncated for column 'f3' at row 9 -Warning 1265 Data truncated for column 'f3' at row 10 -LOAD DATA INFILE '/std_data/funcs_1/t7.txt' INTO TABLE t8; -Warnings: -Warning 1265 Data truncated for column 'f3' at row 1 -Warning 1265 Data truncated for column 'f3' at row 2 -Warning 1265 Data truncated for column 'f3' at row 3 -Warning 1265 Data truncated for column 'f3' at row 4 -Warning 1265 Data truncated for column 'f3' at row 5 -Warning 1265 Data truncated for column 'f3' at row 6 -Warning 1265 Data truncated for column 'f3' at row 7 -Warning 1265 Data truncated for column 'f3' at row 8 -Warning 1265 Data truncated for column 'f3' at row 9 -Warning 1265 Data truncated for column 'f3' at row 10 -drop TABLE if exists t9; -CREATE TABLE t9 (f1 int, f2 char(25), f3 int) ENGINE = ndb; -LOAD DATA INFILE '/std_data/funcs_1/t9.txt' INTO TABLE t9; -SELECT * FROM information_schema.columns -WHERE table_schema LIKE 'test%' -ORDER BY table_schema, table_name, column_name; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -def test t1 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -def test t1 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -def test t1 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -def test t1 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -def test t1 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -def test t1 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -def test t10 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -def test t10 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -def test t10 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -def test t10 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -def test t10 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -def test t10 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -def test t11 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -def test t11 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -def test t11 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -def test t11 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -def test t11 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -def test t11 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -def test t2 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -def test t2 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -def test t2 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -def test t2 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -def test t2 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -def test t2 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -def test t3 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -def test t3 f2 2 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -def test t3 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -def test t4 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -def test t4 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -def test t4 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -def test t4 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -def test t4 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -def test t4 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -def test t7 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -def test t7 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -def test t7 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -def test t7 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -def test t8 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -def test t8 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -def test t8 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -def test t8 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -def test t9 f1 1 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -def test t9 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -def test t9 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -def test4 t6 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -def test4 t6 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -def test4 t6 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -def test4 t6 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -def test4 t6 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -def test4 t6 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -########################################################################## -# Show the quotient of CHARACTER_OCTET_LENGTH and CHARACTER_MAXIMUM_LENGTH -########################################################################## -SELECT DISTINCT -CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, -DATA_TYPE, -CHARACTER_SET_NAME, -COLLATION_NAME -FROM information_schema.columns -WHERE table_schema LIKE 'test%' -AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH = 1 -ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML; -COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME -1.0000 char latin1 latin1_swedish_ci -SELECT DISTINCT -CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, -DATA_TYPE, -CHARACTER_SET_NAME, -COLLATION_NAME -FROM information_schema.columns -WHERE table_schema LIKE 'test%' -AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH <> 1 -ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML; -COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME -SELECT DISTINCT -CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, -DATA_TYPE, -CHARACTER_SET_NAME, -COLLATION_NAME -FROM information_schema.columns -WHERE table_schema LIKE 'test%' -AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH IS NULL -ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML; -COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME -NULL date NULL NULL -NULL int NULL NULL ---> CHAR(0) is allowed (see manual), and here both CHARACHTER_* values ---> are 0, which is intended behavior, and the result of 0 / 0 IS NULL -SELECT CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, -TABLE_SCHEMA, -TABLE_NAME, -COLUMN_NAME, -DATA_TYPE, -CHARACTER_MAXIMUM_LENGTH, -CHARACTER_OCTET_LENGTH, -CHARACTER_SET_NAME, -COLLATION_NAME, -COLUMN_TYPE -FROM information_schema.columns -WHERE table_schema LIKE 'test%' -ORDER BY TABLE_SCHEMA, TABLE_NAME, ORDINAL_POSITION; -COL_CML TABLE_SCHEMA TABLE_NAME COLUMN_NAME DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE -1.0000 test t1 f1 char 20 20 latin1 latin1_swedish_ci char(20) -1.0000 test t1 f2 char 25 25 latin1 latin1_swedish_ci char(25) -NULL test t1 f3 date NULL NULL NULL NULL date -NULL test t1 f4 int NULL NULL NULL NULL int(11) -1.0000 test t1 f5 char 25 25 latin1 latin1_swedish_ci char(25) -NULL test t1 f6 int NULL NULL NULL NULL int(11) -1.0000 test t10 f1 char 20 20 latin1 latin1_swedish_ci char(20) -1.0000 test t10 f2 char 25 25 latin1 latin1_swedish_ci char(25) -NULL test t10 f3 date NULL NULL NULL NULL date -NULL test t10 f4 int NULL NULL NULL NULL int(11) -1.0000 test t10 f5 char 25 25 latin1 latin1_swedish_ci char(25) -NULL test t10 f6 int NULL NULL NULL NULL int(11) -1.0000 test t11 f1 char 20 20 latin1 latin1_swedish_ci char(20) -1.0000 test t11 f2 char 25 25 latin1 latin1_swedish_ci char(25) -NULL test t11 f3 date NULL NULL NULL NULL date -NULL test t11 f4 int NULL NULL NULL NULL int(11) -1.0000 test t11 f5 char 25 25 latin1 latin1_swedish_ci char(25) -NULL test t11 f6 int NULL NULL NULL NULL int(11) -1.0000 test t2 f1 char 20 20 latin1 latin1_swedish_ci char(20) -1.0000 test t2 f2 char 25 25 latin1 latin1_swedish_ci char(25) -NULL test t2 f3 date NULL NULL NULL NULL date -NULL test t2 f4 int NULL NULL NULL NULL int(11) -1.0000 test t2 f5 char 25 25 latin1 latin1_swedish_ci char(25) -NULL test t2 f6 int NULL NULL NULL NULL int(11) -1.0000 test t3 f1 char 20 20 latin1 latin1_swedish_ci char(20) -1.0000 test t3 f2 char 20 20 latin1 latin1_swedish_ci char(20) -NULL test t3 f3 int NULL NULL NULL NULL int(11) -1.0000 test t4 f1 char 20 20 latin1 latin1_swedish_ci char(20) -1.0000 test t4 f2 char 25 25 latin1 latin1_swedish_ci char(25) -NULL test t4 f3 date NULL NULL NULL NULL date -NULL test t4 f4 int NULL NULL NULL NULL int(11) -1.0000 test t4 f5 char 25 25 latin1 latin1_swedish_ci char(25) -NULL test t4 f6 int NULL NULL NULL NULL int(11) -1.0000 test t7 f1 char 20 20 latin1 latin1_swedish_ci char(20) -1.0000 test t7 f2 char 25 25 latin1 latin1_swedish_ci char(25) -NULL test t7 f3 date NULL NULL NULL NULL date -NULL test t7 f4 int NULL NULL NULL NULL int(11) -1.0000 test t8 f1 char 20 20 latin1 latin1_swedish_ci char(20) -1.0000 test t8 f2 char 25 25 latin1 latin1_swedish_ci char(25) -NULL test t8 f3 date NULL NULL NULL NULL date -NULL test t8 f4 int NULL NULL NULL NULL int(11) -NULL test t9 f1 int NULL NULL NULL NULL int(11) -1.0000 test t9 f2 char 25 25 latin1 latin1_swedish_ci char(25) -NULL test t9 f3 int NULL NULL NULL NULL int(11) -1.0000 test4 t6 f1 char 20 20 latin1 latin1_swedish_ci char(20) -1.0000 test4 t6 f2 char 25 25 latin1 latin1_swedish_ci char(25) -NULL test4 t6 f3 date NULL NULL NULL NULL date -NULL test4 t6 f4 int NULL NULL NULL NULL int(11) -1.0000 test4 t6 f5 char 25 25 latin1 latin1_swedish_ci char(25) -NULL test4 t6 f6 int NULL NULL NULL NULL int(11) -DROP DATABASE test1; -DROP DATABASE test4; -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; -DROP TABLE test.t4; -DROP TABLE test.t7; -DROP TABLE test.t8; -DROP TABLE test.t9; -DROP TABLE test.t10; -DROP TABLE test.t11; diff --git a/mysql-test/suite/funcs_1/r/is_engines_ndb.result b/mysql-test/suite/funcs_1/r/is_engines_ndb.result deleted file mode 100644 index 238609fc09e..00000000000 --- a/mysql-test/suite/funcs_1/r/is_engines_ndb.result +++ /dev/null @@ -1,8 +0,0 @@ -SELECT * FROM information_schema.engines -WHERE ENGINE = 'ndbcluster'; -ENGINE ndbcluster -SUPPORT YES -COMMENT Clustered, fault-tolerant tables -TRANSACTIONS YES -XA NO -SAVEPOINTS NO diff --git a/mysql-test/suite/funcs_1/r/is_tables_ndb.result b/mysql-test/suite/funcs_1/r/is_tables_ndb.result deleted file mode 100644 index fe737a676ad..00000000000 --- a/mysql-test/suite/funcs_1/r/is_tables_ndb.result +++ /dev/null @@ -1,167 +0,0 @@ -DROP DATABASE IF EXISTS test1; -DROP DATABASE IF EXISTS test2; -CREATE DATABASE test1; -CREATE DATABASE test2; -CREATE TABLE test1.t1 (f1 VARCHAR(20)) ENGINE = ; -CREATE TABLE test1.t2 (f1 VARCHAR(20)) ENGINE = ; -CREATE TABLE test2.t1 (f1 VARCHAR(20)) ENGINE = ; -SELECT *, -LEFT( table_comment, -IF(INSTR(table_comment,'InnoDB free') = 0 -AND INSTR(table_comment,'number_of_replicas') = 0, -LENGTH(table_comment), -INSTR(table_comment,'InnoDB free') -+ INSTR(table_comment,'number_of_replicas') - 1)) -AS "user_comment", -'-----------------------------------------------------' AS "Separator" -FROM information_schema.tables -WHERE table_schema LIKE 'test%' AND table_type = 'BASE TABLE' -ORDER BY table_schema,table_name; -TABLE_CATALOG def -TABLE_SCHEMA test1 -TABLE_NAME t1 -TABLE_TYPE BASE TABLE -ENGINE ndbcluster -VERSION 10 -ROW_FORMAT Dynamic -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG def -TABLE_SCHEMA test1 -TABLE_NAME t2 -TABLE_TYPE BASE TABLE -ENGINE ndbcluster -VERSION 10 -ROW_FORMAT Dynamic -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG def -TABLE_SCHEMA test2 -TABLE_NAME t1 -TABLE_TYPE BASE TABLE -ENGINE ndbcluster -VERSION 10 -ROW_FORMAT Dynamic -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -SHOW TABLES FROM test1; -Tables_in_test1 -t1 -t2 -SHOW TABLES FROM test2; -Tables_in_test2 -t1 -DROP USER testuser1@localhost; -CREATE USER testuser1@localhost; -GRANT SELECT ON test1.* TO testuser1@localhost; -# Establish connection testuser1 (user=testuser1) -SELECT *, -LEFT( table_comment, -IF(INSTR(table_comment,'InnoDB free') = 0 -AND INSTR(table_comment,'number_of_replicas') = 0, -LENGTH(table_comment), -INSTR(table_comment,'InnoDB free') -+ INSTR(table_comment,'number_of_replicas') - 1)) -AS "user_comment", -'-----------------------------------------------------' AS "Separator" -FROM information_schema.tables -WHERE table_schema LIKE 'test%' AND table_type = 'BASE TABLE' -ORDER BY table_schema,table_name; -TABLE_CATALOG def -TABLE_SCHEMA test1 -TABLE_NAME t1 -TABLE_TYPE BASE TABLE -ENGINE ndbcluster -VERSION 10 -ROW_FORMAT Dynamic -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG def -TABLE_SCHEMA test1 -TABLE_NAME t2 -TABLE_TYPE BASE TABLE -ENGINE ndbcluster -VERSION 10 -ROW_FORMAT Dynamic -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -SHOW TABLES FROM test1; -Tables_in_test1 -t1 -t2 -SHOW TABLES FROM test2; -ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'test2' -# Switch to connection default and close connection testuser1 -DROP USER testuser1@localhost; -DROP DATABASE test1; -DROP DATABASE test2; diff --git a/mysql-test/suite/funcs_1/r/ndb_bitdata.result b/mysql-test/suite/funcs_1/r/ndb_bitdata.result deleted file mode 100644 index 917157fcdae..00000000000 --- a/mysql-test/suite/funcs_1/r/ndb_bitdata.result +++ /dev/null @@ -1,3 +0,0 @@ - -NOT YET IMPLEMENTED: bitdata tests --------------------------------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/r/ndb_cursors.result b/mysql-test/suite/funcs_1/r/ndb_cursors.result deleted file mode 100644 index 9f20e51204b..00000000000 --- a/mysql-test/suite/funcs_1/r/ndb_cursors.result +++ /dev/null @@ -1,3 +0,0 @@ - -NOT YET IMPLEMENTED: cursor tests --------------------------------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/r/ndb_func_view.result b/mysql-test/suite/funcs_1/r/ndb_func_view.result deleted file mode 100644 index e788dfd9fc1..00000000000 --- a/mysql-test/suite/funcs_1/r/ndb_func_view.result +++ /dev/null @@ -1,5294 +0,0 @@ -DROP TABLE IF EXISTS t1_selects, t1_modes, t1_values; -DROP VIEW IF EXISTS v1; -CREATE TABLE t1_values -( -id BIGINT AUTO_INCREMENT, -select_id BIGINT, -PRIMARY KEY(id) -) ENGINE = ; -ALTER TABLE t1_values ADD my_char_30 CHAR(30); -ALTER TABLE t1_values ADD my_varchar_1000 VARCHAR(1000); -ALTER TABLE t1_values ADD my_binary_30 BINARY(30); -ALTER TABLE t1_values ADD my_varbinary_1000 VARBINARY(1000); -ALTER TABLE t1_values ADD my_datetime DATETIME; -ALTER TABLE t1_values ADD my_date DATE; -ALTER TABLE t1_values ADD ts_dummy TIMESTAMP; -ALTER TABLE t1_values ADD my_timestamp TIMESTAMP; -ALTER TABLE t1_values ADD my_time TIME; -ALTER TABLE t1_values ADD my_year YEAR; -ALTER TABLE t1_values ADD my_bigint BIGINT; -ALTER TABLE t1_values ADD my_double DOUBLE; -ALTER TABLE t1_values ADD my_decimal DECIMAL(64,30); -SET sql_mode = 'traditional'; -INSERT INTO t1_values SET id = 0; -INSERT INTO t1_values SET -my_char_30 = '', -my_varchar_1000 = '', -my_binary_30 = '', -my_varbinary_1000 = '', -my_datetime = '0001-01-01 00:00:00', -my_date = '0001-01-01', -my_timestamp = '1970-01-01 03:00:01', -my_time = '-838:59:59', -my_year = '1901', -my_bigint = -9223372036854775808, -my_decimal = -9999999999999999999999999999999999.999999999999999999999999999999 , -my_double = -1.7976931348623E+308; -INSERT INTO t1_values SET -my_char_30 = '<--------30 characters------->', -my_varchar_1000 = CONCAT('<---------1000 characters', -RPAD('',965,'-'),'--------->'), -my_binary_30 = '<--------30 characters------->', -my_varbinary_1000 = CONCAT('<---------1000 characters', -RPAD('',965,'-'),'--------->'), -my_datetime = '9999-12-31 23:59:59', -my_date = '9999-12-31', -my_timestamp = '2038-01-01 02:59:59', -my_time = '838:59:59', -my_year = 2155, -my_bigint = 9223372036854775807, -my_decimal = +9999999999999999999999999999999999.999999999999999999999999999999 , -my_double = 1.7976931348623E+308; -INSERT INTO t1_values SET -my_char_30 = ' ---äÖüß@µ*$-- ', -my_varchar_1000 = ' ---äÖüß@µ*$-- ', -my_binary_30 = ' ---äÖüß@µ*$-- ', -my_varbinary_1000 = ' ---äÖüß@µ*$-- ', -my_datetime = '2004-02-29 23:59:59', -my_date = '2004-02-29', -my_timestamp = '2004-02-29 23:59:59', -my_time = '13:00:00', -my_year = 2000, -my_bigint = 0, -my_decimal = 0.0, -my_double = 0; -INSERT INTO t1_values SET -my_char_30 = '-1', -my_varchar_1000 = '-1', -my_binary_30 = '-1', -my_varbinary_1000 = '-1', -my_datetime = '2005-06-28 10:00:00', -my_date = '2005-06-28', -my_timestamp = '2005-06-28 10:00:00', -my_time = '10:00:00', -my_year = 2005, -my_bigint = -1, -my_decimal = -1.000000000000000000000000000000, -my_double = -0.1E+1; -PREPARE ins_sel_with_result FROM "INSERT INTO t1_selects SET my_select = @my_select, -disable_result = 'No'" ; -PREPARE ins_sel_no_result FROM "INSERT INTO t1_selects SET my_select = @my_select, -disable_result = 'Yes'" ; -SET sql_mode = 'traditional'; -SET @my_select = 'SELECT sqrt(my_bigint), my_bigint, id FROM t1_values'; -INSERT INTO t1_values SET select_id = @select_id, -my_bigint = 4; -INSERT INTO t1_values SET select_id = @select_id, -my_bigint = -25; -##### 1.1.1. CAST --> BINARY -##### 1.1.2. CAST --> CHAR -##### 1.1.3. CAST --> DATE -INSERT INTO t1_values SET select_id = @select_id, -my_char_30 = '2005-06-27'; -INSERT INTO t1_values SET select_id = @select_id, -my_varchar_1000 = '2005-06-27'; -INSERT INTO t1_values SET select_id = @select_id, -my_binary_30 = '2005-06-27'; -INSERT INTO t1_values SET select_id = @select_id, -my_varbinary_1000 = '2005-06-27'; -INSERT INTO t1_values SET select_id = @select_id, -my_bigint = 20050627; -INSERT INTO t1_values SET select_id = @select_id, -my_double = +20.050627E+6; -##### 1.1.4. CAST --> DATETIME -INSERT INTO t1_values SET select_id = @select_id, -my_char_30 = '2005-06-27 17:58'; -INSERT INTO t1_values SET select_id = @select_id, -my_varchar_1000 = '2005-06-27 17:58'; -INSERT INTO t1_values SET select_id = @select_id, -my_binary_30 = '2005-06-27 17:58'; -INSERT INTO t1_values SET select_id = @select_id, -my_varbinary_1000 = '2005-06-27 17:58'; -INSERT INTO t1_values SET select_id = @select_id, -my_bigint = 200506271758; -INSERT INTO t1_values SET select_id = @select_id, -my_double = +0.0200506271758E+13; -##### 1.1.5. CAST --> TIME -INSERT INTO t1_values SET select_id = @select_id, -my_char_30 = '1 17:58'; -INSERT INTO t1_values SET select_id = @select_id, -my_varchar_1000 = '1 17:58'; -INSERT INTO t1_values SET select_id = @select_id, -my_binary_30 = '1 17:58'; -INSERT INTO t1_values SET select_id = @select_id, -my_varbinary_1000 = '1 17:58'; -INSERT INTO t1_values SET select_id = @select_id, -my_bigint = 1758; -INSERT INTO t1_values SET select_id = @select_id, -my_double = +1.758E+3; -##### 1.1.6. CAST --> DECIMAL -INSERT INTO t1_values SET select_id = @select_id, -my_char_30 = '-3333.3333'; -INSERT INTO t1_values SET select_id = @select_id, -my_varchar_1000 = '-3333.3333'; -INSERT INTO t1_values SET select_id = @select_id, -my_binary_30 = '-3333.3333'; -INSERT INTO t1_values SET select_id = @select_id, -my_varbinary_1000 = '-3333.3333'; -INSERT INTO t1_values SET select_id = @select_id, -my_double = -0.33333333E+4; -##### 1.1.7. CAST --> SIGNED INTEGER - -"Attention: CAST --> SIGNED INTEGER - Bug#5913 Traditional mode: BIGINT range not correctly delimited - Status: To be fixed later" --------------------------------------------------------------------------------- -##### 1.1.8. CAST --> UNSIGNED INTEGER - -"Attention: CAST --> UNSIGNED INTEGER - The file with expected results suffers from Bug 5913" --------------------------------------------------------------------------------- - -some statements disabled because of -Bug#5913 Traditional mode: BIGINT range not correctly delimited --------------------------------------------------------------------------------- -SET @my_select = 'SELECT CONVERT(my_char_30 USING utf8), -my_char_30, id FROM t1_values'; -SET @my_select = 'SELECT CONVERT(my_varchar_1000 USING utf8), -my_varchar_1000, id FROM t1_values'; -SET @my_select = 'SELECT CONVERT(my_binary_30 USING utf8), -my_binary_30, id FROM t1_values'; -SET @my_select = 'SELECT CONVERT(my_varbinary_1000 USING utf8), -my_varbinary_1000, id FROM t1_values'; -SET @my_select = 'SELECT CONVERT(my_char_30 USING koi8r), -my_char_30, id FROM t1_values'; -SET @my_select = 'SELECT CONVERT(my_varchar_1000 USING koi8r), -my_varchar_1000, id FROM t1_values'; -SET @my_select = 'SELECT CONVERT(my_binary_30 USING koi8r), -my_binary_30, id FROM t1_values'; -SET @my_select = 'SELECT CONVERT(my_varbinary_1000 USING koi8r), -my_varbinary_1000, id FROM t1_values'; -SET @my_select = 'SELECT BIT_LENGTH(my_char_30), -my_char_30, id FROM t1_values'; -SET @my_select = 'SELECT BIT_LENGTH(my_varchar_1000), -my_varchar_1000, id FROM t1_values'; -SET @my_select = 'SELECT BIT_LENGTH(my_binary_30), -my_binary_30, id FROM t1_values'; -SET @my_select = 'SELECT BIT_LENGTH(my_varbinary_1000), -my_varbinary_1000, id FROM t1_values'; -SET @my_select = 'SELECT INSTR(my_char_30, ''char''), -my_char_30, id FROM t1_values'; -SET @my_select = 'SELECT LCASE(my_varchar_1000), -my_varchar_1000, id FROM t1_values'; -SET @my_select = -'SELECT LEFT(my_char_30, 2), my_char_30, id FROM t1_values'; -SET @my_select = -'SELECT LEFT(my_varchar_1000, 2), my_varchar_1000, id FROM t1_values'; -SET @my_select = -'SELECT LEFT(my_binary_30, 2), my_binary_30, id FROM t1_values'; -SET @my_select = -'SELECT LEFT(my_varbinary_1000, 2), my_varbinary_1000, id FROM t1_values'; -SET @my_select = -'SELECT LEFT(''AaBbCcDdEeFfGgHhIiJjÄäÜüÖö'', my_bigint), my_bigint, id FROM t1_values'; -SET @my_select = -'SELECT LEFT(''AaBbCcDdEeFfGgHhIiJjÄäÜüÖö'', my_decimal), my_decimal, id FROM t1_values'; -SET @my_select = -'SELECT LEFT(''AaBbCcDdEeFfGgHhIiJjÄäÜüÖö'', my_double), my_double, id FROM t1_values'; -SET @my_select = 'SELECT LENGTH(my_char_30), -my_char_30, id FROM t1_values'; -SET @my_select = 'SELECT LENGTH(my_varchar_1000), -my_varchar_1000, id FROM t1_values'; -SET @my_select = 'SELECT LENGTH(my_binary_30), -my_binary_30, id FROM t1_values'; -SET @my_select = 'SELECT LENGTH(my_varbinary_1000), -my_varbinary_1000, id FROM t1_values'; -SET @my_select = -'SELECT LOAD_FILE(''/std_data/funcs_1/load_file.txt'') - AS my_col, - id FROM t1_values'; -SET @my_select = 'SELECT LOCATE(''char'', my_char_30), -my_char_30, id FROM t1_values'; -SET @my_select = 'SELECT LOCATE(''char'', my_varchar_1000), -my_varchar_1000, id FROM t1_values'; -SET @my_select = 'SELECT LOCATE(''char'', my_binary_30), -my_binary_30, id FROM t1_values'; -SET @my_select = 'SELECT LOCATE(''char'', my_varbinary_1000), -my_varbinary_1000, id FROM t1_values'; -SET @my_select = 'SELECT LOCATE(my_char_30, my_char_30 ), -my_char_30, id FROM t1_values'; -SET @my_select = 'SELECT LOCATE(my_char_30, my_varchar_1000 ), -my_char_30, my_varchar_1000 id FROM t1_values'; -SET @my_select = 'SELECT LOCATE(my_char_30, my_binary_30 ), -my_char_30, my_binary_30 id FROM t1_values'; -SET @my_select = 'SELECT LOCATE(my_char_30, my_varbinary_1000 ), -my_char_30, my_varbinary_1000 id FROM t1_values'; -SET @my_select = 'SELECT LOCATE(my_varchar_1000, my_varchar_1000 ), -my_varchar_1000, id FROM t1_values'; -SET @my_select = 'SELECT LOCATE(my_varchar_1000, my_char_30 ), -my_varchar_1000, my_char_30 id FROM t1_values'; -SET @my_select = 'SELECT LOCATE(my_varchar_1000, my_binary_30 ), -my_varchar_1000, my_binary_30 id FROM t1_values'; -SET @my_select = 'SELECT LOCATE(my_varchar_1000, my_varbinary_1000 ), -my_varchar_1000, my_varbinary_1000 id FROM t1_values'; -SET @my_select = 'SELECT LOCATE(my_binary_30, my_binary_30 ), -my_binary_30, id FROM t1_values'; -SET @my_select = 'SELECT LOCATE(my_binary_30, my_char_30 ), -my_binary_30, my_char_30 id FROM t1_values'; -SET @my_select = 'SELECT LOCATE(my_binary_30, my_varchar_1000 ), -my_binary_30, my_varchar_1000 id FROM t1_values'; -SET @my_select = 'SELECT LOCATE(my_binary_30, my_varbinary_1000 ), -my_binary_30, my_varbinary_1000 id FROM t1_values'; -SET @my_select = 'SELECT LOCATE(my_varbinary_1000, my_varbinary_1000 ), -my_varbinary_1000, id FROM t1_values'; -SET @my_select = 'SELECT LOCATE(my_varbinary_1000, my_char_30 ), -my_varbinary_1000, my_char_30 id FROM t1_values'; -SET @my_select = 'SELECT LOCATE(my_varbinary_1000, my_varchar_1000 ), -my_varbinary_1000, my_varchar_1000 id FROM t1_values'; -SET @my_select = 'SELECT LOCATE(my_varbinary_1000, my_binary_30 ), -my_varbinary_1000, my_binary_30 id FROM t1_values'; -SET @my_select = 'SELECT LOCATE(''-'', my_char_30, 3), -my_char_30, id FROM t1_values'; -SET @my_select = 'SELECT LOCATE(''-'', my_varchar_1000, 3), -my_varchar_1000, id FROM t1_values'; -SET @my_select = 'SELECT LOCATE(''-'', my_binary_30, 3), -my_binary_30, id FROM t1_values'; -SET @my_select = 'SELECT LOCATE(''-'', my_varbinary_1000, 3), -my_varbinary_1000, id FROM t1_values'; -SET @my_select = 'SELECT LOCATE(''-'', '' - -ABC'', my_bigint), -my_bigint, id FROM t1_values'; -SET @my_select = 'SELECT LOCATE(''-'', '' - -ABC'', my_double), -my_double, id FROM t1_values'; -SET @my_select = 'SELECT LOCATE(''-'', '' - -ABC'', my_decimal), -my_decimal, id FROM t1_values'; -SET @my_select = 'SELECT LOWER(my_char_30), -my_char_30, id FROM t1_values'; -SET @my_select = 'SELECT LOWER(my_varchar_1000), -my_varchar_1000, id FROM t1_values'; -SET @my_select = 'SELECT LOWER(my_binary_30), -my_binary_30, id FROM t1_values'; -SET @my_select = 'SELECT LOWER(my_varbinary_1000), -my_varbinary_1000, id FROM t1_values'; -SET @my_select = 'SELECT LTRIM(my_char_30), -my_char_30, id FROM t1_values'; -SET @my_select = 'SELECT LTRIM(my_varchar_1000), -my_varchar_1000, id FROM t1_values'; -SET @my_select = 'SELECT LTRIM(my_binary_30), -my_binary_30, id FROM t1_values'; -SET @my_select = 'SELECT LTRIM(my_varbinary_1000), -my_varbinary_1000, id FROM t1_values'; -SET @my_select = -'SELECT CONCAT(''A'',my_char_30), my_char_30, id FROM t1_values'; -SET @my_select = 'SELECT my_char_30, id FROM t1_values'; -INSERT INTO t1_values SET select_id = @select_id, -my_char_30 = 'Viana do Castelo'; -SET sql_mode = ''; - -"# The basic preparations end and the main test starts here" --------------------------------------------------------------------------------- -CREATE VIEW v1 AS SELECT my_char_30, id FROM t1_values; -SELECT my_char_30, id FROM t1_values -WHERE select_id = 193 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 193 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CONCAT('A',my_char_30), my_char_30, id FROM t1_values; -SELECT CONCAT('A',my_char_30), my_char_30, id FROM t1_values -WHERE select_id = 192 OR select_id IS NULL order by id; -CONCAT('A',my_char_30) my_char_30 id -NULL NULL 1 -A 2 -A<--------30 characters-------> <--------30 characters-------> 3 -A ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 -A-1 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select concat('A',`t1_values`.`my_char_30`) AS `CONCAT('A',my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 192 OR select_id IS NULL) order by id; -CONCAT('A',my_char_30) my_char_30 id -NULL NULL 1 -A 2 -A<--------30 characters-------> <--------30 characters-------> 3 -A ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 -A-1 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LTRIM(my_varbinary_1000), -my_varbinary_1000, id FROM t1_values; -SELECT LTRIM(my_varbinary_1000), -my_varbinary_1000, id FROM t1_values -WHERE select_id = 191 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ltrim(`t1_values`.`my_varbinary_1000`) AS `LTRIM(my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 191 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LTRIM(my_binary_30), -my_binary_30, id FROM t1_values; -SELECT LTRIM(my_binary_30), -my_binary_30, id FROM t1_values -WHERE select_id = 190 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ltrim(`t1_values`.`my_binary_30`) AS `LTRIM(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 190 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LTRIM(my_varchar_1000), -my_varchar_1000, id FROM t1_values; -SELECT LTRIM(my_varchar_1000), -my_varchar_1000, id FROM t1_values -WHERE select_id = 189 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ltrim(`t1_values`.`my_varchar_1000`) AS `LTRIM(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 189 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LTRIM(my_char_30), -my_char_30, id FROM t1_values; -SELECT LTRIM(my_char_30), -my_char_30, id FROM t1_values -WHERE select_id = 188 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ltrim(`t1_values`.`my_char_30`) AS `LTRIM(my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 188 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LOWER(my_varbinary_1000), -my_varbinary_1000, id FROM t1_values; -SELECT LOWER(my_varbinary_1000), -my_varbinary_1000, id FROM t1_values -WHERE select_id = 187 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_varbinary_1000`) AS `LOWER(my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 187 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LOWER(my_binary_30), -my_binary_30, id FROM t1_values; -SELECT LOWER(my_binary_30), -my_binary_30, id FROM t1_values -WHERE select_id = 186 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_binary_30`) AS `LOWER(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 186 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LOWER(my_varchar_1000), -my_varchar_1000, id FROM t1_values; -SELECT LOWER(my_varchar_1000), -my_varchar_1000, id FROM t1_values -WHERE select_id = 185 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_varchar_1000`) AS `LOWER(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 185 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LOWER(my_char_30), -my_char_30, id FROM t1_values; -SELECT LOWER(my_char_30), -my_char_30, id FROM t1_values -WHERE select_id = 184 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_char_30`) AS `LOWER(my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 184 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LOCATE('-', ' - -ABC', my_decimal), -my_decimal, id FROM t1_values; -SELECT LOCATE('-', ' - -ABC', my_decimal), -my_decimal, id FROM t1_values -WHERE select_id = 183 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('-',' - -ABC',`t1_values`.`my_decimal`) AS `LOCATE('-', ' - -ABC', my_decimal)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 183 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LOCATE('-', ' - -ABC', my_double), -my_double, id FROM t1_values; -SELECT LOCATE('-', ' - -ABC', my_double), -my_double, id FROM t1_values -WHERE select_id = 182 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('-',' - -ABC',`t1_values`.`my_double`) AS `LOCATE('-', ' - -ABC', my_double)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 182 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LOCATE('-', ' - -ABC', my_bigint), -my_bigint, id FROM t1_values; -SELECT LOCATE('-', ' - -ABC', my_bigint), -my_bigint, id FROM t1_values -WHERE select_id = 181 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('-',' - -ABC',`t1_values`.`my_bigint`) AS `LOCATE('-', ' - -ABC', my_bigint)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 181 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LOCATE('-', my_varbinary_1000, 3), -my_varbinary_1000, id FROM t1_values; -SELECT LOCATE('-', my_varbinary_1000, 3), -my_varbinary_1000, id FROM t1_values -WHERE select_id = 180 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('-',`t1_values`.`my_varbinary_1000`,3) AS `LOCATE('-', my_varbinary_1000, 3)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 180 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LOCATE('-', my_binary_30, 3), -my_binary_30, id FROM t1_values; -SELECT LOCATE('-', my_binary_30, 3), -my_binary_30, id FROM t1_values -WHERE select_id = 179 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('-',`t1_values`.`my_binary_30`,3) AS `LOCATE('-', my_binary_30, 3)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 179 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LOCATE('-', my_varchar_1000, 3), -my_varchar_1000, id FROM t1_values; -SELECT LOCATE('-', my_varchar_1000, 3), -my_varchar_1000, id FROM t1_values -WHERE select_id = 178 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('-',`t1_values`.`my_varchar_1000`,3) AS `LOCATE('-', my_varchar_1000, 3)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 178 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LOCATE('-', my_char_30, 3), -my_char_30, id FROM t1_values; -SELECT LOCATE('-', my_char_30, 3), -my_char_30, id FROM t1_values -WHERE select_id = 177 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('-',`t1_values`.`my_char_30`,3) AS `LOCATE('-', my_char_30, 3)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 177 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LOCATE(my_varbinary_1000, my_binary_30 ), -my_varbinary_1000, my_binary_30 id FROM t1_values; -SELECT LOCATE(my_varbinary_1000, my_binary_30 ), -my_varbinary_1000, my_binary_30 id FROM t1_values -WHERE select_id = 176 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varbinary_1000`,`t1_values`.`my_binary_30`) AS `LOCATE(my_varbinary_1000, my_binary_30 )`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`my_binary_30` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 176 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LOCATE(my_varbinary_1000, my_varchar_1000 ), -my_varbinary_1000, my_varchar_1000 id FROM t1_values; -SELECT LOCATE(my_varbinary_1000, my_varchar_1000 ), -my_varbinary_1000, my_varchar_1000 id FROM t1_values -WHERE select_id = 175 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varbinary_1000`,`t1_values`.`my_varchar_1000`) AS `LOCATE(my_varbinary_1000, my_varchar_1000 )`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`my_varchar_1000` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 175 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LOCATE(my_varbinary_1000, my_char_30 ), -my_varbinary_1000, my_char_30 id FROM t1_values; -SELECT LOCATE(my_varbinary_1000, my_char_30 ), -my_varbinary_1000, my_char_30 id FROM t1_values -WHERE select_id = 174 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varbinary_1000`,`t1_values`.`my_char_30`) AS `LOCATE(my_varbinary_1000, my_char_30 )`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`my_char_30` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 174 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LOCATE(my_varbinary_1000, my_varbinary_1000 ), -my_varbinary_1000, id FROM t1_values; -SELECT LOCATE(my_varbinary_1000, my_varbinary_1000 ), -my_varbinary_1000, id FROM t1_values -WHERE select_id = 173 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varbinary_1000`,`t1_values`.`my_varbinary_1000`) AS `LOCATE(my_varbinary_1000, my_varbinary_1000 )`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 173 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LOCATE(my_binary_30, my_varbinary_1000 ), -my_binary_30, my_varbinary_1000 id FROM t1_values; -SELECT LOCATE(my_binary_30, my_varbinary_1000 ), -my_binary_30, my_varbinary_1000 id FROM t1_values -WHERE select_id = 172 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_binary_30`,`t1_values`.`my_varbinary_1000`) AS `LOCATE(my_binary_30, my_varbinary_1000 )`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`my_varbinary_1000` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 172 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LOCATE(my_binary_30, my_varchar_1000 ), -my_binary_30, my_varchar_1000 id FROM t1_values; -SELECT LOCATE(my_binary_30, my_varchar_1000 ), -my_binary_30, my_varchar_1000 id FROM t1_values -WHERE select_id = 171 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_binary_30`,`t1_values`.`my_varchar_1000`) AS `LOCATE(my_binary_30, my_varchar_1000 )`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`my_varchar_1000` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 171 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LOCATE(my_binary_30, my_char_30 ), -my_binary_30, my_char_30 id FROM t1_values; -SELECT LOCATE(my_binary_30, my_char_30 ), -my_binary_30, my_char_30 id FROM t1_values -WHERE select_id = 170 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_binary_30`,`t1_values`.`my_char_30`) AS `LOCATE(my_binary_30, my_char_30 )`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`my_char_30` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 170 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LOCATE(my_binary_30, my_binary_30 ), -my_binary_30, id FROM t1_values; -SELECT LOCATE(my_binary_30, my_binary_30 ), -my_binary_30, id FROM t1_values -WHERE select_id = 169 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_binary_30`,`t1_values`.`my_binary_30`) AS `LOCATE(my_binary_30, my_binary_30 )`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 169 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LOCATE(my_varchar_1000, my_varbinary_1000 ), -my_varchar_1000, my_varbinary_1000 id FROM t1_values; -SELECT LOCATE(my_varchar_1000, my_varbinary_1000 ), -my_varchar_1000, my_varbinary_1000 id FROM t1_values -WHERE select_id = 168 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varchar_1000`,`t1_values`.`my_varbinary_1000`) AS `LOCATE(my_varchar_1000, my_varbinary_1000 )`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`my_varbinary_1000` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 168 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LOCATE(my_varchar_1000, my_binary_30 ), -my_varchar_1000, my_binary_30 id FROM t1_values; -SELECT LOCATE(my_varchar_1000, my_binary_30 ), -my_varchar_1000, my_binary_30 id FROM t1_values -WHERE select_id = 167 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varchar_1000`,`t1_values`.`my_binary_30`) AS `LOCATE(my_varchar_1000, my_binary_30 )`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`my_binary_30` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 167 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LOCATE(my_varchar_1000, my_char_30 ), -my_varchar_1000, my_char_30 id FROM t1_values; -SELECT LOCATE(my_varchar_1000, my_char_30 ), -my_varchar_1000, my_char_30 id FROM t1_values -WHERE select_id = 166 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varchar_1000`,`t1_values`.`my_char_30`) AS `LOCATE(my_varchar_1000, my_char_30 )`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`my_char_30` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 166 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LOCATE(my_varchar_1000, my_varchar_1000 ), -my_varchar_1000, id FROM t1_values; -SELECT LOCATE(my_varchar_1000, my_varchar_1000 ), -my_varchar_1000, id FROM t1_values -WHERE select_id = 165 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varchar_1000`,`t1_values`.`my_varchar_1000`) AS `LOCATE(my_varchar_1000, my_varchar_1000 )`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 165 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LOCATE(my_char_30, my_varbinary_1000 ), -my_char_30, my_varbinary_1000 id FROM t1_values; -SELECT LOCATE(my_char_30, my_varbinary_1000 ), -my_char_30, my_varbinary_1000 id FROM t1_values -WHERE select_id = 164 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_char_30`,`t1_values`.`my_varbinary_1000`) AS `LOCATE(my_char_30, my_varbinary_1000 )`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`my_varbinary_1000` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 164 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LOCATE(my_char_30, my_binary_30 ), -my_char_30, my_binary_30 id FROM t1_values; -SELECT LOCATE(my_char_30, my_binary_30 ), -my_char_30, my_binary_30 id FROM t1_values -WHERE select_id = 163 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_char_30`,`t1_values`.`my_binary_30`) AS `LOCATE(my_char_30, my_binary_30 )`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`my_binary_30` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 163 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LOCATE(my_char_30, my_varchar_1000 ), -my_char_30, my_varchar_1000 id FROM t1_values; -SELECT LOCATE(my_char_30, my_varchar_1000 ), -my_char_30, my_varchar_1000 id FROM t1_values -WHERE select_id = 162 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_char_30`,`t1_values`.`my_varchar_1000`) AS `LOCATE(my_char_30, my_varchar_1000 )`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`my_varchar_1000` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 162 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LOCATE(my_char_30, my_char_30 ), -my_char_30, id FROM t1_values; -SELECT LOCATE(my_char_30, my_char_30 ), -my_char_30, id FROM t1_values -WHERE select_id = 161 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_char_30`,`t1_values`.`my_char_30`) AS `LOCATE(my_char_30, my_char_30 )`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 161 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LOCATE('char', my_varbinary_1000), -my_varbinary_1000, id FROM t1_values; -SELECT LOCATE('char', my_varbinary_1000), -my_varbinary_1000, id FROM t1_values -WHERE select_id = 160 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('char',`t1_values`.`my_varbinary_1000`) AS `LOCATE('char', my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 160 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LOCATE('char', my_binary_30), -my_binary_30, id FROM t1_values; -SELECT LOCATE('char', my_binary_30), -my_binary_30, id FROM t1_values -WHERE select_id = 159 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('char',`t1_values`.`my_binary_30`) AS `LOCATE('char', my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 159 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LOCATE('char', my_varchar_1000), -my_varchar_1000, id FROM t1_values; -SELECT LOCATE('char', my_varchar_1000), -my_varchar_1000, id FROM t1_values -WHERE select_id = 158 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('char',`t1_values`.`my_varchar_1000`) AS `LOCATE('char', my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 158 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LOCATE('char', my_char_30), -my_char_30, id FROM t1_values; -SELECT LOCATE('char', my_char_30), -my_char_30, id FROM t1_values -WHERE select_id = 157 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('char',`t1_values`.`my_char_30`) AS `LOCATE('char', my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 157 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LOAD_FILE('/std_data/funcs_1/load_file.txt') - AS my_col, - id FROM t1_values; -SELECT LOAD_FILE('/std_data/funcs_1/load_file.txt') - AS my_col, - id FROM t1_values -WHERE select_id = 156 OR select_id IS NULL order by id; -my_col id -Here is content from load_file - 1 -Here is content from load_file - 2 -Here is content from load_file - 3 -Here is content from load_file - 4 -Here is content from load_file - 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select load_file('/std_data/funcs_1/load_file.txt') AS `my_col`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 156 OR select_id IS NULL) order by id; -my_col id -Here is content from load_file - 1 -Here is content from load_file - 2 -Here is content from load_file - 3 -Here is content from load_file - 4 -Here is content from load_file - 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LENGTH(my_varbinary_1000), -my_varbinary_1000, id FROM t1_values; -SELECT LENGTH(my_varbinary_1000), -my_varbinary_1000, id FROM t1_values -WHERE select_id = 155 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select length(`t1_values`.`my_varbinary_1000`) AS `LENGTH(my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 155 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LENGTH(my_binary_30), -my_binary_30, id FROM t1_values; -SELECT LENGTH(my_binary_30), -my_binary_30, id FROM t1_values -WHERE select_id = 154 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select length(`t1_values`.`my_binary_30`) AS `LENGTH(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 154 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LENGTH(my_varchar_1000), -my_varchar_1000, id FROM t1_values; -SELECT LENGTH(my_varchar_1000), -my_varchar_1000, id FROM t1_values -WHERE select_id = 153 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select length(`t1_values`.`my_varchar_1000`) AS `LENGTH(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 153 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LENGTH(my_char_30), -my_char_30, id FROM t1_values; -SELECT LENGTH(my_char_30), -my_char_30, id FROM t1_values -WHERE select_id = 152 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select length(`t1_values`.`my_char_30`) AS `LENGTH(my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 152 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_double), my_double, id FROM t1_values; -SELECT LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_double), my_double, id FROM t1_values -WHERE select_id = 151 OR select_id IS NULL order by id; -LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_double) my_double id -NULL NULL 1 - -1.7976931348623e308 2 -AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 1.7976931348623e308 3 - 0 4 - -1 5 -Warnings: -Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e308' -Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e308' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö',`t1_values`.`my_double`) AS `LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_double)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 151 OR select_id IS NULL) order by id; -LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_double) my_double id -NULL NULL 1 - -1.7976931348623e308 2 -AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 1.7976931348623e308 3 - 0 4 - -1 5 -Warnings: -Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e308' -Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e308' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_decimal), my_decimal, id FROM t1_values; -SELECT LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_decimal), my_decimal, id FROM t1_values -WHERE select_id = 150 OR select_id IS NULL order by id; -LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_decimal) my_decimal id -NULL NULL 1 - -9999999999999999999999999999999999.999999999999999999999999999999 2 -AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 9999999999999999999999999999999999.999999999999999999999999999999 3 - 0.000000000000000000000000000000 4 - -1.000000000000000000000000000000 5 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' -Warning 1292 Truncated incorrect DECIMAL value: '' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö',`t1_values`.`my_decimal`) AS `LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_decimal)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 150 OR select_id IS NULL) order by id; -LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_decimal) my_decimal id -NULL NULL 1 - -9999999999999999999999999999999999.999999999999999999999999999999 2 -AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 9999999999999999999999999999999999.999999999999999999999999999999 3 - 0.000000000000000000000000000000 4 - -1.000000000000000000000000000000 5 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' -Warning 1292 Truncated incorrect DECIMAL value: '' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_bigint), my_bigint, id FROM t1_values; -SELECT LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_bigint), my_bigint, id FROM t1_values -WHERE select_id = 149 OR select_id IS NULL order by id; -LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_bigint) my_bigint id -NULL NULL 1 - -9223372036854775808 2 -AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 9223372036854775807 3 - 0 4 - -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö',`t1_values`.`my_bigint`) AS `LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_bigint)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 149 OR select_id IS NULL) order by id; -LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_bigint) my_bigint id -NULL NULL 1 - -9223372036854775808 2 -AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 9223372036854775807 3 - 0 4 - -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LEFT(my_varbinary_1000, 2), my_varbinary_1000, id FROM t1_values; -SELECT LEFT(my_varbinary_1000, 2), my_varbinary_1000, id FROM t1_values -WHERE select_id = 148 OR select_id IS NULL order by id; -LEFT(my_varbinary_1000, 2) my_varbinary_1000 id -NULL NULL 1 - 2 -<- <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 - - ---äÖüß@µ*$-- 4 --1 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(`t1_values`.`my_varbinary_1000`,2) AS `LEFT(my_varbinary_1000, 2)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 148 OR select_id IS NULL) order by id; -LEFT(my_varbinary_1000, 2) my_varbinary_1000 id -NULL NULL 1 - 2 -<- <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 - - ---äÖüß@µ*$-- 4 --1 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LEFT(my_binary_30, 2), my_binary_30, id FROM t1_values; -SELECT LEFT(my_binary_30, 2), my_binary_30, id FROM t1_values -WHERE select_id = 147 OR select_id IS NULL order by id; -LEFT(my_binary_30, 2) my_binary_30 id -NULL NULL 1 - 2 -<- <--------30 characters-------> 3 - - ---äÖüß@µ*$-- 4 --1 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(`t1_values`.`my_binary_30`,2) AS `LEFT(my_binary_30, 2)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 147 OR select_id IS NULL) order by id; -LEFT(my_binary_30, 2) my_binary_30 id -NULL NULL 1 - 2 -<- <--------30 characters-------> 3 - - ---äÖüß@µ*$-- 4 --1 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LEFT(my_varchar_1000, 2), my_varchar_1000, id FROM t1_values; -SELECT LEFT(my_varchar_1000, 2), my_varchar_1000, id FROM t1_values -WHERE select_id = 146 OR select_id IS NULL order by id; -LEFT(my_varchar_1000, 2) my_varchar_1000 id -NULL NULL 1 - 2 -<- <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 - - ---äÖüß@µ*$-- 4 --1 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(`t1_values`.`my_varchar_1000`,2) AS `LEFT(my_varchar_1000, 2)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 146 OR select_id IS NULL) order by id; -LEFT(my_varchar_1000, 2) my_varchar_1000 id -NULL NULL 1 - 2 -<- <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 - - ---äÖüß@µ*$-- 4 --1 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LEFT(my_char_30, 2), my_char_30, id FROM t1_values; -SELECT LEFT(my_char_30, 2), my_char_30, id FROM t1_values -WHERE select_id = 145 OR select_id IS NULL order by id; -LEFT(my_char_30, 2) my_char_30 id -NULL NULL 1 - 2 -<- <--------30 characters-------> 3 - - ---äÖüß@µ*$-- 4 --1 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(`t1_values`.`my_char_30`,2) AS `LEFT(my_char_30, 2)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 145 OR select_id IS NULL) order by id; -LEFT(my_char_30, 2) my_char_30 id -NULL NULL 1 - 2 -<- <--------30 characters-------> 3 - - ---äÖüß@µ*$-- 4 --1 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LCASE(my_varchar_1000), -my_varchar_1000, id FROM t1_values; -SELECT LCASE(my_varchar_1000), -my_varchar_1000, id FROM t1_values -WHERE select_id = 144 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_varchar_1000`) AS `LCASE(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 144 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT INSTR(my_char_30, 'char'), -my_char_30, id FROM t1_values; -SELECT INSTR(my_char_30, 'char'), -my_char_30, id FROM t1_values -WHERE select_id = 143 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('char',`t1_values`.`my_char_30`) AS `INSTR(my_char_30, 'char')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 143 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT BIT_LENGTH(my_varbinary_1000), -my_varbinary_1000, id FROM t1_values; -SELECT BIT_LENGTH(my_varbinary_1000), -my_varbinary_1000, id FROM t1_values -WHERE select_id = 142 OR select_id IS NULL order by id; -BIT_LENGTH(my_varbinary_1000) my_varbinary_1000 id -NULL NULL 1 -0 2 -8000 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 -160 ---äÖüß@µ*$-- 4 -16 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select bit_length(`t1_values`.`my_varbinary_1000`) AS `BIT_LENGTH(my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 142 OR select_id IS NULL) order by id; -BIT_LENGTH(my_varbinary_1000) my_varbinary_1000 id -NULL NULL 1 -0 2 -8000 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 -160 ---äÖüß@µ*$-- 4 -16 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT BIT_LENGTH(my_binary_30), -my_binary_30, id FROM t1_values; -SELECT BIT_LENGTH(my_binary_30), -my_binary_30, id FROM t1_values -WHERE select_id = 141 OR select_id IS NULL order by id; -BIT_LENGTH(my_binary_30) my_binary_30 id -NULL NULL 1 -240 2 -240 <--------30 characters-------> 3 -240 ---äÖüß@µ*$-- 4 -240 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select bit_length(`t1_values`.`my_binary_30`) AS `BIT_LENGTH(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 141 OR select_id IS NULL) order by id; -BIT_LENGTH(my_binary_30) my_binary_30 id -NULL NULL 1 -240 2 -240 <--------30 characters-------> 3 -240 ---äÖüß@µ*$-- 4 -240 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT BIT_LENGTH(my_varchar_1000), -my_varchar_1000, id FROM t1_values; -SELECT BIT_LENGTH(my_varchar_1000), -my_varchar_1000, id FROM t1_values -WHERE select_id = 140 OR select_id IS NULL order by id; -BIT_LENGTH(my_varchar_1000) my_varchar_1000 id -NULL NULL 1 -0 2 -8000 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 -160 ---äÖüß@µ*$-- 4 -16 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select bit_length(`t1_values`.`my_varchar_1000`) AS `BIT_LENGTH(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 140 OR select_id IS NULL) order by id; -BIT_LENGTH(my_varchar_1000) my_varchar_1000 id -NULL NULL 1 -0 2 -8000 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 -160 ---äÖüß@µ*$-- 4 -16 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT BIT_LENGTH(my_char_30), -my_char_30, id FROM t1_values; -SELECT BIT_LENGTH(my_char_30), -my_char_30, id FROM t1_values -WHERE select_id = 139 OR select_id IS NULL order by id; -BIT_LENGTH(my_char_30) my_char_30 id -NULL NULL 1 -0 2 -240 <--------30 characters-------> 3 -152 ---äÖüß@µ*$-- 4 -16 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select bit_length(`t1_values`.`my_char_30`) AS `BIT_LENGTH(my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 139 OR select_id IS NULL) order by id; -BIT_LENGTH(my_char_30) my_char_30 id -NULL NULL 1 -0 2 -240 <--------30 characters-------> 3 -152 ---äÖüß@µ*$-- 4 -16 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IFNULL(my_year,'IS_NULL'), -my_year, id FROM t1_values; -SELECT IFNULL(my_year,'IS_NULL'), -my_year, id FROM t1_values -WHERE select_id = 138 OR select_id IS NULL order by id; -IFNULL(my_year,'IS_NULL') my_year id -IS_NULL NULL 1 -1901 1901 2 -2155 2155 3 -2000 2000 4 -2005 2005 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_year`,'IS_NULL') AS `IFNULL(my_year,'IS_NULL')`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 138 OR select_id IS NULL) order by id; -IFNULL(my_year,'IS_NULL') my_year id -IS_NULL NULL 1 -1901 1901 2 -2155 2155 3 -2000 2000 4 -2005 2005 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IFNULL(my_time,'IS_NULL'), -my_time, id FROM t1_values; -SELECT IFNULL(my_time,'IS_NULL'), -my_time, id FROM t1_values -WHERE select_id = 137 OR select_id IS NULL order by id; -IFNULL(my_time,'IS_NULL') my_time id -IS_NULL NULL 1 --838:59:59 -838:59:59 2 -838:59:59 838:59:59 3 -13:00:00 13:00:00 4 -10:00:00 10:00:00 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_time`,'IS_NULL') AS `IFNULL(my_time,'IS_NULL')`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 137 OR select_id IS NULL) order by id; -IFNULL(my_time,'IS_NULL') my_time id -IS_NULL NULL 1 --838:59:59 -838:59:59 2 -838:59:59 838:59:59 3 -13:00:00 13:00:00 4 -10:00:00 10:00:00 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IFNULL(my_timestamp,'IS_NULL'), -my_timestamp, id FROM t1_values; -SELECT IFNULL(my_timestamp,'IS_NULL'), -my_timestamp, id FROM t1_values -WHERE select_id = 136 OR select_id IS NULL order by id; -IFNULL(my_timestamp,'IS_NULL') my_timestamp id -0000-00-00 00:00:00 0000-00-00 00:00:00 1 -1970-01-01 03:00:01 1970-01-01 03:00:01 2 -2038-01-01 02:59:59 2038-01-01 02:59:59 3 -2004-02-29 23:59:59 2004-02-29 23:59:59 4 -2005-06-28 10:00:00 2005-06-28 10:00:00 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_timestamp`,'IS_NULL') AS `IFNULL(my_timestamp,'IS_NULL')`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 136 OR select_id IS NULL) order by id; -IFNULL(my_timestamp,'IS_NULL') my_timestamp id -0000-00-00 00:00:00 0000-00-00 00:00:00 1 -1970-01-01 03:00:01 1970-01-01 03:00:01 2 -2038-01-01 02:59:59 2038-01-01 02:59:59 3 -2004-02-29 23:59:59 2004-02-29 23:59:59 4 -2005-06-28 10:00:00 2005-06-28 10:00:00 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IFNULL(my_date,'IS_NULL'), -my_date, id FROM t1_values; -SELECT IFNULL(my_date,'IS_NULL'), -my_date, id FROM t1_values -WHERE select_id = 135 OR select_id IS NULL order by id; -IFNULL(my_date,'IS_NULL') my_date id -IS_NULL NULL 1 -0001-01-01 0001-01-01 2 -9999-12-31 9999-12-31 3 -2004-02-29 2004-02-29 4 -2005-06-28 2005-06-28 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_date`,'IS_NULL') AS `IFNULL(my_date,'IS_NULL')`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 135 OR select_id IS NULL) order by id; -IFNULL(my_date,'IS_NULL') my_date id -IS_NULL NULL 1 -0001-01-01 0001-01-01 2 -9999-12-31 9999-12-31 3 -2004-02-29 2004-02-29 4 -2005-06-28 2005-06-28 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IFNULL(my_datetime,'IS_NULL'), -my_datetime, id FROM t1_values; -SELECT IFNULL(my_datetime,'IS_NULL'), -my_datetime, id FROM t1_values -WHERE select_id = 134 OR select_id IS NULL order by id; -IFNULL(my_datetime,'IS_NULL') my_datetime id -IS_NULL NULL 1 -0001-01-01 00:00:00 0001-01-01 00:00:00 2 -9999-12-31 23:59:59 9999-12-31 23:59:59 3 -2004-02-29 23:59:59 2004-02-29 23:59:59 4 -2005-06-28 10:00:00 2005-06-28 10:00:00 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_datetime`,'IS_NULL') AS `IFNULL(my_datetime,'IS_NULL')`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 134 OR select_id IS NULL) order by id; -IFNULL(my_datetime,'IS_NULL') my_datetime id -IS_NULL NULL 1 -0001-01-01 00:00:00 0001-01-01 00:00:00 2 -9999-12-31 23:59:59 9999-12-31 23:59:59 3 -2004-02-29 23:59:59 2004-02-29 23:59:59 4 -2005-06-28 10:00:00 2005-06-28 10:00:00 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IFNULL(my_double,'IS_NULL'), -my_double, id FROM t1_values; -SELECT IFNULL(my_double,'IS_NULL'), -my_double, id FROM t1_values -WHERE select_id = 133 OR select_id IS NULL order by id; -IFNULL(my_double,'IS_NULL') my_double id -IS_NULL NULL 1 --1.7976931348623e308 -1.7976931348623e308 2 -1.7976931348623e308 1.7976931348623e308 3 -0 0 4 --1 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_double`,'IS_NULL') AS `IFNULL(my_double,'IS_NULL')`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 133 OR select_id IS NULL) order by id; -IFNULL(my_double,'IS_NULL') my_double id -IS_NULL NULL 1 --1.7976931348623e308 -1.7976931348623e308 2 -1.7976931348623e308 1.7976931348623e308 3 -0 0 4 --1 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IFNULL(my_decimal,'IS_NULL'), -my_decimal, id FROM t1_values; -SELECT IFNULL(my_decimal,'IS_NULL'), -my_decimal, id FROM t1_values -WHERE select_id = 132 OR select_id IS NULL order by id; -IFNULL(my_decimal,'IS_NULL') my_decimal id -IS_NULL NULL 1 --9999999999999999999999999999999999.999999999999999999999999999999 -9999999999999999999999999999999999.999999999999999999999999999999 2 -9999999999999999999999999999999999.999999999999999999999999999999 9999999999999999999999999999999999.999999999999999999999999999999 3 -0.000000000000000000000000000000 0.000000000000000000000000000000 4 --1.000000000000000000000000000000 -1.000000000000000000000000000000 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_decimal`,'IS_NULL') AS `IFNULL(my_decimal,'IS_NULL')`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 132 OR select_id IS NULL) order by id; -IFNULL(my_decimal,'IS_NULL') my_decimal id -IS_NULL NULL 1 --9999999999999999999999999999999999.999999999999999999999999999999 -9999999999999999999999999999999999.999999999999999999999999999999 2 -9999999999999999999999999999999999.999999999999999999999999999999 9999999999999999999999999999999999.999999999999999999999999999999 3 -0.000000000000000000000000000000 0.000000000000000000000000000000 4 --1.000000000000000000000000000000 -1.000000000000000000000000000000 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IFNULL(my_bigint,'IS_NULL'), -my_bigint, id FROM t1_values; -SELECT IFNULL(my_bigint,'IS_NULL'), -my_bigint, id FROM t1_values -WHERE select_id = 131 OR select_id IS NULL order by id; -IFNULL(my_bigint,'IS_NULL') my_bigint id -IS_NULL NULL 1 --9223372036854775808 -9223372036854775808 2 -9223372036854775807 9223372036854775807 3 -0 0 4 --1 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_bigint`,'IS_NULL') AS `IFNULL(my_bigint,'IS_NULL')`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 131 OR select_id IS NULL) order by id; -IFNULL(my_bigint,'IS_NULL') my_bigint id -IS_NULL NULL 1 --9223372036854775808 -9223372036854775808 2 -9223372036854775807 9223372036854775807 3 -0 0 4 --1 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IFNULL(my_varbinary_1000,'IS_NULL'), -my_varbinary_1000, id FROM t1_values; -SELECT IFNULL(my_varbinary_1000,'IS_NULL'), -my_varbinary_1000, id FROM t1_values -WHERE select_id = 130 OR select_id IS NULL order by id; -IFNULL(my_varbinary_1000,'IS_NULL') my_varbinary_1000 id -IS_NULL NULL 1 - 2 -<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 - ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_varbinary_1000`,'IS_NULL') AS `IFNULL(my_varbinary_1000,'IS_NULL')`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 130 OR select_id IS NULL) order by id; -IFNULL(my_varbinary_1000,'IS_NULL') my_varbinary_1000 id -IS_NULL NULL 1 - 2 -<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 - ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IFNULL(my_binary_30,'IS_NULL'), -my_binary_30, id FROM t1_values; -SELECT IFNULL(my_binary_30,'IS_NULL'), -my_binary_30, id FROM t1_values -WHERE select_id = 129 OR select_id IS NULL order by id; -IFNULL(my_binary_30,'IS_NULL') my_binary_30 id -IS_NULL NULL 1 - 2 -<--------30 characters-------> <--------30 characters-------> 3 - ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_binary_30`,'IS_NULL') AS `IFNULL(my_binary_30,'IS_NULL')`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 129 OR select_id IS NULL) order by id; -IFNULL(my_binary_30,'IS_NULL') my_binary_30 id -IS_NULL NULL 1 - 2 -<--------30 characters-------> <--------30 characters-------> 3 - ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IFNULL(my_varchar_1000,'IS_NULL'), -my_varchar_1000, id FROM t1_values; -SELECT IFNULL(my_varchar_1000,'IS_NULL'), -my_varchar_1000, id FROM t1_values -WHERE select_id = 128 OR select_id IS NULL order by id; -IFNULL(my_varchar_1000,'IS_NULL') my_varchar_1000 id -IS_NULL NULL 1 - 2 -<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 - ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_varchar_1000`,'IS_NULL') AS `IFNULL(my_varchar_1000,'IS_NULL')`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 128 OR select_id IS NULL) order by id; -IFNULL(my_varchar_1000,'IS_NULL') my_varchar_1000 id -IS_NULL NULL 1 - 2 -<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 - ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IFNULL(my_char_30,'IS_NULL'), -my_char_30, id FROM t1_values; -SELECT IFNULL(my_char_30,'IS_NULL'), -my_char_30, id FROM t1_values -WHERE select_id = 127 OR select_id IS NULL order by id; -IFNULL(my_char_30,'IS_NULL') my_char_30 id -IS_NULL NULL 1 - 2 -<--------30 characters-------> <--------30 characters-------> 3 - ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_char_30`,'IS_NULL') AS `IFNULL(my_char_30,'IS_NULL')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 127 OR select_id IS NULL) order by id; -IFNULL(my_char_30,'IS_NULL') my_char_30 id -IS_NULL NULL 1 - 2 -<--------30 characters-------> <--------30 characters-------> 3 - ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IF(my_year IS NULL, 'IS NULL', -'IS NOT NULL'), my_year, id FROM t1_values; -SELECT IF(my_year IS NULL, 'IS NULL', -'IS NOT NULL'), my_year, id FROM t1_values -WHERE select_id = 126 OR select_id IS NULL order by id; -IF(my_year IS NULL, 'IS NULL', -'IS NOT NULL') my_year id -IS NULL NULL 1 -IS NOT NULL 1901 2 -IS NOT NULL 2155 3 -IS NOT NULL 2000 4 -IS NOT NULL 2005 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_year`),'IS NULL','IS NOT NULL') AS `IF(my_year IS NULL, 'IS NULL', -'IS NOT NULL')`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 126 OR select_id IS NULL) order by id; -IF(my_year IS NULL, 'IS NULL', -'IS NOT NULL') my_year id -IS NULL NULL 1 -IS NOT NULL 1901 2 -IS NOT NULL 2155 3 -IS NOT NULL 2000 4 -IS NOT NULL 2005 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IF(my_time IS NULL, 'IS NULL', -'IS NOT NULL'), my_time, id FROM t1_values; -SELECT IF(my_time IS NULL, 'IS NULL', -'IS NOT NULL'), my_time, id FROM t1_values -WHERE select_id = 125 OR select_id IS NULL order by id; -IF(my_time IS NULL, 'IS NULL', -'IS NOT NULL') my_time id -IS NULL NULL 1 -IS NOT NULL -838:59:59 2 -IS NOT NULL 838:59:59 3 -IS NOT NULL 13:00:00 4 -IS NOT NULL 10:00:00 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_time`),'IS NULL','IS NOT NULL') AS `IF(my_time IS NULL, 'IS NULL', -'IS NOT NULL')`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 125 OR select_id IS NULL) order by id; -IF(my_time IS NULL, 'IS NULL', -'IS NOT NULL') my_time id -IS NULL NULL 1 -IS NOT NULL -838:59:59 2 -IS NOT NULL 838:59:59 3 -IS NOT NULL 13:00:00 4 -IS NOT NULL 10:00:00 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IF(my_timestamp IS NULL, 'IS NULL', -'IS NOT NULL'), my_timestamp, id FROM t1_values; -SELECT IF(my_timestamp IS NULL, 'IS NULL', -'IS NOT NULL'), my_timestamp, id FROM t1_values -WHERE select_id = 124 OR select_id IS NULL order by id; -IF(my_timestamp IS NULL, 'IS NULL', -'IS NOT NULL') my_timestamp id -IS NOT NULL 0000-00-00 00:00:00 1 -IS NOT NULL 1970-01-01 03:00:01 2 -IS NOT NULL 2038-01-01 02:59:59 3 -IS NOT NULL 2004-02-29 23:59:59 4 -IS NOT NULL 2005-06-28 10:00:00 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_timestamp`),'IS NULL','IS NOT NULL') AS `IF(my_timestamp IS NULL, 'IS NULL', -'IS NOT NULL')`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 124 OR select_id IS NULL) order by id; -IF(my_timestamp IS NULL, 'IS NULL', -'IS NOT NULL') my_timestamp id -IS NOT NULL 0000-00-00 00:00:00 1 -IS NOT NULL 1970-01-01 03:00:01 2 -IS NOT NULL 2038-01-01 02:59:59 3 -IS NOT NULL 2004-02-29 23:59:59 4 -IS NOT NULL 2005-06-28 10:00:00 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IF(my_date IS NULL, 'IS NULL', -'IS NOT NULL'), my_date, id FROM t1_values; -SELECT IF(my_date IS NULL, 'IS NULL', -'IS NOT NULL'), my_date, id FROM t1_values -WHERE select_id = 123 OR select_id IS NULL order by id; -IF(my_date IS NULL, 'IS NULL', -'IS NOT NULL') my_date id -IS NULL NULL 1 -IS NOT NULL 0001-01-01 2 -IS NOT NULL 9999-12-31 3 -IS NOT NULL 2004-02-29 4 -IS NOT NULL 2005-06-28 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_date`),'IS NULL','IS NOT NULL') AS `IF(my_date IS NULL, 'IS NULL', -'IS NOT NULL')`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 123 OR select_id IS NULL) order by id; -IF(my_date IS NULL, 'IS NULL', -'IS NOT NULL') my_date id -IS NULL NULL 1 -IS NOT NULL 0001-01-01 2 -IS NOT NULL 9999-12-31 3 -IS NOT NULL 2004-02-29 4 -IS NOT NULL 2005-06-28 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IF(my_datetime IS NULL, 'IS NULL', -'IS NOT NULL'), my_datetime, id FROM t1_values; -SELECT IF(my_datetime IS NULL, 'IS NULL', -'IS NOT NULL'), my_datetime, id FROM t1_values -WHERE select_id = 122 OR select_id IS NULL order by id; -IF(my_datetime IS NULL, 'IS NULL', -'IS NOT NULL') my_datetime id -IS NULL NULL 1 -IS NOT NULL 0001-01-01 00:00:00 2 -IS NOT NULL 9999-12-31 23:59:59 3 -IS NOT NULL 2004-02-29 23:59:59 4 -IS NOT NULL 2005-06-28 10:00:00 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_datetime`),'IS NULL','IS NOT NULL') AS `IF(my_datetime IS NULL, 'IS NULL', -'IS NOT NULL')`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 122 OR select_id IS NULL) order by id; -IF(my_datetime IS NULL, 'IS NULL', -'IS NOT NULL') my_datetime id -IS NULL NULL 1 -IS NOT NULL 0001-01-01 00:00:00 2 -IS NOT NULL 9999-12-31 23:59:59 3 -IS NOT NULL 2004-02-29 23:59:59 4 -IS NOT NULL 2005-06-28 10:00:00 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IF(my_double IS NULL, 'IS NULL', -'IS NOT NULL'), my_double, id FROM t1_values; -SELECT IF(my_double IS NULL, 'IS NULL', -'IS NOT NULL'), my_double, id FROM t1_values -WHERE select_id = 121 OR select_id IS NULL order by id; -IF(my_double IS NULL, 'IS NULL', -'IS NOT NULL') my_double id -IS NULL NULL 1 -IS NOT NULL -1.7976931348623e308 2 -IS NOT NULL 1.7976931348623e308 3 -IS NOT NULL 0 4 -IS NOT NULL -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_double`),'IS NULL','IS NOT NULL') AS `IF(my_double IS NULL, 'IS NULL', -'IS NOT NULL')`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 121 OR select_id IS NULL) order by id; -IF(my_double IS NULL, 'IS NULL', -'IS NOT NULL') my_double id -IS NULL NULL 1 -IS NOT NULL -1.7976931348623e308 2 -IS NOT NULL 1.7976931348623e308 3 -IS NOT NULL 0 4 -IS NOT NULL -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IF(my_decimal IS NULL, 'IS NULL', -'IS NOT NULL'), my_decimal, id FROM t1_values; -SELECT IF(my_decimal IS NULL, 'IS NULL', -'IS NOT NULL'), my_decimal, id FROM t1_values -WHERE select_id = 120 OR select_id IS NULL order by id; -IF(my_decimal IS NULL, 'IS NULL', -'IS NOT NULL') my_decimal id -IS NULL NULL 1 -IS NOT NULL -9999999999999999999999999999999999.999999999999999999999999999999 2 -IS NOT NULL 9999999999999999999999999999999999.999999999999999999999999999999 3 -IS NOT NULL 0.000000000000000000000000000000 4 -IS NOT NULL -1.000000000000000000000000000000 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_decimal`),'IS NULL','IS NOT NULL') AS `IF(my_decimal IS NULL, 'IS NULL', -'IS NOT NULL')`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 120 OR select_id IS NULL) order by id; -IF(my_decimal IS NULL, 'IS NULL', -'IS NOT NULL') my_decimal id -IS NULL NULL 1 -IS NOT NULL -9999999999999999999999999999999999.999999999999999999999999999999 2 -IS NOT NULL 9999999999999999999999999999999999.999999999999999999999999999999 3 -IS NOT NULL 0.000000000000000000000000000000 4 -IS NOT NULL -1.000000000000000000000000000000 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IF(my_bigint IS NULL, 'IS NULL', -'IS NOT NULL'), my_bigint, id FROM t1_values; -SELECT IF(my_bigint IS NULL, 'IS NULL', -'IS NOT NULL'), my_bigint, id FROM t1_values -WHERE select_id = 119 OR select_id IS NULL order by id; -IF(my_bigint IS NULL, 'IS NULL', -'IS NOT NULL') my_bigint id -IS NULL NULL 1 -IS NOT NULL -9223372036854775808 2 -IS NOT NULL 9223372036854775807 3 -IS NOT NULL 0 4 -IS NOT NULL -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_bigint`),'IS NULL','IS NOT NULL') AS `IF(my_bigint IS NULL, 'IS NULL', -'IS NOT NULL')`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 119 OR select_id IS NULL) order by id; -IF(my_bigint IS NULL, 'IS NULL', -'IS NOT NULL') my_bigint id -IS NULL NULL 1 -IS NOT NULL -9223372036854775808 2 -IS NOT NULL 9223372036854775807 3 -IS NOT NULL 0 4 -IS NOT NULL -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IF(my_varbinary_1000 IS NULL, 'IS NULL', -'IS NOT NULL'), my_varbinary_1000, id FROM t1_values; -SELECT IF(my_varbinary_1000 IS NULL, 'IS NULL', -'IS NOT NULL'), my_varbinary_1000, id FROM t1_values -WHERE select_id = 118 OR select_id IS NULL order by id; -IF(my_varbinary_1000 IS NULL, 'IS NULL', -'IS NOT NULL') my_varbinary_1000 id -IS NULL NULL 1 -IS NOT NULL 2 -IS NOT NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 -IS NOT NULL ---äÖüß@µ*$-- 4 -IS NOT NULL -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_varbinary_1000`),'IS NULL','IS NOT NULL') AS `IF(my_varbinary_1000 IS NULL, 'IS NULL', -'IS NOT NULL')`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 118 OR select_id IS NULL) order by id; -IF(my_varbinary_1000 IS NULL, 'IS NULL', -'IS NOT NULL') my_varbinary_1000 id -IS NULL NULL 1 -IS NOT NULL 2 -IS NOT NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 -IS NOT NULL ---äÖüß@µ*$-- 4 -IS NOT NULL -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IF(my_binary_30 IS NULL, 'IS NULL', -'IS NOT NULL'), my_binary_30, id FROM t1_values; -SELECT IF(my_binary_30 IS NULL, 'IS NULL', -'IS NOT NULL'), my_binary_30, id FROM t1_values -WHERE select_id = 117 OR select_id IS NULL order by id; -IF(my_binary_30 IS NULL, 'IS NULL', -'IS NOT NULL') my_binary_30 id -IS NULL NULL 1 -IS NOT NULL 2 -IS NOT NULL <--------30 characters-------> 3 -IS NOT NULL ---äÖüß@µ*$-- 4 -IS NOT NULL -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_binary_30`),'IS NULL','IS NOT NULL') AS `IF(my_binary_30 IS NULL, 'IS NULL', -'IS NOT NULL')`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 117 OR select_id IS NULL) order by id; -IF(my_binary_30 IS NULL, 'IS NULL', -'IS NOT NULL') my_binary_30 id -IS NULL NULL 1 -IS NOT NULL 2 -IS NOT NULL <--------30 characters-------> 3 -IS NOT NULL ---äÖüß@µ*$-- 4 -IS NOT NULL -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IF(my_varchar_1000 IS NULL, 'IS NULL', -'IS NOT NULL'), my_varchar_1000, id FROM t1_values; -SELECT IF(my_varchar_1000 IS NULL, 'IS NULL', -'IS NOT NULL'), my_varchar_1000, id FROM t1_values -WHERE select_id = 116 OR select_id IS NULL order by id; -IF(my_varchar_1000 IS NULL, 'IS NULL', -'IS NOT NULL') my_varchar_1000 id -IS NULL NULL 1 -IS NOT NULL 2 -IS NOT NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 -IS NOT NULL ---äÖüß@µ*$-- 4 -IS NOT NULL -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_varchar_1000`),'IS NULL','IS NOT NULL') AS `IF(my_varchar_1000 IS NULL, 'IS NULL', -'IS NOT NULL')`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 116 OR select_id IS NULL) order by id; -IF(my_varchar_1000 IS NULL, 'IS NULL', -'IS NOT NULL') my_varchar_1000 id -IS NULL NULL 1 -IS NOT NULL 2 -IS NOT NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 -IS NOT NULL ---äÖüß@µ*$-- 4 -IS NOT NULL -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IF(my_char_30 IS NULL, 'IS NULL', -'IS NOT NULL'), my_char_30, id FROM t1_values; -SELECT IF(my_char_30 IS NULL, 'IS NULL', -'IS NOT NULL'), my_char_30, id FROM t1_values -WHERE select_id = 115 OR select_id IS NULL order by id; -IF(my_char_30 IS NULL, 'IS NULL', -'IS NOT NULL') my_char_30 id -IS NULL NULL 1 -IS NOT NULL 2 -IS NOT NULL <--------30 characters-------> 3 -IS NOT NULL ---äÖüß@µ*$-- 4 -IS NOT NULL -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_char_30`),'IS NULL','IS NOT NULL') AS `IF(my_char_30 IS NULL, 'IS NULL', -'IS NOT NULL')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 115 OR select_id IS NULL) order by id; -IF(my_char_30 IS NULL, 'IS NULL', -'IS NOT NULL') my_char_30 id -IS NULL NULL 1 -IS NOT NULL 2 -IS NOT NULL <--------30 characters-------> 3 -IS NOT NULL ---äÖüß@µ*$-- 4 -IS NOT NULL -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IF(my_year, 'IS TRUE', 'IS NOT TRUE'), -my_year, id FROM t1_values; -SELECT IF(my_year, 'IS TRUE', 'IS NOT TRUE'), -my_year, id FROM t1_values -WHERE select_id = 114 OR select_id IS NULL order by id; -IF(my_year, 'IS TRUE', 'IS NOT TRUE') my_year id -IS NOT TRUE NULL 1 -IS TRUE 1901 2 -IS TRUE 2155 3 -IS TRUE 2000 4 -IS TRUE 2005 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_year`,'IS TRUE','IS NOT TRUE') AS `IF(my_year, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 114 OR select_id IS NULL) order by id; -IF(my_year, 'IS TRUE', 'IS NOT TRUE') my_year id -IS NOT TRUE NULL 1 -IS TRUE 1901 2 -IS TRUE 2155 3 -IS TRUE 2000 4 -IS TRUE 2005 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IF(my_time, 'IS TRUE', 'IS NOT TRUE'), -my_time, id FROM t1_values; -SELECT IF(my_time, 'IS TRUE', 'IS NOT TRUE'), -my_time, id FROM t1_values -WHERE select_id = 113 OR select_id IS NULL order by id; -IF(my_time, 'IS TRUE', 'IS NOT TRUE') my_time id -IS NOT TRUE NULL 1 -IS TRUE -838:59:59 2 -IS TRUE 838:59:59 3 -IS TRUE 13:00:00 4 -IS TRUE 10:00:00 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_time`,'IS TRUE','IS NOT TRUE') AS `IF(my_time, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 113 OR select_id IS NULL) order by id; -IF(my_time, 'IS TRUE', 'IS NOT TRUE') my_time id -IS NOT TRUE NULL 1 -IS TRUE -838:59:59 2 -IS TRUE 838:59:59 3 -IS TRUE 13:00:00 4 -IS TRUE 10:00:00 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IF(my_timestamp, 'IS TRUE', 'IS NOT TRUE'), -my_timestamp, id FROM t1_values; -SELECT IF(my_timestamp, 'IS TRUE', 'IS NOT TRUE'), -my_timestamp, id FROM t1_values -WHERE select_id = 112 OR select_id IS NULL order by id; -IF(my_timestamp, 'IS TRUE', 'IS NOT TRUE') my_timestamp id -IS NOT TRUE 0000-00-00 00:00:00 1 -IS TRUE 1970-01-01 03:00:01 2 -IS TRUE 2038-01-01 02:59:59 3 -IS TRUE 2004-02-29 23:59:59 4 -IS TRUE 2005-06-28 10:00:00 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_timestamp`,'IS TRUE','IS NOT TRUE') AS `IF(my_timestamp, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 112 OR select_id IS NULL) order by id; -IF(my_timestamp, 'IS TRUE', 'IS NOT TRUE') my_timestamp id -IS NOT TRUE 0000-00-00 00:00:00 1 -IS TRUE 1970-01-01 03:00:01 2 -IS TRUE 2038-01-01 02:59:59 3 -IS TRUE 2004-02-29 23:59:59 4 -IS TRUE 2005-06-28 10:00:00 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IF(my_date, 'IS TRUE', 'IS NOT TRUE'), -my_date, id FROM t1_values; -SELECT IF(my_date, 'IS TRUE', 'IS NOT TRUE'), -my_date, id FROM t1_values -WHERE select_id = 111 OR select_id IS NULL order by id; -IF(my_date, 'IS TRUE', 'IS NOT TRUE') my_date id -IS NOT TRUE NULL 1 -IS TRUE 0001-01-01 2 -IS TRUE 9999-12-31 3 -IS TRUE 2004-02-29 4 -IS TRUE 2005-06-28 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_date`,'IS TRUE','IS NOT TRUE') AS `IF(my_date, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 111 OR select_id IS NULL) order by id; -IF(my_date, 'IS TRUE', 'IS NOT TRUE') my_date id -IS NOT TRUE NULL 1 -IS TRUE 0001-01-01 2 -IS TRUE 9999-12-31 3 -IS TRUE 2004-02-29 4 -IS TRUE 2005-06-28 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IF(my_datetime, 'IS TRUE', 'IS NOT TRUE'), -my_datetime, id FROM t1_values; -SELECT IF(my_datetime, 'IS TRUE', 'IS NOT TRUE'), -my_datetime, id FROM t1_values -WHERE select_id = 110 OR select_id IS NULL order by id; -IF(my_datetime, 'IS TRUE', 'IS NOT TRUE') my_datetime id -IS NOT TRUE NULL 1 -IS TRUE 0001-01-01 00:00:00 2 -IS TRUE 9999-12-31 23:59:59 3 -IS TRUE 2004-02-29 23:59:59 4 -IS TRUE 2005-06-28 10:00:00 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_datetime`,'IS TRUE','IS NOT TRUE') AS `IF(my_datetime, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 110 OR select_id IS NULL) order by id; -IF(my_datetime, 'IS TRUE', 'IS NOT TRUE') my_datetime id -IS NOT TRUE NULL 1 -IS TRUE 0001-01-01 00:00:00 2 -IS TRUE 9999-12-31 23:59:59 3 -IS TRUE 2004-02-29 23:59:59 4 -IS TRUE 2005-06-28 10:00:00 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IF(my_double, 'IS TRUE', 'IS NOT TRUE'), -my_double, id FROM t1_values; -SELECT IF(my_double, 'IS TRUE', 'IS NOT TRUE'), -my_double, id FROM t1_values -WHERE select_id = 109 OR select_id IS NULL order by id; -IF(my_double, 'IS TRUE', 'IS NOT TRUE') my_double id -IS NOT TRUE NULL 1 -IS TRUE -1.7976931348623e308 2 -IS TRUE 1.7976931348623e308 3 -IS NOT TRUE 0 4 -IS TRUE -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_double`,'IS TRUE','IS NOT TRUE') AS `IF(my_double, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 109 OR select_id IS NULL) order by id; -IF(my_double, 'IS TRUE', 'IS NOT TRUE') my_double id -IS NOT TRUE NULL 1 -IS TRUE -1.7976931348623e308 2 -IS TRUE 1.7976931348623e308 3 -IS NOT TRUE 0 4 -IS TRUE -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IF(my_decimal, 'IS TRUE', 'IS NOT TRUE'), -my_decimal, id FROM t1_values; -SELECT IF(my_decimal, 'IS TRUE', 'IS NOT TRUE'), -my_decimal, id FROM t1_values -WHERE select_id = 108 OR select_id IS NULL order by id; -IF(my_decimal, 'IS TRUE', 'IS NOT TRUE') my_decimal id -IS NOT TRUE NULL 1 -IS TRUE -9999999999999999999999999999999999.999999999999999999999999999999 2 -IS TRUE 9999999999999999999999999999999999.999999999999999999999999999999 3 -IS NOT TRUE 0.000000000000000000000000000000 4 -IS TRUE -1.000000000000000000000000000000 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_decimal`,'IS TRUE','IS NOT TRUE') AS `IF(my_decimal, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 108 OR select_id IS NULL) order by id; -IF(my_decimal, 'IS TRUE', 'IS NOT TRUE') my_decimal id -IS NOT TRUE NULL 1 -IS TRUE -9999999999999999999999999999999999.999999999999999999999999999999 2 -IS TRUE 9999999999999999999999999999999999.999999999999999999999999999999 3 -IS NOT TRUE 0.000000000000000000000000000000 4 -IS TRUE -1.000000000000000000000000000000 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IF(my_bigint, 'IS TRUE', 'IS NOT TRUE'), -my_bigint, id FROM t1_values; -SELECT IF(my_bigint, 'IS TRUE', 'IS NOT TRUE'), -my_bigint, id FROM t1_values -WHERE select_id = 107 OR select_id IS NULL order by id; -IF(my_bigint, 'IS TRUE', 'IS NOT TRUE') my_bigint id -IS NOT TRUE NULL 1 -IS TRUE -9223372036854775808 2 -IS TRUE 9223372036854775807 3 -IS NOT TRUE 0 4 -IS TRUE -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_bigint`,'IS TRUE','IS NOT TRUE') AS `IF(my_bigint, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 107 OR select_id IS NULL) order by id; -IF(my_bigint, 'IS TRUE', 'IS NOT TRUE') my_bigint id -IS NOT TRUE NULL 1 -IS TRUE -9223372036854775808 2 -IS TRUE 9223372036854775807 3 -IS NOT TRUE 0 4 -IS TRUE -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IF(my_varbinary_1000, 'IS TRUE', 'IS NOT TRUE'), -my_varbinary_1000, id FROM t1_values; -SELECT IF(my_varbinary_1000, 'IS TRUE', 'IS NOT TRUE'), -my_varbinary_1000, id FROM t1_values -WHERE select_id = 106 OR select_id IS NULL order by id; -IF(my_varbinary_1000, 'IS TRUE', 'IS NOT TRUE') my_varbinary_1000 id -IS NOT TRUE NULL 1 -IS NOT TRUE 2 -IS NOT TRUE <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 -IS NOT TRUE ---äÖüß@µ*$-- 4 -IS TRUE -1 5 -Warnings: -Warning 1292 Truncated incorrect DOUBLE value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect DOUBLE value: ' ---äÖüß@µ*$-- ' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_varbinary_1000`,'IS TRUE','IS NOT TRUE') AS `IF(my_varbinary_1000, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 106 OR select_id IS NULL) order by id; -IF(my_varbinary_1000, 'IS TRUE', 'IS NOT TRUE') my_varbinary_1000 id -IS NOT TRUE NULL 1 -IS NOT TRUE 2 -IS NOT TRUE <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 -IS NOT TRUE ---äÖüß@µ*$-- 4 -IS TRUE -1 5 -Warnings: -Warning 1292 Truncated incorrect DOUBLE value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect DOUBLE value: ' ---äÖüß@µ*$-- ' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IF(my_binary_30, 'IS TRUE', 'IS NOT TRUE'), -my_binary_30, id FROM t1_values; -SELECT IF(my_binary_30, 'IS TRUE', 'IS NOT TRUE'), -my_binary_30, id FROM t1_values -WHERE select_id = 105 OR select_id IS NULL order by id; -IF(my_binary_30, 'IS TRUE', 'IS NOT TRUE') my_binary_30 id -IS NOT TRUE NULL 1 -IS NOT TRUE 2 -IS NOT TRUE <--------30 characters-------> 3 -IS NOT TRUE ---äÖüß@µ*$-- 4 -IS TRUE -1 5 -Warnings: -Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' -Warning 1292 Truncated incorrect DOUBLE value: '<--------30 characters------->' -Warning 1292 Truncated incorrect DOUBLE value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' -Warning 1292 Truncated incorrect DOUBLE value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_binary_30`,'IS TRUE','IS NOT TRUE') AS `IF(my_binary_30, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 105 OR select_id IS NULL) order by id; -IF(my_binary_30, 'IS TRUE', 'IS NOT TRUE') my_binary_30 id -IS NOT TRUE NULL 1 -IS NOT TRUE 2 -IS NOT TRUE <--------30 characters-------> 3 -IS NOT TRUE ---äÖüß@µ*$-- 4 -IS TRUE -1 5 -Warnings: -Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' -Warning 1292 Truncated incorrect DOUBLE value: '<--------30 characters------->' -Warning 1292 Truncated incorrect DOUBLE value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' -Warning 1292 Truncated incorrect DOUBLE value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IF(my_varchar_1000, 'IS TRUE', 'IS NOT TRUE'), -my_varchar_1000, id FROM t1_values; -SELECT IF(my_varchar_1000, 'IS TRUE', 'IS NOT TRUE'), -my_varchar_1000, id FROM t1_values -WHERE select_id = 104 OR select_id IS NULL order by id; -IF(my_varchar_1000, 'IS TRUE', 'IS NOT TRUE') my_varchar_1000 id -IS NOT TRUE NULL 1 -IS NOT TRUE 2 -IS NOT TRUE <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 -IS NOT TRUE ---äÖüß@µ*$-- 4 -IS TRUE -1 5 -Warnings: -Warning 1292 Truncated incorrect DOUBLE value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect DOUBLE value: ' ---äÖüß@µ*$-- ' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_varchar_1000`,'IS TRUE','IS NOT TRUE') AS `IF(my_varchar_1000, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 104 OR select_id IS NULL) order by id; -IF(my_varchar_1000, 'IS TRUE', 'IS NOT TRUE') my_varchar_1000 id -IS NOT TRUE NULL 1 -IS NOT TRUE 2 -IS NOT TRUE <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 -IS NOT TRUE ---äÖüß@µ*$-- 4 -IS TRUE -1 5 -Warnings: -Warning 1292 Truncated incorrect DOUBLE value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect DOUBLE value: ' ---äÖüß@µ*$-- ' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IF(my_char_30, 'IS TRUE', 'IS NOT TRUE'), -my_char_30, id FROM t1_values; -SELECT IF(my_char_30, 'IS TRUE', 'IS NOT TRUE'), -my_char_30, id FROM t1_values -WHERE select_id = 103 OR select_id IS NULL order by id; -IF(my_char_30, 'IS TRUE', 'IS NOT TRUE') my_char_30 id -IS NOT TRUE NULL 1 -IS NOT TRUE 2 -IS NOT TRUE <--------30 characters-------> 3 -IS NOT TRUE ---äÖüß@µ*$-- 4 -IS TRUE -1 5 -Warnings: -Warning 1292 Truncated incorrect DOUBLE value: '<--------30 characters------->' -Warning 1292 Truncated incorrect DOUBLE value: ' ---äÖüß@µ*$-- ' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_char_30`,'IS TRUE','IS NOT TRUE') AS `IF(my_char_30, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 103 OR select_id IS NULL) order by id; -IF(my_char_30, 'IS TRUE', 'IS NOT TRUE') my_char_30 id -IS NOT TRUE NULL 1 -IS NOT TRUE 2 -IS NOT TRUE <--------30 characters-------> 3 -IS NOT TRUE ---äÖüß@µ*$-- 4 -IS TRUE -1 5 -Warnings: -Warning 1292 Truncated incorrect DOUBLE value: '<--------30 characters------->' -Warning 1292 Truncated incorrect DOUBLE value: ' ---äÖüß@µ*$-- ' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CONVERT(my_varbinary_1000 USING koi8r), -my_varbinary_1000, id FROM t1_values; -SELECT CONVERT(my_varbinary_1000 USING koi8r), -my_varbinary_1000, id FROM t1_values -WHERE select_id = 102 OR select_id IS NULL order by id; -CONVERT(my_varbinary_1000 USING koi8r) my_varbinary_1000 id -NULL NULL 1 - 2 -<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 - ---???????÷@??*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_varbinary_1000` using koi8r) AS `CONVERT(my_varbinary_1000 USING koi8r)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 102 OR select_id IS NULL) order by id; -CONVERT(my_varbinary_1000 USING koi8r) my_varbinary_1000 id -NULL NULL 1 - 2 -<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 - ---???????÷@??*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CONVERT(my_binary_30 USING koi8r), -my_binary_30, id FROM t1_values; -SELECT CONVERT(my_binary_30 USING koi8r), -my_binary_30, id FROM t1_values -WHERE select_id = 101 OR select_id IS NULL order by id; -CONVERT(my_binary_30 USING koi8r) my_binary_30 id -NULL NULL 1 - 2 -<--------30 characters-------> <--------30 characters-------> 3 - ---???????÷@??*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_binary_30` using koi8r) AS `CONVERT(my_binary_30 USING koi8r)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 101 OR select_id IS NULL) order by id; -CONVERT(my_binary_30 USING koi8r) my_binary_30 id -NULL NULL 1 - 2 -<--------30 characters-------> <--------30 characters-------> 3 - ---???????÷@??*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CONVERT(my_varchar_1000 USING koi8r), -my_varchar_1000, id FROM t1_values; -SELECT CONVERT(my_varchar_1000 USING koi8r), -my_varchar_1000, id FROM t1_values -WHERE select_id = 100 OR select_id IS NULL order by id; -CONVERT(my_varchar_1000 USING koi8r) my_varchar_1000 id -NULL NULL 1 - 2 -<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 - ---????????@??*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_varchar_1000` using koi8r) AS `CONVERT(my_varchar_1000 USING koi8r)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 100 OR select_id IS NULL) order by id; -CONVERT(my_varchar_1000 USING koi8r) my_varchar_1000 id -NULL NULL 1 - 2 -<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 - ---????????@??*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CONVERT(my_char_30 USING koi8r), -my_char_30, id FROM t1_values; -SELECT CONVERT(my_char_30 USING koi8r), -my_char_30, id FROM t1_values -WHERE select_id = 99 OR select_id IS NULL order by id; -CONVERT(my_char_30 USING koi8r) my_char_30 id -NULL NULL 1 - 2 -<--------30 characters-------> <--------30 characters-------> 3 - ---????????@??*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_char_30` using koi8r) AS `CONVERT(my_char_30 USING koi8r)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 99 OR select_id IS NULL) order by id; -CONVERT(my_char_30 USING koi8r) my_char_30 id -NULL NULL 1 - 2 -<--------30 characters-------> <--------30 characters-------> 3 - ---????????@??*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CONVERT(my_varbinary_1000 USING utf8), -my_varbinary_1000, id FROM t1_values; -SELECT CONVERT(my_varbinary_1000 USING utf8), -my_varbinary_1000, id FROM t1_values -WHERE select_id = 98 OR select_id IS NULL order by id; -CONVERT(my_varbinary_1000 USING utf8) my_varbinary_1000 id -NULL NULL 1 - 2 -<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 - ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_varbinary_1000` using utf8) AS `CONVERT(my_varbinary_1000 USING utf8)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 98 OR select_id IS NULL) order by id; -CONVERT(my_varbinary_1000 USING utf8) my_varbinary_1000 id -NULL NULL 1 - 2 -<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 - ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CONVERT(my_binary_30 USING utf8), -my_binary_30, id FROM t1_values; -SELECT CONVERT(my_binary_30 USING utf8), -my_binary_30, id FROM t1_values -WHERE select_id = 97 OR select_id IS NULL order by id; -CONVERT(my_binary_30 USING utf8) my_binary_30 id -NULL NULL 1 - 2 -<--------30 characters-------> <--------30 characters-------> 3 - ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_binary_30` using utf8) AS `CONVERT(my_binary_30 USING utf8)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 97 OR select_id IS NULL) order by id; -CONVERT(my_binary_30 USING utf8) my_binary_30 id -NULL NULL 1 - 2 -<--------30 characters-------> <--------30 characters-------> 3 - ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CONVERT(my_varchar_1000 USING utf8), -my_varchar_1000, id FROM t1_values; -SELECT CONVERT(my_varchar_1000 USING utf8), -my_varchar_1000, id FROM t1_values -WHERE select_id = 96 OR select_id IS NULL order by id; -CONVERT(my_varchar_1000 USING utf8) my_varchar_1000 id -NULL NULL 1 - 2 -<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 - ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_varchar_1000` using utf8) AS `CONVERT(my_varchar_1000 USING utf8)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 96 OR select_id IS NULL) order by id; -CONVERT(my_varchar_1000 USING utf8) my_varchar_1000 id -NULL NULL 1 - 2 -<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 - ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CONVERT(my_char_30 USING utf8), -my_char_30, id FROM t1_values; -SELECT CONVERT(my_char_30 USING utf8), -my_char_30, id FROM t1_values -WHERE select_id = 95 OR select_id IS NULL order by id; -CONVERT(my_char_30 USING utf8) my_char_30 id -NULL NULL 1 - 2 -<--------30 characters-------> <--------30 characters-------> 3 - ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_char_30` using utf8) AS `CONVERT(my_char_30 USING utf8)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 95 OR select_id IS NULL) order by id; -CONVERT(my_char_30 USING utf8) my_char_30 id -NULL NULL 1 - 2 -<--------30 characters-------> <--------30 characters-------> 3 - ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_year AS UNSIGNED INTEGER), -my_year, id FROM t1_values; -SELECT CAST(my_year AS UNSIGNED INTEGER), -my_year, id FROM t1_values -WHERE select_id = 94 OR select_id IS NULL order by id; -CAST(my_year AS UNSIGNED INTEGER) my_year id -NULL NULL 1 -1901 1901 2 -2155 2155 3 -2000 2000 4 -2005 2005 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as unsigned) AS `CAST(my_year AS UNSIGNED INTEGER)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 94 OR select_id IS NULL) order by id; -CAST(my_year AS UNSIGNED INTEGER) my_year id -NULL NULL 1 -1901 1901 2 -2155 2155 3 -2000 2000 4 -2005 2005 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_time AS UNSIGNED INTEGER), -my_time, id FROM t1_values; -SELECT CAST(my_time AS UNSIGNED INTEGER), -my_time, id FROM t1_values -WHERE select_id = 93 OR select_id IS NULL order by id; -CAST(my_time AS UNSIGNED INTEGER) my_time id -NULL NULL 1 -18446744073701165657 -838:59:59 2 -8385959 838:59:59 3 -130000 13:00:00 4 -100000 10:00:00 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as unsigned) AS `CAST(my_time AS UNSIGNED INTEGER)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 93 OR select_id IS NULL) order by id; -CAST(my_time AS UNSIGNED INTEGER) my_time id -NULL NULL 1 -18446744073701165657 -838:59:59 2 -8385959 838:59:59 3 -130000 13:00:00 4 -100000 10:00:00 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_timestamp AS UNSIGNED INTEGER), -my_timestamp, id FROM t1_values; -SELECT CAST(my_timestamp AS UNSIGNED INTEGER), -my_timestamp, id FROM t1_values -WHERE select_id = 92 OR select_id IS NULL order by id; -CAST(my_timestamp AS UNSIGNED INTEGER) my_timestamp id -0 0000-00-00 00:00:00 1 -19700101030001 1970-01-01 03:00:01 2 -20380101025959 2038-01-01 02:59:59 3 -20040229235959 2004-02-29 23:59:59 4 -20050628100000 2005-06-28 10:00:00 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as unsigned) AS `CAST(my_timestamp AS UNSIGNED INTEGER)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 92 OR select_id IS NULL) order by id; -CAST(my_timestamp AS UNSIGNED INTEGER) my_timestamp id -0 0000-00-00 00:00:00 1 -19700101030001 1970-01-01 03:00:01 2 -20380101025959 2038-01-01 02:59:59 3 -20040229235959 2004-02-29 23:59:59 4 -20050628100000 2005-06-28 10:00:00 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_date AS UNSIGNED INTEGER), -my_date, id FROM t1_values; -SELECT CAST(my_date AS UNSIGNED INTEGER), -my_date, id FROM t1_values -WHERE select_id = 91 OR select_id IS NULL order by id; -CAST(my_date AS UNSIGNED INTEGER) my_date id -NULL NULL 1 -10101 0001-01-01 2 -99991231 9999-12-31 3 -20040229 2004-02-29 4 -20050628 2005-06-28 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as unsigned) AS `CAST(my_date AS UNSIGNED INTEGER)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 91 OR select_id IS NULL) order by id; -CAST(my_date AS UNSIGNED INTEGER) my_date id -NULL NULL 1 -10101 0001-01-01 2 -99991231 9999-12-31 3 -20040229 2004-02-29 4 -20050628 2005-06-28 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_datetime AS UNSIGNED INTEGER), -my_datetime, id FROM t1_values; -SELECT CAST(my_datetime AS UNSIGNED INTEGER), -my_datetime, id FROM t1_values -WHERE select_id = 90 OR select_id IS NULL order by id; -CAST(my_datetime AS UNSIGNED INTEGER) my_datetime id -NULL NULL 1 -10101000000 0001-01-01 00:00:00 2 -99991231235959 9999-12-31 23:59:59 3 -20040229235959 2004-02-29 23:59:59 4 -20050628100000 2005-06-28 10:00:00 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as unsigned) AS `CAST(my_datetime AS UNSIGNED INTEGER)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 90 OR select_id IS NULL) order by id; -CAST(my_datetime AS UNSIGNED INTEGER) my_datetime id -NULL NULL 1 -10101000000 0001-01-01 00:00:00 2 -99991231235959 9999-12-31 23:59:59 3 -20040229235959 2004-02-29 23:59:59 4 -20050628100000 2005-06-28 10:00:00 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_double AS UNSIGNED INTEGER), -my_double, id FROM t1_values; -SELECT CAST(my_double AS UNSIGNED INTEGER), -my_double, id FROM t1_values -WHERE select_id = 89 OR select_id IS NULL order by id; -CAST(my_double AS UNSIGNED INTEGER) my_double id -NULL NULL 1 -9223372036854775808 -1.7976931348623e308 2 -9223372036854775807 1.7976931348623e308 3 -0 0 4 -18446744073709551615 -1 5 -Warnings: -Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e308' -Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e308' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as unsigned) AS `CAST(my_double AS UNSIGNED INTEGER)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 89 OR select_id IS NULL) order by id; -CAST(my_double AS UNSIGNED INTEGER) my_double id -NULL NULL 1 -9223372036854775808 -1.7976931348623e308 2 -9223372036854775807 1.7976931348623e308 3 -0 0 4 -18446744073709551615 -1 5 -Warnings: -Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e308' -Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e308' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_decimal AS UNSIGNED INTEGER), -my_decimal, id FROM t1_values; -SELECT CAST(my_decimal AS UNSIGNED INTEGER), -my_decimal, id FROM t1_values -WHERE select_id = 88 OR select_id IS NULL order by id; -CAST(my_decimal AS UNSIGNED INTEGER) my_decimal id -NULL NULL 1 -0 -9999999999999999999999999999999999.999999999999999999999999999999 2 -18446744073709551615 9999999999999999999999999999999999.999999999999999999999999999999 3 -0 0.000000000000000000000000000000 4 -0 -1.000000000000000000000000000000 5 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' -Warning 1292 Truncated incorrect DECIMAL value: '' -Warning 1292 Truncated incorrect DECIMAL value: '' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as unsigned) AS `CAST(my_decimal AS UNSIGNED INTEGER)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 88 OR select_id IS NULL) order by id; -CAST(my_decimal AS UNSIGNED INTEGER) my_decimal id -NULL NULL 1 -0 -9999999999999999999999999999999999.999999999999999999999999999999 2 -18446744073709551615 9999999999999999999999999999999999.999999999999999999999999999999 3 -0 0.000000000000000000000000000000 4 -0 -1.000000000000000000000000000000 5 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' -Warning 1292 Truncated incorrect DECIMAL value: '' -Warning 1292 Truncated incorrect DECIMAL value: '' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_bigint AS UNSIGNED INTEGER), -my_bigint, id FROM t1_values; -SELECT CAST(my_bigint AS UNSIGNED INTEGER), -my_bigint, id FROM t1_values -WHERE select_id = 87 OR select_id IS NULL order by id; -CAST(my_bigint AS UNSIGNED INTEGER) my_bigint id -NULL NULL 1 -9223372036854775808 -9223372036854775808 2 -9223372036854775807 9223372036854775807 3 -0 0 4 -18446744073709551615 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as unsigned) AS `CAST(my_bigint AS UNSIGNED INTEGER)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 87 OR select_id IS NULL) order by id; -CAST(my_bigint AS UNSIGNED INTEGER) my_bigint id -NULL NULL 1 -9223372036854775808 -9223372036854775808 2 -9223372036854775807 9223372036854775807 3 -0 0 4 -18446744073709551615 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS UNSIGNED INTEGER), -my_varbinary_1000, id FROM t1_values; -SELECT CAST(my_varbinary_1000 AS UNSIGNED INTEGER), -my_varbinary_1000, id FROM t1_values -WHERE select_id = 86 OR select_id IS NULL order by id; -CAST(my_varbinary_1000 AS UNSIGNED INTEGER) my_varbinary_1000 id -NULL NULL 1 -0 2 -0 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 -0 ---äÖüß@µ*$-- 4 -18446744073709551615 -1 5 -Warnings: -Warning 1292 Truncated incorrect INTEGER value: '' -Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- ' -Warning 1105 Cast to unsigned converted negative integer to it's positive complement -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as unsigned) AS `CAST(my_varbinary_1000 AS UNSIGNED INTEGER)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 86 OR select_id IS NULL) order by id; -CAST(my_varbinary_1000 AS UNSIGNED INTEGER) my_varbinary_1000 id -NULL NULL 1 -0 2 -0 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 -0 ---äÖüß@µ*$-- 4 -18446744073709551615 -1 5 -Warnings: -Warning 1292 Truncated incorrect INTEGER value: '' -Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- ' -Warning 1105 Cast to unsigned converted negative integer to it's positive complement -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS UNSIGNED INTEGER), -my_binary_30, id FROM t1_values; -SELECT CAST(my_binary_30 AS UNSIGNED INTEGER), -my_binary_30, id FROM t1_values -WHERE select_id = 85 OR select_id IS NULL order by id; -CAST(my_binary_30 AS UNSIGNED INTEGER) my_binary_30 id -NULL NULL 1 -0 2 -0 <--------30 characters-------> 3 -0 ---äÖüß@µ*$-- 4 -18446744073709551615 -1 5 -Warnings: -Warning 1292 Truncated incorrect INTEGER value: '' -Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->' -Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- ' -Warning 1292 Truncated incorrect INTEGER value: '-1' -Warning 1105 Cast to unsigned converted negative integer to it's positive complement -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as unsigned) AS `CAST(my_binary_30 AS UNSIGNED INTEGER)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 85 OR select_id IS NULL) order by id; -CAST(my_binary_30 AS UNSIGNED INTEGER) my_binary_30 id -NULL NULL 1 -0 2 -0 <--------30 characters-------> 3 -0 ---äÖüß@µ*$-- 4 -18446744073709551615 -1 5 -Warnings: -Warning 1292 Truncated incorrect INTEGER value: '' -Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->' -Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- ' -Warning 1292 Truncated incorrect INTEGER value: '-1' -Warning 1105 Cast to unsigned converted negative integer to it's positive complement -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS UNSIGNED INTEGER), -my_varchar_1000, id FROM t1_values; -SELECT CAST(my_varchar_1000 AS UNSIGNED INTEGER), -my_varchar_1000, id FROM t1_values -WHERE select_id = 84 OR select_id IS NULL order by id; -CAST(my_varchar_1000 AS UNSIGNED INTEGER) my_varchar_1000 id -NULL NULL 1 -0 2 -0 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 -0 ---äÖüß@µ*$-- 4 -18446744073709551615 -1 5 -Warnings: -Warning 1292 Truncated incorrect INTEGER value: '' -Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- ' -Warning 1105 Cast to unsigned converted negative integer to it's positive complement -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as unsigned) AS `CAST(my_varchar_1000 AS UNSIGNED INTEGER)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 84 OR select_id IS NULL) order by id; -CAST(my_varchar_1000 AS UNSIGNED INTEGER) my_varchar_1000 id -NULL NULL 1 -0 2 -0 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 -0 ---äÖüß@µ*$-- 4 -18446744073709551615 -1 5 -Warnings: -Warning 1292 Truncated incorrect INTEGER value: '' -Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- ' -Warning 1105 Cast to unsigned converted negative integer to it's positive complement -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_char_30 AS UNSIGNED INTEGER), -my_char_30, id FROM t1_values; -SELECT CAST(my_char_30 AS UNSIGNED INTEGER), -my_char_30, id FROM t1_values -WHERE select_id = 83 OR select_id IS NULL order by id; -CAST(my_char_30 AS UNSIGNED INTEGER) my_char_30 id -NULL NULL 1 -0 2 -0 <--------30 characters-------> 3 -0 ---äÖüß@µ*$-- 4 -18446744073709551615 -1 5 -Warnings: -Warning 1292 Truncated incorrect INTEGER value: '' -Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->' -Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$--' -Warning 1105 Cast to unsigned converted negative integer to it's positive complement -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as unsigned) AS `CAST(my_char_30 AS UNSIGNED INTEGER)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 83 OR select_id IS NULL) order by id; -CAST(my_char_30 AS UNSIGNED INTEGER) my_char_30 id -NULL NULL 1 -0 2 -0 <--------30 characters-------> 3 -0 ---äÖüß@µ*$-- 4 -18446744073709551615 -1 5 -Warnings: -Warning 1292 Truncated incorrect INTEGER value: '' -Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->' -Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$--' -Warning 1105 Cast to unsigned converted negative integer to it's positive complement -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_year AS SIGNED INTEGER), -my_year, id FROM t1_values; -SELECT CAST(my_year AS SIGNED INTEGER), -my_year, id FROM t1_values -WHERE select_id = 82 OR select_id IS NULL order by id; -CAST(my_year AS SIGNED INTEGER) my_year id -NULL NULL 1 -1901 1901 2 -2155 2155 3 -2000 2000 4 -2005 2005 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as signed) AS `CAST(my_year AS SIGNED INTEGER)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 82 OR select_id IS NULL) order by id; -CAST(my_year AS SIGNED INTEGER) my_year id -NULL NULL 1 -1901 1901 2 -2155 2155 3 -2000 2000 4 -2005 2005 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_time AS SIGNED INTEGER), -my_time, id FROM t1_values; -SELECT CAST(my_time AS SIGNED INTEGER), -my_time, id FROM t1_values -WHERE select_id = 81 OR select_id IS NULL order by id; -CAST(my_time AS SIGNED INTEGER) my_time id -NULL NULL 1 --8385959 -838:59:59 2 -8385959 838:59:59 3 -130000 13:00:00 4 -100000 10:00:00 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as signed) AS `CAST(my_time AS SIGNED INTEGER)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 81 OR select_id IS NULL) order by id; -CAST(my_time AS SIGNED INTEGER) my_time id -NULL NULL 1 --8385959 -838:59:59 2 -8385959 838:59:59 3 -130000 13:00:00 4 -100000 10:00:00 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_timestamp AS SIGNED INTEGER), -my_timestamp, id FROM t1_values; -SELECT CAST(my_timestamp AS SIGNED INTEGER), -my_timestamp, id FROM t1_values -WHERE select_id = 80 OR select_id IS NULL order by id; -CAST(my_timestamp AS SIGNED INTEGER) my_timestamp id -0 0000-00-00 00:00:00 1 -19700101030001 1970-01-01 03:00:01 2 -20380101025959 2038-01-01 02:59:59 3 -20040229235959 2004-02-29 23:59:59 4 -20050628100000 2005-06-28 10:00:00 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as signed) AS `CAST(my_timestamp AS SIGNED INTEGER)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 80 OR select_id IS NULL) order by id; -CAST(my_timestamp AS SIGNED INTEGER) my_timestamp id -0 0000-00-00 00:00:00 1 -19700101030001 1970-01-01 03:00:01 2 -20380101025959 2038-01-01 02:59:59 3 -20040229235959 2004-02-29 23:59:59 4 -20050628100000 2005-06-28 10:00:00 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_date AS SIGNED INTEGER), -my_date, id FROM t1_values; -SELECT CAST(my_date AS SIGNED INTEGER), -my_date, id FROM t1_values -WHERE select_id = 79 OR select_id IS NULL order by id; -CAST(my_date AS SIGNED INTEGER) my_date id -NULL NULL 1 -10101 0001-01-01 2 -99991231 9999-12-31 3 -20040229 2004-02-29 4 -20050628 2005-06-28 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as signed) AS `CAST(my_date AS SIGNED INTEGER)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 79 OR select_id IS NULL) order by id; -CAST(my_date AS SIGNED INTEGER) my_date id -NULL NULL 1 -10101 0001-01-01 2 -99991231 9999-12-31 3 -20040229 2004-02-29 4 -20050628 2005-06-28 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_datetime AS SIGNED INTEGER), -my_datetime, id FROM t1_values; -SELECT CAST(my_datetime AS SIGNED INTEGER), -my_datetime, id FROM t1_values -WHERE select_id = 78 OR select_id IS NULL order by id; -CAST(my_datetime AS SIGNED INTEGER) my_datetime id -NULL NULL 1 -10101000000 0001-01-01 00:00:00 2 -99991231235959 9999-12-31 23:59:59 3 -20040229235959 2004-02-29 23:59:59 4 -20050628100000 2005-06-28 10:00:00 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as signed) AS `CAST(my_datetime AS SIGNED INTEGER)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 78 OR select_id IS NULL) order by id; -CAST(my_datetime AS SIGNED INTEGER) my_datetime id -NULL NULL 1 -10101000000 0001-01-01 00:00:00 2 -99991231235959 9999-12-31 23:59:59 3 -20040229235959 2004-02-29 23:59:59 4 -20050628100000 2005-06-28 10:00:00 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_double AS SIGNED INTEGER), -my_double, id FROM t1_values; -SELECT CAST(my_double AS SIGNED INTEGER), -my_double, id FROM t1_values -WHERE select_id = 77 OR select_id IS NULL order by id; -CAST(my_double AS SIGNED INTEGER) my_double id -NULL NULL 1 --9223372036854775808 -1.7976931348623e308 2 -9223372036854775807 1.7976931348623e308 3 -0 0 4 --1 -1 5 -Warnings: -Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e308' -Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e308' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as signed) AS `CAST(my_double AS SIGNED INTEGER)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 77 OR select_id IS NULL) order by id; -CAST(my_double AS SIGNED INTEGER) my_double id -NULL NULL 1 --9223372036854775808 -1.7976931348623e308 2 -9223372036854775807 1.7976931348623e308 3 -0 0 4 --1 -1 5 -Warnings: -Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e308' -Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e308' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_decimal AS SIGNED INTEGER), -my_decimal, id FROM t1_values; -SELECT CAST(my_decimal AS SIGNED INTEGER), -my_decimal, id FROM t1_values -WHERE select_id = 76 OR select_id IS NULL order by id; -CAST(my_decimal AS SIGNED INTEGER) my_decimal id -NULL NULL 1 --9223372036854775808 -9999999999999999999999999999999999.999999999999999999999999999999 2 -9223372036854775807 9999999999999999999999999999999999.999999999999999999999999999999 3 -0 0.000000000000000000000000000000 4 --1 -1.000000000000000000000000000000 5 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' -Warning 1292 Truncated incorrect DECIMAL value: '' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as signed) AS `CAST(my_decimal AS SIGNED INTEGER)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 76 OR select_id IS NULL) order by id; -CAST(my_decimal AS SIGNED INTEGER) my_decimal id -NULL NULL 1 --9223372036854775808 -9999999999999999999999999999999999.999999999999999999999999999999 2 -9223372036854775807 9999999999999999999999999999999999.999999999999999999999999999999 3 -0 0.000000000000000000000000000000 4 --1 -1.000000000000000000000000000000 5 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' -Warning 1292 Truncated incorrect DECIMAL value: '' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_bigint AS SIGNED INTEGER), -my_bigint, id FROM t1_values; -SELECT CAST(my_bigint AS SIGNED INTEGER), -my_bigint, id FROM t1_values -WHERE select_id = 75 OR select_id IS NULL order by id; -CAST(my_bigint AS SIGNED INTEGER) my_bigint id -NULL NULL 1 --9223372036854775808 -9223372036854775808 2 -9223372036854775807 9223372036854775807 3 -0 0 4 --1 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as signed) AS `CAST(my_bigint AS SIGNED INTEGER)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 75 OR select_id IS NULL) order by id; -CAST(my_bigint AS SIGNED INTEGER) my_bigint id -NULL NULL 1 --9223372036854775808 -9223372036854775808 2 -9223372036854775807 9223372036854775807 3 -0 0 4 --1 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS SIGNED INTEGER), -my_varbinary_1000, id FROM t1_values; -SELECT CAST(my_varbinary_1000 AS SIGNED INTEGER), -my_varbinary_1000, id FROM t1_values -WHERE select_id = 74 OR select_id IS NULL order by id; -CAST(my_varbinary_1000 AS SIGNED INTEGER) my_varbinary_1000 id -NULL NULL 1 -0 2 -0 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 -0 ---äÖüß@µ*$-- 4 --1 -1 5 -Warnings: -Warning 1292 Truncated incorrect INTEGER value: '' -Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- ' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as signed) AS `CAST(my_varbinary_1000 AS SIGNED INTEGER)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 74 OR select_id IS NULL) order by id; -CAST(my_varbinary_1000 AS SIGNED INTEGER) my_varbinary_1000 id -NULL NULL 1 -0 2 -0 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 -0 ---äÖüß@µ*$-- 4 --1 -1 5 -Warnings: -Warning 1292 Truncated incorrect INTEGER value: '' -Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- ' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS SIGNED INTEGER), -my_binary_30, id FROM t1_values; -SELECT CAST(my_binary_30 AS SIGNED INTEGER), -my_binary_30, id FROM t1_values -WHERE select_id = 73 OR select_id IS NULL order by id; -CAST(my_binary_30 AS SIGNED INTEGER) my_binary_30 id -NULL NULL 1 -0 2 -0 <--------30 characters-------> 3 -0 ---äÖüß@µ*$-- 4 --1 -1 5 -Warnings: -Warning 1292 Truncated incorrect INTEGER value: '' -Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->' -Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- ' -Warning 1292 Truncated incorrect INTEGER value: '-1' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as signed) AS `CAST(my_binary_30 AS SIGNED INTEGER)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 73 OR select_id IS NULL) order by id; -CAST(my_binary_30 AS SIGNED INTEGER) my_binary_30 id -NULL NULL 1 -0 2 -0 <--------30 characters-------> 3 -0 ---äÖüß@µ*$-- 4 --1 -1 5 -Warnings: -Warning 1292 Truncated incorrect INTEGER value: '' -Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->' -Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- ' -Warning 1292 Truncated incorrect INTEGER value: '-1' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS SIGNED INTEGER), -my_varchar_1000, id FROM t1_values; -SELECT CAST(my_varchar_1000 AS SIGNED INTEGER), -my_varchar_1000, id FROM t1_values -WHERE select_id = 72 OR select_id IS NULL order by id; -CAST(my_varchar_1000 AS SIGNED INTEGER) my_varchar_1000 id -NULL NULL 1 -0 2 -0 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 -0 ---äÖüß@µ*$-- 4 --1 -1 5 -Warnings: -Warning 1292 Truncated incorrect INTEGER value: '' -Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- ' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as signed) AS `CAST(my_varchar_1000 AS SIGNED INTEGER)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 72 OR select_id IS NULL) order by id; -CAST(my_varchar_1000 AS SIGNED INTEGER) my_varchar_1000 id -NULL NULL 1 -0 2 -0 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 -0 ---äÖüß@µ*$-- 4 --1 -1 5 -Warnings: -Warning 1292 Truncated incorrect INTEGER value: '' -Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- ' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_char_30 AS SIGNED INTEGER), -my_char_30, id FROM t1_values; -SELECT CAST(my_char_30 AS SIGNED INTEGER), -my_char_30, id FROM t1_values -WHERE select_id = 71 OR select_id IS NULL order by id; -CAST(my_char_30 AS SIGNED INTEGER) my_char_30 id -NULL NULL 1 -0 2 -0 <--------30 characters-------> 3 -0 ---äÖüß@µ*$-- 4 --1 -1 5 -Warnings: -Warning 1292 Truncated incorrect INTEGER value: '' -Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->' -Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$--' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as signed) AS `CAST(my_char_30 AS SIGNED INTEGER)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 71 OR select_id IS NULL) order by id; -CAST(my_char_30 AS SIGNED INTEGER) my_char_30 id -NULL NULL 1 -0 2 -0 <--------30 characters-------> 3 -0 ---äÖüß@µ*$-- 4 --1 -1 5 -Warnings: -Warning 1292 Truncated incorrect INTEGER value: '' -Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->' -Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$--' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_year AS DECIMAL(37,2)), -my_year, id FROM t1_values; -SELECT CAST(my_year AS DECIMAL(37,2)), -my_year, id FROM t1_values -WHERE select_id = 70 OR select_id IS NULL order by id; -CAST(my_year AS DECIMAL(37,2)) my_year id -NULL NULL 1 -1901.00 1901 2 -2155.00 2155 3 -2000.00 2000 4 -2005.00 2005 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as decimal(37,2)) AS `CAST(my_year AS DECIMAL(37,2))`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 70 OR select_id IS NULL) order by id; -CAST(my_year AS DECIMAL(37,2)) my_year id -NULL NULL 1 -1901.00 1901 2 -2155.00 2155 3 -2000.00 2000 4 -2005.00 2005 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_time AS DECIMAL(37,2)), -my_time, id FROM t1_values; -SELECT CAST(my_time AS DECIMAL(37,2)), -my_time, id FROM t1_values -WHERE select_id = 69 OR select_id IS NULL order by id; -CAST(my_time AS DECIMAL(37,2)) my_time id -NULL NULL 1 --8385959.00 -838:59:59 2 -8385959.00 838:59:59 3 -130000.00 13:00:00 4 -100000.00 10:00:00 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as decimal(37,2)) AS `CAST(my_time AS DECIMAL(37,2))`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 69 OR select_id IS NULL) order by id; -CAST(my_time AS DECIMAL(37,2)) my_time id -NULL NULL 1 --8385959.00 -838:59:59 2 -8385959.00 838:59:59 3 -130000.00 13:00:00 4 -100000.00 10:00:00 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_timestamp AS DECIMAL(37,2)), -my_timestamp, id FROM t1_values; -SELECT CAST(my_timestamp AS DECIMAL(37,2)), -my_timestamp, id FROM t1_values -WHERE select_id = 68 OR select_id IS NULL order by id; -CAST(my_timestamp AS DECIMAL(37,2)) my_timestamp id -0.00 0000-00-00 00:00:00 1 -19700101030001.00 1970-01-01 03:00:01 2 -20380101025959.00 2038-01-01 02:59:59 3 -20040229235959.00 2004-02-29 23:59:59 4 -20050628100000.00 2005-06-28 10:00:00 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as decimal(37,2)) AS `CAST(my_timestamp AS DECIMAL(37,2))`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 68 OR select_id IS NULL) order by id; -CAST(my_timestamp AS DECIMAL(37,2)) my_timestamp id -0.00 0000-00-00 00:00:00 1 -19700101030001.00 1970-01-01 03:00:01 2 -20380101025959.00 2038-01-01 02:59:59 3 -20040229235959.00 2004-02-29 23:59:59 4 -20050628100000.00 2005-06-28 10:00:00 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_date AS DECIMAL(37,2)), -my_date, id FROM t1_values; -SELECT CAST(my_date AS DECIMAL(37,2)), -my_date, id FROM t1_values -WHERE select_id = 67 OR select_id IS NULL order by id; -CAST(my_date AS DECIMAL(37,2)) my_date id -NULL NULL 1 -10101.00 0001-01-01 2 -99991231.00 9999-12-31 3 -20040229.00 2004-02-29 4 -20050628.00 2005-06-28 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as decimal(37,2)) AS `CAST(my_date AS DECIMAL(37,2))`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 67 OR select_id IS NULL) order by id; -CAST(my_date AS DECIMAL(37,2)) my_date id -NULL NULL 1 -10101.00 0001-01-01 2 -99991231.00 9999-12-31 3 -20040229.00 2004-02-29 4 -20050628.00 2005-06-28 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_datetime AS DECIMAL(37,2)), -my_datetime, id FROM t1_values; -SELECT CAST(my_datetime AS DECIMAL(37,2)), -my_datetime, id FROM t1_values -WHERE select_id = 66 OR select_id IS NULL order by id; -CAST(my_datetime AS DECIMAL(37,2)) my_datetime id -NULL NULL 1 -10101000000.00 0001-01-01 00:00:00 2 -99991231235959.00 9999-12-31 23:59:59 3 -20040229235959.00 2004-02-29 23:59:59 4 -20050628100000.00 2005-06-28 10:00:00 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as decimal(37,2)) AS `CAST(my_datetime AS DECIMAL(37,2))`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 66 OR select_id IS NULL) order by id; -CAST(my_datetime AS DECIMAL(37,2)) my_datetime id -NULL NULL 1 -10101000000.00 0001-01-01 00:00:00 2 -99991231235959.00 9999-12-31 23:59:59 3 -20040229235959.00 2004-02-29 23:59:59 4 -20050628100000.00 2005-06-28 10:00:00 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_double AS DECIMAL(37,2)), -my_double, id FROM t1_values; -SELECT CAST(my_double AS DECIMAL(37,2)), -my_double, id FROM t1_values -WHERE select_id = 65 OR select_id IS NULL order by id; -CAST(my_double AS DECIMAL(37,2)) my_double id -NULL NULL 1 --99999999999999999999999999999999999.99 -1.7976931348623e308 2 -99999999999999999999999999999999999.99 1.7976931348623e308 3 -0.00 0 4 --1.00 -1 5 --3333.33 -3333.3333 30 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' -Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 -Warning 1292 Truncated incorrect DECIMAL value: '' -Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as decimal(37,2)) AS `CAST(my_double AS DECIMAL(37,2))`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 65 OR select_id IS NULL) order by id; -CAST(my_double AS DECIMAL(37,2)) my_double id -NULL NULL 1 --99999999999999999999999999999999999.99 -1.7976931348623e308 2 -99999999999999999999999999999999999.99 1.7976931348623e308 3 -0.00 0 4 --1.00 -1 5 --3333.33 -3333.3333 30 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' -Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 -Warning 1292 Truncated incorrect DECIMAL value: '' -Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_decimal AS DECIMAL(37,2)), -my_decimal, id FROM t1_values; -SELECT CAST(my_decimal AS DECIMAL(37,2)), -my_decimal, id FROM t1_values -WHERE select_id = 64 OR select_id IS NULL order by id; -CAST(my_decimal AS DECIMAL(37,2)) my_decimal id -NULL NULL 1 --10000000000000000000000000000000000.00 -9999999999999999999999999999999999.999999999999999999999999999999 2 -10000000000000000000000000000000000.00 9999999999999999999999999999999999.999999999999999999999999999999 3 -0.00 0.000000000000000000000000000000 4 --1.00 -1.000000000000000000000000000000 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as decimal(37,2)) AS `CAST(my_decimal AS DECIMAL(37,2))`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 64 OR select_id IS NULL) order by id; -CAST(my_decimal AS DECIMAL(37,2)) my_decimal id -NULL NULL 1 --10000000000000000000000000000000000.00 -9999999999999999999999999999999999.999999999999999999999999999999 2 -10000000000000000000000000000000000.00 9999999999999999999999999999999999.999999999999999999999999999999 3 -0.00 0.000000000000000000000000000000 4 --1.00 -1.000000000000000000000000000000 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_bigint AS DECIMAL(37,2)), -my_bigint, id FROM t1_values; -SELECT CAST(my_bigint AS DECIMAL(37,2)), -my_bigint, id FROM t1_values -WHERE select_id = 63 OR select_id IS NULL order by id; -CAST(my_bigint AS DECIMAL(37,2)) my_bigint id -NULL NULL 1 --9223372036854775808.00 -9223372036854775808 2 -9223372036854775807.00 9223372036854775807 3 -0.00 0 4 --1.00 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as decimal(37,2)) AS `CAST(my_bigint AS DECIMAL(37,2))`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 63 OR select_id IS NULL) order by id; -CAST(my_bigint AS DECIMAL(37,2)) my_bigint id -NULL NULL 1 --9223372036854775808.00 -9223372036854775808 2 -9223372036854775807.00 9223372036854775807 3 -0.00 0 4 --1.00 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS DECIMAL(37,2)), -my_varbinary_1000, id FROM t1_values; -SELECT CAST(my_varbinary_1000 AS DECIMAL(37,2)), -my_varbinary_1000, id FROM t1_values -WHERE select_id = 62 OR select_id IS NULL order by id; -CAST(my_varbinary_1000 AS DECIMAL(37,2)) my_varbinary_1000 id -NULL NULL 1 -0.00 2 -0.00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 -0.00 ---äÖüß@µ*$-- 4 --1.00 -1 5 --3333.33 -3333.3333 29 -Warnings: -Warning 1366 Incorrect decimal value: '' for column '' at row -1 -Warning 1292 Truncated incorrect DECIMAL value: '' -Warning 1366 Incorrect decimal value: '' for column '' at row -1 -Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1366 Incorrect decimal value: '' for column '' at row -1 -Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- ' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as decimal(37,2)) AS `CAST(my_varbinary_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 62 OR select_id IS NULL) order by id; -CAST(my_varbinary_1000 AS DECIMAL(37,2)) my_varbinary_1000 id -NULL NULL 1 -0.00 2 -0.00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 -0.00 ---äÖüß@µ*$-- 4 --1.00 -1 5 --3333.33 -3333.3333 29 -Warnings: -Warning 1366 Incorrect decimal value: '' for column '' at row -1 -Warning 1292 Truncated incorrect DECIMAL value: '' -Warning 1366 Incorrect decimal value: '' for column '' at row -1 -Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1366 Incorrect decimal value: '' for column '' at row -1 -Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- ' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS DECIMAL(37,2)), -my_binary_30, id FROM t1_values; -SELECT CAST(my_binary_30 AS DECIMAL(37,2)), -my_binary_30, id FROM t1_values -WHERE select_id = 61 OR select_id IS NULL order by id; -CAST(my_binary_30 AS DECIMAL(37,2)) my_binary_30 id -NULL NULL 1 -0.00 2 -0.00 <--------30 characters-------> 3 -0.00 ---äÖüß@µ*$-- 4 --1.00 -1 5 --3333.33 -3333.3333 28 -Warnings: -Warning 1366 Incorrect decimal value: '' for column '' at row -1 -Warning 1292 Truncated incorrect DECIMAL value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' -Warning 1366 Incorrect decimal value: '' for column '' at row -1 -Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->' -Warning 1366 Incorrect decimal value: '' for column '' at row -1 -Warning 1292 Truncated incorrect DECIMAL value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' -Warning 1292 Truncated incorrect DECIMAL value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' -Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as decimal(37,2)) AS `CAST(my_binary_30 AS DECIMAL(37,2))`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 61 OR select_id IS NULL) order by id; -CAST(my_binary_30 AS DECIMAL(37,2)) my_binary_30 id -NULL NULL 1 -0.00 2 -0.00 <--------30 characters-------> 3 -0.00 ---äÖüß@µ*$-- 4 --1.00 -1 5 --3333.33 -3333.3333 28 -Warnings: -Warning 1366 Incorrect decimal value: '' for column '' at row -1 -Warning 1292 Truncated incorrect DECIMAL value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' -Warning 1366 Incorrect decimal value: '' for column '' at row -1 -Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->' -Warning 1366 Incorrect decimal value: '' for column '' at row -1 -Warning 1292 Truncated incorrect DECIMAL value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' -Warning 1292 Truncated incorrect DECIMAL value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' -Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS DECIMAL(37,2)), -my_varchar_1000, id FROM t1_values; -SELECT CAST(my_varchar_1000 AS DECIMAL(37,2)), -my_varchar_1000, id FROM t1_values -WHERE select_id = 60 OR select_id IS NULL order by id; -CAST(my_varchar_1000 AS DECIMAL(37,2)) my_varchar_1000 id -NULL NULL 1 -0.00 2 -0.00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 -0.00 ---äÖüß@µ*$-- 4 --1.00 -1 5 --3333.33 -3333.3333 27 -Warnings: -Warning 1366 Incorrect decimal value: '' for column '' at row -1 -Warning 1292 Truncated incorrect DECIMAL value: '' -Warning 1366 Incorrect decimal value: '' for column '' at row -1 -Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1366 Incorrect decimal value: '' for column '' at row -1 -Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- ' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as decimal(37,2)) AS `CAST(my_varchar_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 60 OR select_id IS NULL) order by id; -CAST(my_varchar_1000 AS DECIMAL(37,2)) my_varchar_1000 id -NULL NULL 1 -0.00 2 -0.00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 -0.00 ---äÖüß@µ*$-- 4 --1.00 -1 5 --3333.33 -3333.3333 27 -Warnings: -Warning 1366 Incorrect decimal value: '' for column '' at row -1 -Warning 1292 Truncated incorrect DECIMAL value: '' -Warning 1366 Incorrect decimal value: '' for column '' at row -1 -Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1366 Incorrect decimal value: '' for column '' at row -1 -Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- ' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_char_30 AS DECIMAL(37,2)), -my_char_30, id FROM t1_values; -SELECT CAST(my_char_30 AS DECIMAL(37,2)), -my_char_30, id FROM t1_values -WHERE select_id = 59 OR select_id IS NULL order by id; -CAST(my_char_30 AS DECIMAL(37,2)) my_char_30 id -NULL NULL 1 -0.00 2 -0.00 <--------30 characters-------> 3 -0.00 ---äÖüß@µ*$-- 4 --1.00 -1 5 --3333.33 -3333.3333 26 -Warnings: -Warning 1366 Incorrect decimal value: '' for column '' at row -1 -Warning 1292 Truncated incorrect DECIMAL value: ' ' -Warning 1366 Incorrect decimal value: '' for column '' at row -1 -Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->' -Warning 1366 Incorrect decimal value: '' for column '' at row -1 -Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- ' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as decimal(37,2)) AS `CAST(my_char_30 AS DECIMAL(37,2))`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 59 OR select_id IS NULL) order by id; -CAST(my_char_30 AS DECIMAL(37,2)) my_char_30 id -NULL NULL 1 -0.00 2 -0.00 <--------30 characters-------> 3 -0.00 ---äÖüß@µ*$-- 4 --1.00 -1 5 --3333.33 -3333.3333 26 -Warnings: -Warning 1366 Incorrect decimal value: '' for column '' at row -1 -Warning 1292 Truncated incorrect DECIMAL value: ' ' -Warning 1366 Incorrect decimal value: '' for column '' at row -1 -Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->' -Warning 1366 Incorrect decimal value: '' for column '' at row -1 -Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- ' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_year AS TIME), -my_year, id FROM t1_values; -SELECT CAST(my_year AS TIME), -my_year, id FROM t1_values -WHERE select_id = 58 OR select_id IS NULL order by id; -CAST(my_year AS TIME) my_year id -NULL NULL 1 -00:19:01 1901 2 -00:21:55 2155 3 -00:20:00 2000 4 -00:20:05 2005 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as time) AS `CAST(my_year AS TIME)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 58 OR select_id IS NULL) order by id; -CAST(my_year AS TIME) my_year id -NULL NULL 1 -00:19:01 1901 2 -00:21:55 2155 3 -00:20:00 2000 4 -00:20:05 2005 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_time AS TIME), -my_time, id FROM t1_values; -SELECT CAST(my_time AS TIME), -my_time, id FROM t1_values -WHERE select_id = 57 OR select_id IS NULL order by id; -CAST(my_time AS TIME) my_time id -NULL NULL 1 --838:59:59 -838:59:59 2 -838:59:59 838:59:59 3 -13:00:00 13:00:00 4 -10:00:00 10:00:00 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as time) AS `CAST(my_time AS TIME)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 57 OR select_id IS NULL) order by id; -CAST(my_time AS TIME) my_time id -NULL NULL 1 --838:59:59 -838:59:59 2 -838:59:59 838:59:59 3 -13:00:00 13:00:00 4 -10:00:00 10:00:00 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_timestamp AS TIME), -my_timestamp, id FROM t1_values; -SELECT CAST(my_timestamp AS TIME), -my_timestamp, id FROM t1_values -WHERE select_id = 56 OR select_id IS NULL order by id; -CAST(my_timestamp AS TIME) my_timestamp id -00:00:00 0000-00-00 00:00:00 1 -03:00:01 1970-01-01 03:00:01 2 -02:59:59 2038-01-01 02:59:59 3 -23:59:59 2004-02-29 23:59:59 4 -10:00:00 2005-06-28 10:00:00 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as time) AS `CAST(my_timestamp AS TIME)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 56 OR select_id IS NULL) order by id; -CAST(my_timestamp AS TIME) my_timestamp id -00:00:00 0000-00-00 00:00:00 1 -03:00:01 1970-01-01 03:00:01 2 -02:59:59 2038-01-01 02:59:59 3 -23:59:59 2004-02-29 23:59:59 4 -10:00:00 2005-06-28 10:00:00 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_date AS TIME), -my_date, id FROM t1_values; -SELECT CAST(my_date AS TIME), -my_date, id FROM t1_values -WHERE select_id = 55 OR select_id IS NULL order by id; -CAST(my_date AS TIME) my_date id -NULL NULL 1 -00:00:00 0001-01-01 2 -00:00:00 9999-12-31 3 -00:00:00 2004-02-29 4 -00:00:00 2005-06-28 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as time) AS `CAST(my_date AS TIME)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 55 OR select_id IS NULL) order by id; -CAST(my_date AS TIME) my_date id -NULL NULL 1 -00:00:00 0001-01-01 2 -00:00:00 9999-12-31 3 -00:00:00 2004-02-29 4 -00:00:00 2005-06-28 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_datetime AS TIME), -my_datetime, id FROM t1_values; -SELECT CAST(my_datetime AS TIME), -my_datetime, id FROM t1_values -WHERE select_id = 54 OR select_id IS NULL order by id; -CAST(my_datetime AS TIME) my_datetime id -NULL NULL 1 -00:00:00 0001-01-01 00:00:00 2 -23:59:59 9999-12-31 23:59:59 3 -23:59:59 2004-02-29 23:59:59 4 -10:00:00 2005-06-28 10:00:00 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as time) AS `CAST(my_datetime AS TIME)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 54 OR select_id IS NULL) order by id; -CAST(my_datetime AS TIME) my_datetime id -NULL NULL 1 -00:00:00 0001-01-01 00:00:00 2 -23:59:59 9999-12-31 23:59:59 3 -23:59:59 2004-02-29 23:59:59 4 -10:00:00 2005-06-28 10:00:00 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_double AS TIME), -my_double, id FROM t1_values; -SELECT CAST(my_double AS TIME), -my_double, id FROM t1_values -WHERE select_id = 53 OR select_id IS NULL order by id; -CAST(my_double AS TIME) my_double id -NULL NULL 1 -NULL -1.7976931348623e308 2 -NULL 1.7976931348623e308 3 -00:00:00 0 4 --00:00:01 -1 5 -00:17:58 1758 25 -Warnings: -Warning 1292 Truncated incorrect time value: '-1.7976931348623e308' -Warning 1292 Truncated incorrect time value: '1.7976931348623e308' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as time) AS `CAST(my_double AS TIME)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 53 OR select_id IS NULL) order by id; -CAST(my_double AS TIME) my_double id -NULL NULL 1 -NULL -1.7976931348623e308 2 -NULL 1.7976931348623e308 3 -00:00:00 0 4 --00:00:01 -1 5 -00:17:58 1758 25 -Warnings: -Warning 1292 Truncated incorrect time value: '-1.7976931348623e308' -Warning 1292 Truncated incorrect time value: '1.7976931348623e308' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_bigint AS TIME), -my_bigint, id FROM t1_values; -SELECT CAST(my_bigint AS TIME), -my_bigint, id FROM t1_values -WHERE select_id = 52 OR select_id IS NULL order by id; -CAST(my_bigint AS TIME) my_bigint id -NULL NULL 1 -NULL -9223372036854775808 2 -NULL 9223372036854775807 3 -00:00:00 0 4 --00:00:01 -1 5 -00:17:58 1758 24 -Warnings: -Warning 1292 Truncated incorrect time value: '-9223372036854775808' -Warning 1292 Truncated incorrect time value: '9223372036854775807' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as time) AS `CAST(my_bigint AS TIME)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 52 OR select_id IS NULL) order by id; -CAST(my_bigint AS TIME) my_bigint id -NULL NULL 1 -NULL -9223372036854775808 2 -NULL 9223372036854775807 3 -00:00:00 0 4 --00:00:01 -1 5 -00:17:58 1758 24 -Warnings: -Warning 1292 Truncated incorrect time value: '-9223372036854775808' -Warning 1292 Truncated incorrect time value: '9223372036854775807' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS TIME), -my_varbinary_1000, id FROM t1_values; -SELECT CAST(my_varbinary_1000 AS TIME), -my_varbinary_1000, id FROM t1_values -WHERE select_id = 51 OR select_id IS NULL order by id; -CAST(my_varbinary_1000 AS TIME) my_varbinary_1000 id -NULL NULL 1 -NULL 2 -00:00:00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 --00:00:00 ---äÖüß@µ*$-- 4 --00:00:01 -1 5 -41:58:00 1 17:58 23 -Warnings: -Warning 1292 Truncated incorrect time value: '' -Warning 1292 Truncated incorrect time value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect time value: ' ---äÖüß@µ*$-- ' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as time) AS `CAST(my_varbinary_1000 AS TIME)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 51 OR select_id IS NULL) order by id; -CAST(my_varbinary_1000 AS TIME) my_varbinary_1000 id -NULL NULL 1 -NULL 2 -00:00:00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 --00:00:00 ---äÖüß@µ*$-- 4 --00:00:01 -1 5 -41:58:00 1 17:58 23 -Warnings: -Warning 1292 Truncated incorrect time value: '' -Warning 1292 Truncated incorrect time value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect time value: ' ---äÖüß@µ*$-- ' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS TIME), -my_binary_30, id FROM t1_values; -SELECT CAST(my_binary_30 AS TIME), -my_binary_30, id FROM t1_values -WHERE select_id = 50 OR select_id IS NULL order by id; -CAST(my_binary_30 AS TIME) my_binary_30 id -NULL NULL 1 -00:00:00 2 -00:00:00 <--------30 characters-------> 3 --00:00:00 ---äÖüß@µ*$-- 4 -NULL -1 5 -41:58:00 1 17:58 22 -Warnings: -Warning 1292 Truncated incorrect time value: '' -Warning 1292 Truncated incorrect time value: '<--------30 characters------->' -Warning 1292 Truncated incorrect time value: ' ---äÖüß@µ*$-- ' -Warning 1292 Truncated incorrect time value: '-1' -Warning 1292 Truncated incorrect time value: '1 17:58' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as time) AS `CAST(my_binary_30 AS TIME)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 50 OR select_id IS NULL) order by id; -CAST(my_binary_30 AS TIME) my_binary_30 id -NULL NULL 1 -00:00:00 2 -00:00:00 <--------30 characters-------> 3 --00:00:00 ---äÖüß@µ*$-- 4 -NULL -1 5 -41:58:00 1 17:58 22 -Warnings: -Warning 1292 Truncated incorrect time value: '' -Warning 1292 Truncated incorrect time value: '<--------30 characters------->' -Warning 1292 Truncated incorrect time value: ' ---äÖüß@µ*$-- ' -Warning 1292 Truncated incorrect time value: '-1' -Warning 1292 Truncated incorrect time value: '1 17:58' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS TIME), -my_varchar_1000, id FROM t1_values; -SELECT CAST(my_varchar_1000 AS TIME), -my_varchar_1000, id FROM t1_values -WHERE select_id = 49 OR select_id IS NULL order by id; -CAST(my_varchar_1000 AS TIME) my_varchar_1000 id -NULL NULL 1 -NULL 2 -00:00:00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 --00:00:00 ---äÖüß@µ*$-- 4 --00:00:01 -1 5 -41:58:00 1 17:58 21 -Warnings: -Warning 1292 Truncated incorrect time value: '' -Warning 1292 Truncated incorrect time value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect time value: ' ---äÖüß@µ*$-- ' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as time) AS `CAST(my_varchar_1000 AS TIME)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 49 OR select_id IS NULL) order by id; -CAST(my_varchar_1000 AS TIME) my_varchar_1000 id -NULL NULL 1 -NULL 2 -00:00:00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 --00:00:00 ---äÖüß@µ*$-- 4 --00:00:01 -1 5 -41:58:00 1 17:58 21 -Warnings: -Warning 1292 Truncated incorrect time value: '' -Warning 1292 Truncated incorrect time value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect time value: ' ---äÖüß@µ*$-- ' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_char_30 AS TIME), -my_char_30, id FROM t1_values; -SELECT CAST(my_char_30 AS TIME), -my_char_30, id FROM t1_values -WHERE select_id = 48 OR select_id IS NULL order by id; -CAST(my_char_30 AS TIME) my_char_30 id -NULL NULL 1 -NULL 2 -00:00:00 <--------30 characters-------> 3 --00:00:00 ---äÖüß@µ*$-- 4 --00:00:01 -1 5 -41:58:00 1 17:58 20 -Warnings: -Warning 1292 Truncated incorrect time value: '' -Warning 1292 Truncated incorrect time value: '<--------30 characters------->' -Warning 1292 Truncated incorrect time value: ' ---äÖüß@µ*$--' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as time) AS `CAST(my_char_30 AS TIME)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 48 OR select_id IS NULL) order by id; -CAST(my_char_30 AS TIME) my_char_30 id -NULL NULL 1 -NULL 2 -00:00:00 <--------30 characters-------> 3 --00:00:00 ---äÖüß@µ*$-- 4 --00:00:01 -1 5 -41:58:00 1 17:58 20 -Warnings: -Warning 1292 Truncated incorrect time value: '' -Warning 1292 Truncated incorrect time value: '<--------30 characters------->' -Warning 1292 Truncated incorrect time value: ' ---äÖüß@µ*$--' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_year AS DATETIME), -my_year, id FROM t1_values; -SELECT CAST(my_year AS DATETIME), -my_year, id FROM t1_values -WHERE select_id = 47 OR select_id IS NULL order by id; -CAST(my_year AS DATETIME) my_year id -NULL NULL 1 -NULL 1901 2 -NULL 2155 3 -NULL 2000 4 -NULL 2005 5 -Warnings: -Warning 1292 Incorrect datetime value: '1901' -Warning 1292 Incorrect datetime value: '2155' -Warning 1292 Incorrect datetime value: '2000' -Warning 1292 Incorrect datetime value: '2005' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as datetime) AS `CAST(my_year AS DATETIME)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 47 OR select_id IS NULL) order by id; -CAST(my_year AS DATETIME) my_year id -NULL NULL 1 -NULL 1901 2 -NULL 2155 3 -NULL 2000 4 -NULL 2005 5 -Warnings: -Warning 1292 Incorrect datetime value: '1901' -Warning 1292 Incorrect datetime value: '2155' -Warning 1292 Incorrect datetime value: '2000' -Warning 1292 Incorrect datetime value: '2005' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_time AS DATETIME), -my_time, id FROM t1_values; -SELECT CAST(my_time AS DATETIME), -my_time, id FROM t1_values -WHERE select_id = 46 OR select_id IS NULL order by id; -CAST(my_time AS DATETIME) my_time id -NULL NULL 1 -0000-00-00 00:00:00 -838:59:59 2 -0000-00-00 00:00:00 838:59:59 3 -0000-00-00 13:00:00 13:00:00 4 -0000-00-00 10:00:00 10:00:00 5 -Warnings: -Warning 1292 Incorrect datetime value: '0000-00-00 838:59:59' -Warning 1292 Incorrect datetime value: '0000-00-00 838:59:59' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as datetime) AS `CAST(my_time AS DATETIME)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 46 OR select_id IS NULL) order by id; -CAST(my_time AS DATETIME) my_time id -NULL NULL 1 -0000-00-00 00:00:00 -838:59:59 2 -0000-00-00 00:00:00 838:59:59 3 -0000-00-00 13:00:00 13:00:00 4 -0000-00-00 10:00:00 10:00:00 5 -Warnings: -Warning 1292 Incorrect datetime value: '0000-00-00 838:59:59' -Warning 1292 Incorrect datetime value: '0000-00-00 838:59:59' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_timestamp AS DATETIME), -my_timestamp, id FROM t1_values; -SELECT CAST(my_timestamp AS DATETIME), -my_timestamp, id FROM t1_values -WHERE select_id = 45 OR select_id IS NULL order by id; -CAST(my_timestamp AS DATETIME) my_timestamp id -0000-00-00 00:00:00 0000-00-00 00:00:00 1 -1970-01-01 03:00:01 1970-01-01 03:00:01 2 -2038-01-01 02:59:59 2038-01-01 02:59:59 3 -2004-02-29 23:59:59 2004-02-29 23:59:59 4 -2005-06-28 10:00:00 2005-06-28 10:00:00 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as datetime) AS `CAST(my_timestamp AS DATETIME)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 45 OR select_id IS NULL) order by id; -CAST(my_timestamp AS DATETIME) my_timestamp id -0000-00-00 00:00:00 0000-00-00 00:00:00 1 -1970-01-01 03:00:01 1970-01-01 03:00:01 2 -2038-01-01 02:59:59 2038-01-01 02:59:59 3 -2004-02-29 23:59:59 2004-02-29 23:59:59 4 -2005-06-28 10:00:00 2005-06-28 10:00:00 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_date AS DATETIME), -my_date, id FROM t1_values; -SELECT CAST(my_date AS DATETIME), -my_date, id FROM t1_values -WHERE select_id = 44 OR select_id IS NULL order by id; -CAST(my_date AS DATETIME) my_date id -NULL NULL 1 -0001-01-01 00:00:00 0001-01-01 2 -9999-12-31 00:00:00 9999-12-31 3 -2004-02-29 00:00:00 2004-02-29 4 -2005-06-28 00:00:00 2005-06-28 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as datetime) AS `CAST(my_date AS DATETIME)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 44 OR select_id IS NULL) order by id; -CAST(my_date AS DATETIME) my_date id -NULL NULL 1 -0001-01-01 00:00:00 0001-01-01 2 -9999-12-31 00:00:00 9999-12-31 3 -2004-02-29 00:00:00 2004-02-29 4 -2005-06-28 00:00:00 2005-06-28 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_datetime AS DATETIME), -my_datetime, id FROM t1_values; -SELECT CAST(my_datetime AS DATETIME), -my_datetime, id FROM t1_values -WHERE select_id = 43 OR select_id IS NULL order by id; -CAST(my_datetime AS DATETIME) my_datetime id -NULL NULL 1 -0001-01-01 00:00:00 0001-01-01 00:00:00 2 -9999-12-31 23:59:59 9999-12-31 23:59:59 3 -2004-02-29 23:59:59 2004-02-29 23:59:59 4 -2005-06-28 10:00:00 2005-06-28 10:00:00 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as datetime) AS `CAST(my_datetime AS DATETIME)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 43 OR select_id IS NULL) order by id; -CAST(my_datetime AS DATETIME) my_datetime id -NULL NULL 1 -0001-01-01 00:00:00 0001-01-01 00:00:00 2 -9999-12-31 23:59:59 9999-12-31 23:59:59 3 -2004-02-29 23:59:59 2004-02-29 23:59:59 4 -2005-06-28 10:00:00 2005-06-28 10:00:00 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_double AS DATETIME), -my_double, id FROM t1_values; -SELECT CAST(my_double AS DATETIME), -my_double, id FROM t1_values -WHERE select_id = 42 OR select_id IS NULL order by id; -CAST(my_double AS DATETIME) my_double id -NULL NULL 1 -NULL -1.7976931348623e308 2 -NULL 1.7976931348623e308 3 -NULL 0 4 -NULL -1 5 -NULL 200506271758 19 -Warnings: -Warning 1292 Incorrect datetime value: '-1.7976931348623e308' -Warning 1292 Incorrect datetime value: '1.7976931348623e308' -Warning 1292 Incorrect datetime value: '0' -Warning 1292 Incorrect datetime value: '-1' -Warning 1292 Incorrect datetime value: '200506271758' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as datetime) AS `CAST(my_double AS DATETIME)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 42 OR select_id IS NULL) order by id; -CAST(my_double AS DATETIME) my_double id -NULL NULL 1 -NULL -1.7976931348623e308 2 -NULL 1.7976931348623e308 3 -NULL 0 4 -NULL -1 5 -NULL 200506271758 19 -Warnings: -Warning 1292 Incorrect datetime value: '-1.7976931348623e308' -Warning 1292 Incorrect datetime value: '1.7976931348623e308' -Warning 1292 Incorrect datetime value: '0' -Warning 1292 Incorrect datetime value: '-1' -Warning 1292 Incorrect datetime value: '200506271758' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_bigint AS DATETIME), -my_bigint, id FROM t1_values; -SELECT CAST(my_bigint AS DATETIME), -my_bigint, id FROM t1_values -WHERE select_id = 41 OR select_id IS NULL order by id; -CAST(my_bigint AS DATETIME) my_bigint id -NULL NULL 1 -NULL -9223372036854775808 2 -NULL 9223372036854775807 3 -NULL 0 4 -NULL -1 5 -NULL 200506271758 18 -Warnings: -Warning 1292 Incorrect datetime value: '-9223372036854775808' -Warning 1292 Incorrect datetime value: '9223372036854775807' -Warning 1292 Incorrect datetime value: '0' -Warning 1292 Incorrect datetime value: '-1' -Warning 1292 Incorrect datetime value: '200506271758' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as datetime) AS `CAST(my_bigint AS DATETIME)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 41 OR select_id IS NULL) order by id; -CAST(my_bigint AS DATETIME) my_bigint id -NULL NULL 1 -NULL -9223372036854775808 2 -NULL 9223372036854775807 3 -NULL 0 4 -NULL -1 5 -NULL 200506271758 18 -Warnings: -Warning 1292 Incorrect datetime value: '-9223372036854775808' -Warning 1292 Incorrect datetime value: '9223372036854775807' -Warning 1292 Incorrect datetime value: '0' -Warning 1292 Incorrect datetime value: '-1' -Warning 1292 Incorrect datetime value: '200506271758' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS DATETIME), -my_varbinary_1000, id FROM t1_values; -SELECT CAST(my_varbinary_1000 AS DATETIME), -my_varbinary_1000, id FROM t1_values -WHERE select_id = 40 OR select_id IS NULL order by id; -CAST(my_varbinary_1000 AS DATETIME) my_varbinary_1000 id -NULL NULL 1 -NULL 2 -NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 -NULL ---äÖüß@µ*$-- 4 -NULL -1 5 -2005-06-27 17:58:00 2005-06-27 17:58 17 -Warnings: -Warning 1292 Incorrect datetime value: '' -Warning 1292 Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$-- ' -Warning 1292 Incorrect datetime value: '-1' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as datetime) AS `CAST(my_varbinary_1000 AS DATETIME)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 40 OR select_id IS NULL) order by id; -CAST(my_varbinary_1000 AS DATETIME) my_varbinary_1000 id -NULL NULL 1 -NULL 2 -NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 -NULL ---äÖüß@µ*$-- 4 -NULL -1 5 -2005-06-27 17:58:00 2005-06-27 17:58 17 -Warnings: -Warning 1292 Incorrect datetime value: '' -Warning 1292 Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$-- ' -Warning 1292 Incorrect datetime value: '-1' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS DATETIME), -my_binary_30, id FROM t1_values; -SELECT CAST(my_binary_30 AS DATETIME), -my_binary_30, id FROM t1_values -WHERE select_id = 39 OR select_id IS NULL order by id; -CAST(my_binary_30 AS DATETIME) my_binary_30 id -NULL NULL 1 -NULL 2 -NULL <--------30 characters-------> 3 -NULL ---äÖüß@µ*$-- 4 -NULL -1 5 -2005-06-27 17:58:00 2005-06-27 17:58 16 -Warnings: -Warning 1292 Incorrect datetime value: '' -Warning 1292 Incorrect datetime value: '<--------30 characters------->' -Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$-- ' -Warning 1292 Incorrect datetime value: '-1' -Warning 1292 Truncated incorrect datetime value: '2005-06-27 17:58' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as datetime) AS `CAST(my_binary_30 AS DATETIME)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 39 OR select_id IS NULL) order by id; -CAST(my_binary_30 AS DATETIME) my_binary_30 id -NULL NULL 1 -NULL 2 -NULL <--------30 characters-------> 3 -NULL ---äÖüß@µ*$-- 4 -NULL -1 5 -2005-06-27 17:58:00 2005-06-27 17:58 16 -Warnings: -Warning 1292 Incorrect datetime value: '' -Warning 1292 Incorrect datetime value: '<--------30 characters------->' -Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$-- ' -Warning 1292 Incorrect datetime value: '-1' -Warning 1292 Truncated incorrect datetime value: '2005-06-27 17:58' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS DATETIME), -my_varchar_1000, id FROM t1_values; -SELECT CAST(my_varchar_1000 AS DATETIME), -my_varchar_1000, id FROM t1_values -WHERE select_id = 38 OR select_id IS NULL order by id; -CAST(my_varchar_1000 AS DATETIME) my_varchar_1000 id -NULL NULL 1 -NULL 2 -NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 -NULL ---äÖüß@µ*$-- 4 -NULL -1 5 -2005-06-27 17:58:00 2005-06-27 17:58 15 -Warnings: -Warning 1292 Incorrect datetime value: '' -Warning 1292 Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$-- ' -Warning 1292 Incorrect datetime value: '-1' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as datetime) AS `CAST(my_varchar_1000 AS DATETIME)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 38 OR select_id IS NULL) order by id; -CAST(my_varchar_1000 AS DATETIME) my_varchar_1000 id -NULL NULL 1 -NULL 2 -NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 -NULL ---äÖüß@µ*$-- 4 -NULL -1 5 -2005-06-27 17:58:00 2005-06-27 17:58 15 -Warnings: -Warning 1292 Incorrect datetime value: '' -Warning 1292 Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$-- ' -Warning 1292 Incorrect datetime value: '-1' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_char_30 AS DATETIME), -my_char_30, id FROM t1_values; -SELECT CAST(my_char_30 AS DATETIME), -my_char_30, id FROM t1_values -WHERE select_id = 37 OR select_id IS NULL order by id; -CAST(my_char_30 AS DATETIME) my_char_30 id -NULL NULL 1 -NULL 2 -NULL <--------30 characters-------> 3 -NULL ---äÖüß@µ*$-- 4 -NULL -1 5 -2005-06-27 17:58:00 2005-06-27 17:58 14 -Warnings: -Warning 1292 Incorrect datetime value: '' -Warning 1292 Incorrect datetime value: '<--------30 characters------->' -Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$--' -Warning 1292 Incorrect datetime value: '-1' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as datetime) AS `CAST(my_char_30 AS DATETIME)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 37 OR select_id IS NULL) order by id; -CAST(my_char_30 AS DATETIME) my_char_30 id -NULL NULL 1 -NULL 2 -NULL <--------30 characters-------> 3 -NULL ---äÖüß@µ*$-- 4 -NULL -1 5 -2005-06-27 17:58:00 2005-06-27 17:58 14 -Warnings: -Warning 1292 Incorrect datetime value: '' -Warning 1292 Incorrect datetime value: '<--------30 characters------->' -Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$--' -Warning 1292 Incorrect datetime value: '-1' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_year AS DATE), -my_year, id FROM t1_values; -SELECT CAST(my_year AS DATE), -my_year, id FROM t1_values -WHERE select_id = 36 OR select_id IS NULL order by id; -CAST(my_year AS DATE) my_year id -NULL NULL 1 -NULL 1901 2 -NULL 2155 3 -NULL 2000 4 -NULL 2005 5 -Warnings: -Warning 1292 Incorrect datetime value: '1901' -Warning 1292 Incorrect datetime value: '2155' -Warning 1292 Incorrect datetime value: '2000' -Warning 1292 Incorrect datetime value: '2005' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as date) AS `CAST(my_year AS DATE)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 36 OR select_id IS NULL) order by id; -CAST(my_year AS DATE) my_year id -NULL NULL 1 -NULL 1901 2 -NULL 2155 3 -NULL 2000 4 -NULL 2005 5 -Warnings: -Warning 1292 Incorrect datetime value: '1901' -Warning 1292 Incorrect datetime value: '2155' -Warning 1292 Incorrect datetime value: '2000' -Warning 1292 Incorrect datetime value: '2005' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_time AS DATE), -my_time, id FROM t1_values; -SELECT CAST(my_time AS DATE), -my_time, id FROM t1_values -WHERE select_id = 35 OR select_id IS NULL order by id; -CAST(my_time AS DATE) my_time id -NULL NULL 1 -0000-00-00 -838:59:59 2 -0000-00-00 838:59:59 3 -0000-00-00 13:00:00 4 -0000-00-00 10:00:00 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as date) AS `CAST(my_time AS DATE)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 35 OR select_id IS NULL) order by id; -CAST(my_time AS DATE) my_time id -NULL NULL 1 -0000-00-00 -838:59:59 2 -0000-00-00 838:59:59 3 -0000-00-00 13:00:00 4 -0000-00-00 10:00:00 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_timestamp AS DATE), -my_timestamp, id FROM t1_values; -SELECT CAST(my_timestamp AS DATE), -my_timestamp, id FROM t1_values -WHERE select_id = 34 OR select_id IS NULL order by id; -CAST(my_timestamp AS DATE) my_timestamp id -0000-00-00 0000-00-00 00:00:00 1 -1970-01-01 1970-01-01 03:00:01 2 -2038-01-01 2038-01-01 02:59:59 3 -2004-02-29 2004-02-29 23:59:59 4 -2005-06-28 2005-06-28 10:00:00 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as date) AS `CAST(my_timestamp AS DATE)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 34 OR select_id IS NULL) order by id; -CAST(my_timestamp AS DATE) my_timestamp id -0000-00-00 0000-00-00 00:00:00 1 -1970-01-01 1970-01-01 03:00:01 2 -2038-01-01 2038-01-01 02:59:59 3 -2004-02-29 2004-02-29 23:59:59 4 -2005-06-28 2005-06-28 10:00:00 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_date AS DATE), -my_date, id FROM t1_values; -SELECT CAST(my_date AS DATE), -my_date, id FROM t1_values -WHERE select_id = 33 OR select_id IS NULL order by id; -CAST(my_date AS DATE) my_date id -NULL NULL 1 -0001-01-01 0001-01-01 2 -9999-12-31 9999-12-31 3 -2004-02-29 2004-02-29 4 -2005-06-28 2005-06-28 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as date) AS `CAST(my_date AS DATE)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 33 OR select_id IS NULL) order by id; -CAST(my_date AS DATE) my_date id -NULL NULL 1 -0001-01-01 0001-01-01 2 -9999-12-31 9999-12-31 3 -2004-02-29 2004-02-29 4 -2005-06-28 2005-06-28 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_datetime AS DATE), -my_datetime, id FROM t1_values; -SELECT CAST(my_datetime AS DATE), -my_datetime, id FROM t1_values -WHERE select_id = 32 OR select_id IS NULL order by id; -CAST(my_datetime AS DATE) my_datetime id -NULL NULL 1 -0001-01-01 0001-01-01 00:00:00 2 -9999-12-31 9999-12-31 23:59:59 3 -2004-02-29 2004-02-29 23:59:59 4 -2005-06-28 2005-06-28 10:00:00 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as date) AS `CAST(my_datetime AS DATE)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 32 OR select_id IS NULL) order by id; -CAST(my_datetime AS DATE) my_datetime id -NULL NULL 1 -0001-01-01 0001-01-01 00:00:00 2 -9999-12-31 9999-12-31 23:59:59 3 -2004-02-29 2004-02-29 23:59:59 4 -2005-06-28 2005-06-28 10:00:00 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_double AS DATE), -my_double, id FROM t1_values; -SELECT CAST(my_double AS DATE), -my_double, id FROM t1_values -WHERE select_id = 31 OR select_id IS NULL order by id; -CAST(my_double AS DATE) my_double id -NULL NULL 1 -NULL -1.7976931348623e308 2 -NULL 1.7976931348623e308 3 -NULL 0 4 -NULL -1 5 -2005-06-27 20050627 13 -Warnings: -Warning 1292 Incorrect datetime value: '-1.7976931348623e308' -Warning 1292 Incorrect datetime value: '1.7976931348623e308' -Warning 1292 Incorrect datetime value: '0' -Warning 1292 Incorrect datetime value: '-1' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as date) AS `CAST(my_double AS DATE)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 31 OR select_id IS NULL) order by id; -CAST(my_double AS DATE) my_double id -NULL NULL 1 -NULL -1.7976931348623e308 2 -NULL 1.7976931348623e308 3 -NULL 0 4 -NULL -1 5 -2005-06-27 20050627 13 -Warnings: -Warning 1292 Incorrect datetime value: '-1.7976931348623e308' -Warning 1292 Incorrect datetime value: '1.7976931348623e308' -Warning 1292 Incorrect datetime value: '0' -Warning 1292 Incorrect datetime value: '-1' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_bigint AS DATE), -my_bigint, id FROM t1_values; -SELECT CAST(my_bigint AS DATE), -my_bigint, id FROM t1_values -WHERE select_id = 30 OR select_id IS NULL order by id; -CAST(my_bigint AS DATE) my_bigint id -NULL NULL 1 -NULL -9223372036854775808 2 -NULL 9223372036854775807 3 -NULL 0 4 -NULL -1 5 -2005-06-27 20050627 12 -Warnings: -Warning 1292 Incorrect datetime value: '-9223372036854775808' -Warning 1292 Incorrect datetime value: '9223372036854775807' -Warning 1292 Incorrect datetime value: '0' -Warning 1292 Incorrect datetime value: '-1' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as date) AS `CAST(my_bigint AS DATE)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 30 OR select_id IS NULL) order by id; -CAST(my_bigint AS DATE) my_bigint id -NULL NULL 1 -NULL -9223372036854775808 2 -NULL 9223372036854775807 3 -NULL 0 4 -NULL -1 5 -2005-06-27 20050627 12 -Warnings: -Warning 1292 Incorrect datetime value: '-9223372036854775808' -Warning 1292 Incorrect datetime value: '9223372036854775807' -Warning 1292 Incorrect datetime value: '0' -Warning 1292 Incorrect datetime value: '-1' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS DATE), -my_varbinary_1000, id FROM t1_values; -SELECT CAST(my_varbinary_1000 AS DATE), -my_varbinary_1000, id FROM t1_values -WHERE select_id = 29 OR select_id IS NULL order by id; -CAST(my_varbinary_1000 AS DATE) my_varbinary_1000 id -NULL NULL 1 -NULL 2 -NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 -NULL ---äÖüß@µ*$-- 4 -NULL -1 5 -2005-06-27 2005-06-27 11 -Warnings: -Warning 1292 Incorrect datetime value: '' -Warning 1292 Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$-- ' -Warning 1292 Incorrect datetime value: '-1' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as date) AS `CAST(my_varbinary_1000 AS DATE)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 29 OR select_id IS NULL) order by id; -CAST(my_varbinary_1000 AS DATE) my_varbinary_1000 id -NULL NULL 1 -NULL 2 -NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 -NULL ---äÖüß@µ*$-- 4 -NULL -1 5 -2005-06-27 2005-06-27 11 -Warnings: -Warning 1292 Incorrect datetime value: '' -Warning 1292 Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$-- ' -Warning 1292 Incorrect datetime value: '-1' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS DATE), -my_binary_30, id FROM t1_values; -SELECT CAST(my_binary_30 AS DATE), -my_binary_30, id FROM t1_values -WHERE select_id = 28 OR select_id IS NULL order by id; -CAST(my_binary_30 AS DATE) my_binary_30 id -NULL NULL 1 -NULL 2 -NULL <--------30 characters-------> 3 -NULL ---äÖüß@µ*$-- 4 -NULL -1 5 -2005-06-27 2005-06-27 10 -Warnings: -Warning 1292 Incorrect datetime value: '' -Warning 1292 Incorrect datetime value: '<--------30 characters------->' -Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$-- ' -Warning 1292 Incorrect datetime value: '-1' -Warning 1292 Truncated incorrect date value: '2005-06-27' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as date) AS `CAST(my_binary_30 AS DATE)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 28 OR select_id IS NULL) order by id; -CAST(my_binary_30 AS DATE) my_binary_30 id -NULL NULL 1 -NULL 2 -NULL <--------30 characters-------> 3 -NULL ---äÖüß@µ*$-- 4 -NULL -1 5 -2005-06-27 2005-06-27 10 -Warnings: -Warning 1292 Incorrect datetime value: '' -Warning 1292 Incorrect datetime value: '<--------30 characters------->' -Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$-- ' -Warning 1292 Incorrect datetime value: '-1' -Warning 1292 Truncated incorrect date value: '2005-06-27' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS DATE), -my_varchar_1000, id FROM t1_values; -SELECT CAST(my_varchar_1000 AS DATE), -my_varchar_1000, id FROM t1_values -WHERE select_id = 27 OR select_id IS NULL order by id; -CAST(my_varchar_1000 AS DATE) my_varchar_1000 id -NULL NULL 1 -NULL 2 -NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 -NULL ---äÖüß@µ*$-- 4 -NULL -1 5 -2005-06-27 2005-06-27 9 -Warnings: -Warning 1292 Incorrect datetime value: '' -Warning 1292 Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$-- ' -Warning 1292 Incorrect datetime value: '-1' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as date) AS `CAST(my_varchar_1000 AS DATE)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 27 OR select_id IS NULL) order by id; -CAST(my_varchar_1000 AS DATE) my_varchar_1000 id -NULL NULL 1 -NULL 2 -NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 -NULL ---äÖüß@µ*$-- 4 -NULL -1 5 -2005-06-27 2005-06-27 9 -Warnings: -Warning 1292 Incorrect datetime value: '' -Warning 1292 Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$-- ' -Warning 1292 Incorrect datetime value: '-1' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_char_30 AS DATE), -my_char_30, id FROM t1_values; -SELECT CAST(my_char_30 AS DATE), -my_char_30, id FROM t1_values -WHERE select_id = 26 OR select_id IS NULL order by id; -CAST(my_char_30 AS DATE) my_char_30 id -NULL NULL 1 -NULL 2 -NULL <--------30 characters-------> 3 -NULL ---äÖüß@µ*$-- 4 -NULL -1 5 -2005-06-27 2005-06-27 8 -Warnings: -Warning 1292 Incorrect datetime value: '' -Warning 1292 Incorrect datetime value: '<--------30 characters------->' -Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$--' -Warning 1292 Incorrect datetime value: '-1' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as date) AS `CAST(my_char_30 AS DATE)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 26 OR select_id IS NULL) order by id; -CAST(my_char_30 AS DATE) my_char_30 id -NULL NULL 1 -NULL 2 -NULL <--------30 characters-------> 3 -NULL ---äÖüß@µ*$-- 4 -NULL -1 5 -2005-06-27 2005-06-27 8 -Warnings: -Warning 1292 Incorrect datetime value: '' -Warning 1292 Incorrect datetime value: '<--------30 characters------->' -Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$--' -Warning 1292 Incorrect datetime value: '-1' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_year AS CHAR), -my_year, id FROM t1_values; -SELECT CAST(my_year AS CHAR), -my_year, id FROM t1_values -WHERE select_id = 25 OR select_id IS NULL order by id; -CAST(my_year AS CHAR) my_year id -NULL NULL 1 -1901 1901 2 -2155 2155 3 -2000 2000 4 -2005 2005 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as char charset latin1) AS `CAST(my_year AS CHAR)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 25 OR select_id IS NULL) order by id; -CAST(my_year AS CHAR) my_year id -NULL NULL 1 -1901 1901 2 -2155 2155 3 -2000 2000 4 -2005 2005 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_time AS CHAR), -my_time, id FROM t1_values; -SELECT CAST(my_time AS CHAR), -my_time, id FROM t1_values -WHERE select_id = 24 OR select_id IS NULL order by id; -CAST(my_time AS CHAR) my_time id -NULL NULL 1 --838:59:59 -838:59:59 2 -838:59:59 838:59:59 3 -13:00:00 13:00:00 4 -10:00:00 10:00:00 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as char charset latin1) AS `CAST(my_time AS CHAR)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 24 OR select_id IS NULL) order by id; -CAST(my_time AS CHAR) my_time id -NULL NULL 1 --838:59:59 -838:59:59 2 -838:59:59 838:59:59 3 -13:00:00 13:00:00 4 -10:00:00 10:00:00 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_timestamp AS CHAR), -my_timestamp, id FROM t1_values; -SELECT CAST(my_timestamp AS CHAR), -my_timestamp, id FROM t1_values -WHERE select_id = 23 OR select_id IS NULL order by id; -CAST(my_timestamp AS CHAR) my_timestamp id -0000-00-00 00:00:00 0000-00-00 00:00:00 1 -1970-01-01 03:00:01 1970-01-01 03:00:01 2 -2038-01-01 02:59:59 2038-01-01 02:59:59 3 -2004-02-29 23:59:59 2004-02-29 23:59:59 4 -2005-06-28 10:00:00 2005-06-28 10:00:00 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as char charset latin1) AS `CAST(my_timestamp AS CHAR)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 23 OR select_id IS NULL) order by id; -CAST(my_timestamp AS CHAR) my_timestamp id -0000-00-00 00:00:00 0000-00-00 00:00:00 1 -1970-01-01 03:00:01 1970-01-01 03:00:01 2 -2038-01-01 02:59:59 2038-01-01 02:59:59 3 -2004-02-29 23:59:59 2004-02-29 23:59:59 4 -2005-06-28 10:00:00 2005-06-28 10:00:00 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_date AS CHAR), -my_date, id FROM t1_values; -SELECT CAST(my_date AS CHAR), -my_date, id FROM t1_values -WHERE select_id = 22 OR select_id IS NULL order by id; -CAST(my_date AS CHAR) my_date id -NULL NULL 1 -0001-01-01 0001-01-01 2 -9999-12-31 9999-12-31 3 -2004-02-29 2004-02-29 4 -2005-06-28 2005-06-28 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as char charset latin1) AS `CAST(my_date AS CHAR)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 22 OR select_id IS NULL) order by id; -CAST(my_date AS CHAR) my_date id -NULL NULL 1 -0001-01-01 0001-01-01 2 -9999-12-31 9999-12-31 3 -2004-02-29 2004-02-29 4 -2005-06-28 2005-06-28 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_datetime AS CHAR), -my_datetime, id FROM t1_values; -SELECT CAST(my_datetime AS CHAR), -my_datetime, id FROM t1_values -WHERE select_id = 21 OR select_id IS NULL order by id; -CAST(my_datetime AS CHAR) my_datetime id -NULL NULL 1 -0001-01-01 00:00:00 0001-01-01 00:00:00 2 -9999-12-31 23:59:59 9999-12-31 23:59:59 3 -2004-02-29 23:59:59 2004-02-29 23:59:59 4 -2005-06-28 10:00:00 2005-06-28 10:00:00 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as char charset latin1) AS `CAST(my_datetime AS CHAR)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 21 OR select_id IS NULL) order by id; -CAST(my_datetime AS CHAR) my_datetime id -NULL NULL 1 -0001-01-01 00:00:00 0001-01-01 00:00:00 2 -9999-12-31 23:59:59 9999-12-31 23:59:59 3 -2004-02-29 23:59:59 2004-02-29 23:59:59 4 -2005-06-28 10:00:00 2005-06-28 10:00:00 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_double AS CHAR), -my_double, id FROM t1_values; -SELECT CAST(my_double AS CHAR), -my_double, id FROM t1_values -WHERE select_id = 20 OR select_id IS NULL order by id; -CAST(my_double AS CHAR) my_double id -NULL NULL 1 --1.7976931348623e308 -1.7976931348623e308 2 -1.7976931348623e308 1.7976931348623e308 3 -0 0 4 --1 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as char charset latin1) AS `CAST(my_double AS CHAR)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 20 OR select_id IS NULL) order by id; -CAST(my_double AS CHAR) my_double id -NULL NULL 1 --1.7976931348623e308 -1.7976931348623e308 2 -1.7976931348623e308 1.7976931348623e308 3 -0 0 4 --1 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_decimal AS CHAR), -my_decimal, id FROM t1_values; -SELECT CAST(my_decimal AS CHAR), -my_decimal, id FROM t1_values -WHERE select_id = 19 OR select_id IS NULL order by id; -CAST(my_decimal AS CHAR) my_decimal id -NULL NULL 1 --9999999999999999999999999999999999.999999999999999999999999999999 -9999999999999999999999999999999999.999999999999999999999999999999 2 -9999999999999999999999999999999999.999999999999999999999999999999 9999999999999999999999999999999999.999999999999999999999999999999 3 -0.000000000000000000000000000000 0.000000000000000000000000000000 4 --1.000000000000000000000000000000 -1.000000000000000000000000000000 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as char charset latin1) AS `CAST(my_decimal AS CHAR)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 19 OR select_id IS NULL) order by id; -CAST(my_decimal AS CHAR) my_decimal id -NULL NULL 1 --9999999999999999999999999999999999.999999999999999999999999999999 -9999999999999999999999999999999999.999999999999999999999999999999 2 -9999999999999999999999999999999999.999999999999999999999999999999 9999999999999999999999999999999999.999999999999999999999999999999 3 -0.000000000000000000000000000000 0.000000000000000000000000000000 4 --1.000000000000000000000000000000 -1.000000000000000000000000000000 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_bigint AS CHAR), -my_bigint, id FROM t1_values; -SELECT CAST(my_bigint AS CHAR), -my_bigint, id FROM t1_values -WHERE select_id = 18 OR select_id IS NULL order by id; -CAST(my_bigint AS CHAR) my_bigint id -NULL NULL 1 --9223372036854775808 -9223372036854775808 2 -9223372036854775807 9223372036854775807 3 -0 0 4 --1 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as char charset latin1) AS `CAST(my_bigint AS CHAR)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 18 OR select_id IS NULL) order by id; -CAST(my_bigint AS CHAR) my_bigint id -NULL NULL 1 --9223372036854775808 -9223372036854775808 2 -9223372036854775807 9223372036854775807 3 -0 0 4 --1 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS CHAR), -my_varbinary_1000, id FROM t1_values; -SELECT CAST(my_varbinary_1000 AS CHAR), -my_varbinary_1000, id FROM t1_values -WHERE select_id = 17 OR select_id IS NULL order by id; -CAST(my_varbinary_1000 AS CHAR) my_varbinary_1000 id -NULL NULL 1 - 2 -<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 - ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as char charset latin1) AS `CAST(my_varbinary_1000 AS CHAR)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 17 OR select_id IS NULL) order by id; -CAST(my_varbinary_1000 AS CHAR) my_varbinary_1000 id -NULL NULL 1 - 2 -<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 - ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS CHAR), -my_binary_30, id FROM t1_values; -SELECT CAST(my_binary_30 AS CHAR), -my_binary_30, id FROM t1_values -WHERE select_id = 16 OR select_id IS NULL order by id; -CAST(my_binary_30 AS CHAR) my_binary_30 id -NULL NULL 1 - 2 -<--------30 characters-------> <--------30 characters-------> 3 - ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as char charset latin1) AS `CAST(my_binary_30 AS CHAR)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 16 OR select_id IS NULL) order by id; -CAST(my_binary_30 AS CHAR) my_binary_30 id -NULL NULL 1 - 2 -<--------30 characters-------> <--------30 characters-------> 3 - ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS CHAR), -my_varchar_1000, id FROM t1_values; -SELECT CAST(my_varchar_1000 AS CHAR), -my_varchar_1000, id FROM t1_values -WHERE select_id = 15 OR select_id IS NULL order by id; -CAST(my_varchar_1000 AS CHAR) my_varchar_1000 id -NULL NULL 1 - 2 -<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 - ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as char charset latin1) AS `CAST(my_varchar_1000 AS CHAR)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 15 OR select_id IS NULL) order by id; -CAST(my_varchar_1000 AS CHAR) my_varchar_1000 id -NULL NULL 1 - 2 -<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 - ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_char_30 AS CHAR), -my_char_30, id FROM t1_values; -SELECT CAST(my_char_30 AS CHAR), -my_char_30, id FROM t1_values -WHERE select_id = 14 OR select_id IS NULL order by id; -CAST(my_char_30 AS CHAR) my_char_30 id -NULL NULL 1 - 2 -<--------30 characters-------> <--------30 characters-------> 3 - ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as char charset latin1) AS `CAST(my_char_30 AS CHAR)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 14 OR select_id IS NULL) order by id; -CAST(my_char_30 AS CHAR) my_char_30 id -NULL NULL 1 - 2 -<--------30 characters-------> <--------30 characters-------> 3 - ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_year AS BINARY), -my_year, id FROM t1_values; -SELECT CAST(my_year AS BINARY), -my_year, id FROM t1_values -WHERE select_id = 13 OR select_id IS NULL order by id; -CAST(my_year AS BINARY) my_year id -NULL NULL 1 -1901 1901 2 -2155 2155 3 -2000 2000 4 -2005 2005 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as char charset binary) AS `CAST(my_year AS BINARY)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 13 OR select_id IS NULL) order by id; -CAST(my_year AS BINARY) my_year id -NULL NULL 1 -1901 1901 2 -2155 2155 3 -2000 2000 4 -2005 2005 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_time AS BINARY), -my_time, id FROM t1_values; -SELECT CAST(my_time AS BINARY), -my_time, id FROM t1_values -WHERE select_id = 12 OR select_id IS NULL order by id; -CAST(my_time AS BINARY) my_time id -NULL NULL 1 --838:59:59 -838:59:59 2 -838:59:59 838:59:59 3 -13:00:00 13:00:00 4 -10:00:00 10:00:00 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as char charset binary) AS `CAST(my_time AS BINARY)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 12 OR select_id IS NULL) order by id; -CAST(my_time AS BINARY) my_time id -NULL NULL 1 --838:59:59 -838:59:59 2 -838:59:59 838:59:59 3 -13:00:00 13:00:00 4 -10:00:00 10:00:00 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_timestamp AS BINARY), -my_timestamp, id FROM t1_values; -SELECT CAST(my_timestamp AS BINARY), -my_timestamp, id FROM t1_values -WHERE select_id = 11 OR select_id IS NULL order by id; -CAST(my_timestamp AS BINARY) my_timestamp id -0000-00-00 00:00:00 0000-00-00 00:00:00 1 -1970-01-01 03:00:01 1970-01-01 03:00:01 2 -2038-01-01 02:59:59 2038-01-01 02:59:59 3 -2004-02-29 23:59:59 2004-02-29 23:59:59 4 -2005-06-28 10:00:00 2005-06-28 10:00:00 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as char charset binary) AS `CAST(my_timestamp AS BINARY)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 11 OR select_id IS NULL) order by id; -CAST(my_timestamp AS BINARY) my_timestamp id -0000-00-00 00:00:00 0000-00-00 00:00:00 1 -1970-01-01 03:00:01 1970-01-01 03:00:01 2 -2038-01-01 02:59:59 2038-01-01 02:59:59 3 -2004-02-29 23:59:59 2004-02-29 23:59:59 4 -2005-06-28 10:00:00 2005-06-28 10:00:00 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_date AS BINARY), -my_date, id FROM t1_values; -SELECT CAST(my_date AS BINARY), -my_date, id FROM t1_values -WHERE select_id = 10 OR select_id IS NULL order by id; -CAST(my_date AS BINARY) my_date id -NULL NULL 1 -0001-01-01 0001-01-01 2 -9999-12-31 9999-12-31 3 -2004-02-29 2004-02-29 4 -2005-06-28 2005-06-28 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as char charset binary) AS `CAST(my_date AS BINARY)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 10 OR select_id IS NULL) order by id; -CAST(my_date AS BINARY) my_date id -NULL NULL 1 -0001-01-01 0001-01-01 2 -9999-12-31 9999-12-31 3 -2004-02-29 2004-02-29 4 -2005-06-28 2005-06-28 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_datetime AS BINARY), -my_datetime, id FROM t1_values; -SELECT CAST(my_datetime AS BINARY), -my_datetime, id FROM t1_values -WHERE select_id = 9 OR select_id IS NULL order by id; -CAST(my_datetime AS BINARY) my_datetime id -NULL NULL 1 -0001-01-01 00:00:00 0001-01-01 00:00:00 2 -9999-12-31 23:59:59 9999-12-31 23:59:59 3 -2004-02-29 23:59:59 2004-02-29 23:59:59 4 -2005-06-28 10:00:00 2005-06-28 10:00:00 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as char charset binary) AS `CAST(my_datetime AS BINARY)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 9 OR select_id IS NULL) order by id; -CAST(my_datetime AS BINARY) my_datetime id -NULL NULL 1 -0001-01-01 00:00:00 0001-01-01 00:00:00 2 -9999-12-31 23:59:59 9999-12-31 23:59:59 3 -2004-02-29 23:59:59 2004-02-29 23:59:59 4 -2005-06-28 10:00:00 2005-06-28 10:00:00 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_double AS BINARY), -my_double, id FROM t1_values; -SELECT CAST(my_double AS BINARY), -my_double, id FROM t1_values -WHERE select_id = 8 OR select_id IS NULL order by id; -CAST(my_double AS BINARY) my_double id -NULL NULL 1 --1.7976931348623e308 -1.7976931348623e308 2 -1.7976931348623e308 1.7976931348623e308 3 -0 0 4 --1 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as char charset binary) AS `CAST(my_double AS BINARY)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 8 OR select_id IS NULL) order by id; -CAST(my_double AS BINARY) my_double id -NULL NULL 1 --1.7976931348623e308 -1.7976931348623e308 2 -1.7976931348623e308 1.7976931348623e308 3 -0 0 4 --1 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_decimal AS BINARY), -my_decimal, id FROM t1_values; -SELECT CAST(my_decimal AS BINARY), -my_decimal, id FROM t1_values -WHERE select_id = 7 OR select_id IS NULL order by id; -CAST(my_decimal AS BINARY) my_decimal id -NULL NULL 1 --9999999999999999999999999999999999.999999999999999999999999999999 -9999999999999999999999999999999999.999999999999999999999999999999 2 -9999999999999999999999999999999999.999999999999999999999999999999 9999999999999999999999999999999999.999999999999999999999999999999 3 -0.000000000000000000000000000000 0.000000000000000000000000000000 4 --1.000000000000000000000000000000 -1.000000000000000000000000000000 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as char charset binary) AS `CAST(my_decimal AS BINARY)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 7 OR select_id IS NULL) order by id; -CAST(my_decimal AS BINARY) my_decimal id -NULL NULL 1 --9999999999999999999999999999999999.999999999999999999999999999999 -9999999999999999999999999999999999.999999999999999999999999999999 2 -9999999999999999999999999999999999.999999999999999999999999999999 9999999999999999999999999999999999.999999999999999999999999999999 3 -0.000000000000000000000000000000 0.000000000000000000000000000000 4 --1.000000000000000000000000000000 -1.000000000000000000000000000000 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_bigint AS BINARY), -my_bigint, id FROM t1_values; -SELECT CAST(my_bigint AS BINARY), -my_bigint, id FROM t1_values -WHERE select_id = 6 OR select_id IS NULL order by id; -CAST(my_bigint AS BINARY) my_bigint id -NULL NULL 1 --9223372036854775808 -9223372036854775808 2 -9223372036854775807 9223372036854775807 3 -0 0 4 --1 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as char charset binary) AS `CAST(my_bigint AS BINARY)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 6 OR select_id IS NULL) order by id; -CAST(my_bigint AS BINARY) my_bigint id -NULL NULL 1 --9223372036854775808 -9223372036854775808 2 -9223372036854775807 9223372036854775807 3 -0 0 4 --1 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS BINARY), -my_varbinary_1000, id FROM t1_values; -SELECT CAST(my_varbinary_1000 AS BINARY), -my_varbinary_1000, id FROM t1_values -WHERE select_id = 5 OR select_id IS NULL order by id; -CAST(my_varbinary_1000 AS BINARY) my_varbinary_1000 id -NULL NULL 1 - 2 -<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 - ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as char charset binary) AS `CAST(my_varbinary_1000 AS BINARY)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 5 OR select_id IS NULL) order by id; -CAST(my_varbinary_1000 AS BINARY) my_varbinary_1000 id -NULL NULL 1 - 2 -<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 - ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS BINARY), -my_binary_30, id FROM t1_values; -SELECT CAST(my_binary_30 AS BINARY), -my_binary_30, id FROM t1_values -WHERE select_id = 4 OR select_id IS NULL order by id; -CAST(my_binary_30 AS BINARY) my_binary_30 id -NULL NULL 1 - 2 -<--------30 characters-------> <--------30 characters-------> 3 - ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as char charset binary) AS `CAST(my_binary_30 AS BINARY)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 4 OR select_id IS NULL) order by id; -CAST(my_binary_30 AS BINARY) my_binary_30 id -NULL NULL 1 - 2 -<--------30 characters-------> <--------30 characters-------> 3 - ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS BINARY), -my_varchar_1000, id FROM t1_values; -SELECT CAST(my_varchar_1000 AS BINARY), -my_varchar_1000, id FROM t1_values -WHERE select_id = 3 OR select_id IS NULL order by id; -CAST(my_varchar_1000 AS BINARY) my_varchar_1000 id -NULL NULL 1 - 2 -<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 - ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as char charset binary) AS `CAST(my_varchar_1000 AS BINARY)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 3 OR select_id IS NULL) order by id; -CAST(my_varchar_1000 AS BINARY) my_varchar_1000 id -NULL NULL 1 - 2 -<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 - ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_char_30 AS BINARY), -my_char_30, id FROM t1_values; -SELECT CAST(my_char_30 AS BINARY), -my_char_30, id FROM t1_values -WHERE select_id = 2 OR select_id IS NULL order by id; -CAST(my_char_30 AS BINARY) my_char_30 id -NULL NULL 1 - 2 -<--------30 characters-------> <--------30 characters-------> 3 - ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as char charset binary) AS `CAST(my_char_30 AS BINARY)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 2 OR select_id IS NULL) order by id; -CAST(my_char_30 AS BINARY) my_char_30 id -NULL NULL 1 - 2 -<--------30 characters-------> <--------30 characters-------> 3 - ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT sqrt(my_bigint), my_bigint, id FROM t1_values; -SELECT sqrt(my_bigint), my_bigint, id FROM t1_values -WHERE select_id = 1 OR select_id IS NULL order by id; -sqrt(my_bigint) my_bigint id -NULL NULL 1 -NULL -9223372036854775808 2 -3037000499.97605 9223372036854775807 3 -0 0 4 -NULL -1 5 -2 4 6 -NULL -25 7 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select sqrt(`t1_values`.`my_bigint`) AS `sqrt(my_bigint)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 1 OR select_id IS NULL) order by id; -sqrt(my_bigint) my_bigint id -NULL NULL 1 -NULL -9223372036854775808 2 -3037000499.97605 9223372036854775807 3 -0 0 4 -NULL -1 5 -2 4 6 -NULL -25 7 -DROP VIEW v1; - - -DROP TABLE t1_selects, t1_modes, t1_values; diff --git a/mysql-test/suite/funcs_1/r/ndb_storedproc_02.result b/mysql-test/suite/funcs_1/r/ndb_storedproc_02.result deleted file mode 100644 index 3e2d084aa0c..00000000000 --- a/mysql-test/suite/funcs_1/r/ndb_storedproc_02.result +++ /dev/null @@ -1,1398 +0,0 @@ - ---source suite/funcs_1/storedproc/load_sp_tb.inc --------------------------------------------------------------------------------- - ---source suite/funcs_1/storedproc/cleanup_sp_tb.inc --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_storedproc; -DROP DATABASE IF EXISTS db_storedproc_1; -CREATE DATABASE db_storedproc; -CREATE DATABASE db_storedproc_1; -USE db_storedproc; -create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t1; -create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t2; -create table t3(f1 char(20),f2 char(20),f3 integer) engine = ; -load data infile '/std_data/funcs_1/t3.txt' into table t3; -create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t4; -USE db_storedproc_1; -create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t6; -USE db_storedproc; -create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) -engine = ; -load data infile '/std_data/funcs_1/t7.txt' into table t7; -Warnings: -Warning 1265 Data truncated for column 'f3' at row 1 -Warning 1265 Data truncated for column 'f3' at row 2 -Warning 1265 Data truncated for column 'f3' at row 3 -Warning 1265 Data truncated for column 'f3' at row 4 -Warning 1265 Data truncated for column 'f3' at row 5 -Warning 1265 Data truncated for column 'f3' at row 6 -Warning 1265 Data truncated for column 'f3' at row 7 -Warning 1265 Data truncated for column 'f3' at row 8 -Warning 1265 Data truncated for column 'f3' at row 9 -Warning 1265 Data truncated for column 'f3' at row 10 -create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) -engine = ; -load data infile '/std_data/funcs_1/t7.txt' into table t8; -Warnings: -Warning 1265 Data truncated for column 'f3' at row 1 -Warning 1265 Data truncated for column 'f3' at row 2 -Warning 1265 Data truncated for column 'f3' at row 3 -Warning 1265 Data truncated for column 'f3' at row 4 -Warning 1265 Data truncated for column 'f3' at row 5 -Warning 1265 Data truncated for column 'f3' at row 6 -Warning 1265 Data truncated for column 'f3' at row 7 -Warning 1265 Data truncated for column 'f3' at row 8 -Warning 1265 Data truncated for column 'f3' at row 9 -Warning 1265 Data truncated for column 'f3' at row 10 -create table t9(f1 int, f2 char(25), f3 int) engine = ; -load data infile '/std_data/funcs_1/t9.txt' into table t9; -create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t10; -create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t11; - -Section 3.1.2 - Syntax checks for the stored procedure-specific -programming statements BEGIN/END, DECLARE, SET, SELECT/INTO, OPEN, FETCH, CLOSE: --------------------------------------------------------------------------------- - -Testcase 3.1.2.8: ------------------ - -Ensure that the scope of each BEGIN/END compound statement within a stored -procedure definition is properly applied --------------------------------------------------------------------------------- -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1( ) -begin_label: BEGIN -declare x char DEFAULT 'x'; -declare y char DEFAULT 'y'; -set x = '1'; -set y = '2'; -label1: BEGIN -declare x char DEFAULT 'X'; -declare y char DEFAULT 'Y'; -SELECT f1, f2 into x, y from t2 limit 1; -SELECT '1.1', x, y; -label2: BEGIN -declare x char default 'a'; -declare y char default 'b'; -label3: BEGIN -declare x char default 'c'; -declare y char default 'd'; -label4: BEGIN -declare x char default 'e'; -declare y char default 'f'; -label5: BEGIN -declare x char default 'g'; -declare y char default 'h'; -SELECT 5, x, y; -END label5; -SELECT 4, x, y; -END label4; -SELECT 3, x, y; -END label3; -SELECT 2, x, y; -END label2; -END label1; -set @v1 = x; -set @v2 = y; -SELECT '1.2', @v1, @v2; -END begin_label// -CALL sp1(); -1.1 x y -1.1 a a -5 x y -5 g h -4 x y -4 e f -3 x y -3 c d -2 x y -2 a b -1.2 @v1 @v2 -1.2 1 2 -Warnings: -Warning 1265 Data truncated for column 'x' at row 1 -Warning 1265 Data truncated for column 'y' at row 1 -DROP PROCEDURE IF EXISTS sp1; - -Testcase 3.1.2.26: ------------------- - -Ensure that the initial value of every variable declared for a stored procedure -is either NULL or its DEFAULT value, as appropriate. --------------------------------------------------------------------------------- -DROP PROCEDURE IF EXISTS sp1; -set @v1=0; -set @v2=0; -CREATE PROCEDURE sp1( ) -BEGIN -declare x1 char default 'x'; -declare y1 char; -declare x2 tinytext default 'tinytext'; -declare y2 tinytext; -declare x3 datetime default '2005-10-03 12:13:14'; -declare y3 datetime; -declare x4 float default 1.2; -declare y4 float; -declare x5 blob default 'b'; -declare y5 blob; -declare x6 smallint default 127; -declare y6 smallint; -SELECT x1, x2, x3, x4, x5, x6, y1, y2, y3, y4, y5, y6; -END// -CALL sp1(); -x1 x2 x3 x4 x5 x6 y1 y2 y3 y4 y5 y6 -x tinytext 2005-10-03 12:13:14 1.2 b 127 NULL NULL NULL NULL NULL NULL -DROP PROCEDURE sp1; - -Testcase 3.1.2.30: ------------------- - -Ensure that, when a stored procedure is called/executed, every variable always -uses the correct value: either the value with which it is initialized or the -value to which it is subsequently SET or otherwise assigned, as appropriate. --------------------------------------------------------------------------------- -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1( IN invar INT, OUT outvar INT ) -BEGIN -declare x integer; -declare y integer default 1; -set @x = x; -set @y = y; -set @z = 234; -SELECT f1, f2 into @x, @y from t2 where f1='a`' and f2='a`' limit 1; -SELECT @x, @y, @z, invar; -BEGIN -set @x = 2; -SELECT @x, @y, @z; -SET outvar = @x * invar + @z * @f; -SET invar = outvar; -BEGIN -set @y = null, @z = 'abcd'; -SELECT @x, @y, @z; -END; -END; -END// -SET @invar = 100; -SET @outvar = @invar; -SET @f = 10; -SELECT @x, @y, @z, @invar, @outvar; -@x @y @z @invar @outvar -NULL NULL NULL 100 100 -CALL sp1( @invar, @outvar ); -@x @y @z invar -a` a` 234 100 -@x @y @z -2 a` 234 -@x @y @z -2 NULL abcd -SELECT @x, @y, @z, @invar, @outvar; -@x @y @z @invar @outvar -2 NULL abcd 100 2540 -DROP PROCEDURE sp1; - -Testcase 3.1.2.31: ------------------- - -Ensure that the SELECT ... INTO statement properly assigns values to the -variables in its variable list. --------------------------------------------------------------------------------- -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1( ) -BEGIN -declare x integer; declare y integer; -set @x=x; -set @y=y; -SELECT f4, f3 into @x, @y from t2 where f4=-5000 and f3='1000-01-01' limit 1; -SELECT @x, @y; -END// -CALL sp1(); -@x @y --5000 1000-01-01 -DROP PROCEDURE sp1; - -Testcase 3.1.2.32: ------------------- - -Ensure that a SELECT ... INTO statement that retrieves multiple rows is -rejected, with an appropriate error message. --------------------------------------------------------------------------------- -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1( ) -BEGIN -declare x integer; declare y integer; -set @x=x; -set @y=y; -SELECT f4, f3 into @x, @y from t2; -END// -CALL sp1(); -ERROR 42000: Result consisted of more than one row -DROP PROCEDURE sp1; - -Testcase 3.1.2.33: ------------------- - -Ensure that a SELECT ... INTO statement that retrieves too many columns for the -number of variables in its variable list is rejected, with an appropriate error -message. --------------------------------------------------------------------------------- -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1( ) -BEGIN -declare x integer; declare y integer; -set @x=x; -set @y=y; -SELECT f4, f3, f2, f1 into @x, @y from t2; -END// -CALL sp1(); -ERROR 21000: The used SELECT statements have a different number of columns -DROP PROCEDURE sp1; - -Testcase 3.1.2.34: ------------------- - -Ensure that a SELECT ... INTO statement that retrieves too few columns for the -number of variables in its variable list is rejected, with an appropriate error -message. --------------------------------------------------------------------------------- -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1( ) -BEGIN -declare x integer; declare y integer; declare z integer; -set @x=x; -set @y=y; -set @z=z; -SELECT f4 into @x, @y, @z from t2; -END// -CALL sp1(); -ERROR 21000: The used SELECT statements have a different number of columns -DROP PROCEDURE sp1; - -Testcase 3.1.2.38: ------------------- - -Ensure that the scope of every condition declared is properly applied. --------------------------------------------------------------------------------- -DROP PROCEDURE IF EXISTS h1; -DROP TABLE IF EXISTS res_t1; -create table res_t1(w char unique, x char); -insert into res_t1 values('a', 'b'); -CREATE PROCEDURE h1 () -BEGIN -declare x1, x2, x3, x4, x5, x6 int default 0; -SELECT '-1-', x1, x2, x3, x4, x5, x6; -BEGIN -declare condname condition for sqlstate '23000'; -declare continue handler for condname set x5 = 1; -set x6 = 0; -insert into res_t1 values ('a', 'b'); -set x6 = 1; -SELECT '-2-', x1, x2, x3, x4, x5, x6; -END; -begin1_label: BEGIN -BEGIN -declare condname condition for sqlstate '20000'; -declare continue handler for condname set x1 = 1; -set x2 = 0; -case x2 -when 1 then set x2=10; -when 2 then set x2=11; -END case; -set x2 = 1; -SELECT '-3-', x1, x2, x3, x4, x5, x6; -begin2_label: BEGIN -BEGIN -declare condname condition for sqlstate '23000'; -declare exit handler for condname set x3 = 1; -set x4= 1; -SELECT '-4a', x1, x2, x3, x4, x5, x6; -insert into res_t1 values ('a', 'b'); -set x4= 2; -SELECT '-4b', x1, x2, x3, x4, x5, x6; -END; -SELECT '-5-', x1, x2, x3, x4, x5, x6; -END begin2_label; -SELECT '-6-', x1, x2, x3, x4, x5, x6; -END; -SELECT '-7-', x1, x2, x3, x4, x5, x6; -END begin1_label; -SELECT 'END', x1, x2, x3, x4, x5, x6; -END// -CALL h1(); --1- x1 x2 x3 x4 x5 x6 --1- 0 0 0 0 0 0 --2- x1 x2 x3 x4 x5 x6 --2- 0 0 0 0 1 1 --3- x1 x2 x3 x4 x5 x6 --3- 1 1 0 0 1 1 --4a x1 x2 x3 x4 x5 x6 --4a 1 1 0 1 1 1 --5- x1 x2 x3 x4 x5 x6 --5- 1 1 1 1 1 1 --6- x1 x2 x3 x4 x5 x6 --6- 1 1 1 1 1 1 --7- x1 x2 x3 x4 x5 x6 --7- 1 1 1 1 1 1 -END x1 x2 x3 x4 x5 x6 -END 1 1 1 1 1 1 -DROP TABLE IF EXISTS tnull; -DROP PROCEDURE IF EXISTS sp1; -CREATE TABLE tnull(f1 int); -CREATE PROCEDURE sp1() -BEGIN -declare cond1 condition for sqlstate '42S02'; -declare continue handler for cond1 set @var2 = 1; -BEGIN -declare cond1 condition for sqlstate '23000'; -declare continue handler for cond1 set @var2 = 1; -END; -insert into tnull values(1); -END// -CALL sp1(); -DROP PROCEDURE h1; -drop table res_t1; -DROP PROCEDURE sp1; -DROP TABLE tnull; - -Testcase 3.1.2.43: ------------------- - -Ensure that the DECLARE ... HANDLER FOR statement can not declare any handler -for a condition declared outside of the scope of the handler. --------------------------------------------------------------------------------- -DROP PROCEDURE IF EXISTS h1; -DROP PROCEDURE IF EXISTS h2; -drop table IF EXISTS res_t1; -create table res_t1(w char unique, x char); -insert into res_t1 values ('a', 'b'); -CREATE PROCEDURE h1 () -BEGIN -declare x1, x2, x3, x4, x5, x6 int default 0; -BEGIN -declare cond_1 condition for sqlstate '23000'; -declare continue handler for cond_1 set x5 = 1; -BEGIN -declare cond_2 condition for sqlstate '20000'; -declare continue handler for cond_1 set x1 = 1; -BEGIN -declare continue handler for cond_2 set x3 = 1; -set x2 = 1; -END; -set x6 = 0; -END; -BEGIN -declare continue handler for cond_1 set x1 = 1; -BEGIN -declare continue handler for cond_2 set x3 = 1; -set x2 = 1; -END; -set x6 = 0; -END; -END; -SELECT x1, x2, x3, x4, x5, x6; -END// -ERROR 42000: Undefined CONDITION: cond_2 -CREATE PROCEDURE h2 () -BEGIN -declare x1, x2, x3, x4, x5, x6 int default 0; -BEGIN -declare condname condition for sqlstate '23000'; -declare continue handler for condname set x5 = 1; -BEGIN -declare condname condition for sqlstate '20000'; -declare continue handler for condname set x1 = 1; -BEGIN -declare condname condition for sqlstate '42000'; -declare continue handler for condname set x3 = 1; -set x6 = 0; -insert into res_t1 values ('a', 'b'); -set x6 = 1; -set x4= 0; -CALL sp1(); -set x4= 1; -set x2 = 0; -case x2 -when 1 then set x2=10; -when 2 then set x2=11; -END case; -set x2 = 1; -END; -set x2 = 0; -case x2 -when 1 then set x2=10; -when 2 then set x2=11; -END case; -set x2 = 1; -set x6 = 0; -insert into res_t1 values ('a', 'b'); -set x6 = 1; -END; -END; -SELECT x1, x2, x3, x4, x5, x6; -END// -CALL h2(); -x1 x2 x3 x4 x5 x6 -1 1 1 1 1 1 -SELECT * FROM res_t1; -w x -a b -DROP PROCEDURE h2; -drop table res_t1; - -Testcase 3.1.2.44: ------------------- - -Ensure that the DECLARE ... HANDLER FOR statement cannot declare a handler for -any invalid, or undeclared, condition. --------------------------------------------------------------------------------- -DROP PROCEDURE IF EXISTS h1; -CREATE PROCEDURE h1 () -BEGIN -declare x1, x2, x3, x4, x5, x6 int default 0; -BEGIN -declare condname1 condition for sqlstate '23000'; -BEGIN -declare condname2 condition for sqlstate '20000'; -declare continue handler for condname1 set x3 = 1; -declare continue handler for condname2 set x1 = 1; -END; -END; -BEGIN -declare condname3 condition for sqlstate '42000'; -declare continue handler for condname1 set x3 = 1; -declare continue handler for condname2 set x5 = 1; -declare continue handler for condname3 set x1 = 1; -END; -END// -ERROR 42000: Undefined CONDITION: condname1 -CREATE PROCEDURE h1 () -BEGIN -DECLARE x1 INT DEFAULT 0; -BEGIN -DECLARE condname1 CONDITION CHECK SQLSTATE '23000'; -END; -DECLARE CONTINUE HANDLER FOR condname1 SET x1 = 1; -END// -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CHECK SQLSTATE '23000'; -END; -DECLARE CONTINUE HANDLER FOR condname1 SET x1 = 1; -' at line 5 -CREATE PROCEDURE h1 () -BEGIN -DECLARE x1 INT DEFAULT 0; -BEGIN -DECLARE condname1 CONDITION FOR SQLSTATE 'qwert'; -END; -DECLARE CONTINUE HANDLER FOR condname1 SET x1 = 1; -END// -ERROR 42000: Bad SQLSTATE: 'qwert' - -Testcase 3.1.2.45 + 3.1.2.50: ------------------------------ - -45. Ensure that the scope of every handler declared is properly applied. -50. Ensure that a CONTINUE handler allows the execution of the stored procedure -. to continue once the handler statement has completed its own execution (that -. is, once the handler action statement has been executed). --------------------------------------------------------------------------------- -DROP PROCEDURE IF EXISTS p1; -DROP PROCEDURE IF EXISTS p1undo; -DROP PROCEDURE IF EXISTS h1; -DROP PROCEDURE IF EXISTS sp1; -drop table IF EXISTS res_t1; -==> 'UNDO' is still not supported. -create procedure p1undo () -begin -declare undo handler for sqlexception select '1'; -select * from tqq; -SELECT 'end of 1'; -end;// -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'undo handler for sqlexception select '1'; -select * from tqq; -SELECT 'end of 1'; -' at line 3 -create procedure p1 () -begin -declare exit handler for sqlexception select 'exit handler 1'; -begin -declare exit handler for sqlexception select 'exit handler 2'; -begin -declare continue handler for sqlexception select 'continue handler 3'; -drop table if exists tqq; -select * from tqq; -SELECT 'end of BEGIN/END 3'; -end; -drop table if exists tqq; -select * from tqq; -SELECT 'end of BEGIN/END 2'; -end; -select * from tqq; -SELECT 'end of BEGIN/END 1'; -end;// -call p1()// -continue handler 3 -continue handler 3 -end of BEGIN/END 3 -end of BEGIN/END 3 -exit handler 2 -exit handler 2 -exit handler 1 -exit handler 1 -create table res_t1(w char unique, x char); -insert into res_t1 values ('a', 'b'); -CREATE PROCEDURE h1 () -BEGIN -declare x1, x2, x3, x4, x5, x6 int default 0; -BEGIN -declare continue handler for sqlstate '23000' set x5 = 1; -insert into res_t1 values ('a', 'b'); -set x6 = 1; -END; -begin1_label: BEGIN -BEGIN -declare continue handler for sqlstate '23000' set x1 = 1; -insert into res_t1 values ('a', 'b'); -set x2 = 1; -begin2_label: BEGIN -BEGIN -declare exit handler for sqlstate '23000' set x3 = 1; -set x4= 1; -insert into res_t1 values ('a', 'b'); -set x4= 0; -END; -END begin2_label; -END; -END begin1_label; -SELECT x1, x2, x3, x4, x5, x6; -END// -CALL h1(); -x1 x2 x3 x4 x5 x6 -1 1 1 1 1 1 -This will fail, SQLSTATE 00000 is not allowed -CREATE PROCEDURE sp1() -begin1_label:BEGIN -declare exit handler for sqlstate '00000' set @var1 = 5; -set @var2 = 6; -begin2_label:BEGIN -declare continue handler for sqlstate '00000' set @var3 = 7; -set @var4 = 8; -SELECT @var3, @var4; -END begin2_label; -SELECT @var1, @var2; -END begin1_label// -ERROR 42000: Bad SQLSTATE: '00000' -Verify SP wasn't created -CALL sp1(); -ERROR 42000: PROCEDURE db_storedproc.sp1 does not exist -DROP PROCEDURE p1; -DROP PROCEDURE h1; -DROP PROCEDURE IF EXISTS sp1; -DROP TABLE res_t1; - -Testcase 3.1.2.50: ------------------- -DROP PROCEDURE IF EXISTS sp1; -DROP PROCEDURE IF EXISTS sp2; -CREATE PROCEDURE sp1 (x int, y int) -BEGIN -set @y=0; -END// -CREATE PROCEDURE sp2 () -BEGIN -declare continue handler for sqlstate '42000' set @x2 = 1; -set @x=1; -SELECT @x2; -CALL sp1(1); -set @x=2; -SELECT @x2, @x; -END// -CALL sp2(); -@x2 -NULL -@x2 @x -1 2 -DROP PROCEDURE sp1; -DROP PROCEDURE sp2; - -Testcase 3.2.2.51: ------------------- - -Ensure that an EXIT handler causes the execution of the stored procedure to -terminate, within its scope, once the handler action statement has been -executed. --------------------------------------------------------------------------------- -DROP PROCEDURE IF EXISTS sp1; -DROP PROCEDURE IF EXISTS sp2; -CREATE PROCEDURE sp1 (x int, y int) -BEGIN -set @x=0; -END// -CREATE PROCEDURE sp2 () -BEGIN -declare exit handler for sqlstate '42000' set @x2 = 1; -set @x2=0; -set @x=1; -SELECT '-1-', @x2, @x; -CALL sp1(1); -SELECT '-2-', @x2, @x; -set @x=2; -END// -CALL sp1(1); -ERROR 42000: Incorrect number of arguments for PROCEDURE db_storedproc.sp1; expected 2, got 1 -CALL sp2(); --1- @x2 @x --1- 0 1 -SELECT '-3-', @x2, @x; --3- @x2 @x --3- 1 1 -DROP PROCEDURE sp1; -DROP PROCEDURE sp2; - -Testcase 3.1.2.52: ------------------- - -Ensure that an EXIT handler does not cause the execution of the stored procedure -to terminate outside of its scope. --------------------------------------------------------------------------------- -DROP PROCEDURE IF EXISTS sp1; -DROP PROCEDURE IF EXISTS sp2; -CREATE PROCEDURE sp1 (x int, y int) -BEGIN -set @x=0; -END// -CREATE PROCEDURE sp2() -BEGIN -declare continue handler for sqlstate '42000' set @x2 = 2; -set @x2 = 1; -set @x =20; -SELECT '-1-', @x2, @x; -BEGIN -declare exit handler for sqlstate '42000' set @x2 = 11; -SELECT '-2-', @x2, @x; -CALL sp1(1); -SELECT '-3a', @x2, @x; -set @x=21; -SELECT '-3b', @x2, @x; -END; -set @x=22; -SELECT '-4-', @x2, @x; -END// -CALL sp2(); --1- @x2 @x --1- 1 20 --2- @x2 @x --2- 1 20 --4- @x2 @x --4- 11 22 -DROP PROCEDURE sp1; -DROP PROCEDURE sp2; - -Testcase 3.1.2.54: ------------------- - -Ensure that a handler with a condition defined with an SQLSTATE that begins with -“01“ is always exactly equivalent in action to a handler with an SQLWARNING -condition. --------------------------------------------------------------------------------- -DROP PROCEDURE IF EXISTS sp0; -DROP PROCEDURE IF EXISTS sp1; -DROP PROCEDURE IF EXISTS sp2; -DROP PROCEDURE IF EXISTS sp3; -DROP PROCEDURE IF EXISTS sp4; -DROP TABLE IF EXISTS temp; -CREATE TABLE temp( f1 CHAR, f2 CHAR); -CREATE PROCEDURE sp0() -BEGIN -set @done=0; -set @x=0; -insert into temp values('xxx', 'yy'); -set @x=1; -END// -CREATE PROCEDURE sp1() -BEGIN -declare continue handler for sqlstate '01000' set @done = 1; -set @done=0; -set @x=0; -insert into temp values('xxx', 'yy'); -set @x=1; -END// -CREATE PROCEDURE sp2() -BEGIN -declare continue handler for sqlwarning set @done = 1; -set @done=0; -set @x=0; -insert into temp values('xxx', 'yy'); -set @x=1; -END// -CREATE PROCEDURE sp3() -BEGIN -declare exit handler for sqlstate '01000' set @done = 1; -set @done=0; -set @x=0; -insert into temp values('xxx', 'yy'); -set @x=1; -END// -CREATE PROCEDURE sp4() -BEGIN -declare exit handler for sqlwarning set @done = 1; -set @done=0; -set @x=0; -insert into temp values('xxx', 'yy'); -set @x=1; -END// -INSERT INTO temp VALUES('0', NULL); -CALL sp0(); -Warnings: -Warning 1265 Data truncated for column 'f1' at row 1 -Warning 1265 Data truncated for column 'f2' at row 1 -SELECT @done, @x; -@done @x -0 1 -INSERT INTO temp VALUES('1', NULL); -CALL sp1(); -SELECT @done, @x; -@done @x -1 1 -INSERT INTO temp VALUES('2', NULL); -CALL sp2(); -SELECT @done, @x; -@done @x -1 1 -INSERT INTO temp VALUES('3', NULL); -CALL sp3(); -SELECT @done, @x; -@done @x -1 0 -INSERT INTO temp VALUES('4', NULL); -CALL sp4(); -SELECT @done, @x; -@done @x -1 0 -SELECT * FROM temp; -f1 f2 -0 NULL -x y -1 NULL -x y -2 NULL -x y -3 NULL -x y -4 NULL -x y -DROP PROCEDURE sp1; -DROP PROCEDURE sp2; -DROP PROCEDURE sp3; -DROP PROCEDURE sp4; -DROP TABLE temp; - -Testcase 3.1.2.56: ------------------- - -Ensure that a handler with a condition defined with an SQLSTATE that begins with -“02“ is always exactly equivalent in action to a handler with a NOT FOUND -condition. --------------------------------------------------------------------------------- -DROP PROCEDURE IF EXISTS sp0; -DROP PROCEDURE IF EXISTS sp1; -DROP PROCEDURE IF EXISTS sp2; -DROP PROCEDURE IF EXISTS sp3; -DROP PROCEDURE IF EXISTS sp4; -CREATE PROCEDURE sp0() -BEGIN -DECLARE f1_value CHAR(20); -DECLARE cur1 CURSOR FOR SELECT f1 FROM t2 LIMIT 1; -SET @done = 0; -SET @x = 0; -OPEN cur1; -FETCH cur1 INTO f1_value; -SET @x = 1; -FETCH cur1 INTO f1_value; -SET @x = 2; -CLOSE cur1; -END// -CREATE PROCEDURE sp1() -BEGIN -DECLARE f1_value CHAR(20); -DECLARE cur1 CURSOR FOR SELECT f1 FROM t2 LIMIT 1; -declare continue handler for sqlstate '02000' set @done = 1; -SET @done = 0; -SET @x = 0; -OPEN cur1; -FETCH cur1 INTO f1_value; -SET @x = 1; -FETCH cur1 INTO f1_value; -SET @x = 2; -CLOSE cur1; -END// -CREATE PROCEDURE sp2() -BEGIN -DECLARE f1_value CHAR(20); -DECLARE cur1 CURSOR FOR SELECT f1 FROM t2 LIMIT 1; -declare continue handler for not found set @done = 1; -SET @done = 0; -SET @x = 0; -OPEN cur1; -FETCH cur1 INTO f1_value; -SET @x = 1; -FETCH cur1 INTO f1_value; -SET @x = 2; -CLOSE cur1; -END// -CREATE PROCEDURE sp3() -BEGIN -DECLARE f1_value CHAR(20); -DECLARE cur1 CURSOR FOR SELECT f1 FROM t2 LIMIT 1; -declare exit handler for sqlstate '02000' set @done = 1; -SET @done = 0; -SET @x = 0; -OPEN cur1; -FETCH cur1 INTO f1_value; -SET @x = 1; -FETCH cur1 INTO f1_value; -SET @x = 2; -CLOSE cur1; -END// -CREATE PROCEDURE sp4() -BEGIN -DECLARE f1_value CHAR(20); -DECLARE cur1 CURSOR FOR SELECT f1 FROM t2 LIMIT 1; -declare exit handler for not found set @done = 1; -SET @done = 0; -SET @x = 0; -OPEN cur1; -FETCH cur1 INTO f1_value; -SET @x = 1; -FETCH cur1 INTO f1_value; -SET @x = 2; -CLOSE cur1; -END// -CALL sp0(); -ERROR 02000: No data - zero rows fetched, selected, or processed -SELECT @done, @x; -@done @x -0 1 -CALL sp1(); -SELECT @done, @x; -@done @x -1 2 -CALL sp2(); -SELECT @done, @x; -@done @x -1 2 -CALL sp3(); -SELECT @done, @x; -@done @x -1 1 -CALL sp4(); -SELECT @done, @x; -@done @x -1 1 -DROP PROCEDURE sp0; -DROP PROCEDURE sp1; -DROP PROCEDURE sp2; -DROP PROCEDURE sp3; -DROP PROCEDURE sp4; - -Testcase 3.1.2.58: ------------------- - -Ensure that a handler with a condition defined with an SQLSTATE that begins with -anything other that “01“ or “02“ is always exactly equivalent in action to a -handler with an SQLEXCEPTION condition. --------------------------------------------------------------------------------- -DROP PROCEDURE IF EXISTS sp0; -DROP PROCEDURE IF EXISTS sp1; -DROP PROCEDURE IF EXISTS sp2; -DROP PROCEDURE IF EXISTS sp3; -DROP PROCEDURE IF EXISTS sp4; -CREATE PROCEDURE sp0() -BEGIN -DECLARE f1_value CHAR(20); -DECLARE cv INT DEFAULT 0; -DECLARE cur1 CURSOR FOR SELECT f1 FROM t2 LIMIT 1; -SET @x = 1; -CASE cv -WHEN 2 THEN SET @x = 2; -WHEN 3 THEN SET @x = 3; -END case; -SET @x = 4; -SELECT f1, f2 FROM t2 -UNION -SELECT f1, f2,3 FROM t2; -SET @x = 5; -FETCH cur1 INTO f1_value; -SET @x = 6; -END// -CREATE PROCEDURE sp1() -BEGIN -DECLARE f1_value CHAR(20); -DECLARE cv INT DEFAULT 0; -DECLARE cur1 CURSOR FOR SELECT f1 FROM t2 LIMIT 1; -DECLARE continue HANDLER FOR SQLSTATE '20000' SELECT '20000' AS 'SQLSTATE'; -DECLARE continue HANDLER FOR SQLSTATE '21000' SELECT '21000' AS 'SQLSTATE'; -DECLARE continue HANDLER FOR SQLSTATE '24000' SELECT '24000' AS 'SQLSTATE'; -SET @x = 1; -CASE cv -WHEN 2 THEN SET @x = 2; -WHEN 3 THEN SET @x = 3; -END case; -SET @x = 4; -SELECT f1, f2 FROM t2 -UNION -SELECT f1, f2,3 FROM t2; -SET @x = 5; -FETCH cur1 INTO f1_value; -SET @x = 6; -END// -CREATE PROCEDURE sp2() -BEGIN -DECLARE f1_value CHAR(20); -DECLARE cv INT DEFAULT 0; -DECLARE cur1 CURSOR FOR SELECT f1 FROM t2 LIMIT 1; -DECLARE continue HANDLER FOR SQLEXCEPTION SELECT 'SQLEXCEPTION' AS 'SQLSTATE'; -DECLARE continue HANDLER FOR SQLSTATE '24000' SELECT '24000' AS 'SQLSTATE'; -SET @x = 1; -CASE cv -WHEN 2 THEN SET @x = 2; -WHEN 3 THEN SET @x = 3; -END case; -SET @x = 4; -SELECT f1, f2 FROM t2 -UNION -SELECT f1, f2,3 FROM t2; -SET @x = 5; -FETCH cur1 INTO f1_value; -SET @x = 6; -END// -CREATE PROCEDURE sp3() -BEGIN -DECLARE f1_value CHAR(20); -DECLARE cv INT DEFAULT 0; -DECLARE cur1 CURSOR FOR SELECT f1 FROM t2 LIMIT 1; -DECLARE EXIT HANDLER FOR SQLSTATE '20000' SELECT '20000' AS 'SQLSTATE'; -DECLARE EXIT HANDLER FOR SQLSTATE '21000' SELECT '21000' AS 'SQLSTATE'; -DECLARE EXIT HANDLER FOR SQLSTATE '24000' SELECT '24000' AS 'SQLSTATE'; -SET @x = 1; -CASE cv -WHEN 2 THEN SET @x = 2; -WHEN 3 THEN SET @x = 3; -END case; -SET @x = 4; -SELECT f1, f2 FROM t2 -UNION -SELECT f1, f2,3 FROM t2; -SET @x = 5; -FETCH cur1 INTO f1_value; -SET @x = 6; -END// -CREATE PROCEDURE sp4() -BEGIN -DECLARE f1_value CHAR(20); -DECLARE cv INT DEFAULT 0; -DECLARE cur1 CURSOR FOR SELECT f1 FROM t2 LIMIT 1; -DECLARE EXIT HANDLER FOR SQLEXCEPTION SELECT 'SQLEXCEPTION' AS 'SQLSTATE'; -DECLARE EXIT HANDLER FOR SQLSTATE '24000' SELECT '24000' AS 'SQLSTATE'; -SET @x = 1; -CASE cv -WHEN 2 THEN SET @x = 2; -WHEN 3 THEN SET @x = 3; -END case; -SET @x = 4; -SELECT f1, f2 FROM t2 -UNION -SELECT f1, f2,3 FROM t2; -SET @x = 5; -FETCH cur1 INTO f1_value; -SET @x = 6; -CLOSE cur1; -END// -CALL sp0(); -ERROR 20000: Case not found for CASE statement -SELECT '-0-', @x; --0- @x --0- 1 -CALL sp1(); -SQLSTATE -20000 -SQLSTATE -21000 -SQLSTATE -24000 -SELECT '-1-', @x; --1- @x --1- 6 -CALL sp2(); -SQLSTATE -SQLEXCEPTION -SQLSTATE -SQLEXCEPTION -SQLSTATE -24000 -SELECT '-2-', @x; --2- @x --2- 6 -CALL sp3(); -SQLSTATE -20000 -SELECT '-3-', @x; --3- @x --3- 1 -CALL sp4(); -SQLSTATE -SQLEXCEPTION -SELECT '-4-', @x; --4- @x --4- 1 -DROP PROCEDURE sp0; -DROP PROCEDURE sp1; -DROP PROCEDURE sp2; -DROP PROCEDURE sp3; -DROP PROCEDURE sp4; - -Testcase 3.1.2.65: ------------------- - -Ensure that FETCH returns the first row of the cursor_s result set -the first time FETCH is executed, that it returns each subsequent row of the -cursor_s result set each of the subsequent times FETCH is executed, and that it -returns a NOT FOUND warning if it is executed after the last row of the cursor_s -result set has already been fetched. --------------------------------------------------------------------------------- -DROP PROCEDURE IF EXISTS sp1; -DROP TABLE IF EXISTS temp; -CREATE TABLE temp( -cnt INT, -f1 CHAR(20), -f2 CHAR(20), -f3 INT, -f4 CHAR(20), -f5 INT); -INSERT INTO temp VALUES(0, 'onip', 'abc', 8760, 'xyz', 10); -CREATE PROCEDURE sp1( ) -BEGIN -declare proceed int default 1; -declare count integer default 1; -declare f1_value char(20); -declare f2_value char(20); -declare f5_value char(20); -declare f4_value integer; -declare f6_value integer; -declare cur1 cursor for SELECT f1, f2, f4, f5, f6 from t2 -where f4 >=-5000 order by f4 limit 3; -open cur1; -while proceed do -SELECT count AS 'loop'; -fetch cur1 into f1_value, f2_value, f4_value, f5_value, f6_value; -insert into temp values (count, f1_value, f2_value, f4_value, f5_value, f6_value); -set count = count + 1; -END while; -END// -CALL sp1(); -loop -1 -loop -2 -loop -3 -loop -4 -ERROR 02000: No data - zero rows fetched, selected, or processed -SELECT * FROM temp; -cnt f1 f2 f3 f4 f5 -0 onip abc 8760 xyz 10 -1 a` a` -5000 a` -5000 -2 aaa aaa -4999 aaa -4999 -3 abaa abaa -4998 abaa -4998 -DROP TABLE temp; -DROP PROCEDURE sp1; - -Testcase 3.1.2.68: ------------------- - -Ensure that FETCH fails with an appropriate error message if the -number of columns to be fetched does not match the number of variables specified -by the FETCH statement. --------------------------------------------------------------------------------- -DROP PROCEDURE IF EXISTS sp1; -DROP PROCEDURE IF EXISTS sp2; ---> not enough columns in FETCH statement -CREATE PROCEDURE sp1( ) -BEGIN -declare newf1 char(20); -declare cur1 cursor for SELECT f1, f2 from t2 limit 10; -declare continue handler for sqlstate '02000' SELECT 'HANDLER executed.' AS ''; -BEGIN -open cur1; -fetch cur1 into newf1; -SELECT newf1; -close cur1; -END; -END// ---> too many columns in FETCH statement -CREATE PROCEDURE sp2( ) -BEGIN -declare newf1 char(20); -declare newf2 char(20); -declare cur1 cursor for SELECT f1 from t2 limit 10; -declare continue handler for sqlstate '02000' SELECT 'HANDLER executed.' AS ''; -BEGIN -open cur1; -fetch cur1 into newf1, newf2; -SELECT newf1, newf2; -close cur1; -END; -END// ---> not enough columns in FETCH statement -CALL sp1(); -ERROR HY000: Incorrect number of FETCH variables ---> too many columns in FETCH statement -CALL sp2(); -ERROR HY000: Incorrect number of FETCH variables -DROP PROCEDURE sp1; -DROP PROCEDURE sp2; - -Testcase 3.1.2.75: ------------------- - -Ensure that, for nested compound statements, a cursor that was declared and -opened during an outer level of the statement is not closed when an inner level -of a compound statement ends. --------------------------------------------------------------------------------- -DROP TABLE IF EXISTS temp1; -DROP PROCEDURE IF EXISTS sp1; -create table temp1( f0 char(20), f1 char(20), f2 char(20), f3 int, f4 char(20) ); -SELECT f1, f2, f4, f5 from t2 order by f4; -f1 f2 f4 f5 -a` a` -5000 a` -aaa aaa -4999 aaa -abaa abaa -4998 abaa -acaaa acaaa -4997 acaaa -adaaaa adaaaa -4996 adaaaa -aeaaaaa aeaaaaa -4995 aeaaaaa -afaaaaaa afaaaaaa -4994 afaaaaaa -agaaaaaaa agaaaaaaa -4993 agaaaaaaa -a^aaaaaaaa a^aaaaaaaa -4992 a^aaaaaaaa -a_aaaaaaaaa a_aaaaaaaaa -4991 a_aaaaaaaaa -CREATE PROCEDURE sp1( ) -BEGIN -declare count integer; -declare from0 char(20); -declare newf1 char(20); -declare newf2 char(20); -declare newf5 char(20); -declare newf4 integer; -declare cur1 cursor for SELECT f1, f2, f4, f5 from t2 where f4 >= -5000 order by f4 limit 5; -declare cur2 cursor for SELECT f1, f2, f4, f5 from t2 where f4 >= -5000 order by f4 limit 5; -open cur1; -open cur2; -BEGIN -declare continue handler for sqlstate '02000' set count = 1; -fetch cur1 into newf1, newf2, newf4, newf5; -SELECT '-1-', count, newf1, newf2, newf4, newf5; -insert into temp1 values ('cur1_out', newf1, newf2, newf4, newf5); -set count = 4; -BEGIN -while count > 0 do -fetch cur1 into newf1, newf2, newf4, newf5; -SELECT '-2-', count, newf1, newf2, newf4, newf5; -set count = count - 1; -END while; -SELECT '-3-', count, newf1, newf2, newf4, newf4; -END; -BEGIN -fetch cur1 into newf1, newf2, newf4, newf5; -SELECT '-4-', newf1, newf2, newf4, newf5; -insert into temp1 values ('cur1_in', newf1, newf2, newf4, newf5); -END; -fetch cur2 into newf1, newf2, newf4, newf5; -SELECT '-5-', newf1, newf2, newf4, newf5; -insert into temp1 values ('cur2', newf1, newf2, newf4, newf5); -close cur1; -END; -fetch cur2 into newf1, newf2, newf4, newf5; -SELECT '-6-', newf1, newf2, newf4, newf5; -close cur2; -END// -CALL sp1(); --1- count newf1 newf2 newf4 newf5 --1- NULL a` a` -5000 a` --2- count newf1 newf2 newf4 newf5 --2- 4 aaa aaa -4999 aaa --2- count newf1 newf2 newf4 newf5 --2- 3 abaa abaa -4998 abaa --2- count newf1 newf2 newf4 newf5 --2- 2 acaaa acaaa -4997 acaaa --2- count newf1 newf2 newf4 newf5 --2- 1 adaaaa adaaaa -4996 adaaaa --3- count newf1 newf2 newf4 newf4 --3- 0 adaaaa adaaaa -4996 -4996 --4- newf1 newf2 newf4 newf5 --4- adaaaa adaaaa -4996 adaaaa --5- newf1 newf2 newf4 newf5 --5- a` a` -5000 a` --6- newf1 newf2 newf4 newf5 --6- aaa aaa -4999 aaa -SELECT * from temp1; -f0 f1 f2 f3 f4 -cur1_out a` a` -5000 a` -cur1_in adaaaa adaaaa -4996 adaaaa -cur2 a` a` -5000 a` -DROP PROCEDURE sp1; -drop table temp1; - -Testcase 3.1.2.76: ------------------- - -Ensure that all cursors operate asensitively, so that there is no concurrency -conflict between cursors operating on the same, or similar, sets of results -during execution of one or more stored procedures. --------------------------------------------------------------------------------- -DROP PROCEDURE IF EXISTS sp1; -drop table IF EXISTS temp1; -drop table IF EXISTS temp2; -create table temp1( f0 char(10), cnt int, f1 char(20), f2 char(20), f3 date, f4 integer ); -create table temp2( f0 char(10), cnt int, f1 char(20), f2 char(20), f3 date, f4 integer ); -CREATE PROCEDURE sp_inner( ) -BEGIN -declare proceed int default 1; -declare i_count integer default 20; -declare i_newf1 char(20); -declare i_newf2 char(20); -declare i_newf3 date; -declare i_newf4 integer; -declare i_newf11 char(20); -declare i_newf12 char(20); -declare i_newf13 date; -declare i_newf14 integer; -declare cur1 cursor for SELECT f1, f2, f3, f4 from t2 -where f4>=-5000 order by f4 limit 4; -declare cur2 cursor for SELECT f1, f2, f3, f4 from t2 -where f4>=-5000 order by f4 limit 3; -declare continue handler for sqlstate '02000' set proceed=0; -open cur1; -open cur2; -set i_count = 10; -while proceed do -fetch cur1 into i_newf1, i_newf2, i_newf3, i_newf4; -IF proceed THEN -insert into temp1 values ('sp_inner', i_count, i_newf1, i_newf2, i_newf3, i_newf4); -fetch cur2 into i_newf11, i_newf12, i_newf13, i_newf14; -IF proceed THEN -insert into temp2 values ('sp_inner', i_count, i_newf11, i_newf12, i_newf13, i_newf14); -END IF; -END IF; -set i_count = i_count - 1; -END while; -close cur1; -close cur2; -END// -CREATE PROCEDURE sp_outer( ) -BEGIN -DECLARE proceed INT DEFAULT 1; -DECLARE o_count INTEGER DEFAULT 20; -DECLARE o_newf1 CHAR(20); -DECLARE o_newf2 CHAR(20); -DECLARE o_newf3 DATE; -DECLARE o_newf4 INTEGER; -DECLARE o_newf11 CHAR(20); -DECLARE o_newf12 CHAR(20); -DECLARE o_newf13 DATE; -DECLARE o_newf14 INTEGER; -DECLARE cur1 CURSOR FOR SELECT f1, f2, f3, f4 FROM t2 -WHERE f4>=-5000 ORDER BY f4 LIMIT 5; -DECLARE cur2 CURSOR FOR SELECT f1, f2, f3, f4 FROM t2 -WHERE f4>=-5000 ORDER BY f4 LIMIT 5; -DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET proceed=0; -OPEN cur1; -OPEN cur2; -SET o_count = 1; -WHILE proceed DO -FETCH cur1 INTO o_newf1, o_newf2, o_newf3, o_newf4; -IF proceed THEN -INSERT INTO temp1 VALUES ('_sp_out_', o_count, o_newf1, o_newf2, o_newf3, o_newf4); -CALL sp_inner(); -FETCH cur2 INTO o_newf11, o_newf12, o_newf13, o_newf14; -IF proceed THEN -INSERT INTO temp2 VALUES ('_sp_out_', o_count, o_newf11, o_newf12, o_newf13, o_newf14); -END IF; -END IF; -SET o_count = o_count + 1; -END WHILE; -CLOSE cur1; -CLOSE cur2; -END// -CALL sp_outer(); -SELECT * FROM temp1; -f0 cnt f1 f2 f3 f4 -_sp_out_ 1 a` a` 1000-01-01 -5000 -sp_inner 10 a` a` 1000-01-01 -5000 -sp_inner 9 aaa aaa 1000-01-02 -4999 -sp_inner 8 abaa abaa 1000-01-03 -4998 -sp_inner 7 acaaa acaaa 1000-01-04 -4997 -_sp_out_ 2 aaa aaa 1000-01-02 -4999 -sp_inner 10 a` a` 1000-01-01 -5000 -sp_inner 9 aaa aaa 1000-01-02 -4999 -sp_inner 8 abaa abaa 1000-01-03 -4998 -sp_inner 7 acaaa acaaa 1000-01-04 -4997 -_sp_out_ 3 abaa abaa 1000-01-03 -4998 -sp_inner 10 a` a` 1000-01-01 -5000 -sp_inner 9 aaa aaa 1000-01-02 -4999 -sp_inner 8 abaa abaa 1000-01-03 -4998 -sp_inner 7 acaaa acaaa 1000-01-04 -4997 -_sp_out_ 4 acaaa acaaa 1000-01-04 -4997 -sp_inner 10 a` a` 1000-01-01 -5000 -sp_inner 9 aaa aaa 1000-01-02 -4999 -sp_inner 8 abaa abaa 1000-01-03 -4998 -sp_inner 7 acaaa acaaa 1000-01-04 -4997 -_sp_out_ 5 adaaaa adaaaa 1000-01-05 -4996 -sp_inner 10 a` a` 1000-01-01 -5000 -sp_inner 9 aaa aaa 1000-01-02 -4999 -sp_inner 8 abaa abaa 1000-01-03 -4998 -sp_inner 7 acaaa acaaa 1000-01-04 -4997 -SELECT * FROM temp2; -f0 cnt f1 f2 f3 f4 -sp_inner 10 a` a` 1000-01-01 -5000 -sp_inner 9 aaa aaa 1000-01-02 -4999 -sp_inner 8 abaa abaa 1000-01-03 -4998 -_sp_out_ 1 a` a` 1000-01-01 -5000 -sp_inner 10 a` a` 1000-01-01 -5000 -sp_inner 9 aaa aaa 1000-01-02 -4999 -sp_inner 8 abaa abaa 1000-01-03 -4998 -_sp_out_ 2 aaa aaa 1000-01-02 -4999 -sp_inner 10 a` a` 1000-01-01 -5000 -sp_inner 9 aaa aaa 1000-01-02 -4999 -sp_inner 8 abaa abaa 1000-01-03 -4998 -_sp_out_ 3 abaa abaa 1000-01-03 -4998 -sp_inner 10 a` a` 1000-01-01 -5000 -sp_inner 9 aaa aaa 1000-01-02 -4999 -sp_inner 8 abaa abaa 1000-01-03 -4998 -_sp_out_ 4 acaaa acaaa 1000-01-04 -4997 -sp_inner 10 a` a` 1000-01-01 -5000 -sp_inner 9 aaa aaa 1000-01-02 -4999 -sp_inner 8 abaa abaa 1000-01-03 -4998 -_sp_out_ 5 adaaaa adaaaa 1000-01-05 -4996 -DROP PROCEDURE sp_outer; -DROP PROCEDURE sp_inner; -DROP TABLE temp1; -DROP TABLE temp2; - ---source suite/funcs_1/storedproc/cleanup_sp_tb.inc --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_storedproc; -DROP DATABASE IF EXISTS db_storedproc_1; - -. +++ END OF SCRIPT +++ --------------------------------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/r/ndb_storedproc_03.result b/mysql-test/suite/funcs_1/r/ndb_storedproc_03.result deleted file mode 100644 index fdbe03e17fc..00000000000 --- a/mysql-test/suite/funcs_1/r/ndb_storedproc_03.result +++ /dev/null @@ -1,496 +0,0 @@ - ---source suite/funcs_1/storedproc/load_sp_tb.inc --------------------------------------------------------------------------------- - ---source suite/funcs_1/storedproc/cleanup_sp_tb.inc --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_storedproc; -DROP DATABASE IF EXISTS db_storedproc_1; -CREATE DATABASE db_storedproc; -CREATE DATABASE db_storedproc_1; -USE db_storedproc; -create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t1; -create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t2; -create table t3(f1 char(20),f2 char(20),f3 integer) engine = ; -load data infile '/std_data/funcs_1/t3.txt' into table t3; -create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t4; -USE db_storedproc_1; -create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t6; -USE db_storedproc; -create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) -engine = ; -load data infile '/std_data/funcs_1/t7.txt' into table t7; -Warnings: -Warning 1265 Data truncated for column 'f3' at row 1 -Warning 1265 Data truncated for column 'f3' at row 2 -Warning 1265 Data truncated for column 'f3' at row 3 -Warning 1265 Data truncated for column 'f3' at row 4 -Warning 1265 Data truncated for column 'f3' at row 5 -Warning 1265 Data truncated for column 'f3' at row 6 -Warning 1265 Data truncated for column 'f3' at row 7 -Warning 1265 Data truncated for column 'f3' at row 8 -Warning 1265 Data truncated for column 'f3' at row 9 -Warning 1265 Data truncated for column 'f3' at row 10 -create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) -engine = ; -load data infile '/std_data/funcs_1/t7.txt' into table t8; -Warnings: -Warning 1265 Data truncated for column 'f3' at row 1 -Warning 1265 Data truncated for column 'f3' at row 2 -Warning 1265 Data truncated for column 'f3' at row 3 -Warning 1265 Data truncated for column 'f3' at row 4 -Warning 1265 Data truncated for column 'f3' at row 5 -Warning 1265 Data truncated for column 'f3' at row 6 -Warning 1265 Data truncated for column 'f3' at row 7 -Warning 1265 Data truncated for column 'f3' at row 8 -Warning 1265 Data truncated for column 'f3' at row 9 -Warning 1265 Data truncated for column 'f3' at row 10 -create table t9(f1 int, f2 char(25), f3 int) engine = ; -load data infile '/std_data/funcs_1/t9.txt' into table t9; -create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t10; -create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t11; - -Section 3.1.3 - Syntax checks for the stored procedure-specific flow -control statements IF, CASE, LOOP, LEAVE, ITERATE, REPEAT, WHILE: --------------------------------------------------------------------------------- - -Testcase 3.1.3.7: ------------------ - -Ensure that the IF statement acts correctly for all variants, including cases -where statements are nested. --------------------------------------------------------------------------------- -DROP TABLE IF EXISTS res_t3_itisalongname_1381742_itsaverylongname_1381742; -DROP PROCEDURE IF EXISTS sp9; -CREATE TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742( f1 CHAR(20), f2 VARCHAR(20), f3 SMALLINT); -CREATE PROCEDURE sp9( action char(20), subaction char(20) ) -BEGIN -if action = 'action' then -if subaction = 'subaction' then -insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'action', 'subaction' , 1); -else -insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'action', 'none' , 2); -END if; -else -if subaction = 'subaction' - then -insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'none', 'subaction' , 3); -elseif subaction = 'subaction1' - then -BEGIN -insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values ('none', 'subaction1', 4); -END; -else -insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'none', 'none' , 5); -END if; -END if; -END// -CALL sp9( 'action', 'subaction' ); -SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742 where f3=1; -f1 f2 f3 -action subaction 1 -CALL sp9( 'temp', 'subaction' ); -SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742 where f3=3; -f1 f2 f3 -none subaction 3 -CALL sp9( 'temp', 'subaction1' ); -SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742 where f3=4; -f1 f2 f3 -none subaction1 4 -CALL sp9( 'action', 'temp' ); -SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742 where f3=2; -f1 f2 f3 -action none 2 -CALL sp9( 'temp', 'temp' ); -SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742 where f3=5; -f1 f2 f3 -none none 5 -DROP PROCEDURE sp9; -DROP TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742; - -Testcase 3.1.3.8.: ------------------- - -Ensure that the CASE statement acts correctly for all variants, including cases -where statements are nested. --------------------------------------------------------------------------------- -drop table IF EXISTS res_t3_itisalongname_1381742_itsaverylongname_1381742; -DROP PROCEDURE IF EXISTS sp10; -create table res_t3_itisalongname_1381742_itsaverylongname_1381742( f1 char(20), f2 varchar(20), f3 smallint); -CREATE PROCEDURE sp10( action char(20), subaction char(20) ) -BEGIN -case action -when 'action' then -case -when subaction = 'subaction_1' then -insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'action', 'subaction_2' , 1); -when subaction = 'subaction_2' then -insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'action', 'subaction_2' , 2); -else -insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'action', 'none' , 3); -END case; -else -case -when subaction = 'subaction_1' then -insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'none', 'subaction_1' , 4); -when subaction = 'subaction_2' then -insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'none', 'subaction_2' , 5); -else -insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'none', 'none' , 6); -END case; -END case; -END// -CALL sp10( 'action', 'subaction_1' ); -SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742; -f1 f2 f3 -action subaction_2 1 -delete from res_t3_itisalongname_1381742_itsaverylongname_1381742; -CALL sp10( 'action', 'subaction_2' ); -SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742; -f1 f2 f3 -action subaction_2 2 -delete from res_t3_itisalongname_1381742_itsaverylongname_1381742; -CALL sp10( 'temp', 'subaction_1' ); -SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742; -f1 f2 f3 -none subaction_1 4 -delete from res_t3_itisalongname_1381742_itsaverylongname_1381742; -CALL sp10( 'temp', 'subaction_2' ); -SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742; -f1 f2 f3 -none subaction_2 5 -delete from res_t3_itisalongname_1381742_itsaverylongname_1381742; -CALL sp10( 'action', 'temp' ); -SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742; -f1 f2 f3 -action none 3 -delete from res_t3_itisalongname_1381742_itsaverylongname_1381742; -CALL sp10( 'temp', 'temp' ); -SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742; -f1 f2 f3 -none none 6 -DROP PROCEDURE sp10; -DROP TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742; - -Testcase 3.1.3.9 + 3.1.3.15: ----------------------------- - -09. Ensure that the LOOP statement acts correctly for all variants, including -. cases where statements are nested. -15. Ensure that the LEAVE statement acts correctly for all variants, including -. cases where statements are nested. --------------------------------------------------------------------------------- -DROP TABLE IF EXISTS res_t3_itisalongname_1381742_itsaverylongname_1381742; -DROP PROCEDURE IF EXISTS sp11; -CREATE TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742( f1 CHAR(20), f2 VARCHAR(20), f3 SMALLINT); -CREATE PROCEDURE sp11( ) -BEGIN -declare count1 integer default 1; -declare count2 integer default 1; -label1: loop -if count2 > 3 then leave label1; -END if; -set count1 = 1; -label2: loop -if count1 > 4 then leave label2; -END if; -insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'xyz' , 'pqr', count1); -set count1 = count1 + 1; -iterate label2; -END loop label2; -set count2 = count2 + 1; -iterate label1; -END loop label1; -END// -CALL sp11(); -SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742; -f1 f2 f3 -xyz pqr 1 -xyz pqr 2 -xyz pqr 3 -xyz pqr 4 -xyz pqr 1 -xyz pqr 2 -xyz pqr 3 -xyz pqr 4 -xyz pqr 1 -xyz pqr 2 -xyz pqr 3 -xyz pqr 4 -DROP PROCEDURE sp11; -DROP TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742; - -Testcase 3.1.3.16: ------------------- - -Ensure that the ITERATE statement acts correctly for all variants, including -cases where statements are nested. -(tests for this testcase are also included in other testcases) --------------------------------------------------------------------------------- -DROP PROCEDURE IF EXISTS sp31316; -CREATE PROCEDURE sp31316( ) -BEGIN -declare count1 integer default 1; -declare count2 integer default 1; -label1: loop -if count2 > 3 then leave label1; -END if; -set count1 = 1; -label2: loop -if count1 > 4 then leave label2; -END if; -insert into temp values( count1, count2); -set count1 = count1 + 1; -iterate label3; -END loop label2; -set count2 = count2 + 1; -iterate label1; -END loop label1; -END// -ERROR 42000: ITERATE with no matching label: label3 - -Testcase 3.1.3.18: ------------------- - -Ensure that the REPEAT statement acts correctly for all variants, including -cases where statements are nested. --------------------------------------------------------------------------------- -DROP PROCEDURE IF EXISTS sp17; -DROP TABLE IF EXISTS res_t3_itisalongname_1381742_itsaverylongname_1381742; -CREATE TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742( f1 CHAR(20), f2 VARCHAR(20), f3 SMALLINT); -CREATE PROCEDURE sp17( ) -BEGIN -declare count1 integer default 1; -declare count2 integer default 1; -repeat -set count1 = count1 + 1; -set count2 = 1; -label1: repeat -set count2 = count2 + 1; -insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'xyz' , 'pqr', count1); -until count2 > 3 -END repeat label1; -until count1 > 3 -END repeat; -END// -CALL sp17(); -SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742; -f1 f2 f3 -xyz pqr 2 -xyz pqr 2 -xyz pqr 2 -xyz pqr 3 -xyz pqr 3 -xyz pqr 3 -xyz pqr 4 -xyz pqr 4 -xyz pqr 4 -DROP PROCEDURE sp17; -DROP TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742; - -Testcase 3.1.3.24: ------------------- - -Ensure that the WHILE statement acts correctly for all variants, including cases -where statements are nested. --------------------------------------------------------------------------------- -drop table IF EXISTS res_t21; -DROP PROCEDURE IF EXISTS sp21; -create table res_t21(name text(10), surname blob(20), age_averylongfieldname_averylongname_1234569 smallint); -insert into res_t21 values('ashwin', 'mokadam', 25); -CREATE PROCEDURE sp21( ) -BEGIN -declare count1 integer default 0; -declare count2 integer default 0; -while count1 < 3 do -BEGIN -declare ithisissamevariablename int default 100; -SELECT ithisissamevariablename; -BEGIN -declare ithisissamevariablename int default 200; -SELECT ithisissamevariablename; -END; -set count2 = 0; -label1: while count2 < 3 do -BEGIN -declare count1 integer default 7; -set count2 = count2 + 1; -insert into res_t21 values( 'xyz' , 'pqr', count2); -label2: while count1 < 10 do -set count1 = count1 + 1; -insert into res_t21 values( 'xyz' , 'pqr', count1); -END while label2; -END; -END while label1; -set count1 = count1 + 1; -END; -END while; -END// -CALL sp21(); -ithisissamevariablename -100 -ithisissamevariablename -200 -ithisissamevariablename -100 -ithisissamevariablename -200 -ithisissamevariablename -100 -ithisissamevariablename -200 -SELECT * from res_t21; -name surname age_averylongfieldname_averylongname_1234569 -ashwin mokadam 25 -xyz pqr 1 -xyz pqr 8 -xyz pqr 9 -xyz pqr 10 -xyz pqr 2 -xyz pqr 8 -xyz pqr 9 -xyz pqr 10 -xyz pqr 3 -xyz pqr 8 -xyz pqr 9 -xyz pqr 10 -xyz pqr 1 -xyz pqr 8 -xyz pqr 9 -xyz pqr 10 -xyz pqr 2 -xyz pqr 8 -xyz pqr 9 -xyz pqr 10 -xyz pqr 3 -xyz pqr 8 -xyz pqr 9 -xyz pqr 10 -xyz pqr 1 -xyz pqr 8 -xyz pqr 9 -xyz pqr 10 -xyz pqr 2 -xyz pqr 8 -xyz pqr 9 -xyz pqr 10 -xyz pqr 3 -xyz pqr 8 -xyz pqr 9 -xyz pqr 10 -DROP PROCEDURE sp21; -drop table res_t21; - -Testcase 3.1.3.30: ------------------- - -Ensure that multiple cases of all possible combinations of the control flow -statements, nested within multiple compound statements within a stored -procedure, always act correctly and return the expected result. --------------------------------------------------------------------------------- -DROP TABLE IF EXISTS res_tbl; -DROP PROCEDURE IF EXISTS sp31330; -create table res_tbl (f1 int, f2 text, f3 blob, f4 date, -f5 set('one', 'two', 'three', 'four', 'five') default 'one'); -CREATE PROCEDURE sp31330 (path int) -BEGIN -declare count int default 1; -declare var1 text; -declare var2 blob; -declare var3 date; -declare var4 set('one', 'two', 'three', 'four', 'five') DEFAULT 'five'; -case -when path=1 then -set var3 = '2000-11-09'; -set var1 = 'flowing through case 1'; -label1: loop -if count > 5 then -if var4=1000 then -set var2 = 'exiting out of case 1 - invalid SET'; -END if; -if var4='two' then -set var2 = 'exiting out of case 1'; -END if; -insert into res_tbl values (1, var1, var2, var3, (count-2)); -leave label1; -elseif count = 5 then -set count= count + 2; -set var4='two'; -iterate label1; -else -set count= count + 1; -END if; -set var4='one'; -END loop label1; -when path=2 then -set var3 = '1989-11-09'; -set var1 = 'flowing through case 2'; -set @count3=0; -label2: repeat -set count=count + 1; -set @count2=1; -while @count2 <= 5 do -set @count2 = @count2 + 1; -END while; -SELECT @count2; -set @count3=@count3 + @count2; -until count > 5 -END repeat label2; -set var2 = 'exiting out of case 2'; -set var4 = count-3; -SELECT @count3; -insert into res_tbl values (2, var1, var2, var3, var4); -ELSE BEGIN -set @error_opt='undefined path specified'; -SELECT @error_opt; -END; -END case; -END// -CALL sp31330(); -ERROR 42000: Incorrect number of arguments for PROCEDURE db_storedproc.sp31330; expected 1, got 0 -CALL sp31330(1); -SELECT * from res_tbl; -f1 f2 f3 f4 f5 -1 flowing through case 1 exiting out of case 1 2000-11-09 one,three -CALL sp31330(2); -@count2 -6 -@count2 -6 -@count2 -6 -@count2 -6 -@count2 -6 -@count3 -30 -SELECT * from res_tbl; -f1 f2 f3 f4 f5 -1 flowing through case 1 exiting out of case 1 2000-11-09 one,three -2 flowing through case 2 exiting out of case 2 1989-11-09 one,two -CALL sp31330(4); -@error_opt -undefined path specified -DROP PROCEDURE sp31330; -drop table res_tbl; - ---source suite/funcs_1/storedproc/cleanup_sp_tb.inc --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_storedproc; -DROP DATABASE IF EXISTS db_storedproc_1; - -. +++ END OF SCRIPT +++ --------------------------------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/r/ndb_storedproc_06.result b/mysql-test/suite/funcs_1/r/ndb_storedproc_06.result deleted file mode 100644 index ee1548fe012..00000000000 --- a/mysql-test/suite/funcs_1/r/ndb_storedproc_06.result +++ /dev/null @@ -1,395 +0,0 @@ - ---source suite/funcs_1/storedproc/load_sp_tb.inc --------------------------------------------------------------------------------- - ---source suite/funcs_1/storedproc/cleanup_sp_tb.inc --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_storedproc; -DROP DATABASE IF EXISTS db_storedproc_1; -CREATE DATABASE db_storedproc; -CREATE DATABASE db_storedproc_1; -USE db_storedproc; -create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t1; -create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t2; -create table t3(f1 char(20),f2 char(20),f3 integer) engine = ; -load data infile '/std_data/funcs_1/t3.txt' into table t3; -create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t4; -USE db_storedproc_1; -create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t6; -USE db_storedproc; -create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) -engine = ; -load data infile '/std_data/funcs_1/t7.txt' into table t7; -Warnings: -Warning 1265 Data truncated for column 'f3' at row 1 -Warning 1265 Data truncated for column 'f3' at row 2 -Warning 1265 Data truncated for column 'f3' at row 3 -Warning 1265 Data truncated for column 'f3' at row 4 -Warning 1265 Data truncated for column 'f3' at row 5 -Warning 1265 Data truncated for column 'f3' at row 6 -Warning 1265 Data truncated for column 'f3' at row 7 -Warning 1265 Data truncated for column 'f3' at row 8 -Warning 1265 Data truncated for column 'f3' at row 9 -Warning 1265 Data truncated for column 'f3' at row 10 -create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) -engine = ; -load data infile '/std_data/funcs_1/t7.txt' into table t8; -Warnings: -Warning 1265 Data truncated for column 'f3' at row 1 -Warning 1265 Data truncated for column 'f3' at row 2 -Warning 1265 Data truncated for column 'f3' at row 3 -Warning 1265 Data truncated for column 'f3' at row 4 -Warning 1265 Data truncated for column 'f3' at row 5 -Warning 1265 Data truncated for column 'f3' at row 6 -Warning 1265 Data truncated for column 'f3' at row 7 -Warning 1265 Data truncated for column 'f3' at row 8 -Warning 1265 Data truncated for column 'f3' at row 9 -Warning 1265 Data truncated for column 'f3' at row 10 -create table t9(f1 int, f2 char(25), f3 int) engine = ; -load data infile '/std_data/funcs_1/t9.txt' into table t9; -create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t10; -create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t11; - -Section 3.1.6 - Privilege Checks: --------------------------------------------------------------------------------- -USE db_storedproc_1; - -root@localhost db_storedproc_1 - -Testcase 3.1.6.1: ------------------ -Ensure that no user may create a stored procedure without the GRANT CREATE -ROUTINE privilege. --------------------------------------------------------------------------------- -create user 'user_1'@'localhost'; -grant all on db_storedproc_1.* to 'user_1'@'localhost'; -revoke create routine on db_storedproc_1.* from 'user_1'@'localhost'; -flush privileges; -DROP PROCEDURE IF EXISTS sp1; - -user_1@localhost db_storedproc_1 -USE db_storedproc_1; -CREATE PROCEDURE sp1(v1 char(20)) -BEGIN -SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz'; -END// -ERROR 42000: Access denied for user 'user_1'@'localhost' to database 'db_storedproc_1' -USE db_storedproc_1; - -root@localhost db_storedproc_1 -GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost'; - -user_1@localhost db_storedproc_1 -USE db_storedproc_1; -CREATE PROCEDURE sp1(v1 char(20)) -BEGIN -SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz'; -END// -USE db_storedproc_1; - -root@localhost db_storedproc_1 -DROP USER 'user_1'@'localhost'; -DROP PROCEDURE sp1; - -Testcase 3.1.6.2: ------------------ -Ensure that root always has the GRANT CREATE ROUTINE privilege. -(checked by other testscases) --------------------------------------------------------------------------------- -grant create routine on db_storedproc_1.* to 'user_1'@'localhost'; -flush privileges; - -user_1@localhost db_storedproc_1 -DROP PROCEDURE IF EXISTS sp3; -DROP FUNCTION IF EXISTS fn1; -CREATE PROCEDURE sp3(v1 char(20)) -BEGIN -SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz'; -END// -CREATE FUNCTION fn1(v1 int) returns int -BEGIN -return v1; -END// -USE db_storedproc_1; - -root@localhost db_storedproc_1 -drop user 'user_1'@'localhost'; -DROP PROCEDURE sp3; -DROP FUNCTION fn1; -Warnings: -Warning 1403 There is no such grant defined for user 'user_1' on host 'localhost' on routine 'fn1' - -Testcase 3.1.6.4: ------------------ -Ensure that the default security provision of a stored procedure is SQL SECURITY -DEFINER. --------------------------------------------------------------------------------- -CREATE USER 'user_1'@'localhost'; -grant update on db_storedproc_1.t6 to 'user_1'@'localhost'; -grant execute on db_storedproc_1.* to 'user_1'@'localhost'; -flush privileges; -USE db_storedproc_1; -DROP PROCEDURE IF EXISTS sp4; -CREATE PROCEDURE sp4(v1 char(20)) -BEGIN -SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz'; -END// - -user_1@localhost db_storedproc_1 -USE db_storedproc_1; -CALL sp4('a'); -f1 f2 f3 f4 f5 f6 -SELECT SPECIFIC_NAME, ROUTINE_SCHEMA, ROUTINE_NAME, ROUTINE_TYPE, -ROUTINE_BODY, ROUTINE_DEFINITION, IS_DETERMINISTIC, -SQL_DATA_ACCESS, SECURITY_TYPE, SQL_MODE, ROUTINE_COMMENT -FROM information_schema.routines -WHERE routine_schema LIKE 'db_sto%'; -SPECIFIC_NAME sp4 -ROUTINE_SCHEMA db_storedproc_1 -ROUTINE_NAME sp4 -ROUTINE_TYPE PROCEDURE -ROUTINE_BODY SQL -ROUTINE_DEFINITION NULL -IS_DETERMINISTIC NO -SQL_DATA_ACCESS CONTAINS SQL -SECURITY_TYPE DEFINER -SQL_MODE -ROUTINE_COMMENT - -root@localhost db_storedproc_1 -DROP PROCEDURE sp4; -DROP USER 'user_1'@'localhost'; - -Testcase 3.1.6.5: ------------------ -Ensure that a stored procedure defined with SQL SECURITY DEFINER can be -called/executed by any user, using only the privileges (including database -access privileges) associated with the user who created the stored procedure. --------------------------------------------------------------------------------- -USE db_storedproc_1; -CREATE TABLE t3165 ( c1 char(20), c2 char(20), c3 date); -INSERT INTO t3165 VALUES ('inserted', 'outside of SP', NULL); -create user 'user_1'@'localhost'; -create user 'user_2'@'localhost'; -grant create routine on db_storedproc_1.* to 'user_1'@'localhost'; -grant SELECT on db_storedproc_1.* to 'user_2'@'localhost'; -grant execute on db_storedproc_1.* to 'user_2'@'localhost'; -flush privileges; - -user_1@localhost db_storedproc_1 -CREATE PROCEDURE sp5_s_i () sql security definer -BEGIN -SELECT * from db_storedproc_1.t3165; -insert into db_storedproc_1.t3165 values ('inserted', 'from sp5_s_i', 1000); -END// -CREATE PROCEDURE sp5_sel () sql security definer -BEGIN -SELECT * from db_storedproc_1.t3165; -END// -CREATE PROCEDURE sp5_ins () sql security definer -BEGIN -insert into db_storedproc_1.t3165 values ('inserted', 'from sp5_ins', 1000); -END// - -user_2@localhost db_storedproc_1 -CALL sp5_s_i(); -ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165' -CALL sp5_ins(); -ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table 't3165' -CALL sp5_sel(); -ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165' - -root@localhost db_storedproc_1 -CALL sp5_sel(); -ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165' -grant insert on db_storedproc_1.* to 'user_1'@'localhost'; -flush privileges; - -user_2@localhost db_storedproc_1 -CALL sp5_s_i(); -ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165' -CALL sp5_ins(); -CALL sp5_sel(); -ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165' - -root@localhost db_storedproc_1 -CALL sp5_sel(); -ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165' -grant SELECT on db_storedproc_1.* to 'user_1'@'localhost'; -flush privileges; - -user_2@localhost db_storedproc_1 -CALL sp5_s_i(); -c1 c2 c3 -inserted outside of SP NULL -inserted from sp5_ins 2000-10-00 -CALL sp5_ins(); -CALL sp5_sel(); -c1 c2 c3 -inserted outside of SP NULL -inserted from sp5_ins 2000-10-00 -inserted from sp5_s_i 2000-10-00 -inserted from sp5_ins 2000-10-00 - -root@localhost db_storedproc_1 -REVOKE INSERT on db_storedproc_1.* from 'user_1'@'localhost'; -flush privileges; - -user_2@localhost db_storedproc_1 -CALL sp5_s_i(); -c1 c2 c3 -inserted outside of SP NULL -inserted from sp5_ins 2000-10-00 -inserted from sp5_s_i 2000-10-00 -inserted from sp5_ins 2000-10-00 -ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table 't3165' -CALL sp5_ins(); -ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table 't3165' -CALL sp5_sel(); -c1 c2 c3 -inserted outside of SP NULL -inserted from sp5_ins 2000-10-00 -inserted from sp5_s_i 2000-10-00 -inserted from sp5_ins 2000-10-00 - -root@localhost db_storedproc_1 -REVOKE SELECT on db_storedproc_1.* from 'user_1'@'localhost'; -flush privileges; - -user_2@localhost db_storedproc_1 -CALL sp5_s_i(); -ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165' -CALL sp5_ins(); -ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table 't3165' -CALL sp5_sel(); -ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165' - -root@localhost db_storedproc_1 -DROP PROCEDURE sp5_s_i; -DROP PROCEDURE sp5_sel; -DROP PROCEDURE sp5_ins; -DROP TABLE t3165; -DROP USER 'user_1'@'localhost'; -DROP USER 'user_2'@'localhost'; - -Testcase 3.1.6.6: ------------------ -Ensure that a stored procedure defined with SQL SECURITY INVOKER can be -called/executed by any user, using only the privileges (including database -access privileges) associated with the user executing the stored procedure. --------------------------------------------------------------------------------- -USE db_storedproc_1; -CREATE TABLE t3166 ( c1 char(30) ); -INSERT INTO db_storedproc_1.t3166 VALUES ('inserted outside SP'); -create user 'user_1'@'localhost'; -create user 'user_2'@'localhost'; -GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost'; -GRANT SELECT ON db_storedproc_1.* TO 'user_2'@'localhost'; -GRANT EXECUTE ON db_storedproc_1.* TO 'user_2'@'localhost'; -FLUSH PRIVILEGES; - -user_1@localhost db_storedproc_1 -CREATE PROCEDURE sp3166_s_i () SQL SECURITY INVOKER -BEGIN -SELECT * from db_storedproc_1.t3166; -insert into db_storedproc_1.t3166 values ('inserted from sp3166_s_i'); -END// -CREATE PROCEDURE sp3166_sel () SQL SECURITY INVOKER -BEGIN -SELECT * from db_storedproc_1.t3166; -END// -CREATE PROCEDURE sp3166_ins () SQL SECURITY INVOKER -BEGIN -insert into db_storedproc_1.t3166 values ('inserted from sp3166_ins'); -END// - -user_2@localhost db_storedproc_1 -CALL sp3166_s_i(); -c1 -inserted outside SP -ERROR 42000: INSERT command denied to user 'user_2'@'localhost' for table 't3166' -CALL sp3166_ins(); -ERROR 42000: INSERT command denied to user 'user_2'@'localhost' for table 't3166' -CALL sp3166_sel(); -c1 -inserted outside SP - -root@localhost db_storedproc_1 -CALL sp3166_sel(); -c1 -inserted outside SP -GRANT INSERT ON db_storedproc_1.* TO 'user_2'@'localhost'; -FLUSH PRIVILEGES; - -user_2@localhost db_storedproc_1 -CALL sp3166_s_i(); -c1 -inserted outside SP -CALL sp3166_ins(); -CALL sp3166_sel(); -c1 -inserted outside SP -inserted from sp3166_s_i -inserted from sp3166_ins - -root@localhost db_storedproc_1 -CALL sp3166_sel(); -c1 -inserted outside SP -inserted from sp3166_s_i -inserted from sp3166_ins -REVOKE SELECT ON db_storedproc_1.* FROM 'user_2'@'localhost'; -FLUSH PRIVILEGES; - -user_2@localhost db_storedproc_1 -CALL sp3166_s_i(); -ERROR 42000: SELECT command denied to user 'user_2'@'localhost' for table 't3166' -CALL sp3166_ins(); -CALL sp3166_sel(); -ERROR 42000: SELECT command denied to user 'user_2'@'localhost' for table 't3166' -CALL sp3166_s_i(); -c1 -inserted outside SP -inserted from sp3166_s_i -inserted from sp3166_ins -inserted from sp3166_ins - -root@localhost db_storedproc_1 -REVOKE EXECUTE on db_storedproc_1.* FROM 'user_2'@'localhost'; -FLUSH PRIVILEGES; - -user_2@localhost db_storedproc_1 -CALL sp3166_s_i(); -ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc_1.sp3166_s_i' -CALL sp3166_ins(); -ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc_1.sp3166_ins' -CALL sp3166_sel(); -ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc_1.sp3166_sel' - -root@localhost db_storedproc_1 -DROP PROCEDURE sp3166_s_i; -DROP PROCEDURE sp3166_sel; -DROP PROCEDURE sp3166_ins; -DROP TABLE t3166; -DROP USER 'user_1'@'localhost'; -DROP USER 'user_2'@'localhost'; - ---source suite/funcs_1/storedproc/cleanup_sp_tb.inc --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_storedproc; -DROP DATABASE IF EXISTS db_storedproc_1; - -. +++ END OF SCRIPT +++ --------------------------------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/r/ndb_storedproc_07.result b/mysql-test/suite/funcs_1/r/ndb_storedproc_07.result deleted file mode 100644 index a520bdfac36..00000000000 --- a/mysql-test/suite/funcs_1/r/ndb_storedproc_07.result +++ /dev/null @@ -1,178 +0,0 @@ - ---source suite/funcs_1/storedproc/load_sp_tb.inc --------------------------------------------------------------------------------- - ---source suite/funcs_1/storedproc/cleanup_sp_tb.inc --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_storedproc; -DROP DATABASE IF EXISTS db_storedproc_1; -CREATE DATABASE db_storedproc; -CREATE DATABASE db_storedproc_1; -USE db_storedproc; -create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t1; -create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t2; -create table t3(f1 char(20),f2 char(20),f3 integer) engine = ; -load data infile '/std_data/funcs_1/t3.txt' into table t3; -create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t4; -USE db_storedproc_1; -create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t6; -USE db_storedproc; -create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) -engine = ; -load data infile '/std_data/funcs_1/t7.txt' into table t7; -Warnings: -Warning 1265 Data truncated for column 'f3' at row 1 -Warning 1265 Data truncated for column 'f3' at row 2 -Warning 1265 Data truncated for column 'f3' at row 3 -Warning 1265 Data truncated for column 'f3' at row 4 -Warning 1265 Data truncated for column 'f3' at row 5 -Warning 1265 Data truncated for column 'f3' at row 6 -Warning 1265 Data truncated for column 'f3' at row 7 -Warning 1265 Data truncated for column 'f3' at row 8 -Warning 1265 Data truncated for column 'f3' at row 9 -Warning 1265 Data truncated for column 'f3' at row 10 -create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) -engine = ; -load data infile '/std_data/funcs_1/t7.txt' into table t8; -Warnings: -Warning 1265 Data truncated for column 'f3' at row 1 -Warning 1265 Data truncated for column 'f3' at row 2 -Warning 1265 Data truncated for column 'f3' at row 3 -Warning 1265 Data truncated for column 'f3' at row 4 -Warning 1265 Data truncated for column 'f3' at row 5 -Warning 1265 Data truncated for column 'f3' at row 6 -Warning 1265 Data truncated for column 'f3' at row 7 -Warning 1265 Data truncated for column 'f3' at row 8 -Warning 1265 Data truncated for column 'f3' at row 9 -Warning 1265 Data truncated for column 'f3' at row 10 -create table t9(f1 int, f2 char(25), f3 int) engine = ; -load data infile '/std_data/funcs_1/t9.txt' into table t9; -create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t10; -create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t11; - -Section 3.1.7 - SQL mode checks: --------------------------------------------------------------------------------- -USE db_storedproc; - -Testcase 3.1.7.1: ------------------ -Ensure that the sql_mode setting in effect at the time a stored procedure is -created is the same setting under which the stored procedure runs when it is -called/executed. --------------------------------------------------------------------------------- -DROP PROCEDURE IF EXISTS sp1; -DROP TABLE IF EXISTS temp_tbl; -DROP TABLE IF EXISTS result; -CREATE TABLE temp_tbl (f1 tinyint); -CREATE TABLE result (f1 text(200), f2 char(20)); -set @@sql_mode='traditional'; -SHOW VARIABLES LIKE 'sql_mode'; -Variable_name Value -sql_mode STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION -CREATE PROCEDURE sp1() -BEGIN -declare a tinyint; -declare count_ int default 1; -declare continue handler for sqlstate '22003' set count_=1000; -SHOW VARIABLES LIKE 'sql_mode'; -SELECT @@sql_mode into @cur_val_sql_mode; -insert into temp_tbl values (1000); -if count_ = 1000 THEN -INSERT INTO result VALUES (@cur_val_sql_mode, 'value restored'); -ELSE -INSERT INTO result VALUES (@cur_val_sql_mode, 'value not restored'); -END if; -END// -SHOW CREATE PROCEDURE sp1; -Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation -sp1 STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `sp1`() -BEGIN -declare a tinyint; -declare count_ int default 1; -declare continue handler for sqlstate '22003' set count_=1000; -SHOW VARIABLES LIKE 'sql_mode'; -SELECT @@sql_mode into @cur_val_sql_mode; -insert into temp_tbl values (1000); -if count_ = 1000 THEN -INSERT INTO result VALUES (@cur_val_sql_mode, 'value restored'); -ELSE -INSERT INTO result VALUES (@cur_val_sql_mode, 'value not restored'); -END if; -END latin1 latin1_swedish_ci latin1_swedish_ci -set @@sql_mode=''; -SHOW VARIABLES LIKE 'sql_mode'; -Variable_name Value -sql_mode -CALL sp1(); -Variable_name Value -sql_mode STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION -SELECT * from result; -f1 f2 -STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION value restored -SHOW VARIABLES LIKE 'sql_mode'; -Variable_name Value -sql_mode -SELECT @@sql_mode; -@@sql_mode - -SET @@sql_mode='TRADITIONAL'; -DROP PROCEDURE sp1; -DROP TABLE temp_tbl; -DROP TABLE result; - -Testcase 3.1.7.2: ------------------ -Ensure that if the sql_mode setting is changed when a stored procedure is run, -that the original setting is restored as soon as the stored procedure execution -is complete. --------------------------------------------------------------------------------- -DROP PROCEDURE IF EXISTS sp2; -... show initial value -SHOW VARIABLES LIKE 'sql_mode'; -Variable_name Value -sql_mode STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION -CREATE PROCEDURE sp2() -BEGIN -SET @@sql_mode='MAXDB'; -SHOW VARIABLES LIKE 'sql_mode'; -END// -SHOW CREATE PROCEDURE sp2; -Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation -sp2 STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `sp2`() -BEGIN -SET @@sql_mode='MAXDB'; -SHOW VARIABLES LIKE 'sql_mode'; -END latin1 latin1_swedish_ci latin1_swedish_ci -... show value prior calling procedure -SHOW VARIABLES LIKE 'sql_mode'; -Variable_name Value -sql_mode STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION -... call procedure that changes sql_mode -CALL sp2(); -Variable_name Value -sql_mode PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,MAXDB,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,NO_AUTO_CREATE_USER -... check whether old value is re-set -SHOW VARIABLES LIKE 'sql_mode'; -Variable_name Value -sql_mode STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION -DROP PROCEDURE sp2; - ---source suite/funcs_1/storedproc/cleanup_sp_tb.inc --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_storedproc; -DROP DATABASE IF EXISTS db_storedproc_1; - -. +++ END OF SCRIPT +++ --------------------------------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/r/ndb_storedproc_08.result b/mysql-test/suite/funcs_1/r/ndb_storedproc_08.result deleted file mode 100644 index 4d85b97369c..00000000000 --- a/mysql-test/suite/funcs_1/r/ndb_storedproc_08.result +++ /dev/null @@ -1,835 +0,0 @@ - ---source suite/funcs_1/storedproc/load_sp_tb.inc --------------------------------------------------------------------------------- - ---source suite/funcs_1/storedproc/cleanup_sp_tb.inc --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_storedproc; -DROP DATABASE IF EXISTS db_storedproc_1; -CREATE DATABASE db_storedproc; -CREATE DATABASE db_storedproc_1; -USE db_storedproc; -create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t1; -create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t2; -create table t3(f1 char(20),f2 char(20),f3 integer) engine = ; -load data infile '/std_data/funcs_1/t3.txt' into table t3; -create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t4; -USE db_storedproc_1; -create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t6; -USE db_storedproc; -create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) -engine = ; -load data infile '/std_data/funcs_1/t7.txt' into table t7; -Warnings: -Warning 1265 Data truncated for column 'f3' at row 1 -Warning 1265 Data truncated for column 'f3' at row 2 -Warning 1265 Data truncated for column 'f3' at row 3 -Warning 1265 Data truncated for column 'f3' at row 4 -Warning 1265 Data truncated for column 'f3' at row 5 -Warning 1265 Data truncated for column 'f3' at row 6 -Warning 1265 Data truncated for column 'f3' at row 7 -Warning 1265 Data truncated for column 'f3' at row 8 -Warning 1265 Data truncated for column 'f3' at row 9 -Warning 1265 Data truncated for column 'f3' at row 10 -create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) -engine = ; -load data infile '/std_data/funcs_1/t7.txt' into table t8; -Warnings: -Warning 1265 Data truncated for column 'f3' at row 1 -Warning 1265 Data truncated for column 'f3' at row 2 -Warning 1265 Data truncated for column 'f3' at row 3 -Warning 1265 Data truncated for column 'f3' at row 4 -Warning 1265 Data truncated for column 'f3' at row 5 -Warning 1265 Data truncated for column 'f3' at row 6 -Warning 1265 Data truncated for column 'f3' at row 7 -Warning 1265 Data truncated for column 'f3' at row 8 -Warning 1265 Data truncated for column 'f3' at row 9 -Warning 1265 Data truncated for column 'f3' at row 10 -create table t9(f1 int, f2 char(25), f3 int) engine = ; -load data infile '/std_data/funcs_1/t9.txt' into table t9; -create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t10; -create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t11; - -Section 3.1.8 - SHOW statement checks: --------------------------------------------------------------------------------- - -Testcase 3.1.8.9: ------------------ - -Ensure that all stored procedure changes made with ALTER PROCEDURE or ALTER -FUNCTION are properly recorded and displayed when a SHOW CREATE PROCEDURE or -SHOW CREATE PROCEDURE STATUS statement, or a SHOW CREATE FUNCTION or SHOW CREATE -FUNCTION STATUS statement (respectively) is executed. --------------------------------------------------------------------------------- -DROP FUNCTION IF EXISTS fn_1; -DROP FUNCTION IF EXISTS fn_2; -DROP PROCEDURE IF EXISTS sp_1; -DROP PROCEDURE IF EXISTS sp_2; -CREATE PROCEDURE sp_1 (i1 int) -BEGIN -set @x=i1; -END// -CREATE PROCEDURE sp_2 (i1 int) SQL SECURITY INVOKER COMMENT 'created with INVOKER' -BEGIN -set @x=i1; -END// -CREATE FUNCTION fn_1 (i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real) returns year -BEGIN -set @x=i1; -set @y=@x; -return i4; -END// -CREATE FUNCTION fn_2 (i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real) -RETURNS YEAR -SQL SECURITY INVOKER -COMMENT 'created with INVOKER' -BEGIN -set @x=i1; -set @y=@x; -return i4; -END// - -... now check what is stored: ------------------------------ -SELECT * FROM information_schema.routines where routine_schema = 'db_storedproc'; -SPECIFIC_NAME fn_1 -ROUTINE_CATALOG def -ROUTINE_SCHEMA db_storedproc -ROUTINE_NAME fn_1 -ROUTINE_TYPE FUNCTION -DATA_TYPE year -CHARACTER_MAXIMUM_LENGTH NULL -CHARACTER_OCTET_LENGTH NULL -NUMERIC_PRECISION NULL -NUMERIC_SCALE NULL -CHARACTER_SET_NAME NULL -COLLATION_NAME NULL -DTD_IDENTIFIER year(4) -ROUTINE_BODY SQL -ROUTINE_DEFINITION BEGIN -set @x=i1; -set @y=@x; -return i4; -END -EXTERNAL_NAME NULL -EXTERNAL_LANGUAGE NULL -PARAMETER_STYLE SQL -IS_DETERMINISTIC NO -SQL_DATA_ACCESS CONTAINS SQL -SQL_PATH NULL -SECURITY_TYPE DEFINER -CREATED -LAST_ALTERED -SQL_MODE -ROUTINE_COMMENT -DEFINER root@localhost -CHARACTER_SET_CLIENT latin1 -COLLATION_CONNECTION latin1_swedish_ci -DATABASE_COLLATION latin1_swedish_ci -SPECIFIC_NAME fn_2 -ROUTINE_CATALOG def -ROUTINE_SCHEMA db_storedproc -ROUTINE_NAME fn_2 -ROUTINE_TYPE FUNCTION -DATA_TYPE year -CHARACTER_MAXIMUM_LENGTH NULL -CHARACTER_OCTET_LENGTH NULL -NUMERIC_PRECISION NULL -NUMERIC_SCALE NULL -CHARACTER_SET_NAME NULL -COLLATION_NAME NULL -DTD_IDENTIFIER year(4) -ROUTINE_BODY SQL -ROUTINE_DEFINITION BEGIN -set @x=i1; -set @y=@x; -return i4; -END -EXTERNAL_NAME NULL -EXTERNAL_LANGUAGE NULL -PARAMETER_STYLE SQL -IS_DETERMINISTIC NO -SQL_DATA_ACCESS CONTAINS SQL -SQL_PATH NULL -SECURITY_TYPE INVOKER -CREATED -LAST_ALTERED -SQL_MODE -ROUTINE_COMMENT created with INVOKER -DEFINER root@localhost -CHARACTER_SET_CLIENT latin1 -COLLATION_CONNECTION latin1_swedish_ci -DATABASE_COLLATION latin1_swedish_ci -SPECIFIC_NAME sp_1 -ROUTINE_CATALOG def -ROUTINE_SCHEMA db_storedproc -ROUTINE_NAME sp_1 -ROUTINE_TYPE PROCEDURE -DATA_TYPE -CHARACTER_MAXIMUM_LENGTH NULL -CHARACTER_OCTET_LENGTH NULL -NUMERIC_PRECISION NULL -NUMERIC_SCALE NULL -CHARACTER_SET_NAME NULL -COLLATION_NAME NULL -DTD_IDENTIFIER NULL -ROUTINE_BODY SQL -ROUTINE_DEFINITION BEGIN -set @x=i1; -END -EXTERNAL_NAME NULL -EXTERNAL_LANGUAGE NULL -PARAMETER_STYLE SQL -IS_DETERMINISTIC NO -SQL_DATA_ACCESS CONTAINS SQL -SQL_PATH NULL -SECURITY_TYPE DEFINER -CREATED -LAST_ALTERED -SQL_MODE -ROUTINE_COMMENT -DEFINER root@localhost -CHARACTER_SET_CLIENT latin1 -COLLATION_CONNECTION latin1_swedish_ci -DATABASE_COLLATION latin1_swedish_ci -SPECIFIC_NAME sp_2 -ROUTINE_CATALOG def -ROUTINE_SCHEMA db_storedproc -ROUTINE_NAME sp_2 -ROUTINE_TYPE PROCEDURE -DATA_TYPE -CHARACTER_MAXIMUM_LENGTH NULL -CHARACTER_OCTET_LENGTH NULL -NUMERIC_PRECISION NULL -NUMERIC_SCALE NULL -CHARACTER_SET_NAME NULL -COLLATION_NAME NULL -DTD_IDENTIFIER NULL -ROUTINE_BODY SQL -ROUTINE_DEFINITION BEGIN -set @x=i1; -END -EXTERNAL_NAME NULL -EXTERNAL_LANGUAGE NULL -PARAMETER_STYLE SQL -IS_DETERMINISTIC NO -SQL_DATA_ACCESS CONTAINS SQL -SQL_PATH NULL -SECURITY_TYPE INVOKER -CREATED -LAST_ALTERED -SQL_MODE -ROUTINE_COMMENT created with INVOKER -DEFINER root@localhost -CHARACTER_SET_CLIENT latin1 -COLLATION_CONNECTION latin1_swedish_ci -DATABASE_COLLATION latin1_swedish_ci -SHOW CREATE FUNCTION fn_1; -Function fn_1 -sql_mode -Create Function CREATE DEFINER=`root`@`localhost` FUNCTION `fn_1`(i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real) RETURNS year(4) -BEGIN -set @x=i1; -set @y=@x; -return i4; -END -character_set_client latin1 -collation_connection latin1_swedish_ci -Database Collation latin1_swedish_ci -SHOW CREATE FUNCTION fn_2; -Function fn_2 -sql_mode -Create Function CREATE DEFINER=`root`@`localhost` FUNCTION `fn_2`(i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real) RETURNS year(4) - SQL SECURITY INVOKER - COMMENT 'created with INVOKER' -BEGIN -set @x=i1; -set @y=@x; -return i4; -END -character_set_client latin1 -collation_connection latin1_swedish_ci -Database Collation latin1_swedish_ci -SHOW CREATE PROCEDURE sp_1; -Procedure sp_1 -sql_mode -Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_1`(i1 int) -BEGIN -set @x=i1; -END -character_set_client latin1 -collation_connection latin1_swedish_ci -Database Collation latin1_swedish_ci -SHOW CREATE PROCEDURE sp_2; -Procedure sp_2 -sql_mode -Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_2`(i1 int) - SQL SECURITY INVOKER - COMMENT 'created with INVOKER' -BEGIN -set @x=i1; -END -character_set_client latin1 -collation_connection latin1_swedish_ci -Database Collation latin1_swedish_ci -SHOW FUNCTION STATUS LIKE 'fn_%'; -Db db_storedproc -Name fn_1 -Type FUNCTION -Definer root@localhost -Modified -Created -Security_type DEFINER -Comment -character_set_client latin1 -collation_connection latin1_swedish_ci -Database Collation latin1_swedish_ci -Db db_storedproc -Name fn_2 -Type FUNCTION -Definer root@localhost -Modified -Created -Security_type INVOKER -Comment created with INVOKER -character_set_client latin1 -collation_connection latin1_swedish_ci -Database Collation latin1_swedish_ci -SHOW PROCEDURE STATUS LIKE 'sp_%'; -Db db_storedproc -Name sp_1 -Type PROCEDURE -Definer root@localhost -Modified -Created -Security_type DEFINER -Comment -character_set_client latin1 -collation_connection latin1_swedish_ci -Database Collation latin1_swedish_ci -Db db_storedproc -Name sp_2 -Type PROCEDURE -Definer root@localhost -Modified -Created -Security_type INVOKER -Comment created with INVOKER -character_set_client latin1 -collation_connection latin1_swedish_ci -Database Collation latin1_swedish_ci - -... now change some stuff: --------------------------- -ALTER PROCEDURE sp_1 SQL SECURITY INVOKER; -ALTER PROCEDURE sp_1 COMMENT 'new comment, SP changed to INVOKER'; -ALTER PROCEDURE sp_2 SQL SECURITY DEFINER; -ALTER PROCEDURE sp_2 DROP COMMENT; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DROP COMMENT' at line 1 -ALTER PROCEDURE sp_2 COMMENT 'SP changed to DEFINER'; -ALTER PROCEDURE sp_2 READS SQL DATA; -ALTER FUNCTION fn_1 SQL SECURITY INVOKER; -ALTER FUNCTION fn_1 COMMENT 'new comment, FN changed to INVOKER'; -ALTER FUNCTION fn_1 NO SQL; -ALTER FUNCTION fn_2 SQL SECURITY DEFINER; -ALTER FUNCTION fn_2 COMMENT 'FN changed to DEFINER'; -ALTER FUNCTION fn_2 MODIFIES SQL DATA; - -... now check what is stored: ------------------------------ -SELECT * FROM information_schema.routines where routine_schema = 'db_storedproc'; -SPECIFIC_NAME fn_1 -ROUTINE_CATALOG def -ROUTINE_SCHEMA db_storedproc -ROUTINE_NAME fn_1 -ROUTINE_TYPE FUNCTION -DATA_TYPE year -CHARACTER_MAXIMUM_LENGTH NULL -CHARACTER_OCTET_LENGTH NULL -NUMERIC_PRECISION NULL -NUMERIC_SCALE NULL -CHARACTER_SET_NAME NULL -COLLATION_NAME NULL -DTD_IDENTIFIER year(4) -ROUTINE_BODY SQL -ROUTINE_DEFINITION BEGIN -set @x=i1; -set @y=@x; -return i4; -END -EXTERNAL_NAME NULL -EXTERNAL_LANGUAGE NULL -PARAMETER_STYLE SQL -IS_DETERMINISTIC NO -SQL_DATA_ACCESS NO SQL -SQL_PATH NULL -SECURITY_TYPE INVOKER -CREATED -LAST_ALTERED -SQL_MODE -ROUTINE_COMMENT new comment, FN changed to INVOKER -DEFINER root@localhost -CHARACTER_SET_CLIENT latin1 -COLLATION_CONNECTION latin1_swedish_ci -DATABASE_COLLATION latin1_swedish_ci -SPECIFIC_NAME fn_2 -ROUTINE_CATALOG def -ROUTINE_SCHEMA db_storedproc -ROUTINE_NAME fn_2 -ROUTINE_TYPE FUNCTION -DATA_TYPE year -CHARACTER_MAXIMUM_LENGTH NULL -CHARACTER_OCTET_LENGTH NULL -NUMERIC_PRECISION NULL -NUMERIC_SCALE NULL -CHARACTER_SET_NAME NULL -COLLATION_NAME NULL -DTD_IDENTIFIER year(4) -ROUTINE_BODY SQL -ROUTINE_DEFINITION BEGIN -set @x=i1; -set @y=@x; -return i4; -END -EXTERNAL_NAME NULL -EXTERNAL_LANGUAGE NULL -PARAMETER_STYLE SQL -IS_DETERMINISTIC NO -SQL_DATA_ACCESS MODIFIES SQL DATA -SQL_PATH NULL -SECURITY_TYPE DEFINER -CREATED -LAST_ALTERED -SQL_MODE -ROUTINE_COMMENT FN changed to DEFINER -DEFINER root@localhost -CHARACTER_SET_CLIENT latin1 -COLLATION_CONNECTION latin1_swedish_ci -DATABASE_COLLATION latin1_swedish_ci -SPECIFIC_NAME sp_1 -ROUTINE_CATALOG def -ROUTINE_SCHEMA db_storedproc -ROUTINE_NAME sp_1 -ROUTINE_TYPE PROCEDURE -DATA_TYPE -CHARACTER_MAXIMUM_LENGTH NULL -CHARACTER_OCTET_LENGTH NULL -NUMERIC_PRECISION NULL -NUMERIC_SCALE NULL -CHARACTER_SET_NAME NULL -COLLATION_NAME NULL -DTD_IDENTIFIER NULL -ROUTINE_BODY SQL -ROUTINE_DEFINITION BEGIN -set @x=i1; -END -EXTERNAL_NAME NULL -EXTERNAL_LANGUAGE NULL -PARAMETER_STYLE SQL -IS_DETERMINISTIC NO -SQL_DATA_ACCESS CONTAINS SQL -SQL_PATH NULL -SECURITY_TYPE INVOKER -CREATED -LAST_ALTERED -SQL_MODE -ROUTINE_COMMENT new comment, SP changed to INVOKER -DEFINER root@localhost -CHARACTER_SET_CLIENT latin1 -COLLATION_CONNECTION latin1_swedish_ci -DATABASE_COLLATION latin1_swedish_ci -SPECIFIC_NAME sp_2 -ROUTINE_CATALOG def -ROUTINE_SCHEMA db_storedproc -ROUTINE_NAME sp_2 -ROUTINE_TYPE PROCEDURE -DATA_TYPE -CHARACTER_MAXIMUM_LENGTH NULL -CHARACTER_OCTET_LENGTH NULL -NUMERIC_PRECISION NULL -NUMERIC_SCALE NULL -CHARACTER_SET_NAME NULL -COLLATION_NAME NULL -DTD_IDENTIFIER NULL -ROUTINE_BODY SQL -ROUTINE_DEFINITION BEGIN -set @x=i1; -END -EXTERNAL_NAME NULL -EXTERNAL_LANGUAGE NULL -PARAMETER_STYLE SQL -IS_DETERMINISTIC NO -SQL_DATA_ACCESS READS SQL DATA -SQL_PATH NULL -SECURITY_TYPE DEFINER -CREATED -LAST_ALTERED -SQL_MODE -ROUTINE_COMMENT SP changed to DEFINER -DEFINER root@localhost -CHARACTER_SET_CLIENT latin1 -COLLATION_CONNECTION latin1_swedish_ci -DATABASE_COLLATION latin1_swedish_ci -SHOW CREATE FUNCTION fn_1; -Function fn_1 -sql_mode -Create Function CREATE DEFINER=`root`@`localhost` FUNCTION `fn_1`(i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real) RETURNS year(4) - NO SQL - SQL SECURITY INVOKER - COMMENT 'new comment, FN changed to INVOKER' -BEGIN -set @x=i1; -set @y=@x; -return i4; -END -character_set_client latin1 -collation_connection latin1_swedish_ci -Database Collation latin1_swedish_ci -SHOW CREATE FUNCTION fn_2; -Function fn_2 -sql_mode -Create Function CREATE DEFINER=`root`@`localhost` FUNCTION `fn_2`(i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real) RETURNS year(4) - MODIFIES SQL DATA - COMMENT 'FN changed to DEFINER' -BEGIN -set @x=i1; -set @y=@x; -return i4; -END -character_set_client latin1 -collation_connection latin1_swedish_ci -Database Collation latin1_swedish_ci -SHOW CREATE PROCEDURE sp_1; -Procedure sp_1 -sql_mode -Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_1`(i1 int) - SQL SECURITY INVOKER - COMMENT 'new comment, SP changed to INVOKER' -BEGIN -set @x=i1; -END -character_set_client latin1 -collation_connection latin1_swedish_ci -Database Collation latin1_swedish_ci -SHOW CREATE PROCEDURE sp_2; -Procedure sp_2 -sql_mode -Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_2`(i1 int) - READS SQL DATA - COMMENT 'SP changed to DEFINER' -BEGIN -set @x=i1; -END -character_set_client latin1 -collation_connection latin1_swedish_ci -Database Collation latin1_swedish_ci -SHOW FUNCTION STATUS LIKE 'fn_%'; -Db db_storedproc -Name fn_1 -Type FUNCTION -Definer root@localhost -Modified -Created -Security_type INVOKER -Comment new comment, FN changed to INVOKER -character_set_client latin1 -collation_connection latin1_swedish_ci -Database Collation latin1_swedish_ci -Db db_storedproc -Name fn_2 -Type FUNCTION -Definer root@localhost -Modified -Created -Security_type DEFINER -Comment FN changed to DEFINER -character_set_client latin1 -collation_connection latin1_swedish_ci -Database Collation latin1_swedish_ci -SHOW PROCEDURE STATUS LIKE 'sp_%'; -Db db_storedproc -Name sp_1 -Type PROCEDURE -Definer root@localhost -Modified -Created -Security_type INVOKER -Comment new comment, SP changed to INVOKER -character_set_client latin1 -collation_connection latin1_swedish_ci -Database Collation latin1_swedish_ci -Db db_storedproc -Name sp_2 -Type PROCEDURE -Definer root@localhost -Modified -Created -Security_type DEFINER -Comment SP changed to DEFINER -character_set_client latin1 -collation_connection latin1_swedish_ci -Database Collation latin1_swedish_ci - -... change back to default and check result: --------------------------------------------- -ALTER FUNCTION fn_2 CONTAINS SQL; - -... now check what is stored: ------------------------------ -SELECT * FROM information_schema.routines where routine_schema = 'db_storedproc'; -SPECIFIC_NAME fn_1 -ROUTINE_CATALOG def -ROUTINE_SCHEMA db_storedproc -ROUTINE_NAME fn_1 -ROUTINE_TYPE FUNCTION -DATA_TYPE year -CHARACTER_MAXIMUM_LENGTH NULL -CHARACTER_OCTET_LENGTH NULL -NUMERIC_PRECISION NULL -NUMERIC_SCALE NULL -CHARACTER_SET_NAME NULL -COLLATION_NAME NULL -DTD_IDENTIFIER year(4) -ROUTINE_BODY SQL -ROUTINE_DEFINITION BEGIN -set @x=i1; -set @y=@x; -return i4; -END -EXTERNAL_NAME NULL -EXTERNAL_LANGUAGE NULL -PARAMETER_STYLE SQL -IS_DETERMINISTIC NO -SQL_DATA_ACCESS NO SQL -SQL_PATH NULL -SECURITY_TYPE INVOKER -CREATED -LAST_ALTERED -SQL_MODE -ROUTINE_COMMENT new comment, FN changed to INVOKER -DEFINER root@localhost -CHARACTER_SET_CLIENT latin1 -COLLATION_CONNECTION latin1_swedish_ci -DATABASE_COLLATION latin1_swedish_ci -SPECIFIC_NAME fn_2 -ROUTINE_CATALOG def -ROUTINE_SCHEMA db_storedproc -ROUTINE_NAME fn_2 -ROUTINE_TYPE FUNCTION -DATA_TYPE year -CHARACTER_MAXIMUM_LENGTH NULL -CHARACTER_OCTET_LENGTH NULL -NUMERIC_PRECISION NULL -NUMERIC_SCALE NULL -CHARACTER_SET_NAME NULL -COLLATION_NAME NULL -DTD_IDENTIFIER year(4) -ROUTINE_BODY SQL -ROUTINE_DEFINITION BEGIN -set @x=i1; -set @y=@x; -return i4; -END -EXTERNAL_NAME NULL -EXTERNAL_LANGUAGE NULL -PARAMETER_STYLE SQL -IS_DETERMINISTIC NO -SQL_DATA_ACCESS CONTAINS SQL -SQL_PATH NULL -SECURITY_TYPE DEFINER -CREATED -LAST_ALTERED -SQL_MODE -ROUTINE_COMMENT FN changed to DEFINER -DEFINER root@localhost -CHARACTER_SET_CLIENT latin1 -COLLATION_CONNECTION latin1_swedish_ci -DATABASE_COLLATION latin1_swedish_ci -SPECIFIC_NAME sp_1 -ROUTINE_CATALOG def -ROUTINE_SCHEMA db_storedproc -ROUTINE_NAME sp_1 -ROUTINE_TYPE PROCEDURE -DATA_TYPE -CHARACTER_MAXIMUM_LENGTH NULL -CHARACTER_OCTET_LENGTH NULL -NUMERIC_PRECISION NULL -NUMERIC_SCALE NULL -CHARACTER_SET_NAME NULL -COLLATION_NAME NULL -DTD_IDENTIFIER NULL -ROUTINE_BODY SQL -ROUTINE_DEFINITION BEGIN -set @x=i1; -END -EXTERNAL_NAME NULL -EXTERNAL_LANGUAGE NULL -PARAMETER_STYLE SQL -IS_DETERMINISTIC NO -SQL_DATA_ACCESS CONTAINS SQL -SQL_PATH NULL -SECURITY_TYPE INVOKER -CREATED -LAST_ALTERED -SQL_MODE -ROUTINE_COMMENT new comment, SP changed to INVOKER -DEFINER root@localhost -CHARACTER_SET_CLIENT latin1 -COLLATION_CONNECTION latin1_swedish_ci -DATABASE_COLLATION latin1_swedish_ci -SPECIFIC_NAME sp_2 -ROUTINE_CATALOG def -ROUTINE_SCHEMA db_storedproc -ROUTINE_NAME sp_2 -ROUTINE_TYPE PROCEDURE -DATA_TYPE -CHARACTER_MAXIMUM_LENGTH NULL -CHARACTER_OCTET_LENGTH NULL -NUMERIC_PRECISION NULL -NUMERIC_SCALE NULL -CHARACTER_SET_NAME NULL -COLLATION_NAME NULL -DTD_IDENTIFIER NULL -ROUTINE_BODY SQL -ROUTINE_DEFINITION BEGIN -set @x=i1; -END -EXTERNAL_NAME NULL -EXTERNAL_LANGUAGE NULL -PARAMETER_STYLE SQL -IS_DETERMINISTIC NO -SQL_DATA_ACCESS READS SQL DATA -SQL_PATH NULL -SECURITY_TYPE DEFINER -CREATED -LAST_ALTERED -SQL_MODE -ROUTINE_COMMENT SP changed to DEFINER -DEFINER root@localhost -CHARACTER_SET_CLIENT latin1 -COLLATION_CONNECTION latin1_swedish_ci -DATABASE_COLLATION latin1_swedish_ci -SHOW CREATE FUNCTION fn_1; -Function fn_1 -sql_mode -Create Function CREATE DEFINER=`root`@`localhost` FUNCTION `fn_1`(i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real) RETURNS year(4) - NO SQL - SQL SECURITY INVOKER - COMMENT 'new comment, FN changed to INVOKER' -BEGIN -set @x=i1; -set @y=@x; -return i4; -END -character_set_client latin1 -collation_connection latin1_swedish_ci -Database Collation latin1_swedish_ci -SHOW CREATE FUNCTION fn_2; -Function fn_2 -sql_mode -Create Function CREATE DEFINER=`root`@`localhost` FUNCTION `fn_2`(i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real) RETURNS year(4) - COMMENT 'FN changed to DEFINER' -BEGIN -set @x=i1; -set @y=@x; -return i4; -END -character_set_client latin1 -collation_connection latin1_swedish_ci -Database Collation latin1_swedish_ci -SHOW CREATE PROCEDURE sp_1; -Procedure sp_1 -sql_mode -Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_1`(i1 int) - SQL SECURITY INVOKER - COMMENT 'new comment, SP changed to INVOKER' -BEGIN -set @x=i1; -END -character_set_client latin1 -collation_connection latin1_swedish_ci -Database Collation latin1_swedish_ci -SHOW CREATE PROCEDURE sp_2; -Procedure sp_2 -sql_mode -Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_2`(i1 int) - READS SQL DATA - COMMENT 'SP changed to DEFINER' -BEGIN -set @x=i1; -END -character_set_client latin1 -collation_connection latin1_swedish_ci -Database Collation latin1_swedish_ci -SHOW FUNCTION STATUS LIKE 'fn_%'; -Db db_storedproc -Name fn_1 -Type FUNCTION -Definer root@localhost -Modified -Created -Security_type INVOKER -Comment new comment, FN changed to INVOKER -character_set_client latin1 -collation_connection latin1_swedish_ci -Database Collation latin1_swedish_ci -Db db_storedproc -Name fn_2 -Type FUNCTION -Definer root@localhost -Modified -Created -Security_type DEFINER -Comment FN changed to DEFINER -character_set_client latin1 -collation_connection latin1_swedish_ci -Database Collation latin1_swedish_ci -SHOW PROCEDURE STATUS LIKE 'sp_%'; -Db db_storedproc -Name sp_1 -Type PROCEDURE -Definer root@localhost -Modified -Created -Security_type INVOKER -Comment new comment, SP changed to INVOKER -character_set_client latin1 -collation_connection latin1_swedish_ci -Database Collation latin1_swedish_ci -Db db_storedproc -Name sp_2 -Type PROCEDURE -Definer root@localhost -Modified -Created -Security_type DEFINER -Comment SP changed to DEFINER -character_set_client latin1 -collation_connection latin1_swedish_ci -Database Collation latin1_swedish_ci - -... cleanup ------------ -DROP FUNCTION fn_1; -DROP FUNCTION fn_2; -DROP PROCEDURE sp_1; - ---source suite/funcs_1/storedproc/cleanup_sp_tb.inc --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_storedproc; -DROP DATABASE IF EXISTS db_storedproc_1; - -. +++ END OF SCRIPT +++ --------------------------------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/r/ndb_storedproc_10.result b/mysql-test/suite/funcs_1/r/ndb_storedproc_10.result deleted file mode 100644 index d731979a095..00000000000 --- a/mysql-test/suite/funcs_1/r/ndb_storedproc_10.result +++ /dev/null @@ -1,400 +0,0 @@ - ---source suite/funcs_1/storedproc/load_sp_tb.inc --------------------------------------------------------------------------------- - ---source suite/funcs_1/storedproc/cleanup_sp_tb.inc --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_storedproc; -DROP DATABASE IF EXISTS db_storedproc_1; -CREATE DATABASE db_storedproc; -CREATE DATABASE db_storedproc_1; -USE db_storedproc; -create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t1; -create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t2; -create table t3(f1 char(20),f2 char(20),f3 integer) engine = ; -load data infile '/std_data/funcs_1/t3.txt' into table t3; -create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t4; -USE db_storedproc_1; -create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t6; -USE db_storedproc; -create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) -engine = ; -load data infile '/std_data/funcs_1/t7.txt' into table t7; -Warnings: -Warning 1265 Data truncated for column 'f3' at row 1 -Warning 1265 Data truncated for column 'f3' at row 2 -Warning 1265 Data truncated for column 'f3' at row 3 -Warning 1265 Data truncated for column 'f3' at row 4 -Warning 1265 Data truncated for column 'f3' at row 5 -Warning 1265 Data truncated for column 'f3' at row 6 -Warning 1265 Data truncated for column 'f3' at row 7 -Warning 1265 Data truncated for column 'f3' at row 8 -Warning 1265 Data truncated for column 'f3' at row 9 -Warning 1265 Data truncated for column 'f3' at row 10 -create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) -engine = ; -load data infile '/std_data/funcs_1/t7.txt' into table t8; -Warnings: -Warning 1265 Data truncated for column 'f3' at row 1 -Warning 1265 Data truncated for column 'f3' at row 2 -Warning 1265 Data truncated for column 'f3' at row 3 -Warning 1265 Data truncated for column 'f3' at row 4 -Warning 1265 Data truncated for column 'f3' at row 5 -Warning 1265 Data truncated for column 'f3' at row 6 -Warning 1265 Data truncated for column 'f3' at row 7 -Warning 1265 Data truncated for column 'f3' at row 8 -Warning 1265 Data truncated for column 'f3' at row 9 -Warning 1265 Data truncated for column 'f3' at row 10 -create table t9(f1 int, f2 char(25), f3 int) engine = ; -load data infile '/std_data/funcs_1/t9.txt' into table t9; -create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t10; -create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t11; - -Section 3.1.10 - CALL checks: --------------------------------------------------------------------------------- -USE db_storedproc; - -Testcase 3.1.10.2 + 3.1.10.5: ------------------------------ - -2. Ensure that a procedure cannot be called if the appropriate privileges do not -exist. -5. Ensure that a function cannot be executed if the appropriate privileges do -not exist. --------------------------------------------------------------------------------- -DROP PROCEDURE IF EXISTS sp31102; -DROP FUNCTION IF EXISTS fn31105; -create user 'user_1'@'localhost'; -create user 'user_2'@'localhost'; -GRANT CREATE ROUTINE ON db_storedproc.* TO 'user_1'@'localhost'; -GRANT SELECT ON db_storedproc.* TO 'user_2'@'localhost'; -FLUSH PRIVILEGES; - -user_1@localhost db_storedproc -CREATE PROCEDURE sp31102 () SQL SECURITY INVOKER -BEGIN -SELECT * FROM db_storedproc.t1 WHERE f4=-5000 LIMIT 1; -END// -CREATE FUNCTION fn31105(n INT) RETURNS INT -BEGIN -DECLARE res INT; -SET res = n * n; -RETURN res; -END// - -user_2@localhost db_storedproc -CALL sp31102(); -ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.sp31102' -SELECT fn31105( 9 ); -ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.fn31105' -connection default; -USE db_storedproc; - -root@localhost db_storedproc -CALL sp31102(); -f1 f2 f3 f4 f5 f6 -a` a` 1000-01-01 -5000 a` -5000 -SELECT fn31105( 9 ); -fn31105( 9 ) -81 -GRANT EXECUTE ON db_storedproc.* TO 'user_2'@'localhost'; -FLUSH PRIVILEGES; - -user_2@localhost db_storedproc -CALL sp31102(); -f1 f2 f3 f4 f5 f6 -a` a` 1000-01-01 -5000 a` -5000 -SELECT fn31105( 9 ); -fn31105( 9 ) -81 -connection default; -USE db_storedproc; - -root@localhost db_storedproc -REVOKE EXECUTE ON db_storedproc.* FROM 'user_2'@'localhost'; -FLUSH PRIVILEGES; -CALL sp31102(); -f1 f2 f3 f4 f5 f6 -a` a` 1000-01-01 -5000 a` -5000 -SELECT fn31105( 9 ); -fn31105( 9 ) -81 - -user_2@localhost db_storedproc -CALL sp31102(); -ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.sp31102' -SELECT fn31105( 9 ); -ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.fn31105' -USE db_storedproc; - -root@localhost db_storedproc -DROP PROCEDURE sp31102; -DROP FUNCTION fn31105; -DROP USER 'user_1'@'localhost'; -DROP USER 'user_2'@'localhost'; - -Testcase 3.1.10.3: ------------------- - -Ensure that a function can never be called. --------------------------------------------------------------------------------- -DROP FUNCTION IF EXISTS fn1; -CREATE FUNCTION fn1(a int) returns int -BEGIN -set @b = 0.9 * a; -return @b; -END// -CALL fn1(); -ERROR 42000: PROCEDURE db_storedproc.fn1 does not exist -DROP FUNCTION fn1; - -Testcase 3.1.10.6: ------------------- - -Ensure that a procedure can never be executed. --------------------------------------------------------------------------------- -DROP PROCEDURE IF EXISTS sp1; -DROP FUNCTION IF EXISTS sp1; -CREATE PROCEDURE sp1() -BEGIN -SELECT * from t10; -END// -SELECT sp1(); -ERROR 42000: FUNCTION db_storedproc.sp1 does not exist -DROP PROCEDURE sp1; - -Testcase 3.1.10.7: ------------------- - -Ensure that the ROW_COUNT() SQL function always returns the correct number of -rows affected by the execution of a stored procedure. --------------------------------------------------------------------------------- -DROP PROCEDURE IF EXISTS sp_ins_1; -DROP PROCEDURE IF EXISTS sp_ins_3; -DROP PROCEDURE IF EXISTS sp_upd; -DROP PROCEDURE IF EXISTS sp_ins_upd; -DROP PROCEDURE IF EXISTS sp_del; -DROP PROCEDURE IF EXISTS sp_with_rowcount; -CREATE TABLE temp(f1 CHAR(20),f2 CHAR(25),f3 DATE,f4 INT,f5 CHAR(25),f6 INT); -INSERT INTO temp SELECT * FROM t10; -CREATE PROCEDURE sp_ins_1() -BEGIN -INSERT INTO temp VALUES ('abc', 'abc', '20051003', 100, 'uvw', 1000); -END// -CREATE PROCEDURE sp_ins_3() -BEGIN -INSERT INTO temp VALUES ('abc', 'xyz', '19490523', 100, 'uvw', 1000); -INSERT INTO temp VALUES ('abc', 'xyz', '1989-11-09', 100, 'uvw', 1000); -INSERT INTO temp VALUES ('abc', 'xyz', '2005-10-24', 100, 'uvw', 1000); -END// -CREATE PROCEDURE sp_upd() -BEGIN -UPDATE temp SET temp.f1 = 'updated' WHERE temp.f1 ='abc'; -END// -CREATE PROCEDURE sp_ins_upd() -BEGIN -BEGIN -INSERT INTO temp VALUES ('qwe', 'abc', '1989-11-09', 100, 'uvw', 1000); -INSERT INTO temp VALUES ('qwe', 'xyz', '1998-03-26', 100, 'uvw', 1000); -INSERT INTO temp VALUES ('qwe', 'abc', '2000-11-09', 100, 'uvw', 1000); -INSERT INTO temp VALUES ('qwe', 'abc', '2005-11-07', 100, 'uvw', 1000); -END; -SELECT COUNT( f1 ), f1 FROM temp GROUP BY f1; -UPDATE temp SET temp.f1 = 'updated_2' WHERE temp.f1 ='qwe' AND temp.f2 = 'abc'; -END// -CREATE PROCEDURE sp_del() -BEGIN -DELETE FROM temp WHERE temp.f1 ='qwe' OR temp.f1 = 'updated_2'; -END// -CREATE PROCEDURE sp_with_rowcount() -BEGIN -BEGIN -INSERT INTO temp VALUES ('qwe', 'abc', '1989-11-09', 100, 'uvw', 1000), -('qwe', 'xyz', '1998-03-26', 100, 'uvw', 1000), -('qwe', 'abc', '2000-11-09', 100, 'uvw', 1000), -('qwe', 'xyz', '2005-11-07', 100, 'uvw', 1000); -END; -SELECT row_count() AS 'row_count() after insert'; -SELECT row_count() AS 'row_count() after select row_count()'; -SELECT f1,f2,f3 FROM temp ORDER BY f1,f2,f3; -UPDATE temp SET temp.f1 = 'updated_2' WHERE temp.f2 = 'abc'; -SELECT row_count() AS 'row_count() after update'; -SELECT f1,f2,f3 FROM temp ORDER BY f1,f2,f3; -DELETE FROM temp WHERE temp.f1 = 'updated_2'; -SELECT row_count() AS 'row_count() after delete'; -END// -CALL sp_ins_1(); -SELECT row_count(); -row_count() -1 -SELECT * FROM temp; -f1 f2 f3 f4 f5 f6 -a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992 -a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991 -a` a` 1000-01-01 -5000 a` -5000 -aaa aaa 1000-01-02 -4999 aaa -4999 -abaa abaa 1000-01-03 -4998 abaa -4998 -abc abc 2005-10-03 100 uvw 1000 -acaaa acaaa 1000-01-04 -4997 acaaa -4997 -adaaaa adaaaa 1000-01-05 -4996 adaaaa -4996 -aeaaaaa aeaaaaa 1000-01-06 -4995 aeaaaaa -4995 -afaaaaaa afaaaaaa 1000-01-07 -4994 afaaaaaa -4994 -agaaaaaaa agaaaaaaa 1000-01-08 -4993 agaaaaaaa -4993 -CALL sp_ins_3(); -SELECT row_count(); -row_count() -1 -SELECT * FROM temp; -f1 f2 f3 f4 f5 f6 -a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992 -a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991 -a` a` 1000-01-01 -5000 a` -5000 -aaa aaa 1000-01-02 -4999 aaa -4999 -abaa abaa 1000-01-03 -4998 abaa -4998 -abc abc 2005-10-03 100 uvw 1000 -abc xyz 1949-05-23 100 uvw 1000 -abc xyz 1989-11-09 100 uvw 1000 -abc xyz 2005-10-24 100 uvw 1000 -acaaa acaaa 1000-01-04 -4997 acaaa -4997 -adaaaa adaaaa 1000-01-05 -4996 adaaaa -4996 -aeaaaaa aeaaaaa 1000-01-06 -4995 aeaaaaa -4995 -afaaaaaa afaaaaaa 1000-01-07 -4994 afaaaaaa -4994 -agaaaaaaa agaaaaaaa 1000-01-08 -4993 agaaaaaaa -4993 -CALL sp_upd(); -SELECT row_count(); -row_count() -4 -SELECT * FROM temp; -f1 f2 f3 f4 f5 f6 -a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992 -a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991 -a` a` 1000-01-01 -5000 a` -5000 -aaa aaa 1000-01-02 -4999 aaa -4999 -abaa abaa 1000-01-03 -4998 abaa -4998 -acaaa acaaa 1000-01-04 -4997 acaaa -4997 -adaaaa adaaaa 1000-01-05 -4996 adaaaa -4996 -aeaaaaa aeaaaaa 1000-01-06 -4995 aeaaaaa -4995 -afaaaaaa afaaaaaa 1000-01-07 -4994 afaaaaaa -4994 -agaaaaaaa agaaaaaaa 1000-01-08 -4993 agaaaaaaa -4993 -updated abc 2005-10-03 100 uvw 1000 -updated xyz 1949-05-23 100 uvw 1000 -updated xyz 1989-11-09 100 uvw 1000 -updated xyz 2005-10-24 100 uvw 1000 -CALL sp_ins_upd(); -COUNT( f1 ) f1 -1 aaa -1 abaa -1 acaaa -1 adaaaa -1 aeaaaaa -1 afaaaaaa -1 agaaaaaaa -1 a^aaaaaaaa -1 a_aaaaaaaaa -1 a` -4 qwe -4 updated -SELECT row_count(); -row_count() -3 -SELECT * FROM temp; -f1 f2 f3 f4 f5 f6 -a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992 -a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991 -a` a` 1000-01-01 -5000 a` -5000 -aaa aaa 1000-01-02 -4999 aaa -4999 -abaa abaa 1000-01-03 -4998 abaa -4998 -acaaa acaaa 1000-01-04 -4997 acaaa -4997 -adaaaa adaaaa 1000-01-05 -4996 adaaaa -4996 -aeaaaaa aeaaaaa 1000-01-06 -4995 aeaaaaa -4995 -afaaaaaa afaaaaaa 1000-01-07 -4994 afaaaaaa -4994 -agaaaaaaa agaaaaaaa 1000-01-08 -4993 agaaaaaaa -4993 -qwe xyz 1998-03-26 100 uvw 1000 -updated abc 2005-10-03 100 uvw 1000 -updated xyz 1949-05-23 100 uvw 1000 -updated xyz 1989-11-09 100 uvw 1000 -updated xyz 2005-10-24 100 uvw 1000 -updated_2 abc 1989-11-09 100 uvw 1000 -updated_2 abc 2000-11-09 100 uvw 1000 -updated_2 abc 2005-11-07 100 uvw 1000 -CALL sp_del(); -SELECT row_count(); -row_count() -4 -SELECT * FROM temp; -f1 f2 f3 f4 f5 f6 -a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992 -a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991 -a` a` 1000-01-01 -5000 a` -5000 -aaa aaa 1000-01-02 -4999 aaa -4999 -abaa abaa 1000-01-03 -4998 abaa -4998 -acaaa acaaa 1000-01-04 -4997 acaaa -4997 -adaaaa adaaaa 1000-01-05 -4996 adaaaa -4996 -aeaaaaa aeaaaaa 1000-01-06 -4995 aeaaaaa -4995 -afaaaaaa afaaaaaa 1000-01-07 -4994 afaaaaaa -4994 -agaaaaaaa agaaaaaaa 1000-01-08 -4993 agaaaaaaa -4993 -updated abc 2005-10-03 100 uvw 1000 -updated xyz 1949-05-23 100 uvw 1000 -updated xyz 1989-11-09 100 uvw 1000 -updated xyz 2005-10-24 100 uvw 1000 -DELETE FROM temp; -CALL sp_with_rowcount(); -row_count() after insert -4 -row_count() after select row_count() --1 -f1 f2 f3 -qwe abc 1989-11-09 -qwe abc 2000-11-09 -qwe xyz 1998-03-26 -qwe xyz 2005-11-07 -row_count() after update -2 -f1 f2 f3 -qwe xyz 1998-03-26 -qwe xyz 2005-11-07 -updated_2 abc 1989-11-09 -updated_2 abc 2000-11-09 -row_count() after delete -2 -SELECT row_count(); -row_count() -0 -SELECT * FROM temp; -f1 f2 f3 f4 f5 f6 -qwe xyz 1998-03-26 100 uvw 1000 -qwe xyz 2005-11-07 100 uvw 1000 -DROP PROCEDURE sp_ins_1; -DROP PROCEDURE sp_ins_3; -DROP PROCEDURE sp_upd; -DROP PROCEDURE sp_ins_upd; -DROP PROCEDURE sp_del; -DROP PROCEDURE sp_with_rowcount; -DROP TABLE temp; - -Testcase 3.1.10.8: ------------------- - -Ensure that the mysql_affected_rows() C API function always returns the correct -number of rows affected by the execution of a stored procedure. --------------------------------------------------------------------------------- - ---source suite/funcs_1/storedproc/cleanup_sp_tb.inc --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_storedproc; -DROP DATABASE IF EXISTS db_storedproc_1; - -. +++ END OF SCRIPT +++ --------------------------------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/r/ndb_trig_0102.result b/mysql-test/suite/funcs_1/r/ndb_trig_0102.result deleted file mode 100644 index 5ca24acf0bf..00000000000 --- a/mysql-test/suite/funcs_1/r/ndb_trig_0102.result +++ /dev/null @@ -1,366 +0,0 @@ -USE test; -drop table if exists tb3; -create table tb3 ( -f118 char not null DEFAULT 'a', -f119 char binary not null DEFAULT b'101', -f120 char ascii not null DEFAULT b'101', -f121 char(50), -f122 char(50), -f129 binary not null DEFAULT b'101', -f130 tinyint not null DEFAULT 99, -f131 tinyint unsigned not null DEFAULT 99, -f132 tinyint zerofill not null DEFAULT 99, -f133 tinyint unsigned zerofill not null DEFAULT 99, -f134 smallint not null DEFAULT 999, -f135 smallint unsigned not null DEFAULT 999, -f136 smallint zerofill not null DEFAULT 999, -f137 smallint unsigned zerofill not null DEFAULT 999, -f138 mediumint not null DEFAULT 9999, -f139 mediumint unsigned not null DEFAULT 9999, -f140 mediumint zerofill not null DEFAULT 9999, -f141 mediumint unsigned zerofill not null DEFAULT 9999, -f142 int not null DEFAULT 99999, -f143 int unsigned not null DEFAULT 99999, -f144 int zerofill not null DEFAULT 99999, -f145 int unsigned zerofill not null DEFAULT 99999, -f146 bigint not null DEFAULT 999999, -f147 bigint unsigned not null DEFAULT 999999, -f148 bigint zerofill not null DEFAULT 999999, -f149 bigint unsigned zerofill not null DEFAULT 999999, -f150 decimal not null DEFAULT 999.999, -f151 decimal unsigned not null DEFAULT 999.17, -f152 decimal zerofill not null DEFAULT 999.999, -f153 decimal unsigned zerofill, -f154 decimal (0), -f155 decimal (64), -f156 decimal (0) unsigned, -f157 decimal (64) unsigned, -f158 decimal (0) zerofill, -f159 decimal (64) zerofill, -f160 decimal (0) unsigned zerofill, -f161 decimal (64) unsigned zerofill, -f162 decimal (0,0), -f163 decimal (63,30), -f164 decimal (0,0) unsigned, -f165 decimal (63,30) unsigned, -f166 decimal (0,0) zerofill, -f167 decimal (63,30) zerofill, -f168 decimal (0,0) unsigned zerofill, -f169 decimal (63,30) unsigned zerofill, -f170 numeric, -f171 numeric unsigned, -f172 numeric zerofill, -f173 numeric unsigned zerofill, -f174 numeric (0), -f175 numeric (64) -) engine = ; -Warnings: -Note 1265 Data truncated for column 'f150' at row 1 -Note 1265 Data truncated for column 'f151' at row 1 -Note 1265 Data truncated for column 'f152' at row 1 - -Testcase: 3.5.1.1: ------------------- -use test; -Create trigger trg1_1 BEFORE INSERT -on tb3 for each row set @test_before = 2, new.f142 = @test_before; -Create trigger trg1_2 AFTER INSERT -on tb3 for each row set @test_after = 6; -Create trigger trg1_4 BEFORE UPDATE -on tb3 for each row set @test_before = 27, -new.f142 = @test_before, -new.f122 = 'Before Update Trigger'; -Create trigger trg1_3 AFTER UPDATE -on tb3 for each row set @test_after = '15'; -Create trigger trg1_5 BEFORE DELETE on tb3 for each row -select count(*) into @test_before from tb3 as tr_tb3 -where f121 = 'Test 3.5.1.1'; -Create trigger trg1_6 AFTER DELETE on tb3 for each row -select count(*) into @test_after from tb3 as tr_tb3 -where f121 = 'Test 3.5.1.1'; -set @test_before = 1; -set @test_after = 5; -select @test_before, @test_after; -@test_before @test_after -1 5 -Insert into tb3 (f121, f122, f142, f144, f134) -values ('Test 3.5.1.1', 'First Row', @test_before, @test_after, 1); -select f121, f122, f142, f144, f134 from tb3 where f121 = 'Test 3.5.1.1'; -f121 f122 f142 f144 f134 -Test 3.5.1.1 First Row 2 0000000005 1 -select @test_before, @test_after; -@test_before @test_after -2 6 -set @test_before = 18; -set @test_after = 8; -select @test_before, @test_after; -@test_before @test_after -18 8 -Update tb3 set tb3.f122 = 'Update', -tb3.f142 = @test_before, -tb3.f144 = @test_after -where tb3.f121 = 'Test 3.5.1.1'; -select f121, f122, f142, f144, f134 from tb3 where f121 = 'Test 3.5.1.1'; -f121 f122 f142 f144 f134 -Test 3.5.1.1 Before Update Trigger 27 0000000008 1 -select @test_before, @test_after; -@test_before @test_after -27 15 -Insert into tb3 (f121, f122, f142, f144, f134) -values ('Test 3.5.1.1', 'Second Row', 5, 6, 2); -set @test_before = 0; -set @test_after = 0; -select f121, f122, f142, f144, f134 from tb3 where f121 = 'Test 3.5.1.1'; -f121 f122 f142 f144 f134 -Test 3.5.1.1 Before Update Trigger 27 0000000008 1 -Test 3.5.1.1 Second Row 2 0000000006 2 -select @test_before, @test_after; -@test_before @test_after -0 0 -Delete from tb3 where f121 = 'Test 3.5.1.1' and f134 = 2; -select f121, f122, f142, f144, f134 from tb3 where f121 = 'Test 3.5.1.1'; -f121 f122 f142 f144 f134 -Test 3.5.1.1 Before Update Trigger 27 0000000008 1 -select @test_before, @test_after; -@test_before @test_after -2 1 -drop trigger trg1_1; -drop trigger trg1_2; -drop trigger trg1_3; -drop trigger trg1_4; -drop trigger trg1_5; -drop trigger trg1_6; -delete from tb3 where f121='Test 3.5.1.1'; - -Testcase: 3.5.1.2: ------------------- -Create trigger trg_1 after insert -on tb3 for each statement set @x= 1; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'statement set @x= 1' at line 2 -drop trigger trg_1; - -Testcase 3.5.1.3: ------------------ -CREATE TRIGGER trg3_1 on tb3 BEFORE INSERT for each row set new.f120 = 't'; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'on tb3 BEFORE INSERT for each row set new.f120 = 't'' at line 1 -CREATE trg3_2 TRIGGER AFTER INSERT on tb3 for each row set new.f120 = 's'; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'trg3_2 TRIGGER AFTER INSERT on tb3 for each row set new.f120 = 's'' at line 1 -CREATE TRIGGER trg3_3 Before DELETE on tb3 set @ret1 = 'test' for each row; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'set @ret1 = 'test' for each row' at line 1 -CREATE TRIGGER trg3_4 DELETE AFTER on tb3 set @ret1 = 'test' for each row; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DELETE AFTER on tb3 set @ret1 = 'test' for each row' at line 1 -CREATE for each row TRIGGER trg3_5 AFTER UPDATE on tb3 set @ret1 = 'test'; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'for each row TRIGGER trg3_5 AFTER UPDATE on tb3 set @ret1 = 'test'' at line 1 -drop trigger trg3_1; -drop trigger trg3_2; -drop trigger trg3_3; -drop trigger trg3_4; -drop trigger trg3_5; - -Testcase: 3.5.1.5: ------------------- -CREATE TRIGGER trg4_1 AFTER on tb3 for each row set new.f120 = 'e'; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'on tb3 for each row set new.f120 = 'e'' at line 1 -CREATE TRIGGER trg4_2 INSERT on tb3 for each set row new.f120 = 'f'; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INSERT on tb3 for each set row new.f120 = 'f'' at line 1 -CREATE TRIGGER trg4_3 BEFORE INSERT tb3 for each row set new.f120 = 'g'; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'tb3 for each row set new.f120 = 'g'' at line 1 -CREATE TRIGGER trg4_4 AFTER UPDATE on tb3 for each set new.f120 = 'g'; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'set new.f120 = 'g'' at line 1 -CREATE trg4_5 AFTER DELETE on tb3 for each set new.f120 = 'g'; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'trg4_5 AFTER DELETE on tb3 for each set new.f120 = 'g'' at line 1 -CREATE TRIGGER trg4_6 BEFORE DELETE for each row set new.f120 = 'g'; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'for each row set new.f120 = 'g'' at line 1 -drop trigger trg4_1; -drop trigger trg4_2; -drop trigger trg4_3; -drop trigger trg4_4; -drop trigger trg4_5; -drop trigger trg4_6; - -Testcase 3.5.1.6: - Need to fix -------------------------------- - -Testcase 3.5.1.7: - need to fix -------------------------------- -drop table if exists t1; -Warnings: -Note 1051 Unknown table 't1' -create table t1 (f1 int, f2 char(25),f3 int) engine = ; -CREATE TRIGGER trg5_1 BEFORE INSERT on test.t1 -for each row set new.f3 = '14'; -CREATE TRIGGER trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ -BEFORE UPDATE on test.t1 for each row set new.f3 = '42'; -ERROR 42000: Identifier name 'trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ' is too long -CREATE TRIGGER trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWX -BEFORE UPDATE on test.t1 for each row set new.f3 = '42'; -insert into t1 (f2) values ('insert 3.5.1.7'); -select * from t1; -f1 f2 f3 -NULL insert 3.5.1.7 14 -update t1 set f2='update 3.5.1.7'; -select * from t1; -f1 f2 f3 -NULL update 3.5.1.7 42 -select trigger_name from information_schema.triggers order by trigger_name; -trigger_name -gs_insert -trg5_1 -trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWX -ts_insert -drop trigger trg5_1; -drop trigger trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ; -ERROR 42000: Identifier name 'trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ' is too long -drop trigger trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWX; -drop table t1; - -Testcase 3.5.1.8: ------------------ -CREATE TRIGGER trg12* before insert on tb3 for each row set new.f120 = 't'; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '* before insert on tb3 for each row set new.f120 = 't'' at line 1 -CREATE TRIGGER trigger before insert on tb3 for each row set new.f120 = 't'; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'trigger before insert on tb3 for each row set new.f120 = 't'' at line 1 -CREATE TRIGGER 100 before insert on tb3 for each row set new.f120 = 't'; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '100 before insert on tb3 for each row set new.f120 = 't'' at line 1 -CREATE TRIGGER @@view before insert on tb3 for each row set new.f120 = 't'; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@@view before insert on tb3 for each row set new.f120 = 't'' at line 1 -CREATE TRIGGER @name before insert on tb3 for each row set new.f120 = 't'; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@name before insert on tb3 for each row set new.f120 = 't'' at line 1 -CREATE TRIGGER tb3.trg6_1 BEFORE INSERT on test.tb3 -for each row set new.f120 ='X'; -ERROR HY000: Trigger in wrong schema -drop database if exists trig_db; -create database trig_db; -use trig_db; -create table t1 (f1 integer) engine = ; -use test; -CREATE TRIGGER trig_db.trg6_2 AFTER INSERT on tb3 -for each row set @ret_trg6_2 = 5; -ERROR 42S02: Table 'trig_db.tb3' doesn't exist -use trig_db; -CREATE TRIGGER trg6_3 AFTER INSERT on test.tb3 -for each row set @ret_trg6_3 = 18; -ERROR HY000: Trigger in wrong schema -use test; -drop database trig_db; -drop trigger trg6_1; -drop trigger trg6_3; - -Testcase 3.5.1.9:(cannot be inplemented at this point) ------------------------------------------------------- - -Testcase 3.5.1.10: ------------------- -CREATE TRIGGER trg7_1 BEFORE UPDATE on tb3 for each row set new.f120 ='X'; -CREATE TRIGGER trg7_1 AFTER INSERT on tb3 for each row set @x ='Y'; -ERROR HY000: Trigger already exists -drop trigger trg7_1; - -Testcase 3.5.1.?: ------------------ -drop table if exists t1; -drop table if exists t2; -create table t1 (f1 char(50), f2 integer) engine = ; -create table t2 (f1 char(50), f2 integer) engine = ; -create trigger trig before insert on t1 -for each row set new.f1 ='trig t1'; -create trigger trig before update on t2 -for each row set new.f1 ='trig t2'; -ERROR HY000: Trigger already exists -insert into t1 value ('insert to t1',1); -select * from t1; -f1 f2 -trig t1 1 -update t1 set f1='update to t1'; -select * from t1; -f1 f2 -update to t1 1 -insert into t2 value ('insert to t2',2); -update t2 set f1='update to t1'; -select * from t2; -f1 f2 -update to t1 2 -drop table t1; -drop table t2; -drop trigger trig; - -Testcase 3.5.1.11: ------------------- -drop database if exists trig_db1; -drop database if exists trig_db2; -drop database if exists trig_db3; -create database trig_db1; -create database trig_db2; -create database trig_db3; -use trig_db1; -create table t1 (f1 char(50), f2 integer) engine = ; -create trigger trig before insert on t1 -for each row set new.f1 ='trig1', @test_var1='trig1'; -use trig_db2; -create table t2 (f1 char(50), f2 integer) engine = ; -create trigger trig before insert on t2 -for each row set new.f1 ='trig2', @test_var2='trig2'; -use trig_db3; -create table t1 (f1 char(50), f2 integer) engine = ; -create trigger trig before insert on t1 -for each row set new.f1 ='trig3', @test_var3='trig3'; -set @test_var1= '', @test_var2= '', @test_var3= ''; -use trig_db1; -insert into t1 (f1,f2) values ('insert to db1 t1',1); -insert into trig_db1.t1 (f1,f2) values ('insert to db1 t1 from db1',2); -insert into trig_db2.t2 (f1,f2) values ('insert to db2 t2 from db1',3); -insert into trig_db3.t1 (f1,f2) values ('insert to db3 t1 from db1',4); -select @test_var1, @test_var2, @test_var3; -@test_var1 @test_var2 @test_var3 -trig1 trig2 trig3 -select * from t1 order by f2; -f1 f2 -trig1 1 -trig1 2 -select * from trig_db2.t2; -f1 f2 -trig2 3 -select * from trig_db3.t1; -f1 f2 -trig3 4 -select * from t1 order by f2; -f1 f2 -trig1 1 -trig1 2 -use test; -drop database trig_db1; -drop database trig_db2; -drop database trig_db3; - -Testcase 3.5.2.1/2/3: ---------------------- -drop database if exists trig_db1; -drop database if exists trig_db2; -create database trig_db1; -create database trig_db2; -use trig_db1; -create table t1 (f1 char(50), f2 integer) engine = ; -create table trig_db2.t1 (f1 char(50), f2 integer) engine = ; -create trigger trig1_b before insert on t1 -for each row set @test_var1='trig1_b'; -create trigger trig_db1.trig1_a after insert on t1 -for each row set @test_var2='trig1_a'; -create trigger trig_db2.trig2 before insert on trig_db2.t1 -for each row set @test_var3='trig2'; -select trigger_schema, trigger_name, event_object_table -from information_schema.triggers -where trigger_schema like 'trig_db%' - order by trigger_name; -trigger_schema trigger_name event_object_table -trig_db1 trig1_a t1 -trig_db1 trig1_b t1 -trig_db2 trig2 t1 -set @test_var1= '', @test_var2= '', @test_var3= ''; -insert into t1 (f1,f2) values ('insert to db1 t1 from db1',352); -insert into trig_db2.t1 (f1,f2) values ('insert to db2 t1 from db1',352); -select @test_var1, @test_var2, @test_var3; -@test_var1 @test_var2 @test_var3 -trig1_b trig1_a trig2 -drop database trig_db1; -drop database trig_db2; -DROP TABLE test.tb3; diff --git a/mysql-test/suite/funcs_1/r/ndb_trig_03.result b/mysql-test/suite/funcs_1/r/ndb_trig_03.result deleted file mode 100644 index db92ea56444..00000000000 --- a/mysql-test/suite/funcs_1/r/ndb_trig_03.result +++ /dev/null @@ -1,675 +0,0 @@ -USE test; -drop table if exists tb3; -create table tb3 ( -f118 char not null DEFAULT 'a', -f119 char binary not null DEFAULT b'101', -f120 char ascii not null DEFAULT b'101', -f121 char(50), -f122 char(50), -f129 binary not null DEFAULT b'101', -f130 tinyint not null DEFAULT 99, -f131 tinyint unsigned not null DEFAULT 99, -f132 tinyint zerofill not null DEFAULT 99, -f133 tinyint unsigned zerofill not null DEFAULT 99, -f134 smallint not null DEFAULT 999, -f135 smallint unsigned not null DEFAULT 999, -f136 smallint zerofill not null DEFAULT 999, -f137 smallint unsigned zerofill not null DEFAULT 999, -f138 mediumint not null DEFAULT 9999, -f139 mediumint unsigned not null DEFAULT 9999, -f140 mediumint zerofill not null DEFAULT 9999, -f141 mediumint unsigned zerofill not null DEFAULT 9999, -f142 int not null DEFAULT 99999, -f143 int unsigned not null DEFAULT 99999, -f144 int zerofill not null DEFAULT 99999, -f145 int unsigned zerofill not null DEFAULT 99999, -f146 bigint not null DEFAULT 999999, -f147 bigint unsigned not null DEFAULT 999999, -f148 bigint zerofill not null DEFAULT 999999, -f149 bigint unsigned zerofill not null DEFAULT 999999, -f150 decimal not null DEFAULT 999.999, -f151 decimal unsigned not null DEFAULT 999.17, -f152 decimal zerofill not null DEFAULT 999.999, -f153 decimal unsigned zerofill, -f154 decimal (0), -f155 decimal (64), -f156 decimal (0) unsigned, -f157 decimal (64) unsigned, -f158 decimal (0) zerofill, -f159 decimal (64) zerofill, -f160 decimal (0) unsigned zerofill, -f161 decimal (64) unsigned zerofill, -f162 decimal (0,0), -f163 decimal (63,30), -f164 decimal (0,0) unsigned, -f165 decimal (63,30) unsigned, -f166 decimal (0,0) zerofill, -f167 decimal (63,30) zerofill, -f168 decimal (0,0) unsigned zerofill, -f169 decimal (63,30) unsigned zerofill, -f170 numeric, -f171 numeric unsigned, -f172 numeric zerofill, -f173 numeric unsigned zerofill, -f174 numeric (0), -f175 numeric (64) -) engine = ; -Warnings: -Note 1265 Data truncated for column 'f150' at row 1 -Note 1265 Data truncated for column 'f151' at row 1 -Note 1265 Data truncated for column 'f152' at row 1 - -Testcase 3.5.3: ---------------- -drop database if exists priv_db; -create database priv_db; -use priv_db; -create table t1 (f1 char(20)) engine= ; -create User test_noprivs@localhost; -set password for test_noprivs@localhost = password('PWD'); -create User test_yesprivs@localhost; -set password for test_yesprivs@localhost = password('PWD'); - -Testcase 3.5.3.2/6: -------------------- -revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost; -grant ALL on *.* to test_noprivs@localhost; -revoke TRIGGER on *.* from test_noprivs@localhost; -show grants for test_noprivs@localhost; -Grants for test_noprivs@localhost -GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; -grant TRIGGER on *.* to test_yesprivs@localhost; -grant SELECT on priv_db.t1 to test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' - -Testcase 3.5.3.2: ------------------ -select current_user; -current_user -test_noprivs@localhost -use priv_db; -create trigger trg1_1 before INSERT on t1 for each row -set new.f1 = 'trig 3.5.3.2_1-no'; -ERROR 42000: TRIGGER command denied to user 'test_noprivs'@'localhost' for table 't1' -use priv_db; -insert into t1 (f1) values ('insert 3.5.3.2-no'); -select f1 from t1 order by f1; -f1 -insert 3.5.3.2-no -select current_user; -current_user -test_yesprivs@localhost -use priv_db; -create trigger trg1_2 before INSERT on t1 for each row -set new.f1 = 'trig 3.5.3.2_2-yes'; -select current_user; -current_user -root@localhost -use priv_db; -insert into t1 (f1) values ('insert 3.5.3.2-yes'); -ERROR 42000: UPDATE command denied to user 'test_yesprivs'@'localhost' for column 'f1' in table 't1' -select f1 from t1 order by f1; -f1 -insert 3.5.3.2-no -grant UPDATE on priv_db.t1 to test_yesprivs@localhost; -insert into t1 (f1) values ('insert 3.5.3.2-yes'); -select f1 from t1 order by f1; -f1 -insert 3.5.3.2-no -trig 3.5.3.2_2-yes - -Testcase 3.5.3.6: ------------------ -use priv_db; -drop trigger trg1_2; -ERROR 42000: TRIGGER command denied to user 'test_noprivs'@'localhost' for table 't1' -use priv_db; -insert into t1 (f1) values ('insert 3.5.3.6-yes'); -select f1 from t1 order by f1; -f1 -insert 3.5.3.2-no -trig 3.5.3.2_2-yes -trig 3.5.3.2_2-yes -use priv_db; -drop trigger trg1_2; -use priv_db; -insert into t1 (f1) values ('insert 3.5.3.6-no'); -select f1 from t1 order by f1; -f1 -insert 3.5.3.2-no -insert 3.5.3.6-no -trig 3.5.3.2_2-yes -trig 3.5.3.2_2-yes -drop trigger trg1_2; - -Testcase 3.5.3.7a: ------------------- -revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost; -grant ALL on *.* to test_noprivs@localhost; -revoke UPDATE on *.* from test_noprivs@localhost; -show grants for test_noprivs@localhost; -Grants for test_noprivs@localhost -GRANT SELECT, INSERT, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; -grant TRIGGER, UPDATE on *.* to test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT UPDATE, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -select current_user; -current_user -test_noprivs@localhost -use priv_db; -show grants; -Grants for test_noprivs@localhost -GRANT SELECT, INSERT, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -select f1 from t1 order by f1; -f1 -insert 3.5.3.2-no -insert 3.5.3.6-no -trig 3.5.3.2_2-yes -trig 3.5.3.2_2-yes -create trigger trg4a_1 before INSERT on t1 for each row -set new.f1 = 'trig 3.5.3.7-1a'; -insert into t1 (f1) values ('insert 3.5.3.7-1a'); -ERROR 42000: UPDATE command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1' -select f1 from t1 order by f1; -f1 -insert 3.5.3.2-no -insert 3.5.3.6-no -trig 3.5.3.2_2-yes -trig 3.5.3.2_2-yes -drop trigger trg4a_1; -use priv_db; -select current_user; -current_user -test_yesprivs@localhost -show grants; -Grants for test_yesprivs@localhost -GRANT UPDATE, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -create trigger trg4a_2 before INSERT on t1 for each row -set new.f1 = 'trig 3.5.3.7-2a'; -insert into t1 (f1) values ('insert 3.5.3.7-2b'); -select f1 from t1 order by f1; -f1 -insert 3.5.3.2-no -insert 3.5.3.6-no -trig 3.5.3.2_2-yes -trig 3.5.3.2_2-yes -trig 3.5.3.7-2a -drop trigger trg4a_2; - -Testcase 3.5.3.7b: ------------------- -revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost; -grant TRIGGER on *.* to test_noprivs; -grant ALL on priv_db.* to test_noprivs@localhost; -revoke UPDATE on priv_db.* from test_noprivs@localhost; -show grants for test_noprivs; -Grants for test_noprivs@% -GRANT TRIGGER ON *.* TO 'test_noprivs'@'%' -revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; -grant TRIGGER on *.* to test_yesprivs@localhost; -grant UPDATE on priv_db.* to test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT UPDATE ON `priv_db`.* TO 'test_yesprivs'@'localhost' -show grants; -Grants for test_noprivs@localhost -GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER ON `priv_db`.* TO 'test_noprivs'@'localhost' -use priv_db; -create trigger trg4b_1 before UPDATE on t1 for each row -set new.f1 = 'trig 3.5.3.7-1b'; -insert into t1 (f1) values ('insert 3.5.3.7-1b'); -select f1 from t1 order by f1; -f1 -insert 3.5.3.2-no -insert 3.5.3.6-no -insert 3.5.3.7-1b -trig 3.5.3.2_2-yes -trig 3.5.3.2_2-yes -trig 3.5.3.7-2a -update t1 set f1 = 'update 3.5.3.7-1b' where f1 = 'insert 3.5.3.7-1b'; -ERROR 42000: UPDATE command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1' -select f1 from t1 order by f1; -f1 -insert 3.5.3.2-no -insert 3.5.3.6-no -insert 3.5.3.7-1b -trig 3.5.3.2_2-yes -trig 3.5.3.2_2-yes -trig 3.5.3.7-2a -drop trigger trg4b_1; -show grants; -Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT UPDATE ON `priv_db`.* TO 'test_yesprivs'@'localhost' -use priv_db; -create trigger trg4b_2 before UPDATE on t1 for each row -set new.f1 = 'trig 3.5.3.7-2b'; -insert into t1 (f1) values ('insert 3.5.3.7-2b'); -select f1 from t1 order by f1; -f1 -insert 3.5.3.2-no -insert 3.5.3.6-no -insert 3.5.3.7-1b -insert 3.5.3.7-2b -trig 3.5.3.2_2-yes -trig 3.5.3.2_2-yes -trig 3.5.3.7-2a -update t1 set f1 = 'update 3.5.3.7-2b' where f1 = 'insert 3.5.3.7-2b'; -select f1 from t1 order by f1; -f1 -insert 3.5.3.2-no -insert 3.5.3.6-no -insert 3.5.3.7-1b -trig 3.5.3.2_2-yes -trig 3.5.3.2_2-yes -trig 3.5.3.7-2a -trig 3.5.3.7-2b -drop trigger trg4b_2; - -Testcase 3.5.3.7c ------------------ -revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost; -grant TRIGGER on *.* to test_noprivs@localhost; -grant ALL on priv_db.t1 to test_noprivs@localhost; -revoke UPDATE on priv_db.t1 from test_noprivs@localhost; -show grants for test_noprivs; -Grants for test_noprivs@% -GRANT TRIGGER ON *.* TO 'test_noprivs'@'%' -revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; -grant TRIGGER on *.* to test_yesprivs@localhost; -grant UPDATE on priv_db.t1 to test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' -show grants; -Grants for test_noprivs@localhost -GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' -use priv_db; -create trigger trg4c_1 before INSERT on t1 for each row -set new.f1 = 'trig 3.5.3.7-1c'; -insert into t1 (f1) values ('insert 3.5.3.7-1c'); -ERROR 42000: UPDATE command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1' -select f1 from t1 order by f1; -f1 -insert 3.5.3.2-no -insert 3.5.3.6-no -insert 3.5.3.7-1b -trig 3.5.3.2_2-yes -trig 3.5.3.2_2-yes -trig 3.5.3.7-2a -trig 3.5.3.7-2b -drop trigger trg4c_1; -show grants; -Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' -use priv_db; -create trigger trg4c_2 before INSERT on t1 for each row -set new.f1 = 'trig 3.5.3.7-2c'; -insert into t1 (f1) values ('insert 3.5.3.7-2c'); -select f1 from t1 order by f1; -f1 -insert 3.5.3.2-no -insert 3.5.3.6-no -insert 3.5.3.7-1b -trig 3.5.3.2_2-yes -trig 3.5.3.2_2-yes -trig 3.5.3.7-2a -trig 3.5.3.7-2b -trig 3.5.3.7-2c -drop trigger trg4c_2; - -Testcase 3.5.3.7d: ------------------- -revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost; -grant TRIGGER on *.* to test_noprivs@localhost; -grant SELECT (f1), INSERT (f1) on priv_db.t1 to test_noprivs@localhost; -show grants for test_noprivs; -Grants for test_noprivs@% -GRANT TRIGGER ON *.* TO 'test_noprivs'@'%' -revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; -grant TRIGGER on *.* to test_yesprivs@localhost; -grant UPDATE (f1) on priv_db.t1 to test_yesprivs@localhost; -show grants for test_noprivs; -Grants for test_noprivs@% -GRANT TRIGGER ON *.* TO 'test_noprivs'@'%' -show grants; -Grants for test_noprivs@localhost -GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT (f1), INSERT (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' -use priv_db; -create trigger trg4d_1 before INSERT on t1 for each row -set new.f1 = 'trig 3.5.3.7-1d'; -insert into t1 (f1) values ('insert 3.5.3.7-1d'); -ERROR 42000: UPDATE command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1' -select f1 from t1 order by f1; -f1 -insert 3.5.3.2-no -insert 3.5.3.6-no -insert 3.5.3.7-1b -trig 3.5.3.2_2-yes -trig 3.5.3.2_2-yes -trig 3.5.3.7-2a -trig 3.5.3.7-2b -trig 3.5.3.7-2c -drop trigger trg4d_1; -show grants; -Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT UPDATE (f1) ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' -use priv_db; -create trigger trg4d_2 before INSERT on t1 for each row -set new.f1 = 'trig 3.5.3.7-2d'; -insert into t1 (f1) values ('insert 3.5.3.7-2d'); -select f1 from t1 order by f1; -f1 -insert 3.5.3.2-no -insert 3.5.3.6-no -insert 3.5.3.7-1b -trig 3.5.3.2_2-yes -trig 3.5.3.2_2-yes -trig 3.5.3.7-2a -trig 3.5.3.7-2b -trig 3.5.3.7-2c -trig 3.5.3.7-2d -drop trigger trg4d_2; - -Testcase 3.5.3.8a: ------------------- -revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost; -grant ALL on *.* to test_noprivs@localhost; -revoke SELECT on *.* from test_noprivs@localhost; -show grants for test_noprivs@localhost; -Grants for test_noprivs@localhost -GRANT INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; -grant TRIGGER, SELECT on *.* to test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT SELECT, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -select current_user; -current_user -test_noprivs@localhost -use priv_db; -show grants; -Grants for test_noprivs@localhost -GRANT INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -create trigger trg5a_1 before INSERT on t1 for each row -set @test_var = new.f1; -set @test_var = 'before trig 3.5.3.8-1a'; -select @test_var; -@test_var -before trig 3.5.3.8-1a -insert into t1 (f1) values ('insert 3.5.3.8-1a'); -ERROR 42000: SELECT command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1' -select @test_var; -@test_var -before trig 3.5.3.8-1a -drop trigger trg5a_1; -use priv_db; -select current_user; -current_user -test_yesprivs@localhost -show grants; -Grants for test_yesprivs@localhost -GRANT SELECT, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -create trigger trg5a_2 before INSERT on t1 for each row -set @test_var= new.f1; -set @test_var= 'before trig 3.5.3.8-2a'; -select @test_var; -@test_var -before trig 3.5.3.8-2a -insert into t1 (f1) values ('insert 3.5.3.8-2a'); -select @test_var; -@test_var -insert 3.5.3.8-2a -drop trigger trg5a_2; - -Testcase: 3.5.3.8b ------------------- -revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost; -grant TRIGGER on *.* to test_noprivs@localhost; -grant ALL on priv_db.* to test_noprivs@localhost; -revoke SELECT on priv_db.* from test_noprivs@localhost; -show grants for test_noprivs@localhost; -Grants for test_noprivs@localhost -GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER ON `priv_db`.* TO 'test_noprivs'@'localhost' -revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; -grant TRIGGER on *.* to test_yesprivs@localhost; -grant SELECT on priv_db.* to test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT ON `priv_db`.* TO 'test_yesprivs'@'localhost' -show grants; -Grants for test_noprivs@localhost -GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER ON `priv_db`.* TO 'test_noprivs'@'localhost' -use priv_db; -create trigger trg5b_1 before UPDATE on t1 for each row -set @test_var= new.f1; -set @test_var= 'before trig 3.5.3.8-1b'; -insert into t1 (f1) values ('insert 3.5.3.8-1b'); -select @test_var; -@test_var -before trig 3.5.3.8-1b -update t1 set f1= 'update 3.5.3.8-1b' where f1 = 'insert 3.5.3.8-1b'; -ERROR 42000: SELECT command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1' -select @test_var; -@test_var -before trig 3.5.3.8-1b -drop trigger trg5b_1; -show grants; -Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT ON `priv_db`.* TO 'test_yesprivs'@'localhost' -use priv_db; -create trigger trg5b_2 before UPDATE on t1 for each row -set @test_var= new.f1; -set @test_var= 'before trig 3.5.3.8-2b'; -insert into t1 (f1) values ('insert 3.5.3.8-2b'); -select @test_var; -@test_var -before trig 3.5.3.8-2b -update t1 set f1= 'update 3.5.3.8-2b' where f1 = 'insert 3.5.3.8-2b'; -select @test_var; -@test_var -update 3.5.3.8-2b -drop trigger trg5b_2; - -Testcase 3.5.3.8c: ------------------- -revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost; -grant TRIGGER on *.* to test_noprivs@localhost; -grant ALL on priv_db.t1 to test_noprivs@localhost; -revoke SELECT on priv_db.t1 from test_noprivs@localhost; -show grants for test_noprivs@localhost; -Grants for test_noprivs@localhost -GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' -revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; -grant TRIGGER on *.* to test_yesprivs@localhost; -grant SELECT on priv_db.t1 to test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' -show grants; -Grants for test_noprivs@localhost -GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' -use priv_db; -create trigger trg5c_1 before INSERT on t1 for each row -set @test_var= new.f1; -set @test_var= 'before trig 3.5.3.8-1c'; -insert into t1 (f1) values ('insert 3.5.3.8-1c'); -ERROR 42000: SELECT command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1' -select @test_var; -@test_var -before trig 3.5.3.8-1c -drop trigger trg5c_1; -show grants; -Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' -use priv_db; -create trigger trg5c_2 before INSERT on t1 for each row -set @test_var= new.f1; -set @test_var='before trig 3.5.3.8-2c'; -insert into t1 (f1) values ('insert 3.5.3.8-2c'); -select @test_var; -@test_var -insert 3.5.3.8-2c -drop trigger trg5c_2; - -Testcase: 3.5.3.8d: -------------------- -revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost; -grant TRIGGER on *.* to test_noprivs@localhost; -grant UPDATE (f1), INSERT (f1) on priv_db.t1 to test_noprivs@localhost; -show grants for test_noprivs@localhost; -Grants for test_noprivs@localhost -GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' -revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; -grant TRIGGER on *.* to test_yesprivs@localhost; -grant SELECT (f1) on priv_db.t1 to test_yesprivs@localhost; -show grants for test_noprivs@localhost; -Grants for test_noprivs@localhost -GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' -show grants; -Grants for test_noprivs@localhost -GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' -use priv_db; -create trigger trg5d_1 before INSERT on t1 for each row -set @test_var= new.f1; -set @test_var='before trig 3.5.3.8-1d'; -insert into t1 (f1) values ('insert 3.5.3.8-1d'); -ERROR 42000: SELECT command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1' -select @test_var; -@test_var -before trig 3.5.3.8-1d -drop trigger trg5d_1; -show grants; -Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT (f1) ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' -use priv_db; -create trigger trg5d_2 before INSERT on t1 for each row -set @test_var= new.f1; -set @test_var='before trig 3.5.3.8-2d'; -insert into t1 (f1) values ('insert 3.5.3.8-2d'); -select @test_var; -@test_var -insert 3.5.3.8-2d -drop trigger trg5d_2; - -Testcase: 3.5.3.x: ------------------- -use priv_db; -drop table if exists t1; -drop table if exists t2; -create table t1 (f1 int) engine= ; -create table t2 (f2 int) engine= ; -revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; -grant TRIGGER on *.* to test_yesprivs@localhost; -grant SELECT, UPDATE on priv_db.t1 to test_yesprivs@localhost; -grant SELECT on priv_db.t2 to test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT ON `priv_db`.`t2` TO 'test_yesprivs'@'localhost' -GRANT SELECT, UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' -select current_user; -current_user -test_yesprivs@localhost -use priv_db; -create trigger trg1 before insert on t1 for each row -insert into t2 values (new.f1); -use priv_db; -insert into t1 (f1) values (4); -ERROR 42000: INSERT command denied to user 'test_yesprivs'@'localhost' for table 't2' -revoke SELECT on priv_db.t2 from test_yesprivs@localhost; -grant INSERT on priv_db.t2 to test_yesprivs@localhost; -insert into t1 (f1) values (4); -select f1 from t1 order by f1; -f1 -4 -select f2 from t2 order by f2; -f2 -4 -use priv_db; -drop trigger trg1; -create trigger trg2 before insert on t1 for each row -update t2 set f2=new.f1-1; -use priv_db; -insert into t1 (f1) values (2); -ERROR 42000: UPDATE command denied to user 'test_yesprivs'@'localhost' for table 't2' -revoke INSERT on priv_db.t2 from test_yesprivs@localhost; -grant UPDATE on priv_db.t2 to test_yesprivs@localhost; -insert into t1 (f1) values (2); -select f1 from t1 order by f1; -f1 -2 -4 -select f2 from t2 order by f2; -f2 -1 -use priv_db; -drop trigger trg2; -create trigger trg3 before insert on t1 for each row -select f2 into @aaa from t2 where f2=new.f1; -use priv_db; -insert into t1 (f1) values (1); -ERROR 42000: SELECT command denied to user 'test_yesprivs'@'localhost' for table 't2' -revoke UPDATE on priv_db.t2 from test_yesprivs@localhost; -grant SELECT on priv_db.t2 to test_yesprivs@localhost; -insert into t1 (f1) values (1); -select f1 from t1 order by f1; -f1 -1 -2 -4 -select f2 from t2 order by f2; -f2 -1 -select @aaa; -@aaa -1 -use priv_db; -drop trigger trg3; -create trigger trg4 before insert on t1 for each row -delete from t2; -use priv_db; -insert into t1 (f1) values (1); -ERROR 42000: DELETE command denied to user 'test_yesprivs'@'localhost' for table 't2' -revoke SELECT on priv_db.t2 from test_yesprivs@localhost; -grant DELETE on priv_db.t2 to test_yesprivs@localhost; -insert into t1 (f1) values (1); -select f1 from t1 order by f1; -f1 -1 -1 -2 -4 -select f2 from t2 order by f2; -f2 -drop database if exists priv_db; -drop user test_yesprivs@localhost; -drop user test_noprivs@localhost; -drop user test_noprivs; -use test; -drop table tb3; diff --git a/mysql-test/suite/funcs_1/r/ndb_trig_03e.result b/mysql-test/suite/funcs_1/r/ndb_trig_03e.result deleted file mode 100644 index 91bd22d3c06..00000000000 --- a/mysql-test/suite/funcs_1/r/ndb_trig_03e.result +++ /dev/null @@ -1,1620 +0,0 @@ -USE test; - -Testcase for db level: ----------------------- -drop database if exists priv_db; -drop database if exists no_priv_db; -create database priv_db; -create database no_priv_db; -use priv_db; -create table t1 (f1 char(20)) engine= ndb; -create User test_yesprivs@localhost; -set password for test_yesprivs@localhost = password('PWD'); -revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; -grant select on priv_db.* to test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT ON `priv_db`.* TO 'test_yesprivs'@'localhost' -create User test_noprivs@localhost; -set password for test_noprivs@localhost = password('PWD'); -revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost; -grant select,insert on priv_db.* to test_noprivs@localhost; -show grants for test_noprivs@localhost; -Grants for test_noprivs@localhost -GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT ON `priv_db`.* TO 'test_noprivs'@'localhost' - -no trigger privilege on db level for create: --------------------------------------------- -use priv_db; -create trigger trg1_1 before INSERT on t1 for each row -set new.f1 = 'trig 1_1-no'; -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1' -use priv_db; -insert into t1 (f1) values ('insert-yes'); -select f1 from t1 order by f1; -f1 -insert-yes -select current_user; -current_user -root@localhost -grant TRIGGER on priv_db.* to test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, TRIGGER ON `priv_db`.* TO 'test_yesprivs'@'localhost' - -trigger privilege on db level for create: ------------------------------------------ -select current_user; -current_user -test_yesprivs@localhost -use priv_db; -create trigger trg1_2 before INSERT on t1 for each row -set new.f1 = 'trig 1_2-yes'; -select current_user; -current_user -test_noprivs@localhost -use priv_db; -insert into t1 (f1) values ('insert-yes'); -ERROR 42000: UPDATE command denied to user 'test_yesprivs'@'localhost' for column 'f1' in table 't1' -select f1 from t1 order by f1; -f1 -insert-yes -select current_user; -current_user -root@localhost -grant UPDATE on priv_db.* to test_yesprivs@localhost; -use priv_db; -insert into t1 (f1) values ('insert-no'); -select f1 from t1 order by f1; -f1 -insert-yes -trig 1_2-yes -select current_user; -current_user -test_noprivs@localhost -use priv_db; -insert into t1 (f1) values ('insert-yes'); -select f1 from t1 order by f1; -f1 -insert-yes -trig 1_2-yes -trig 1_2-yes -select current_user; -current_user -root@localhost -revoke TRIGGER on priv_db.* from test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, UPDATE ON `priv_db`.* TO 'test_yesprivs'@'localhost' - -no trigger privilege on db level for drop: ------------------------------------------- -select current_user; -current_user -test_yesprivs@localhost -use priv_db; -drop trigger trg1_2; -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1' -select current_user; -current_user -test_noprivs@localhost -use priv_db; - -no trigger privilege at activation time: ----------------------------------------- -insert into t1 (f1) values ('insert-yes'); -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1' -select f1 from t1 order by f1; -f1 -insert-yes -trig 1_2-yes -trig 1_2-yes - -trigger privilege at activation time: -------------------------------------- -select current_user; -current_user -root@localhost -grant TRIGGER on priv_db.* to test_yesprivs@localhost; -select current_user; -current_user -test_noprivs@localhost -use priv_db; -insert into t1 (f1) values ('insert-no'); -select f1 from t1 order by f1; -f1 -insert-yes -trig 1_2-yes -trig 1_2-yes -trig 1_2-yes - -trigger privilege on db level for drop: ---------------------------------------- -select current_user; -current_user -test_yesprivs@localhost -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, UPDATE, TRIGGER ON `priv_db`.* TO 'test_yesprivs'@'localhost' -drop trigger trg1_2; -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1' - -takes effect after use priv_db: -------------------------------- -use priv_db; -drop trigger trg1_2; -select current_user; -current_user -root@localhost -use priv_db; -insert into t1 (f1) values ('insert-yes'); -select f1 from t1 order by f1; -f1 -insert-yes -insert-yes -trig 1_2-yes -trig 1_2-yes -trig 1_2-yes - -switch to db without having trigger priv for it: ------------------------------------------------- -use no_priv_db; -create table t1 (f1 char(20)) engine= ndb; -grant SELECT,UPDATE on no_priv_db.* to test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, UPDATE, TRIGGER ON `priv_db`.* TO 'test_yesprivs'@'localhost' -GRANT SELECT, UPDATE ON `no_priv_db`.* TO 'test_yesprivs'@'localhost' - -use db with trigger privilege on db level and without...: ---------------------------------------------------------- -select current_user; -current_user -test_yesprivs@localhost -use no_priv_db; -create trigger trg1_3 before INSERT on t1 for each row -set new.f1 = 'trig 1_3-no'; -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1' -use priv_db; -create trigger trg1_3 before INSERT on t1 for each row -set new.f1 = 'trig 1_3-yes'; -use no_priv_db; -create trigger trg1_4 before UPDATE on t1 for each row -set new.f1 = 'trig 1_4-no'; -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1' -use priv_db; -create trigger trg1_4 before UPDATE on t1 for each row -set new.f1 = 'trig 1_4-yes'; -select current_user; -current_user -test_noprivs@localhost -use no_priv_db; -ERROR 42000: Access denied for user 'test_noprivs'@'localhost' to database 'no_priv_db' -insert into t1 (f1) values ('insert-yes'); -select f1 from t1 order by f1; -f1 -insert-yes -insert-yes -trig 1_2-yes -trig 1_2-yes -trig 1_2-yes -trig 1_3-yes -use priv_db; -insert into t1 (f1) values ('insert-no'); -select f1 from t1 order by f1; -f1 -insert-yes -insert-yes -trig 1_2-yes -trig 1_2-yes -trig 1_2-yes -trig 1_3-yes -trig 1_3-yes -select current_user; -current_user -test_yesprivs@localhost -use no_priv_db; -drop trigger trg1_3; -ERROR HY000: Trigger does not exist -use priv_db; -drop trigger trg1_3; -use no_priv_db; -drop trigger trg1_4; -ERROR HY000: Trigger does not exist -use priv_db; -drop trigger trg1_4; -select current_user; -current_user -root@localhost -drop table priv_db.t1; -drop table no_priv_db.t1; -drop database if exists priv_db; -drop database if exists no_priv_db; -drop user test_yesprivs@localhost; -drop user test_noprivs@localhost; - -######### Testcase for table level: ######## ---------------------------------------------------- -drop database if exists priv_db; -create database priv_db; -use priv_db; -create table t1 (f1 char(20)) engine= ndb; -create User test_yesprivs@localhost; -set password for test_yesprivs@localhost = password('PWD'); -revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; -create User test_noprivs@localhost; -set password for test_noprivs@localhost = password('PWD'); -revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost; - -no trigger privilege on table level for create: ------------------------------------------------ -select current_user; -current_user -root@localhost -show triggers; -Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation -grant select, insert, update on priv_db.t1 to test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' -grant select, update, insert on priv_db.t1 to test_noprivs@localhost; -show grants for test_noprivs@localhost; -Grants for test_noprivs@localhost -GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' -select current_user; -current_user -test_yesprivs@localhost -use priv_db; -show tables; -Tables_in_priv_db -t1 -create trigger trg1_1 before INSERT on t1 for each row -set new.f1 = 'trig 1_1-no'; -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1' -select current_user; -current_user -test_noprivs@localhost -use priv_db; -insert into t1 (f1) values ('insert1-yes'); -select f1 from t1 order by f1; -f1 -insert1-yes -select current_user; -current_user -root@localhost -show triggers; -Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation -show tables; -Tables_in_priv_db -t1 -insert into t1 (f1) values ('insert2-yes'); -select f1 from t1 order by f1; -f1 -insert1-yes -insert2-yes -grant TRIGGER on priv_db.t1 to test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' - -trigger privilege on table level for create: --------------------------------------------- -select current_user; -current_user -test_yesprivs@localhost -show triggers; -Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation -create trigger trg1_2 before INSERT on t1 for each row -set new.f1 = 'trig 1_2-yes'; -select current_user; -current_user -test_noprivs@localhost -insert into t1 (f1) values ('insert3-no'); -select f1 from t1 order by f1; -f1 -insert1-yes -insert2-yes -trig 1_2-yes -select current_user; -current_user -root@localhost -insert into t1 (f1) values ('insert4-no'); -select f1 from t1 order by f1; -f1 -insert1-yes -insert2-yes -trig 1_2-yes -trig 1_2-yes -revoke TRIGGER on priv_db.t1 from test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' - -no trigger privilege on table level for drop: ---------------------------------------------- -select current_user; -current_user -test_yesprivs@localhost -drop trigger trg1_2; -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1' - -no trigger privilege at activation time: ----------------------------------------- -select current_user; -current_user -test_noprivs@localhost -insert into t1 (f1) values ('insert5-no'); -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1' -select f1 from t1 order by f1; -f1 -insert1-yes -insert2-yes -trig 1_2-yes -trig 1_2-yes -select current_user; -current_user -root@localhost -grant TRIGGER on priv_db.t1 to test_yesprivs@localhost; - -trigger privilege at activation time: -------------------------------------- -select current_user; -current_user -test_noprivs@localhost -insert into t1 (f1) values ('insert6-no'); -select f1 from t1 order by f1; -f1 -insert1-yes -insert2-yes -trig 1_2-yes -trig 1_2-yes -trig 1_2-yes - -trigger privilege on table level for drop: ------------------------------------------- -select current_user; -current_user -test_yesprivs@localhost -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' -drop trigger trg1_2; -select current_user; -current_user -test_noprivs@localhost -insert into t1 (f1) values ('insert7-yes'); -select f1 from t1 order by f1; -f1 -insert1-yes -insert2-yes -insert7-yes -trig 1_2-yes -trig 1_2-yes -trig 1_2-yes -select current_user; -current_user -root@localhost -insert into t1 (f1) values ('insert8-yes'); -select f1 from t1 order by f1; -f1 -insert1-yes -insert2-yes -insert7-yes -insert8-yes -trig 1_2-yes -trig 1_2-yes -trig 1_2-yes - -switch to table without having trigger priv for it: ---------------------------------------------------- -create table t2 (f1 char(20)) engine= ndb; -grant SELECT, INSERT, UPDATE on priv_db.t2 to test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t2` TO 'test_yesprivs'@'localhost' -GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' -grant SELECT, INSERT, UPDATE on priv_db.t2 to test_noprivs@localhost; -show grants for test_noprivs@localhost; -Grants for test_noprivs@localhost -GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' -GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t2` TO 'test_noprivs'@'localhost' - -use table with trigger privilege and without...: ------------------------------------------------- -select current_user; -current_user -test_yesprivs@localhost -create trigger trg2_1 before INSERT on t2 for each row -set new.f1 = 'trig 2_1-no'; -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't2' -create trigger trg1_3 before INSERT on t1 for each row -set new.f1 = 'trig 1_3-yes'; -create trigger trg2_2 before UPDATE on t2 for each row -set new.f1 = 'trig 2_2-no'; -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't2' -create trigger trg1_4 before UPDATE on t1 for each row -set new.f1 = 'trig 1_4-yes'; -show triggers; -Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation -trg1_3 INSERT t1 set new.f1 = 'trig 1_3-yes' BEFORE NULL test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci -trg1_4 UPDATE t1 set new.f1 = 'trig 1_4-yes' BEFORE NULL test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci -select current_user; -current_user -test_noprivs@localhost -insert into t2 (f1) values ('insert9-yes'); -select f1 from t2 order by f1; -f1 -insert9-yes -insert into t1 (f1) values ('insert10-no'); -select f1 from t1 order by f1; -f1 -insert1-yes -insert2-yes -insert7-yes -insert8-yes -trig 1_2-yes -trig 1_2-yes -trig 1_2-yes -trig 1_3-yes -select current_user; -current_user -test_yesprivs@localhost -drop trigger trg2_1; -ERROR HY000: Trigger does not exist -drop trigger trg1_3; -drop trigger trg2_2; -ERROR HY000: Trigger does not exist -drop trigger trg1_4; -select current_user; -current_user -root@localhost -drop database if exists priv_db; -drop user test_yesprivs@localhost; -drop user test_noprivs@localhost; - -#### Testcase for mix of user(global) and db level: #### --------------------------------------------------------- -drop database if exists priv_db; -drop database if exists no_priv_db; -create database priv_db; -create database no_priv_db; -use priv_db; -create table t1 (f1 char(20)) engine= ndb; -use no_priv_db; -create table t1 (f1 char(20)) engine= ndb; -create User test_yesprivs@localhost; -set password for test_yesprivs@localhost = password('PWD'); -revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; -grant ALL on *.* to test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT ALL PRIVILEGES ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -create User test_noprivs@localhost; -set password for test_noprivs@localhost = password('PWD'); -revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost; -grant SELECT,INSERT on *.* to test_noprivs@localhost; -show grants for test_noprivs@localhost; -Grants for test_noprivs@localhost -GRANT SELECT, INSERT ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -select current_user; -current_user -test_yesprivs@localhost - -trigger privilege on user level for create: -------------------------------------------- -use priv_db; -create trigger trg1_1 before INSERT on t1 for each row -set new.f1 = 'trig 1_1-yes'; -insert into t1 (f1) values ('insert-no'); -select f1 from t1 order by f1; -f1 -trig 1_1-yes -use no_priv_db; -create trigger priv_db.trg1_5 before UPDATE on priv_db.t1 -for each row -set new.f1 = 'trig 1_5-yes'; -insert into priv_db.t1 (f1) values ('insert-no'); -select f1 from priv_db.t1 order by f1; -f1 -trig 1_1-yes -trig 1_1-yes -drop trigger priv_db.trg1_5; -select current_user; -current_user -test_noprivs@localhost -use priv_db; -insert into t1 (f1) values ('insert-no'); -select f1 from t1 order by f1; -f1 -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -select current_user; -current_user -root@localhost -use priv_db; -insert into t1 (f1) values ('insert-no'); -select f1 from t1 order by f1; -f1 -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -revoke TRIGGER on *.* from test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -select current_user; -current_user -test_yesprivs@localhost -use priv_db; -show triggers; -Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation -select * from information_schema.triggers; -TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION -drop trigger trg1_1; -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1' -select current_user; -current_user -root@localhost -show grants; -Grants for root@localhost -GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION -drop trigger trg1_1; -use priv_db; - -no trigger privilege on db level for create: --------------------------------------------- -select current_user; -current_user -test_yesprivs@localhost -create trigger trg1_1 before INSERT on t1 for each row -set new.f1 = 'trig 1_1-no'; -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1' -select current_user; -current_user -test_noprivs@localhost -use priv_db; -insert into t1 (f1) values ('insert-yes'); -select f1 from t1 order by f1; -f1 -insert-yes -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -select current_user; -current_user -root@localhost -grant TRIGGER on priv_db.* to test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT TRIGGER ON `priv_db`.* TO 'test_yesprivs'@'localhost' - -trigger privilege on db level for create: ------------------------------------------ -select current_user; -current_user -test_yesprivs@localhost -use priv_db; -create trigger trg1_2 before INSERT on t1 for each row -set new.f1 = 'trig 1_2-yes'; -create trigger no_priv_db.trg1_9 before insert on no_priv_db.t1 -for each row -set new.f1 = 'trig 1_9-yes'; -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1' -use no_priv_db; -create trigger trg1_2 before INSERT on t1 for each row -set new.f1 = 'trig 1_2-no'; -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1' -create trigger priv_db.trg1_9 before UPDATE on priv_db.t1 -for each row -set new.f1 = 'trig 1_9-yes'; -select current_user; -current_user -test_noprivs@localhost -use priv_db; -insert into t1 (f1) values ('insert-yes'); -select f1 from t1 order by f1; -f1 -insert-yes -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -trig 1_2-yes -use no_priv_db; -insert into t1 (f1) values ('insert-yes'); -select f1 from t1 order by f1; -f1 -insert-yes -drop trigger priv_db.trg1_9; -ERROR 42000: TRIGGER command denied to user 'test_noprivs'@'localhost' for table 't1' -select current_user; -current_user -root@localhost -drop trigger priv_db.trg1_9; -revoke TRIGGER on priv_db.* from test_yesprivs@localhost; -use priv_db; -insert into t1 (f1) values ('insert-yes'); -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1' -select f1 from t1 order by f1; -f1 -insert-yes -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -trig 1_2-yes -grant TRIGGER on *.* to test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT ALL PRIVILEGES ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -select current_user; -current_user -test_yesprivs@localhost -use no_priv_db; -create trigger trg1_2 before INSERT on t1 for each row -set new.f1 = 'trig 1_2-no'; -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1' -select current_user; -current_user -test_noprivs@localhost -use priv_db; -insert into t1 (f1) values ('insert-no'); -select f1 from t1 order by f1; -f1 -insert-yes -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -trig 1_2-yes -trig 1_2-yes -use no_priv_db; -insert into t1 (f1) values ('insert-yes'); -select f1 from t1 order by f1; -f1 -insert-yes -insert-yes -select current_user; -current_user -test_yesprivs@localhost -use no_priv_db; -create trigger trg1_2 before INSERT on t1 for each row -set new.f1 = 'trig 1_2-yes'; -select current_user; -current_user -test_noprivs@localhost -use priv_db; -insert into t1 (f1) values ('insert-no'); -select f1 from t1 order by f1; -f1 -insert-yes -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -trig 1_2-yes -trig 1_2-yes -trig 1_2-yes -use no_priv_db; -insert into t1 (f1) values ('insert-no'); -select f1 from t1 order by f1; -f1 -insert-yes -insert-yes -trig 1_2-yes -select current_user; -current_user -root@localhost -drop database if exists priv_db; -drop database if exists no_priv_db; -drop database if exists h1; -drop user test_yesprivs@localhost; -drop user test_noprivs@localhost; - -####### Testcase for mix of db and table level: ####### -------------------------------------------------------- -drop database if exists priv1_db; -drop database if exists priv2_db; -create database priv1_db; -create database priv2_db; -use priv1_db; -create table t1 (f1 char(20)) engine= ndb; -create table t2 (f1 char(20)) engine= ndb; -use priv2_db; -create table t1 (f1 char(20)) engine= ndb; -create User test_yesprivs@localhost; -set password for test_yesprivs@localhost = password('PWD'); -revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; -grant ALL on priv1_db.* to test_yesprivs@localhost; -grant SELECT,UPDATE on priv2_db.* to test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT ALL PRIVILEGES ON `priv1_db`.* TO 'test_yesprivs'@'localhost' -GRANT SELECT, UPDATE ON `priv2_db`.* TO 'test_yesprivs'@'localhost' -create User test_noprivs@localhost; -set password for test_noprivs@localhost = password('PWD'); -revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost; -grant SELECT,INSERT,UPDATE on priv1_db.* to test_noprivs@localhost; -grant SELECT,INSERT on priv2_db.* to test_noprivs@localhost; -show grants for test_noprivs@localhost; -Grants for test_noprivs@localhost -GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE ON `priv1_db`.* TO 'test_noprivs'@'localhost' -GRANT SELECT, INSERT ON `priv2_db`.* TO 'test_noprivs'@'localhost' -use priv1_db; -use priv1_db; - -trigger privilege on one db1 db level, not on db2 -------------------------------------------------- -select current_user; -current_user -test_yesprivs@localhost -use priv1_db; -create trigger trg1_1 before INSERT on t1 for each row -set new.f1 = 'trig 1_1-yes'; -create trigger trg2_1 before INSERT on t2 for each row -set new.f1 = 'trig 2_1-yes'; -use priv2_db; -create trigger trg1_1 before INSERT on t1 for each row -set new.f1 = 'trig1_1-yes'; -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1' -select current_user; -current_user -test_noprivs@localhost -insert into t1 (f1) values ('insert1_no'); -select f1 from t1 order by f1; -f1 -trig 1_1-yes -insert into t2 (f1) values ('insert1_no'); -select f1 from t2 order by f1; -f1 -trig 2_1-yes -insert into priv2_db.t1 (f1) values ('insert21-yes'); -select f1 from priv2_db.t1 order by f1; -f1 -insert21-yes -use priv2_db; -insert into t1 (f1) values ('insert1_yes'); -select f1 from t1 order by f1; -f1 -insert1_yes -insert21-yes -insert into priv1_db.t1 (f1) values ('insert11-no'); -select f1 from priv1_db.t1 order by f1; -f1 -trig 1_1-yes -trig 1_1-yes -insert into priv1_db.t2 (f1) values ('insert22-no'); -select f1 from priv1_db.t2 order by f1; -f1 -trig 2_1-yes -trig 2_1-yes - -revoke trigger privilege on table level (not existing) ------------------------------------------------------- -select current_user; -current_user -root@localhost -use priv1_db; -revoke TRIGGER on priv1_db.t1 from test_yesprivs@localhost; -ERROR 42000: There is no such grant defined for user 'test_yesprivs' on host 'localhost' on table 't1' -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT ALL PRIVILEGES ON `priv1_db`.* TO 'test_yesprivs'@'localhost' -GRANT SELECT, UPDATE ON `priv2_db`.* TO 'test_yesprivs'@'localhost' -select current_user; -current_user -test_yesprivs@localhost -drop trigger trg1_1; -ERROR HY000: Trigger does not exist -drop trigger trg2_1; -ERROR HY000: Trigger does not exist -use priv1_db; -drop trigger trg1_1; -drop trigger trg2_1; -select current_user; -current_user -root@localhost -use priv1_db; -revoke TRIGGER on priv1_db.* from test_yesprivs@localhost; - -no trigger privilege on table level for create: ------------------------------------------------ -select current_user; -current_user -test_yesprivs@localhost -use priv1_db; -create trigger trg1_1 before INSERT on t1 for each row -set new.f1 = 'trig 1_1-no'; -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1' -select current_user; -current_user -root@localhost -show triggers; -Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation -grant TRIGGER on priv1_db.t1 to test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT ON `priv1_db`.* TO 'test_yesprivs'@'localhost' -GRANT SELECT, UPDATE ON `priv2_db`.* TO 'test_yesprivs'@'localhost' -GRANT TRIGGER ON `priv1_db`.`t1` TO 'test_yesprivs'@'localhost' - -trigger privilege on table level for create: --------------------------------------------- -select current_user; -current_user -test_yesprivs@localhost -show triggers; -Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation -create trigger trg1_2 before INSERT on t1 for each row -set new.f1 = 'trig 1_2-yes'; -create trigger trg2_1 before INSERT on t2 for each row -set new.f1 = 'trig 2_1-no'; -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't2' -select current_user; -current_user -test_noprivs@localhost -use priv1_db; -insert into t1 (f1) values ('insert2-no'); -select f1 from t1 order by f1; -f1 -trig 1_1-yes -trig 1_1-yes -trig 1_2-yes -insert into t2 (f1) values ('insert2-yes'); -select f1 from t2 order by f1; -f1 -insert2-yes -trig 2_1-yes -trig 2_1-yes -insert into priv2_db.t1 (f1) values ('insert22-yes'); -select f1 from priv2_db.t1 order by f1; -f1 -insert1_yes -insert21-yes -insert22-yes -select current_user; -current_user -root@localhost -grant TRIGGER on priv1_db.* to test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT ALL PRIVILEGES ON `priv1_db`.* TO 'test_yesprivs'@'localhost' -GRANT SELECT, UPDATE ON `priv2_db`.* TO 'test_yesprivs'@'localhost' -GRANT TRIGGER ON `priv1_db`.`t1` TO 'test_yesprivs'@'localhost' -select current_user; -current_user -test_yesprivs@localhost -create trigger trg2_1 before INSERT on t2 for each row -set new.f1 = 'trig 2_1-yes'; -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't2' -use priv1_db; -create trigger trg2_1 before INSERT on t2 for each row -set new.f1 = 'trig 2_1-yes'; -select current_user; -current_user -test_noprivs@localhost -use priv1_db; -insert into t1 (f1) values ('insert3-no'); -select f1 from t1 order by f1; -f1 -trig 1_1-yes -trig 1_1-yes -trig 1_2-yes -trig 1_2-yes -insert into t2 (f1) values ('insert3-no'); -select f1 from t2 order by f1; -f1 -insert2-yes -trig 2_1-yes -trig 2_1-yes -trig 2_1-yes -use priv2_db; -insert into priv1_db.t1 (f1) values ('insert12-no'); -select f1 from priv1_db.t1 order by f1; -f1 -trig 1_1-yes -trig 1_1-yes -trig 1_2-yes -trig 1_2-yes -trig 1_2-yes -insert into priv1_db.t2 (f1) values ('insert23-no'); -select f1 from priv1_db.t2 order by f1; -f1 -insert2-yes -trig 2_1-yes -trig 2_1-yes -trig 2_1-yes -trig 2_1-yes -select current_user; -current_user -test_yesprivs@localhost -drop trigger trg1_2; -drop trigger trg2_1; -select current_user; -current_user -root@localhost -drop database if exists priv1_db; -drop database if exists priv2_db; -drop user test_yesprivs@localhost; -drop user test_noprivs@localhost; - -#### Testcase for trigger privilege on execution time ######## --------------------------------------------------------------- -drop database if exists priv_db; -create database priv_db; -use priv_db; -create table t1 (f1 char(20)) engine= ndb; -create User test_yesprivs@localhost; -set password for test_yesprivs@localhost = password('PWD'); -create User test_useprivs@localhost; -set password for test_useprivs@localhost = password('PWD'); -revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; -revoke ALL PRIVILEGES, GRANT OPTION FROM test_useprivs@localhost; -select current_user; -current_user -root@localhost -show triggers; -Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation -grant select, insert, update ,trigger -on priv_db.t1 to test_yesprivs@localhost -with grant option; -grant select -on priv_db.t1 to test_useprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' WITH GRANT OPTION -select current_user; -current_user -test_yesprivs@localhost -use priv_db; -create trigger trg1_1 before INSERT on t1 for each row -set new.f1 = 'trig 1_1-yes'; -grant insert on t1 to test_useprivs@localhost; -prepare ins1 from 'insert into t1 (f1) values (''insert1-no'')'; -execute ins1; -select f1 from t1 order by f1; -f1 -trig 1_1-yes -prepare ins1 from 'insert into t1 (f1) values (''insert2-no'')'; -select current_user; -current_user -test_useprivs@localhost -use priv_db; -prepare ins1 from 'insert into t1 (f1) values (''insert3-no'')'; -execute ins1; -select f1 from t1 order by f1; -f1 -trig 1_1-yes -trig 1_1-yes -select current_user; -current_user -root@localhost -revoke TRIGGER on priv_db.t1 from test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' WITH GRANT OPTION -select current_user; -current_user -test_yesprivs@localhost -execute ins1; -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1' -select f1 from t1 order by f1; -f1 -trig 1_1-yes -trig 1_1-yes -prepare ins1 from 'insert into t1 (f1) values (''insert4-no'')'; -select current_user; -current_user -test_useprivs@localhost -prepare ins1 from 'insert into t1 (f1) values (''insert5-no'')'; -execute ins1; -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1' -select f1 from t1 order by f1; -f1 -trig 1_1-yes -trig 1_1-yes -select current_user; -current_user -root@localhost -grant TRIGGER on priv_db.t1 to test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' WITH GRANT OPTION -select current_user; -current_user -test_yesprivs@localhost -execute ins1; -select f1 from t1 order by f1; -f1 -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -prepare ins1 from 'insert into t1 (f1) values (''insert6-no'')'; -select current_user; -current_user -test_useprivs@localhost -execute ins1; -select f1 from t1 order by f1; -f1 -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -prepare ins1 from 'insert into t1 (f1) values (''insert7-no'')'; -select current_user; -current_user -root@localhost -revoke TRIGGER on priv_db.t1 from test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' WITH GRANT OPTION -select current_user; -current_user -test_yesprivs@localhost -execute ins1; -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1' -select f1 from t1 order by f1; -f1 -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -select current_user; -current_user -test_useprivs@localhost -execute ins1; -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1' -select f1 from t1 order by f1; -f1 -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -select current_user; -current_user -root@localhost -grant TRIGGER on priv_db.t1 to test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' WITH GRANT OPTION -select current_user; -current_user -test_yesprivs@localhost -execute ins1; -select f1 from t1 order by f1; -f1 -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -select current_user; -current_user -test_useprivs@localhost -execute ins1; -select f1 from t1 order by f1; -f1 -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -select current_user; -current_user -root@localhost -revoke TRIGGER on priv_db.t1 from test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' WITH GRANT OPTION -select current_user; -current_user -test_yesprivs@localhost -execute ins1; -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1' -select f1 from t1 order by f1; -f1 -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -deallocate prepare ins1; -select current_user; -current_user -test_useprivs@localhost -execute ins1; -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1' -select f1 from t1 order by f1; -f1 -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -deallocate prepare ins1; -select current_user; -current_user -root@localhost -grant TRIGGER on priv_db.t1 to test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' WITH GRANT OPTION -select current_user; -current_user -test_yesprivs@localhost -drop trigger trg1_1; -select current_user; -current_user -root@localhost -select current_user; -current_user -root@localhost -drop database if exists priv_db; -drop user test_yesprivs@localhost; -drop user test_useprivs@localhost; - -######### Testcase for definer: ######## ------------------------------------------------ -drop database if exists priv_db; -create database priv_db; -use priv_db; -create table t1 (f1 char(20)) engine= ndb; -create User test_yesprivs@localhost; -set password for test_yesprivs@localhost = password('PWD'); -revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; -select current_user; -current_user -root@localhost -create definer=not_ex_user@localhost trigger trg1_0 -before INSERT on t1 for each row -set new.f1 = 'trig 1_0-yes'; -Warnings: -Note 1449 The user specified as a definer ('not_ex_user'@'localhost') does not exist -drop trigger trg1_0; -create definer=test_yesprivs@localhost trigger trg1_0 -before INSERT on t1 for each row -set new.f1 = 'trig 1_0-yes'; -grant select, insert, update -on priv_db.t1 to test_yesprivs@localhost; -select current_user; -current_user -test_yesprivs@localhost -use priv_db; -insert into t1 (f1) values ('insert-no'); -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1' -select f1 from t1 order by f1; -f1 -drop trigger trg1_0; -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1' -select current_user; -current_user -root@localhost -grant select, insert, update ,trigger -on priv_db.t1 to test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' -select current_user; -current_user -test_yesprivs@localhost -insert into t1 (f1) values ('insert-no'); -select f1 from t1 order by f1; -f1 -trig 1_0-yes -drop trigger trg1_0; -create definer=not_ex_user@localhost trigger trg1_0 -before INSERT on t1 for each row -set new.f1 = 'trig 1_0-yes'; -ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation -create definer=current_user trigger trg1_1 -before INSERT on t1 for each row -set new.f1 = 'trig 1_1-yes'; -insert into t1 (f1) values ('insert-no'); -select f1 from t1 order by f1; -f1 -trig 1_0-yes -trig 1_1-yes -create definer=test_yesprivs@localhost trigger trg1_2 -before UPDATE on t1 for each row -set new.f1 = 'trig 1_2-yes'; -update t1 set f1 = 'update-yes' where f1 like '%trig%'; -select f1 from t1 order by f1; -f1 -trig 1_2-yes -trig 1_2-yes -select current_user; -current_user -root@localhost -grant trigger on priv_db.* to test_yesprivs@localhost -with grant option; -select current_user; -current_user -test_yesprivs@localhost -show grants; -Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT TRIGGER ON `priv_db`.* TO 'test_yesprivs'@'localhost' WITH GRANT OPTION -GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' -create definer=not_ex_user@localhost trigger trg1_3 -after UPDATE on t1 for each row -set @var1 = 'trig 1_3-yes'; -ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation -select current_user; -current_user -root@localhost -select current_user; -current_user -root@localhost -drop database if exists priv_db; -drop user test_yesprivs@localhost; - -######### Testcase for transactions: ######## ----------------------------------------------------- -drop database if exists priv_db; -create database priv_db; -use priv_db; -create table t1 (f1 char(20)) engine= ndb; -create User test_yesprivs@localhost; -set password for test_yesprivs@localhost = password('PWD'); -revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; -select current_user; -current_user -root@localhost -grant select, insert, update ,trigger -on priv_db.t1 to test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' -select current_user; -current_user -test_yesprivs@localhost -use priv_db; -set autocommit=0; -create definer=current_user trigger trg1_1 -before INSERT on t1 for each row -set new.f1 = 'trig 1_1-yes'; -rollback work; -insert into t1 (f1) values ('insert-no'); -select f1 from t1 order by f1; -f1 -trig 1_1-yes -create definer=test_yesprivs@localhost trigger trg1_2 -before UPDATE on t1 for each row -set new.f1 = 'trig 1_2-yes'; -commit work; -update t1 set f1 = 'update-yes' where f1 like '%trig%'; -select f1 from t1 order by f1; -f1 -trig 1_2-yes -commit work; -drop trigger trg1_1; -rollback work; -drop trigger trg1_1; -ERROR HY000: Trigger does not exist -drop trigger trg1_2; -commit work; -set autocommit=1; -select current_user; -current_user -root@localhost -select current_user; -current_user -root@localhost -drop database if exists priv_db; -drop user test_yesprivs@localhost; - -####### Testcase for column privileges of triggers: ####### ------------------------------------------------------------ -drop database if exists priv_db; -drop database if exists no_priv_db; -create database priv_db; -use priv_db; -create table t1 (f1 char(20)) engine= ndb; -create table t2 (f1 char(20)) engine= ndb; -create User test_yesprivs@localhost; -set password for test_yesprivs@localhost = password('PWD'); -revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; -grant TRIGGER on priv_db.* to test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT TRIGGER ON `priv_db`.* TO 'test_yesprivs'@'localhost' -create User test_noprivs@localhost; -set password for test_noprivs@localhost = password('PWD'); -revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost; -grant SELECT,UPDATE on priv_db.* to test_noprivs@localhost; -show grants for test_noprivs@localhost; -Grants for test_noprivs@localhost -GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, UPDATE ON `priv_db`.* TO 'test_noprivs'@'localhost' - -update only on column: ----------------------- -select current_user; -current_user -root@localhost -grant SELECT(f1),INSERT,UPDATE(f1) on priv_db.t1 -to test_yesprivs@localhost; -grant SELECT(f1),INSERT,UPDATE(f1) on priv_db.t2 -to test_yesprivs@localhost; -select current_user; -current_user -test_yesprivs@localhost -use priv_db; -insert into t1 (f1) values ('insert1-yes'); -insert into t2 (f1) values ('insert1-yes'); -create trigger trg1_1 before UPDATE on t1 for each row -set new.f1 = 'trig 1_1-yes'; -create trigger trg2_1 before UPDATE on t2 for each row -set new.f1 = 'trig 2_1-yes'; -select current_user; -current_user -test_noprivs@localhost -use priv_db; -select f1 from t1 order by f1; -f1 -insert1-yes -update t1 set f1 = 'update1_no' - where f1 like '%insert%'; -select f1 from t1 order by f1; -f1 -trig 1_1-yes -select f1 from t2 order by f1; -f1 -insert1-yes -update t2 set f1 = 'update1_no' - where f1 like '%insert%'; -select f1 from t2 order by f1; -f1 -trig 2_1-yes -select current_user; -current_user -root@localhost -revoke UPDATE on priv_db.* -from test_yesprivs@localhost; -revoke UPDATE(f1) on priv_db.t2 -from test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT TRIGGER ON `priv_db`.* TO 'test_yesprivs'@'localhost' -GRANT SELECT (f1), INSERT ON `priv_db`.`t2` TO 'test_yesprivs'@'localhost' -GRANT SELECT (f1), INSERT, UPDATE (f1) ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' -select current_user; -current_user -test_yesprivs@localhost -use priv_db; -insert into t1 (f1) values ('insert2-yes'); -insert into t2 (f1) values ('insert2-yes'); -select current_user; -current_user -test_noprivs@localhost -use priv_db; -update t1 set f1 = 'update2_no' - where f1 like '%insert%'; -update t2 set f1 = 'update2_no' - where f1 like '%insert%'; -ERROR 42000: UPDATE command denied to user 'test_yesprivs'@'localhost' for column 'f1' in table 't2' -update t1 set f1 = 'update3_no' - where f1 like '%insert%'; -update t2 set f1 = 'update3_no' - where f1 like '%insert%'; -ERROR 42000: UPDATE command denied to user 'test_yesprivs'@'localhost' for column 'f1' in table 't2' -select f1 from t1 order by f1; -f1 -trig 1_1-yes -trig 1_1-yes -select f1 from t2 order by f1; -f1 -insert2-yes -trig 2_1-yes - -check if access only on one of three columns --------------------------------------------- -select current_user; -current_user -root@localhost -alter table priv_db.t1 add f2 char(20), add f3 int; -revoke TRIGGER on priv_db.* from test_yesprivs@localhost; -grant TRIGGER,SELECT on priv_db.t1 to test_yesprivs@localhost; -grant UPDATE on priv_db.t2 to test_yesprivs@localhost; -select current_user; -current_user -test_yesprivs@localhost -use priv_db; -insert into t1 values ('insert2-yes','insert2-yes',1); -insert into t1 values ('insert3-yes','insert3-yes',2); -select * from t1 order by f1; -f1 f2 f3 -insert2-yes insert2-yes 1 -insert3-yes insert3-yes 2 -trig 1_1-yes NULL NULL -trig 1_1-yes NULL NULL -select current_user; -current_user -test_noprivs@localhost -use priv_db; -update t1 set f1 = 'update4-no', -f2 = 'update4-yes', -f3 = f3*10 -where f2 like '%yes'; -select * from t1 order by f1,f2,f3; -f1 f2 f3 -trig 1_1-yes NULL NULL -trig 1_1-yes NULL NULL -trig 1_1-yes update4-yes 10 -trig 1_1-yes update4-yes 20 -select current_user; -current_user -test_yesprivs@localhost -create trigger trg1_2 after UPDATE on t1 for each row -set @f2 = 'trig 1_2-yes'; -select current_user; -current_user -test_noprivs@localhost -update t1 set f1 = 'update5-yes', -f2 = 'update5-yes' - where f2 like '%yes'; -select * from t1 order by f1,f2,f3; -f1 f2 f3 -trig 1_1-yes NULL NULL -trig 1_1-yes NULL NULL -trig 1_1-yes update5-yes 10 -trig 1_1-yes update5-yes 20 -select @f2; -@f2 -trig 1_2-yes -update t1 set f1 = 'update6_no' - where f1 like '%insert%'; -update t2 set f1 = 'update6_no' - where f1 like '%insert%'; -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't2' -update t1 set f1 = 'update7_no' - where f1 like '%insert%'; -update t2 set f1 = 'update7_no' - where f1 like '%insert%'; -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't2' -select f1 from t1 order by f1; -f1 -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -select f1 from t2 order by f1; -f1 -insert2-yes -trig 2_1-yes - -check if rejected without trigger privilege: --------------------------------------------- -select current_user; -current_user -root@localhost -revoke TRIGGER on priv_db.t1 from test_yesprivs@localhost; -select current_user; -current_user -test_noprivs@localhost -update t1 set f1 = 'update8-no', -f2 = 'update8-no' - where f2 like '%yes'; -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1' -select * from t1 order by f1,f2,f3; -f1 f2 f3 -trig 1_1-yes NULL NULL -trig 1_1-yes NULL NULL -trig 1_1-yes update5-yes 10 -trig 1_1-yes update5-yes 20 -select @f2; -@f2 -trig 1_2-yes - -check trigger, but not update privilege on column: --------------------------------------------------- -select current_user; -current_user -root@localhost -revoke UPDATE(f1) on priv_db.t1 from test_yesprivs@localhost; -grant TRIGGER,UPDATE(f2),UPDATE(f3) on priv_db.t1 -to test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT (f1), INSERT, UPDATE ON `priv_db`.`t2` TO 'test_yesprivs'@'localhost' -GRANT SELECT, SELECT (f1), INSERT, UPDATE (f3, f2), TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' -select current_user; -current_user -test_yesprivs@localhost -use priv_db; -drop trigger trg1_1; -create trigger trg1_3 before UPDATE on t1 for each row -set new.f1 = 'trig 1_3-yes'; -select current_user; -current_user -test_noprivs@localhost -use priv_db; -update t1 set f1 = 'update9-no', -f2 = 'update9-no' - where f2 like '%yes'; -ERROR 42000: UPDATE command denied to user 'test_yesprivs'@'localhost' for column 'f1' in table 't1' -select * from t1 order by f1,f2,f3; -f1 f2 f3 -trig 1_1-yes NULL NULL -trig 1_1-yes NULL NULL -trig 1_1-yes update5-yes 10 -trig 1_1-yes update5-yes 20 -update t1 set f3= f3+1; -ERROR 42000: UPDATE command denied to user 'test_yesprivs'@'localhost' for column 'f1' in table 't1' -select f3 from t1 order by f3; -f3 -NULL -NULL -10 -20 -select current_user; -current_user -root@localhost -revoke TRIGGER on priv_db.t1 from test_yesprivs@localhost; -grant UPDATE(f1),UPDATE(f2),UPDATE(f3) on priv_db.t1 -to test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT (f1), INSERT, UPDATE ON `priv_db`.`t2` TO 'test_yesprivs'@'localhost' -GRANT SELECT, SELECT (f1), INSERT, UPDATE (f3, f2, f1) ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' -select current_user; -current_user -test_noprivs@localhost -use priv_db; -update t1 set f3= f3+1; -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1' -select f3 from t1 order by f3; -f3 -NULL -NULL -10 -20 - -##### trigger privilege on column level? ####### ------------------------------------------------- -grant TRIGGER(f1) on priv_db.t1 to test_yesprivs@localhost; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(f1) on priv_db.t1 to test_yesprivs@localhost' at line 1 -select current_user; -current_user -root@localhost -drop database if exists priv_db; -drop user test_yesprivs@localhost; -drop user test_noprivs@localhost; diff --git a/mysql-test/suite/funcs_1/r/ndb_trig_0407.result b/mysql-test/suite/funcs_1/r/ndb_trig_0407.result deleted file mode 100644 index 8597f252e54..00000000000 --- a/mysql-test/suite/funcs_1/r/ndb_trig_0407.result +++ /dev/null @@ -1,470 +0,0 @@ -USE test; -drop table if exists tb3; -create table tb3 ( -f118 char not null DEFAULT 'a', -f119 char binary not null DEFAULT b'101', -f120 char ascii not null DEFAULT b'101', -f121 char(50), -f122 char(50), -f129 binary not null DEFAULT b'101', -f130 tinyint not null DEFAULT 99, -f131 tinyint unsigned not null DEFAULT 99, -f132 tinyint zerofill not null DEFAULT 99, -f133 tinyint unsigned zerofill not null DEFAULT 99, -f134 smallint not null DEFAULT 999, -f135 smallint unsigned not null DEFAULT 999, -f136 smallint zerofill not null DEFAULT 999, -f137 smallint unsigned zerofill not null DEFAULT 999, -f138 mediumint not null DEFAULT 9999, -f139 mediumint unsigned not null DEFAULT 9999, -f140 mediumint zerofill not null DEFAULT 9999, -f141 mediumint unsigned zerofill not null DEFAULT 9999, -f142 int not null DEFAULT 99999, -f143 int unsigned not null DEFAULT 99999, -f144 int zerofill not null DEFAULT 99999, -f145 int unsigned zerofill not null DEFAULT 99999, -f146 bigint not null DEFAULT 999999, -f147 bigint unsigned not null DEFAULT 999999, -f148 bigint zerofill not null DEFAULT 999999, -f149 bigint unsigned zerofill not null DEFAULT 999999, -f150 decimal not null DEFAULT 999.999, -f151 decimal unsigned not null DEFAULT 999.17, -f152 decimal zerofill not null DEFAULT 999.999, -f153 decimal unsigned zerofill, -f154 decimal (0), -f155 decimal (64), -f156 decimal (0) unsigned, -f157 decimal (64) unsigned, -f158 decimal (0) zerofill, -f159 decimal (64) zerofill, -f160 decimal (0) unsigned zerofill, -f161 decimal (64) unsigned zerofill, -f162 decimal (0,0), -f163 decimal (63,30), -f164 decimal (0,0) unsigned, -f165 decimal (63,30) unsigned, -f166 decimal (0,0) zerofill, -f167 decimal (63,30) zerofill, -f168 decimal (0,0) unsigned zerofill, -f169 decimal (63,30) unsigned zerofill, -f170 numeric, -f171 numeric unsigned, -f172 numeric zerofill, -f173 numeric unsigned zerofill, -f174 numeric (0), -f175 numeric (64) -) engine = ; -Warnings: -Note 1265 Data truncated for column 'f150' at row 1 -Note 1265 Data truncated for column 'f151' at row 1 -Note 1265 Data truncated for column 'f152' at row 1 - -Testcase: 3.5: --------------- -create User test_general@localhost; -set password for test_general@localhost = password('PWD'); -revoke ALL PRIVILEGES, GRANT OPTION FROM test_general@localhost; -create User test_super@localhost; -set password for test_super@localhost = password('PWD'); -grant ALL on *.* to test_super@localhost with grant OPTION; - -Testcase 3.5.4: ---------------- -use test; - -Testcase 3.5.4.1: ------------------ -create database db_drop; -Use db_drop; -create table t1 (f1 char(30)) engine = ; -grant INSERT, SELECT on db_drop.t1 to test_general; -Use db_drop; -Create trigger trg1 BEFORE INSERT on t1 -for each row set new.f1='Trigger 3.5.4.1'; -Use db_drop; -Insert into t1 values ('Insert error 3.5.4.1'); -Select * from t1 order by f1; -f1 -Trigger 3.5.4.1 -drop trigger trg1; -select trigger_schema, trigger_name, event_object_table -from information_schema.triggers -where trigger_schema = 'db_drop' - order by trigger_name; -trigger_schema trigger_name event_object_table -Insert into t1 values ('Insert no trigger 3.5.4.1'); -Select * from t1 order by f1; -f1 -Insert no trigger 3.5.4.1 -Trigger 3.5.4.1 -drop trigger trg1; -drop database if exists db_drop; -revoke ALL PRIVILEGES, GRANT OPTION FROM 'test_general'@'localhost'; - -Testcase 3.5.4.2: ------------------ -create database db_drop2; -Use db_drop2; -drop table if exists t1_432 ; -create table t1_432 (f1 char (30)) engine = ; -Drop trigger tr_does_not_exit; -ERROR HY000: Trigger does not exist -drop table if exists t1_432 ; -drop database if exists db_drop2; - -Testcase 3.5.4.3: ------------------ -create database db_drop3; -Use db_drop3; -drop table if exists t1_433 ; -drop table if exists t1_433a ; -create table t1_433 (f1 char (30)) engine = ; -create table t1_433a (f1a char (5)) engine = ; -CREATE TRIGGER trg3 BEFORE INSERT on t1_433 for each row -set new.f1 = 'Trigger 3.5.4.3'; -Drop trigger t1.433.trg3; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.trg3' at line 1 -Drop trigger db_drop3.t1.433.trg3; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.433.trg3' at line 1 -Drop trigger mysql.trg3; -ERROR HY000: Trigger does not exist -Drop trigger tbx.trg3; -ERROR HY000: Trigger does not exist -Drop trigger db_drop3.trg3; -drop table if exists t1_433; -drop table if exists t1_433a; -drop database if exists db_drop3; - -Testcase 3.5.4.4: ------------------ -create database db_drop4; -Use db_drop4; -create table t1 (f1 char(30)) engine = ; -grant INSERT, SELECT on db_drop4.t1 to test_general; -Create trigger trg4 BEFORE INSERT on t1 -for each row set new.f1='Trigger 3.5.4.4'; -Use db_drop4; -Insert into t1 values ('Insert 3.5.4.4'); -Select * from t1; -f1 -Trigger 3.5.4.4 -Drop database db_drop4; -Show databases like 'db_drop4'; -Database (db_drop4) -select trigger_schema, trigger_name, event_object_table -from information_schema.triggers -where information_schema.triggers.trigger_name='trg4'; -trigger_schema trigger_name event_object_table -create database db_drop4; -Use db_drop4; -create table t1 (f1 char(30)) engine = ; -grant INSERT, SELECT on db_drop4.t1 to test_general; -Insert into t1 values ('2nd Insert 3.5.4.4'); -Select * from t1; -f1 -2nd Insert 3.5.4.4 -drop trigger trg4; -ERROR HY000: Trigger does not exist -drop database if exists db_drop4; -revoke ALL PRIVILEGES, GRANT OPTION FROM 'test_general'@'localhost'; - -Testcase 3.5.4.5: ------------------ -create database db_drop5; -Use db_drop5; -create table t1 (f1 char(50)) engine = ; -grant INSERT, SELECT on t1 to test_general; -Create trigger trg5 BEFORE INSERT on t1 -for each row set new.f1='Trigger 3.5.4.5'; -Use db_drop5; -Insert into t1 values ('Insert 3.5.4.5'); -Select * from t1; -f1 -Trigger 3.5.4.5 -Drop table t1; -Show tables; -Tables_in_db_drop5 -select trigger_schema, trigger_name, event_object_table -from information_schema.triggers -where information_schema.triggers.trigger_name='trg5'; -trigger_schema trigger_name event_object_table -create table t1 (f1 char(50)) engine = ; -grant INSERT, SELECT on t1 to test_general; -Insert into t1 values ('2nd Insert 3.5.4.5'); -Select * from t1; -f1 -2nd Insert 3.5.4.5 -drop trigger trg5; -ERROR HY000: Trigger does not exist -drop database if exists db_drop5; -revoke ALL PRIVILEGES, GRANT OPTION FROM 'test_general'@'localhost'; - -Testcase 3.5.5: ---------------- -use test; - -Testcase 3.5.5.1: ------------------ -Create trigger trg1 before INSERT on t100 for each row set new.f2=1000; -ERROR 42S02: Table 'test.t100' doesn't exist - -Testcase 3.5.5.2: ------------------ -Create temporary table t1_temp (f1 bigint signed, f2 bigint unsigned); -Create trigger trg2 before INSERT -on t1_temp for each row set new.f2=9999; -ERROR HY000: Trigger's 't1_temp' is view or temporary table -drop table t1_temp; - -Testcase 3.5.5.3: ------------------ -Create view vw3 as select f118 from tb3; -Create trigger trg3 before INSERT -on vw3 for each row set new.f118='s'; -ERROR HY000: 'test.vw3' is not BASE TABLE -drop view vw3; - -Testcase 3.5.5.4: ------------------ -create database dbtest_one; -create database dbtest_two; -use dbtest_two; -create table t2 (f1 char(15)) engine = ; -use dbtest_one; -create trigger trg4 before INSERT -on dbtest_two.t2 for each row set new.f1='trig 3.5.5.4'; -ERROR HY000: Trigger in wrong schema -grant INSERT, SELECT on dbtest_two.t2 to test_general; -grant SELECT on dbtest_one.* to test_general; -use dbtest_two; -Insert into t2 values ('1st Insert 3.5.5.4'); -Warnings: -Warning 1265 Data truncated for column 'f1' at row 1 -Select * from t2; -f1 -1st Insert 3.5. -use dbtest_one; -Insert into dbtest_two.t2 values ('2nd Insert 3.5.5.4'); -Warnings: -Warning 1265 Data truncated for column 'f1' at row 1 -Select * from dbtest_two.t2 order by f1; -f1 -1st Insert 3.5. -2nd Insert 3.5. -revoke ALL PRIVILEGES, GRANT OPTION FROM 'test_general'@'localhost'; -DROP DATABASE if exists dbtest_one; -drop database if EXISTS dbtest_two; - -Testcase 3.5.6: ---------------- -use test; - -Testcase 3.5.6.1 (see Testcase 3.5.1.1) ---------------------------------------- - -Testcase 3.5.6.2 (see Testcase 3.5.1.1) ---------------------------------------- - -Testcase 3.5.6.3: ------------------ -Create trigger trg3_1 DURING UPDATE on tb3 for each row set new.f132=25; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DURING UPDATE on tb3 for each row set new.f132=25' at line 1 -Create trigger trg3_2 TIME INSERT on tb3 for each row set new.f132=15; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TIME INSERT on tb3 for each row set new.f132=15' at line 1 -drop trigger tb3.trg3_1; -drop trigger tb3.trg3_2; - -Testcase 3.5.6.4 (see Testcase 3.5.1.1) ---------------------------------------- - -Testcase 3.5.6.5 (see Testcase 3.5.1.1) ---------------------------------------- - -Testcase 3.5.7.1 (see Testcase 3.5.1.1) ---------------------------------------- - -Testcase 3.5.7.2 (see Testcase 3.5.1.1) ---------------------------------------- - -Testcase 3.5.7.3 (see Testcase 3.5.1.1) ---------------------------------------- - -Testcase 3.5.7.4: ------------------ -Create trigger trg4_1 BEFORE SELECT on tb3 for each row set new.f132=5; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT on tb3 for each row set new.f132=5' at line 1 -Create trigger trg4_2 AFTER VALUE on tb3 for each row set new.f132=1; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VALUE on tb3 for each row set new.f132=1' at line 1 -drop trigger tb3.trg4_1; -drop trigger tb3.trg4_2; - -Testcase 3.5.7.5 / 3.5.7.6: ---------------------------- -Create trigger trg5_1 BEFORE INSERT -on tb3 for each row set new.f122='Trigger1 3.5.7.5/6'; -Create trigger trg5_2 BEFORE INSERT -on tb3 for each row set new.f122='Trigger2 3.5.7.5'; -ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table' -Insert into tb3 (f121,f122) values ('Test 3.5.7.5/6','Insert 3.5.7.5'); -Select f121,f122 from tb3 where f121='Test 3.5.7.5/6'; -f121 f122 -Test 3.5.7.5/6 Trigger1 3.5.7.5/6 -update tb3 set f122='Update 3.5.7.6' where f121= 'Test 3.5.7.5/6'; -Select f121,f122 from tb3 where f121='Test 3.5.7.5/6'; -f121 f122 -Test 3.5.7.5/6 Update 3.5.7.6 -drop trigger trg5_1; -drop trigger trg5_2; -delete from tb3 where f121='Test 3.5.7.5/6'; - -Testcase 3.5.7.7 / 3.5.7.8: ---------------------------- -set @test_var='Before trig 3.5.7.7'; -Create trigger trg6_1 AFTER INSERT -on tb3 for each row set @test_var='Trigger1 3.5.7.7/8'; -Create trigger trg6_2 AFTER INSERT -on tb3 for each row set @test_var='Trigger2 3.5.7.7'; -ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table' -select @test_var; -@test_var -Before trig 3.5.7.7 -Insert into tb3 (f121,f122) values ('Test 3.5.7.7/8','Insert 3.5.7.7'); -Select f121,f122 from tb3 where f121='Test 3.5.7.7/8'; -f121 f122 -Test 3.5.7.7/8 Insert 3.5.7.7 -select @test_var; -@test_var -Trigger1 3.5.7.7/8 -update tb3 set f122='Update 3.5.7.8' where f121= 'Test 3.5.7.7/8'; -Select f121,f122 from tb3 where f121='Test 3.5.7.7/8'; -f121 f122 -Test 3.5.7.7/8 Update 3.5.7.8 -select @test_var; -@test_var -Trigger1 3.5.7.7/8 -drop trigger trg6_1; -drop trigger trg6_2; -delete from tb3 where f121='Test 3.5.7.7/8'; - -Testcase 3.5.7.9/10: --------------------- -Create trigger trg7_1 BEFORE UPDATE -on tb3 for each row set new.f122='Trigger1 3.5.7.9/10'; -Create trigger trg7_2 BEFORE UPDATE -on tb3 for each row set new.f122='Trigger2 3.5.7.9'; -ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table' -Insert into tb3 (f121,f122) values ('Test 3.5.7.9/10','Insert 3.5.7.9'); -Select f121,f122 from tb3 where f121='Test 3.5.7.9/10'; -f121 f122 -Test 3.5.7.9/10 Insert 3.5.7.9 -update tb3 set f122='update 3.5.7.10' where f121='Test 3.5.7.9/10'; -Select f121,f122 from tb3 where f121='Test 3.5.7.9/10'; -f121 f122 -Test 3.5.7.9/10 Trigger1 3.5.7.9/10 -drop trigger trg7_1; -drop trigger trg7_2; -delete from tb3 where f121='Test 3.5.7.9/10'; - -Testcase 3.5.7.11/12: ---------------------- -set @test_var='Before trig 3.5.7.11'; -Create trigger trg8_1 AFTER UPDATE -on tb3 for each row set @test_var='Trigger 3.5.7.11/12'; -Create trigger trg8_2 AFTER UPDATE -on tb3 for each row set @test_var='Trigger2 3.5.7.11'; -ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table' -select @test_var; -@test_var -Before trig 3.5.7.11 -Insert into tb3 (f121,f122) values ('Test 3.5.7.11/12','Insert 3.5.7.11/12'); -select @test_var; -@test_var -Before trig 3.5.7.11 -Select f121,f122 from tb3 where f121='Test 3.5.7.11/12'; -f121 f122 -Test 3.5.7.11/12 Insert 3.5.7.11/12 -update tb3 set f122='update 3.5.7.12' where f121='Test 3.5.7.11/12'; -Select f121,f122 from tb3 where f121='Test 3.5.7.11/12'; -f121 f122 -Test 3.5.7.11/12 update 3.5.7.12 -select @test_var; -@test_var -Trigger 3.5.7.11/12 -delete from tb3 where f121='Test 3.5.7.11/12'; -drop trigger trg8_1; -drop trigger trg8_2; -delete from tb3 where f121='Test 3.5.7.11/12'; - -Testcase 3.5.7.13/14: ---------------------- -set @test_var=1; -Create trigger trg9_1 BEFORE DELETE -on tb3 for each row set @test_var=@test_var+1; -Create trigger trg9_2 BEFORE DELETE -on tb3 for each row set @test_var=@test_var+10; -ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table' -select @test_var; -@test_var -1 -Insert into tb3 (f121,f122) values ('Test 3.5.7.13/14','Insert 3.5.7.13'); -Select f121,f122 from tb3 where f121='Test 3.5.7.13/14'; -f121 f122 -Test 3.5.7.13/14 Insert 3.5.7.13 -select @test_var; -@test_var -1 -delete from tb3 where f121='Test 3.5.7.13/14'; -Select f121,f122 from tb3 where f121='Test 3.5.7.13/14'; -f121 f122 -select @test_var; -@test_var -2 -delete from tb3 where f121='Test 3.5.7.13/14'; -select @test_var; -@test_var -2 -drop trigger trg9_1; -drop trigger trg9_2; -delete from tb3 where f121='Test 3.5.7.13/14'; - -Testcase 3.5.7.15/16: ---------------------- -set @test_var=1; -Create trigger trg_3_406010_1 AFTER DELETE -on tb3 for each row set @test_var=@test_var+5; -Create trigger trg_3_406010_2 AFTER DELETE -on tb3 for each row set @test_var=@test_var+50; -ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table' -Create trigger trg_3_406010_1 AFTER INSERT -on tb3 for each row set @test_var=@test_var+1; -ERROR HY000: Trigger already exists -select @test_var; -@test_var -1 -Insert into tb3 (f121,f122) values ('Test 3.5.7.15/16','Insert 3.5.7.15/16'); -Select f121,f122 from tb3 where f121='Test 3.5.7.15/16'; -f121 f122 -Test 3.5.7.15/16 Insert 3.5.7.15/16 -select @test_var; -@test_var -1 -delete from tb3 where f121='Test 3.5.7.15/16'; -Select f121,f122 from tb3 where f121='Test 3.5.7.15/16'; -f121 f122 -select @test_var; -@test_var -6 -delete from tb3 where f121='Test 3.5.7.15/16'; -select @test_var; -@test_var -6 -drop trigger trg_3_406010_1; -drop trigger trg_3_406010_2; -delete from tb3 where f121='Test 3.5.7.15/16'; - -Testcase 3.5.7.17 (see Testcase 3.5.1.1) ----------------------------------------- -drop user test_general@localhost; -drop user test_general; -drop user test_super@localhost; -DROP TABLE test.tb3; diff --git a/mysql-test/suite/funcs_1/r/ndb_trig_08.result b/mysql-test/suite/funcs_1/r/ndb_trig_08.result deleted file mode 100644 index b2b38694680..00000000000 --- a/mysql-test/suite/funcs_1/r/ndb_trig_08.result +++ /dev/null @@ -1,527 +0,0 @@ -USE test; -drop table if exists tb3; -create table tb3 ( -f118 char not null DEFAULT 'a', -f119 char binary not null DEFAULT b'101', -f120 char ascii not null DEFAULT b'101', -f121 char(50), -f122 char(50), -f129 binary not null DEFAULT b'101', -f130 tinyint not null DEFAULT 99, -f131 tinyint unsigned not null DEFAULT 99, -f132 tinyint zerofill not null DEFAULT 99, -f133 tinyint unsigned zerofill not null DEFAULT 99, -f134 smallint not null DEFAULT 999, -f135 smallint unsigned not null DEFAULT 999, -f136 smallint zerofill not null DEFAULT 999, -f137 smallint unsigned zerofill not null DEFAULT 999, -f138 mediumint not null DEFAULT 9999, -f139 mediumint unsigned not null DEFAULT 9999, -f140 mediumint zerofill not null DEFAULT 9999, -f141 mediumint unsigned zerofill not null DEFAULT 9999, -f142 int not null DEFAULT 99999, -f143 int unsigned not null DEFAULT 99999, -f144 int zerofill not null DEFAULT 99999, -f145 int unsigned zerofill not null DEFAULT 99999, -f146 bigint not null DEFAULT 999999, -f147 bigint unsigned not null DEFAULT 999999, -f148 bigint zerofill not null DEFAULT 999999, -f149 bigint unsigned zerofill not null DEFAULT 999999, -f150 decimal not null DEFAULT 999.999, -f151 decimal unsigned not null DEFAULT 999.17, -f152 decimal zerofill not null DEFAULT 999.999, -f153 decimal unsigned zerofill, -f154 decimal (0), -f155 decimal (64), -f156 decimal (0) unsigned, -f157 decimal (64) unsigned, -f158 decimal (0) zerofill, -f159 decimal (64) zerofill, -f160 decimal (0) unsigned zerofill, -f161 decimal (64) unsigned zerofill, -f162 decimal (0,0), -f163 decimal (63,30), -f164 decimal (0,0) unsigned, -f165 decimal (63,30) unsigned, -f166 decimal (0,0) zerofill, -f167 decimal (63,30) zerofill, -f168 decimal (0,0) unsigned zerofill, -f169 decimal (63,30) unsigned zerofill, -f170 numeric, -f171 numeric unsigned, -f172 numeric zerofill, -f173 numeric unsigned zerofill, -f174 numeric (0), -f175 numeric (64) -) engine = ; -Warnings: -Note 1265 Data truncated for column 'f150' at row 1 -Note 1265 Data truncated for column 'f151' at row 1 -Note 1265 Data truncated for column 'f152' at row 1 - -Testcase: 3.5: --------------- -create User test_general@localhost; -set password for test_general@localhost = password('PWD'); -revoke ALL PRIVILEGES, GRANT OPTION FROM test_general@localhost; -create User test_super@localhost; -set password for test_super@localhost = password('PWD'); -grant ALL on *.* to test_super@localhost with grant OPTION; - -Testcase 3.5.8.1: (implied in previous tests) ---------------------------------------------- - -Testcase 3.5.8.2: (implied in previous tests) ---------------------------------------------- - -Testcase 3.5.8.3/4: -------------------- -create database db_test; -grant SELECT, INSERT, UPDATE, DELETE on db_test.* to test_general; -grant LOCK TABLES on db_test.* to test_general; -Use db_test; -create table t1_i ( -i120 char ascii not null DEFAULT b'101', -i136 smallint zerofill not null DEFAULT 999, -i144 int zerofill not null DEFAULT 99999, -i163 decimal (63,30)) engine=; -create table t1_u ( -u120 char ascii not null DEFAULT b'101', -u136 smallint zerofill not null DEFAULT 999, -u144 int zerofill not null DEFAULT 99999, -u163 decimal (63,30)) engine=; -create table t1_d ( -d120 char ascii not null DEFAULT b'101', -d136 smallint zerofill not null DEFAULT 999, -d144 int zerofill not null DEFAULT 99999, -d163 decimal (63,30)) engine=; -Insert into t1_u values ('a',111,99999,999.99); -Insert into t1_u values ('b',222,99999,999.99); -Insert into t1_u values ('c',333,99999,999.99); -Insert into t1_u values ('d',222,99999,999.99); -Insert into t1_u values ('e',222,99999,999.99); -Insert into t1_u values ('f',333,99999,999.99); -Insert into t1_d values ('a',111,99999,999.99); -Insert into t1_d values ('b',222,99999,999.99); -Insert into t1_d values ('c',333,99999,999.99); -Insert into t1_d values ('d',444,99999,999.99); -Insert into t1_d values ('e',222,99999,999.99); -Insert into t1_d values ('f',222,99999,999.99); - -3.5.8.4 - multiple SQL ----------------------- -use test; -Create trigger trg1 AFTER INSERT on tb3 for each row -BEGIN -insert into db_test.t1_i -values (new.f120, new.f136, new.f144, new.f163); -update db_test.t1_u -set u144=new.f144, u163=new.f163 -where u136=new.f136; -delete from db_test.t1_d where d136= new.f136; -select sum(db_test.t1_u.u163) into @test_var from db_test.t1_u -where u136= new.f136; -END// -Use test; -set @test_var=0; -Insert into tb3 (f120, f122, f136, f144, f163) -values ('1', 'Test 3.5.8.4', 222, 23456, 1.05); -Select f120, f122, f136, f144, f163 from tb3 where f122= 'Test 3.5.8.4'; -f120 f122 f136 f144 f163 -1 Test 3.5.8.4 00222 0000023456 1.050000000000000000000000000000 -select * from db_test.t1_i; -i120 i136 i144 i163 -1 00222 0000023456 1.050000000000000000000000000000 -select * from db_test.t1_u; -u120 u136 u144 u163 -a 00111 0000099999 999.990000000000000000000000000000 -b 00222 0000023456 1.050000000000000000000000000000 -c 00333 0000099999 999.990000000000000000000000000000 -d 00222 0000023456 1.050000000000000000000000000000 -e 00222 0000023456 1.050000000000000000000000000000 -f 00333 0000099999 999.990000000000000000000000000000 -select * from db_test.t1_d; -d120 d136 d144 d163 -a 00111 0000099999 999.990000000000000000000000000000 -c 00333 0000099999 999.990000000000000000000000000000 -d 00444 0000099999 999.990000000000000000000000000000 -select @test_var; -@test_var -3.150000000000000000000000000000 - -3.5.8.4 - single SQL - insert ------------------------------ -Create trigger trg2 BEFORE UPDATE on tb3 for each row -BEGIN -insert into db_test.t1_i -values (new.f120, new.f136, new.f144, new.f163); -END// -Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%'; -f120 f122 f136 f144 f163 -1 Test 3.5.8.4 00222 0000023456 1.050000000000000000000000000000 -select * from db_test.t1_i order by i120; -i120 i136 i144 i163 -1 00222 0000023456 1.050000000000000000000000000000 -update tb3 set f120='I', f122='Test 3.5.8.4-Single Insert' - where f122='Test 3.5.8.4'; -Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%'; -f120 f122 f136 f144 f163 -I Test 3.5.8.4-Single Insert 00222 0000023456 1.050000000000000000000000000000 -select * from db_test.t1_i order by i120; -i120 i136 i144 i163 -1 00222 0000023456 1.050000000000000000000000000000 -I 00222 0000023456 1.050000000000000000000000000000 - -3.5.8.4 - single SQL - update ------------------------------ -drop trigger trg2; -Create trigger trg3 BEFORE UPDATE on tb3 for each row -update db_test.t1_u -set u120=new.f120 -where u136=new.f136; -update tb3 set f120='U', f122='Test 3.5.8.4-Single Update' - where f122='Test 3.5.8.4-Single Insert'; -Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%'; -f120 f122 f136 f144 f163 -U Test 3.5.8.4-Single Update 00222 0000023456 1.050000000000000000000000000000 -select * from db_test.t1_u order by u120; -u120 u136 u144 u163 -a 00111 0000099999 999.990000000000000000000000000000 -c 00333 0000099999 999.990000000000000000000000000000 -f 00333 0000099999 999.990000000000000000000000000000 -U 00222 0000023456 1.050000000000000000000000000000 -U 00222 0000023456 1.050000000000000000000000000000 -U 00222 0000023456 1.050000000000000000000000000000 - -3.5.8.3/4 - single SQL - delete -------------------------------- -drop trigger trg3; -Create trigger trg4 AFTER UPDATE on tb3 for each row -delete from db_test.t1_d where d136= new.f136; -update tb3 set f120='D', f136=444, -f122='Test 3.5.8.4-Single Delete' - where f122='Test 3.5.8.4-Single Update'; -Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%'; -f120 f122 f136 f144 f163 -D Test 3.5.8.4-Single Delete 00444 0000023456 1.050000000000000000000000000000 -select * from db_test.t1_d order by d120; -d120 d136 d144 d163 -a 00111 0000099999 999.990000000000000000000000000000 -c 00333 0000099999 999.990000000000000000000000000000 - -3.5.8.3/4 - single SQL - select -------------------------------- -drop trigger trg4; -Create trigger trg5 AFTER UPDATE on tb3 for each row -select sum(db_test.t1_u.u163) into @test_var from db_test.t1_u -where u136= new.f136; -set @test_var=0; -update tb3 set f120='S', f136=111, -f122='Test 3.5.8.4-Single Select' - where f122='Test 3.5.8.4-Single Delete'; -Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%'; -f120 f122 f136 f144 f163 -S Test 3.5.8.4-Single Select 00111 0000023456 1.050000000000000000000000000000 -select @test_var; -@test_var -999.990000000000000000000000000000 -drop trigger trg1; -drop trigger trg5; -drop database if exists db_test; -delete from tb3 where f122 like 'Test 3.5.8.4%'; -revoke ALL PRIVILEGES, GRANT OPTION FROM 'test_general'@'localhost'; - -Testcase 3.5.8.5 (IF): ----------------------- -create trigger trg2 before insert on tb3 for each row -BEGIN -IF new.f120='1' then -set @test_var='one', new.f120='2'; -ELSEIF new.f120='2' then -set @test_var='two', new.f120='3'; -ELSEIF new.f120='3' then -set @test_var='three', new.f120='4'; -END IF; -IF (new.f120='4') and (new.f136=10) then -set @test_var2='2nd if', new.f120='d'; -ELSE -set @test_var2='2nd else', new.f120='D'; -END IF; -END// -set @test_var='Empty', @test_var2=0; -Insert into tb3 (f120, f122, f136) values ('1', 'Test 3.5.8.5-if', 101); -select f120, f122, f136, @test_var, @test_var2 -from tb3 where f122 = 'Test 3.5.8.5-if' order by f136; -f120 f122 f136 @test_var @test_var2 -D Test 3.5.8.5-if 00101 one 2nd else -Insert into tb3 (f120, f122, f136) values ('2', 'Test 3.5.8.5-if', 102); -select f120, f122, f136, @test_var, @test_var2 -from tb3 where f122 = 'Test 3.5.8.5-if' order by f136; -f120 f122 f136 @test_var @test_var2 -D Test 3.5.8.5-if 00101 two 2nd else -D Test 3.5.8.5-if 00102 two 2nd else -Insert into tb3 (f120, f122, f136) values ('3', 'Test 3.5.8.5-if', 10); -select f120, f122, f136, @test_var, @test_var2 -from tb3 where f122 = 'Test 3.5.8.5-if' order by f136; -f120 f122 f136 @test_var @test_var2 -d Test 3.5.8.5-if 00010 three 2nd if -D Test 3.5.8.5-if 00101 three 2nd if -D Test 3.5.8.5-if 00102 three 2nd if -Insert into tb3 (f120, f122, f136) values ('3', 'Test 3.5.8.5-if', 103); -select f120, f122, f136, @test_var, @test_var2 -from tb3 where f122 = 'Test 3.5.8.5-if' order by f136; -f120 f122 f136 @test_var @test_var2 -d Test 3.5.8.5-if 00010 three 2nd else -D Test 3.5.8.5-if 00101 three 2nd else -D Test 3.5.8.5-if 00102 three 2nd else -D Test 3.5.8.5-if 00103 three 2nd else -create trigger trg3 before update on tb3 for each row -BEGIN -ELSEIF new.f120='2' then -END IF; -END// -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ELSEIF new.f120='2' then -END IF; -END' at line 3 -drop trigger trg3// -create trigger trg4 before update on tb3 for each row -BEGIN -IF (new.f120='4') and (new.f136=10) then -set @test_var2='2nd if', new.f120='d'; -ELSE -set @test_var2='2nd else', new.f120='D'; -END// -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 7 -drop trigger trg4; -drop trigger trg2; -delete from tb3 where f121='Test 3.5.8.5-if'; - -Testcase 3.5.8.5-case: ----------------------- -create trigger trg3 before insert on tb3 for each row -BEGIN -SET new.f120=char(ascii(new.f120)-32); -CASE -when new.f136<100 then set new.f136=new.f136+120; -when new.f136<10 then set new.f144=777; -when new.f136>100 then set new.f120=new.f136-1; -END case; -CASE -when new.f136=200 then set @test_var=CONCAT(new.f120, '='); -ELSE set @test_var=concat(new.f120, '*'); -END case; -CASE new.f144 -when 1 then set @test_var=concat(@test_var, 'one'); -when 2 then set @test_var=concat(@test_var, 'two'); -when 3 then set @test_var=concat(@test_var, 'three'); -when 4 then set @test_var=concat(@test_var, 'four'); -when 5 then set @test_var=concat(@test_var, 'five'); -when 6 then set @test_var=concat(@test_var, 'six'); -when 7 then set @test_var=concat(@test_var, 'seven'); -when 8 then set @test_var=concat(@test_var, 'eight'); -when 9 then set @test_var=concat(@test_var, 'nine'); -when 10 then set @test_var=concat(@test_var, 'ten'); -when 11 then set @test_var=concat(@test_var, 'eleven'); -when 12 then set @test_var=concat(@test_var, 'twelve'); -when 13 then set @test_var=concat(@test_var, 'thirteen'); -when 14 then set @test_var=concat(@test_var, 'fourteen'); -when 15 then set @test_var=concat(@test_var, 'fifteen'); -ELSE set @test_var=CONCAT(new.f120, '*', new.f144); -END case; -END// -set @test_var='Empty'; -Insert into tb3 (f120, f122, f136, f144) -values ('a', 'Test 3.5.8.5-case', 5, 7); -select f120, f122, f136, f144, @test_var -from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; -f120 f122 f136 f144 @test_var -A Test 3.5.8.5-case 00125 0000000007 A*seven -Insert into tb3 (f120, f122, f136, f144) -values ('b', 'Test 3.5.8.5-case', 71,16); -select f120, f122, f136, f144, @test_var -from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; -f120 f122 f136 f144 @test_var -A Test 3.5.8.5-case 00125 0000000007 B*0000000016 -B Test 3.5.8.5-case 00191 0000000016 B*0000000016 -Insert into tb3 (f120, f122, f136, f144) -values ('c', 'Test 3.5.8.5-case', 80,1); -select f120, f122, f136, f144, @test_var -from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; -f120 f122 f136 f144 @test_var -A Test 3.5.8.5-case 00125 0000000007 C=one -B Test 3.5.8.5-case 00191 0000000016 C=one -C Test 3.5.8.5-case 00200 0000000001 C=one -Insert into tb3 (f120, f122, f136) -values ('d', 'Test 3.5.8.5-case', 152); -Warnings: -Warning 1265 Data truncated for column 'f120' at row 1 -select f120, f122, f136, f144, @test_var -from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; -f120 f122 f136 f144 @test_var -1 Test 3.5.8.5-case 00152 0000099999 1*0000099999 -A Test 3.5.8.5-case 00125 0000000007 1*0000099999 -B Test 3.5.8.5-case 00191 0000000016 1*0000099999 -C Test 3.5.8.5-case 00200 0000000001 1*0000099999 -Insert into tb3 (f120, f122, f136, f144) -values ('e', 'Test 3.5.8.5-case', 200, 8); -Warnings: -Warning 1265 Data truncated for column 'f120' at row 1 -select f120, f122, f136, f144, @test_var -from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; -f120 f122 f136 f144 @test_var -1 Test 3.5.8.5-case 00152 0000099999 1=eight -1 Test 3.5.8.5-case 00200 0000000008 1=eight -A Test 3.5.8.5-case 00125 0000000007 1=eight -B Test 3.5.8.5-case 00191 0000000016 1=eight -C Test 3.5.8.5-case 00200 0000000001 1=eight -Insert into tb3 (f120, f122, f136, f144) -values ('f', 'Test 3.5.8.5-case', 100, 8); -select f120, f122, f136, f144, @test_var -from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; -f120 f122 f136 f144 @test_var -1 Test 3.5.8.5-case 00152 0000099999 1=eight -1 Test 3.5.8.5-case 00200 0000000008 1=eight -A Test 3.5.8.5-case 00125 0000000007 1=eight -B Test 3.5.8.5-case 00191 0000000016 1=eight -C Test 3.5.8.5-case 00200 0000000001 1=eight -create trigger trg3a before update on tb3 for each row -BEGIN -CASE -when new.f136<100 then set new.f120='p'; -END// -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 5 -drop trigger trg3a; -drop trigger trg3; -delete from tb3 where f121='Test 3.5.8.5-case'; - -Testcase 3.5.8.5-loop/leave: ----------------------------- -Create trigger trg4 after insert on tb3 for each row -BEGIN -set @counter=0, @flag='Initial'; -Label1: loop -if new.f136 new.f136 END REPEAT rp_label; -END// -set @counter1= 0, @counter2= 0; -Insert into tb3 (f122, f136) -values ('Test 3.5.8.5-repeat', 13); -select @counter1, @counter2; -@counter1 @counter2 -15 8 -Create trigger trg6_2 after update on tb3 for each row -BEGIN -REPEAT -SET @counter2 = @counter2 + 1; -END// -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'END' at line 5 -drop trigger trg6; -delete from tb3 where f122='Test 3.5.8.5-repeat'; - -Testcase 3.5.8.5-while: ------------------------ -Create trigger trg7 after insert on tb3 for each row -wl_label: WHILE @counter1 < new.f136 DO -SET @counter1 = @counter1 + 1; -IF (@counter1 MOD 2 = 0) THEN ITERATE wl_label; -END IF; -SET @counter2 = @counter2 + 1; -END WHILE wl_label// -set @counter1= 0, @counter2= 0; -Insert into tb3 (f122, f136) -values ('Test 3.5.8.5-while', 7); -select @counter1, @counter2; -@counter1 @counter2 -7 4 -Create trigger trg7_2 after update on tb3 for each row -BEGIN -WHILE @counter1 < new.f136 -SET @counter1 = @counter1 + 1; -END// -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SET @counter1 = @counter1 + 1; -END' at line 4 -delete from tb3 where f122='Test 3.5.8.5-while'; -drop trigger trg7; - -Testcase 3.5.8.6: (requirement void) ------------------------------------- -CREATE PROCEDURE sp_01 () BEGIN set @v1=1; END// -CREATE TRIGGER trg8_1 BEFORE UPDATE ON tb3 FOR EACH ROW -BEGIN -CALL sp_01 (); -END// -Insert into tb3 (f120, f122, f136) values ('6', 'Test 3.5.8.6-insert', 101); -update tb3 set f120='S', f136=111, -f122='Test 3.5.8.6-tr8_1' - where f122='Test 3.5.8.6-insert'; -select f120, f122 -from tb3 where f122 like 'Test 3.5.8.6%' order by f120; -f120 f122 -S Test 3.5.8.6-tr8_1 -DROP TRIGGER trg8_1; -DROP PROCEDURE sp_01; - -Testcase 3.5.8.7 ----------------- -Create trigger trg9_1 before update on tb3 for each row -BEGIN -Start transaction; -Set new.f120='U'; -Commit; -END// -ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger. -Create trigger trg9_2 before delete on tb3 for each row -BEGIN -Start transaction; -Set @var2=old.f120; -Rollback; -END// -ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger. -drop user test_general@localhost; -drop user test_general; -drop user test_super@localhost; -DROP TABLE test.tb3; diff --git a/mysql-test/suite/funcs_1/r/ndb_trig_09.result b/mysql-test/suite/funcs_1/r/ndb_trig_09.result deleted file mode 100644 index 986506b4e71..00000000000 --- a/mysql-test/suite/funcs_1/r/ndb_trig_09.result +++ /dev/null @@ -1,269 +0,0 @@ -USE test; -drop table if exists tb3; -create table tb3 ( -f118 char not null DEFAULT 'a', -f119 char binary not null DEFAULT b'101', -f120 char ascii not null DEFAULT b'101', -f121 char(50), -f122 char(50), -f129 binary not null DEFAULT b'101', -f130 tinyint not null DEFAULT 99, -f131 tinyint unsigned not null DEFAULT 99, -f132 tinyint zerofill not null DEFAULT 99, -f133 tinyint unsigned zerofill not null DEFAULT 99, -f134 smallint not null DEFAULT 999, -f135 smallint unsigned not null DEFAULT 999, -f136 smallint zerofill not null DEFAULT 999, -f137 smallint unsigned zerofill not null DEFAULT 999, -f138 mediumint not null DEFAULT 9999, -f139 mediumint unsigned not null DEFAULT 9999, -f140 mediumint zerofill not null DEFAULT 9999, -f141 mediumint unsigned zerofill not null DEFAULT 9999, -f142 int not null DEFAULT 99999, -f143 int unsigned not null DEFAULT 99999, -f144 int zerofill not null DEFAULT 99999, -f145 int unsigned zerofill not null DEFAULT 99999, -f146 bigint not null DEFAULT 999999, -f147 bigint unsigned not null DEFAULT 999999, -f148 bigint zerofill not null DEFAULT 999999, -f149 bigint unsigned zerofill not null DEFAULT 999999, -f150 decimal not null DEFAULT 999.999, -f151 decimal unsigned not null DEFAULT 999.17, -f152 decimal zerofill not null DEFAULT 999.999, -f153 decimal unsigned zerofill, -f154 decimal (0), -f155 decimal (64), -f156 decimal (0) unsigned, -f157 decimal (64) unsigned, -f158 decimal (0) zerofill, -f159 decimal (64) zerofill, -f160 decimal (0) unsigned zerofill, -f161 decimal (64) unsigned zerofill, -f162 decimal (0,0), -f163 decimal (63,30), -f164 decimal (0,0) unsigned, -f165 decimal (63,30) unsigned, -f166 decimal (0,0) zerofill, -f167 decimal (63,30) zerofill, -f168 decimal (0,0) unsigned zerofill, -f169 decimal (63,30) unsigned zerofill, -f170 numeric, -f171 numeric unsigned, -f172 numeric zerofill, -f173 numeric unsigned zerofill, -f174 numeric (0), -f175 numeric (64) -) engine = ; -Warnings: -Note 1265 Data truncated for column 'f150' at row 1 -Note 1265 Data truncated for column 'f151' at row 1 -Note 1265 Data truncated for column 'f152' at row 1 -load data infile '/std_data/funcs_1/memory_tb3.txt' -into table tb3; - -Testcase 3.5.9.1/2: -------------------- -Create trigger trg1 BEFORE UPDATE on tb3 for each row -set new.f142 = 94087, @counter=@counter+1; -TotalRows -10 -Affected -9 -NotAffected -1 -NewValuew -0 -set @counter=0; -Update tb3 Set f142='1' where f130<100; -select count(*) as ExpectedChanged, @counter as TrigCounter -from tb3 where f142=94087; -ExpectedChanged TrigCounter -9 9 -select count(*) as ExpectedNotChange from tb3 -where f130<100 and f142<>94087; -ExpectedNotChange -0 -select count(*) as NonExpectedChanged from tb3 -where f130>=130 and f142=94087; -NonExpectedChanged -0 -drop trigger trg1; - -Testcase 3.5.9.3: ------------------ -Create trigger trg2_a before update on tb3 for each row -set @tr_var_b4_118=old.f118, @tr_var_b4_121=old.f121, -@tr_var_b4_122=old.f122, @tr_var_b4_136=old.f136, -@tr_var_b4_163=old.f163; -Create trigger trg2_b after update on tb3 for each row -set @tr_var_af_118=old.f118, @tr_var_af_121=old.f121, -@tr_var_af_122=old.f122, @tr_var_af_136=old.f136, -@tr_var_af_163=old.f163; -Create trigger trg2_c before delete on tb3 for each row -set @tr_var_b4_118=old.f118, @tr_var_b4_121=old.f121, -@tr_var_b4_122=old.f122, @tr_var_b4_136=old.f136, -@tr_var_b4_163=old.f163; -Create trigger trg2_d after delete on tb3 for each row -set @tr_var_af_118=old.f118, @tr_var_af_121=old.f121, -@tr_var_af_122=old.f122, @tr_var_af_136=old.f136, -@tr_var_af_163=old.f163; -@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_163 -0 0 0 0 0 -@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_163 -0 0 0 0 0 -Insert into tb3 (f122, f136, f163) -values ('Test 3.5.9.3', 7, 123.17); -Update tb3 Set f136=8 where f122='Test 3.5.9.3'; -select f118, f121, f122, f136, f163 from tb3 where f122='Test 3.5.9.3' order by f136; -f118 f121 f122 f136 f163 -a NULL Test 3.5.9.3 00008 123.170000000000000000000000000000 -select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122, -@tr_var_b4_136, @tr_var_b4_163; -@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_163 -a NULL Test 3.5.9.3 7 123.170000000000000000000000000000 -select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122, -@tr_var_af_136, @tr_var_af_163; -@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_163 -a NULL Test 3.5.9.3 7 123.170000000000000000000000000000 -@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_163 -0 0 0 0 0 -@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_163 -0 0 0 0 0 -delete from tb3 where f122='Test 3.5.9.3'; -select f118, f121, f122, f136, f163 from tb3 where f122='Test 3.5.9.3' order by f136; -f118 f121 f122 f136 f163 -select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122, -@tr_var_b4_136, @tr_var_b4_163; -@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_163 -a NULL Test 3.5.9.3 8 123.170000000000000000000000000000 -select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122, -@tr_var_af_136, @tr_var_af_163; -@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_163 -a NULL Test 3.5.9.3 8 123.170000000000000000000000000000 -drop trigger trg2_a; -drop trigger trg2_b; -drop trigger trg2_c; -drop trigger trg2_d; - -Testcase 3.5.9.4: ------------------ -Create trigger trg3_a before insert on tb3 for each row -set @tr_var_b4_118=new.f118, @tr_var_b4_121=new.f121, -@tr_var_b4_122=new.f122, @tr_var_b4_136=new.f136, -@tr_var_b4_151=new.f151, @tr_var_b4_163=new.f163; -Create trigger trg3_b after insert on tb3 for each row -set @tr_var_af_118=new.f118, @tr_var_af_121=new.f121, -@tr_var_af_122=new.f122, @tr_var_af_136=new.f136, -@tr_var_af_151=new.f151, @tr_var_af_163=new.f163; -Create trigger trg3_c before update on tb3 for each row -set @tr_var_b4_118=new.f118, @tr_var_b4_121=new.f121, -@tr_var_b4_122=new.f122, @tr_var_b4_136=new.f136, -@tr_var_b4_151=new.f151, @tr_var_b4_163=new.f163; -Create trigger trg3_d after update on tb3 for each row -set @tr_var_af_118=new.f118, @tr_var_af_121=new.f121, -@tr_var_af_122=new.f122, @tr_var_af_136=new.f136, -@tr_var_af_151=new.f151, @tr_var_af_163=new.f163; -@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_151 @tr_var_b4_163 -0 0 0 0 0 0 -@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_151 @tr_var_af_163 -0 0 0 0 0 0 -Insert into tb3 (f122, f136, f151, f163) -values ('Test 3.5.9.4', 7, DEFAULT, 995.24); -select f118, f121, f122, f136, f151, f163 from tb3 -where f122 like 'Test 3.5.9.4%' order by f163; -f118 f121 f122 f136 f151 f163 -a NULL Test 3.5.9.4 00007 999 995.240000000000000000000000000000 -select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122, -@tr_var_b4_136, @tr_var_b4_151, @tr_var_b4_163; -@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_151 @tr_var_b4_163 -a NULL Test 3.5.9.4 7 999 995.240000000000000000000000000000 -select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122, -@tr_var_af_136, @tr_var_af_151, @tr_var_af_163; -@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_151 @tr_var_af_163 -a NULL Test 3.5.9.4 7 999 995.240000000000000000000000000000 -@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_151 @tr_var_b4_163 -0 0 0 0 0 0 -@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_151 @tr_var_af_163 -0 0 0 0 0 0 -Update tb3 Set f122='Test 3.5.9.4-trig', f136=NULL, f151=DEFAULT, f163=NULL -where f122='Test 3.5.9.4'; -Warnings: -Warning 1048 Column 'f136' cannot be null -Update tb3 Set f122='Test 3.5.9.4-trig', f136=0, f151=DEFAULT, f163=NULL -where f122='Test 3.5.9.4'; -select f118, f121, f122, f136, f151, f163 from tb3 -where f122 like 'Test 3.5.9.4-trig' order by f163; -f118 f121 f122 f136 f151 f163 -a NULL Test 3.5.9.4-trig 00000 999 NULL -select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122, -@tr_var_b4_136, @tr_var_b4_151, @tr_var_b4_163; -@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_151 @tr_var_b4_163 -a NULL Test 3.5.9.4-trig 0 999 NULL -select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122, -@tr_var_af_136, @tr_var_af_151, @tr_var_af_163; -@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_151 @tr_var_af_163 -a NULL Test 3.5.9.4-trig 0 999 NULL -drop trigger trg3_a; -drop trigger trg3_b; -drop trigger trg3_c; -drop trigger trg3_d; -delete from tb3 where f122='Test 3.5.9.4-trig'; - -Testcase 3.5.9.5: (implied in previous tests) ---------------------------------------------- - -Testcase 3.5.9.6: ------------------ -create trigger trg4a before insert on tb3 for each row -set @temp1= old.f120; -ERROR HY000: There is no OLD row in on INSERT trigger -create trigger trg4b after insert on tb3 for each row -set old.f120= 'test'; -ERROR HY000: Updating of OLD row is not allowed in trigger -drop trigger trg4a; -drop trigger trg4b; - -Testcase 3.5.9.7: (implied in previous tests) ---------------------------------------------- - -Testcase 3.5.9.8: (implied in previous tests) ---------------------------------------------- - -Testcase 3.5.9.9: ------------------ -create trigger trg5a before DELETE on tb3 for each row -set @temp1=new.f122; -ERROR HY000: There is no NEW row in on DELETE trigger -create trigger trg5b after DELETE on tb3 for each row -set new.f122='test'; -ERROR HY000: There is no NEW row in on DELETE trigger -drop trigger trg5a; -drop trigger trg5b; - -Testcase 3.5.9.10: (implied in previous tests) ----------------------------------------------- - -Testcase 3.5.9.11: covered by 3.5.9.9 -------------------------------------- - -Testcase 3.5.9.12: covered by 3.5.9.6 -------------------------------------- - -Testcase 3.5.9.13: ------------------- -create trigger trg6a before UPDATE on tb3 for each row -set old.f118='C', new.f118='U'; -ERROR HY000: Updating of OLD row is not allowed in trigger -create trigger trg6b after INSERT on tb3 for each row -set old.f136=163, new.f118='U'; -ERROR HY000: Updating of OLD row is not allowed in trigger -create trigger trg6c after UPDATE on tb3 for each row -set old.f136=NULL; -ERROR HY000: Updating of OLD row is not allowed in trigger -drop trigger trg6a; -drop trigger trg6b; -drop trigger trg6c; - -Testcase 3.5.9.14: (implied in previous tests) ----------------------------------------------- -DROP TABLE test.tb3; diff --git a/mysql-test/suite/funcs_1/r/ndb_trig_1011ext.result b/mysql-test/suite/funcs_1/r/ndb_trig_1011ext.result deleted file mode 100644 index 198382b409d..00000000000 --- a/mysql-test/suite/funcs_1/r/ndb_trig_1011ext.result +++ /dev/null @@ -1,394 +0,0 @@ -USE test; -drop table if exists tb3; -create table tb3 ( -f118 char not null DEFAULT 'a', -f119 char binary not null DEFAULT b'101', -f120 char ascii not null DEFAULT b'101', -f121 char(50), -f122 char(50), -f129 binary not null DEFAULT b'101', -f130 tinyint not null DEFAULT 99, -f131 tinyint unsigned not null DEFAULT 99, -f132 tinyint zerofill not null DEFAULT 99, -f133 tinyint unsigned zerofill not null DEFAULT 99, -f134 smallint not null DEFAULT 999, -f135 smallint unsigned not null DEFAULT 999, -f136 smallint zerofill not null DEFAULT 999, -f137 smallint unsigned zerofill not null DEFAULT 999, -f138 mediumint not null DEFAULT 9999, -f139 mediumint unsigned not null DEFAULT 9999, -f140 mediumint zerofill not null DEFAULT 9999, -f141 mediumint unsigned zerofill not null DEFAULT 9999, -f142 int not null DEFAULT 99999, -f143 int unsigned not null DEFAULT 99999, -f144 int zerofill not null DEFAULT 99999, -f145 int unsigned zerofill not null DEFAULT 99999, -f146 bigint not null DEFAULT 999999, -f147 bigint unsigned not null DEFAULT 999999, -f148 bigint zerofill not null DEFAULT 999999, -f149 bigint unsigned zerofill not null DEFAULT 999999, -f150 decimal not null DEFAULT 999.999, -f151 decimal unsigned not null DEFAULT 999.17, -f152 decimal zerofill not null DEFAULT 999.999, -f153 decimal unsigned zerofill, -f154 decimal (0), -f155 decimal (64), -f156 decimal (0) unsigned, -f157 decimal (64) unsigned, -f158 decimal (0) zerofill, -f159 decimal (64) zerofill, -f160 decimal (0) unsigned zerofill, -f161 decimal (64) unsigned zerofill, -f162 decimal (0,0), -f163 decimal (63,30), -f164 decimal (0,0) unsigned, -f165 decimal (63,30) unsigned, -f166 decimal (0,0) zerofill, -f167 decimal (63,30) zerofill, -f168 decimal (0,0) unsigned zerofill, -f169 decimal (63,30) unsigned zerofill, -f170 numeric, -f171 numeric unsigned, -f172 numeric zerofill, -f173 numeric unsigned zerofill, -f174 numeric (0), -f175 numeric (64) -) engine = ; -Warnings: -Note 1265 Data truncated for column 'f150' at row 1 -Note 1265 Data truncated for column 'f151' at row 1 -Note 1265 Data truncated for column 'f152' at row 1 -load data infile '/std_data/funcs_1/memory_tb3.txt' -into table tb3; - -Testcase 3.5.10.1/2/3: ----------------------- -Create view vw11 as select * from tb3 -where f122 like 'Test 3.5.10.1/2/3%'; -Create trigger trg1a before insert on tb3 -for each row set new.f163=111.11; -Create trigger trg1b after insert on tb3 -for each row set @test_var='After Insert'; -Create trigger trg1c before update on tb3 -for each row set new.f121='Y', new.f122='Test 3.5.10.1/2/3-Update'; -Create trigger trg1d after update on tb3 -for each row set @test_var='After Update'; -Create trigger trg1e before delete on tb3 -for each row set @test_var=5; -Create trigger trg1f after delete on tb3 -for each row set @test_var= 2* @test_var+7; -Insert into vw11 (f122, f151) values ('Test 3.5.10.1/2/3', 1); -Insert into vw11 (f122, f151) values ('Test 3.5.10.1/2/3', 2); -Insert into vw11 (f122, f151) values ('Not in View', 3); -select f121, f122, f151, f163 -from tb3 where f122 like 'Test 3.5.10.1/2/3%' order by f151; -f121 f122 f151 f163 -NULL Test 3.5.10.1/2/3 1 111.110000000000000000000000000000 -NULL Test 3.5.10.1/2/3 2 111.110000000000000000000000000000 -select f121, f122, f151, f163 from vw11; -f121 f122 f151 f163 -NULL Test 3.5.10.1/2/3 1 111.110000000000000000000000000000 -NULL Test 3.5.10.1/2/3 2 111.110000000000000000000000000000 -select f121, f122, f151, f163 -from tb3 where f122 like 'Not in View'; -f121 f122 f151 f163 -NULL Not in View 3 111.110000000000000000000000000000 -Update vw11 set f163=1; -select f121, f122, f151, f163 from tb3 -where f122 like 'Test 3.5.10.1/2/3%' order by f151; -f121 f122 f151 f163 -Y Test 3.5.10.1/2/3-Update 1 1.000000000000000000000000000000 -Y Test 3.5.10.1/2/3-Update 2 1.000000000000000000000000000000 -select f121, f122, f151, f163 from vw11; -f121 f122 f151 f163 -Y Test 3.5.10.1/2/3-Update 1 1.000000000000000000000000000000 -Y Test 3.5.10.1/2/3-Update 2 1.000000000000000000000000000000 -set @test_var=0; -Select @test_var as 'before delete'; -before delete -0 -delete from vw11 where f151=1; -select f121, f122, f151, f163 from tb3 -where f122 like 'Test 3.5.10.1/2/3%' order by f151; -f121 f122 f151 f163 -Y Test 3.5.10.1/2/3-Update 2 1.000000000000000000000000000000 -select f121, f122, f151, f163 from vw11; -f121 f122 f151 f163 -Y Test 3.5.10.1/2/3-Update 2 1.000000000000000000000000000000 -Select @test_var as 'after delete'; -after delete -17 -drop view vw11; -drop trigger trg1a; -drop trigger trg1b; -drop trigger trg1c; -drop trigger trg1d; -drop trigger trg1e; -drop trigger trg1f; -delete from tb3 where f122 like 'Test 3.5.10.1/2/3%'; - -Testcase 3.5.10.4: ------------------- -create table tb_load (f1 int, f2 char(25),f3 int) engine = ; -Create trigger trg4 before insert on tb_load -for each row set new.f3=-(new.f1 div 5), @counter= @counter+1; -set @counter= 0; -select @counter as 'Rows Loaded Before'; -Rows Loaded Before -0 -load data infile '/std_data/funcs_1/t9.txt' into table tb_load; -select @counter as 'Rows Loaded After'; -Rows Loaded After -10 -Select * from tb_load order by f1 limit 10; -f1 f2 f3 --5000 a` 1000 --4999 aaa 999 --4998 abaa 999 --4997 acaaa 999 --4996 adaaaa 999 --4995 aeaaaaa 999 --4994 afaaaaaa 998 --4993 agaaaaaaa 998 --4992 a^aaaaaaaa 998 --4991 a_aaaaaaaaa 998 -drop trigger trg4; -drop table tb_load; - -Testcase 3.5.10.5: (implemented in trig_frkey.test) ---------------------------------------------------- - -Testcase 3.5.10.6: (implemented in trig_frkey.test) ---------------------------------------------------- - -Testcase 3.5.10.extra: ----------------------- -create table t1_sp (var136 tinyint, var151 decimal) engine = ; -create trigger trg before insert on t1_sp -for each row set @counter=@counter+1; -create procedure trig_sp() -begin -declare done int default 0; -declare var151 decimal; -declare var136 tinyint; -declare cur1 cursor for select f136, f151 from tb3; -declare continue handler for sqlstate '01000' set done = 1; -open cur1; -fetch cur1 into var136, var151; -wl_loop: WHILE NOT done DO -insert into t1_sp values (var136, var151); -fetch cur1 into var136, var151; -END WHILE wl_loop; -close cur1; -end// -set @counter=0; -select @counter; -@counter -0 -call trig_sp(); -ERROR 02000: No data - zero rows fetched, selected, or processed -select @counter; -@counter -11 -select count(*) from tb3; -count(*) -11 -select count(*) from t1_sp; -count(*) -11 -drop procedure trig_sp; -drop trigger trg; -drop table t1_sp; - -Testcase 3.5.11.1 (implemented in trig_perf.test) -------------------------------------------------- - -Testcase y.y.y.2: Check for triggers starting triggers ------------------------------------------------------- -use test; -drop table if exists t1; -drop table if exists t2_1; -drop table if exists t2_2; -drop table if exists t2_3; -drop table if exists t2_4; -drop table if exists t3; -create table t1 (f1 integer) engine = ; -create table t2_1 (f1 integer) engine = ; -create table t2_2 (f1 integer) engine = ; -create table t2_3 (f1 integer) engine = ; -create table t2_4 (f1 integer) engine = ; -create table t3 (f1 integer) engine = ; -insert into t1 values (1); -create trigger tr1 after insert on t1 for each row -BEGIN -insert into t2_1 (f1) values (new.f1+1); -insert into t2_2 (f1) values (new.f1+1); -insert into t2_3 (f1) values (new.f1+1); -insert into t2_4 (f1) values (new.f1+1); -END// -create trigger tr2_1 after insert on t2_1 for each row -insert into t3 (f1) values (new.f1+10); -create trigger tr2_2 after insert on t2_2 for each row -insert into t3 (f1) values (new.f1+100); -create trigger tr2_3 after insert on t2_3 for each row -insert into t3 (f1) values (new.f1+1000); -create trigger tr2_4 after insert on t2_4 for each row -insert into t3 (f1) values (new.f1+10000); -insert into t1 values (1); -select * from t3 order by f1; -f1 -12 -102 -1002 -10002 -drop trigger tr1; -drop trigger tr2_1; -drop trigger tr2_2; -drop trigger tr2_3; -drop trigger tr2_4; -drop table t1, t2_1, t2_2, t2_3, t2_4, t3; - -Testcase y.y.y.3: Circular trigger reference --------------------------------------------- -use test; -drop table if exists t1; -drop table if exists t2; -drop table if exists t3; -drop table if exists t4; -create table t1 (f1 integer) engine = ; -create table t2 (f2 integer) engine = ; -create table t3 (f3 integer) engine = ; -create table t4 (f4 integer) engine = ; -insert into t1 values (0); -create trigger tr1 after insert on t1 -for each row insert into t2 (f2) values (new.f1+1); -create trigger tr2 after insert on t2 -for each row insert into t3 (f3) values (new.f2+1); -create trigger tr3 after insert on t3 -for each row insert into t4 (f4) values (new.f3+1); -create trigger tr4 after insert on t4 -for each row insert into t1 (f1) values (new.f4+1); -insert into t1 values (1); -ERROR HY000: Can't update table 't1' in stored function/trigger because it is already used by statement which invoked this stored function/trigger. -select * from t1 order by f1; -f1 -0 -select * from t2 order by f2; -f2 -select * from t3 order by f3; -f3 -select * from t4 order by f4; -f4 -drop trigger tr1; -drop trigger tr2; -drop trigger tr3; -drop trigger tr4; -drop table t1; -drop table t2; -drop table t3; -drop table t4; - -Testcase y.y.y.4: Recursive trigger/SP references -------------------------------------------------- -set @sql_mode='traditional'; -create table t1_sp ( -count integer, -var136 tinyint, -var151 decimal) engine = ; -create procedure trig_sp() -begin -declare done int default 0; -declare var151 decimal; -declare var136 tinyint; -declare cur1 cursor for select f136, f151 from tb3; -declare continue handler for sqlstate '01000' set done = 1; -set @counter= @counter+1; -open cur1; -fetch cur1 into var136, var151; -wl_loop: WHILE NOT done DO -insert into t1_sp values (@counter, var136, var151); -fetch cur1 into var136, var151; -END WHILE wl_loop; -close cur1; -end// -create trigger trg before insert on t1_sp -for each row call trig_sp(); -set @counter=0; -select @counter; -@counter -0 -call trig_sp(); -ERROR HY000: Recursive limit 0 (as set by the max_sp_recursion_depth variable) was exceeded for routine trig_sp -select @counter; -@counter -1 -select count(*) from tb3; -count(*) -11 -select count(*) from t1_sp; -count(*) -0 -set @@max_sp_recursion_depth= 10; -set @counter=0; -select @counter; -@counter -0 -call trig_sp(); -ERROR HY000: Can't update table 't1_sp' in stored function/trigger because it is already used by statement which invoked this stored function/trigger. -select @counter; -@counter -2 -select count(*) from tb3; -count(*) -11 -select count(*) from t1_sp; -count(*) -0 -drop procedure trig_sp; -drop trigger trg; -drop table t1_sp; - -Testcase y.y.y.5: Rollback of nested trigger references -------------------------------------------------------- -set @@sql_mode='traditional'; -use test; -drop table if exists t1; -drop table if exists t2; -drop table if exists t3; -drop table if exists t4; -create table t1 (f1 integer) engine = ; -create table t2 (f2 integer) engine = ; -create table t3 (f3 integer) engine = ; -create table t4 (f4 tinyint) engine = ; -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f1` int(11) default NULL -) ENGINE= DEFAULT CHARSET=latin1 -insert into t1 values (1); -create trigger tr1 after insert on t1 -for each row insert into t2 (f2) values (new.f1+1); -create trigger tr2 after insert on t2 -for each row insert into t3 (f3) values (new.f2+1); -create trigger tr3 after insert on t3 -for each row insert into t4 (f4) values (new.f3+1000); -set autocommit=0; -start transaction; -insert into t1 values (1); -ERROR 22003: Out of range value adjusted for column 'f4' at row 1 -commit; -select * from t1 order by f1; -f1 -1 -select * from t2 order by f2; -f2 -select * from t3 order by f3; -f3 -drop trigger tr1; -drop trigger tr2; -drop trigger tr3; -drop table t1; -drop table t2; -drop table t3; -drop table t4; -DROP TABLE test.tb3; diff --git a/mysql-test/suite/funcs_1/r/ndb_views.result b/mysql-test/suite/funcs_1/r/ndb_views.result deleted file mode 100644 index 6c5a10845a0..00000000000 --- a/mysql-test/suite/funcs_1/r/ndb_views.result +++ /dev/null @@ -1,22914 +0,0 @@ -USE test; -drop table if exists tb2 ; -create table tb2 ( -f59 numeric (0) unsigned, -f60 numeric (64) unsigned, -f61 numeric (0) zerofill, -f62 numeric (64) zerofill, -f63 numeric (0) unsigned zerofill, -f64 numeric (64) unsigned zerofill, -f65 numeric (0,0), -f66 numeric (63,30), -f67 numeric (0,0) unsigned, -f68 numeric (63,30) unsigned, -f69 numeric (0,0) zerofill, -f70 numeric (63,30) zerofill, -f71 numeric (0,0) unsigned zerofill, -f72 numeric (63,30) unsigned zerofill, -f73 real, -f74 real unsigned, -f75 real zerofill, -f76 real unsigned zerofill, -f77 double default 7.7, -f78 double unsigned default 7.7, -f79 double zerofill default 7.7, -f80 double unsigned zerofill default 8.8, -f81 float not null default 8.8, -f82 float unsigned not null default 8.8, -f83 float zerofill not null default 8.8, -f84 float unsigned zerofill not null default 8.8, -f85 float(0) not null default 8.8, -f86 float(23) not null default 8.8, -f87 float(0) unsigned not null default 8.8, -f88 float(23) unsigned not null default 8.8, -f89 float(0) zerofill not null default 8.8, -f90 float(23) zerofill not null default 8.8, -f91 float(0) unsigned zerofill not null default 8.8, -f92 float(23) unsigned zerofill not null default 8.8, -f93 float(24) not null default 8.8, -f94 float(53) not null default 8.8, -f95 float(24) unsigned not null default 8.8, -f96 float(53) unsigned not null default 8.8, -f97 float(24) zerofill not null default 8.8, -f98 float(53) zerofill not null default 8.8, -f99 float(24) unsigned zerofill not null default 8.8, -f100 float(53) unsigned zerofill not null default 8.8, -f101 date not null default '2000-01-01', -f102 time not null default 20, -f103 datetime not null default '2/2/2', -f104 timestamp not null default 20001231235959, -f105 year not null default 2000, -f106 year(3) not null default 2000, -f107 year(4) not null default 2000, -f108 enum("1enum","2enum") not null default "1enum", -f109 set("1set","2set") not null default "1set" -) engine = ndb; -load data infile '/std_data/funcs_1/ndb_tb2.txt' -into table tb2 ; -DROP DATABASE IF EXISTS test1; -CREATE DATABASE test1; -USE test1; -drop table if exists tb2 ; -create table tb2 ( -f59 numeric (0) unsigned, -f60 numeric (64) unsigned, -f61 numeric (0) zerofill, -f62 numeric (64) zerofill, -f63 numeric (0) unsigned zerofill, -f64 numeric (64) unsigned zerofill, -f65 numeric (0,0), -f66 numeric (63,30), -f67 numeric (0,0) unsigned, -f68 numeric (63,30) unsigned, -f69 numeric (0,0) zerofill, -f70 numeric (63,30) zerofill, -f71 numeric (0,0) unsigned zerofill, -f72 numeric (63,30) unsigned zerofill, -f73 real, -f74 real unsigned, -f75 real zerofill, -f76 real unsigned zerofill, -f77 double default 7.7, -f78 double unsigned default 7.7, -f79 double zerofill default 7.7, -f80 double unsigned zerofill default 8.8, -f81 float not null default 8.8, -f82 float unsigned not null default 8.8, -f83 float zerofill not null default 8.8, -f84 float unsigned zerofill not null default 8.8, -f85 float(0) not null default 8.8, -f86 float(23) not null default 8.8, -f87 float(0) unsigned not null default 8.8, -f88 float(23) unsigned not null default 8.8, -f89 float(0) zerofill not null default 8.8, -f90 float(23) zerofill not null default 8.8, -f91 float(0) unsigned zerofill not null default 8.8, -f92 float(23) unsigned zerofill not null default 8.8, -f93 float(24) not null default 8.8, -f94 float(53) not null default 8.8, -f95 float(24) unsigned not null default 8.8, -f96 float(53) unsigned not null default 8.8, -f97 float(24) zerofill not null default 8.8, -f98 float(53) zerofill not null default 8.8, -f99 float(24) unsigned zerofill not null default 8.8, -f100 float(53) unsigned zerofill not null default 8.8, -f101 date not null default '2000-01-01', -f102 time not null default 20, -f103 datetime not null default '2/2/2', -f104 timestamp not null default 20001231235959, -f105 year not null default 2000, -f106 year(3) not null default 2000, -f107 year(4) not null default 2000, -f108 enum("1enum","2enum") not null default "1enum", -f109 set("1set","2set") not null default "1set" -) engine = ndb; -load data infile '/std_data/funcs_1/ndb_tb2.txt' -into table tb2 ; -USE test; - -! Attention: The file with the expected results is not -| thoroughly checked. -! The server return codes are correct, but -| most result sets where the table tb2 is -! involved are not checked. --------------------------------------------------------------------------------- - -There are some statements where the ps-protocol is switched off. -Bug#32285: mysqltest, --ps-protocol, strange output, float/double/real with zerofill --------------------------------------------------------------------------------- -insert into test.tb2 (f59,f60) values (76710,226546); -insert into test.tb2 (f59,f60) values(2760,985654); -insert into test.tb2 (f59,f60) values(569300,9114376); -insert into test.tb2 (f59,f60) values(660,876546); -insert into test.tb2 (f59,f60) values(250,87895654); -insert into test.tb2 (f59,f60) values(340,9984376); -insert into test.tb2 (f59,f60) values(3410,996546); -insert into test.tb2 (f59,f60) values(2550,775654); -insert into test.tb2 (f59,f60) values(3330,764376); -insert into test.tb2 (f59,f60) values(441,16546); -insert into test.tb2 (f59,f60) values(24,51654); -insert into test.tb2 (f59,f60) values(323,14376); -insert into test.tb2 (f59,f60) values(34,41); -insert into test.tb2 (f59,f60) values(04,74); -insert into test.tb2 (f59,f60) values(15,87); -insert into test.tb2 (f59,f60) values(22,93); -insert into test.tb2 (f59,f60) values(394,41); -insert into test.tb2 (f59,f60) values(094,74); -insert into test.tb2 (f59,f60) values(195,87); -insert into test.tb2 (f59,f60) values(292,93); -insert into test.tb2 (f59,f60) values(0987,41) ; -insert into test.tb2 (f59,f60) values(7876,74) ; -INSERT INTO tb2 (f59,f61) VALUES(321,765 ); -INSERT INTO tb2 (f59,f61) VALUES(9112,8771); -INSERT INTO tb2 (f59,f61) VALUES (500,900 ) ; -INSERT INTO tb2 (f59,f61) VALUES (500,900 ) ; -INSERT INTO tb2 (f59,f61) VALUES (500,900 ) ; -Insert into tb2 (f59,f60,f61) values (107,105,106) ; -Insert into tb2 (f59,f60,f61) values (109,108,104) ; -Insert into tb2 (f59,f60,f61) values (207,205,206) ; -Insert into tb2 (f59,f60,f61) values (209,208,204) ; -Insert into tb2 (f59,f60,f61) values (27,25,26) ; -Insert into tb2 (f59,f60,f61) values (29,28,24) ; -Insert into tb2 (f59,f60,f61) values (17,15,16) ; -Insert into tb2 (f59,f60,f61) values (19,18,14) ; -insert into tb2 (f59,f60,f61) values (107,105,106); -insert into tb2 (f59,f60,f61) values (109,108,104); -INSERT INTO tb2 (f59,f60) VALUES( 299,899 ); -INSERT INTO tb2 (f59,f60) VALUES( 242,79 ); -INSERT INTO tb2 (f59,f60) VALUES( 424,89 ); -SELECT * FROM tb2 ORDER BY f59, f60, f61; -f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 -1 1 0000000001 0000000000000000000000000000000000000000000000000000000000000001 0000000001 0000000000000000000000000000000000000000000000000000000000000001 -5 0.000000000000000000000000000000 1 0.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549435e-38 1.17549e-38 1.175494352e-38 01.17549e-38 00000001.175494352e-38 01.17549e-38 00000001.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 1970-01-02 00:00:01 1902 1902 1902 2enum 2set -2 2 0000000002 0000000000000000000000000000000000000000000000000000000000000002 0000000002 0000000000000000000000000000000000000000000000000000000000000002 -4 1.100000000000000000000000000000 2 1.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494349e-38 1.17549e-38 1.175494353e-38 01.17549e-38 00000001.175494353e-38 01.17549e-38 00000001.175494353e-38 1000-01-02 838:59:57 1970-01-03 00:00:02 1970-01-03 00:00:02 1903 1903 1903 1enum 1set,2set -3 3 0000000003 0000000000000000000000000000000000000000000000000000000000000003 0000000003 0000000000000000000000000000000000000000000000000000000000000003 -3 2.200000000000000000000000000000 3 2.200000000000000000000000000000 0000000003 000000000000000000000000000000002.200000000000000000000000000000 0000000003 000000000000000000000000000000002.200000000000000000000000000000 -1.175494348e-38 1.175494354e-38 00000001.175494354e-38 00000001.175494354e-38 -1.175494348e-38 1.175494354e-38 00000001.175494354e-38 00000001.175494354e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494348e-38 1.17549e-38 1.175494354e-38 01.17549e-38 00000001.175494354e-38 01.17549e-38 00000001.175494354e-38 1000-01-03 838:59:56 1970-01-04 00:00:03 1970-01-04 00:00:03 1904 1904 1904 2enum 1set -4 4 0000000004 0000000000000000000000000000000000000000000000000000000000000004 0000000004 0000000000000000000000000000000000000000000000000000000000000004 -2 3.300000000000000000000000000000 4 3.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494347e-38 1.17549e-38 1.175494355e-38 01.17549e-38 00000001.175494355e-38 01.17549e-38 00000001.175494355e-38 1000-01-04 838:59:55 1970-01-05 00:00:04 1970-01-05 00:00:04 1905 1905 1905 1enum 2set -4 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -5 5 0000000005 0000000000000000000000000000000000000000000000000000000000000005 0000000005 0000000000000000000000000000000000000000000000000000000000000005 -1 4.400000000000000000000000000000 5 4.400000000000000000000000000000 0000000005 000000000000000000000000000000004.400000000000000000000000000000 0000000005 000000000000000000000000000000004.400000000000000000000000000000 -1.175494346e-38 1.175494356e-38 00000001.175494356e-38 00000001.175494356e-38 -1.175494346e-38 1.175494356e-38 00000001.175494356e-38 00000001.175494356e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494346e-38 1.17549e-38 1.175494356e-38 01.17549e-38 00000001.175494356e-38 01.17549e-38 00000001.175494356e-38 1000-01-05 838:59:54 1970-01-06 00:00:05 1970-01-06 00:00:05 1906 1906 1906 2enum 1set,2set -6 6 0000000006 0000000000000000000000000000000000000000000000000000000000000006 0000000006 0000000000000000000000000000000000000000000000000000000000000006 0 5.500000000000000000000000000000 6 5.500000000000000000000000000000 0000000006 000000000000000000000000000000005.500000000000000000000000000000 0000000006 000000000000000000000000000000005.500000000000000000000000000000 -1.175494345e-38 1.175494357e-38 00000001.175494357e-38 00000001.175494357e-38 -1.175494345e-38 1.175494357e-38 00000001.175494357e-38 00000001.175494357e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494345e-38 1.17549e-38 1.175494357e-38 01.17549e-38 00000001.175494357e-38 01.17549e-38 00000001.175494357e-38 1000-01-06 838:59:53 1970-01-07 00:00:06 1970-01-07 00:00:06 1907 1907 1907 1enum 1set -7 7 0000000007 0000000000000000000000000000000000000000000000000000000000000007 0000000007 0000000000000000000000000000000000000000000000000000000000000007 1 6.600000000000000000000000000000 7 6.600000000000000000000000000000 0000000007 000000000000000000000000000000006.600000000000000000000000000000 0000000007 000000000000000000000000000000006.600000000000000000000000000000 -1.175494344e-38 1.175494358e-38 00000001.175494358e-38 00000001.175494358e-38 -1.175494344e-38 1.175494358e-38 00000001.175494358e-38 00000001.175494358e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494344e-38 1.17549e-38 1.175494358e-38 01.17549e-38 00000001.175494358e-38 01.17549e-38 00000001.175494358e-38 1000-01-07 838:59:52 1970-01-08 00:00:07 1970-01-08 00:00:07 1908 1908 1908 2enum 2set -8 8 0000000008 0000000000000000000000000000000000000000000000000000000000000008 0000000008 0000000000000000000000000000000000000000000000000000000000000008 2 7.700000000000000000000000000000 8 7.700000000000000000000000000000 0000000008 000000000000000000000000000000007.700000000000000000000000000000 0000000008 000000000000000000000000000000007.700000000000000000000000000000 -1.175494343e-38 1.175494359e-38 00000001.175494359e-38 00000001.175494359e-38 -1.175494343e-38 1.175494359e-38 00000001.175494359e-38 00000001.175494359e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494343e-38 1.17549e-38 1.175494359e-38 01.17549e-38 00000001.175494359e-38 01.17549e-38 00000001.175494359e-38 1000-01-08 838:59:51 1970-01-09 00:00:08 1970-01-09 00:00:08 1909 1909 1909 1enum 1set,2set -9 9 0000000009 0000000000000000000000000000000000000000000000000000000000000009 0000000009 0000000000000000000000000000000000000000000000000000000000000009 3 8.800000000000000000000000000000 9 8.800000000000000000000000000000 0000000009 000000000000000000000000000000008.800000000000000000000000000000 0000000009 000000000000000000000000000000008.800000000000000000000000000000 -1.175494342e-38 1.17549436e-38 000000001.17549436e-38 000000001.17549436e-38 -1.175494342e-38 1.17549436e-38 000000001.17549436e-38 000000001.17549436e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494342e-38 1.17549e-38 1.17549436e-38 01.17549e-38 000000001.17549436e-38 01.17549e-38 000000001.17549436e-38 1000-01-09 838:59:50 1970-01-10 00:00:09 1970-01-10 00:00:09 1910 1910 1910 2enum 1set -10 10 0000000010 0000000000000000000000000000000000000000000000000000000000000010 0000000010 0000000000000000000000000000000000000000000000000000000000000010 4 9.900000000000000000000000000000 10 9.900000000000000000000000000000 0000000010 000000000000000000000000000000009.900000000000000000000000000000 0000000010 000000000000000000000000000000009.900000000000000000000000000000 -1.175494341e-38 1.175494361e-38 00000001.175494361e-38 00000001.175494361e-38 -1.175494341e-38 1.175494361e-38 00000001.175494361e-38 00000001.175494361e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494341e-38 1.17549e-38 1.175494361e-38 01.17549e-38 00000001.175494361e-38 01.17549e-38 00000001.175494361e-38 1000-01-10 838:59:49 1970-01-11 00:00:10 1970-01-11 00:00:10 1911 1911 1911 1enum 2set -15 87 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -17 15 0000000016 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -19 18 0000000014 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -22 93 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -24 51654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -27 25 0000000026 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -29 28 0000000024 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -34 41 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -94 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -107 105 0000000106 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -107 105 0000000106 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -109 108 0000000104 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -109 108 0000000104 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -195 87 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -207 205 0000000206 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -209 208 0000000204 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -242 79 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -250 87895654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -292 93 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -299 899 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -321 NULL 0000000765 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -323 14376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -340 9984376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -394 41 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -424 89 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -441 16546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -500 NULL 0000000900 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -500 NULL 0000000900 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -500 NULL 0000000900 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -660 876546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -987 41 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -2550 775654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -2760 985654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -3330 764376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -3410 996546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -7876 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -9112 NULL 0000008771 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -76710 226546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -569300 9114376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -Use test; - -Testcase 3.3.1.1 --------------------------------------------------------------------------------- -Drop table if exists t1; -Create table t1 (f59 INT, f60 INT) ; -Insert into t1 values (100,4234); -Insert into t1 values (990,6624); -Insert into t1 values (710,765); -Insert into t1 values (300,433334); -Insert into t1 values (800,9788); -Insert into t1 values (500,9866); -Drop view if exists v1 ; -CREATE VIEW v1 AS select f59,f60,f61 -FROM test.tb2 where f59=250; -select * FROM v1 order by f60,f61 limit 0,10; -f59 f60 f61 -250 87895654 NULL -Drop view if exists v1 ; -CREATE VIEW v1 AS select f59,f60,f61 -FROM test.tb2 limit 100; -select * FROM v1 order by f59,f60,f61 limit 0,10; -f59 f60 f61 -1 1 0000000001 -2 2 0000000002 -3 3 0000000003 -4 4 0000000004 -4 74 NULL -5 5 0000000005 -6 6 0000000006 -7 7 0000000007 -8 8 0000000008 -9 9 0000000009 -CREATE or REPLACE VIEW v1 AS select f59,f60,f61 -FROM test.tb2; -select * FROM v1 order by f59,f60,f61 limit 4,3; -f59 f60 f61 -4 74 NULL -5 5 0000000005 -6 6 0000000006 -CREATE or REPLACE VIEW v1 AS select distinct f59 -FROM test.tb2; -select * FROM v1 order by f59 limit 4,3; -f59 -5 -6 -7 -ALTER VIEW v1 AS select f59 -FROM test.tb2; -select * FROM v1 order by f59 limit 6,2; -f59 -6 -7 -CREATE or REPLACE VIEW v1 AS select f59 -from tb2 order by f59; -select * FROM v1 order by f59 limit 0,10; -f59 -1 -2 -3 -4 -4 -5 -6 -7 -8 -9 -CREATE or REPLACE VIEW v1 AS select f59 -from tb2 order by f59 asc; -select * FROM v1 limit 0,10; -f59 -1 -2 -3 -4 -4 -5 -6 -7 -8 -9 -CREATE or REPLACE VIEW v1 AS select f59 -from tb2 order by f59 desc; -select * FROM v1 limit 0,10; -f59 -569300 -76710 -9112 -7876 -3410 -3330 -2760 -2550 -987 -660 -CREATE or REPLACE VIEW v1 AS select f59 -from tb2 group by f59; -select * FROM v1 order by f59 limit 0,10; -f59 -1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -CREATE or REPLACE VIEW v1 AS select f59 -from tb2 group by f59 asc; -select * FROM v1 order by f59 limit 0,10; -f59 -1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -CREATE or REPLACE VIEW v1 AS select f59 -from tb2 group by f59 desc; -select * FROM v1 order by f59 limit 0,10; -f59 -1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -CREATE or REPLACE VIEW v1 AS (select f59 from tb2) -union (select f59 from t1); -select * FROM v1 order by f59 limit 0,10; -f59 -1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -CREATE or REPLACE VIEW v1 AS (select f59 FROM tb2) -UNION DISTINCT(select f59 FROM t1) ; -select * FROM v1 order by f59 limit 0,10; -f59 -1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -CREATE or REPLACE VIEW v1 AS (select f59 FROM tb2) -UNION ALL(select f59 FROM t1) ; -select * FROM v1 order by f59 limit 0,10; -f59 -1 -2 -3 -4 -4 -5 -6 -7 -8 -9 -CREATE or REPLACE VIEW v1 AS select * -FROM test.tb2 WITH LOCAL CHECK OPTION ; -select * FROM v1 order by f59,f60,f61,f62,f63,f64 limit 0,50; -f59 1 -f60 1 -f61 0000000001 -f62 0000000000000000000000000000000000000000000000000000000000000001 -f63 0000000001 -f64 0000000000000000000000000000000000000000000000000000000000000001 -f65 -5 -f66 0.000000000000000000000000000000 -f67 1 -f68 0.000000000000000000000000000000 -f69 0000000001 -f70 000000000000000000000000000000000.000000000000000000000000000000 -f71 0000000001 -f72 000000000000000000000000000000000.000000000000000000000000000000 -f73 -1.17549435e-38 -f74 1.175494352e-38 -f75 00000001.175494352e-38 -f76 00000001.175494352e-38 -f77 -1.17549435e-38 -f78 1.175494352e-38 -f79 00000001.175494352e-38 -f80 00000001.175494352e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.17549435e-38 -f95 1.17549e-38 -f96 1.175494352e-38 -f97 01.17549e-38 -f98 00000001.175494352e-38 -f99 01.17549e-38 -f100 00000001.175494352e-38 -f101 1000-01-01 -f102 838:59:58 -f103 1970-01-02 00:00:01 -f104 1970-01-02 00:00:01 -f105 1902 -f106 1902 -f107 1902 -f108 2enum -f109 2set -f59 2 -f60 2 -f61 0000000002 -f62 0000000000000000000000000000000000000000000000000000000000000002 -f63 0000000002 -f64 0000000000000000000000000000000000000000000000000000000000000002 -f65 -4 -f66 1.100000000000000000000000000000 -f67 2 -f68 1.100000000000000000000000000000 -f69 0000000002 -f70 000000000000000000000000000000001.100000000000000000000000000000 -f71 0000000002 -f72 000000000000000000000000000000001.100000000000000000000000000000 -f73 -1.175494349e-38 -f74 1.175494353e-38 -f75 00000001.175494353e-38 -f76 00000001.175494353e-38 -f77 -1.175494349e-38 -f78 1.175494353e-38 -f79 00000001.175494353e-38 -f80 00000001.175494353e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494349e-38 -f95 1.17549e-38 -f96 1.175494353e-38 -f97 01.17549e-38 -f98 00000001.175494353e-38 -f99 01.17549e-38 -f100 00000001.175494353e-38 -f101 1000-01-02 -f102 838:59:57 -f103 1970-01-03 00:00:02 -f104 1970-01-03 00:00:02 -f105 1903 -f106 1903 -f107 1903 -f108 1enum -f109 1set,2set -f59 3 -f60 3 -f61 0000000003 -f62 0000000000000000000000000000000000000000000000000000000000000003 -f63 0000000003 -f64 0000000000000000000000000000000000000000000000000000000000000003 -f65 -3 -f66 2.200000000000000000000000000000 -f67 3 -f68 2.200000000000000000000000000000 -f69 0000000003 -f70 000000000000000000000000000000002.200000000000000000000000000000 -f71 0000000003 -f72 000000000000000000000000000000002.200000000000000000000000000000 -f73 -1.175494348e-38 -f74 1.175494354e-38 -f75 00000001.175494354e-38 -f76 00000001.175494354e-38 -f77 -1.175494348e-38 -f78 1.175494354e-38 -f79 00000001.175494354e-38 -f80 00000001.175494354e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494348e-38 -f95 1.17549e-38 -f96 1.175494354e-38 -f97 01.17549e-38 -f98 00000001.175494354e-38 -f99 01.17549e-38 -f100 00000001.175494354e-38 -f101 1000-01-03 -f102 838:59:56 -f103 1970-01-04 00:00:03 -f104 1970-01-04 00:00:03 -f105 1904 -f106 1904 -f107 1904 -f108 2enum -f109 1set -f59 4 -f60 4 -f61 0000000004 -f62 0000000000000000000000000000000000000000000000000000000000000004 -f63 0000000004 -f64 0000000000000000000000000000000000000000000000000000000000000004 -f65 -2 -f66 3.300000000000000000000000000000 -f67 4 -f68 3.300000000000000000000000000000 -f69 0000000004 -f70 000000000000000000000000000000003.300000000000000000000000000000 -f71 0000000004 -f72 000000000000000000000000000000003.300000000000000000000000000000 -f73 -1.175494347e-38 -f74 1.175494355e-38 -f75 00000001.175494355e-38 -f76 00000001.175494355e-38 -f77 -1.175494347e-38 -f78 1.175494355e-38 -f79 00000001.175494355e-38 -f80 00000001.175494355e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494347e-38 -f95 1.17549e-38 -f96 1.175494355e-38 -f97 01.17549e-38 -f98 00000001.175494355e-38 -f99 01.17549e-38 -f100 00000001.175494355e-38 -f101 1000-01-04 -f102 838:59:55 -f103 1970-01-05 00:00:04 -f104 1970-01-05 00:00:04 -f105 1905 -f106 1905 -f107 1905 -f108 1enum -f109 2set -f59 4 -f60 74 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 5 -f60 5 -f61 0000000005 -f62 0000000000000000000000000000000000000000000000000000000000000005 -f63 0000000005 -f64 0000000000000000000000000000000000000000000000000000000000000005 -f65 -1 -f66 4.400000000000000000000000000000 -f67 5 -f68 4.400000000000000000000000000000 -f69 0000000005 -f70 000000000000000000000000000000004.400000000000000000000000000000 -f71 0000000005 -f72 000000000000000000000000000000004.400000000000000000000000000000 -f73 -1.175494346e-38 -f74 1.175494356e-38 -f75 00000001.175494356e-38 -f76 00000001.175494356e-38 -f77 -1.175494346e-38 -f78 1.175494356e-38 -f79 00000001.175494356e-38 -f80 00000001.175494356e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494346e-38 -f95 1.17549e-38 -f96 1.175494356e-38 -f97 01.17549e-38 -f98 00000001.175494356e-38 -f99 01.17549e-38 -f100 00000001.175494356e-38 -f101 1000-01-05 -f102 838:59:54 -f103 1970-01-06 00:00:05 -f104 1970-01-06 00:00:05 -f105 1906 -f106 1906 -f107 1906 -f108 2enum -f109 1set,2set -f59 6 -f60 6 -f61 0000000006 -f62 0000000000000000000000000000000000000000000000000000000000000006 -f63 0000000006 -f64 0000000000000000000000000000000000000000000000000000000000000006 -f65 0 -f66 5.500000000000000000000000000000 -f67 6 -f68 5.500000000000000000000000000000 -f69 0000000006 -f70 000000000000000000000000000000005.500000000000000000000000000000 -f71 0000000006 -f72 000000000000000000000000000000005.500000000000000000000000000000 -f73 -1.175494345e-38 -f74 1.175494357e-38 -f75 00000001.175494357e-38 -f76 00000001.175494357e-38 -f77 -1.175494345e-38 -f78 1.175494357e-38 -f79 00000001.175494357e-38 -f80 00000001.175494357e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494345e-38 -f95 1.17549e-38 -f96 1.175494357e-38 -f97 01.17549e-38 -f98 00000001.175494357e-38 -f99 01.17549e-38 -f100 00000001.175494357e-38 -f101 1000-01-06 -f102 838:59:53 -f103 1970-01-07 00:00:06 -f104 1970-01-07 00:00:06 -f105 1907 -f106 1907 -f107 1907 -f108 1enum -f109 1set -f59 7 -f60 7 -f61 0000000007 -f62 0000000000000000000000000000000000000000000000000000000000000007 -f63 0000000007 -f64 0000000000000000000000000000000000000000000000000000000000000007 -f65 1 -f66 6.600000000000000000000000000000 -f67 7 -f68 6.600000000000000000000000000000 -f69 0000000007 -f70 000000000000000000000000000000006.600000000000000000000000000000 -f71 0000000007 -f72 000000000000000000000000000000006.600000000000000000000000000000 -f73 -1.175494344e-38 -f74 1.175494358e-38 -f75 00000001.175494358e-38 -f76 00000001.175494358e-38 -f77 -1.175494344e-38 -f78 1.175494358e-38 -f79 00000001.175494358e-38 -f80 00000001.175494358e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494344e-38 -f95 1.17549e-38 -f96 1.175494358e-38 -f97 01.17549e-38 -f98 00000001.175494358e-38 -f99 01.17549e-38 -f100 00000001.175494358e-38 -f101 1000-01-07 -f102 838:59:52 -f103 1970-01-08 00:00:07 -f104 1970-01-08 00:00:07 -f105 1908 -f106 1908 -f107 1908 -f108 2enum -f109 2set -f59 8 -f60 8 -f61 0000000008 -f62 0000000000000000000000000000000000000000000000000000000000000008 -f63 0000000008 -f64 0000000000000000000000000000000000000000000000000000000000000008 -f65 2 -f66 7.700000000000000000000000000000 -f67 8 -f68 7.700000000000000000000000000000 -f69 0000000008 -f70 000000000000000000000000000000007.700000000000000000000000000000 -f71 0000000008 -f72 000000000000000000000000000000007.700000000000000000000000000000 -f73 -1.175494343e-38 -f74 1.175494359e-38 -f75 00000001.175494359e-38 -f76 00000001.175494359e-38 -f77 -1.175494343e-38 -f78 1.175494359e-38 -f79 00000001.175494359e-38 -f80 00000001.175494359e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494343e-38 -f95 1.17549e-38 -f96 1.175494359e-38 -f97 01.17549e-38 -f98 00000001.175494359e-38 -f99 01.17549e-38 -f100 00000001.175494359e-38 -f101 1000-01-08 -f102 838:59:51 -f103 1970-01-09 00:00:08 -f104 1970-01-09 00:00:08 -f105 1909 -f106 1909 -f107 1909 -f108 1enum -f109 1set,2set -f59 9 -f60 9 -f61 0000000009 -f62 0000000000000000000000000000000000000000000000000000000000000009 -f63 0000000009 -f64 0000000000000000000000000000000000000000000000000000000000000009 -f65 3 -f66 8.800000000000000000000000000000 -f67 9 -f68 8.800000000000000000000000000000 -f69 0000000009 -f70 000000000000000000000000000000008.800000000000000000000000000000 -f71 0000000009 -f72 000000000000000000000000000000008.800000000000000000000000000000 -f73 -1.175494342e-38 -f74 1.17549436e-38 -f75 000000001.17549436e-38 -f76 000000001.17549436e-38 -f77 -1.175494342e-38 -f78 1.17549436e-38 -f79 000000001.17549436e-38 -f80 000000001.17549436e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494342e-38 -f95 1.17549e-38 -f96 1.17549436e-38 -f97 01.17549e-38 -f98 000000001.17549436e-38 -f99 01.17549e-38 -f100 000000001.17549436e-38 -f101 1000-01-09 -f102 838:59:50 -f103 1970-01-10 00:00:09 -f104 1970-01-10 00:00:09 -f105 1910 -f106 1910 -f107 1910 -f108 2enum -f109 1set -f59 10 -f60 10 -f61 0000000010 -f62 0000000000000000000000000000000000000000000000000000000000000010 -f63 0000000010 -f64 0000000000000000000000000000000000000000000000000000000000000010 -f65 4 -f66 9.900000000000000000000000000000 -f67 10 -f68 9.900000000000000000000000000000 -f69 0000000010 -f70 000000000000000000000000000000009.900000000000000000000000000000 -f71 0000000010 -f72 000000000000000000000000000000009.900000000000000000000000000000 -f73 -1.175494341e-38 -f74 1.175494361e-38 -f75 00000001.175494361e-38 -f76 00000001.175494361e-38 -f77 -1.175494341e-38 -f78 1.175494361e-38 -f79 00000001.175494361e-38 -f80 00000001.175494361e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494341e-38 -f95 1.17549e-38 -f96 1.175494361e-38 -f97 01.17549e-38 -f98 00000001.175494361e-38 -f99 01.17549e-38 -f100 00000001.175494361e-38 -f101 1000-01-10 -f102 838:59:49 -f103 1970-01-11 00:00:10 -f104 1970-01-11 00:00:10 -f105 1911 -f106 1911 -f107 1911 -f108 1enum -f109 2set -f59 15 -f60 87 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 17 -f60 15 -f61 0000000016 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 19 -f60 18 -f61 0000000014 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 22 -f60 93 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 24 -f60 51654 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 27 -f60 25 -f61 0000000026 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 29 -f60 28 -f61 0000000024 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 34 -f60 41 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 94 -f60 74 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 107 -f60 105 -f61 0000000106 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 107 -f60 105 -f61 0000000106 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 109 -f60 108 -f61 0000000104 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 109 -f60 108 -f61 0000000104 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 195 -f60 87 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 207 -f60 205 -f61 0000000206 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 209 -f60 208 -f61 0000000204 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 242 -f60 79 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 250 -f60 87895654 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 292 -f60 93 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 299 -f60 899 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 321 -f60 NULL -f61 0000000765 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 323 -f60 14376 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 340 -f60 9984376 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 394 -f60 41 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 424 -f60 89 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 441 -f60 16546 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 500 -f60 NULL -f61 0000000900 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 500 -f60 NULL -f61 0000000900 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 500 -f60 NULL -f61 0000000900 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 660 -f60 876546 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 987 -f60 41 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 2550 -f60 775654 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 2760 -f60 985654 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 3330 -f60 764376 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 3410 -f60 996546 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 7876 -f60 74 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 9112 -f60 NULL -f61 0000008771 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 76710 -f60 226546 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 569300 -f60 9114376 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -CREATE or REPLACE VIEW v1 AS select * -FROM test.tb2 WITH CASCADED CHECK OPTION ; -select * FROM v1 order by f59,f60,f61,f62,f63,f64 limit 0,10; -f59 1 -f60 1 -f61 0000000001 -f62 0000000000000000000000000000000000000000000000000000000000000001 -f63 0000000001 -f64 0000000000000000000000000000000000000000000000000000000000000001 -f65 -5 -f66 0.000000000000000000000000000000 -f67 1 -f68 0.000000000000000000000000000000 -f69 0000000001 -f70 000000000000000000000000000000000.000000000000000000000000000000 -f71 0000000001 -f72 000000000000000000000000000000000.000000000000000000000000000000 -f73 -1.17549435e-38 -f74 1.175494352e-38 -f75 00000001.175494352e-38 -f76 00000001.175494352e-38 -f77 -1.17549435e-38 -f78 1.175494352e-38 -f79 00000001.175494352e-38 -f80 00000001.175494352e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.17549435e-38 -f95 1.17549e-38 -f96 1.175494352e-38 -f97 01.17549e-38 -f98 00000001.175494352e-38 -f99 01.17549e-38 -f100 00000001.175494352e-38 -f101 1000-01-01 -f102 838:59:58 -f103 1970-01-02 00:00:01 -f104 1970-01-02 00:00:01 -f105 1902 -f106 1902 -f107 1902 -f108 2enum -f109 2set -f59 2 -f60 2 -f61 0000000002 -f62 0000000000000000000000000000000000000000000000000000000000000002 -f63 0000000002 -f64 0000000000000000000000000000000000000000000000000000000000000002 -f65 -4 -f66 1.100000000000000000000000000000 -f67 2 -f68 1.100000000000000000000000000000 -f69 0000000002 -f70 000000000000000000000000000000001.100000000000000000000000000000 -f71 0000000002 -f72 000000000000000000000000000000001.100000000000000000000000000000 -f73 -1.175494349e-38 -f74 1.175494353e-38 -f75 00000001.175494353e-38 -f76 00000001.175494353e-38 -f77 -1.175494349e-38 -f78 1.175494353e-38 -f79 00000001.175494353e-38 -f80 00000001.175494353e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494349e-38 -f95 1.17549e-38 -f96 1.175494353e-38 -f97 01.17549e-38 -f98 00000001.175494353e-38 -f99 01.17549e-38 -f100 00000001.175494353e-38 -f101 1000-01-02 -f102 838:59:57 -f103 1970-01-03 00:00:02 -f104 1970-01-03 00:00:02 -f105 1903 -f106 1903 -f107 1903 -f108 1enum -f109 1set,2set -f59 3 -f60 3 -f61 0000000003 -f62 0000000000000000000000000000000000000000000000000000000000000003 -f63 0000000003 -f64 0000000000000000000000000000000000000000000000000000000000000003 -f65 -3 -f66 2.200000000000000000000000000000 -f67 3 -f68 2.200000000000000000000000000000 -f69 0000000003 -f70 000000000000000000000000000000002.200000000000000000000000000000 -f71 0000000003 -f72 000000000000000000000000000000002.200000000000000000000000000000 -f73 -1.175494348e-38 -f74 1.175494354e-38 -f75 00000001.175494354e-38 -f76 00000001.175494354e-38 -f77 -1.175494348e-38 -f78 1.175494354e-38 -f79 00000001.175494354e-38 -f80 00000001.175494354e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494348e-38 -f95 1.17549e-38 -f96 1.175494354e-38 -f97 01.17549e-38 -f98 00000001.175494354e-38 -f99 01.17549e-38 -f100 00000001.175494354e-38 -f101 1000-01-03 -f102 838:59:56 -f103 1970-01-04 00:00:03 -f104 1970-01-04 00:00:03 -f105 1904 -f106 1904 -f107 1904 -f108 2enum -f109 1set -f59 4 -f60 4 -f61 0000000004 -f62 0000000000000000000000000000000000000000000000000000000000000004 -f63 0000000004 -f64 0000000000000000000000000000000000000000000000000000000000000004 -f65 -2 -f66 3.300000000000000000000000000000 -f67 4 -f68 3.300000000000000000000000000000 -f69 0000000004 -f70 000000000000000000000000000000003.300000000000000000000000000000 -f71 0000000004 -f72 000000000000000000000000000000003.300000000000000000000000000000 -f73 -1.175494347e-38 -f74 1.175494355e-38 -f75 00000001.175494355e-38 -f76 00000001.175494355e-38 -f77 -1.175494347e-38 -f78 1.175494355e-38 -f79 00000001.175494355e-38 -f80 00000001.175494355e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494347e-38 -f95 1.17549e-38 -f96 1.175494355e-38 -f97 01.17549e-38 -f98 00000001.175494355e-38 -f99 01.17549e-38 -f100 00000001.175494355e-38 -f101 1000-01-04 -f102 838:59:55 -f103 1970-01-05 00:00:04 -f104 1970-01-05 00:00:04 -f105 1905 -f106 1905 -f107 1905 -f108 1enum -f109 2set -f59 4 -f60 74 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 5 -f60 5 -f61 0000000005 -f62 0000000000000000000000000000000000000000000000000000000000000005 -f63 0000000005 -f64 0000000000000000000000000000000000000000000000000000000000000005 -f65 -1 -f66 4.400000000000000000000000000000 -f67 5 -f68 4.400000000000000000000000000000 -f69 0000000005 -f70 000000000000000000000000000000004.400000000000000000000000000000 -f71 0000000005 -f72 000000000000000000000000000000004.400000000000000000000000000000 -f73 -1.175494346e-38 -f74 1.175494356e-38 -f75 00000001.175494356e-38 -f76 00000001.175494356e-38 -f77 -1.175494346e-38 -f78 1.175494356e-38 -f79 00000001.175494356e-38 -f80 00000001.175494356e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494346e-38 -f95 1.17549e-38 -f96 1.175494356e-38 -f97 01.17549e-38 -f98 00000001.175494356e-38 -f99 01.17549e-38 -f100 00000001.175494356e-38 -f101 1000-01-05 -f102 838:59:54 -f103 1970-01-06 00:00:05 -f104 1970-01-06 00:00:05 -f105 1906 -f106 1906 -f107 1906 -f108 2enum -f109 1set,2set -f59 6 -f60 6 -f61 0000000006 -f62 0000000000000000000000000000000000000000000000000000000000000006 -f63 0000000006 -f64 0000000000000000000000000000000000000000000000000000000000000006 -f65 0 -f66 5.500000000000000000000000000000 -f67 6 -f68 5.500000000000000000000000000000 -f69 0000000006 -f70 000000000000000000000000000000005.500000000000000000000000000000 -f71 0000000006 -f72 000000000000000000000000000000005.500000000000000000000000000000 -f73 -1.175494345e-38 -f74 1.175494357e-38 -f75 00000001.175494357e-38 -f76 00000001.175494357e-38 -f77 -1.175494345e-38 -f78 1.175494357e-38 -f79 00000001.175494357e-38 -f80 00000001.175494357e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494345e-38 -f95 1.17549e-38 -f96 1.175494357e-38 -f97 01.17549e-38 -f98 00000001.175494357e-38 -f99 01.17549e-38 -f100 00000001.175494357e-38 -f101 1000-01-06 -f102 838:59:53 -f103 1970-01-07 00:00:06 -f104 1970-01-07 00:00:06 -f105 1907 -f106 1907 -f107 1907 -f108 1enum -f109 1set -f59 7 -f60 7 -f61 0000000007 -f62 0000000000000000000000000000000000000000000000000000000000000007 -f63 0000000007 -f64 0000000000000000000000000000000000000000000000000000000000000007 -f65 1 -f66 6.600000000000000000000000000000 -f67 7 -f68 6.600000000000000000000000000000 -f69 0000000007 -f70 000000000000000000000000000000006.600000000000000000000000000000 -f71 0000000007 -f72 000000000000000000000000000000006.600000000000000000000000000000 -f73 -1.175494344e-38 -f74 1.175494358e-38 -f75 00000001.175494358e-38 -f76 00000001.175494358e-38 -f77 -1.175494344e-38 -f78 1.175494358e-38 -f79 00000001.175494358e-38 -f80 00000001.175494358e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494344e-38 -f95 1.17549e-38 -f96 1.175494358e-38 -f97 01.17549e-38 -f98 00000001.175494358e-38 -f99 01.17549e-38 -f100 00000001.175494358e-38 -f101 1000-01-07 -f102 838:59:52 -f103 1970-01-08 00:00:07 -f104 1970-01-08 00:00:07 -f105 1908 -f106 1908 -f107 1908 -f108 2enum -f109 2set -f59 8 -f60 8 -f61 0000000008 -f62 0000000000000000000000000000000000000000000000000000000000000008 -f63 0000000008 -f64 0000000000000000000000000000000000000000000000000000000000000008 -f65 2 -f66 7.700000000000000000000000000000 -f67 8 -f68 7.700000000000000000000000000000 -f69 0000000008 -f70 000000000000000000000000000000007.700000000000000000000000000000 -f71 0000000008 -f72 000000000000000000000000000000007.700000000000000000000000000000 -f73 -1.175494343e-38 -f74 1.175494359e-38 -f75 00000001.175494359e-38 -f76 00000001.175494359e-38 -f77 -1.175494343e-38 -f78 1.175494359e-38 -f79 00000001.175494359e-38 -f80 00000001.175494359e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494343e-38 -f95 1.17549e-38 -f96 1.175494359e-38 -f97 01.17549e-38 -f98 00000001.175494359e-38 -f99 01.17549e-38 -f100 00000001.175494359e-38 -f101 1000-01-08 -f102 838:59:51 -f103 1970-01-09 00:00:08 -f104 1970-01-09 00:00:08 -f105 1909 -f106 1909 -f107 1909 -f108 1enum -f109 1set,2set -f59 9 -f60 9 -f61 0000000009 -f62 0000000000000000000000000000000000000000000000000000000000000009 -f63 0000000009 -f64 0000000000000000000000000000000000000000000000000000000000000009 -f65 3 -f66 8.800000000000000000000000000000 -f67 9 -f68 8.800000000000000000000000000000 -f69 0000000009 -f70 000000000000000000000000000000008.800000000000000000000000000000 -f71 0000000009 -f72 000000000000000000000000000000008.800000000000000000000000000000 -f73 -1.175494342e-38 -f74 1.17549436e-38 -f75 000000001.17549436e-38 -f76 000000001.17549436e-38 -f77 -1.175494342e-38 -f78 1.17549436e-38 -f79 000000001.17549436e-38 -f80 000000001.17549436e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494342e-38 -f95 1.17549e-38 -f96 1.17549436e-38 -f97 01.17549e-38 -f98 000000001.17549436e-38 -f99 01.17549e-38 -f100 000000001.17549436e-38 -f101 1000-01-09 -f102 838:59:50 -f103 1970-01-10 00:00:09 -f104 1970-01-10 00:00:09 -f105 1910 -f106 1910 -f107 1910 -f108 2enum -f109 1set -CREATE OR REPLACE VIEW v1 AS SELECT F59, F60 -FROM test.tb2 WITH CASCADED CHECK OPTION; -SELECT * FROM v1 order by f59,f60 limit 0,10; -F59 F60 -1 1 -2 2 -3 3 -4 4 -4 74 -5 5 -6 6 -7 7 -8 8 -9 9 -CREATE or REPLACE VIEW v1 AS select f59, f60 -from test.tb2 where f59=3330 ; -select * FROM v1 order by f60 limit 0,10; -f59 f60 -3330 764376 -DROP VIEW v1 ; -DROP TABLE t1 ; - -Testcase 3.3.1.2 --------------------------------------------------------------------------------- -DROP TABLE IF EXISTS t1 ; -DROP VIEW IF EXISTS v1 ; -DROP VIEW IF EXISTS v2 ; -CREATE TABLE t1 (f1 BIGINT) ; -SET @x=0; -CREATE or REPLACE VIEW v1 AS Select 1 INTO @x; -ERROR HY000: View's SELECT contains a 'INTO' clause -Select @x; -@x -0 -CREATE or REPLACE VIEW v1 AS Select 1 -FROM (SELECT 1 FROM t1) my_table; -ERROR HY000: View's SELECT contains a subquery in the FROM clause -CREATE VIEW v1 AS SELECT f1 FROM t1; -CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW SET @a:=1 ; -SET @a:=0 ; -SELECT @a ; -@a -0 -INSERT INTO v1 VALUES (1) ; -SELECT @a ; -@a -1 -SELECT * FROM t1; -f1 -1 -DROP TRIGGER tr1 ; -SET @a:=0 ; -CREATE TRIGGER tr1 BEFORE INSERT ON v1 FOR EACH ROW SET @a:=1 ; -ERROR HY000: 'test.v1' is not BASE TABLE -RENAME TABLE v1 TO v2; -RENAME VIEW v2 TO v1; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VIEW v2 TO v1' at line 1 -ALTER TABLE v2 RENAME AS v1; -ERROR HY000: 'test.v2' is not BASE TABLE -ALTER VIEW v1 RENAME AS v2; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'RENAME AS v2' at line 1 -DROP TABLE IF EXISTS t1, t2 ; -DROP VIEW IF EXISTS v1 ; -DROP VIEW IF EXISTS v2 ; -CREATE TABLE t1 ( f1 DATE, f2 BLOB, f3 DOUBLE ); -CREATE VIEW v1 AS SELECT f1, f2, f3 FROM t1; -ALTER TABLE t1 ADD PRIMARY KEY(f1); -ALTER TABLE v1 ADD PRIMARY KEY(f1); -ERROR HY000: 'test.v1' is not BASE TABLE -ALTER VIEW v1 ADD PRIMARY KEY(f1); -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ADD PRIMARY KEY(f1)' at line 1 -CREATE INDEX t1_idx ON t1(f3); -CREATE INDEX v1_idx ON v1(f3); -ERROR HY000: 'test.v1' is not BASE TABLE -DROP TABLE t1; -DROP VIEW v1; - -Testcase 3.3.1.3 + 3.1.1.4 --------------------------------------------------------------------------------- -DROP VIEW IF EXISTS v1 ; -CREATE VIEW v1 or REPLACE AS Select * from tb2 my_table; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'or REPLACE AS Select * from tb2 my_table' at line 1 -CREATE VIEW v1 WITH CASCADED CHECK OPTION AS Select * -from tb2 my_table limit 50; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CASCADED CHECK OPTION AS Select * -from tb2 my_table limit 50' at line 1 -CREATE VIEW v1 WITH LOCAL CHECK OPTION AS Select * -from tb2 my_table limit 50; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LOCAL CHECK OPTION AS Select * -from tb2 my_table limit 50' at line 1 -SELECT * FROM tb2 my_table CREATE VIEW As v1; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CREATE VIEW As v1' at line 1 -CREATE or REPLACE VIEW v1 Select f59, f60 -from test.tb2 my_table where f59 = 250 ; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Select f59, f60 -from test.tb2 my_table where f59 = 250' at line 1 -CREATE OR REPLACE VIEW v1 AS SELECT F59, F60 -FROM test.tb2 my_table WITH CASCADED CHECK OPTION; -DROP VIEW v1; -REPLACE OR CREATE VIEW v1 AS SELECT F59, F60 -FROM test.tb2 my_table WITH CASCADED CHECK OPTION; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OR CREATE VIEW v1 AS SELECT F59, F60 -FROM test.tb2 my_table WITH CASCADED CHECK ' at line 1 -CREATE OR REPLACE VIEW v1 SELECT AS F59, F60 -FROM test.tb2 my_table WITH CASCADED CHECK OPTION; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT AS F59, F60 -FROM test.tb2 my_table WITH CASCADED CHECK OPTION' at line 1 -CREATE OR REPLACE VIEW v1 AS SELECT F59, F60 -FROM test.tb2 my_table CASCADED WITH CHECK OPTION; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CASCADED WITH CHECK OPTION' at line 2 -CREATE OR REPLACE VIEW v1 AS SELECT F59, F60 -FROM test.tb2 my_table WITH CASCADED OPTION CHECK; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OPTION CHECK' at line 2 -CREATE OR REPLACE VIEW v1 AS SELECT F59, F60 -FROM test.tb2 my_table CHECK OPTION WITH CASCADED; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CHECK OPTION WITH CASCADED' at line 2 -CREATE OR REPLACE VIEW v1 WITH CASCADED CHECK OPTION -AS SELECT F59, F60 FROM test.tb2 my_table; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CASCADED CHECK OPTION -AS SELECT F59, F60 FROM test.tb2 my_table' at line 1 -CREATE OR REPLACE AS SELECT F59, F60 -FROM test.tb2 my_table VIEW v1 WITH CASCADED CHECK OPTION; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AS SELECT F59, F60 -FROM test.tb2 my_table VIEW v1 WITH CASCADED CHECK OPTION' at line 1 -CREATE OR REPLACE AS SELECT F59, F60 -FROM test.tb2 my_table WITH CASCADED CHECK OPTION VIEW v1; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AS SELECT F59, F60 -FROM test.tb2 my_table WITH CASCADED CHECK OPTION VIEW v1' at line 1 -REPLACE OR CREATE VIEW v1 AS SELECT F59, F60 -FROM test.tb2 my_table WITH LOCAL CHECK OPTION; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OR CREATE VIEW v1 AS SELECT F59, F60 -FROM test.tb2 my_table WITH LOCAL CHECK OPT' at line 1 -CREATE OR REPLACE VIEW v1 SELECT AS F59, F60 -FROM test.tb2 my_table WITH LOCAL CHECK OPTION; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT AS F59, F60 -FROM test.tb2 my_table WITH LOCAL CHECK OPTION' at line 1 -CREATE OR REPLACE VIEW v1 AS SELECT F59, F60 -FROM test.tb2 my_table LOCAL WITH CHECK OPTION; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LOCAL WITH CHECK OPTION' at line 2 -CREATE OR REPLACE VIEW v1 AS SELECT F59, F60 -FROM test.tb2 my_table WITH LOCAL OPTION CHECK; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OPTION CHECK' at line 2 -CREATE OR REPLACE VIEW v1 AS SELECT F59, F60 -FROM test.tb2 my_table CHECK OPTION WITH LOCAL; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CHECK OPTION WITH LOCAL' at line 2 -CREATE OR REPLACE VIEW v1 WITH CASCADED CHECK OPTION -AS SELECT F59, F60 FROM test.tb2 my_table; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CASCADED CHECK OPTION -AS SELECT F59, F60 FROM test.tb2 my_table' at line 1 -CREATE OR REPLACE AS SELECT F59, F60 -FROM test.tb2 my_table VIEW v1 WITH LOCAL CHECK OPTION; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AS SELECT F59, F60 -FROM test.tb2 my_table VIEW v1 WITH LOCAL CHECK OPTION' at line 1 -CREATE OR REPLACE AS SELECT F59, F60 -FROM test.tb2 my_table WITH LOCAL CHECK OPTION VIEW v1; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AS SELECT F59, F60 -FROM test.tb2 my_table WITH LOCAL CHECK OPTION VIEW v1' at line 1 -Drop table if exists t1 ; -CREATE table t1 (f1 int ,f2 int) ; -INSERT INTO t1 values (235, 22); -INSERT INTO t1 values (554, 11); -CREATE or REPLACE view v1 as (Select from f59 tb2) -Union ALL (Select from f1 t1); -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'from f59 tb2) -Union ALL (Select from f1 t1)' at line 1 -CREATE or REPLACE view v1 as Select f59, f60 -from tb2 by order f59; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'by order f59' at line 2 -CREATE or REPLACE view v1 as Select f59, f60 -from tb2 by group f59 ; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'by group f59' at line 2 - -Testcase 3.3.1.5 --------------------------------------------------------------------------------- -DROP VIEW IF EXISTS v1 ; -CREATE VIEW v1 SELECT * FROM tb2; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT * FROM tb2' at line 1 -CREATE v1 AS SELECT * FROM tb2; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'v1 AS SELECT * FROM tb2' at line 1 -VIEW v1 AS SELECT * FROM tb2; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VIEW v1 AS SELECT * FROM tb2' at line 1 -CREATE VIEW v1 AS SELECT 1; -DROP VIEW v1; -VIEW v1 AS SELECT 1; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VIEW v1 AS SELECT 1' at line 1 -CREATE v1 AS SELECT 1; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'v1 AS SELECT 1' at line 1 -CREATE VIEW AS SELECT 1; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AS SELECT 1' at line 1 -CREATE VIEW v1 SELECT 1; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT 1' at line 1 -CREATE VIEW v1 AS ; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 - -Testcase 3.3.1.6 --------------------------------------------------------------------------------- -DROP VIEW IF EXISTS v1 ; -CREATE or REPLACE VIEW v1 -as SELECT * from tb2; -CREATE or REPLACE ALGORITHM = UNDEFINED VIEW v1 -as SELECT * from tb2; -CREATE or REPLACE ALGORITHM = MERGE VIEW v1 -as SELECT * from tb2; -CREATE or REPLACE ALGORITHM = TEMPTABLE VIEW v1 -as SELECT * from tb2; -CREATE or REPLACE ALGORITHM = TEMPTABLE VIEW v1 -as SELECT * from tb2; -CREATE or REPLACE = TEMPTABLE VIEW v1 -as SELECT * from tb2; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '= TEMPTABLE VIEW v1 -as SELECT * from tb2' at line 1 -CREATE or REPLACE ALGORITHM TEMPTABLE VIEW v1 -as SELECT * from tb2; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TEMPTABLE VIEW v1 -as SELECT * from tb2' at line 1 -CREATE or REPLACE ALGORITHM = VIEW v1 -as SELECT * from tb2; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VIEW v1 -as SELECT * from tb2' at line 1 -CREATE or REPLACE TEMPTABLE = ALGORITHM VIEW v1 -as SELECT * from tb2; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TEMPTABLE = ALGORITHM VIEW v1 -as SELECT * from tb2' at line 1 -CREATE or REPLACE TEMPTABLE - ALGORITHM VIEW v1 -as SELECT * from tb2; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TEMPTABLE - ALGORITHM VIEW v1 -as SELECT * from tb2' at line 1 -CREATE or REPLACE GARBAGE = TEMPTABLE VIEW v1 -as SELECT * from tb2; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GARBAGE = TEMPTABLE VIEW v1 -as SELECT * from tb2' at line 1 -CREATE or REPLACE ALGORITHM = GARBAGE VIEW v1 -as SELECT * from tb2; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GARBAGE VIEW v1 -as SELECT * from tb2' at line 1 -Drop view if exists v1 ; -CREATE or REPLACE VIEW v1 -AS SELECT * from tb2 where f59 < 1; -CREATE or REPLACE VIEW v1 -AS SELECT * from tb2 where f59 < 1 WITH CHECK OPTION; -CREATE or REPLACE VIEW v1 -AS SELECT * from tb2 where f59 < 1 WITH CASCADED CHECK OPTION; -CREATE or REPLACE VIEW v1 -AS SELECT * from tb2 where f59 < 1 WITH LOCAL CHECK OPTION; -CREATE or REPLACE VIEW v1 -AS SELECT * from tb2 where f59 < 1 WITH NO CHECK OPTION; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NO CHECK OPTION' at line 2 -CREATE or REPLACE VIEW v1 -AS SELECT * from tb2 where f59 < 1 CASCADED CHECK OPTION; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CASCADED CHECK OPTION' at line 2 -CREATE or REPLACE VIEW v1 -AS SELECT * from tb2 where f59 < 1 WITH CASCADED OPTION; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OPTION' at line 2 -CREATE or REPLACE VIEW v1 -AS SELECT * from tb2 where f59 < 1 WITH CASCADED CHECK ; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 2 - -Testcase 3.3.1.7 --------------------------------------------------------------------------------- -DROP VIEW IF EXISTS v1 ; -Create view test.v1 AS Select * from test.tb2; -Alter view test.v1 AS Select F59 from test. tb2 limit 100 ; -Drop view test.v1 ; -Create view v1 AS Select * from test.tb2 limit 100 ; -Alter view v1 AS Select F59 from test.tb2 limit 100 ; -Drop view v1 ; - -Testcase 3.3.1.A0 --------------------------------------------------------------------------------- -DROP TABLE IF EXISTS t1 ; -DROP VIEW IF EXISTS v1 ; -DROP VIEW IF EXISTS V1 ; -CREATE TABLE t1 (f1 NUMERIC(4)) ENGINE = ndb; -INSERT INTO t1 VALUES(1111), (2222); -CREATE VIEW v1 AS SELECT * FROM t1 WHERE f1 = 1111; -CREATE VIEW V1 AS SELECT * FROM t1 WHERE f1 = 2222; -SELECT * FROM v1; -f1 -1111 -DROP TABLE IF EXISTS t1 ; -DROP VIEW IF EXISTS v1 ; -DROP VIEW IF EXISTS V1 ; - -Testcase 3.3.1.8 --------------------------------------------------------------------------------- -Create view select AS Select * from test.tb2 limit 100; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'select AS Select * from test.tb2 limit 100' at line 1 -Create view as AS Select * from test.tb2 limit 100; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'as AS Select * from test.tb2 limit 100' at line 1 -Create view where AS Select * from test.tb2 limit 100; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where AS Select * from test.tb2 limit 100' at line 1 -Create view from AS Select * from test.tb2 limit 100; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'from AS Select * from test.tb2 limit 100' at line 1 -Create view while AS Select * from test.tb2 limit 100; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'while AS Select * from test.tb2 limit 100' at line 1 -Create view asdkj*(&*&&^ as Select * from test.tb2 limit 100 ; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '*(&*&&^ as Select * from test.tb2 limit 100' at line 1 -Drop view if exists test.procedure ; -Create view test.procedure as Select * from test.tb2 limit 100 ; -Drop view if exists test.procedure ; - -Testcase 3.3.1.9 --------------------------------------------------------------------------------- -Drop TABLE IF EXISTS t1 ; -Drop VIEW IF EXISTS v1; -Drop VIEW IF EXISTS v2; -Drop VIEW IF EXISTS v3; -CREATE TABLE t1 ( f1 char(5)); -INSERT INTO t1 SET f1 = 'abcde'; -CREATE VIEW v1 AS SELECT f1 FROM t1; -CREATE VIEW v2 AS SELECT * FROM v1; -DROP TABLE t1; -SELECT * FROM v1; -ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them -DELETE FROM v1; -ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them -UPDATE v1 SET f1 = 'aaaaa'; -ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them -INSERT INTO v1 SET f1 = "fffff"; -ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them -SELECT * FROM v2; -ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them -DELETE FROM v2; -ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them -UPDATE v2 SET f1 = 'aaaaa'; -ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them -INSERT INTO v2 SET f1 = "fffff"; -ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them -DROP VIEW v1; -SELECT * FROM v2; -ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them -DELETE FROM v2; -ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them -UPDATE v2 SET f1 = 'aaaaa'; -ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them -INSERT INTO v2 SET f1 = "fffff"; -ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them -DROP VIEW v2; -DROP TABLE IF EXISTS t1 ; -DROP VIEW IF EXISTS v1 ; -CREATE TABLE t1 (f1 FLOAT); -CREATE VIEW v1 AS SELECT * FROM v1; -ERROR 42S02: Table 'test.v1' doesn't exist -CREATE VIEW v1 AS SELECT * FROM t1; -CREATE or REPLACE VIEW v1 AS SELECT * FROM v1; -ERROR 42S02: Table 'test.v1' doesn't exist -DROP VIEW v1; -DROP TABLE t1; - -Testcase 3.3.1.10 --------------------------------------------------------------------------------- -Drop view if exists test.v1 ; -Create view test.v1 AS Select * from test.tb2 ; -Create view test.v1 AS Select F59 from test.tb2 ; -ERROR 42S01: Table 'v1' already exists -Create view v1 AS Select F59 from test.tb2 ; -ERROR 42S01: Table 'v1' already exists - -Testcase 3.3.1.11 --------------------------------------------------------------------------------- -Create view test.tb2 AS Select f59,f60 from test.tb2 limit 100 ; -ERROR 42S01: Table 'tb2' already exists -Create view tb2 AS Select f59,f60 from test.tb2 limit 100 ; -ERROR 42S01: Table 'tb2' already exists -Drop view if exists test.v111 ; -Create view test.v111 as select * from tb2 limit 50; -Create table test.v111(f1 int ); -ERROR 42S01: Table 'v111' already exists -Create table v111(f1 int ); -ERROR 42S01: Table 'v111' already exists -DROP VIEW test.v111; - -Testcase 3.3.1.12 --------------------------------------------------------------------------------- -USE test; -Drop database if exists test2 ; -Create database test2 ; -DROP TABLE IF EXISTS test.t0, test.t1, test.t2; -DROP VIEW IF EXISTS test.v1; -DROP VIEW IF EXISTS test.v2; -CREATE TABLE test.t1 ( f1 VARCHAR(20)); -CREATE TABLE test2.t1 ( f1 VARCHAR(20)); -CREATE TABLE test.t2 ( f1 VARCHAR(20)); -CREATE TABLE test2.v1 ( f1 VARCHAR(20)); -CREATE TABLE test.t0 ( f1 VARCHAR(20)); -CREATE TABLE test2.t0 ( f1 VARCHAR(20)); -CREATE VIEW test2.t2 AS SELECT * FROM test2.t0; -CREATE VIEW test.v1 AS SELECT * FROM test.t0; -CREATE VIEW test.v2 AS SELECT * FROM test.t0; -CREATE VIEW test2.v2 AS SELECT * FROM test2.t0; -INSERT INTO test.t1 VALUES('test.t1 - 1'); -INSERT INTO test2.t1 VALUES('test2.t1 - 1'); -INSERT INTO test.t2 VALUES('test.t2 - 1'); -INSERT INTO test2.v1 VALUES('test2.v1 - 1'); -INSERT INTO test.t0 VALUES('test.t0 - 1'); -INSERT INTO test2.t0 VALUES('test2.t0 - 1'); -USE test; -INSERT INTO t1 VALUES('test.t1 - 2'); -INSERT INTO t2 VALUES('test.t2 - 2'); -INSERT INTO t0 VALUES('test.t0 - 2'); -USE test2; -INSERT INTO t1 VALUES('test2.t1 - 2'); -INSERT INTO v1 VALUES('test2.v1 - 2'); -INSERT INTO t0 VALUES('test2.t0 - 2'); -SELECT * FROM t1; -f1 -test2.t1 - 1 -test2.t1 - 2 -SELECT * FROM t2; -f1 -test2.t0 - 1 -test2.t0 - 2 -SELECT * FROM v1; -f1 -test2.v1 - 1 -test2.v1 - 2 -SELECT * FROM v2; -f1 -test2.t0 - 1 -test2.t0 - 2 -USE test; -SELECT * FROM t1; -f1 -test.t1 - 1 -test.t1 - 2 -SELECT * FROM t2; -f1 -test.t2 - 1 -test.t2 - 2 -SELECT * FROM v1; -f1 -test.t0 - 1 -test.t0 - 2 -SELECT * FROM v2; -f1 -test.t0 - 1 -test.t0 - 2 - -Testcase 3.3.1.13 --------------------------------------------------------------------------------- -DROP TABLE IF EXISTS t1; -DROP VIEW IF EXISTS v1; -CREATE TABLE t1 (f1 BIGINT); -INSERT INTO t1 VALUES(1); -CREATE VIEW test.v1 AS SELECT * FROM t1 limit 2; -SHOW CREATE VIEW test.v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` limit 2 latin1 latin1_swedish_ci -SELECT * FROM test.v1; -f1 -1 -CREATE OR REPLACE ALGORITHM = TEMPTABLE VIEW test.v1 -AS SELECT * FROM t1 limit 2; -SHOW CREATE VIEW test.v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=TEMPTABLE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` limit 2 latin1 latin1_swedish_ci -SELECT * FROM test.v1; -f1 -1 -CREATE OR REPLACE VIEW test.v1 AS SELECT * FROM tb2 order by f59 limit 2; -SHOW CREATE VIEW test.v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `tb2`.`f59` AS `f59`,`tb2`.`f60` AS `f60`,`tb2`.`f61` AS `f61`,`tb2`.`f62` AS `f62`,`tb2`.`f63` AS `f63`,`tb2`.`f64` AS `f64`,`tb2`.`f65` AS `f65`,`tb2`.`f66` AS `f66`,`tb2`.`f67` AS `f67`,`tb2`.`f68` AS `f68`,`tb2`.`f69` AS `f69`,`tb2`.`f70` AS `f70`,`tb2`.`f71` AS `f71`,`tb2`.`f72` AS `f72`,`tb2`.`f73` AS `f73`,`tb2`.`f74` AS `f74`,`tb2`.`f75` AS `f75`,`tb2`.`f76` AS `f76`,`tb2`.`f77` AS `f77`,`tb2`.`f78` AS `f78`,`tb2`.`f79` AS `f79`,`tb2`.`f80` AS `f80`,`tb2`.`f81` AS `f81`,`tb2`.`f82` AS `f82`,`tb2`.`f83` AS `f83`,`tb2`.`f84` AS `f84`,`tb2`.`f85` AS `f85`,`tb2`.`f86` AS `f86`,`tb2`.`f87` AS `f87`,`tb2`.`f88` AS `f88`,`tb2`.`f89` AS `f89`,`tb2`.`f90` AS `f90`,`tb2`.`f91` AS `f91`,`tb2`.`f92` AS `f92`,`tb2`.`f93` AS `f93`,`tb2`.`f94` AS `f94`,`tb2`.`f95` AS `f95`,`tb2`.`f96` AS `f96`,`tb2`.`f97` AS `f97`,`tb2`.`f98` AS `f98`,`tb2`.`f99` AS `f99`,`tb2`.`f100` AS `f100`,`tb2`.`f101` AS `f101`,`tb2`.`f102` AS `f102`,`tb2`.`f103` AS `f103`,`tb2`.`f104` AS `f104`,`tb2`.`f105` AS `f105`,`tb2`.`f106` AS `f106`,`tb2`.`f107` AS `f107`,`tb2`.`f108` AS `f108`,`tb2`.`f109` AS `f109` from `tb2` order by `tb2`.`f59` limit 2 latin1 latin1_swedish_ci -SELECT * FROM test.v1 order by f59,f60,f61,f62,f63,f64,f65; -f59 1 -f60 1 -f61 0000000001 -f62 0000000000000000000000000000000000000000000000000000000000000001 -f63 0000000001 -f64 0000000000000000000000000000000000000000000000000000000000000001 -f65 -5 -f66 0.000000000000000000000000000000 -f67 1 -f68 0.000000000000000000000000000000 -f69 0000000001 -f70 000000000000000000000000000000000.000000000000000000000000000000 -f71 0000000001 -f72 000000000000000000000000000000000.000000000000000000000000000000 -f73 -1.17549435e-38 -f74 1.175494352e-38 -f75 00000001.175494352e-38 -f76 00000001.175494352e-38 -f77 -1.17549435e-38 -f78 1.175494352e-38 -f79 00000001.175494352e-38 -f80 00000001.175494352e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.17549435e-38 -f95 1.17549e-38 -f96 1.175494352e-38 -f97 01.17549e-38 -f98 00000001.175494352e-38 -f99 01.17549e-38 -f100 00000001.175494352e-38 -f101 1000-01-01 -f102 838:59:58 -f103 1970-01-02 00:00:01 -f104 1970-01-02 00:00:01 -f105 1902 -f106 1902 -f107 1902 -f108 2enum -f109 2set -f59 2 -f60 2 -f61 0000000002 -f62 0000000000000000000000000000000000000000000000000000000000000002 -f63 0000000002 -f64 0000000000000000000000000000000000000000000000000000000000000002 -f65 -4 -f66 1.100000000000000000000000000000 -f67 2 -f68 1.100000000000000000000000000000 -f69 0000000002 -f70 000000000000000000000000000000001.100000000000000000000000000000 -f71 0000000002 -f72 000000000000000000000000000000001.100000000000000000000000000000 -f73 -1.175494349e-38 -f74 1.175494353e-38 -f75 00000001.175494353e-38 -f76 00000001.175494353e-38 -f77 -1.175494349e-38 -f78 1.175494353e-38 -f79 00000001.175494353e-38 -f80 00000001.175494353e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494349e-38 -f95 1.17549e-38 -f96 1.175494353e-38 -f97 01.17549e-38 -f98 00000001.175494353e-38 -f99 01.17549e-38 -f100 00000001.175494353e-38 -f101 1000-01-02 -f102 838:59:57 -f103 1970-01-03 00:00:02 -f104 1970-01-03 00:00:02 -f105 1903 -f106 1903 -f107 1903 -f108 1enum -f109 1set,2set -CREATE OR REPLACE VIEW test.v1 AS SELECT F59 FROM tb2; -SHOW CREATE VIEW test.v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `tb2`.`f59` AS `F59` from `tb2` latin1 latin1_swedish_ci -SELECT * FROM test.v1 order by F59 limit 10,100; -F59 -10 -15 -17 -19 -22 -24 -27 -29 -34 -94 -107 -107 -109 -109 -195 -207 -209 -242 -250 -292 -299 -321 -323 -340 -394 -424 -441 -500 -500 -500 -660 -987 -2550 -2760 -3330 -3410 -7876 -9112 -76710 -569300 -Drop table test.t1 ; -Drop view test.v1 ; - -Testcase 3.3.1.14 --------------------------------------------------------------------------------- -CREATE OR REPLACE VIEW test.tb2 AS SELECT * From tb2 LIMIT 2; -ERROR HY000: 'test.tb2' is not VIEW -CREATE OR REPLACE VIEW tb2 AS SELECT * From tb2 LIMIT 2; -ERROR HY000: 'test.tb2' is not VIEW - -Testcase 3.3.1.15 --------------------------------------------------------------------------------- -Drop table if exists test.v1 ; -CREATE OR REPLACE view test.v1 as select * from tb2; -SELECT * FROM test.v1; -f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 -1 1 0000000001 0000000000000000000000000000000000000000000000000000000000000001 0000000001 0000000000000000000000000000000000000000000000000000000000000001 -5 0.000000000000000000000000000000 1 0.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549435e-38 1.17549e-38 1.175494352e-38 01.17549e-38 00000001.175494352e-38 01.17549e-38 00000001.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 1970-01-02 00:00:01 1902 1902 1902 2enum 2set -10 10 0000000010 0000000000000000000000000000000000000000000000000000000000000010 0000000010 0000000000000000000000000000000000000000000000000000000000000010 4 9.900000000000000000000000000000 10 9.900000000000000000000000000000 0000000010 000000000000000000000000000000009.900000000000000000000000000000 0000000010 000000000000000000000000000000009.900000000000000000000000000000 -1.175494341e-38 1.175494361e-38 00000001.175494361e-38 00000001.175494361e-38 -1.175494341e-38 1.175494361e-38 00000001.175494361e-38 00000001.175494361e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494341e-38 1.17549e-38 1.175494361e-38 01.17549e-38 00000001.175494361e-38 01.17549e-38 00000001.175494361e-38 1000-01-10 838:59:49 1970-01-11 00:00:10 1970-01-11 00:00:10 1911 1911 1911 1enum 2set -107 105 0000000106 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -107 105 0000000106 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -109 108 0000000104 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -109 108 0000000104 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -15 87 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -17 15 0000000016 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -19 18 0000000014 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -195 87 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -2 2 0000000002 0000000000000000000000000000000000000000000000000000000000000002 0000000002 0000000000000000000000000000000000000000000000000000000000000002 -4 1.100000000000000000000000000000 2 1.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494349e-38 1.17549e-38 1.175494353e-38 01.17549e-38 00000001.175494353e-38 01.17549e-38 00000001.175494353e-38 1000-01-02 838:59:57 1970-01-03 00:00:02 1970-01-03 00:00:02 1903 1903 1903 1enum 1set,2set -207 205 0000000206 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -209 208 0000000204 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -22 93 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -24 51654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -242 79 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -250 87895654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -2550 775654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -27 25 0000000026 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -2760 985654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -29 28 0000000024 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -292 93 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -299 899 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -3 3 0000000003 0000000000000000000000000000000000000000000000000000000000000003 0000000003 0000000000000000000000000000000000000000000000000000000000000003 -3 2.200000000000000000000000000000 3 2.200000000000000000000000000000 0000000003 000000000000000000000000000000002.200000000000000000000000000000 0000000003 000000000000000000000000000000002.200000000000000000000000000000 -1.175494348e-38 1.175494354e-38 00000001.175494354e-38 00000001.175494354e-38 -1.175494348e-38 1.175494354e-38 00000001.175494354e-38 00000001.175494354e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494348e-38 1.17549e-38 1.175494354e-38 01.17549e-38 00000001.175494354e-38 01.17549e-38 00000001.175494354e-38 1000-01-03 838:59:56 1970-01-04 00:00:03 1970-01-04 00:00:03 1904 1904 1904 2enum 1set -321 NULL 0000000765 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -323 14376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -3330 764376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -34 41 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -340 9984376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -3410 996546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -394 41 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -4 4 0000000004 0000000000000000000000000000000000000000000000000000000000000004 0000000004 0000000000000000000000000000000000000000000000000000000000000004 -2 3.300000000000000000000000000000 4 3.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494347e-38 1.17549e-38 1.175494355e-38 01.17549e-38 00000001.175494355e-38 01.17549e-38 00000001.175494355e-38 1000-01-04 838:59:55 1970-01-05 00:00:04 1970-01-05 00:00:04 1905 1905 1905 1enum 2set -4 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -424 89 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -441 16546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -5 5 0000000005 0000000000000000000000000000000000000000000000000000000000000005 0000000005 0000000000000000000000000000000000000000000000000000000000000005 -1 4.400000000000000000000000000000 5 4.400000000000000000000000000000 0000000005 000000000000000000000000000000004.400000000000000000000000000000 0000000005 000000000000000000000000000000004.400000000000000000000000000000 -1.175494346e-38 1.175494356e-38 00000001.175494356e-38 00000001.175494356e-38 -1.175494346e-38 1.175494356e-38 00000001.175494356e-38 00000001.175494356e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494346e-38 1.17549e-38 1.175494356e-38 01.17549e-38 00000001.175494356e-38 01.17549e-38 00000001.175494356e-38 1000-01-05 838:59:54 1970-01-06 00:00:05 1970-01-06 00:00:05 1906 1906 1906 2enum 1set,2set -500 NULL 0000000900 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -500 NULL 0000000900 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -500 NULL 0000000900 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -569300 9114376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -6 6 0000000006 0000000000000000000000000000000000000000000000000000000000000006 0000000006 0000000000000000000000000000000000000000000000000000000000000006 0 5.500000000000000000000000000000 6 5.500000000000000000000000000000 0000000006 000000000000000000000000000000005.500000000000000000000000000000 0000000006 000000000000000000000000000000005.500000000000000000000000000000 -1.175494345e-38 1.175494357e-38 00000001.175494357e-38 00000001.175494357e-38 -1.175494345e-38 1.175494357e-38 00000001.175494357e-38 00000001.175494357e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494345e-38 1.17549e-38 1.175494357e-38 01.17549e-38 00000001.175494357e-38 01.17549e-38 00000001.175494357e-38 1000-01-06 838:59:53 1970-01-07 00:00:06 1970-01-07 00:00:06 1907 1907 1907 1enum 1set -660 876546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -7 7 0000000007 0000000000000000000000000000000000000000000000000000000000000007 0000000007 0000000000000000000000000000000000000000000000000000000000000007 1 6.600000000000000000000000000000 7 6.600000000000000000000000000000 0000000007 000000000000000000000000000000006.600000000000000000000000000000 0000000007 000000000000000000000000000000006.600000000000000000000000000000 -1.175494344e-38 1.175494358e-38 00000001.175494358e-38 00000001.175494358e-38 -1.175494344e-38 1.175494358e-38 00000001.175494358e-38 00000001.175494358e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494344e-38 1.17549e-38 1.175494358e-38 01.17549e-38 00000001.175494358e-38 01.17549e-38 00000001.175494358e-38 1000-01-07 838:59:52 1970-01-08 00:00:07 1970-01-08 00:00:07 1908 1908 1908 2enum 2set -76710 226546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -7876 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -8 8 0000000008 0000000000000000000000000000000000000000000000000000000000000008 0000000008 0000000000000000000000000000000000000000000000000000000000000008 2 7.700000000000000000000000000000 8 7.700000000000000000000000000000 0000000008 000000000000000000000000000000007.700000000000000000000000000000 0000000008 000000000000000000000000000000007.700000000000000000000000000000 -1.175494343e-38 1.175494359e-38 00000001.175494359e-38 00000001.175494359e-38 -1.175494343e-38 1.175494359e-38 00000001.175494359e-38 00000001.175494359e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494343e-38 1.17549e-38 1.175494359e-38 01.17549e-38 00000001.175494359e-38 01.17549e-38 00000001.175494359e-38 1000-01-08 838:59:51 1970-01-09 00:00:08 1970-01-09 00:00:08 1909 1909 1909 1enum 1set,2set -9 9 0000000009 0000000000000000000000000000000000000000000000000000000000000009 0000000009 0000000000000000000000000000000000000000000000000000000000000009 3 8.800000000000000000000000000000 9 8.800000000000000000000000000000 0000000009 000000000000000000000000000000008.800000000000000000000000000000 0000000009 000000000000000000000000000000008.800000000000000000000000000000 -1.175494342e-38 1.17549436e-38 000000001.17549436e-38 000000001.17549436e-38 -1.175494342e-38 1.17549436e-38 000000001.17549436e-38 000000001.17549436e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494342e-38 1.17549e-38 1.17549436e-38 01.17549e-38 000000001.17549436e-38 01.17549e-38 000000001.17549436e-38 1000-01-09 838:59:50 1970-01-10 00:00:09 1970-01-10 00:00:09 1910 1910 1910 2enum 1set -9112 NULL 0000008771 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -94 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -987 41 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -Drop view test.v1 ; - -Testcase 3.3.1.16 + 3.3.1.17 --------------------------------------------------------------------------------- -Drop table if exists test.v1 ; -CREATE OR REPLACE VIEW v1 AS SELECT * From tb2; -SELECT * FROM tb2 WHERE 1 = 2; -f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 -SELECT * FROM v1 WHERE 1 = 2; -f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 -Drop view v1; -DROP TABLE IF EXISTS t1; -DROP VIEW IF EXISTS v1; -CREATE TABLE t1 (f1 NUMERIC(15,3)); -INSERT INTO t1 VALUES(8.8); -CREATE VIEW v1 AS SELECT * FROM t1; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` latin1 latin1_swedish_ci -SELECT * FROM v1; -f1 -8.800 -CREATE OR REPLACE VIEW v1 AS SELECT f1 FROM t1; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` latin1 latin1_swedish_ci -SELECT * FROM v1; -f1 -8.800 -CREATE OR REPLACE VIEW v1 AS SELECT f1 As my_column FROM t1; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `my_column` from `t1` latin1 latin1_swedish_ci -SELECT * FROM v1; -my_column -8.800 -CREATE OR REPLACE VIEW v1(column1,column2) -AS SELECT f1 As my_column, f1 FROM t1; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `column1`,`t1`.`f1` AS `column2` from `t1` latin1 latin1_swedish_ci -SELECT * FROM v1; -column1 column2 -8.800 8.800 -CREATE OR REPLACE VIEW test.v1(column1,column2) -AS SELECT f1 As my_column, f1 FROM test.t1; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `column1`,`t1`.`f1` AS `column2` from `t1` latin1 latin1_swedish_ci -SELECT * FROM v1; -column1 column2 -8.800 8.800 - -Testcase 3.3.1.18 --------------------------------------------------------------------------------- -Drop view if exists v1 ; -Drop view if exists v1_1 ; -Create view v1 -as Select test.tb2.f59 as NewNameF1, test.tb2.f60 -from test.tb2 limit 0,100 ; -Create view v1_1 -as Select test.tb2.f59 as NewNameF1, test.tb2.f60 as NewNameF2 -from tb2 limit 0,100 ; -SELECT NewNameF1,f60 FROM test.v1_1 ; -ERROR 42S22: Unknown column 'f60' in 'field list' -SELECT NewNameF1, v1_1.f60 FROM test.v1_1 ; -ERROR 42S22: Unknown column 'v1_1.f60' in 'field list' -SELECT f59, f60 FROM test.v1 ; -ERROR 42S22: Unknown column 'f59' in 'field list' -Use test ; -SELECT F59 FROM v1 ; -ERROR 42S22: Unknown column 'F59' in 'field list' - -Testcase 3.3.1.19 --------------------------------------------------------------------------------- -DROP TABLE IF EXISTS t1, t2; -DROP VIEW IF EXISTS v1; -CREATE TABLE t1( f1 BIGINT, f2 DECIMAL(5,2)); -INSERT INTO t1 VALUES(7, 7.7); -CREATE TABLE t2( f1 BIGINT, f2 DECIMAL(5,2)); -INSERT INTO t2 VALUES(6, 6.6); -CREATE VIEW v1 AS SELECT * FROM t1; -SELECT * FROM v1; -f1 f2 -7 7.70 -CREATE OR REPLACE VIEW v1 AS SELECT f1, f2 FROM t1; -SELECT * FROM v1; -f1 f2 -7 7.70 -CREATE OR REPLACE VIEW v1 AS SELECT f1 AS my_f1, f2 AS my_f2 FROM t1; -SELECT * FROM v1; -my_f1 my_f2 -7 7.70 -CREATE OR REPLACE VIEW v1 (my_f1, my_f2) AS SELECT f1, f2 FROM t1; -SELECT * FROM v1; -my_f1 my_f2 -7 7.70 -CREATE OR REPLACE VIEW v1 (my_f1, my_f2) AS SELECT t1.f1, t2.f2 FROM t1, t2; -SELECT * FROM v1; -my_f1 my_f2 -7 6.60 -SELECT f1, f2 AS f1 FROM t1; -f1 f1 -7 7.70 -CREATE OR REPLACE VIEW v1 AS SELECT f1, f2 AS f1 FROM t1; -ERROR 42S21: Duplicate column name 'f1' -SELECT t1.f1, t2.f1 AS f1 FROM t1, t2; -f1 f1 -7 6 -CREATE OR REPLACE VIEW v1 AS SELECT t1.f1, t2.f1 AS f1 FROM t1, t2; -ERROR 42S21: Duplicate column name 'f1' -CREATE OR REPLACE VIEW v1 (my_col, my_col) AS SELECT * FROM t1; -ERROR 42S21: Duplicate column name 'my_col' - -Testcase 3.3.1.20 --------------------------------------------------------------------------------- -DROP TABLE IF EXISTS t1; -CREATE TABLE t1( f1 BIGINT, f2 DECIMAL(5,2)); -CREATE OR REPLACE VIEW v1 (my_f1, my_f2) AS SELECT * FROM t1; -CREATE OR REPLACE VIEW v1 (my_f1, my_f2) AS SELECT f1, f2 FROM t1; -CREATE OR REPLACE VIEW v1 (my_f1 ) AS SELECT * FROM t1; -ERROR HY000: View's SELECT and view's field list have different column counts -CREATE OR REPLACE VIEW v1 (my_f1 ) AS SELECT f1, f2 FROM t1; -ERROR HY000: View's SELECT and view's field list have different column counts -CREATE OR REPLACE VIEW v1 (my_f1, my_f2, my_f3) AS SELECT * FROM t1; -ERROR HY000: View's SELECT and view's field list have different column counts -CREATE OR REPLACE VIEW v1 (my_f1, my_f2, my_f3) AS SELECT f1, f2 FROM t1; -ERROR HY000: View's SELECT and view's field list have different column counts - -Testcase 3.3.1.21 --------------------------------------------------------------------------------- -DROP VIEW IF EXISTS v1; -CREATE VIEW test.v1( F59, F60 ) AS SELECT F59, F60 From tb2; -SELECT * FROM test.v1 order by F59, F60 desc LIMIT 2; -F59 F60 -1 1 -2 2 -Drop view if exists test.v1 ; - -Testcase 3.3.1.22 --------------------------------------------------------------------------------- -DROP VIEW IF EXISTS v1; -CREATE VIEW test.v1( product ) AS SELECT f59*f60 From tb2 WHERE f59 < 3; -SELECT * FROM test.v1; -product -1 -4 -CREATE OR REPLACE VIEW test.v1( product ) AS SELECT 1*2; -SELECT * FROM test.v1; -product -2 -CREATE OR REPLACE VIEW test.v1( product ) AS SELECT USER(); -SELECT * FROM test.v1; -product -root@localhost -Drop view if exists test.v1 ; - -Testcase 3.3.1.23 + 3.3.1.24 --------------------------------------------------------------------------------- -USE test; -DROP TABLE IF EXISTS t1; -DROP VIEW IF EXISTS v1; -DROP VIEW IF EXISTS v2; -CREATE VIEW test.v2 AS SELECT * FROM test.t1; -ERROR 42S02: Table 'test.t1' doesn't exist -CREATE VIEW v2 AS Select * from test.v1; -ERROR 42S02: Table 'test.v1' doesn't exist -DROP VIEW IF EXISTS v2; -Warnings: -Note 1051 Unknown table 'test.v2' - -Testcase 3.3.1.25 --------------------------------------------------------------------------------- -DROP TABLE IF EXISTS t1_temp; -DROP TABLE IF EXISTS t2_temp; -DROP VIEW IF EXISTS v1; -Create table t1_temp(f59 char(10),f60 int) ; -Create temporary table t1_temp(f59 char(10),f60 int) ; -Insert into t1_temp values('FER',90); -Insert into t1_temp values('CAR',27); -Create view v1 as select * from t1_temp ; -ERROR HY000: View's SELECT refers to a temporary table 't1_temp' -Create temporary table t2_temp(f59 char(10),f60 int) ; -Insert into t2_temp values('AAA',11); -Insert into t2_temp values('BBB',22); -Create or replace view v1 -as select t1_temp.f59,t2_temp.f59 from t1_temp,t2_temp ; -ERROR HY000: View's SELECT refers to a temporary table 't1_temp' -DROP temporary table t1_temp; -DROP table t1_temp; -DROP temporary table t2_temp; -DROP TABLE IF EXISTS t1; -DROP VIEW IF EXISTS v1; -CREATE TABLE t1 (f1 char(10)); -CREATE TEMPORARY TABLE t2 (f2 char(10)); -INSERT INTO t1 VALUES('t1'); -INSERT INTO t1 VALUES('A'); -INSERT INTO t2 VALUES('t2'); -INSERT INTO t2 VALUES('B'); -CREATE OR REPLACE VIEW v1 AS SELECT f2 FROM t2; -ERROR HY000: View's SELECT refers to a temporary table 't2' -CREATE OR REPLACE VIEW v1 AS SELECT * FROM t2, t1; -ERROR HY000: View's SELECT refers to a temporary table 't2' -CREATE OR REPLACE VIEW v1 AS SELECT f2, f1 FROM t2, t1; -ERROR HY000: View's SELECT refers to a temporary table 't2' -CREATE OR REPLACE VIEW v1 AS SELECT * FROM t1, t2; -ERROR HY000: View's SELECT refers to a temporary table 't2' -CREATE OR REPLACE VIEW v1 AS SELECT f1, f2 FROM t1, t2; -ERROR HY000: View's SELECT refers to a temporary table 't2' -CREATE OR REPLACE VIEW v1 AS SELECT * FROM t2 UNION SELECT * FROM t1; -ERROR HY000: View's SELECT refers to a temporary table 't2' -CREATE OR REPLACE VIEW v1 AS SELECT f2 FROM t2 UNION SELECT f1 FROM t1; -ERROR HY000: View's SELECT refers to a temporary table 't2' -CREATE OR REPLACE VIEW v1 AS SELECT * FROM t1 UNION SELECT * FROM t2; -ERROR HY000: View's SELECT refers to a temporary table 't2' -CREATE OR REPLACE VIEW v1 AS SELECT f1 FROM t1 UNION SELECT f2 FROM t2; -ERROR HY000: View's SELECT refers to a temporary table 't2' -CREATE OR REPLACE VIEW v1 AS SELECT 1 FROM t2 -WHERE f2 = ( SELECT f1 FROM t1 ); -ERROR HY000: View's SELECT refers to a temporary table 't2' -CREATE OR REPLACE VIEW v1 AS SELECT 1 FROM t1 -WHERE f1 = ( SELECT f2 FROM t2 ); -ERROR HY000: View's SELECT refers to a temporary table 't2' -DROP TABLE t1; -DROP TEMPORARY TABLE t2; - -Testcase 3.3.1.26 --------------------------------------------------------------------------------- -DROP VIEW IF EXISTS v1; -Create view test.v1 AS Select * from test.tb2; -Select * from test.v1; -f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 -1 1 0000000001 0000000000000000000000000000000000000000000000000000000000000001 0000000001 0000000000000000000000000000000000000000000000000000000000000001 -5 0.000000000000000000000000000000 1 0.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549435e-38 1.17549e-38 1.175494352e-38 01.17549e-38 00000001.175494352e-38 01.17549e-38 00000001.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 1970-01-02 00:00:01 1902 1902 1902 2enum 2set -10 10 0000000010 0000000000000000000000000000000000000000000000000000000000000010 0000000010 0000000000000000000000000000000000000000000000000000000000000010 4 9.900000000000000000000000000000 10 9.900000000000000000000000000000 0000000010 000000000000000000000000000000009.900000000000000000000000000000 0000000010 000000000000000000000000000000009.900000000000000000000000000000 -1.175494341e-38 1.175494361e-38 00000001.175494361e-38 00000001.175494361e-38 -1.175494341e-38 1.175494361e-38 00000001.175494361e-38 00000001.175494361e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494341e-38 1.17549e-38 1.175494361e-38 01.17549e-38 00000001.175494361e-38 01.17549e-38 00000001.175494361e-38 1000-01-10 838:59:49 1970-01-11 00:00:10 1970-01-11 00:00:10 1911 1911 1911 1enum 2set -107 105 0000000106 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -107 105 0000000106 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -109 108 0000000104 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -109 108 0000000104 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -15 87 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -17 15 0000000016 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -19 18 0000000014 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -195 87 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -2 2 0000000002 0000000000000000000000000000000000000000000000000000000000000002 0000000002 0000000000000000000000000000000000000000000000000000000000000002 -4 1.100000000000000000000000000000 2 1.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494349e-38 1.17549e-38 1.175494353e-38 01.17549e-38 00000001.175494353e-38 01.17549e-38 00000001.175494353e-38 1000-01-02 838:59:57 1970-01-03 00:00:02 1970-01-03 00:00:02 1903 1903 1903 1enum 1set,2set -207 205 0000000206 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -209 208 0000000204 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -22 93 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -24 51654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -242 79 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -250 87895654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -2550 775654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -27 25 0000000026 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -2760 985654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -29 28 0000000024 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -292 93 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -299 899 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -3 3 0000000003 0000000000000000000000000000000000000000000000000000000000000003 0000000003 0000000000000000000000000000000000000000000000000000000000000003 -3 2.200000000000000000000000000000 3 2.200000000000000000000000000000 0000000003 000000000000000000000000000000002.200000000000000000000000000000 0000000003 000000000000000000000000000000002.200000000000000000000000000000 -1.175494348e-38 1.175494354e-38 00000001.175494354e-38 00000001.175494354e-38 -1.175494348e-38 1.175494354e-38 00000001.175494354e-38 00000001.175494354e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494348e-38 1.17549e-38 1.175494354e-38 01.17549e-38 00000001.175494354e-38 01.17549e-38 00000001.175494354e-38 1000-01-03 838:59:56 1970-01-04 00:00:03 1970-01-04 00:00:03 1904 1904 1904 2enum 1set -321 NULL 0000000765 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -323 14376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -3330 764376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -34 41 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -340 9984376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -3410 996546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -394 41 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -4 4 0000000004 0000000000000000000000000000000000000000000000000000000000000004 0000000004 0000000000000000000000000000000000000000000000000000000000000004 -2 3.300000000000000000000000000000 4 3.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494347e-38 1.17549e-38 1.175494355e-38 01.17549e-38 00000001.175494355e-38 01.17549e-38 00000001.175494355e-38 1000-01-04 838:59:55 1970-01-05 00:00:04 1970-01-05 00:00:04 1905 1905 1905 1enum 2set -4 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -424 89 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -441 16546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -5 5 0000000005 0000000000000000000000000000000000000000000000000000000000000005 0000000005 0000000000000000000000000000000000000000000000000000000000000005 -1 4.400000000000000000000000000000 5 4.400000000000000000000000000000 0000000005 000000000000000000000000000000004.400000000000000000000000000000 0000000005 000000000000000000000000000000004.400000000000000000000000000000 -1.175494346e-38 1.175494356e-38 00000001.175494356e-38 00000001.175494356e-38 -1.175494346e-38 1.175494356e-38 00000001.175494356e-38 00000001.175494356e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494346e-38 1.17549e-38 1.175494356e-38 01.17549e-38 00000001.175494356e-38 01.17549e-38 00000001.175494356e-38 1000-01-05 838:59:54 1970-01-06 00:00:05 1970-01-06 00:00:05 1906 1906 1906 2enum 1set,2set -500 NULL 0000000900 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -500 NULL 0000000900 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -500 NULL 0000000900 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -569300 9114376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -6 6 0000000006 0000000000000000000000000000000000000000000000000000000000000006 0000000006 0000000000000000000000000000000000000000000000000000000000000006 0 5.500000000000000000000000000000 6 5.500000000000000000000000000000 0000000006 000000000000000000000000000000005.500000000000000000000000000000 0000000006 000000000000000000000000000000005.500000000000000000000000000000 -1.175494345e-38 1.175494357e-38 00000001.175494357e-38 00000001.175494357e-38 -1.175494345e-38 1.175494357e-38 00000001.175494357e-38 00000001.175494357e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494345e-38 1.17549e-38 1.175494357e-38 01.17549e-38 00000001.175494357e-38 01.17549e-38 00000001.175494357e-38 1000-01-06 838:59:53 1970-01-07 00:00:06 1970-01-07 00:00:06 1907 1907 1907 1enum 1set -660 876546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -7 7 0000000007 0000000000000000000000000000000000000000000000000000000000000007 0000000007 0000000000000000000000000000000000000000000000000000000000000007 1 6.600000000000000000000000000000 7 6.600000000000000000000000000000 0000000007 000000000000000000000000000000006.600000000000000000000000000000 0000000007 000000000000000000000000000000006.600000000000000000000000000000 -1.175494344e-38 1.175494358e-38 00000001.175494358e-38 00000001.175494358e-38 -1.175494344e-38 1.175494358e-38 00000001.175494358e-38 00000001.175494358e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494344e-38 1.17549e-38 1.175494358e-38 01.17549e-38 00000001.175494358e-38 01.17549e-38 00000001.175494358e-38 1000-01-07 838:59:52 1970-01-08 00:00:07 1970-01-08 00:00:07 1908 1908 1908 2enum 2set -76710 226546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -7876 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -8 8 0000000008 0000000000000000000000000000000000000000000000000000000000000008 0000000008 0000000000000000000000000000000000000000000000000000000000000008 2 7.700000000000000000000000000000 8 7.700000000000000000000000000000 0000000008 000000000000000000000000000000007.700000000000000000000000000000 0000000008 000000000000000000000000000000007.700000000000000000000000000000 -1.175494343e-38 1.175494359e-38 00000001.175494359e-38 00000001.175494359e-38 -1.175494343e-38 1.175494359e-38 00000001.175494359e-38 00000001.175494359e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494343e-38 1.17549e-38 1.175494359e-38 01.17549e-38 00000001.175494359e-38 01.17549e-38 00000001.175494359e-38 1000-01-08 838:59:51 1970-01-09 00:00:08 1970-01-09 00:00:08 1909 1909 1909 1enum 1set,2set -9 9 0000000009 0000000000000000000000000000000000000000000000000000000000000009 0000000009 0000000000000000000000000000000000000000000000000000000000000009 3 8.800000000000000000000000000000 9 8.800000000000000000000000000000 0000000009 000000000000000000000000000000008.800000000000000000000000000000 0000000009 000000000000000000000000000000008.800000000000000000000000000000 -1.175494342e-38 1.17549436e-38 000000001.17549436e-38 000000001.17549436e-38 -1.175494342e-38 1.17549436e-38 000000001.17549436e-38 000000001.17549436e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494342e-38 1.17549e-38 1.17549436e-38 01.17549e-38 000000001.17549436e-38 01.17549e-38 000000001.17549436e-38 1000-01-09 838:59:50 1970-01-10 00:00:09 1970-01-10 00:00:09 1910 1910 1910 2enum 1set -9112 NULL 0000008771 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -94 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -987 41 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -Drop view test.v1 ; - -Testcase 3.3.1.27 --------------------------------------------------------------------------------- -DROP VIEW IF EXISTS test.v1; -Drop VIEW IF EXISTS test.v1_1 ; -Create view test.v1 AS Select * from test.tb2; -Create view test.v1_1 AS Select F59 from test.v1 ; -Select * from test.v1_1 order by F59 limit 2; -F59 -1 -2 -Drop view test.v1 ; -Drop view test.v1_1 ; - -Testcase 3.3.1.28 --------------------------------------------------------------------------------- -Drop database if exists test2 ; -create database test2 ; -Create view test2.v2 AS Select * from test.tb2 limit 50,50; -use test2 ; -Create view v1 AS Select * from test.tb2 limit 50 ; -Select * from v1 order by f59,f60,f61,f62,f63,f64,f65; -f59 1 -f60 1 -f61 0000000001 -f62 0000000000000000000000000000000000000000000000000000000000000001 -f63 0000000001 -f64 0000000000000000000000000000000000000000000000000000000000000001 -f65 -5 -f66 0.000000000000000000000000000000 -f67 1 -f68 0.000000000000000000000000000000 -f69 0000000001 -f70 000000000000000000000000000000000.000000000000000000000000000000 -f71 0000000001 -f72 000000000000000000000000000000000.000000000000000000000000000000 -f73 -1.17549435e-38 -f74 1.175494352e-38 -f75 00000001.175494352e-38 -f76 00000001.175494352e-38 -f77 -1.17549435e-38 -f78 1.175494352e-38 -f79 00000001.175494352e-38 -f80 00000001.175494352e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.17549435e-38 -f95 1.17549e-38 -f96 1.175494352e-38 -f97 01.17549e-38 -f98 00000001.175494352e-38 -f99 01.17549e-38 -f100 00000001.175494352e-38 -f101 1000-01-01 -f102 838:59:58 -f103 1970-01-02 00:00:01 -f104 1970-01-02 00:00:01 -f105 1902 -f106 1902 -f107 1902 -f108 2enum -f109 2set -f59 2 -f60 2 -f61 0000000002 -f62 0000000000000000000000000000000000000000000000000000000000000002 -f63 0000000002 -f64 0000000000000000000000000000000000000000000000000000000000000002 -f65 -4 -f66 1.100000000000000000000000000000 -f67 2 -f68 1.100000000000000000000000000000 -f69 0000000002 -f70 000000000000000000000000000000001.100000000000000000000000000000 -f71 0000000002 -f72 000000000000000000000000000000001.100000000000000000000000000000 -f73 -1.175494349e-38 -f74 1.175494353e-38 -f75 00000001.175494353e-38 -f76 00000001.175494353e-38 -f77 -1.175494349e-38 -f78 1.175494353e-38 -f79 00000001.175494353e-38 -f80 00000001.175494353e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494349e-38 -f95 1.17549e-38 -f96 1.175494353e-38 -f97 01.17549e-38 -f98 00000001.175494353e-38 -f99 01.17549e-38 -f100 00000001.175494353e-38 -f101 1000-01-02 -f102 838:59:57 -f103 1970-01-03 00:00:02 -f104 1970-01-03 00:00:02 -f105 1903 -f106 1903 -f107 1903 -f108 1enum -f109 1set,2set -f59 3 -f60 3 -f61 0000000003 -f62 0000000000000000000000000000000000000000000000000000000000000003 -f63 0000000003 -f64 0000000000000000000000000000000000000000000000000000000000000003 -f65 -3 -f66 2.200000000000000000000000000000 -f67 3 -f68 2.200000000000000000000000000000 -f69 0000000003 -f70 000000000000000000000000000000002.200000000000000000000000000000 -f71 0000000003 -f72 000000000000000000000000000000002.200000000000000000000000000000 -f73 -1.175494348e-38 -f74 1.175494354e-38 -f75 00000001.175494354e-38 -f76 00000001.175494354e-38 -f77 -1.175494348e-38 -f78 1.175494354e-38 -f79 00000001.175494354e-38 -f80 00000001.175494354e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494348e-38 -f95 1.17549e-38 -f96 1.175494354e-38 -f97 01.17549e-38 -f98 00000001.175494354e-38 -f99 01.17549e-38 -f100 00000001.175494354e-38 -f101 1000-01-03 -f102 838:59:56 -f103 1970-01-04 00:00:03 -f104 1970-01-04 00:00:03 -f105 1904 -f106 1904 -f107 1904 -f108 2enum -f109 1set -f59 4 -f60 4 -f61 0000000004 -f62 0000000000000000000000000000000000000000000000000000000000000004 -f63 0000000004 -f64 0000000000000000000000000000000000000000000000000000000000000004 -f65 -2 -f66 3.300000000000000000000000000000 -f67 4 -f68 3.300000000000000000000000000000 -f69 0000000004 -f70 000000000000000000000000000000003.300000000000000000000000000000 -f71 0000000004 -f72 000000000000000000000000000000003.300000000000000000000000000000 -f73 -1.175494347e-38 -f74 1.175494355e-38 -f75 00000001.175494355e-38 -f76 00000001.175494355e-38 -f77 -1.175494347e-38 -f78 1.175494355e-38 -f79 00000001.175494355e-38 -f80 00000001.175494355e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494347e-38 -f95 1.17549e-38 -f96 1.175494355e-38 -f97 01.17549e-38 -f98 00000001.175494355e-38 -f99 01.17549e-38 -f100 00000001.175494355e-38 -f101 1000-01-04 -f102 838:59:55 -f103 1970-01-05 00:00:04 -f104 1970-01-05 00:00:04 -f105 1905 -f106 1905 -f107 1905 -f108 1enum -f109 2set -f59 4 -f60 74 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 5 -f60 5 -f61 0000000005 -f62 0000000000000000000000000000000000000000000000000000000000000005 -f63 0000000005 -f64 0000000000000000000000000000000000000000000000000000000000000005 -f65 -1 -f66 4.400000000000000000000000000000 -f67 5 -f68 4.400000000000000000000000000000 -f69 0000000005 -f70 000000000000000000000000000000004.400000000000000000000000000000 -f71 0000000005 -f72 000000000000000000000000000000004.400000000000000000000000000000 -f73 -1.175494346e-38 -f74 1.175494356e-38 -f75 00000001.175494356e-38 -f76 00000001.175494356e-38 -f77 -1.175494346e-38 -f78 1.175494356e-38 -f79 00000001.175494356e-38 -f80 00000001.175494356e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494346e-38 -f95 1.17549e-38 -f96 1.175494356e-38 -f97 01.17549e-38 -f98 00000001.175494356e-38 -f99 01.17549e-38 -f100 00000001.175494356e-38 -f101 1000-01-05 -f102 838:59:54 -f103 1970-01-06 00:00:05 -f104 1970-01-06 00:00:05 -f105 1906 -f106 1906 -f107 1906 -f108 2enum -f109 1set,2set -f59 6 -f60 6 -f61 0000000006 -f62 0000000000000000000000000000000000000000000000000000000000000006 -f63 0000000006 -f64 0000000000000000000000000000000000000000000000000000000000000006 -f65 0 -f66 5.500000000000000000000000000000 -f67 6 -f68 5.500000000000000000000000000000 -f69 0000000006 -f70 000000000000000000000000000000005.500000000000000000000000000000 -f71 0000000006 -f72 000000000000000000000000000000005.500000000000000000000000000000 -f73 -1.175494345e-38 -f74 1.175494357e-38 -f75 00000001.175494357e-38 -f76 00000001.175494357e-38 -f77 -1.175494345e-38 -f78 1.175494357e-38 -f79 00000001.175494357e-38 -f80 00000001.175494357e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494345e-38 -f95 1.17549e-38 -f96 1.175494357e-38 -f97 01.17549e-38 -f98 00000001.175494357e-38 -f99 01.17549e-38 -f100 00000001.175494357e-38 -f101 1000-01-06 -f102 838:59:53 -f103 1970-01-07 00:00:06 -f104 1970-01-07 00:00:06 -f105 1907 -f106 1907 -f107 1907 -f108 1enum -f109 1set -f59 7 -f60 7 -f61 0000000007 -f62 0000000000000000000000000000000000000000000000000000000000000007 -f63 0000000007 -f64 0000000000000000000000000000000000000000000000000000000000000007 -f65 1 -f66 6.600000000000000000000000000000 -f67 7 -f68 6.600000000000000000000000000000 -f69 0000000007 -f70 000000000000000000000000000000006.600000000000000000000000000000 -f71 0000000007 -f72 000000000000000000000000000000006.600000000000000000000000000000 -f73 -1.175494344e-38 -f74 1.175494358e-38 -f75 00000001.175494358e-38 -f76 00000001.175494358e-38 -f77 -1.175494344e-38 -f78 1.175494358e-38 -f79 00000001.175494358e-38 -f80 00000001.175494358e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494344e-38 -f95 1.17549e-38 -f96 1.175494358e-38 -f97 01.17549e-38 -f98 00000001.175494358e-38 -f99 01.17549e-38 -f100 00000001.175494358e-38 -f101 1000-01-07 -f102 838:59:52 -f103 1970-01-08 00:00:07 -f104 1970-01-08 00:00:07 -f105 1908 -f106 1908 -f107 1908 -f108 2enum -f109 2set -f59 8 -f60 8 -f61 0000000008 -f62 0000000000000000000000000000000000000000000000000000000000000008 -f63 0000000008 -f64 0000000000000000000000000000000000000000000000000000000000000008 -f65 2 -f66 7.700000000000000000000000000000 -f67 8 -f68 7.700000000000000000000000000000 -f69 0000000008 -f70 000000000000000000000000000000007.700000000000000000000000000000 -f71 0000000008 -f72 000000000000000000000000000000007.700000000000000000000000000000 -f73 -1.175494343e-38 -f74 1.175494359e-38 -f75 00000001.175494359e-38 -f76 00000001.175494359e-38 -f77 -1.175494343e-38 -f78 1.175494359e-38 -f79 00000001.175494359e-38 -f80 00000001.175494359e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494343e-38 -f95 1.17549e-38 -f96 1.175494359e-38 -f97 01.17549e-38 -f98 00000001.175494359e-38 -f99 01.17549e-38 -f100 00000001.175494359e-38 -f101 1000-01-08 -f102 838:59:51 -f103 1970-01-09 00:00:08 -f104 1970-01-09 00:00:08 -f105 1909 -f106 1909 -f107 1909 -f108 1enum -f109 1set,2set -f59 9 -f60 9 -f61 0000000009 -f62 0000000000000000000000000000000000000000000000000000000000000009 -f63 0000000009 -f64 0000000000000000000000000000000000000000000000000000000000000009 -f65 3 -f66 8.800000000000000000000000000000 -f67 9 -f68 8.800000000000000000000000000000 -f69 0000000009 -f70 000000000000000000000000000000008.800000000000000000000000000000 -f71 0000000009 -f72 000000000000000000000000000000008.800000000000000000000000000000 -f73 -1.175494342e-38 -f74 1.17549436e-38 -f75 000000001.17549436e-38 -f76 000000001.17549436e-38 -f77 -1.175494342e-38 -f78 1.17549436e-38 -f79 000000001.17549436e-38 -f80 000000001.17549436e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494342e-38 -f95 1.17549e-38 -f96 1.17549436e-38 -f97 01.17549e-38 -f98 000000001.17549436e-38 -f99 01.17549e-38 -f100 000000001.17549436e-38 -f101 1000-01-09 -f102 838:59:50 -f103 1970-01-10 00:00:09 -f104 1970-01-10 00:00:09 -f105 1910 -f106 1910 -f107 1910 -f108 2enum -f109 1set -f59 10 -f60 10 -f61 0000000010 -f62 0000000000000000000000000000000000000000000000000000000000000010 -f63 0000000010 -f64 0000000000000000000000000000000000000000000000000000000000000010 -f65 4 -f66 9.900000000000000000000000000000 -f67 10 -f68 9.900000000000000000000000000000 -f69 0000000010 -f70 000000000000000000000000000000009.900000000000000000000000000000 -f71 0000000010 -f72 000000000000000000000000000000009.900000000000000000000000000000 -f73 -1.175494341e-38 -f74 1.175494361e-38 -f75 00000001.175494361e-38 -f76 00000001.175494361e-38 -f77 -1.175494341e-38 -f78 1.175494361e-38 -f79 00000001.175494361e-38 -f80 00000001.175494361e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494341e-38 -f95 1.17549e-38 -f96 1.175494361e-38 -f97 01.17549e-38 -f98 00000001.175494361e-38 -f99 01.17549e-38 -f100 00000001.175494361e-38 -f101 1000-01-10 -f102 838:59:49 -f103 1970-01-11 00:00:10 -f104 1970-01-11 00:00:10 -f105 1911 -f106 1911 -f107 1911 -f108 1enum -f109 2set -f59 15 -f60 87 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 17 -f60 15 -f61 0000000016 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 19 -f60 18 -f61 0000000014 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 22 -f60 93 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 24 -f60 51654 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 27 -f60 25 -f61 0000000026 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 29 -f60 28 -f61 0000000024 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 34 -f60 41 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 94 -f60 74 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 107 -f60 105 -f61 0000000106 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 107 -f60 105 -f61 0000000106 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 109 -f60 108 -f61 0000000104 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 109 -f60 108 -f61 0000000104 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 195 -f60 87 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 207 -f60 205 -f61 0000000206 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 209 -f60 208 -f61 0000000204 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 242 -f60 79 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 250 -f60 87895654 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 292 -f60 93 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 299 -f60 899 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 321 -f60 NULL -f61 0000000765 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 323 -f60 14376 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 340 -f60 9984376 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 394 -f60 41 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 424 -f60 89 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 441 -f60 16546 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 500 -f60 NULL -f61 0000000900 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 500 -f60 NULL -f61 0000000900 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 500 -f60 NULL -f61 0000000900 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 660 -f60 876546 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 987 -f60 41 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 2550 -f60 775654 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 2760 -f60 985654 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 3330 -f60 764376 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 3410 -f60 996546 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 7876 -f60 74 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 9112 -f60 NULL -f61 0000008771 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 76710 -f60 226546 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 569300 -f60 9114376 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -Select * from test2.v2 ; -f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 -Drop view if exists test2.v1 ; -Drop view if exists test2.v2 ; -Drop database test2 ; - -Testcase 3.3.1.29 --------------------------------------------------------------------------------- -Drop database if exists test2 ; -Drop view if exists test.v1 ; -create database test2 ; -use test2; -Create view test.v1 AS Select * from test.tb2 limit 50 ; -Create view test2.v2 AS Select F59 from test.v1 ; -Drop view if exists test.v1 ; -Drop view if exists test2.v2 ; - -Testcase 3.3.1.31 --------------------------------------------------------------------------------- -Drop table if exists test.t1 ; -CREATE TABLE test.t1 ( f59 int, f60 int ); -INSERT INTO test.t1 VALUES( 34, 654 ); -INSERT INTO test.t1 VALUES( 906, 434 ); -INSERT INTO test.t1 VALUES( 445, 765 ); -Create or replace view test.v1 -AS SELECT test.t1.F59, test.tb2.F60 -FROM test.tb2 JOIN test.t1 ON test.tb2.F59 = test.t1.F59 ; -Select * from test.v1; -F59 F60 -34 41 -Drop view test.v1 ; - -Testcase 3.3.1.32 --------------------------------------------------------------------------------- -Drop table if exists test.t1 ; -Drop database if exists test2 ; -Drop view if exists test.v1 ; -create database test2 ; -use test2 ; -CREATE TABLE t1 ( f59 int, f60 int ); -INSERT INTO t1 VALUES( 34, 654 ); -INSERT INTO t1 VALUES( 906, 434 ); -INSERT INTO t1 VALUES( 445, 765 ); -CREATE VIEW test2.v1 -AS SELECT test.tb2.F59, test.tb2.F60 -FROM test.tb2 INNER JOIN test2.t1 ON tb2.f59 = t1.f59; -Select * from test2.v1; -F59 F60 -34 41 -Use test; - -Testcase 3.3.1.33 --------------------------------------------------------------------------------- -Drop view if exists test.v1_firstview ; -Drop view if exists test.v1_secondview ; -Drop view if exists test.v1 ; -CREATE VIEW test.v1_firstview AS SELECT * FROM test.tb2; -CREATE VIEW test.v1_secondview AS SELECT * FROM test.tb2; -CREATE VIEW test.v1 -AS SELECT test.v1_firstview.f59, test.v1_firstview.f60 -FROM test.v1_firstview INNER JOIN test.v1_secondview -ON test.v1_firstview.f59 = test.v1_secondview.f59 ; -SELECT * FROM test.v1 order by f59,f60 limit 0,10; -f59 f60 -1 1 -2 2 -3 3 -4 4 -4 4 -4 74 -4 74 -5 5 -6 6 -7 7 -Drop view if exists test.v1_firstview ; -Drop view if exists test.v1_secondview ; -Drop view if exists test.v1 ; - -Testcase 3.3.1.34 --------------------------------------------------------------------------------- -Drop database if exists test2 ; -Drop view if exists test.v1_firstview ; -Drop view if exists test.v1_secondview ; -create database test2 ; -use test2 ; -CREATE VIEW test.v1_firstview AS SELECT * FROM test.tb2 ; -CREATE VIEW test.v1_secondview AS SELECT * FROM test.tb2 ; -CREATE VIEW v1 -AS SELECT test.v1_firstview.F59, test.v1_firstview.F60 -FROM test.v1_firstview INNER JOIN test.v1_secondview -ON test.v1_firstview.f59 = test.v1_secondview.f59 ; -SELECT * FROM v1 order by f59,f60 limit 0,10; -F59 F60 -1 1 -2 2 -3 3 -4 4 -4 4 -4 74 -4 74 -5 5 -6 6 -7 7 -Drop view v1 ; -Drop view test.v1_firstview ; -Drop view test.v1_secondview ; - -Testcase 3.3.1.35 --------------------------------------------------------------------------------- -use test; -Drop view if exists test.v1; -Drop view if exists test.v1_firstview; -CREATE VIEW test.v1_firstview AS SELECT * FROM test.tb2; -CREATE VIEW test.v1 -AS SELECT test.v1_firstview.f59, test.v1_firstview.f60 -FROM test.v1_firstview INNER JOIN test.tb2 -ON test.v1_firstview.f59 = test.tb2.f59; -SELECT * FROM test.v1 order by f59,f60 limit 0,10; -f59 f60 -1 1 -2 2 -3 3 -4 4 -4 4 -4 74 -4 74 -5 5 -6 6 -7 7 -Drop view test.v1 ; -Drop view test.v1_firstview; - -Testcase 3.3.1.36 --------------------------------------------------------------------------------- -Drop database if exists test2 ; -create database test2 ; -use test2 ; -CREATE VIEW v1_firstview AS SELECT * FROM test.tb2 ; -CREATE VIEW v1 -AS SELECT v1_firstview.f59, v1_firstview.f60 -FROM v1_firstview INNER JOIN test.tb2 ON v1_firstview.f59 = test.tb2.f59 ; -SELECT * FROM v1 order by f59,f60 limit 0,10; -f59 f60 -1 1 -2 2 -3 3 -4 4 -4 4 -4 74 -4 74 -5 5 -6 6 -7 7 -Drop database test2 ; - -Testcase 3.3.1.37 --------------------------------------------------------------------------------- -use test; -Drop table if exists t1; -Drop view if exists test.v1 ; -Drop view if exists test.v1_1 ; -Drop view if exists test.v1_1 ; -Drop view if exists test.v1_main ; -Create view test.v1 as Select f59, f60 FROM test.tb2; -Select * from test.v1 order by f59,f60 limit 0,10; -f59 f60 -1 1 -2 2 -3 3 -4 4 -4 74 -5 5 -6 6 -7 7 -8 8 -9 9 -Create table t1(f59 int, f60 int); -Insert into t1 values (90,507) ; -Create view v1_1 as Select f59,f60 from t1 ; -Select * from v1_1 ; -f59 f60 -90 507 -Create view v1_main -as SELECT test.tb2.f59 FROM test.tb2 JOIN test.v1 -ON test.tb2.f59 = test.v1.f59; -Select * from v1_main order by f59 limit 0,10; -f59 -1 -2 -3 -4 -4 -4 -4 -5 -6 -7 -Drop table t1; -Drop view test.v1 ; -Drop view test.v1_1 ; -Drop view test.v1_main ; - -Testcase 3.3.1.31 - 3.3.1.37 New Implementation --------------------------------------------------------------------------------- -USE test; -DROP DATABASE IF EXISTS test2; -DROP TABLE IF EXISTS t0,t1; -DROP VIEW IF EXISTS t3,t4; -CREATE DATABASE test2; -CREATE TABLE test1.t0 (f1 VARCHAR(20)); -CREATE TABLE test1.t1 (f1 VARCHAR(20)); -CREATE TABLE test2.t0 (f1 VARCHAR(20)); -CREATE TABLE test2.t1 (f1 VARCHAR(20)); -CREATE VIEW test1.t2 AS SELECT * FROM test1.t0; -CREATE VIEW test1.t3 AS SELECT * FROM test2.t0; -CREATE VIEW test2.t2 AS SELECT * FROM test2.t0; -CREATE VIEW test2.t3 AS SELECT * FROM test1.t0; -INSERT INTO test1.t0 VALUES('test1.t0'); -INSERT INTO test1.t1 VALUES('test1.t1'); -INSERT INTO test2.t0 VALUES('test2.t0'); -INSERT INTO test2.t1 VALUES('test2.t1'); -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test2.t3 ta, test2.t3 tb; -SELECT * FROM test.v1; -col1 col2 -test1.t0 test1.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test2.t3 ta, test1.t3 tb; -SELECT * FROM test.v1; -col1 col2 -test1.t0 test2.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test1.t3 ta, test2.t3 tb; -SELECT * FROM test.v1; -col1 col2 -test2.t0 test1.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test1.t3 ta, test1.t3 tb; -SELECT * FROM test.v1; -col1 col2 -test2.t0 test2.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test2.t3 ta, test2.t2 tb; -SELECT * FROM test.v1; -col1 col2 -test1.t0 test2.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test2.t3 ta, test1.t2 tb; -SELECT * FROM test.v1; -col1 col2 -test1.t0 test1.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test1.t3 ta, test2.t2 tb; -SELECT * FROM test.v1; -col1 col2 -test2.t0 test2.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test1.t3 ta, test1.t2 tb; -SELECT * FROM test.v1; -col1 col2 -test2.t0 test1.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test2.t3 ta, test2.t1 tb; -SELECT * FROM test.v1; -col1 col2 -test1.t0 test2.t1 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test2.t3 ta, test1.t1 tb; -SELECT * FROM test.v1; -col1 col2 -test1.t0 test1.t1 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test1.t3 ta, test2.t1 tb; -SELECT * FROM test.v1; -col1 col2 -test2.t0 test2.t1 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test1.t3 ta, test1.t1 tb; -SELECT * FROM test.v1; -col1 col2 -test2.t0 test1.t1 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test2.t2 ta, test2.t3 tb; -SELECT * FROM test.v1; -col1 col2 -test2.t0 test1.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test2.t2 ta, test1.t3 tb; -SELECT * FROM test.v1; -col1 col2 -test2.t0 test2.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test1.t2 ta, test2.t3 tb; -SELECT * FROM test.v1; -col1 col2 -test1.t0 test1.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test1.t2 ta, test1.t3 tb; -SELECT * FROM test.v1; -col1 col2 -test1.t0 test2.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test2.t2 ta, test2.t2 tb; -SELECT * FROM test.v1; -col1 col2 -test2.t0 test2.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test2.t2 ta, test1.t2 tb; -SELECT * FROM test.v1; -col1 col2 -test2.t0 test1.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test1.t2 ta, test2.t2 tb; -SELECT * FROM test.v1; -col1 col2 -test1.t0 test2.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test1.t2 ta, test1.t2 tb; -SELECT * FROM test.v1; -col1 col2 -test1.t0 test1.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test2.t2 ta, test2.t1 tb; -SELECT * FROM test.v1; -col1 col2 -test2.t0 test2.t1 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test2.t2 ta, test1.t1 tb; -SELECT * FROM test.v1; -col1 col2 -test2.t0 test1.t1 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test1.t2 ta, test2.t1 tb; -SELECT * FROM test.v1; -col1 col2 -test1.t0 test2.t1 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test1.t2 ta, test1.t1 tb; -SELECT * FROM test.v1; -col1 col2 -test1.t0 test1.t1 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test2.t1 ta, test2.t3 tb; -SELECT * FROM test.v1; -col1 col2 -test2.t1 test1.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test2.t1 ta, test1.t3 tb; -SELECT * FROM test.v1; -col1 col2 -test2.t1 test2.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test1.t1 ta, test2.t3 tb; -SELECT * FROM test.v1; -col1 col2 -test1.t1 test1.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test1.t1 ta, test1.t3 tb; -SELECT * FROM test.v1; -col1 col2 -test1.t1 test2.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test2.t1 ta, test2.t2 tb; -SELECT * FROM test.v1; -col1 col2 -test2.t1 test2.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test2.t1 ta, test1.t2 tb; -SELECT * FROM test.v1; -col1 col2 -test2.t1 test1.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test1.t1 ta, test2.t2 tb; -SELECT * FROM test.v1; -col1 col2 -test1.t1 test2.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test1.t1 ta, test1.t2 tb; -SELECT * FROM test.v1; -col1 col2 -test1.t1 test1.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test2.t1 ta, test2.t1 tb; -SELECT * FROM test.v1; -col1 col2 -test2.t1 test2.t1 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test2.t1 ta, test1.t1 tb; -SELECT * FROM test.v1; -col1 col2 -test2.t1 test1.t1 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test1.t1 ta, test2.t1 tb; -SELECT * FROM test.v1; -col1 col2 -test1.t1 test2.t1 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test1.t1 ta, test1.t1 tb; -SELECT * FROM test.v1; -col1 col2 -test1.t1 test1.t1 - -Testcase 3.3.1.38 --------------------------------------------------------------------------------- -Drop table if exists test1.t1 ; -Drop view if exists test.v1 ; -Drop view if exists test.v1_main; -Drop view if exists test1.v1_1 ; -Drop database if exists test3 ; -Create view test.v1 as Select f59, f60 FROM test.tb2; -Select * from test.v1 order by f59,f60 limit 20; -f59 f60 -1 1 -2 2 -3 3 -4 4 -4 74 -5 5 -6 6 -7 7 -8 8 -9 9 -10 10 -15 87 -17 15 -19 18 -22 93 -24 51654 -27 25 -29 28 -34 41 -94 74 -Create table test1.t1 (f59 int,f60 int) ; -Insert into test1.t1 values (199,507) ; -Create view test1.v1_1 as Select f59,f60 from test1.t1 ; -Select * from test1.v1_1 ; -f59 f60 -199 507 -Create database test3 ; -Create table test3.t1(f59 int,f60 int) ; -Insert into test3.t1 values (1023,7670) ; -Create view test3.v1_2 as Select f59,f60 from test3.t1 ; -Select * from test3.v1_2 ; -f59 f60 -1023 7670 -use test ; -Create view v1_main -as SELECT test.tb2.f59 as f1, test1.v1_1.f59 as f2, -test3.v1_2.f59 as f3 -FROM (test.tb2,test1.v1_1,test.v1) JOIN test3.v1_2 -ON (test.v1.f59 = test1.v1_1.f59) ; -Select * from v1_main ; -f1 f2 f3 -DROP VIEW test.v1 ; -DROP VIEW test1.v1_1 ; -DROP VIEW test.v1_main ; -DROP DATABASE test3; - -Testcase 3.3.1.39 --------------------------------------------------------------------------------- -Drop view if exists test.v1 ; -CREATE VIEW test.v1 -AS Select f59 from (Select * FROM tb2 limit 20) tx ; -ERROR HY000: View's SELECT contains a subquery in the FROM clause -SELECT * FROM test.v1 order by f59 ; -ERROR 42S02: Table 'test.v1' doesn't exist -Drop view if exists test.v1 ; - -Testcase 3.3.1.40 --------------------------------------------------------------------------------- -Drop view if exists test.v1 ; -Set @var1 = 'ABC' ; -Set @var2 = 'XYZ' ; -CREATE VIEW test.v1 AS SELECT @var1, @var2 ; -ERROR HY000: View's SELECT contains a variable or parameter -CREATE VIEW test.v1 AS SELECT @@global.sort_buffer_size; -ERROR HY000: View's SELECT contains a variable or parameter -Drop view if exists test.v1 ; - -Testcase 3.3.1.41 --------------------------------------------------------------------------------- -Drop view if exists test.v1 ; -Drop procedure if exists sp1 ; -Create procedure sp1() DETERMINISTIC -Begin -DECLARE x char; -Set x = 200 ; -Create view test.v1 as SELECT * FROM tb2 WHERE f59 = x ; -End // -ERROR HY000: View's SELECT contains a variable or parameter -Call sp1() ; -ERROR 42000: PROCEDURE test.sp1 does not exist -Drop view if exists test.v1 ; -Warnings: -Note 1051 Unknown table 'test.v1' -Drop procedure sp1 ; -ERROR 42000: PROCEDURE test.sp1 does not exist - -Testcase 3.3.1.42 --------------------------------------------------------------------------------- -Drop VIEW if exists test.v1 ; -CREATE TEMPORARY VIEW test.v1 AS -SELECT * FROM test.tb2 limit 2 ; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VIEW test.v1 AS -SELECT * FROM test.tb2 limit 2' at line 1 -CREATE OR REPLACE TEMPORARY VIEW test.v1 AS -SELECT * FROM test.tb2 limit 2 ; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TEMPORARY VIEW test.v1 AS -SELECT * FROM test.tb2 limit 2' at line 1 -Drop view if exists test.v1 ; -Use test; - -Testcase 3.3.1.43 --------------------------------------------------------------------------------- -Drop view if exists test.v1 ; -CREATE VIEW test.v1 AS SELECT f59,f60 FROM test.tb2; -INSERT INTO test.v1 values(122,432); -SELECT * FROM test.tb2 where f59 = 122 and f60 = 432 limit 0,20; -f59 122 -f60 432 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -UPDATE test.v1 SET f59 = 3000 WHERE test.v1.f59 = 122 ; -SELECT * FROM test.tb2 where f59 = 3000 limit 0,20; -f59 3000 -f60 432 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -DELETE FROM test.v1 -where test.v1.f59 = 3000 and test.v1.f60 = 432; -SELECT * FROM test.tb2 where f59 = 3000 and f60 = 432; -f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 -drop view test.v1 ; - -Testcase 3.3.1.44 --------------------------------------------------------------------------------- -Drop view if exists test.v1 ; -CREATE VIEW test.v1 AS SELECT f59,f60 FROM test.tb2 limit 100; -INSERT INTO test.v1 values(31, 32, 33) ; -ERROR HY000: The target table v1 of the INSERT is not insertable-into -Drop view test.v1 ; - -Testcase 3.3.1.45 --------------------------------------------------------------------------------- -Drop view if exists test.v1 ; -CREATE VIEW test.v1 AS SELECT * FROM test.tb2 where f59 = 04; -UPDATE test.v1 SET f59 = 30 where F59 = 04 ; -affected rows: 2 -info: Rows matched: 2 Changed: 2 Warnings: 0 -SELECT * FROM test.v1 where f59 = 30 order by f59; -f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 -SELECT * FROM test.tb2 where f59 = 30 ; -f59 30 -f60 4 -f61 0000000004 -f62 0000000000000000000000000000000000000000000000000000000000000004 -f63 0000000004 -f64 0000000000000000000000000000000000000000000000000000000000000004 -f65 -2 -f66 3.300000000000000000000000000000 -f67 4 -f68 3.300000000000000000000000000000 -f69 0000000004 -f70 000000000000000000000000000000003.300000000000000000000000000000 -f71 0000000004 -f72 000000000000000000000000000000003.300000000000000000000000000000 -f73 -1.175494347e-38 -f74 1.175494355e-38 -f75 00000001.175494355e-38 -f76 00000001.175494355e-38 -f77 -1.175494347e-38 -f78 1.175494355e-38 -f79 00000001.175494355e-38 -f80 00000001.175494355e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494347e-38 -f95 1.17549e-38 -f96 1.175494355e-38 -f97 01.17549e-38 -f98 00000001.175494355e-38 -f99 01.17549e-38 -f100 00000001.175494355e-38 -f101 1000-01-04 -f102 838:59:55 -f103 1970-01-05 00:00:04 -f104 1970-01-05 00:00:04 -f105 1905 -f106 1905 -f107 1905 -f108 1enum -f109 2set -f59 30 -f60 74 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -UPDATE tb2 SET f59 = 100 where f59 = 30 ; -affected rows: 2 -info: Rows matched: 2 Changed: 2 Warnings: 0 -SELECT * FROM tb2 where f59 = 100 ; -f59 100 -f60 4 -f61 0000000004 -f62 0000000000000000000000000000000000000000000000000000000000000004 -f63 0000000004 -f64 0000000000000000000000000000000000000000000000000000000000000004 -f65 -2 -f66 3.300000000000000000000000000000 -f67 4 -f68 3.300000000000000000000000000000 -f69 0000000004 -f70 000000000000000000000000000000003.300000000000000000000000000000 -f71 0000000004 -f72 000000000000000000000000000000003.300000000000000000000000000000 -f73 -1.175494347e-38 -f74 1.175494355e-38 -f75 00000001.175494355e-38 -f76 00000001.175494355e-38 -f77 -1.175494347e-38 -f78 1.175494355e-38 -f79 00000001.175494355e-38 -f80 00000001.175494355e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494347e-38 -f95 1.17549e-38 -f96 1.175494355e-38 -f97 01.17549e-38 -f98 00000001.175494355e-38 -f99 01.17549e-38 -f100 00000001.175494355e-38 -f101 1000-01-04 -f102 838:59:55 -f103 1970-01-05 00:00:04 -f104 1970-01-05 00:00:04 -f105 1905 -f106 1905 -f107 1905 -f108 1enum -f109 2set -f59 100 -f60 74 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -SELECT * FROM test.v1 order by f59 ; -f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 -drop view if exists test.v1 ; -Drop TABLE IF EXISTS test.t1 ; -Drop VIEW IF EXISTS test.v1 ; -CREATE TABLE t1 (f1 BIGINT, f2 VARCHAR(20), PRIMARY KEY(f1)) -ENGINE = ndb; -INSERT INTO t1 VALUES(1,'one'); -INSERT INTO t1 VALUES(2,'two'); -INSERT INTO t1 VALUES(3,'three'); -INSERT INTO t1 VALUES(5,'five'); -CREATE VIEW v1 AS SELECT * FROM t1 WHERE f1 BETWEEN 2 AND 4; -SELECT COUNT(*) FROM v1 WHERE f1 = 2; -COUNT(*) -1 -SELECT COUNT(*) FROM v1 WHERE f1 = 4; -COUNT(*) -0 -SELECT COUNT(*) FROM v1 WHERE f1 = 5; -COUNT(*) -0 -SELECT COUNT(*) FROM v1 WHERE f1 = 10; -COUNT(*) -0 -INSERT INTO t1 VALUES(4,'four'); -DELETE FROM v1 WHERE f1 = 3; -affected rows: 1 -DELETE FROM v1 WHERE f1 = 5; -affected rows: 0 -SELECT * FROM t1 ORDER BY f1; -f1 f2 -1 one -2 two -4 four -5 five -SELECT * FROM v1 ORDER BY f1; -f1 f2 -2 two -4 four -INSERT INTO v1 VALUES(2,'two'); -ERROR 23000: Duplicate entry '2' for key 'PRIMARY' -INSERT INTO v1 VALUES(3,'three'); -affected rows: 1 -INSERT INTO v1 VALUES(6,'six'); -affected rows: 1 -SELECT * FROM t1 ORDER BY f1; -f1 f2 -1 one -2 two -3 three -4 four -5 five -6 six -SELECT * FROM v1 ORDER BY f1; -f1 f2 -2 two -3 three -4 four -UPDATE v1 SET f1 = 2 WHERE f1 = 3; -ERROR 23000: Duplicate entry '2' for key 'PRIMARY' -UPDATE v1 SET f2 = 'number' WHERE f1 = 3; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -UPDATE v1 SET f1 = 10 WHERE f1 = 3; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -UPDATE v1 SET f2 = 'number' WHERE f1 = 1; -affected rows: 0 - -Testcase 3.3.1.46 --------------------------------------------------------------------------------- -Drop view if exists test.v1 ; -CREATE VIEW test.v1 AS SELECT f59,f60 -FROM test.tb2 where f59 = 195 WITH CHECK OPTION ; -UPDATE test.v1 SET f59 = 198 where f59=195 ; -ERROR HY000: CHECK OPTION failed 'test.v1' -SELECT * FROM test.v1 order by f59 ; -f59 f60 -195 87 -drop view if exists test.v1 ; - -Testcase 3.3.1.47 --------------------------------------------------------------------------------- -Drop view if exists test.v1 ; -Drop view if exists test.v2 ; -CREATE VIEW test.v1 AS SELECT f59,f60 -FROM test.tb2 where F59 = 0987 WITH LOCAL CHECK OPTION ; -CREATE VIEW test.v2 as SELECT * FROM test.v1 ; -UPDATE test.v1 SET F59 = 919 where f59 = 0987 ; -ERROR HY000: CHECK OPTION failed 'test.v1' -SELECT * FROM test.v1 order by f59 ; -f59 f60 -987 41 -UPDATE test.v2 SET F59 = 9879 where f59 = 919 ; -SELECT * FROM tb2 where f59 = 9879 ; -f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 -drop view if exists v1 ; -drop view if exists v2 ; - -Testcase 3.3.1.48 --------------------------------------------------------------------------------- -DROP TABLE IF EXISTS test.t1; -DROP VIEW IF EXISTS test.v1; -CREATE TABLE t1 (f1 ENUM('A', 'B', 'C') NOT NULL, f2 INTEGER) -ENGINE = ndb; -INSERT INTO t1 VALUES ('A', 1); -SELECT * FROM t1 order by f1, f2; -f1 f2 -A 1 -CREATE VIEW v1 AS SELECT * FROM t1 WHERE f2 BETWEEN 1 AND 2 -WITH CASCADED CHECK OPTION ; -SELECT * FROM v1 order by f1, f2; -f1 f2 -A 1 -UPDATE v1 SET f2 = 2 WHERE f2 = 1; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -INSERT INTO v1 VALUES('B',2); -affected rows: 1 -SELECT * FROM v1 order by f1, f2; -f1 f2 -A 2 -B 2 -UPDATE v1 SET f2 = 4; -ERROR HY000: CHECK OPTION failed 'test.v1' -INSERT INTO v1 VALUES('B',3); -ERROR HY000: CHECK OPTION failed 'test.v1' -SELECT * FROM v1 order by f1, f2; -f1 f2 -A 2 -B 2 - -Testcase 3.3.1.49 --------------------------------------------------------------------------------- -Drop table if exists test.t1 ; -Drop view if exists test.v1 ; -Drop view if exists test.v2 ; -Drop view if exists test.v3 ; -Create table test.t1 (f59 INT, f60 INT) ; -Insert into test.t1 values (100,4234); -Insert into test.t1 values (290,6624); -Insert into test.t1 values (410,765); -Insert into test.t1 values (300,433334); -Insert into test.t1 values (800,9788); -Insert into test.t1 values (501,9866); -Create view test.v1 as select f59 -FROM test.t1 where f59<500 with check option ; -Create view test.v2 as select * -from test.v1 where f59>0 with local check option ; -Create view test.v3 as select * -from test.v1 where f59>0 with cascaded check option ; -Insert into test.v2 values(23) ; -Insert into test.v3 values(24) ; -drop view if exists test.v1 ; -drop view if exists test.v2 ; -drop view if exists test.v3 ; - -Testcase 3.3.1.49A --------------------------------------------------------------------------------- -USE test; -DROP TABLE IF EXISTS test.t1 ; -DROP TABLE IF EXISTS test.t1_results ; -DROP VIEW IF EXISTS test.v1; -DROP VIEW IF EXISTS test.v2; -DROP VIEW IF EXISTS test.v3; -CREATE TABLE t1 (f1 INTEGER, f2 CHAR(20)); -CREATE TABLE t1_results (v3_to_v1_options VARCHAR(100), statement VARCHAR(10), -v3_to_v1_violation VARCHAR(20), errno CHAR(10)); -CREATE VIEW v1 AS SELECT f1, f2 - FROM t1 WHERE f1 BETWEEN 0 AND 10 WITH LOCAL CHECK OPTION ; -CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2 - FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH LOCAL CHECK OPTION ; -option_variant WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -7 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -affected rows: 1 -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -DROP VIEW v3; -DROP VIEW v2; -CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2 - FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH CASCADED CHECK OPTION ; -option_variant WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -7 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -affected rows: 1 -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -DROP VIEW v3; -DROP VIEW v2; -CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2 - FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH CHECK OPTION ; -option_variant WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant - WITH CHECK OPTION - WITH LOCAL CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -7 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -affected rows: 1 -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -DROP VIEW v3; -DROP VIEW v2; -CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2 - FROM v1 WHERE f1 BETWEEN 6 AND 16 ; -option_variant WITH LOCAL CHECK OPTION - - WITH LOCAL CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CASCADED CHECK OPTION - - WITH LOCAL CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CHECK OPTION - - WITH LOCAL CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant - - WITH LOCAL CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -7 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -affected rows: 1 -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -DROP VIEW v3; -DROP VIEW v2; -DROP VIEW v1; -CREATE VIEW v1 AS SELECT f1, f2 - FROM t1 WHERE f1 BETWEEN 0 AND 10 WITH CASCADED CHECK OPTION ; -CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2 - FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH LOCAL CHECK OPTION ; -option_variant WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -7 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -affected rows: 1 -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -DROP VIEW v3; -DROP VIEW v2; -CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2 - FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH CASCADED CHECK OPTION ; -option_variant WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -7 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -affected rows: 1 -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -DROP VIEW v3; -DROP VIEW v2; -CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2 - FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH CHECK OPTION ; -option_variant WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant - WITH CHECK OPTION - WITH CASCADED CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -7 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -affected rows: 1 -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -DROP VIEW v3; -DROP VIEW v2; -CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2 - FROM v1 WHERE f1 BETWEEN 6 AND 16 ; -option_variant WITH LOCAL CHECK OPTION - - WITH CASCADED CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CASCADED CHECK OPTION - - WITH CASCADED CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CHECK OPTION - - WITH CASCADED CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant - - WITH CASCADED CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -7 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -affected rows: 1 -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -DROP VIEW v3; -DROP VIEW v2; -DROP VIEW v1; -CREATE VIEW v1 AS SELECT f1, f2 - FROM t1 WHERE f1 BETWEEN 0 AND 10 WITH CHECK OPTION ; -CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2 - FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH LOCAL CHECK OPTION ; -option_variant WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant - WITH LOCAL CHECK OPTION - WITH CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -7 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -affected rows: 1 -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -DROP VIEW v3; -DROP VIEW v2; -CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2 - FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH CASCADED CHECK OPTION ; -option_variant WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant - WITH CASCADED CHECK OPTION - WITH CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -7 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -affected rows: 1 -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -DROP VIEW v3; -DROP VIEW v2; -CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2 - FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH CHECK OPTION ; -option_variant WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant - WITH CHECK OPTION - WITH CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -7 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -affected rows: 1 -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -DROP VIEW v3; -DROP VIEW v2; -CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2 - FROM v1 WHERE f1 BETWEEN 6 AND 16 ; -option_variant WITH LOCAL CHECK OPTION - - WITH CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CASCADED CHECK OPTION - - WITH CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CHECK OPTION - - WITH CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant - - WITH CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -7 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -affected rows: 1 -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -DROP VIEW v3; -DROP VIEW v2; -DROP VIEW v1; -CREATE VIEW v1 AS SELECT f1, f2 - FROM t1 WHERE f1 BETWEEN 0 AND 10 ; -CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2 - FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH LOCAL CHECK OPTION ; -option_variant WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CHECK OPTION - WITH LOCAL CHECK OPTION - -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant - WITH LOCAL CHECK OPTION - -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -7 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -affected rows: 1 -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -DROP VIEW v3; -DROP VIEW v2; -CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2 - FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH CASCADED CHECK OPTION ; -option_variant WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CHECK OPTION - WITH CASCADED CHECK OPTION - -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant - WITH CASCADED CHECK OPTION - -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -7 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -affected rows: 1 -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -DROP VIEW v3; -DROP VIEW v2; -CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2 - FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH CHECK OPTION ; -option_variant WITH LOCAL CHECK OPTION - WITH CHECK OPTION - -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CASCADED CHECK OPTION - WITH CHECK OPTION - -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CHECK OPTION - WITH CHECK OPTION - -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant - WITH CHECK OPTION - -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -7 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -affected rows: 1 -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -DROP VIEW v3; -DROP VIEW v2; -CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2 - FROM v1 WHERE f1 BETWEEN 6 AND 16 ; -option_variant WITH LOCAL CHECK OPTION - - -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CASCADED CHECK OPTION - - -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CHECK OPTION - - -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant - - -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -7 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -affected rows: 1 -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -DROP VIEW v3; -DROP VIEW v2; -DROP VIEW v1; -SELECT * FROM t1_results ORDER BY v3_to_v1_options; -v3_to_v1_options statement v3_to_v1_violation errno - - - UPDATE _v2_ 0 - - - INSERT _v2_ 0 - - - INSERT _ _v1 0 - - - UPDATE _ _ 0 - - - UPDATE _ _v1 0 - - - UPDATE v3_ _ 0 - - - INSERT _ _ 0 - - - WITH CHECK OPTION UPDATE _v2_ 0 - - - WITH CHECK OPTION INSERT _ _ 0 - - - WITH CHECK OPTION UPDATE _ _v1 0 - - - WITH CHECK OPTION UPDATE _ _ 0 - - - WITH CHECK OPTION UPDATE v3_ _ 0 - - - WITH CHECK OPTION INSERT _v2_ 0 - - - WITH CHECK OPTION INSERT _ _v1 0 - - - WITH CASCADED CHECK OPTION INSERT _v2_ 0 - - - WITH CASCADED CHECK OPTION INSERT _ _ 0 - - - WITH CASCADED CHECK OPTION INSERT _ _v1 0 - - - WITH CASCADED CHECK OPTION UPDATE _ _ 0 - - - WITH CASCADED CHECK OPTION UPDATE _ _v1 0 - - - WITH CASCADED CHECK OPTION UPDATE _v2_ 0 - - - WITH CASCADED CHECK OPTION UPDATE v3_ _ 0 - - - WITH LOCAL CHECK OPTION UPDATE _ _v1 0 - - - WITH LOCAL CHECK OPTION INSERT _v2_ 0 - - - WITH LOCAL CHECK OPTION INSERT _ _v1 0 - - - WITH LOCAL CHECK OPTION INSERT _ _ 0 - - - WITH LOCAL CHECK OPTION UPDATE v3_ _ 0 - - - WITH LOCAL CHECK OPTION UPDATE _v2_ 0 - - - WITH LOCAL CHECK OPTION UPDATE _ _ 0 - - WITH CHECK OPTION - UPDATE _v2_ 0 - - WITH CHECK OPTION - INSERT _v2_ 0 - - WITH CHECK OPTION - UPDATE v3_ _ 0 - - WITH CHECK OPTION - UPDATE _ _v1 0 - - WITH CHECK OPTION - UPDATE _ _ 0 - - WITH CHECK OPTION - INSERT _ _v1 0 - - WITH CHECK OPTION - INSERT _ _ 0 - - WITH CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 0 - - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 0 - - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0 - - WITH CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 0 - - WITH CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 0 - - WITH CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0 - - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 0 - - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0 - - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 0 - - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 0 - - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0 - - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 0 - - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 0 - - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 0 - - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 0 - - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0 - - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 0 - - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 0 - - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0 - - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 0 - - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 0 - - WITH CASCADED CHECK OPTION - INSERT _ _v1 0 - - WITH CASCADED CHECK OPTION - UPDATE _ _v1 0 - - WITH CASCADED CHECK OPTION - UPDATE _v2_ 0 - - WITH CASCADED CHECK OPTION - UPDATE _ _ 0 - - WITH CASCADED CHECK OPTION - UPDATE v3_ _ 0 - - WITH CASCADED CHECK OPTION - INSERT _ _ 0 - - WITH CASCADED CHECK OPTION - INSERT _v2_ 0 - - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 0 - - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 0 - - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0 - - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 0 - - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 0 - - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0 - - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 0 - - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 0 - - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 0 - - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 0 - - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0 - - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0 - - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 0 - - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 0 - - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 0 - - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0 - - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0 - - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 0 - - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 0 - - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 0 - - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 0 - - WITH LOCAL CHECK OPTION - UPDATE v3_ _ 0 - - WITH LOCAL CHECK OPTION - INSERT _ _ 0 - - WITH LOCAL CHECK OPTION - INSERT _v2_ 0 - - WITH LOCAL CHECK OPTION - INSERT _ _v1 0 - - WITH LOCAL CHECK OPTION - UPDATE _ _ 0 - - WITH LOCAL CHECK OPTION - UPDATE _ _v1 0 - - WITH LOCAL CHECK OPTION - UPDATE _v2_ 0 - - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 0 - - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 0 - - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0 - - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 0 - - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 0 - - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0 - - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 0 - - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 0 - - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0 - - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 0 - - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0 - - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 0 - - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 0 - - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 0 - - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 0 - - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 0 - - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0 - - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 0 - - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 0 - - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0 - - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 0 -WITH CHECK OPTION - - UPDATE v3_ _ 1369 -WITH CHECK OPTION - - INSERT _ _ 0 -WITH CHECK OPTION - - INSERT _v2_ 1369 -WITH CHECK OPTION - - INSERT _ _v1 1369 -WITH CHECK OPTION - - UPDATE _v2_ 1369 -WITH CHECK OPTION - - UPDATE _ _v1 1369 -WITH CHECK OPTION - - UPDATE _ _ 0 -WITH CHECK OPTION - - WITH CHECK OPTION UPDATE _v2_ 1369 -WITH CHECK OPTION - - WITH CHECK OPTION UPDATE v3_ _ 1369 -WITH CHECK OPTION - - WITH CHECK OPTION INSERT _v2_ 1369 -WITH CHECK OPTION - - WITH CHECK OPTION INSERT _ _v1 1369 -WITH CHECK OPTION - - WITH CHECK OPTION UPDATE _ _ 0 -WITH CHECK OPTION - - WITH CHECK OPTION UPDATE _ _v1 1369 -WITH CHECK OPTION - - WITH CHECK OPTION INSERT _ _ 0 -WITH CHECK OPTION - - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369 -WITH CHECK OPTION - - WITH CASCADED CHECK OPTION INSERT _ _ 0 -WITH CHECK OPTION - - WITH CASCADED CHECK OPTION UPDATE _v2_ 1369 -WITH CHECK OPTION - - WITH CASCADED CHECK OPTION INSERT _v2_ 1369 -WITH CHECK OPTION - - WITH CASCADED CHECK OPTION INSERT _ _v1 1369 -WITH CHECK OPTION - - WITH CASCADED CHECK OPTION UPDATE _ _ 0 -WITH CHECK OPTION - - WITH CASCADED CHECK OPTION UPDATE _ _v1 1369 -WITH CHECK OPTION - - WITH LOCAL CHECK OPTION INSERT _ _ 0 -WITH CHECK OPTION - - WITH LOCAL CHECK OPTION UPDATE _v2_ 1369 -WITH CHECK OPTION - - WITH LOCAL CHECK OPTION UPDATE _ _v1 1369 -WITH CHECK OPTION - - WITH LOCAL CHECK OPTION UPDATE _ _ 0 -WITH CHECK OPTION - - WITH LOCAL CHECK OPTION INSERT _ _v1 1369 -WITH CHECK OPTION - - WITH LOCAL CHECK OPTION INSERT _v2_ 1369 -WITH CHECK OPTION - - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369 -WITH CHECK OPTION - WITH CHECK OPTION - UPDATE _ _ 0 -WITH CHECK OPTION - WITH CHECK OPTION - INSERT _ _v1 1369 -WITH CHECK OPTION - WITH CHECK OPTION - INSERT _v2_ 1369 -WITH CHECK OPTION - WITH CHECK OPTION - INSERT _ _ 0 -WITH CHECK OPTION - WITH CHECK OPTION - UPDATE _ _v1 1369 -WITH CHECK OPTION - WITH CHECK OPTION - UPDATE v3_ _ 1369 -WITH CHECK OPTION - WITH CHECK OPTION - UPDATE _v2_ 1369 -WITH CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 1369 -WITH CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 1369 -WITH CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 1369 -WITH CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 1369 -WITH CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0 -WITH CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 1369 -WITH CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0 -WITH CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 1369 -WITH CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 1369 -WITH CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369 -WITH CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0 -WITH CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 1369 -WITH CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0 -WITH CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 1369 -WITH CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 1369 -WITH CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 1369 -WITH CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 1369 -WITH CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0 -WITH CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 1369 -WITH CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0 -WITH CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - UPDATE v3_ _ 1369 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - UPDATE _v2_ 1369 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - UPDATE _ _v1 1369 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - UPDATE _ _ 0 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - INSERT _ _v1 1369 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - INSERT _v2_ 1369 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - INSERT _ _ 0 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 1369 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 1369 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 1369 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 1369 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 1369 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 1369 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 1369 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 1369 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 1369 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 1369 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 1369 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 1369 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 1369 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - INSERT _ _v1 1369 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - UPDATE _ _ 0 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - UPDATE _ _v1 1369 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - INSERT _ _ 0 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - INSERT _v2_ 1369 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - UPDATE _v2_ 1369 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - UPDATE v3_ _ 1369 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 1369 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 1369 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 1369 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 1369 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 1369 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 1369 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 1369 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 1369 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 1369 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 1369 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 1369 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 1369 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 1369 -WITH CASCADED CHECK OPTION - - INSERT _v2_ 1369 -WITH CASCADED CHECK OPTION - - INSERT _ _ 0 -WITH CASCADED CHECK OPTION - - UPDATE _ _ 0 -WITH CASCADED CHECK OPTION - - UPDATE _ _v1 1369 -WITH CASCADED CHECK OPTION - - UPDATE _v2_ 1369 -WITH CASCADED CHECK OPTION - - UPDATE v3_ _ 1369 -WITH CASCADED CHECK OPTION - - INSERT _ _v1 1369 -WITH CASCADED CHECK OPTION - - WITH CHECK OPTION INSERT _v2_ 1369 -WITH CASCADED CHECK OPTION - - WITH CHECK OPTION UPDATE v3_ _ 1369 -WITH CASCADED CHECK OPTION - - WITH CHECK OPTION UPDATE _v2_ 1369 -WITH CASCADED CHECK OPTION - - WITH CHECK OPTION UPDATE _ _v1 1369 -WITH CASCADED CHECK OPTION - - WITH CHECK OPTION UPDATE _ _ 0 -WITH CASCADED CHECK OPTION - - WITH CHECK OPTION INSERT _ _v1 1369 -WITH CASCADED CHECK OPTION - - WITH CHECK OPTION INSERT _ _ 0 -WITH CASCADED CHECK OPTION - - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369 -WITH CASCADED CHECK OPTION - - WITH CASCADED CHECK OPTION UPDATE _v2_ 1369 -WITH CASCADED CHECK OPTION - - WITH CASCADED CHECK OPTION UPDATE _ _v1 1369 -WITH CASCADED CHECK OPTION - - WITH CASCADED CHECK OPTION UPDATE _ _ 0 -WITH CASCADED CHECK OPTION - - WITH CASCADED CHECK OPTION INSERT _v2_ 1369 -WITH CASCADED CHECK OPTION - - WITH CASCADED CHECK OPTION INSERT _ _ 0 -WITH CASCADED CHECK OPTION - - WITH CASCADED CHECK OPTION INSERT _ _v1 1369 -WITH CASCADED CHECK OPTION - - WITH LOCAL CHECK OPTION UPDATE _v2_ 1369 -WITH CASCADED CHECK OPTION - - WITH LOCAL CHECK OPTION INSERT _ _ 0 -WITH CASCADED CHECK OPTION - - WITH LOCAL CHECK OPTION INSERT _v2_ 1369 -WITH CASCADED CHECK OPTION - - WITH LOCAL CHECK OPTION UPDATE _ _ 0 -WITH CASCADED CHECK OPTION - - WITH LOCAL CHECK OPTION UPDATE _ _v1 1369 -WITH CASCADED CHECK OPTION - - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369 -WITH CASCADED CHECK OPTION - - WITH LOCAL CHECK OPTION INSERT _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - UPDATE _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - UPDATE v3_ _ 1369 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - UPDATE _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - INSERT _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - UPDATE _ _ 0 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - INSERT _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - INSERT _ _ 0 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 1369 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - UPDATE _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - UPDATE v3_ _ 1369 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - INSERT _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - INSERT _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - UPDATE _ _ 0 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - UPDATE _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - INSERT _ _ 0 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 1369 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - UPDATE _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - UPDATE v3_ _ 1369 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - UPDATE _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - UPDATE _ _ 0 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - INSERT _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - INSERT _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - INSERT _ _ 0 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 1369 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0 -WITH LOCAL CHECK OPTION - - INSERT _ _ 0 -WITH LOCAL CHECK OPTION - - UPDATE _v2_ 0 -WITH LOCAL CHECK OPTION - - UPDATE _ _v1 0 -WITH LOCAL CHECK OPTION - - UPDATE _ _ 0 -WITH LOCAL CHECK OPTION - - INSERT _ _v1 0 -WITH LOCAL CHECK OPTION - - INSERT _v2_ 0 -WITH LOCAL CHECK OPTION - - UPDATE v3_ _ 1369 -WITH LOCAL CHECK OPTION - - WITH CHECK OPTION UPDATE _ _ 0 -WITH LOCAL CHECK OPTION - - WITH CHECK OPTION UPDATE v3_ _ 1369 -WITH LOCAL CHECK OPTION - - WITH CHECK OPTION UPDATE _v2_ 0 -WITH LOCAL CHECK OPTION - - WITH CHECK OPTION UPDATE _ _v1 0 -WITH LOCAL CHECK OPTION - - WITH CHECK OPTION INSERT _ _v1 0 -WITH LOCAL CHECK OPTION - - WITH CHECK OPTION INSERT _v2_ 0 -WITH LOCAL CHECK OPTION - - WITH CHECK OPTION INSERT _ _ 0 -WITH LOCAL CHECK OPTION - - WITH CASCADED CHECK OPTION INSERT _v2_ 0 -WITH LOCAL CHECK OPTION - - WITH CASCADED CHECK OPTION INSERT _ _ 0 -WITH LOCAL CHECK OPTION - - WITH CASCADED CHECK OPTION INSERT _ _v1 0 -WITH LOCAL CHECK OPTION - - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369 -WITH LOCAL CHECK OPTION - - WITH CASCADED CHECK OPTION UPDATE _v2_ 0 -WITH LOCAL CHECK OPTION - - WITH CASCADED CHECK OPTION UPDATE _ _v1 0 -WITH LOCAL CHECK OPTION - - WITH CASCADED CHECK OPTION UPDATE _ _ 0 -WITH LOCAL CHECK OPTION - - WITH LOCAL CHECK OPTION INSERT _ _ 0 -WITH LOCAL CHECK OPTION - - WITH LOCAL CHECK OPTION INSERT _v2_ 0 -WITH LOCAL CHECK OPTION - - WITH LOCAL CHECK OPTION INSERT _ _v1 0 -WITH LOCAL CHECK OPTION - - WITH LOCAL CHECK OPTION UPDATE _ _ 0 -WITH LOCAL CHECK OPTION - - WITH LOCAL CHECK OPTION UPDATE _ _v1 0 -WITH LOCAL CHECK OPTION - - WITH LOCAL CHECK OPTION UPDATE _v2_ 0 -WITH LOCAL CHECK OPTION - - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - UPDATE _v2_ 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - UPDATE v3_ _ 1369 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - UPDATE _ _ 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - INSERT _ _ 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - INSERT _v2_ 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - INSERT _ _v1 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - UPDATE _ _v1 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 1369 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - INSERT _v2_ 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - INSERT _ _v1 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - UPDATE _ _ 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - UPDATE _ _v1 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - UPDATE _v2_ 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - UPDATE v3_ _ 1369 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - INSERT _ _ 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 1369 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - UPDATE _ _ 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - INSERT _ _v1 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - INSERT _ _ 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - UPDATE _ _v1 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - UPDATE _v2_ 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - UPDATE v3_ _ 1369 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - INSERT _v2_ 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 1369 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 0 - -Plausibility checks for INSERTs and UPDATEs ( 4. and 5. above). -All following SELECTs must give ROW NOT FOUND --------------------------------------------------------------------------------- -SELECT * FROM t1_results -WHERE v3_to_v1_violation = ' _ _ ' AND errno <> 0 -ORDER BY v3_to_v1_options; -v3_to_v1_options statement v3_to_v1_violation errno -SELECT * FROM t1_results -WHERE v3_to_v1_options LIKE ' %' AND errno <> 0 -ORDER BY v3_to_v1_options; -v3_to_v1_options statement v3_to_v1_violation errno -SELECT * FROM t1_results -WHERE v3_to_v1_options LIKE 'WITH %' - AND v3_to_v1_violation LIKE 'v3_%' AND errno = 0 -ORDER BY v3_to_v1_options; -v3_to_v1_options statement v3_to_v1_violation errno -SELECT * FROM t1_results -WHERE v3_to_v1_options LIKE 'WITH %' AND v3_to_v1_options NOT LIKE 'WITH LOCAL %' - AND v3_to_v1_violation NOT LIKE ' _ _ ' AND errno = 0 -ORDER BY v3_to_v1_options; -v3_to_v1_options statement v3_to_v1_violation errno -SELECT * FROM t1_results -WHERE errno <> 0 AND errno <> 1369 -ORDER BY v3_to_v1_options; -v3_to_v1_options statement v3_to_v1_violation errno - -End of plausibility checks --------------------------------------------------------------------------------- -DROP TABLE t1_results; - -Testcase 3.3.1.50 - 3.3.1.53 --------------------------------------------------------------------------------- -DROP VIEW IF EXISTS test.v1; -CREATE VIEW test.v1 AS SELECT * FROM test.tb2; -SELECT * FROM test.v1 order by f59,f60,f61 ; -f59 1 -f60 1 -f61 0000000001 -f62 0000000000000000000000000000000000000000000000000000000000000001 -f63 0000000001 -f64 0000000000000000000000000000000000000000000000000000000000000001 -f65 -5 -f66 0.000000000000000000000000000000 -f67 1 -f68 0.000000000000000000000000000000 -f69 0000000001 -f70 000000000000000000000000000000000.000000000000000000000000000000 -f71 0000000001 -f72 000000000000000000000000000000000.000000000000000000000000000000 -f73 -1.17549435e-38 -f74 1.175494352e-38 -f75 00000001.175494352e-38 -f76 00000001.175494352e-38 -f77 -1.17549435e-38 -f78 1.175494352e-38 -f79 00000001.175494352e-38 -f80 00000001.175494352e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.17549435e-38 -f95 1.17549e-38 -f96 1.175494352e-38 -f97 01.17549e-38 -f98 00000001.175494352e-38 -f99 01.17549e-38 -f100 00000001.175494352e-38 -f101 1000-01-01 -f102 838:59:58 -f103 1970-01-02 00:00:01 -f104 1970-01-02 00:00:01 -f105 1902 -f106 1902 -f107 1902 -f108 2enum -f109 2set -f59 2 -f60 2 -f61 0000000002 -f62 0000000000000000000000000000000000000000000000000000000000000002 -f63 0000000002 -f64 0000000000000000000000000000000000000000000000000000000000000002 -f65 -4 -f66 1.100000000000000000000000000000 -f67 2 -f68 1.100000000000000000000000000000 -f69 0000000002 -f70 000000000000000000000000000000001.100000000000000000000000000000 -f71 0000000002 -f72 000000000000000000000000000000001.100000000000000000000000000000 -f73 -1.175494349e-38 -f74 1.175494353e-38 -f75 00000001.175494353e-38 -f76 00000001.175494353e-38 -f77 -1.175494349e-38 -f78 1.175494353e-38 -f79 00000001.175494353e-38 -f80 00000001.175494353e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494349e-38 -f95 1.17549e-38 -f96 1.175494353e-38 -f97 01.17549e-38 -f98 00000001.175494353e-38 -f99 01.17549e-38 -f100 00000001.175494353e-38 -f101 1000-01-02 -f102 838:59:57 -f103 1970-01-03 00:00:02 -f104 1970-01-03 00:00:02 -f105 1903 -f106 1903 -f107 1903 -f108 1enum -f109 1set,2set -f59 3 -f60 3 -f61 0000000003 -f62 0000000000000000000000000000000000000000000000000000000000000003 -f63 0000000003 -f64 0000000000000000000000000000000000000000000000000000000000000003 -f65 -3 -f66 2.200000000000000000000000000000 -f67 3 -f68 2.200000000000000000000000000000 -f69 0000000003 -f70 000000000000000000000000000000002.200000000000000000000000000000 -f71 0000000003 -f72 000000000000000000000000000000002.200000000000000000000000000000 -f73 -1.175494348e-38 -f74 1.175494354e-38 -f75 00000001.175494354e-38 -f76 00000001.175494354e-38 -f77 -1.175494348e-38 -f78 1.175494354e-38 -f79 00000001.175494354e-38 -f80 00000001.175494354e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494348e-38 -f95 1.17549e-38 -f96 1.175494354e-38 -f97 01.17549e-38 -f98 00000001.175494354e-38 -f99 01.17549e-38 -f100 00000001.175494354e-38 -f101 1000-01-03 -f102 838:59:56 -f103 1970-01-04 00:00:03 -f104 1970-01-04 00:00:03 -f105 1904 -f106 1904 -f107 1904 -f108 2enum -f109 1set -f59 5 -f60 5 -f61 0000000005 -f62 0000000000000000000000000000000000000000000000000000000000000005 -f63 0000000005 -f64 0000000000000000000000000000000000000000000000000000000000000005 -f65 -1 -f66 4.400000000000000000000000000000 -f67 5 -f68 4.400000000000000000000000000000 -f69 0000000005 -f70 000000000000000000000000000000004.400000000000000000000000000000 -f71 0000000005 -f72 000000000000000000000000000000004.400000000000000000000000000000 -f73 -1.175494346e-38 -f74 1.175494356e-38 -f75 00000001.175494356e-38 -f76 00000001.175494356e-38 -f77 -1.175494346e-38 -f78 1.175494356e-38 -f79 00000001.175494356e-38 -f80 00000001.175494356e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494346e-38 -f95 1.17549e-38 -f96 1.175494356e-38 -f97 01.17549e-38 -f98 00000001.175494356e-38 -f99 01.17549e-38 -f100 00000001.175494356e-38 -f101 1000-01-05 -f102 838:59:54 -f103 1970-01-06 00:00:05 -f104 1970-01-06 00:00:05 -f105 1906 -f106 1906 -f107 1906 -f108 2enum -f109 1set,2set -f59 6 -f60 6 -f61 0000000006 -f62 0000000000000000000000000000000000000000000000000000000000000006 -f63 0000000006 -f64 0000000000000000000000000000000000000000000000000000000000000006 -f65 0 -f66 5.500000000000000000000000000000 -f67 6 -f68 5.500000000000000000000000000000 -f69 0000000006 -f70 000000000000000000000000000000005.500000000000000000000000000000 -f71 0000000006 -f72 000000000000000000000000000000005.500000000000000000000000000000 -f73 -1.175494345e-38 -f74 1.175494357e-38 -f75 00000001.175494357e-38 -f76 00000001.175494357e-38 -f77 -1.175494345e-38 -f78 1.175494357e-38 -f79 00000001.175494357e-38 -f80 00000001.175494357e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494345e-38 -f95 1.17549e-38 -f96 1.175494357e-38 -f97 01.17549e-38 -f98 00000001.175494357e-38 -f99 01.17549e-38 -f100 00000001.175494357e-38 -f101 1000-01-06 -f102 838:59:53 -f103 1970-01-07 00:00:06 -f104 1970-01-07 00:00:06 -f105 1907 -f106 1907 -f107 1907 -f108 1enum -f109 1set -f59 7 -f60 7 -f61 0000000007 -f62 0000000000000000000000000000000000000000000000000000000000000007 -f63 0000000007 -f64 0000000000000000000000000000000000000000000000000000000000000007 -f65 1 -f66 6.600000000000000000000000000000 -f67 7 -f68 6.600000000000000000000000000000 -f69 0000000007 -f70 000000000000000000000000000000006.600000000000000000000000000000 -f71 0000000007 -f72 000000000000000000000000000000006.600000000000000000000000000000 -f73 -1.175494344e-38 -f74 1.175494358e-38 -f75 00000001.175494358e-38 -f76 00000001.175494358e-38 -f77 -1.175494344e-38 -f78 1.175494358e-38 -f79 00000001.175494358e-38 -f80 00000001.175494358e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494344e-38 -f95 1.17549e-38 -f96 1.175494358e-38 -f97 01.17549e-38 -f98 00000001.175494358e-38 -f99 01.17549e-38 -f100 00000001.175494358e-38 -f101 1000-01-07 -f102 838:59:52 -f103 1970-01-08 00:00:07 -f104 1970-01-08 00:00:07 -f105 1908 -f106 1908 -f107 1908 -f108 2enum -f109 2set -f59 8 -f60 8 -f61 0000000008 -f62 0000000000000000000000000000000000000000000000000000000000000008 -f63 0000000008 -f64 0000000000000000000000000000000000000000000000000000000000000008 -f65 2 -f66 7.700000000000000000000000000000 -f67 8 -f68 7.700000000000000000000000000000 -f69 0000000008 -f70 000000000000000000000000000000007.700000000000000000000000000000 -f71 0000000008 -f72 000000000000000000000000000000007.700000000000000000000000000000 -f73 -1.175494343e-38 -f74 1.175494359e-38 -f75 00000001.175494359e-38 -f76 00000001.175494359e-38 -f77 -1.175494343e-38 -f78 1.175494359e-38 -f79 00000001.175494359e-38 -f80 00000001.175494359e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494343e-38 -f95 1.17549e-38 -f96 1.175494359e-38 -f97 01.17549e-38 -f98 00000001.175494359e-38 -f99 01.17549e-38 -f100 00000001.175494359e-38 -f101 1000-01-08 -f102 838:59:51 -f103 1970-01-09 00:00:08 -f104 1970-01-09 00:00:08 -f105 1909 -f106 1909 -f107 1909 -f108 1enum -f109 1set,2set -f59 9 -f60 9 -f61 0000000009 -f62 0000000000000000000000000000000000000000000000000000000000000009 -f63 0000000009 -f64 0000000000000000000000000000000000000000000000000000000000000009 -f65 3 -f66 8.800000000000000000000000000000 -f67 9 -f68 8.800000000000000000000000000000 -f69 0000000009 -f70 000000000000000000000000000000008.800000000000000000000000000000 -f71 0000000009 -f72 000000000000000000000000000000008.800000000000000000000000000000 -f73 -1.175494342e-38 -f74 1.17549436e-38 -f75 000000001.17549436e-38 -f76 000000001.17549436e-38 -f77 -1.175494342e-38 -f78 1.17549436e-38 -f79 000000001.17549436e-38 -f80 000000001.17549436e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494342e-38 -f95 1.17549e-38 -f96 1.17549436e-38 -f97 01.17549e-38 -f98 000000001.17549436e-38 -f99 01.17549e-38 -f100 000000001.17549436e-38 -f101 1000-01-09 -f102 838:59:50 -f103 1970-01-10 00:00:09 -f104 1970-01-10 00:00:09 -f105 1910 -f106 1910 -f107 1910 -f108 2enum -f109 1set -f59 10 -f60 10 -f61 0000000010 -f62 0000000000000000000000000000000000000000000000000000000000000010 -f63 0000000010 -f64 0000000000000000000000000000000000000000000000000000000000000010 -f65 4 -f66 9.900000000000000000000000000000 -f67 10 -f68 9.900000000000000000000000000000 -f69 0000000010 -f70 000000000000000000000000000000009.900000000000000000000000000000 -f71 0000000010 -f72 000000000000000000000000000000009.900000000000000000000000000000 -f73 -1.175494341e-38 -f74 1.175494361e-38 -f75 00000001.175494361e-38 -f76 00000001.175494361e-38 -f77 -1.175494341e-38 -f78 1.175494361e-38 -f79 00000001.175494361e-38 -f80 00000001.175494361e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494341e-38 -f95 1.17549e-38 -f96 1.175494361e-38 -f97 01.17549e-38 -f98 00000001.175494361e-38 -f99 01.17549e-38 -f100 00000001.175494361e-38 -f101 1000-01-10 -f102 838:59:49 -f103 1970-01-11 00:00:10 -f104 1970-01-11 00:00:10 -f105 1911 -f106 1911 -f107 1911 -f108 1enum -f109 2set -f59 15 -f60 87 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 17 -f60 15 -f61 0000000016 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 19 -f60 18 -f61 0000000014 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 22 -f60 93 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 24 -f60 51654 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 27 -f60 25 -f61 0000000026 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 29 -f60 28 -f61 0000000024 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 34 -f60 41 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 94 -f60 74 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 100 -f60 4 -f61 0000000004 -f62 0000000000000000000000000000000000000000000000000000000000000004 -f63 0000000004 -f64 0000000000000000000000000000000000000000000000000000000000000004 -f65 -2 -f66 3.300000000000000000000000000000 -f67 4 -f68 3.300000000000000000000000000000 -f69 0000000004 -f70 000000000000000000000000000000003.300000000000000000000000000000 -f71 0000000004 -f72 000000000000000000000000000000003.300000000000000000000000000000 -f73 -1.175494347e-38 -f74 1.175494355e-38 -f75 00000001.175494355e-38 -f76 00000001.175494355e-38 -f77 -1.175494347e-38 -f78 1.175494355e-38 -f79 00000001.175494355e-38 -f80 00000001.175494355e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494347e-38 -f95 1.17549e-38 -f96 1.175494355e-38 -f97 01.17549e-38 -f98 00000001.175494355e-38 -f99 01.17549e-38 -f100 00000001.175494355e-38 -f101 1000-01-04 -f102 838:59:55 -f103 1970-01-05 00:00:04 -f104 1970-01-05 00:00:04 -f105 1905 -f106 1905 -f107 1905 -f108 1enum -f109 2set -f59 100 -f60 74 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 107 -f60 105 -f61 0000000106 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 107 -f60 105 -f61 0000000106 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 109 -f60 108 -f61 0000000104 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 109 -f60 108 -f61 0000000104 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 195 -f60 87 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 207 -f60 205 -f61 0000000206 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 209 -f60 208 -f61 0000000204 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 242 -f60 79 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 250 -f60 87895654 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 292 -f60 93 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 299 -f60 899 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 321 -f60 NULL -f61 0000000765 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 323 -f60 14376 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 340 -f60 9984376 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 394 -f60 41 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 424 -f60 89 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 441 -f60 16546 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 500 -f60 NULL -f61 0000000900 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 500 -f60 NULL -f61 0000000900 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 500 -f60 NULL -f61 0000000900 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 660 -f60 876546 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 987 -f60 41 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 2550 -f60 775654 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 2760 -f60 985654 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 3330 -f60 764376 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 3410 -f60 996546 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 7876 -f60 74 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 9112 -f60 NULL -f61 0000008771 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 76710 -f60 226546 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 569300 -f60 9114376 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -drop view test.v1 ; -CREATE VIEW test.v1 AS SELECT F59,F61 FROM test.tb2; -SELECT * FROM test.v1 order by F59, F61 limit 50; -F59 F61 -1 0000000001 -2 0000000002 -3 0000000003 -5 0000000005 -6 0000000006 -7 0000000007 -8 0000000008 -9 0000000009 -10 0000000010 -15 NULL -17 0000000016 -19 0000000014 -22 NULL -24 NULL -27 0000000026 -29 0000000024 -34 NULL -94 NULL -100 NULL -100 0000000004 -107 0000000106 -107 0000000106 -109 0000000104 -109 0000000104 -195 NULL -207 0000000206 -209 0000000204 -242 NULL -250 NULL -292 NULL -299 NULL -321 0000000765 -323 NULL -340 NULL -394 NULL -424 NULL -441 NULL -500 0000000900 -500 0000000900 -500 0000000900 -660 NULL -987 NULL -2550 NULL -2760 NULL -3330 NULL -3410 NULL -7876 NULL -9112 0000008771 -76710 NULL -569300 NULL -drop view test.v1 ; -CREATE VIEW test.v1 AS SELECT * FROM test.tb2 order by f59, f60, f61; -SELECT * FROM test.v1 order by f59,f60,f61 ; -f59 1 -f60 1 -f61 0000000001 -f62 0000000000000000000000000000000000000000000000000000000000000001 -f63 0000000001 -f64 0000000000000000000000000000000000000000000000000000000000000001 -f65 -5 -f66 0.000000000000000000000000000000 -f67 1 -f68 0.000000000000000000000000000000 -f69 0000000001 -f70 000000000000000000000000000000000.000000000000000000000000000000 -f71 0000000001 -f72 000000000000000000000000000000000.000000000000000000000000000000 -f73 -1.17549435e-38 -f74 1.175494352e-38 -f75 00000001.175494352e-38 -f76 00000001.175494352e-38 -f77 -1.17549435e-38 -f78 1.175494352e-38 -f79 00000001.175494352e-38 -f80 00000001.175494352e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.17549435e-38 -f95 1.17549e-38 -f96 1.175494352e-38 -f97 01.17549e-38 -f98 00000001.175494352e-38 -f99 01.17549e-38 -f100 00000001.175494352e-38 -f101 1000-01-01 -f102 838:59:58 -f103 1970-01-02 00:00:01 -f104 1970-01-02 00:00:01 -f105 1902 -f106 1902 -f107 1902 -f108 2enum -f109 2set -f59 2 -f60 2 -f61 0000000002 -f62 0000000000000000000000000000000000000000000000000000000000000002 -f63 0000000002 -f64 0000000000000000000000000000000000000000000000000000000000000002 -f65 -4 -f66 1.100000000000000000000000000000 -f67 2 -f68 1.100000000000000000000000000000 -f69 0000000002 -f70 000000000000000000000000000000001.100000000000000000000000000000 -f71 0000000002 -f72 000000000000000000000000000000001.100000000000000000000000000000 -f73 -1.175494349e-38 -f74 1.175494353e-38 -f75 00000001.175494353e-38 -f76 00000001.175494353e-38 -f77 -1.175494349e-38 -f78 1.175494353e-38 -f79 00000001.175494353e-38 -f80 00000001.175494353e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494349e-38 -f95 1.17549e-38 -f96 1.175494353e-38 -f97 01.17549e-38 -f98 00000001.175494353e-38 -f99 01.17549e-38 -f100 00000001.175494353e-38 -f101 1000-01-02 -f102 838:59:57 -f103 1970-01-03 00:00:02 -f104 1970-01-03 00:00:02 -f105 1903 -f106 1903 -f107 1903 -f108 1enum -f109 1set,2set -f59 3 -f60 3 -f61 0000000003 -f62 0000000000000000000000000000000000000000000000000000000000000003 -f63 0000000003 -f64 0000000000000000000000000000000000000000000000000000000000000003 -f65 -3 -f66 2.200000000000000000000000000000 -f67 3 -f68 2.200000000000000000000000000000 -f69 0000000003 -f70 000000000000000000000000000000002.200000000000000000000000000000 -f71 0000000003 -f72 000000000000000000000000000000002.200000000000000000000000000000 -f73 -1.175494348e-38 -f74 1.175494354e-38 -f75 00000001.175494354e-38 -f76 00000001.175494354e-38 -f77 -1.175494348e-38 -f78 1.175494354e-38 -f79 00000001.175494354e-38 -f80 00000001.175494354e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494348e-38 -f95 1.17549e-38 -f96 1.175494354e-38 -f97 01.17549e-38 -f98 00000001.175494354e-38 -f99 01.17549e-38 -f100 00000001.175494354e-38 -f101 1000-01-03 -f102 838:59:56 -f103 1970-01-04 00:00:03 -f104 1970-01-04 00:00:03 -f105 1904 -f106 1904 -f107 1904 -f108 2enum -f109 1set -f59 5 -f60 5 -f61 0000000005 -f62 0000000000000000000000000000000000000000000000000000000000000005 -f63 0000000005 -f64 0000000000000000000000000000000000000000000000000000000000000005 -f65 -1 -f66 4.400000000000000000000000000000 -f67 5 -f68 4.400000000000000000000000000000 -f69 0000000005 -f70 000000000000000000000000000000004.400000000000000000000000000000 -f71 0000000005 -f72 000000000000000000000000000000004.400000000000000000000000000000 -f73 -1.175494346e-38 -f74 1.175494356e-38 -f75 00000001.175494356e-38 -f76 00000001.175494356e-38 -f77 -1.175494346e-38 -f78 1.175494356e-38 -f79 00000001.175494356e-38 -f80 00000001.175494356e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494346e-38 -f95 1.17549e-38 -f96 1.175494356e-38 -f97 01.17549e-38 -f98 00000001.175494356e-38 -f99 01.17549e-38 -f100 00000001.175494356e-38 -f101 1000-01-05 -f102 838:59:54 -f103 1970-01-06 00:00:05 -f104 1970-01-06 00:00:05 -f105 1906 -f106 1906 -f107 1906 -f108 2enum -f109 1set,2set -f59 6 -f60 6 -f61 0000000006 -f62 0000000000000000000000000000000000000000000000000000000000000006 -f63 0000000006 -f64 0000000000000000000000000000000000000000000000000000000000000006 -f65 0 -f66 5.500000000000000000000000000000 -f67 6 -f68 5.500000000000000000000000000000 -f69 0000000006 -f70 000000000000000000000000000000005.500000000000000000000000000000 -f71 0000000006 -f72 000000000000000000000000000000005.500000000000000000000000000000 -f73 -1.175494345e-38 -f74 1.175494357e-38 -f75 00000001.175494357e-38 -f76 00000001.175494357e-38 -f77 -1.175494345e-38 -f78 1.175494357e-38 -f79 00000001.175494357e-38 -f80 00000001.175494357e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494345e-38 -f95 1.17549e-38 -f96 1.175494357e-38 -f97 01.17549e-38 -f98 00000001.175494357e-38 -f99 01.17549e-38 -f100 00000001.175494357e-38 -f101 1000-01-06 -f102 838:59:53 -f103 1970-01-07 00:00:06 -f104 1970-01-07 00:00:06 -f105 1907 -f106 1907 -f107 1907 -f108 1enum -f109 1set -f59 7 -f60 7 -f61 0000000007 -f62 0000000000000000000000000000000000000000000000000000000000000007 -f63 0000000007 -f64 0000000000000000000000000000000000000000000000000000000000000007 -f65 1 -f66 6.600000000000000000000000000000 -f67 7 -f68 6.600000000000000000000000000000 -f69 0000000007 -f70 000000000000000000000000000000006.600000000000000000000000000000 -f71 0000000007 -f72 000000000000000000000000000000006.600000000000000000000000000000 -f73 -1.175494344e-38 -f74 1.175494358e-38 -f75 00000001.175494358e-38 -f76 00000001.175494358e-38 -f77 -1.175494344e-38 -f78 1.175494358e-38 -f79 00000001.175494358e-38 -f80 00000001.175494358e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494344e-38 -f95 1.17549e-38 -f96 1.175494358e-38 -f97 01.17549e-38 -f98 00000001.175494358e-38 -f99 01.17549e-38 -f100 00000001.175494358e-38 -f101 1000-01-07 -f102 838:59:52 -f103 1970-01-08 00:00:07 -f104 1970-01-08 00:00:07 -f105 1908 -f106 1908 -f107 1908 -f108 2enum -f109 2set -f59 8 -f60 8 -f61 0000000008 -f62 0000000000000000000000000000000000000000000000000000000000000008 -f63 0000000008 -f64 0000000000000000000000000000000000000000000000000000000000000008 -f65 2 -f66 7.700000000000000000000000000000 -f67 8 -f68 7.700000000000000000000000000000 -f69 0000000008 -f70 000000000000000000000000000000007.700000000000000000000000000000 -f71 0000000008 -f72 000000000000000000000000000000007.700000000000000000000000000000 -f73 -1.175494343e-38 -f74 1.175494359e-38 -f75 00000001.175494359e-38 -f76 00000001.175494359e-38 -f77 -1.175494343e-38 -f78 1.175494359e-38 -f79 00000001.175494359e-38 -f80 00000001.175494359e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494343e-38 -f95 1.17549e-38 -f96 1.175494359e-38 -f97 01.17549e-38 -f98 00000001.175494359e-38 -f99 01.17549e-38 -f100 00000001.175494359e-38 -f101 1000-01-08 -f102 838:59:51 -f103 1970-01-09 00:00:08 -f104 1970-01-09 00:00:08 -f105 1909 -f106 1909 -f107 1909 -f108 1enum -f109 1set,2set -f59 9 -f60 9 -f61 0000000009 -f62 0000000000000000000000000000000000000000000000000000000000000009 -f63 0000000009 -f64 0000000000000000000000000000000000000000000000000000000000000009 -f65 3 -f66 8.800000000000000000000000000000 -f67 9 -f68 8.800000000000000000000000000000 -f69 0000000009 -f70 000000000000000000000000000000008.800000000000000000000000000000 -f71 0000000009 -f72 000000000000000000000000000000008.800000000000000000000000000000 -f73 -1.175494342e-38 -f74 1.17549436e-38 -f75 000000001.17549436e-38 -f76 000000001.17549436e-38 -f77 -1.175494342e-38 -f78 1.17549436e-38 -f79 000000001.17549436e-38 -f80 000000001.17549436e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494342e-38 -f95 1.17549e-38 -f96 1.17549436e-38 -f97 01.17549e-38 -f98 000000001.17549436e-38 -f99 01.17549e-38 -f100 000000001.17549436e-38 -f101 1000-01-09 -f102 838:59:50 -f103 1970-01-10 00:00:09 -f104 1970-01-10 00:00:09 -f105 1910 -f106 1910 -f107 1910 -f108 2enum -f109 1set -f59 10 -f60 10 -f61 0000000010 -f62 0000000000000000000000000000000000000000000000000000000000000010 -f63 0000000010 -f64 0000000000000000000000000000000000000000000000000000000000000010 -f65 4 -f66 9.900000000000000000000000000000 -f67 10 -f68 9.900000000000000000000000000000 -f69 0000000010 -f70 000000000000000000000000000000009.900000000000000000000000000000 -f71 0000000010 -f72 000000000000000000000000000000009.900000000000000000000000000000 -f73 -1.175494341e-38 -f74 1.175494361e-38 -f75 00000001.175494361e-38 -f76 00000001.175494361e-38 -f77 -1.175494341e-38 -f78 1.175494361e-38 -f79 00000001.175494361e-38 -f80 00000001.175494361e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494341e-38 -f95 1.17549e-38 -f96 1.175494361e-38 -f97 01.17549e-38 -f98 00000001.175494361e-38 -f99 01.17549e-38 -f100 00000001.175494361e-38 -f101 1000-01-10 -f102 838:59:49 -f103 1970-01-11 00:00:10 -f104 1970-01-11 00:00:10 -f105 1911 -f106 1911 -f107 1911 -f108 1enum -f109 2set -f59 15 -f60 87 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 17 -f60 15 -f61 0000000016 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 19 -f60 18 -f61 0000000014 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 22 -f60 93 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 24 -f60 51654 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 27 -f60 25 -f61 0000000026 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 29 -f60 28 -f61 0000000024 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 34 -f60 41 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 94 -f60 74 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 100 -f60 4 -f61 0000000004 -f62 0000000000000000000000000000000000000000000000000000000000000004 -f63 0000000004 -f64 0000000000000000000000000000000000000000000000000000000000000004 -f65 -2 -f66 3.300000000000000000000000000000 -f67 4 -f68 3.300000000000000000000000000000 -f69 0000000004 -f70 000000000000000000000000000000003.300000000000000000000000000000 -f71 0000000004 -f72 000000000000000000000000000000003.300000000000000000000000000000 -f73 -1.175494347e-38 -f74 1.175494355e-38 -f75 00000001.175494355e-38 -f76 00000001.175494355e-38 -f77 -1.175494347e-38 -f78 1.175494355e-38 -f79 00000001.175494355e-38 -f80 00000001.175494355e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494347e-38 -f95 1.17549e-38 -f96 1.175494355e-38 -f97 01.17549e-38 -f98 00000001.175494355e-38 -f99 01.17549e-38 -f100 00000001.175494355e-38 -f101 1000-01-04 -f102 838:59:55 -f103 1970-01-05 00:00:04 -f104 1970-01-05 00:00:04 -f105 1905 -f106 1905 -f107 1905 -f108 1enum -f109 2set -f59 100 -f60 74 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 107 -f60 105 -f61 0000000106 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 107 -f60 105 -f61 0000000106 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 109 -f60 108 -f61 0000000104 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 109 -f60 108 -f61 0000000104 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 195 -f60 87 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 207 -f60 205 -f61 0000000206 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 209 -f60 208 -f61 0000000204 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 242 -f60 79 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 250 -f60 87895654 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 292 -f60 93 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 299 -f60 899 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 321 -f60 NULL -f61 0000000765 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 323 -f60 14376 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 340 -f60 9984376 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 394 -f60 41 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 424 -f60 89 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 441 -f60 16546 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 500 -f60 NULL -f61 0000000900 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 500 -f60 NULL -f61 0000000900 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 500 -f60 NULL -f61 0000000900 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 660 -f60 876546 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 987 -f60 41 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 2550 -f60 775654 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 2760 -f60 985654 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 3330 -f60 764376 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 3410 -f60 996546 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 7876 -f60 74 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 9112 -f60 NULL -f61 0000008771 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 76710 -f60 226546 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 569300 -f60 9114376 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -drop view test.v1 ; -CREATE VIEW test.v1 AS SELECT F59,f61 FROM test.tb2; -SELECT * FROM test.v1 order by f59,f61 desc limit 20; -F59 f61 -1 0000000001 -2 0000000002 -3 0000000003 -5 0000000005 -6 0000000006 -7 0000000007 -8 0000000008 -9 0000000009 -10 0000000010 -15 NULL -17 0000000016 -19 0000000014 -22 NULL -24 NULL -27 0000000026 -29 0000000024 -34 NULL -94 NULL -100 0000000004 -100 NULL -drop view test.v1 ; - -Testcase 3.3.1.54 --------------------------------------------------------------------------------- -USE test; -drop table if exists test.t1 ; -drop table if exists test.t2 ; -drop view if exists test.v1 ; -Create table t1 (f59 int, f60 int) ; -Create table t2 (f59 int, f60 int) ; -Insert into t1 values (1,10) ; -Insert into t1 values (2,20) ; -Insert into t1 values (47,80) ; -Insert into t2 values (1,1000) ; -Insert into t2 values (2,2000) ; -Insert into t2 values (31,97) ; -Create view test.v1 as select t1.f59, t1.f60 -from t1,t2 where t1.f59=t2.f59 ; -Select * from test.v1 order by f59 limit 50 ; -f59 f60 -1 10 -2 20 -drop table test.t1 ; -drop table test.t2 ; -drop view test.v1 ; - -Testcase 3.3.1.50 - 3.3.1.54 additional implementation --------------------------------------------------------------------------------- -DROP TABLE IF EXISTS t1 ; -DROP VIEW IF EXISTS v1 ; -CREATE TABLE t1 ( f1 BIGINT, f2 char(10), f3 DECIMAL(10,5) ); -INSERT INTO t1 VALUES(1, 'one', 1.1); -INSERT INTO t1 VALUES(2, 'two', 2.2); -INSERT INTO t1 VALUES(3, 'three', 3.3); -CREATE OR REPLACE VIEW v1 AS SELECT * FROM t1; -SELECT * FROM v1; -f1 f2 f3 -1 one 1.10000 -2 two 2.20000 -3 three 3.30000 -CREATE OR REPLACE VIEW v1 AS SELECT f2 FROM t1; -SELECT * FROM v1; -f2 -one -two -three -CREATE OR REPLACE VIEW v1 AS SELECT * FROM t1 WHERE f3 = 2.2; -SELECT * FROM v1; -f1 f2 f3 -2 two 2.20000 -CREATE OR REPLACE VIEW v1 AS SELECT f2 FROM t1 WHERE f3 = 2.2; -SELECT * FROM v1; -f2 -two -SET sql_mode = 'traditional,ansi'; -CREATE OR REPLACE VIEW v1 AS -SELECT f3 AS "pure column f3:", f1 + f3 AS "sum of columns f1 + f3 =", -3 * (- 0.11111E+1) AS "product of constants 3 * (- 0.11111E+1):", -'->' || CAST(f3 AS CHAR) || '<-' - AS "expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR):" -FROM t1 WHERE f1 = 2; -CREATE OR REPLACE VIEW v1 AS -SELECT f3 AS "pure column f3: ", f1 + f3 AS "sum of columns f1 + f3 = ", -3 * (- 0.11111E+1) AS "product of constants 3 * (- 0.11111E+1): ", -'->' || CAST(f3 AS CHAR) || '<-' - AS "expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR): " -FROM t1 WHERE f1 = 2; -ERROR 42000: Incorrect column name 'pure column f3: ' -SELECT * FROM v1; -pure column f3: 2.20000 -sum of columns f1 + f3 = 4.20000 -product of constants 3 * (- 0.11111E+1): -3.3333 -expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR): ->2.20000<- -SET sql_mode = ''; - -Testcases 3.3.1.55 - 3.3.1.62 --------------------------------------------------------------------------------- -Drop table if exists t1, t2 ; -Drop view if exists v1 ; -Create table t1 (f59 int, f60 char(10), f61 int, a char(1)) ; -Insert into t1 values (1, 'single', 3, '1') ; -Insert into t1 values (2, 'double', 6, '2') ; -Insert into t1 values (3, 'single-f3', 4, '3') ; -Create table t2 (f59 int, f60 char(10), f61 int, b char(1)) ; -Insert into t2 values (2, 'double', 6, '2') ; -Insert into t2 values (3, 'single-f3', 6, '3') ; -Insert into t2 values (4, 'single', 4, '4') ; -create or replace view test.v1 as -Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60, -t1.f61 t1_f61, t2.f61 t2_f61 -from t1 inner join t2 where t1.f59 = t2.f59 ; -select * from test.v1 order by t1_f59 ; -t1_f59 t2_f59 t1_f60 t2_f60 t1_f61 t2_f61 -2 2 double double 6 6 -3 3 single-f3 single-f3 4 6 -Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60, -t1.f61 t1_f61, t2.f61 t2_f61 -from t1 inner join t2 where t1.f59 = t2.f59; -t1_f59 t2_f59 t1_f60 t2_f60 t1_f61 t2_f61 -2 2 double double 6 6 -3 3 single-f3 single-f3 4 6 -Create or replace view test.v1 as -Select t1.f59 AS t1_f59, t2.f59 AS t2_f59 -FROM t2 cross join t1; -Select * from v1 order by t1_f59,t2_f59; -t1_f59 t2_f59 -1 2 -1 3 -1 4 -2 2 -2 3 -2 4 -3 2 -3 3 -3 4 -Select t1.f59 AS t1_f59, t2.f59 AS t2_f59 -FROM t2 cross join t1; -t1_f59 t2_f59 -1 2 -1 3 -1 4 -2 2 -2 3 -2 4 -3 2 -3 3 -3 4 -Create or replace view test.v1 as -Select straight_join t1.f59 AS t1_f59, t2.f59 AS t2_f59 -FROM t2,t1; -Select * from v1 order by t1_f59,t2_f59; -t1_f59 t2_f59 -1 2 -1 3 -1 4 -2 2 -2 3 -2 4 -3 2 -3 3 -3 4 -Select straight_join t1.f59 AS t1_f59, t2.f59 AS t2_f59 -FROM t2,t1; -t1_f59 t2_f59 -1 2 -1 3 -1 4 -2 2 -2 3 -2 4 -3 2 -3 3 -3 4 -Create or replace view test.v1 as -Select f59, f60, f61, a, b -FROM t2 natural join t1; -Select * from v1 order by f59; -f59 f60 f61 a b -2 double 6 2 2 -Select f59, f60, f61, a, b -FROM t2 natural join t1; -f59 f60 f61 a b -2 double 6 2 2 -Create or replace view test.v1 as -Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60, -t1.f61 t1_f61, t2.f61 t2_f61 -FROM t2 left outer join t1 on t2.f59=t1.f59; -Select * from v1 order by t1_f59; -t1_f59 t2_f59 t1_f60 t2_f60 t1_f61 t2_f61 -NULL 4 NULL single NULL 4 -2 2 double double 6 6 -3 3 single-f3 single-f3 4 6 -Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60, -t1.f61 t1_f61, t2.f61 t2_f61 -FROM t2 left outer join t1 on t2.f59=t1.f59; -t1_f59 t2_f59 t1_f60 t2_f60 t1_f61 t2_f61 -2 2 double double 6 6 -3 3 single-f3 single-f3 4 6 -NULL 4 NULL single NULL 4 -Create or replace view test.v1 as -Select f59, f60, f61, t1.a, t2.b -FROM t2 natural left outer join t1; -Select * from v1 order by f59; -f59 f60 f61 a b -2 double 6 2 2 -3 single-f3 6 NULL 3 -4 single 4 NULL 4 -Select f59, f60, f61, t1.a, t2.b -FROM t2 natural left outer join t1; -f59 f60 f61 a b -2 double 6 2 2 -3 single-f3 6 NULL 3 -4 single 4 NULL 4 -Create or replace view test.v1 as -Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60, -t1.f61 t1_f61, t2.f61 t2_f61 -FROM t2 right outer join t1 on t2.f59=t1.f59; -Select * from v1 order by t1_f59; -t1_f59 t2_f59 t1_f60 t2_f60 t1_f61 t2_f61 -1 NULL single NULL 3 NULL -2 2 double double 6 6 -3 3 single-f3 single-f3 4 6 -Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60, -t1.f61 t1_f61, t2.f61 t2_f61 -FROM t2 right outer join t1 on t2.f59=t1.f59; -t1_f59 t2_f59 t1_f60 t2_f60 t1_f61 t2_f61 -1 NULL single NULL 3 NULL -2 2 double double 6 6 -3 3 single-f3 single-f3 4 6 -Create or replace view test.v1 as -Select f59, f60, a, b -FROM t2 natural right outer join t1; -Select * from v1 order by f59 desc; -f59 f60 a b -3 single-f3 3 NULL -2 double 2 2 -1 single 1 NULL -Select f59, f60, a, b -FROM t2 natural right outer join t1; -f59 f60 a b -1 single 1 NULL -2 double 2 2 -3 single-f3 3 NULL -drop table t1, t2; -drop view v1 ; -Use test; - -Testcase 3.3.1.A1 - 3.3.1.A3 --------------------------------------------------------------------------------- -Drop table if exists t1 ; -Drop view if exists v1; -Create table t1 (f59 int, f60 int, f61 int) ; -Insert into t1 values (101,201,301) ; -Insert into t1 values (107,501,601) ; -Insert into t1 values (901,801,401) ; -Create or replace view test.v1 as -Select tb2.f59 FROM tb2 LEFT JOIN t1 on tb2.f59 = t1.f59 ; -Select * from test.v1 order by f59 limit 0,10; -f59 -1 -2 -3 -5 -6 -7 -8 -9 -10 -15 -Drop view if exists test.v1 ; -Drop table if exists t1 ; -Drop view if exists v1; -Create table t1 (f59 int, f60 int, f61 int) ; -Insert into t1 values (201,201,201) ; -Insert into t1 values (207,201,201) ; -Insert into t1 values (201,201,201) ; -Create or replace view test.v1 -as Select tb2.f59 FROM tb2 INNER JOIN t1 on tb2.f59 = t1.f59 ; -Select * from test.v1 order by f59 limit 0,10; -f59 -207 -Drop view if exists test.v1 ; -Drop table if exists t1 ; -Drop view if exists v1; -Create table t1 (f59 int, f60 int, f61 int) ; -Insert into t1 values (21,21,21) ; -Insert into t1 values (27,21,21) ; -Insert into t1 values (21,21,21) ; -Create or replace view test.v1 -as Select tb2.f59 FROM tb2 CROSS JOIN t1 on tb2.f59 = t1.f59 ; -Select * from test.v1 order by f59 limit 0,10; -f59 -27 -Drop view test.v1 ; - -Testcase 3.3.1.63 --------------------------------------------------------------------------------- -Drop table if exists t1 ; -Drop view if exists test.v1 ; -Create table t1 (f59 int, f60 int, f61 int) ; -Insert into t1 values (11,21,31) ; -Insert into t1 values (17,51,61) ; -Insert into t1 values (91,81,41) ; -Create or replace view test.v1 as (Select f59 FROM tb2 where f59=17 ) -Union ALL (Select f59 from t1 where f59=17 ); -Select * from test.v1 order by f59 limit 0,10; -f59 -17 -17 -Create or replace view test.v1 as (Select f59 FROM tb2 where f59=17 ) -Union (Select f59 from t1 where f59=17 ); -Select * from test.v1 order by f59 limit 0,10; -f59 -17 -Create or replace view test.v1 as (Select f59 FROM tb2 where f59=17 ) -Union Distinct (Select f59 from t1 where f60=17 ); -Select * from test.v1 order by f59 limit 0,10; -f59 -17 -Drop view test.v1 ; -drop table if exists t1; -drop view if exists test.v1; -create table t1 (f59 int, f60 int, f61 int); -insert into t1 values (101,201,301); -insert into t1 values (107,501,601); -insert into t1 values (901,801,401); -create or replace view test.v1 as -select tb2.f59 from tb2 join t1 on tb2.f59 = t1.f59; -select * from test.v1 order by f59 limit 0,10; -f59 -107 -107 -create or replace view test.v1 as -(select f59 from tb2 where f59=107 ) -union all -(select f59 from t1 where f59=107 ); -select * from test.v1 order by f59 limit 0,10; -f59 -107 -107 -107 -create or replace view test.v1 as -(select f59 from tb2 where f59=107 ) -union -(select f59 from t1 where f59=107 ); -select * from test.v1 order by f59 limit 0,10; -f59 -107 -create or replace view test.v1 as -(select f59 from tb2 where f59=107 ) -union distinct -(select f59 from t1 where f59=107 ); -select * from test.v1 order by f59 limit 0,10; -f59 -107 -drop view if exists test.v1 ; -drop table t1; - -Testcase 3.3.1.64 --------------------------------------------------------------------------------- -Drop view if exists test.v1 ; -CREATE VIEW test.v1 AS SELECT F59 -FROM test.tb2 where test.tb2.F59 = 109; -SELECT * FROM test.v1 order by f59 limit 0,10; -F59 -109 -109 -ALTER VIEW test.v1 AS SELECT * -FROM test.tb2 WHERE test.tb2.f59 = 242 ; -SELECT * FROM test.v1 order by f59 limit 0,10; -f59 242 -f60 79 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -Drop view test.v1 ; - -Testcase 3.3.1.65, 3.3.1.A4, 3.3.1.66, 3.3.1.67 --------------------------------------------------------------------------------- -DROP TABLE IF EXISTS t1; -DROP VIEW IF EXISTS test.v1 ; -CREATE TABLE t1 ( f1 VARCHAR(1000) ) ENGINE = ndb ; -CREATE VIEW v1 AS SELECT f1 FROM t1; -DROP VIEW v1; -DROP VIEW v1; -ERROR 42S02: Unknown table 'v1' -CREATE VIEW v1 AS SELECT f1 FROM t1; -DROP VIEW IF EXISTS v1; -DROP VIEW IF EXISTS v1; -Warnings: -Note 1051 Unknown table 'test.v1' - -Testcase 3.3.1.68 --------------------------------------------------------------------------------- -DROP TABLE IF EXISTS t1; -DROP VIEW IF EXISTS v1_base ; -DROP VIEW IF EXISTS v1_top ; -CREATE TABLE t1 ( f1 DOUBLE); -CREATE VIEW v1_base AS SELECT * FROM t1; -CREATE VIEW v1_top AS SELECT * FROM v1_base; -DROP VIEW v1_top ; -DROP VIEW v1_top; -ERROR 42S02: Unknown table 'v1_top' -CREATE VIEW v1_top AS SELECT * FROM v1_base; -DROP VIEW v1_base ; -DROP VIEW v1_base; -ERROR 42S02: Unknown table 'v1_base' -DROP VIEW v1_top; -CREATE VIEW v1_base AS SELECT * FROM t1; -CREATE VIEW v1_top AS SELECT * FROM v1_base; -DROP VIEW v1_top CASCADE ; -DROP VIEW v1_top; -ERROR 42S02: Unknown table 'v1_top' -CREATE VIEW v1_top AS SELECT * FROM v1_base; -DROP VIEW v1_base CASCADE ; -DROP VIEW v1_base; -ERROR 42S02: Unknown table 'v1_base' -DROP VIEW v1_top; -CREATE VIEW v1_base AS SELECT * FROM t1; -CREATE VIEW v1_top AS SELECT * FROM v1_base; -DROP VIEW v1_top RESTRICT ; -DROP VIEW v1_top; -ERROR 42S02: Unknown table 'v1_top' -CREATE VIEW v1_top AS SELECT * FROM v1_base; -DROP VIEW v1_base RESTRICT ; -DROP VIEW v1_base; -ERROR 42S02: Unknown table 'v1_base' -DROP VIEW v1_top; - -Testcase 3.3.1.69, 3.3.1.70, 3.3.1.A5 --------------------------------------------------------------------------------- -DROP TABLE IF EXISTS t1 ; -DROP VIEW IF EXISTS v1 ; -CREATE TABLE t1 (f59 INT, f60 INT, f61 INT) ENGINE = ndb; -CREATE VIEW v1 AS SELECT * FROM t1; -DROP VIEW v1 ; -SELECT * FROM v1 ; -ERROR 42S02: Table 'test.v1' doesn't exist -SHOW CREATE VIEW v1 ; -ERROR 42S02: Table 'test.v1' doesn't exist -SHOW CREATE TABLE v1 ; -ERROR 42S02: Table 'test.v1' doesn't exist -SHOW TABLE STATUS like 'v1' ; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -SHOW TABLES LIKE 'v1'; -Tables_in_test (v1) -SHOW COLUMNS FROM v1; -ERROR 42S02: Table 'test.v1' doesn't exist -SHOW FIELDS FROM v1; -ERROR 42S02: Table 'test.v1' doesn't exist -CHECK TABLE v1; -Table Op Msg_type Msg_text -test.v1 check Error Table 'test.v1' doesn't exist -test.v1 check status Operation failed -DESCRIBE v1; -ERROR 42S02: Table 'test.v1' doesn't exist -EXPLAIN SELECT * FROM v1; -ERROR 42S02: Table 'test.v1' doesn't exist -Use test; - -Testcase 3.3.1.A6 --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS test3; -CREATE DATABASE test3; -CREATE TABLE test3.t1 (f1 DECIMAL(5,3)) ENGINE = ndb; -INSERT INTO test3.t1 SET f1 = 1.0; -CREATE VIEW test3.v0 AS SELECT * FROM test3.t1; -CREATE VIEW test3.v1 AS SELECT * FROM test3.v0; -CREATE VIEW test3.v2 AS SELECT * FROM test3.v1; -CREATE VIEW test3.v3 AS SELECT * FROM test3.v2; -CREATE VIEW test3.v4 AS SELECT * FROM test3.v3; -CREATE VIEW test3.v5 AS SELECT * FROM test3.v4; -CREATE VIEW test3.v6 AS SELECT * FROM test3.v5; -CREATE VIEW test3.v7 AS SELECT * FROM test3.v6; -CREATE VIEW test3.v8 AS SELECT * FROM test3.v7; -CREATE VIEW test3.v9 AS SELECT * FROM test3.v8; -CREATE VIEW test3.v10 AS SELECT * FROM test3.v9; -CREATE VIEW test3.v11 AS SELECT * FROM test3.v10; -CREATE VIEW test3.v12 AS SELECT * FROM test3.v11; -CREATE VIEW test3.v13 AS SELECT * FROM test3.v12; -CREATE VIEW test3.v14 AS SELECT * FROM test3.v13; -CREATE VIEW test3.v15 AS SELECT * FROM test3.v14; -CREATE VIEW test3.v16 AS SELECT * FROM test3.v15; -CREATE VIEW test3.v17 AS SELECT * FROM test3.v16; -CREATE VIEW test3.v18 AS SELECT * FROM test3.v17; -CREATE VIEW test3.v19 AS SELECT * FROM test3.v18; -CREATE VIEW test3.v20 AS SELECT * FROM test3.v19; -CREATE VIEW test3.v21 AS SELECT * FROM test3.v20; -CREATE VIEW test3.v22 AS SELECT * FROM test3.v21; -CREATE VIEW test3.v23 AS SELECT * FROM test3.v22; -CREATE VIEW test3.v24 AS SELECT * FROM test3.v23; -CREATE VIEW test3.v25 AS SELECT * FROM test3.v24; -CREATE VIEW test3.v26 AS SELECT * FROM test3.v25; -CREATE VIEW test3.v27 AS SELECT * FROM test3.v26; -CREATE VIEW test3.v28 AS SELECT * FROM test3.v27; -CREATE VIEW test3.v29 AS SELECT * FROM test3.v28; -CREATE VIEW test3.v30 AS SELECT * FROM test3.v29; -CREATE VIEW test3.v31 AS SELECT * FROM test3.v30; -CREATE VIEW test3.v32 AS SELECT * FROM test3.v31; -SHOW CREATE VIEW test3.v32; -View Create View character_set_client collation_connection -v32 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `test3`.`v32` AS select `v31`.`f1` AS `f1` from `test3`.`v31` latin1 latin1_swedish_ci -SELECT * FROM test3.v32; -f1 -1.000 -EXPLAIN SELECT * FROM test3.v32; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 1 -DROP VIEW test3.v0; -SHOW CREATE VIEW test3.v32; -View Create View character_set_client collation_connection -v32 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `test3`.`v32` AS select `v31`.`f1` AS `f1` from `test3`.`v31` latin1 latin1_swedish_ci -Warnings: -Warning 1356 View 'test3.v32' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them -SELECT * FROM test3.v32; -ERROR HY000: View 'test3.v32' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them -EXPLAIN SELECT * FROM test3.v32; -ERROR HY000: View 'test3.v32' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them - -FIXME - Setting join_limit to 28 - hangs for higher values ----------------------------------------------------------- -SET @join_limit = 28; -SET @max_level = @join_limit - 1; -DROP DATABASE IF EXISTS test3; -DROP TABLE IF EXISTS test1.t1; -DROP TABLE IF EXISTS test2.t1; -DROP VIEW IF EXISTS test1.v27; -DROP VIEW IF EXISTS test1.v26; -DROP VIEW IF EXISTS test1.v25; -DROP VIEW IF EXISTS test1.v24; -DROP VIEW IF EXISTS test1.v23; -DROP VIEW IF EXISTS test1.v22; -DROP VIEW IF EXISTS test1.v21; -DROP VIEW IF EXISTS test1.v20; -DROP VIEW IF EXISTS test1.v19; -DROP VIEW IF EXISTS test1.v18; -DROP VIEW IF EXISTS test1.v17; -DROP VIEW IF EXISTS test1.v16; -DROP VIEW IF EXISTS test1.v15; -DROP VIEW IF EXISTS test1.v14; -DROP VIEW IF EXISTS test1.v13; -DROP VIEW IF EXISTS test1.v12; -DROP VIEW IF EXISTS test1.v11; -DROP VIEW IF EXISTS test1.v10; -DROP VIEW IF EXISTS test1.v9; -DROP VIEW IF EXISTS test1.v8; -DROP VIEW IF EXISTS test1.v7; -DROP VIEW IF EXISTS test1.v6; -DROP VIEW IF EXISTS test1.v5; -DROP VIEW IF EXISTS test1.v4; -DROP VIEW IF EXISTS test1.v3; -DROP VIEW IF EXISTS test1.v2; -DROP VIEW IF EXISTS test1.v1; -DROP VIEW IF EXISTS test1.v0; -CREATE DATABASE test3; -USE test1; -CREATE TABLE t1 (f1 BIGINT, f2 CHAR(50)) ENGINE = ndb ; -INSERT INTO t1 VALUES (NULL, 'numeric column is NULL'); -INSERT INTO t1 VALUES (0, NULL); -INSERT INTO t1 VALUES (5, 'five'); -INSERT INTO t1 VALUES (1, 'one'); -INSERT INTO t1 VALUES (2, 'two'); -USE test2; -CREATE TABLE t1 (f1 DECIMAL(64,30), f2 VARCHAR(50)) ENGINE = ndb; -INSERT INTO t1 VALUES (NULL, 'numeric column is NULL'); -INSERT INTO t1 VALUES (0.000000000000000000000000000000, NULL); -INSERT INTO t1 VALUES (5.000000000000000000000000000000, 'five'); -INSERT INTO t1 VALUES (+1.000000000000000000000000000000, 'one'); -INSERT INTO t1 VALUES (3.000000000000000, 'three'); -USE test3; -CREATE TABLE t1 (f1 DOUBLE, f2 VARBINARY(50)) ENGINE = ndb; -INSERT INTO t1 VALUES (NULL, 'numeric column is NULL'); -INSERT INTO t1 VALUES (+0.0E-35, NULL); -INSERT INTO t1 VALUES (+0.5E+1, 'five'); -INSERT INTO t1 VALUES (20.0E-1, 'two'); -INSERT INTO t1 VALUES (0.0300E2, 'three'); -USE test; -CREATE OR REPLACE VIEW test1.v0 AS SELECT * FROM test2.t1; -CREATE OR REPLACE VIEW test1.v1 AS SELECT f1, f2 -FROM test2.t1 tab1 NATURAL JOIN test1.v0 tab2; -CREATE OR REPLACE VIEW test1.v2 AS SELECT f1, f2 -FROM test3.t1 tab1 NATURAL JOIN test1.v1 tab2; -CREATE OR REPLACE VIEW test1.v3 AS SELECT f1, f2 -FROM test1.t1 tab1 NATURAL JOIN test1.v2 tab2; -CREATE OR REPLACE VIEW test1.v4 AS SELECT f1, f2 -FROM test2.t1 tab1 NATURAL JOIN test1.v3 tab2; -CREATE OR REPLACE VIEW test1.v5 AS SELECT f1, f2 -FROM test3.t1 tab1 NATURAL JOIN test1.v4 tab2; -CREATE OR REPLACE VIEW test1.v6 AS SELECT f1, f2 -FROM test1.t1 tab1 NATURAL JOIN test1.v5 tab2; -CREATE OR REPLACE VIEW test1.v7 AS SELECT f1, f2 -FROM test2.t1 tab1 NATURAL JOIN test1.v6 tab2; -CREATE OR REPLACE VIEW test1.v8 AS SELECT f1, f2 -FROM test3.t1 tab1 NATURAL JOIN test1.v7 tab2; -CREATE OR REPLACE VIEW test1.v9 AS SELECT f1, f2 -FROM test1.t1 tab1 NATURAL JOIN test1.v8 tab2; -CREATE OR REPLACE VIEW test1.v10 AS SELECT f1, f2 -FROM test2.t1 tab1 NATURAL JOIN test1.v9 tab2; -CREATE OR REPLACE VIEW test1.v11 AS SELECT f1, f2 -FROM test3.t1 tab1 NATURAL JOIN test1.v10 tab2; -CREATE OR REPLACE VIEW test1.v12 AS SELECT f1, f2 -FROM test1.t1 tab1 NATURAL JOIN test1.v11 tab2; -CREATE OR REPLACE VIEW test1.v13 AS SELECT f1, f2 -FROM test2.t1 tab1 NATURAL JOIN test1.v12 tab2; -CREATE OR REPLACE VIEW test1.v14 AS SELECT f1, f2 -FROM test3.t1 tab1 NATURAL JOIN test1.v13 tab2; -CREATE OR REPLACE VIEW test1.v15 AS SELECT f1, f2 -FROM test1.t1 tab1 NATURAL JOIN test1.v14 tab2; -CREATE OR REPLACE VIEW test1.v16 AS SELECT f1, f2 -FROM test2.t1 tab1 NATURAL JOIN test1.v15 tab2; -CREATE OR REPLACE VIEW test1.v17 AS SELECT f1, f2 -FROM test3.t1 tab1 NATURAL JOIN test1.v16 tab2; -CREATE OR REPLACE VIEW test1.v18 AS SELECT f1, f2 -FROM test1.t1 tab1 NATURAL JOIN test1.v17 tab2; -CREATE OR REPLACE VIEW test1.v19 AS SELECT f1, f2 -FROM test2.t1 tab1 NATURAL JOIN test1.v18 tab2; -CREATE OR REPLACE VIEW test1.v20 AS SELECT f1, f2 -FROM test3.t1 tab1 NATURAL JOIN test1.v19 tab2; -CREATE OR REPLACE VIEW test1.v21 AS SELECT f1, f2 -FROM test1.t1 tab1 NATURAL JOIN test1.v20 tab2; -CREATE OR REPLACE VIEW test1.v22 AS SELECT f1, f2 -FROM test2.t1 tab1 NATURAL JOIN test1.v21 tab2; -CREATE OR REPLACE VIEW test1.v23 AS SELECT f1, f2 -FROM test3.t1 tab1 NATURAL JOIN test1.v22 tab2; -CREATE OR REPLACE VIEW test1.v24 AS SELECT f1, f2 -FROM test1.t1 tab1 NATURAL JOIN test1.v23 tab2; -CREATE OR REPLACE VIEW test1.v25 AS SELECT f1, f2 -FROM test2.t1 tab1 NATURAL JOIN test1.v24 tab2; -CREATE OR REPLACE VIEW test1.v26 AS SELECT f1, f2 -FROM test3.t1 tab1 NATURAL JOIN test1.v25 tab2; -CREATE OR REPLACE VIEW test1.v27 AS SELECT f1, f2 -FROM test1.t1 tab1 NATURAL JOIN test1.v26 tab2; -SHOW CREATE VIEW test1.v27; -View Create View character_set_client collation_connection -v27 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `test1`.`v27` AS select `tab1`.`f1` AS `f1`,`tab1`.`f2` AS `f2` from (`test1`.`t1` `tab1` join `test1`.`v26` `tab2` on(((`tab1`.`f1` = `tab2`.`f1`) and (`tab1`.`f2` = `tab2`.`f2`)))) latin1 latin1_swedish_ci -SELECT CAST(f1 AS SIGNED INTEGER) AS f1, -CAST(f2 AS CHAR) AS f2 FROM test1.v27; -f1 f2 -5 five - -The output of following EXPLAIN is deactivated, because the result -differs on some platforms -FIXME Is this a bug ? --------------------------------------------------------------------------------- -EXPLAIN SELECT CAST(f1 AS SIGNED INTEGER) AS f1, -CAST(f2 AS CHAR) AS f2 FROM test1.v27; -CREATE VIEW test1.v28 AS SELECT f1, f2 -FROM test3.t1 tab1 NATURAL JOIN test1.v27 tab2; -SHOW CREATE VIEW test1.v28; -View Create View character_set_client collation_connection -v28 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `test1`.`v28` AS select `tab1`.`f1` AS `f1`,`tab1`.`f2` AS `f2` from (`test3`.`t1` `tab1` join `test1`.`v27` `tab2` on(((`tab1`.`f1` = `tab2`.`f1`) and (`tab1`.`f2` = `tab2`.`f2`)))) latin1 latin1_swedish_ci -SELECT CAST(f1 AS SIGNED INTEGER) AS f1, -CAST(f2 AS CHAR) AS f2 FROM test1.v28; -f1 f2 -5 five - -The output of following EXPLAIN is deactivated, because the result -differs on some platforms -FIXME Is this a bug ? --------------------------------------------------------------------------------- -EXPLAIN SELECT CAST(f1 AS SIGNED INTEGER) AS f1, -CAST(f2 AS CHAR) AS f2 FROM test1.v28; -DROP VIEW IF EXISTS test1.v28; -CREATE OR REPLACE VIEW test1.v0 AS -SELECT f1 as f2, f2 as f1 FROM test2.t1; -CREATE OR REPLACE VIEW test2.v0 AS -SELECT CAST('0001-01-01' AS DATE) as f1, f2 FROM test3.t1; -SHOW CREATE VIEW test1.v27; -SELECT CAST(f1 AS SIGNED INTEGER) AS f1, -CAST(f2 AS CHAR) AS f2 FROM test1.v27; -EXPLAIN SELECT CAST(f1 AS SIGNED INTEGER) AS f1, -CAST(f2 AS CHAR) AS f2 FROM test1.v27; -CREATE OR REPLACE VIEW test3.v0 AS -SELECT f1 , CONVERT('ßÄäÖöÜü§' USING UCS2) as f2 FROM test1.t1; -SHOW CREATE VIEW test1.v27; -SELECT CAST(f1 AS SIGNED INTEGER) AS f1, -CAST(f2 AS CHAR) AS f2 FROM test1.v27; -EXPLAIN SELECT CAST(f1 AS SIGNED INTEGER) AS f1, -CAST(f2 AS CHAR) AS f2 FROM test1.v27; -CREATE OR REPLACE VIEW test3.v0 AS -SELECT CONVERT('ßÄäÖöÜü§' USING UCS2) as f1, f2 FROM test1.t1; -SHOW CREATE VIEW test1.v27; -SELECT CAST(f1 AS SIGNED INTEGER) AS f1, -CAST(f2 AS CHAR) AS f2 FROM test1.v27; -EXPLAIN SELECT CAST(f1 AS SIGNED INTEGER) AS f1, -CAST(f2 AS CHAR) AS f2 FROM test1.v27; -DROP VIEW IF EXISTS test1.v27; -DROP VIEW IF EXISTS test1.v26; -DROP VIEW IF EXISTS test1.v25; -DROP VIEW IF EXISTS test1.v24; -DROP VIEW IF EXISTS test1.v23; -DROP VIEW IF EXISTS test1.v22; -DROP VIEW IF EXISTS test1.v21; -DROP VIEW IF EXISTS test1.v20; -DROP VIEW IF EXISTS test1.v19; -DROP VIEW IF EXISTS test1.v18; -DROP VIEW IF EXISTS test1.v17; -DROP VIEW IF EXISTS test1.v16; -DROP VIEW IF EXISTS test1.v15; -DROP VIEW IF EXISTS test1.v14; -DROP VIEW IF EXISTS test1.v13; -DROP VIEW IF EXISTS test1.v12; -DROP VIEW IF EXISTS test1.v11; -DROP VIEW IF EXISTS test1.v10; -DROP VIEW IF EXISTS test1.v9; -DROP VIEW IF EXISTS test1.v8; -DROP VIEW IF EXISTS test1.v7; -DROP VIEW IF EXISTS test1.v6; -DROP VIEW IF EXISTS test1.v5; -DROP VIEW IF EXISTS test1.v4; -DROP VIEW IF EXISTS test1.v3; -DROP VIEW IF EXISTS test1.v2; -DROP VIEW IF EXISTS test1.v1; -DROP VIEW IF EXISTS test1.v0; -DROP DATABASE test3; -DROP TABLE test1.t1; -DROP TABLE test2.t1; -Use test; - -Testcase 3.3.2.1 --------------------------------------------------------------------------------- -Drop view if exists test.v1 ; -Create View test.v1 AS SELECT f59,f60 FROM tb2 where f59 = 1995 ; -INSERT INTO test.v1 (f59,f60) values (879,700) ; -affected rows: 1 -SELECT f59,f60 FROM test.v1 where f59 = 879 and f60 = 700 ; -f59 f60 -DELETE FROM tb2 where f59 = 879 and f60 = 700 ; -Drop view test.v1 ; - -Testcase 3.3.2.2 --------------------------------------------------------------------------------- -Drop view if exists test.v1 ; -Create view test.v1 AS SELECT f59,f60,f61 FROM tb2 ; -INSERT INTO test.v1 ( f59 , f60 ) values (2005,0101) ; -affected rows: 1 -SELECT * FROM tb2 where f59 = 2005 and f60 = 0101 ; -f59 2005 -f60 101 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -SELECT f59,f60 FROM test.v1 where f59 = 2005 and f60 = 0101 ; -f59 f60 -2005 101 -DELETE FROM tb2 where f59 = 2005 and f60 = 0101 ; -Drop view test.v1 ; - -Testcase 3.3.2.3 --------------------------------------------------------------------------------- -Insert into tb2 (f59,f60,f61) values (780,105,106) ; -Drop view if exists test.v1 ; -CREATE VIEW test.v1 AS SELECT f59,f60,f61 FROM tb2 ; -UPDATE test.v1 SET f59 = 8 WHERE f59 = 780 and f60 = 105; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM tb2 where f59 = 8 and f60 = 105; -f59 8 -f60 105 -f61 0000000106 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -SELECT f59,f60 FROM test.v1 where f59 = 8 and f60 = 105 ; -f59 f60 -8 105 -Drop view test.v1 ; - -Testcase 3.3.2.4 --------------------------------------------------------------------------------- -Insert into tb2 (f59,f60,f61) values (781,105,106) ; -Drop view if exists test.v1 ; -CREATE VIEW test.v1 AS SELECT f59,f60,f61 FROM tb2 ; -UPDATE test.v1 SET f59 = 891 WHERE f60 = 105 ; -affected rows: 4 -info: Rows matched: 4 Changed: 4 Warnings: 0 -SELECT * FROM tb2 where f59 = 891 and f60 = 105; -f59 891 -f60 105 -f61 0000000106 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 891 -f60 105 -f61 0000000106 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 891 -f60 105 -f61 0000000106 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 891 -f60 105 -f61 0000000106 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -SELECT f59,f60 FROM test.v1 where f59 = 891 and f60 = 105 ; -f59 f60 -891 105 -891 105 -891 105 -891 105 -Drop view test.v1 ; - -Testcase 3.3.2.5 --------------------------------------------------------------------------------- -Insert into tb2 (f59,f60,f61) values (789,105,106) ; -Drop view if exists test.v1 ; -CREATE VIEW test.v1 AS SELECT f59,f60,f61 FROM tb2 where f59 = 789 ; -DELETE FROM test.v1 where f59 = 789 ; -affected rows: 1 -SELECT * FROM tb2 where f59 = 789 ; -f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 -SELECT f59,f60 FROM test.v1 where f59 = 789 order by f60 ; -f59 f60 -Drop view test.v1 ; - -Testcase 3.3.2.6 --------------------------------------------------------------------------------- -Insert into tb2 (f59,f60,f61) values (711,105,106) ; -Drop view if exists test.v1 ; -CREATE VIEW test.v1 AS SELECT f59,f60,f61 FROM tb2 where f59 = 711 ; -DELETE FROM test.v1 where f59 = 711 ; -affected rows: 1 -SELECT * FROM tb2 where f59 = 711 ; -f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 -SELECT f59,f60 FROM test.v1 where f59 = 711 order by f60 ; -f59 f60 -Drop view test.v1 ; - -Testcase 3.3.2.1 - 3.3.2.6 alternative implementation --------------------------------------------------------------------------------- -DROP TABLE IF EXISTS t1; -DROP VIEW IF EXISTS v1; -CREATE TABLE t1 ( f1 BIGINT, f2 CHAR(20), f3 NUMERIC(7,4), -f4 CHAR, PRIMARY KEY(f1)); -CREATE VIEW v1 AS SELECT f1, f2, f3 FROM t1; -INSERT INTO v1 SET f1 = 1; -SELECT * from t1; -f1 f2 f3 f4 -1 NULL NULL NULL -DELETE FROM t1; -INSERT INTO v1 SET f2 = 'ABC'; -INSERT INTO v1 SET f2 = 'ABC'; -ERROR 23000: Duplicate entry '0' for key 'PRIMARY' -SELECT * from t1; -f1 f2 f3 f4 -0 ABC NULL NULL -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -DELETE FROM v1 WHERE f1 = 1; -SELECT * from t1; -f1 f2 f3 f4 -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -DELETE FROM v1 WHERE f2 = 'ABC'; -SELECT * from t1; -f1 f2 f3 f4 -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -DELETE FROM v1; -SELECT * from t1; -f1 f2 f3 f4 -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f1 = 2 WHERE f1 = 1; -SELECT * from t1; -f1 f2 f3 f4 -2 ABC -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f1 = 2 WHERE f2 = 'ABC'; -SELECT * from t1; -f1 f2 f3 f4 -2 ABC -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f1 = 2; -SELECT * from t1; -f1 f2 f3 f4 -2 ABC -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f2 = 'NNN' WHERE f1 = 1; -SELECT * from t1; -f1 f2 f3 f4 -1 NNN -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f2 = 'NNN' WHERE f2 = 'ABC'; -SELECT * from t1; -f1 f2 f3 f4 -1 NNN -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f2 = 'NNN' WHERE f3 = -1.2E-3; -SELECT * from t1; -f1 f2 f3 f4 -1 NNN -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f2 = 'NNN'; -SELECT * from t1; -f1 f2 f3 f4 -1 NNN -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f1 = 2, f2 = 'NNN' WHERE f1 = 1 AND f2 = 'ABC'; -SELECT * from t1; -f1 f2 f3 f4 -2 NNN -0.0012 X -DELETE FROM t1; -DROP VIEW v1; -CREATE VIEW v1 AS SELECT f2, f3 FROM t1; -INSERT INTO v1 SET f2 = 'ABC'; -INSERT INTO v1 SET f2 = 'ABC'; -ERROR 23000: Duplicate entry '0' for key 'PRIMARY' -SELECT * from t1; -f1 f2 f3 f4 -0 ABC NULL NULL -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -DELETE FROM v1 WHERE f2 = 'ABC'; -SELECT * from t1; -f1 f2 f3 f4 -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -DELETE FROM v1; -SELECT * from t1; -f1 f2 f3 f4 -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f2 = 'NNN' WHERE f2 = 'ABC'; -SELECT * from t1; -f1 f2 f3 f4 -1 NNN -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f2 = 'NNN' WHERE f3 = -1.2E-3; -SELECT * from t1; -f1 f2 f3 f4 -1 NNN -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f2 = 'NNN'; -SELECT * from t1; -f1 f2 f3 f4 -1 NNN -0.0012 X -DELETE FROM t1; -DROP VIEW v1; -CREATE VIEW v1 AS SELECT f1, f2, f3, 'HELLO' AS my_greeting FROM t1; -INSERT INTO v1 SET f1 = 1; -ERROR HY000: The target table v1 of the INSERT is not insertable-into -SELECT * from t1; -f1 f2 f3 f4 -DELETE FROM t1; -INSERT INTO v1 SET f1 = 1, my_greeting = 'HELLO'; -ERROR HY000: The target table v1 of the INSERT is not insertable-into -SELECT * from t1; -f1 f2 f3 f4 -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -DELETE FROM v1 WHERE f1 = 1; -SELECT * from t1; -f1 f2 f3 f4 -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -DELETE FROM v1 WHERE f2 = 'ABC'; -SELECT * from t1; -f1 f2 f3 f4 -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -DELETE FROM v1 WHERE my_greeting = 'HELLO'; -SELECT * from t1; -f1 f2 f3 f4 -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -DELETE FROM v1; -SELECT * from t1; -f1 f2 f3 f4 -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f1 = 2 WHERE f1 = 1; -SELECT * from t1; -f1 f2 f3 f4 -2 ABC -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f1 = 2 WHERE f2 = 'ABC'; -SELECT * from t1; -f1 f2 f3 f4 -2 ABC -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f1 = 2 WHERE my_greeting = 'HELLO'; -SELECT * from t1; -f1 f2 f3 f4 -2 ABC -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f1 = 2; -SELECT * from t1; -f1 f2 f3 f4 -2 ABC -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f2 = 'NNN' WHERE f1 = 1; -SELECT * from t1; -f1 f2 f3 f4 -1 NNN -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f2 = 'NNN' WHERE f2 = 'ABC'; -SELECT * from t1; -f1 f2 f3 f4 -1 NNN -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f2 = 'NNN' WHERE f3 = -1.2E-3; -SELECT * from t1; -f1 f2 f3 f4 -1 NNN -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f2 = 'NNN' WHERE my_greeting = 'HELLO'; -SELECT * from t1; -f1 f2 f3 f4 -1 NNN -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f2 = 'NNN'; -SELECT * from t1; -f1 f2 f3 f4 -1 NNN -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET my_greeting = 'Hej' WHERE f1 = 1; -ERROR HY000: Column 'my_greeting' is not updatable -SELECT * from t1; -f1 f2 f3 f4 -1 ABC -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET my_greeting = 'Hej' WHERE f2 = 'ABC'; -ERROR HY000: Column 'my_greeting' is not updatable -SELECT * from t1; -f1 f2 f3 f4 -1 ABC -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET my_greeting = 'Hej' WHERE my_greeting = 'HELLO'; -ERROR HY000: Column 'my_greeting' is not updatable -SELECT * from t1; -f1 f2 f3 f4 -1 ABC -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET my_greeting = 'Hej'; -ERROR HY000: Column 'my_greeting' is not updatable -SELECT * from t1; -f1 f2 f3 f4 -1 ABC -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f1 = 2, f2 = 'NNN' WHERE f1 = 1 AND f2 = 'ABC'; -SELECT * from t1; -f1 f2 f3 f4 -2 NNN -0.0012 X -DELETE FROM t1; -DROP TABLE t1; -SET sql_mode = 'traditional'; -CREATE TABLE t1 ( f1 BIGINT, f2 CHAR(20), f3 NUMERIC(7,4) NOT NULL, -f4 CHAR, PRIMARY KEY(f1)); -DROP VIEW v1; -CREATE VIEW v1 AS SELECT f1, f2, f4 FROM t1; -INSERT INTO v1 SET f1 = 1; -ERROR HY000: Field of view 'test.v1' underlying table doesn't have a default value -SELECT * from t1; -f1 f2 f3 f4 -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -DELETE FROM v1 WHERE f1 = 1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f4 = 'Y' WHERE f2 = 'ABC'; -SELECT * from t1; -f1 f2 f3 f4 -1 ABC -0.0012 Y -DELETE FROM t1; -SET sql_mode = ''; - -Testcases 3.3.2.7 - 3.3.2.9, -3.3.2.10 - 3.3.2.11 omitted because of missing -features EXCEPT and INTERSECT --------------------------------------------------------------------------------- -INSERT INTO tb2 (f59,f60,f61) VALUES (77,185,126) ; -INSERT INTO tb2 (f59,f60,f61) VALUES (59,58,54) ; -DROP TABLE IF EXISTS t1 ; -DROP VIEW IF EXISTS v1 ; -CREATE TABLE t1 (f59 INT, f60 INT, f61 INT) ; -INSERT INTO t1 VALUES (19,41,32) ; -INSERT INTO t1 VALUES (59,54,71) ; -INSERT INTO t1 VALUES (21,91,99) ; -SET @variant1 = 'UNION '; -SET @variant2 = 'UNION ALL '; -SET @variant3 = 'UNION DISTINCT '; -SET @variant4 = 'EXCEPT '; -SET @variant5 = 'INTERSECT '; -CREATE VIEW v1 AS SELECT f61 FROM tb2 WHERE f59=59 UNION DISTINCT SELECT f61 FROM t1 WHERE f59=19; -INSERT INTO v1 VALUES (3000); -ERROR HY000: The target table v1 of the INSERT is not insertable-into -UPDATE v1 SET f61 = 100 WHERE f61 = 32; -ERROR HY000: The target table v1 of the UPDATE is not updatable -DELETE FROM v1; -ERROR HY000: The target table v1 of the DELETE is not updatable -DROP VIEW v1 ; -CREATE VIEW v1 AS SELECT f61 FROM tb2 WHERE f59=59 UNION ALL SELECT f61 FROM t1 WHERE f59=19; -INSERT INTO v1 VALUES (3000); -ERROR HY000: The target table v1 of the INSERT is not insertable-into -UPDATE v1 SET f61 = 100 WHERE f61 = 32; -ERROR HY000: The target table v1 of the UPDATE is not updatable -DELETE FROM v1; -ERROR HY000: The target table v1 of the DELETE is not updatable -DROP VIEW v1 ; -CREATE VIEW v1 AS SELECT f61 FROM tb2 WHERE f59=59 UNION SELECT f61 FROM t1 WHERE f59=19; -INSERT INTO v1 VALUES (3000); -ERROR HY000: The target table v1 of the INSERT is not insertable-into -UPDATE v1 SET f61 = 100 WHERE f61 = 32; -ERROR HY000: The target table v1 of the UPDATE is not updatable -DELETE FROM v1; -ERROR HY000: The target table v1 of the DELETE is not updatable -DROP VIEW v1 ; - -Testcases 3.3.2.12 - 3.3.2.20 --------------------------------------------------------------------------------- -DROP TABLE IF EXISTS t1, t2 ; -DROP VIEW IF EXISTS test.v1 ; -Drop view if exists v2 ; -CREATE TABLE t1 (f59 int, f60 int, f61 int) ; -INSERT INTO t1 VALUES (19,41,32) ; -INSERT INTO t1 VALUES (59,54,71) ; -INSERT INTO t1 VALUES (21,91,99) ; -CREATE TABLE t2 (f59 int, f60 int, f61 int) ; -INSERT INTO t2 VALUES (19,41,32) ; -INSERT INTO t2 VALUES (59,54,71) ; -INSERT INTO t2 VALUES (21,91,99) ; -CREATE VIEW v2 AS SELECT f59, f60, f61 FROM t2 LIMIT 5; -SET @variant1= 'CREATE VIEW v1 AS SELECT DISTINCT(f61) FROM t1'; -SET @variant2= 'CREATE VIEW v1 AS SELECT DISTINCTROW(f61) FROM t1'; -SET @variant3= 'CREATE VIEW v1 AS SELECT SUM(f59) AS f61 FROM t1'; -SET @variant4= 'CREATE VIEW v1 AS SELECT f61 FROM t1 GROUP BY f61'; -SET @variant5= 'CREATE VIEW v1 AS SELECT f61 FROM t1 HAVING f61 > 0'; -SET @variant6= 'CREATE VIEW v1 AS SELECT (SELECT f60 FROM t2 WHERE f59=19) AS f61 FROM t1'; -SET @variant7= 'CREATE VIEW v1 AS SELECT f61 FROM v2'; -SET @variant8= 'CREATE VIEW v1 AS SELECT f59 AS f61 FROM t1 WHERE f60 IN (SELECT f59 FROM t1)'; -SET @variant9= 'CREATE ALGORITHM = TEMPTABLE VIEW v1 (f61) AS select f60 from t1'; -CREATE ALGORITHM = TEMPTABLE VIEW v1 (f61) AS select f60 from t1; -INSERT INTO v1 VALUES (1002); -ERROR HY000: The target table v1 of the INSERT is not insertable-into -UPDATE v1 SET f61=1007; -ERROR HY000: The target table v1 of the UPDATE is not updatable -DELETE FROM v1; -ERROR HY000: The target table v1 of the DELETE is not updatable -DROP VIEW v1; -CREATE VIEW v1 AS SELECT f59 AS f61 FROM t1 WHERE f60 IN (SELECT f59 FROM t1); -INSERT INTO v1 VALUES (1002); -ERROR HY000: The target table v1 of the INSERT is not insertable-into -UPDATE v1 SET f61=1007; -ERROR HY000: The target table v1 of the UPDATE is not updatable -DELETE FROM v1; -ERROR HY000: The target table v1 of the DELETE is not updatable -DROP VIEW v1; -CREATE VIEW v1 AS SELECT f61 FROM v2; -INSERT INTO v1 VALUES (1002); -ERROR HY000: The target table v1 of the INSERT is not insertable-into -UPDATE v1 SET f61=1007; -ERROR HY000: The target table v1 of the UPDATE is not updatable -DELETE FROM v1; -ERROR HY000: The target table v1 of the DELETE is not updatable -DROP VIEW v1; -CREATE VIEW v1 AS SELECT (SELECT f60 FROM t2 WHERE f59=19) AS f61 FROM t1; -INSERT INTO v1 VALUES (1002); -ERROR HY000: The target table v1 of the INSERT is not insertable-into -UPDATE v1 SET f61=1007; -ERROR HY000: The target table v1 of the UPDATE is not updatable -DELETE FROM v1; -ERROR HY000: The target table v1 of the DELETE is not updatable -DROP VIEW v1; -CREATE VIEW v1 AS SELECT f61 FROM t1 HAVING f61 > 0; -INSERT INTO v1 VALUES (1002); -ERROR HY000: The target table v1 of the INSERT is not insertable-into -UPDATE v1 SET f61=1007; -ERROR HY000: The target table v1 of the UPDATE is not updatable -DELETE FROM v1; -ERROR HY000: The target table v1 of the DELETE is not updatable -DROP VIEW v1; -CREATE VIEW v1 AS SELECT f61 FROM t1 GROUP BY f61; -INSERT INTO v1 VALUES (1002); -ERROR HY000: The target table v1 of the INSERT is not insertable-into -UPDATE v1 SET f61=1007; -ERROR HY000: The target table v1 of the UPDATE is not updatable -DELETE FROM v1; -ERROR HY000: The target table v1 of the DELETE is not updatable -DROP VIEW v1; -CREATE VIEW v1 AS SELECT SUM(f59) AS f61 FROM t1; -INSERT INTO v1 VALUES (1002); -ERROR HY000: The target table v1 of the INSERT is not insertable-into -UPDATE v1 SET f61=1007; -ERROR HY000: The target table v1 of the UPDATE is not updatable -DELETE FROM v1; -ERROR HY000: The target table v1 of the DELETE is not updatable -DROP VIEW v1; -CREATE VIEW v1 AS SELECT DISTINCTROW(f61) FROM t1; -INSERT INTO v1 VALUES (1002); -ERROR HY000: The target table v1 of the INSERT is not insertable-into -UPDATE v1 SET f61=1007; -ERROR HY000: The target table v1 of the UPDATE is not updatable -DELETE FROM v1; -ERROR HY000: The target table v1 of the DELETE is not updatable -DROP VIEW v1; -CREATE VIEW v1 AS SELECT DISTINCT(f61) FROM t1; -INSERT INTO v1 VALUES (1002); -ERROR HY000: The target table v1 of the INSERT is not insertable-into -UPDATE v1 SET f61=1007; -ERROR HY000: The target table v1 of the UPDATE is not updatable -DELETE FROM v1; -ERROR HY000: The target table v1 of the DELETE is not updatable -DROP VIEW v1; -Drop TABLE t1, t2 ; -Drop VIEW v2 ; - -Testcases 3.3.A1 --------------------------------------------------------------------------------- -DROP TABLE IF EXISTS t1; -DROP TABLE IF EXISTS t2; -DROP VIEW IF EXISTS v1; -DROP VIEW IF EXISTS v2; -CREATE TABLE t1 (f1 BIGINT, f2 DATE DEFAULT NULL, f4 CHAR(5), -report char(10)) ENGINE = ndb; -CREATE VIEW v1 AS SELECT * FROM t1; -INSERT INTO t1 SET f1 = -1, f4 = 'ABC', report = 't1 0'; -INSERT INTO v1 SET f1 = -1, f4 = 'ABC', report = 'v1 0'; -DESCRIBE t1; -Field Type Null Key Default Extra -f1 bigint(20) YES NULL -f2 date YES NULL -f4 char(5) YES NULL -report char(10) YES NULL -DESCRIBE v1; -Field Type Null Key Default Extra -f1 bigint(20) YES NULL -f2 date YES NULL -f4 char(5) YES NULL -report char(10) YES NULL -SELECT * FROM t1 order by f1, report; -f1 f2 f4 report --1 NULL ABC t1 0 --1 NULL ABC v1 0 -SELECT * FROM v1 order by f1, report; -f1 f2 f4 report --1 NULL ABC t1 0 --1 NULL ABC v1 0 -ALTER TABLE t1 CHANGE COLUMN f4 f4x CHAR(5); -INSERT INTO t1 SET f1 = 0, f4x = 'ABC', report = 't1 1'; -INSERT INTO v1 SET f1 = 0, f4 = 'ABC', report = 'v1 1'; -ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them -INSERT INTO v1 SET f1 = 0, f4x = 'ABC', report = 'v1 1a'; -ERROR 42S22: Unknown column 'f4x' in 'field list' -INSERT INTO v1 SET f1 = 0, report = 'v1 1b'; -ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them -DESCRIBE t1; -Field Type Null Key Default Extra -f1 bigint(20) YES NULL -f2 date YES NULL -f4x char(5) YES NULL -report char(10) YES NULL -DESCRIBE v1; -ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them -SELECT * FROM t1 order by f1, report; -f1 f2 f4x report --1 NULL ABC t1 0 --1 NULL ABC v1 0 -0 NULL ABC t1 1 -SELECT * FROM v1 order by f1, report; -ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them -ALTER TABLE t1 CHANGE COLUMN f4x f4 CHAR(5); -ALTER TABLE t1 CHANGE COLUMN f4 f4 CHAR(10); -INSERT INTO t1 SET f1 = 2, f4 = '<-- 10 -->', report = 't1 2'; -INSERT INTO v1 SET f1 = 2, f4 = '<-- 10 -->', report = 'v1 2'; -DESCRIBE t1; -Field Type Null Key Default Extra -f1 bigint(20) YES NULL -f2 date YES NULL -f4 char(10) YES NULL -report char(10) YES NULL -DESCRIBE v1; -Field Type Null Key Default Extra -f1 bigint(20) YES NULL -f2 date YES NULL -f4 char(10) YES NULL -report char(10) YES NULL -SELECT * FROM t1 order by f1, report; -f1 f2 f4 report --1 NULL ABC t1 0 --1 NULL ABC v1 0 -0 NULL ABC t1 1 -2 NULL <-- 10 --> t1 2 -2 NULL <-- 10 --> v1 2 -SELECT * FROM v1 order by f1, report; -f1 f2 f4 report --1 NULL ABC t1 0 --1 NULL ABC v1 0 -0 NULL ABC t1 1 -2 NULL <-- 10 --> t1 2 -2 NULL <-- 10 --> v1 2 -ALTER TABLE t1 CHANGE COLUMN f4 f4 CHAR(8); -Warnings: -Warning 1265 Data truncated for column 'f4' at row -Warning 1265 Data truncated for column 'f4' at row -INSERT INTO t1 SET f1 = 3, f4 = '<-- 10 -->', report = 't1 3'; -Warnings: -Warning 1265 Data truncated for column 'f4' at row 1 -INSERT INTO v1 SET f1 = 3, f4 = '<-- 10 -->', report = 'v1 3'; -Warnings: -Warning 1265 Data truncated for column 'f4' at row 1 -DESCRIBE t1; -Field Type Null Key Default Extra -f1 bigint(20) YES NULL -f2 date YES NULL -f4 char(8) YES NULL -report char(10) YES NULL -DESCRIBE v1; -Field Type Null Key Default Extra -f1 bigint(20) YES NULL -f2 date YES NULL -f4 char(8) YES NULL -report char(10) YES NULL -SELECT * FROM t1 order by f1, report; -f1 f2 f4 report --1 NULL ABC t1 0 --1 NULL ABC v1 0 -0 NULL ABC t1 1 -2 NULL <-- 10 - t1 2 -2 NULL <-- 10 - v1 2 -3 NULL <-- 10 - t1 3 -3 NULL <-- 10 - v1 3 -SELECT * FROM v1 order by f1, report; -f1 f2 f4 report --1 NULL ABC t1 0 --1 NULL ABC v1 0 -0 NULL ABC t1 1 -2 NULL <-- 10 - t1 2 -2 NULL <-- 10 - v1 2 -3 NULL <-- 10 - t1 3 -3 NULL <-- 10 - v1 3 -ALTER TABLE t1 CHANGE COLUMN f4 f4 VARCHAR(20); -INSERT INTO t1 SET f1 = 4, f4 = '<------ 20 -------->', report = 't1 4'; -INSERT INTO v1 SET f1 = 4, f4 = '<------ 20 -------->', report = 'v1 4'; -DESCRIBE t1; -Field Type Null Key Default Extra -f1 bigint(20) YES NULL -f2 date YES NULL -f4 varchar(20) YES NULL -report char(10) YES NULL -DESCRIBE v1; -Field Type Null Key Default Extra -f1 bigint(20) YES NULL -f2 date YES NULL -f4 varchar(20) YES NULL -report char(10) YES NULL -SELECT * FROM t1 order by f1, report; -f1 f2 f4 report --1 NULL ABC t1 0 --1 NULL ABC v1 0 -0 NULL ABC t1 1 -2 NULL <-- 10 - t1 2 -2 NULL <-- 10 - v1 2 -3 NULL <-- 10 - t1 3 -3 NULL <-- 10 - v1 3 -4 NULL <------ 20 --------> t1 4 -4 NULL <------ 20 --------> v1 4 -SELECT * FROM v1 order by f1, report; -f1 f2 f4 report --1 NULL ABC t1 0 --1 NULL ABC v1 0 -0 NULL ABC t1 1 -2 NULL <-- 10 - t1 2 -2 NULL <-- 10 - v1 2 -3 NULL <-- 10 - t1 3 -3 NULL <-- 10 - v1 3 -4 NULL <------ 20 --------> t1 4 -4 NULL <------ 20 --------> v1 4 -ALTER TABLE t1 CHANGE COLUMN f1 f1 VARCHAR(30); -INSERT INTO t1 SET f1 = '<------------- 30 ----------->', -f4 = '<------ 20 -------->', report = 't1 5'; -INSERT INTO v1 SET f1 = '<------------- 30 ----------->', -f4 = '<------ 20 -------->', report = 'v1 5'; -DESCRIBE t1; -Field Type Null Key Default Extra -f1 varchar(30) YES NULL -f2 date YES NULL -f4 varchar(20) YES NULL -report char(10) YES NULL -DESCRIBE v1; -Field Type Null Key Default Extra -f1 varchar(30) YES NULL -f2 date YES NULL -f4 varchar(20) YES NULL -report char(10) YES NULL -SELECT * FROM t1 order by f1, report; -f1 f2 f4 report --1 NULL ABC t1 0 --1 NULL ABC v1 0 -0 NULL ABC t1 1 -2 NULL <-- 10 - t1 2 -2 NULL <-- 10 - v1 2 -3 NULL <-- 10 - t1 3 -3 NULL <-- 10 - v1 3 -4 NULL <------ 20 --------> t1 4 -4 NULL <------ 20 --------> v1 4 -<------------- 30 -----------> NULL <------ 20 --------> t1 5 -<------------- 30 -----------> NULL <------ 20 --------> v1 5 -SELECT * FROM v1 order by f1, report; -f1 f2 f4 report --1 NULL ABC t1 0 --1 NULL ABC v1 0 -0 NULL ABC t1 1 -2 NULL <-- 10 - t1 2 -2 NULL <-- 10 - v1 2 -3 NULL <-- 10 - t1 3 -3 NULL <-- 10 - v1 3 -4 NULL <------ 20 --------> t1 4 -4 NULL <------ 20 --------> v1 4 -<------------- 30 -----------> NULL <------ 20 --------> t1 5 -<------------- 30 -----------> NULL <------ 20 --------> v1 5 -ALTER TABLE t1 DROP COLUMN f2; -INSERT INTO t1 SET f1 = 'ABC', f4 = '<------ 20 -------->', report = 't1 6'; -INSERT INTO v1 SET f1 = 'ABC', f4 = '<------ 20 -------->', report = 'v1 6'; -ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them -DESCRIBE t1; -Field Type Null Key Default Extra -f1 varchar(30) YES NULL -f4 varchar(20) YES NULL -report char(10) YES NULL -DESCRIBE v1; -ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them -SELECT * FROM t1 order by f1, report; -f1 f4 report --1 ABC t1 0 --1 ABC v1 0 -0 ABC t1 1 -2 <-- 10 - t1 2 -2 <-- 10 - v1 2 -3 <-- 10 - t1 3 -3 <-- 10 - v1 3 -4 <------ 20 --------> t1 4 -4 <------ 20 --------> v1 4 -<------------- 30 -----------> <------ 20 --------> t1 5 -<------------- 30 -----------> <------ 20 --------> v1 5 -ABC <------ 20 --------> t1 6 -SELECT * FROM v1 order by f1, report; -ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them -ALTER TABLE t1 ADD COLUMN f2 DATE DEFAULT NULL; -INSERT INTO t1 SET f1 = 'ABC', f2 = '1500-12-04', -f4 = '<------ 20 -------->', report = 't1 7'; -INSERT INTO v1 SET f1 = 'ABC', f2 = '1500-12-04', -f4 = '<------ 20 -------->', report = 'v1 7'; -DESCRIBE t1; -Field Type Null Key Default Extra -f1 varchar(30) YES NULL -f4 varchar(20) YES NULL -report char(10) YES NULL -f2 date YES NULL -DESCRIBE v1; -Field Type Null Key Default Extra -f1 varchar(30) YES NULL -f2 date YES NULL -f4 varchar(20) YES NULL -report char(10) YES NULL -SELECT * FROM t1 order by f1, report; -f1 f4 report f2 --1 ABC t1 0 NULL --1 ABC v1 0 NULL -0 ABC t1 1 NULL -2 <-- 10 - t1 2 NULL -2 <-- 10 - v1 2 NULL -3 <-- 10 - t1 3 NULL -3 <-- 10 - v1 3 NULL -4 <------ 20 --------> t1 4 NULL -4 <------ 20 --------> v1 4 NULL -<------------- 30 -----------> <------ 20 --------> t1 5 NULL -<------------- 30 -----------> <------ 20 --------> v1 5 NULL -ABC <------ 20 --------> t1 6 NULL -ABC <------ 20 --------> t1 7 1500-12-04 -ABC <------ 20 --------> v1 7 1500-12-04 -SELECT * FROM v1 order by f1, report; -f1 f2 f4 report --1 NULL ABC t1 0 --1 NULL ABC v1 0 -0 NULL ABC t1 1 -2 NULL <-- 10 - t1 2 -2 NULL <-- 10 - v1 2 -3 NULL <-- 10 - t1 3 -3 NULL <-- 10 - v1 3 -4 NULL <------ 20 --------> t1 4 -4 NULL <------ 20 --------> v1 4 -<------------- 30 -----------> NULL <------ 20 --------> t1 5 -<------------- 30 -----------> NULL <------ 20 --------> v1 5 -ABC NULL <------ 20 --------> t1 6 -ABC 1500-12-04 <------ 20 --------> t1 7 -ABC 1500-12-04 <------ 20 --------> v1 7 -ALTER TABLE t1 DROP COLUMN f2; -ALTER TABLE t1 ADD COLUMN f2 FLOAT; -INSERT INTO t1 SET f1 = 'ABC', f2 = -3.3E-4, -f4 = '<------ 20 -------->', report = 't1 8'; -INSERT INTO v1 SET f1 = 'ABC', f2 = -3.3E-4, -f4 = '<------ 20 -------->', report = 'v1 8'; -DESCRIBE t1; -Field Type Null Key Default Extra -f1 varchar(30) YES NULL -f4 varchar(20) YES NULL -report char(10) YES NULL -f2 float YES NULL -DESCRIBE v1; -Field Type Null Key Default Extra -f1 varchar(30) YES NULL -f2 float YES NULL -f4 varchar(20) YES NULL -report char(10) YES NULL -SELECT * FROM t1 order by f1, report; -f1 f4 report f2 --1 ABC t1 0 NULL --1 ABC v1 0 NULL -0 ABC t1 1 NULL -2 <-- 10 - t1 2 NULL -2 <-- 10 - v1 2 NULL -3 <-- 10 - t1 3 NULL -3 <-- 10 - v1 3 NULL -4 <------ 20 --------> t1 4 NULL -4 <------ 20 --------> v1 4 NULL -<------------- 30 -----------> <------ 20 --------> t1 5 NULL -<------------- 30 -----------> <------ 20 --------> v1 5 NULL -ABC <------ 20 --------> t1 6 NULL -ABC <------ 20 --------> t1 7 NULL -ABC <------ 20 --------> t1 8 -0.00033 -ABC <------ 20 --------> v1 7 NULL -ABC <------ 20 --------> v1 8 -0.00033 -SELECT * FROM v1 order by f1, report; -f1 f2 f4 report --1 NULL ABC t1 0 --1 NULL ABC v1 0 -0 NULL ABC t1 1 -2 NULL <-- 10 - t1 2 -2 NULL <-- 10 - v1 2 -3 NULL <-- 10 - t1 3 -3 NULL <-- 10 - v1 3 -4 NULL <------ 20 --------> t1 4 -4 NULL <------ 20 --------> v1 4 -<------------- 30 -----------> NULL <------ 20 --------> t1 5 -<------------- 30 -----------> NULL <------ 20 --------> v1 5 -ABC NULL <------ 20 --------> t1 6 -ABC NULL <------ 20 --------> t1 7 -ABC -0.00033 <------ 20 --------> t1 8 -ABC NULL <------ 20 --------> v1 7 -ABC -0.00033 <------ 20 --------> v1 8 -ALTER TABLE t1 ADD COLUMN f3 NUMERIC(7,2); -INSERT INTO t1 SET f1 = 'ABC', f2 = -3.3E-4, -f3 = -2.2, f4 = '<------ 20 -------->', report = 't1 9'; -INSERT INTO v1 SET f1 = 'ABC', f2 = -3.3E-4, -f3 = -2.2, f4 = '<------ 20 -------->', report = 'v1 9'; -ERROR 42S22: Unknown column 'f3' in 'field list' -INSERT INTO v1 SET f1 = 'ABC', f2 = -3.3E-4, -f4 = '<------ 20 -------->', report = 'v1 9a'; -DESCRIBE t1; -Field Type Null Key Default Extra -f1 varchar(30) YES NULL -f4 varchar(20) YES NULL -report char(10) YES NULL -f2 float YES NULL -f3 decimal(7,2) YES NULL -DESCRIBE v1; -Field Type Null Key Default Extra -f1 varchar(30) YES NULL -f2 float YES NULL -f4 varchar(20) YES NULL -report char(10) YES NULL -SELECT * FROM t1 order by f1, report; -f1 f4 report f2 f3 --1 ABC t1 0 NULL NULL --1 ABC v1 0 NULL NULL -0 ABC t1 1 NULL NULL -2 <-- 10 - t1 2 NULL NULL -2 <-- 10 - v1 2 NULL NULL -3 <-- 10 - t1 3 NULL NULL -3 <-- 10 - v1 3 NULL NULL -4 <------ 20 --------> t1 4 NULL NULL -4 <------ 20 --------> v1 4 NULL NULL -<------------- 30 -----------> <------ 20 --------> t1 5 NULL NULL -<------------- 30 -----------> <------ 20 --------> v1 5 NULL NULL -ABC <------ 20 --------> t1 6 NULL NULL -ABC <------ 20 --------> t1 7 NULL NULL -ABC <------ 20 --------> t1 8 -0.00033 NULL -ABC <------ 20 --------> t1 9 -0.00033 -2.20 -ABC <------ 20 --------> v1 7 NULL NULL -ABC <------ 20 --------> v1 8 -0.00033 NULL -ABC <------ 20 --------> v1 9a -0.00033 NULL -SELECT * FROM v1 order by f1, report; -f1 f2 f4 report --1 NULL ABC t1 0 --1 NULL ABC v1 0 -0 NULL ABC t1 1 -2 NULL <-- 10 - t1 2 -2 NULL <-- 10 - v1 2 -3 NULL <-- 10 - t1 3 -3 NULL <-- 10 - v1 3 -4 NULL <------ 20 --------> t1 4 -4 NULL <------ 20 --------> v1 4 -<------------- 30 -----------> NULL <------ 20 --------> t1 5 -<------------- 30 -----------> NULL <------ 20 --------> v1 5 -ABC NULL <------ 20 --------> t1 6 -ABC NULL <------ 20 --------> t1 7 -ABC -0.00033 <------ 20 --------> t1 8 -ABC -0.00033 <------ 20 --------> t1 9 -ABC NULL <------ 20 --------> v1 7 -ABC -0.00033 <------ 20 --------> v1 8 -ABC -0.00033 <------ 20 --------> v1 9a -DROP TABLE t1; -DROP VIEW v1; -CREATE TABLE t1 (f1 CHAR(10), f2 BIGINT) ENGINE = ndb; -INSERT INTO t1 SET f1 = 'ABC', f2 = 3; -CREATE VIEW v1 AS SELECT f1, SQRT(f2) my_sqrt FROM t1; -DESCRIBE t1; -Field Type Null Key Default Extra -f1 char(10) YES NULL -f2 bigint(20) YES NULL -DESCRIBE v1; -Field Type Null Key Default Extra -f1 char(10) YES NULL -my_sqrt double YES NULL -SELECT * FROM t1 order by f1, f2; -f1 f2 -ABC 3 -SELECT * FROM v1 order by 2; -f1 my_sqrt -ABC 1.7320508075688772 -ALTER TABLE t1 CHANGE COLUMN f2 f2 VARCHAR(30); -INSERT INTO t1 SET f1 = 'ABC', f2 = 'DEF'; -DESCRIBE t1; -Field Type Null Key Default Extra -f1 char(10) YES NULL -f2 varchar(30) YES NULL -DESCRIBE v1; -Field Type Null Key Default Extra -f1 char(10) YES NULL -my_sqrt double YES NULL -SELECT * FROM t1 order by f1, f2; -f1 f2 -ABC 3 -ABC DEF -SELECT * FROM v1 order by 2; -f1 my_sqrt -ABC 0 -ABC 1.7320508075688772 -Warnings: -Warning 1292 Truncated incorrect DOUBLE value: 'DEF' -Warning 1292 Truncated incorrect DOUBLE value: 'DEF' -SELECT SQRT('DEF'); -SQRT('DEF') -0 -Warnings: -Warning 1292 Truncated incorrect DOUBLE value: 'DEF' -CREATE VIEW v2 AS SELECT SQRT('DEF'); -SELECT * FROM v2 order by 1; -SQRT('DEF') -0 -Warnings: -Warning 1292 Truncated incorrect DOUBLE value: 'DEF' -CREATE OR REPLACE VIEW v2 AS SELECT f1, SQRT(f2) my_sqrt FROM t1; -DESCRIBE v2; -Field Type Null Key Default Extra -f1 char(10) YES NULL -my_sqrt double YES NULL -SELECT * FROM v2 order by 2; -f1 my_sqrt -ABC 0 -ABC 1.7320508075688772 -Warnings: -Warning 1292 Truncated incorrect DOUBLE value: 'DEF' -Warning 1292 Truncated incorrect DOUBLE value: 'DEF' -CREATE TABLE t2 AS SELECT f1, SQRT(f2) my_sqrt FROM t1; -Warnings: -Warning 1292 Truncated incorrect DOUBLE value: 'DEF' -SELECT * FROM t2 order by 2; -f1 ABC -my_sqrt 0 -f1 ABC -my_sqrt 1.7320508075688772 -DROP TABLE t2; -CREATE TABLE t2 AS SELECT * FROM v1; -Warnings: -Warning 1292 Truncated incorrect DOUBLE value: 'DEF' -SELECT * FROM t2 order by 2; -f1 ABC -my_sqrt 0 -f1 ABC -my_sqrt 1.7320508075688772 -DROP TABLE t2; -CREATE TABLE t2 AS SELECT * FROM v2; -Warnings: -Warning 1292 Truncated incorrect DOUBLE value: 'DEF' -SELECT * FROM t2 order by 2; -f1 ABC -my_sqrt 0 -f1 ABC -my_sqrt 1.7320508075688772 -DROP TABLE t1; -DROP TABLE t2; -DROP VIEW v1; -DROP VIEW v2; -DROP TABLE IF EXISTS t1; -DROP TABLE IF EXISTS t2; -DROP VIEW IF EXISTS v1; -DROP VIEW IF EXISTS v1_1; -DROP VIEW IF EXISTS v1_2; -DROP VIEW IF EXISTS v1_firstview; -DROP VIEW IF EXISTS v1_secondview; -DROP VIEW IF EXISTS v2; -DROP DATABASE IF EXISTS test2; -DROP DATABASE IF EXISTS test3; -DROP DATABASE test1; -DROP TABLE test.tb2; diff --git a/mysql-test/suite/funcs_1/t/disabled.def b/mysql-test/suite/funcs_1/t/disabled.def index 23f15b78103..9bfe9567d83 100644 --- a/mysql-test/suite/funcs_1/t/disabled.def +++ b/mysql-test/suite/funcs_1/t/disabled.def @@ -10,4 +10,3 @@ # ############################################################################## -ndb_trig_1011ext: Bug#47564 diff --git a/mysql-test/suite/funcs_1/t/is_cml_ndb.test b/mysql-test/suite/funcs_1/t/is_cml_ndb.test deleted file mode 100644 index 6d46424d14e..00000000000 --- a/mysql-test/suite/funcs_1/t/is_cml_ndb.test +++ /dev/null @@ -1,42 +0,0 @@ -# suite/funcs_1/t/is_cml_ndb.test -# -# Check the content of information_schema.columns about tables using -# UNICODE columns. -# Variant for storage engine NDB -# -# Author: -# 2008-06-04 mleich Create this script based on older scripts and new code. -# - ---source include/have_ucs2.inc - -# This test cannot be used for the embedded server because privileges -# are expected within result sets. ---source include/not_embedded.inc - ---source include/have_ndb.inc -let $engine_type= NDB; -USE test; ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings -eval CREATE TABLE t1 -( - f1 CHAR UNICODE, - f2 CHAR(0) UNICODE, - f3 CHAR(10) UNICODE, - f5 VARCHAR(0) UNICODE, - f6 VARCHAR(255) UNICODE, - f7 VARCHAR(260) UNICODE, - f8 TEXT UNICODE, - f9 TINYTEXT UNICODE, - f10 MEDIUMTEXT UNICODE, - f11 LONGTEXT UNICODE, - PRIMARY KEY(f1) -) ENGINE = $engine_type; - -# We look only for the tables created here. -let $my_where = WHERE table_schema LIKE 'test%'; ---source suite/funcs_1/datadict/columns.inc - -DROP TABLE t1; diff --git a/mysql-test/suite/funcs_1/t/is_columns_ndb.test b/mysql-test/suite/funcs_1/t/is_columns_ndb.test deleted file mode 100644 index 3d2a8d7aa5b..00000000000 --- a/mysql-test/suite/funcs_1/t/is_columns_ndb.test +++ /dev/null @@ -1,37 +0,0 @@ -# suite/funcs_1/t/is_columns_ndb.test -# -# Check the content of information_schema.columns about tables within -# the databases created by the user. -# Variant for storage engine ndb -# -# Author: -# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of -# testsuite funcs_1 -# Create this script based on older scripts and new code. -# - -# This test cannot be used for the embedded server because we check here -# privileges. ---source include/not_embedded.inc - ---source include/have_ndb.inc -let $engine_type= ndb; ---source suite/funcs_1/datadict/datadict_load.inc - -# We look only for the tables created by datadict_load.inc. -let $my_where = WHERE table_schema LIKE 'test%'; ---source suite/funcs_1/datadict/columns.inc - -# This test runs with a different set of tables. -# --source suite/funcs_1/include/cleanup.inc -DROP DATABASE test1; -DROP DATABASE test4; -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; -DROP TABLE test.t4; -DROP TABLE test.t7; -DROP TABLE test.t8; -DROP TABLE test.t9; -DROP TABLE test.t10; -DROP TABLE test.t11; diff --git a/mysql-test/suite/funcs_1/t/is_engines_ndb.test b/mysql-test/suite/funcs_1/t/is_engines_ndb.test deleted file mode 100644 index bf9af8510a8..00000000000 --- a/mysql-test/suite/funcs_1/t/is_engines_ndb.test +++ /dev/null @@ -1,15 +0,0 @@ -# suite/funcs_1/t/is_engines_ndb.test -# -# Check the content of information_schema.engines -# Variant for storage engine NDB -# -# Author: -# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of -# testsuite funcs_1 -# - -let $engine_type= ndbcluster; ---source include/have_ndb.inc ---vertical_results -eval SELECT * FROM information_schema.engines -WHERE ENGINE = '$engine_type'; diff --git a/mysql-test/suite/funcs_1/t/is_tables_ndb.test b/mysql-test/suite/funcs_1/t/is_tables_ndb.test deleted file mode 100644 index d21831b75c8..00000000000 --- a/mysql-test/suite/funcs_1/t/is_tables_ndb.test +++ /dev/null @@ -1,22 +0,0 @@ -# suite/funcs_1/t/is_tables_ndb.test -# -# Check the content of information_schema.tables about tables within -# the databases created by the user. -# Variant for storage engine NDB -# -# Author: -# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of -# testsuite funcs_1 -# Create this script based on older scripts and new code. -# - -# This test cannot be used for the embedded server because we check here -# privileges. ---source include/not_embedded.inc - ---source include/have_ndb.inc -let $engine_type= NDB; - -# We look only for the tables created by suite/funcs_1/datadict/tables.inc -let $my_where = WHERE table_schema LIKE 'test%' AND table_type = 'BASE TABLE'; ---source suite/funcs_1/datadict/tables.inc diff --git a/mysql-test/suite/funcs_1/t/ndb_bitdata.test b/mysql-test/suite/funcs_1/t/ndb_bitdata.test deleted file mode 100644 index f685a4abc6d..00000000000 --- a/mysql-test/suite/funcs_1/t/ndb_bitdata.test +++ /dev/null @@ -1,18 +0,0 @@ -#### suite/funcs_1/t/ndb_bitdata.test - -# NDB tables should be used -# -# 1. Check if InnoDB is available ---source include/have_ndb.inc -# 2. Set $engine_type -let $engine_type= ndb; - -let $message= NOT YET IMPLEMENTED: bitdata tests; ---source include/show_msg80.inc -exit; - -# Create some objects needed in many testcases -USE test; ---source suite/funcs_1/include/ndb_tb4.inc - ---source suite/funcs_1/bitdata/bitdata_master.test diff --git a/mysql-test/suite/funcs_1/t/ndb_cursors.test b/mysql-test/suite/funcs_1/t/ndb_cursors.test deleted file mode 100644 index 6aeeb3f298d..00000000000 --- a/mysql-test/suite/funcs_1/t/ndb_cursors.test +++ /dev/null @@ -1,19 +0,0 @@ -#### suite/funcs_1/t/ndb_cursors.test - -# NDB tables should be used -# -# 1. Check if ndb is available ---source include/have_ndb.inc -# 2. Set $engine_type -let $engine_type= ndb; - -let $message= NOT YET IMPLEMENTED: cursor tests; ---source include/show_msg80.inc -exit; - -# Create some objects needed in many testcases -USE test; ---source suite/funcs_1/include/ndb_tb1.inc - ---source suite/funcs_1/cursors/cursors_master.test - diff --git a/mysql-test/suite/funcs_1/t/ndb_func_view.test b/mysql-test/suite/funcs_1/t/ndb_func_view.test deleted file mode 100644 index 183ebc7053c..00000000000 --- a/mysql-test/suite/funcs_1/t/ndb_func_view.test +++ /dev/null @@ -1,16 +0,0 @@ -################################################### -# # -# Functions within VIEWs based on ndb tables # -# # -################################################### - -# -# NOTE: PLEASE SEE THE DETAILED DESCRIPTION IN -# suite/funcs_1/views/func_view.inc -# BEFORE ADDING NEW TEST CASES HERE !!! - -let $type= 'ndb' ; ---source include/have_ndb.inc - ---source suite/funcs_1/views/func_view.inc - diff --git a/mysql-test/suite/funcs_1/t/ndb_storedproc_02.test b/mysql-test/suite/funcs_1/t/ndb_storedproc_02.test deleted file mode 100644 index 9c701ece72f..00000000000 --- a/mysql-test/suite/funcs_1/t/ndb_storedproc_02.test +++ /dev/null @@ -1,9 +0,0 @@ -#### suite/funcs_1/t/ndb_storedproc_02.test -# -# 1. Check if ndb is available ---source include/have_ndb.inc - -# 2. Set $engine_type -let $engine_type= ndb; - ---source suite/funcs_1/storedproc/storedproc_02.inc diff --git a/mysql-test/suite/funcs_1/t/ndb_storedproc_03.test b/mysql-test/suite/funcs_1/t/ndb_storedproc_03.test deleted file mode 100644 index 53c71932710..00000000000 --- a/mysql-test/suite/funcs_1/t/ndb_storedproc_03.test +++ /dev/null @@ -1,9 +0,0 @@ -#### suite/funcs_1/t/ndb_storedproc_03.test -# -# 1. Check if nsd is available ---source include/have_ndb.inc - -# 2. Set $engine_type -let $engine_type= ndb; - ---source suite/funcs_1/storedproc/storedproc_03.inc diff --git a/mysql-test/suite/funcs_1/t/ndb_storedproc_06.test b/mysql-test/suite/funcs_1/t/ndb_storedproc_06.test deleted file mode 100644 index b8640391b02..00000000000 --- a/mysql-test/suite/funcs_1/t/ndb_storedproc_06.test +++ /dev/null @@ -1,9 +0,0 @@ -#### suite/funcs_1/t/ndb_storedproc_06.test -# -# 1. Check if ndb is available ---source include/have_ndb.inc - -# 2. Set $engine_type -let $engine_type= ndb; - ---source suite/funcs_1/storedproc/storedproc_06.inc diff --git a/mysql-test/suite/funcs_1/t/ndb_storedproc_07.test b/mysql-test/suite/funcs_1/t/ndb_storedproc_07.test deleted file mode 100644 index f0ef9fed313..00000000000 --- a/mysql-test/suite/funcs_1/t/ndb_storedproc_07.test +++ /dev/null @@ -1,9 +0,0 @@ -#### suite/funcs_1/t/ndb_storedproc_07.test -# -# 1. Check if ndb is available ---source include/have_ndb.inc - -# 2. Set $engine_type -let $engine_type= ndb; - ---source suite/funcs_1/storedproc/storedproc_07.inc diff --git a/mysql-test/suite/funcs_1/t/ndb_storedproc_08.test b/mysql-test/suite/funcs_1/t/ndb_storedproc_08.test deleted file mode 100644 index 21db9081822..00000000000 --- a/mysql-test/suite/funcs_1/t/ndb_storedproc_08.test +++ /dev/null @@ -1,9 +0,0 @@ -#### suite/funcs_1/t/ndb_storedproc_08.test -# -# 1. Check if ndb is available ---source include/have_ndb.inc - -# 2. Set $engine_type -let $engine_type= ndb; - ---source suite/funcs_1/storedproc/storedproc_08.inc diff --git a/mysql-test/suite/funcs_1/t/ndb_storedproc_10.test b/mysql-test/suite/funcs_1/t/ndb_storedproc_10.test deleted file mode 100644 index 6f5888ad2d3..00000000000 --- a/mysql-test/suite/funcs_1/t/ndb_storedproc_10.test +++ /dev/null @@ -1,9 +0,0 @@ -#### suite/funcs_1/t/ndb_storedproc_10.test -# -# 1. Check if ndb is available ---source include/have_ndb.inc - -# 2. Set $engine_type -let $engine_type= ndb; - ---source suite/funcs_1/storedproc/storedproc_10.inc diff --git a/mysql-test/suite/funcs_1/t/ndb_trig_0102.test b/mysql-test/suite/funcs_1/t/ndb_trig_0102.test deleted file mode 100644 index dd239ff5edb..00000000000 --- a/mysql-test/suite/funcs_1/t/ndb_trig_0102.test +++ /dev/null @@ -1,10 +0,0 @@ -#### suite/funcs_1/t/ndb_trig_0102.test - -# NDB tables should be used -# -# 1. Check if NDB is available ---source include/have_ndb.inc -# 2. Set $engine_type -let $engine_type= ndbcluster; - ---source suite/funcs_1/triggers/triggers_0102.inc diff --git a/mysql-test/suite/funcs_1/t/ndb_trig_03.test b/mysql-test/suite/funcs_1/t/ndb_trig_03.test deleted file mode 100644 index 1f68bd05a80..00000000000 --- a/mysql-test/suite/funcs_1/t/ndb_trig_03.test +++ /dev/null @@ -1,10 +0,0 @@ -#### suite/funcs_1/t/ndb_trig_03.test - -# NDB tables should be used -# -# 1. Check if NDB is available ---source include/have_ndb.inc -# 2. Set $engine_type -let $engine_type= ndbcluster; - ---source suite/funcs_1/triggers/triggers_03.inc diff --git a/mysql-test/suite/funcs_1/t/ndb_trig_03e.test b/mysql-test/suite/funcs_1/t/ndb_trig_03e.test deleted file mode 100644 index 2f0e3a7af51..00000000000 --- a/mysql-test/suite/funcs_1/t/ndb_trig_03e.test +++ /dev/null @@ -1,25 +0,0 @@ -#### suite/funcs_1/t/ndb_triggers.test - -# This test cannot be used for the embedded server because we check here -# privileges. ---source include/not_embedded.inc - -# NDB tables should be used -# -# 1. Check if NDB is available ---source include/have_ndb.inc -# 2. Set $engine_type -let $engine_type= ndb; - -# Create some objects needed in many testcases -USE test; - ---source suite/funcs_1/triggers/triggers_03e_db_level.inc ---source suite/funcs_1/triggers/triggers_03e_table_level.inc ---source suite/funcs_1/triggers/triggers_03e_global_db_mix.inc ---source suite/funcs_1/triggers/triggers_03e_db_table_mix.inc ---source suite/funcs_1/triggers/triggers_03e_prepare.inc ---source suite/funcs_1/triggers/triggers_03e_definer.inc ---source suite/funcs_1/triggers/triggers_03e_transaction.inc ---source suite/funcs_1/triggers/triggers_03e_columns.inc - diff --git a/mysql-test/suite/funcs_1/t/ndb_trig_0407.test b/mysql-test/suite/funcs_1/t/ndb_trig_0407.test deleted file mode 100644 index eccefd12dd9..00000000000 --- a/mysql-test/suite/funcs_1/t/ndb_trig_0407.test +++ /dev/null @@ -1,10 +0,0 @@ -#### suite/funcs_1/t/ndb_trig_0407.test - -# NDB tables should be used -# -# 1. Check if NDB is available ---source include/have_ndb.inc -# 2. Set $engine_type -let $engine_type= ndbcluster; - ---source suite/funcs_1/triggers/triggers_0407.inc diff --git a/mysql-test/suite/funcs_1/t/ndb_trig_08.test b/mysql-test/suite/funcs_1/t/ndb_trig_08.test deleted file mode 100644 index e07c4fe7ec4..00000000000 --- a/mysql-test/suite/funcs_1/t/ndb_trig_08.test +++ /dev/null @@ -1,10 +0,0 @@ -#### suite/funcs_1/t/ndb_trig_08.test - -# NDB tables should be used -# -# 1. Check if NDB is available ---source include/have_ndb.inc -# 2. Set $engine_type -let $engine_type= ndbcluster; - ---source suite/funcs_1/triggers/triggers_08.inc diff --git a/mysql-test/suite/funcs_1/t/ndb_trig_09.test b/mysql-test/suite/funcs_1/t/ndb_trig_09.test deleted file mode 100644 index 8def1d9eea1..00000000000 --- a/mysql-test/suite/funcs_1/t/ndb_trig_09.test +++ /dev/null @@ -1,10 +0,0 @@ -#### suite/funcs_1/t/ndb_trig_09.test - -# NDB tables should be used -# -# 1. Check if NDB is available ---source include/have_ndb.inc -# 2. Set $engine_type -let $engine_type= ndbcluster; - ---source suite/funcs_1/triggers/triggers_09.inc diff --git a/mysql-test/suite/funcs_1/t/ndb_trig_1011ext.test b/mysql-test/suite/funcs_1/t/ndb_trig_1011ext.test deleted file mode 100644 index 729d5fee60b..00000000000 --- a/mysql-test/suite/funcs_1/t/ndb_trig_1011ext.test +++ /dev/null @@ -1,10 +0,0 @@ -#### suite/funcs_1/t/ndb_trig_1011ext.test - -# NDB tables should be used -# -# 1. Check if NDB is available ---source include/have_ndb.inc -# 2. Set $engine_type -let $engine_type= ndbcluster; - ---source suite/funcs_1/triggers/triggers_1011ext.inc diff --git a/mysql-test/suite/funcs_1/t/ndb_views.test b/mysql-test/suite/funcs_1/t/ndb_views.test deleted file mode 100644 index 910b8adb189..00000000000 --- a/mysql-test/suite/funcs_1/t/ndb_views.test +++ /dev/null @@ -1,24 +0,0 @@ -#### suite/funcs_1/t/ndb_views.test - -# ndb tables should be used -# -# 1. Check if ndb is available ---source include/have_ndb.inc -# 2. Set $engine_type -let $engine_type= ndb; - -# Create some objects needed in many testcases -USE test; ---source suite/funcs_1/include/ndb_tb2.inc ---disable_warnings -DROP DATABASE IF EXISTS test1; ---enable_warnings -CREATE DATABASE test1; -USE test1; ---source suite/funcs_1/include/ndb_tb2.inc -USE test; - ---source suite/funcs_1/views/views_master.inc -DROP DATABASE test1; -DROP TABLE test.tb2; - diff --git a/mysql-test/suite/funcs_2/r/ndb_charset.result b/mysql-test/suite/funcs_2/r/ndb_charset.result deleted file mode 100644 index 0a4dba2e302..00000000000 --- a/mysql-test/suite/funcs_2/r/ndb_charset.result +++ /dev/null @@ -1,119156 +0,0 @@ -DROP TABLE IF EXISTS test.t1; -SET NAMES armscii8; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET armscii8 COLLATE armscii8_bin) ENGINE=NDB CHARACTER SET armscii8 COLLATE armscii8_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # armscii8_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -E6 1 -E7 1 -E8 1 -E9 1 -EA 1 -EB 1 -EC 1 -ED 1 -EE 1 -EF 1 -F0 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES armscii8; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET armscii8 COLLATE armscii8_general_ci) ENGINE=NDB CHARACTER SET armscii8 COLLATE armscii8_general_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # armscii8_general_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -42 1 -62 1 -43 1 -63 1 -44 1 -64 1 -45 1 -65 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -4D 1 -6D 1 -4E 1 -6E 1 -4F 1 -6F 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -53 1 -73 1 -54 1 -74 1 -55 1 -75 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -5A 1 -7A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -E6 1 -E7 1 -E8 1 -E9 1 -EA 1 -EB 1 -EC 1 -ED 1 -EE 1 -EF 1 -F0 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES ascii; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET ascii COLLATE ascii_bin) ENGINE=NDB CHARACTER SET ascii COLLATE ascii_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # ascii_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -E6 1 -E7 1 -E8 1 -E9 1 -EA 1 -EB 1 -EC 1 -ED 1 -EE 1 -EF 1 -F0 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES ascii; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET ascii COLLATE ascii_general_ci) ENGINE=NDB CHARACTER SET ascii COLLATE ascii_general_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # ascii_general_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -42 1 -62 1 -43 1 -63 1 -44 1 -64 1 -45 1 -65 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -4D 1 -6D 1 -4E 1 -6E 1 -4F 1 -6F 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -53 1 -73 1 -54 1 -74 1 -55 1 -75 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -5A 1 -7A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -E6 1 -E7 1 -E8 1 -E9 1 -EA 1 -EB 1 -EC 1 -ED 1 -EE 1 -EF 1 -F0 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES big5; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET big5 COLLATE big5_bin) ENGINE=NDB CHARACTER SET big5 COLLATE big5_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # big5_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES big5; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET big5 COLLATE big5_chinese_ci) ENGINE=NDB CHARACTER SET big5 COLLATE big5_chinese_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # big5_chinese_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -42 1 -62 1 -43 1 -63 1 -44 1 -64 1 -45 1 -60 1 -65 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -4D 1 -6D 1 -4E 1 -6E 1 -4F 1 -6F 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -53 1 -73 1 -54 1 -74 1 -55 1 -75 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -7E 1 -5A 1 -7A 1 -5D 1 -5B 1 -5C 1 -5E 1 -5F 1 -7B 1 -7C 1 -7D 1 -7F 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES binary; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET binary) ENGINE=NDB CHARACTER SET binary; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # binary # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -E6 1 -E7 1 -E8 1 -E9 1 -EA 1 -EB 1 -EC 1 -ED 1 -EE 1 -EF 1 -F0 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES cp1250; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET cp1250 COLLATE cp1250_bin) ENGINE=NDB CHARACTER SET cp1250 COLLATE cp1250_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # cp1250_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -E6 1 -E7 1 -E8 1 -E9 1 -EA 1 -EB 1 -EC 1 -ED 1 -EE 1 -EF 1 -F0 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES cp1250; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET cp1250 COLLATE cp1250_croatian_ci) ENGINE=NDB CHARACTER SET cp1250 COLLATE cp1250_croatian_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # cp1250_croatian_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -A5 1 -B9 1 -C1 1 -C2 1 -C3 1 -C4 1 -E1 1 -E2 1 -E3 1 -E4 1 -42 1 -62 1 -43 1 -63 1 -C7 1 -E7 1 -C8 1 -E8 1 -C6 1 -E6 1 -44 1 -64 1 -CF 1 -EF 1 -D0 1 -F0 1 -45 1 -65 1 -C9 1 -CA 1 -CB 1 -CC 1 -E9 1 -EA 1 -EB 1 -EC 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -CD 1 -CE 1 -ED 1 -EE 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -A3 1 -B3 1 -BC 1 -BE 1 -C5 1 -E5 1 -4D 1 -6D 1 -4E 1 -6E 1 -D1 1 -D2 1 -F1 1 -F2 1 -4F 1 -6F 1 -D3 1 -D4 1 -D5 1 -D6 1 -F3 1 -F4 1 -F5 1 -F6 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -C0 1 -D8 1 -E0 1 -F8 1 -53 1 -73 1 -8C 1 -9C 1 -AA 1 -BA 1 -DF 1 -8A 1 -9A 1 -54 1 -74 1 -8D 1 -9D 1 -DE 1 -55 1 -75 1 -D9 1 -DA 1 -DB 1 -DC 1 -F9 1 -FA 1 -FB 1 -FC 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -DD 1 -FD 1 -5A 1 -7A 1 -8F 1 -9F 1 -AF 1 -BF 1 -8E 1 -9E 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8B 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9B 1 -A0 1 -A1 1 -A2 1 -A4 1 -A6 1 -A7 1 -A8 1 -A9 1 -AB 1 -AC 1 -AD 1 -AE 1 -B0 1 -B1 1 -B2 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -BB 1 -BD 1 -D7 1 -F7 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES cp1250; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET cp1250 COLLATE cp1250_czech_cs) ENGINE=NDB CHARACTER SET cp1250 COLLATE cp1250_czech_cs; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # cp1250_czech_cs # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -7F 1 -80 1 -81 1 -83 1 -88 1 -90 1 -98 1 -B6 1 -A0 1 -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -C1 1 -E1 1 -C2 1 -E2 1 -C3 1 -E3 1 -C4 1 -E4 1 -A5 1 -B9 1 -42 1 -62 1 -43 1 -63 1 -C6 1 -E6 1 -C7 1 -E7 1 -C8 1 -E8 1 -44 1 -64 1 -CF 1 -EF 1 -D0 1 -F0 1 -45 1 -65 1 -C9 1 -E9 1 -CC 1 -EC 1 -CB 1 -EB 1 -CA 1 -EA 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -CD 1 -ED 1 -CE 1 -EE 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -C5 1 -E5 1 -BC 1 -BE 1 -A3 1 -B3 1 -4D 1 -6D 1 -4E 1 -6E 1 -D1 1 -F1 1 -D2 1 -F2 1 -4F 1 -6F 1 -D3 1 -F3 1 -D4 1 -F4 1 -D6 1 -F6 1 -D5 1 -F5 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -C0 1 -E0 1 -D8 1 -F8 1 -53 1 -73 1 -8C 1 -9C 1 -AA 1 -BA 1 -8A 1 -9A 1 -DF 1 -54 1 -74 1 -8D 1 -9D 1 -DE 1 -55 1 -75 1 -DA 1 -FA 1 -D9 1 -F9 1 -DC 1 -FC 1 -DB 1 -FB 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -DD 1 -FD 1 -5A 1 -7A 1 -AF 1 -BF 1 -8F 1 -9F 1 -8E 1 -9E 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -82 1 -84 1 -85 1 -86 1 -87 1 -89 1 -8B 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -99 1 -9B 1 -A1 1 -A2 1 -A4 1 -A6 1 -A7 1 -A8 1 -A9 1 -AB 1 -AC 1 -AD 1 -AE 1 -B0 1 -B1 1 -B2 1 -B4 1 -B5 1 -B7 1 -B8 1 -BB 1 -BD 1 -D7 1 -F7 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES cp1250; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET cp1250 COLLATE cp1250_general_ci) ENGINE=NDB CHARACTER SET cp1250 COLLATE cp1250_general_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # cp1250_general_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -A0 1 -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -A5 1 -B9 1 -C1 1 -C2 1 -C3 1 -C4 1 -E1 1 -E2 1 -E3 1 -E4 1 -42 1 -62 1 -43 1 -63 1 -C7 1 -E7 1 -C8 1 -E8 1 -C6 1 -E6 1 -44 1 -64 1 -CF 1 -EF 1 -D0 1 -F0 1 -45 1 -65 1 -C9 1 -CA 1 -CB 1 -CC 1 -E9 1 -EA 1 -EB 1 -EC 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -CD 1 -CE 1 -ED 1 -EE 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -A3 1 -B3 1 -BC 1 -BE 1 -C5 1 -E5 1 -4D 1 -6D 1 -4E 1 -6E 1 -D1 1 -D2 1 -F1 1 -F2 1 -4F 1 -6F 1 -D3 1 -D4 1 -D5 1 -D6 1 -F3 1 -F4 1 -F5 1 -F6 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -C0 1 -D8 1 -E0 1 -F8 1 -53 1 -73 1 -A7 1 -AA 1 -BA 1 -DF 1 -8A 1 -8C 1 -9A 1 -9C 1 -54 1 -74 1 -8D 1 -9D 1 -DE 1 -55 1 -75 1 -D9 1 -DA 1 -DB 1 -DC 1 -F9 1 -FA 1 -FB 1 -FC 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -DD 1 -FD 1 -5A 1 -7A 1 -8E 1 -8F 1 -9E 1 -9F 1 -AF 1 -BF 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8B 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9B 1 -A1 1 -A2 1 -A4 1 -A6 1 -A8 1 -A9 1 -AB 1 -AC 1 -AD 1 -AE 1 -B0 1 -B1 1 -B2 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -BB 1 -BD 1 -D7 1 -F7 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES cp1251; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET cp1251 COLLATE cp1251_bin) ENGINE=NDB CHARACTER SET cp1251 COLLATE cp1251_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # cp1251_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -E6 1 -E7 1 -E8 1 -E9 1 -EA 1 -EB 1 -EC 1 -ED 1 -EE 1 -EF 1 -F0 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES cp1251; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET cp1251 COLLATE cp1251_bulgarian_ci) ENGINE=NDB CHARACTER SET cp1251 COLLATE cp1251_bulgarian_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # cp1251_bulgarian_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -42 1 -62 1 -43 1 -63 1 -44 1 -64 1 -45 1 -65 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -4D 1 -6D 1 -4E 1 -6E 1 -4F 1 -6F 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -53 1 -73 1 -54 1 -74 1 -55 1 -75 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -5A 1 -7A 1 -C0 1 -E0 1 -C1 1 -E1 1 -C2 1 -E2 1 -C3 1 -E3 1 -C4 1 -E4 1 -C5 1 -E5 1 -A8 1 -B8 1 -C6 1 -E6 1 -C7 1 -E7 1 -C8 1 -E8 1 -C9 1 -E9 1 -CA 1 -EA 1 -CB 1 -EB 1 -CC 1 -EC 1 -CD 1 -ED 1 -CE 1 -EE 1 -CF 1 -EF 1 -D0 1 -F0 1 -D1 1 -F1 1 -D2 1 -F2 1 -D3 1 -F3 1 -D4 1 -F4 1 -D5 1 -F5 1 -D6 1 -F6 1 -D7 1 -F7 1 -D8 1 -F8 1 -D9 1 -F9 1 -DA 1 -FA 1 -DB 1 -FB 1 -DC 1 -FC 1 -DD 1 -FD 1 -DE 1 -DF 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES cp1251; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET cp1251 COLLATE cp1251_general_ci) ENGINE=NDB CHARACTER SET cp1251 COLLATE cp1251_general_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # cp1251_general_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -42 1 -62 1 -43 1 -63 1 -44 1 -64 1 -45 1 -65 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -4D 1 -6D 1 -4E 1 -6E 1 -4F 1 -6F 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -53 1 -73 1 -54 1 -74 1 -55 1 -75 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -5A 1 -7A 1 -C0 1 -E0 1 -C1 1 -E1 1 -C2 1 -E2 1 -C3 1 -E3 1 -A5 1 -B4 1 -C4 1 -E4 1 -80 1 -90 1 -81 1 -83 1 -C5 1 -E5 1 -A8 1 -B8 1 -AA 1 -BA 1 -C6 1 -E6 1 -C7 1 -E7 1 -BD 1 -BE 1 -C8 1 -E8 1 -B2 1 -B3 1 -AF 1 -BF 1 -C9 1 -E9 1 -A3 1 -BC 1 -CA 1 -EA 1 -8D 1 -9D 1 -CB 1 -EB 1 -8A 1 -9A 1 -CC 1 -EC 1 -CD 1 -ED 1 -8C 1 -9C 1 -CE 1 -EE 1 -CF 1 -EF 1 -D0 1 -F0 1 -D1 1 -F1 1 -D2 1 -F2 1 -8E 1 -9E 1 -D3 1 -F3 1 -A1 1 -A2 1 -D4 1 -F4 1 -D5 1 -F5 1 -D6 1 -F6 1 -D7 1 -F7 1 -8F 1 -9F 1 -D8 1 -F8 1 -D9 1 -F9 1 -DA 1 -FA 1 -DB 1 -FB 1 -DC 1 -FC 1 -DD 1 -FD 1 -DE 1 -DF 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -82 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8B 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9B 1 -A0 1 -A4 1 -A6 1 -A7 1 -A9 1 -AB 1 -AC 1 -AD 1 -AE 1 -B0 1 -B1 1 -B5 1 -B6 1 -B7 1 -B9 1 -BB 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES cp1251; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET cp1251 COLLATE cp1251_general_cs) ENGINE=NDB CHARACTER SET cp1251 COLLATE cp1251_general_cs; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # cp1251_general_cs # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -42 1 -62 1 -43 1 -63 1 -44 1 -64 1 -45 1 -65 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -4D 1 -6D 1 -4E 1 -6E 1 -4F 1 -6F 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -53 1 -73 1 -54 1 -74 1 -55 1 -75 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -5A 1 -7A 1 -C0 1 -E0 1 -C1 1 -E1 1 -C2 1 -E2 1 -C3 1 -E3 1 -A5 1 -B4 1 -C4 1 -E4 1 -80 1 -90 1 -81 1 -83 1 -C5 1 -E5 1 -A8 1 -B8 1 -AA 1 -BA 1 -C6 1 -E6 1 -C7 1 -E7 1 -BD 1 -BE 1 -C8 1 -E8 1 -B2 1 -B3 1 -AF 1 -BF 1 -C9 1 -E9 1 -A3 1 -BC 1 -CA 1 -EA 1 -8D 1 -9D 1 -CB 1 -EB 1 -8A 1 -9A 1 -CC 1 -EC 1 -CD 1 -ED 1 -8C 1 -9C 1 -CE 1 -EE 1 -CF 1 -EF 1 -D0 1 -F0 1 -D1 1 -F1 1 -D2 1 -F2 1 -8E 1 -9E 1 -D3 1 -F3 1 -A1 1 -A2 1 -D4 1 -F4 1 -D5 1 -F5 1 -D6 1 -F6 1 -D7 1 -F7 1 -8F 1 -9F 1 -D8 1 -F8 1 -D9 1 -F9 1 -DA 1 -FA 1 -DB 1 -FB 1 -DC 1 -FC 1 -DD 1 -FD 1 -DE 1 -DF 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -82 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8B 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9B 1 -A0 1 -A4 1 -A6 1 -A7 1 -A9 1 -AB 1 -AC 1 -AD 1 -AE 1 -B0 1 -B1 1 -B5 1 -B6 1 -B7 1 -B9 1 -BB 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES cp1251; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET cp1251 COLLATE cp1251_ukrainian_ci) ENGINE=NDB CHARACTER SET cp1251 COLLATE cp1251_ukrainian_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # cp1251_ukrainian_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -60 1 -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -42 1 -62 1 -43 1 -63 1 -44 1 -64 1 -45 1 -65 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -4D 1 -6D 1 -4E 1 -6E 1 -4F 1 -6F 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -53 1 -73 1 -54 1 -74 1 -55 1 -75 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -5A 1 -7A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -C0 1 -E0 1 -C1 1 -E1 1 -C2 1 -E2 1 -C3 1 -E3 1 -A5 1 -B4 1 -C4 1 -E4 1 -C5 1 -E5 1 -AA 1 -BA 1 -A8 1 -B8 1 -C6 1 -E6 1 -C7 1 -E7 1 -C8 1 -E8 1 -B2 1 -B3 1 -AF 1 -BF 1 -C9 1 -E9 1 -CA 1 -EA 1 -CB 1 -EB 1 -CC 1 -EC 1 -CD 1 -ED 1 -CE 1 -EE 1 -CF 1 -EF 1 -D0 1 -F0 1 -D1 1 -F1 1 -D2 1 -F2 1 -D3 1 -F3 1 -D4 1 -F4 1 -D5 1 -F5 1 -D6 1 -F6 1 -D7 1 -F7 1 -D8 1 -F8 1 -D9 1 -F9 1 -DA 1 -FA 1 -DB 1 -FB 1 -DC 1 -FC 1 -DD 1 -FD 1 -DE 1 -DF 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A6 1 -A7 1 -A9 1 -AB 1 -AC 1 -AD 1 -AE 1 -B0 1 -B1 1 -B5 1 -B6 1 -B7 1 -B9 1 -BB 1 -BC 1 -BD 1 -BE 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES cp1256; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET cp1256 COLLATE cp1256_bin) ENGINE=NDB CHARACTER SET cp1256 COLLATE cp1256_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # cp1256_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -E6 1 -E7 1 -E8 1 -E9 1 -EA 1 -EB 1 -EC 1 -ED 1 -EE 1 -EF 1 -F0 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES cp1256; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET cp1256 COLLATE cp1256_general_ci) ENGINE=NDB CHARACTER SET cp1256 COLLATE cp1256_general_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # cp1256_general_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -E0 1 -E2 1 -42 1 -62 1 -43 1 -63 1 -E7 1 -44 1 -64 1 -45 1 -65 1 -E8 1 -E9 1 -EA 1 -EB 1 -46 1 -66 1 -83 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -EE 1 -EF 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -4D 1 -6D 1 -4E 1 -6E 1 -4F 1 -6F 1 -F4 1 -8C 1 -9C 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -53 1 -73 1 -54 1 -74 1 -55 1 -75 1 -F9 1 -FB 1 -FC 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -5A 1 -7A 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -81 1 -CB 1 -CC 1 -8D 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -8E 1 -D3 1 -D4 1 -D5 1 -D6 1 -D8 1 -CA 1 -D9 1 -DA 1 -DB 1 -DD 1 -DE 1 -DF 1 -90 1 -E1 1 -E3 1 -E4 1 -E5 1 -E6 1 -EC 1 -ED 1 -DC 1 -F0 1 -F1 1 -F2 1 -F3 1 -F5 1 -F6 1 -F8 1 -FA 1 -A1 1 -BA 1 -BF 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -82 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8F 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9D 1 -9E 1 -9F 1 -A0 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BB 1 -BC 1 -BD 1 -BE 1 -C0 1 -D7 1 -F7 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES cp1257; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET cp1257 COLLATE cp1257_bin) ENGINE=NDB CHARACTER SET cp1257 COLLATE cp1257_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # cp1257_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -E6 1 -E7 1 -E8 1 -E9 1 -EA 1 -EB 1 -EC 1 -ED 1 -EE 1 -EF 1 -F0 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES cp1257; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET cp1257 COLLATE cp1257_general_ci) ENGINE=NDB CHARACTER SET cp1257 COLLATE cp1257_general_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # cp1257_general_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -AF 1 -BF 1 -C0 1 -C2 1 -C4 1 -C5 1 -E0 1 -E2 1 -E4 1 -E5 1 -42 1 -62 1 -43 1 -63 1 -C3 1 -C8 1 -E3 1 -E8 1 -44 1 -64 1 -45 1 -65 1 -C6 1 -C7 1 -C9 1 -CB 1 -E6 1 -E7 1 -E9 1 -EB 1 -46 1 -66 1 -47 1 -67 1 -CC 1 -EC 1 -48 1 -68 1 -49 1 -69 1 -C1 1 -CE 1 -E1 1 -EE 1 -4A 1 -6A 1 -4B 1 -6B 1 -CD 1 -ED 1 -4C 1 -6C 1 -CF 1 -D9 1 -EF 1 -F9 1 -4D 1 -6D 1 -4E 1 -6E 1 -D1 1 -D2 1 -F1 1 -F2 1 -4F 1 -6F 1 -A8 1 -B8 1 -D3 1 -D4 1 -D5 1 -D6 1 -F3 1 -F4 1 -F5 1 -F6 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -AA 1 -BA 1 -53 1 -73 1 -D0 1 -DA 1 -DF 1 -F0 1 -FA 1 -54 1 -74 1 -55 1 -75 1 -D8 1 -DB 1 -DC 1 -F8 1 -FB 1 -FC 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -5A 1 -7A 1 -CA 1 -DD 1 -DE 1 -EA 1 -FD 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -D7 1 -F7 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A9 1 -AB 1 -AC 1 -AD 1 -AE 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B9 1 -BB 1 -BC 1 -BD 1 -BE 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES cp1257; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET cp1257 COLLATE cp1257_lithuanian_ci) ENGINE=NDB CHARACTER SET cp1257 COLLATE cp1257_lithuanian_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # cp1257_lithuanian_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -C0 1 -42 1 -62 1 -43 1 -63 1 -C8 1 -E8 1 -44 1 -64 1 -45 1 -65 1 -C6 1 -E6 1 -CB 1 -EB 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -59 1 -79 1 -C1 1 -E1 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -4D 1 -6D 1 -4E 1 -6E 1 -4F 1 -6F 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -53 1 -73 1 -D0 1 -F0 1 -54 1 -74 1 -55 1 -75 1 -DB 1 -FB 1 -D8 1 -F8 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -5A 1 -7A 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C2 1 -C3 1 -C4 1 -C5 1 -C7 1 -C9 1 -CA 1 -CC 1 -CD 1 -CE 1 -CF 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D9 1 -DA 1 -DC 1 -DD 1 -DE 1 -DF 1 -E0 1 -E2 1 -E3 1 -E4 1 -E5 1 -E7 1 -E9 1 -EA 1 -EC 1 -ED 1 -EE 1 -EF 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F9 1 -FA 1 -FC 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES cp850; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET cp850 COLLATE cp850_bin) ENGINE=NDB CHARACTER SET cp850 COLLATE cp850_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # cp850_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -E6 1 -E7 1 -E8 1 -E9 1 -EA 1 -EB 1 -EC 1 -ED 1 -EE 1 -EF 1 -F0 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES cp850; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET cp850 COLLATE cp850_general_ci) ENGINE=NDB CHARACTER SET cp850 COLLATE cp850_general_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # cp850_general_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -85 1 -B7 1 -A0 1 -B5 1 -83 1 -B6 1 -C6 1 -C7 1 -84 1 -8E 1 -86 1 -8F 1 -91 1 -92 1 -42 1 -62 1 -43 1 -63 1 -80 1 -87 1 -44 1 -64 1 -D0 1 -D1 1 -45 1 -65 1 -8A 1 -D4 1 -82 1 -90 1 -88 1 -D2 1 -89 1 -D3 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -8D 1 -DE 1 -A1 1 -D6 1 -8C 1 -D7 1 -8B 1 -D8 1 -D5 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -4D 1 -6D 1 -4E 1 -6E 1 -A4 1 -A5 1 -4F 1 -6F 1 -95 1 -E3 1 -A2 1 -E0 1 -93 1 -E2 1 -E4 1 -E5 1 -94 1 -99 1 -9B 1 -9D 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -53 1 -73 1 -E1 1 -54 1 -74 1 -55 1 -75 1 -97 1 -EB 1 -A3 1 -E9 1 -96 1 -EA 1 -81 1 -9A 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -EC 1 -ED 1 -98 1 -5A 1 -7A 1 -E7 1 -E8 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -F7 1 -9E 1 -9F 1 -F6 1 -F2 1 -C4 1 -B3 1 -DA 1 -BF 1 -C0 1 -D9 1 -C3 1 -B4 1 -C2 1 -C1 1 -C5 1 -CD 1 -AD 1 -BA 1 -C9 1 -BB 1 -C8 1 -BC 1 -CC 1 -B9 1 -CB 1 -CA 1 -CE 1 -DF 1 -DC 1 -DB 1 -B0 1 -B1 1 -B2 1 -BD 1 -9C 1 -CF 1 -BE 1 -DD 1 -F5 1 -F9 1 -B8 1 -A6 1 -AE 1 -AA 1 -F0 1 -A9 1 -EE 1 -F8 1 -F1 1 -FD 1 -FC 1 -EF 1 -E6 1 -F4 1 -FA 1 -FB 1 -A7 1 -AF 1 -AC 1 -AB 1 -F3 1 -A8 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES cp852; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET cp852 COLLATE cp852_bin) ENGINE=NDB CHARACTER SET cp852 COLLATE cp852_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # cp852_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -E6 1 -E7 1 -E8 1 -E9 1 -EA 1 -EB 1 -EC 1 -ED 1 -EE 1 -EF 1 -F0 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES cp852; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET cp852 COLLATE cp852_general_ci) ENGINE=NDB CHARACTER SET cp852 COLLATE cp852_general_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # cp852_general_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -83 1 -84 1 -8E 1 -A0 1 -A4 1 -A5 1 -B5 1 -B6 1 -C6 1 -C7 1 -42 1 -62 1 -43 1 -63 1 -80 1 -86 1 -87 1 -8F 1 -9F 1 -AC 1 -44 1 -64 1 -D0 1 -D1 1 -D2 1 -D4 1 -45 1 -65 1 -82 1 -89 1 -90 1 -A8 1 -A9 1 -B7 1 -D3 1 -D8 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -8C 1 -A1 1 -D6 1 -D7 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -88 1 -91 1 -92 1 -95 1 -96 1 -9D 1 -4D 1 -6D 1 -4E 1 -6E 1 -D5 1 -E3 1 -E4 1 -E5 1 -4F 1 -6F 1 -8A 1 -8B 1 -93 1 -94 1 -99 1 -A2 1 -E0 1 -E2 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -E8 1 -EA 1 -FC 1 -FD 1 -53 1 -73 1 -97 1 -98 1 -AD 1 -B8 1 -E6 1 -E7 1 -E1 1 -54 1 -74 1 -9B 1 -9C 1 -DD 1 -EE 1 -55 1 -75 1 -81 1 -85 1 -9A 1 -A3 1 -DE 1 -E9 1 -EB 1 -FB 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -EC 1 -ED 1 -5A 1 -7A 1 -8D 1 -A6 1 -A7 1 -AB 1 -BD 1 -BE 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -9E 1 -AA 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B9 1 -BA 1 -BB 1 -BC 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D9 1 -DA 1 -DB 1 -DC 1 -DF 1 -EF 1 -F0 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F8 1 -F9 1 -FA 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES cp866; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET cp866 COLLATE cp866_bin) ENGINE=NDB CHARACTER SET cp866 COLLATE cp866_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # cp866_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -E6 1 -E7 1 -E8 1 -E9 1 -EA 1 -EB 1 -EC 1 -ED 1 -EE 1 -EF 1 -F0 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES cp866; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET cp866 COLLATE cp866_general_ci) ENGINE=NDB CHARACTER SET cp866 COLLATE cp866_general_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # cp866_general_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -42 1 -62 1 -43 1 -63 1 -44 1 -64 1 -45 1 -65 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -4D 1 -6D 1 -4E 1 -6E 1 -4F 1 -6F 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -53 1 -73 1 -54 1 -74 1 -55 1 -75 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -5A 1 -7A 1 -80 1 -A0 1 -81 1 -A1 1 -82 1 -A2 1 -83 1 -A3 1 -84 1 -A4 1 -85 1 -A5 1 -F0 1 -F1 1 -F2 1 -F3 1 -86 1 -A6 1 -87 1 -A7 1 -88 1 -A8 1 -F4 1 -F5 1 -89 1 -A9 1 -8A 1 -AA 1 -8B 1 -AB 1 -8C 1 -AC 1 -8D 1 -AD 1 -8E 1 -AE 1 -8F 1 -AF 1 -90 1 -E0 1 -91 1 -E1 1 -92 1 -E2 1 -93 1 -E3 1 -F6 1 -F7 1 -94 1 -E4 1 -95 1 -E5 1 -96 1 -E6 1 -97 1 -E7 1 -98 1 -E8 1 -99 1 -E9 1 -9A 1 -EA 1 -9B 1 -EB 1 -9C 1 -EC 1 -9D 1 -ED 1 -9E 1 -EE 1 -9F 1 -EF 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -B0 1 -B1 1 -B2 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES cp932; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET cp932 COLLATE cp932_bin) ENGINE=NDB CHARACTER SET cp932 COLLATE cp932_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # cp932_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES cp932; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET cp932 COLLATE cp932_japanese_ci) ENGINE=NDB CHARACTER SET cp932 COLLATE cp932_japanese_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # cp932_japanese_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -42 1 -62 1 -43 1 -63 1 -44 1 -64 1 -45 1 -65 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -4D 1 -6D 1 -4E 1 -6E 1 -4F 1 -6F 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -53 1 -73 1 -54 1 -74 1 -55 1 -75 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -5A 1 -7A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES dec8; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET dec8 COLLATE dec8_bin) ENGINE=NDB CHARACTER SET dec8 COLLATE dec8_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # dec8_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -E6 1 -E7 1 -E8 1 -E9 1 -EA 1 -EB 1 -EC 1 -ED 1 -EE 1 -EF 1 -F0 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES dec8; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET dec8 COLLATE dec8_swedish_ci) ENGINE=NDB CHARACTER SET dec8 COLLATE dec8_swedish_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # dec8_swedish_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -C0 1 -C1 1 -C2 1 -C3 1 -E0 1 -E1 1 -E2 1 -E3 1 -42 1 -62 1 -43 1 -63 1 -C7 1 -E7 1 -44 1 -64 1 -D0 1 -F0 1 -45 1 -65 1 -C8 1 -C9 1 -CA 1 -CB 1 -E8 1 -E9 1 -EA 1 -EB 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -CC 1 -CD 1 -CE 1 -CF 1 -EC 1 -ED 1 -EE 1 -EF 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -4D 1 -6D 1 -4E 1 -6E 1 -D1 1 -F1 1 -4F 1 -6F 1 -D2 1 -D3 1 -D4 1 -D5 1 -F2 1 -F3 1 -F4 1 -F5 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -53 1 -73 1 -54 1 -74 1 -55 1 -75 1 -D9 1 -DA 1 -DB 1 -F9 1 -FA 1 -FB 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -DC 1 -DD 1 -FC 1 -FD 1 -5A 1 -7A 1 -5B 1 -C5 1 -E5 1 -5C 1 -C4 1 -C6 1 -E4 1 -E6 1 -5D 1 -D6 1 -F6 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -D7 1 -D8 1 -F8 1 -DE 1 -DF 1 -F7 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES eucjpms; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET eucjpms COLLATE eucjpms_bin) ENGINE=NDB CHARACTER SET eucjpms COLLATE eucjpms_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # eucjpms_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES eucjpms; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET eucjpms COLLATE eucjpms_japanese_ci) ENGINE=NDB CHARACTER SET eucjpms COLLATE eucjpms_japanese_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # eucjpms_japanese_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -42 1 -62 1 -43 1 -63 1 -44 1 -64 1 -45 1 -65 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -4D 1 -6D 1 -4E 1 -6E 1 -4F 1 -6F 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -53 1 -73 1 -54 1 -74 1 -55 1 -75 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -5A 1 -7A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES euckr; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET euckr COLLATE euckr_bin) ENGINE=NDB CHARACTER SET euckr COLLATE euckr_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # euckr_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES euckr; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET euckr COLLATE euckr_korean_ci) ENGINE=NDB CHARACTER SET euckr COLLATE euckr_korean_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # euckr_korean_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -42 1 -62 1 -43 1 -63 1 -44 1 -64 1 -45 1 -65 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -4D 1 -6D 1 -4E 1 -6E 1 -4F 1 -6F 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -53 1 -73 1 -54 1 -74 1 -55 1 -75 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -5A 1 -7A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES gb2312; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET gb2312 COLLATE gb2312_bin) ENGINE=NDB CHARACTER SET gb2312 COLLATE gb2312_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # gb2312_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES gb2312; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET gb2312 COLLATE gb2312_chinese_ci) ENGINE=NDB CHARACTER SET gb2312 COLLATE gb2312_chinese_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # gb2312_chinese_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -42 1 -62 1 -43 1 -63 1 -44 1 -64 1 -45 1 -65 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -4D 1 -6D 1 -4E 1 -6E 1 -4F 1 -6F 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -53 1 -73 1 -54 1 -74 1 -55 1 -75 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -7E 1 -5A 1 -7A 1 -5D 1 -5B 1 -5C 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7F 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES gbk; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET gbk COLLATE gbk_bin) ENGINE=NDB CHARACTER SET gbk COLLATE gbk_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # gbk_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES gbk; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET gbk COLLATE gbk_chinese_ci) ENGINE=NDB CHARACTER SET gbk COLLATE gbk_chinese_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # gbk_chinese_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -42 1 -62 1 -43 1 -63 1 -44 1 -64 1 -45 1 -65 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -4D 1 -6D 1 -4E 1 -6E 1 -4F 1 -6F 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -53 1 -73 1 -54 1 -74 1 -55 1 -75 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -7E 1 -5A 1 -7A 1 -5D 1 -5B 1 -5C 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7F 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES geostd8; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET geostd8 COLLATE geostd8_bin) ENGINE=NDB CHARACTER SET geostd8 COLLATE geostd8_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # geostd8_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -E6 1 -E7 1 -E8 1 -E9 1 -EA 1 -EB 1 -EC 1 -ED 1 -EE 1 -EF 1 -F0 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES geostd8; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET geostd8 COLLATE geostd8_general_ci) ENGINE=NDB CHARACTER SET geostd8 COLLATE geostd8_general_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # geostd8_general_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -60 1 -41 1 -61 1 -42 1 -62 1 -43 1 -63 1 -44 1 -64 1 -45 1 -65 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -4D 1 -6D 1 -4E 1 -6E 1 -4F 1 -6F 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -53 1 -73 1 -54 1 -74 1 -55 1 -75 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -5A 1 -7A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -E6 1 -E7 1 -E8 1 -E9 1 -EA 1 -EB 1 -EC 1 -ED 1 -EE 1 -EF 1 -F0 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES greek; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET greek COLLATE greek_bin) ENGINE=NDB CHARACTER SET greek COLLATE greek_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # greek_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -E6 1 -E7 1 -E8 1 -E9 1 -EA 1 -EB 1 -EC 1 -ED 1 -EE 1 -EF 1 -F0 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES greek; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET greek COLLATE greek_general_ci) ENGINE=NDB CHARACTER SET greek COLLATE greek_general_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # greek_general_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -42 1 -62 1 -43 1 -63 1 -44 1 -64 1 -45 1 -65 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -4D 1 -6D 1 -4E 1 -6E 1 -4F 1 -6F 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -53 1 -73 1 -54 1 -74 1 -55 1 -75 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -5A 1 -7A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B7 1 -BB 1 -BD 1 -B6 1 -C1 1 -DC 1 -E1 1 -C2 1 -E2 1 -C3 1 -E3 1 -C4 1 -E4 1 -B8 1 -C5 1 -DD 1 -E5 1 -C6 1 -E6 1 -B9 1 -C7 1 -DE 1 -E7 1 -C8 1 -E8 1 -BA 1 -C0 1 -C9 1 -DA 1 -DF 1 -E9 1 -FA 1 -CA 1 -EA 1 -CB 1 -EB 1 -CC 1 -EC 1 -CD 1 -ED 1 -CE 1 -EE 1 -BC 1 -CF 1 -EF 1 -FC 1 -D0 1 -F0 1 -D1 1 -F1 1 -D2 1 -D3 1 -F2 1 -F3 1 -D4 1 -F4 1 -BE 1 -D5 1 -DB 1 -E0 1 -F5 1 -FB 1 -FD 1 -D6 1 -F6 1 -D7 1 -F7 1 -D8 1 -F8 1 -BF 1 -D9 1 -F9 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES hebrew; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET hebrew COLLATE hebrew_bin) ENGINE=NDB CHARACTER SET hebrew COLLATE hebrew_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # hebrew_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -E6 1 -E7 1 -E8 1 -E9 1 -EA 1 -EB 1 -EC 1 -ED 1 -EE 1 -EF 1 -F0 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES hebrew; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET hebrew COLLATE hebrew_general_ci) ENGINE=NDB CHARACTER SET hebrew COLLATE hebrew_general_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # hebrew_general_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -42 1 -62 1 -43 1 -63 1 -44 1 -64 1 -45 1 -65 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -4D 1 -6D 1 -4E 1 -6E 1 -4F 1 -6F 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -53 1 -73 1 -54 1 -74 1 -55 1 -75 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -5A 1 -7A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -E6 1 -E7 1 -E8 1 -E9 1 -EA 1 -EB 1 -EC 1 -ED 1 -EE 1 -EF 1 -F0 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -D7 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -DF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES hp8; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET hp8 COLLATE hp8_bin) ENGINE=NDB CHARACTER SET hp8 COLLATE hp8_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # hp8_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -E6 1 -E7 1 -E8 1 -E9 1 -EA 1 -EB 1 -EC 1 -ED 1 -EE 1 -EF 1 -F0 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES hp8; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET hp8 COLLATE hp8_english_ci) ENGINE=NDB CHARACTER SET hp8 COLLATE hp8_english_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # hp8_english_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -42 1 -62 1 -43 1 -63 1 -44 1 -64 1 -45 1 -65 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -4D 1 -6D 1 -4E 1 -6E 1 -4F 1 -6F 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -53 1 -73 1 -54 1 -74 1 -55 1 -75 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -5A 1 -7A 1 -5D 1 -5B 1 -5C 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -E6 1 -E7 1 -E8 1 -E9 1 -EA 1 -EB 1 -EC 1 -ED 1 -EE 1 -EF 1 -F0 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES keybcs2; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET keybcs2 COLLATE keybcs2_bin) ENGINE=NDB CHARACTER SET keybcs2 COLLATE keybcs2_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # keybcs2_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -E6 1 -E7 1 -E8 1 -E9 1 -EA 1 -EB 1 -EC 1 -ED 1 -EE 1 -EF 1 -F0 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES keybcs2; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET keybcs2 COLLATE keybcs2_general_ci) ENGINE=NDB CHARACTER SET keybcs2 COLLATE keybcs2_general_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # keybcs2_general_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -84 1 -8E 1 -8F 1 -A0 1 -42 1 -62 1 -43 1 -63 1 -80 1 -87 1 -44 1 -64 1 -83 1 -85 1 -45 1 -65 1 -82 1 -88 1 -89 1 -90 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -8B 1 -A1 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -8A 1 -8C 1 -8D 1 -9C 1 -4D 1 -6D 1 -4E 1 -6E 1 -A4 1 -A5 1 -4F 1 -6F 1 -93 1 -94 1 -95 1 -99 1 -A2 1 -A7 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -9E 1 -A9 1 -AA 1 -AB 1 -53 1 -73 1 -9B 1 -A8 1 -E1 1 -54 1 -74 1 -86 1 -9F 1 -55 1 -75 1 -81 1 -96 1 -97 1 -9A 1 -A3 1 -A6 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -98 1 -9D 1 -5A 1 -7A 1 -91 1 -92 1 -E0 1 -EB 1 -EE 1 -E2 1 -EA 1 -E8 1 -ED 1 -E3 1 -E4 1 -E5 1 -E7 1 -E9 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -E6 1 -EC 1 -EF 1 -F0 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES koi8r; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET koi8r COLLATE koi8r_bin) ENGINE=NDB CHARACTER SET koi8r COLLATE koi8r_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # koi8r_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -E6 1 -E7 1 -E8 1 -E9 1 -EA 1 -EB 1 -EC 1 -ED 1 -EE 1 -EF 1 -F0 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES koi8r; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET koi8r COLLATE koi8r_general_ci) ENGINE=NDB CHARACTER SET koi8r COLLATE koi8r_general_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # koi8r_general_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -42 1 -62 1 -43 1 -63 1 -44 1 -64 1 -45 1 -65 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -4D 1 -6D 1 -4E 1 -6E 1 -4F 1 -6F 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -53 1 -73 1 -54 1 -74 1 -55 1 -75 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -5A 1 -7A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C1 1 -E1 1 -C2 1 -E2 1 -D7 1 -F7 1 -C7 1 -E7 1 -C4 1 -E4 1 -C5 1 -E5 1 -A3 1 -B3 1 -D6 1 -F6 1 -DA 1 -FA 1 -C9 1 -E9 1 -CA 1 -EA 1 -CB 1 -EB 1 -CC 1 -EC 1 -CD 1 -ED 1 -CE 1 -EE 1 -CF 1 -EF 1 -D0 1 -F0 1 -D2 1 -F2 1 -D3 1 -F3 1 -D4 1 -F4 1 -D5 1 -F5 1 -C6 1 -E6 1 -C8 1 -E8 1 -C3 1 -E3 1 -DE 1 -DB 1 -FB 1 -DD 1 -FD 1 -DF 1 -D9 1 -F9 1 -D8 1 -F8 1 -DC 1 -FC 1 -C0 1 -E0 1 -D1 1 -F1 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES koi8u; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET koi8u COLLATE koi8u_bin) ENGINE=NDB CHARACTER SET koi8u COLLATE koi8u_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # koi8u_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -E6 1 -E7 1 -E8 1 -E9 1 -EA 1 -EB 1 -EC 1 -ED 1 -EE 1 -EF 1 -F0 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES koi8u; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET koi8u COLLATE koi8u_general_ci) ENGINE=NDB CHARACTER SET koi8u COLLATE koi8u_general_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # koi8u_general_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -60 1 -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -42 1 -62 1 -43 1 -63 1 -44 1 -64 1 -45 1 -65 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -4D 1 -6D 1 -4E 1 -6E 1 -4F 1 -6F 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -53 1 -73 1 -54 1 -74 1 -55 1 -75 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -5A 1 -7A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -C1 1 -E1 1 -C2 1 -E2 1 -D7 1 -F7 1 -C7 1 -E7 1 -AD 1 -BD 1 -C4 1 -E4 1 -C5 1 -E5 1 -A4 1 -B4 1 -A3 1 -B3 1 -D6 1 -F6 1 -DA 1 -FA 1 -C9 1 -E9 1 -A6 1 -B6 1 -A7 1 -B7 1 -CA 1 -EA 1 -CB 1 -EB 1 -CC 1 -EC 1 -CD 1 -ED 1 -CE 1 -EE 1 -CF 1 -EF 1 -D0 1 -F0 1 -D2 1 -F2 1 -D3 1 -F3 1 -D4 1 -F4 1 -D5 1 -F5 1 -C6 1 -E6 1 -C8 1 -E8 1 -C3 1 -E3 1 -DE 1 -DB 1 -FB 1 -DD 1 -FD 1 -DF 1 -D9 1 -F9 1 -D8 1 -F8 1 -DC 1 -FC 1 -C0 1 -E0 1 -D1 1 -F1 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A5 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B5 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BE 1 -BF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES latin1; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET latin1 COLLATE latin1_bin) ENGINE=NDB CHARACTER SET latin1 COLLATE latin1_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # latin1_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -E6 1 -E7 1 -E8 1 -E9 1 -EA 1 -EB 1 -EC 1 -ED 1 -EE 1 -EF 1 -F0 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES latin1; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET latin1 COLLATE latin1_danish_ci) ENGINE=NDB CHARACTER SET latin1 COLLATE latin1_danish_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # latin1_danish_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -C0 1 -C1 1 -C2 1 -C3 1 -E0 1 -E1 1 -E2 1 -E3 1 -42 1 -62 1 -43 1 -63 1 -C7 1 -E7 1 -44 1 -64 1 -D0 1 -F0 1 -45 1 -65 1 -C8 1 -C9 1 -CA 1 -CB 1 -E8 1 -E9 1 -EA 1 -EB 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -CC 1 -CD 1 -CE 1 -CF 1 -EC 1 -ED 1 -EE 1 -EF 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -4D 1 -6D 1 -4E 1 -6E 1 -D1 1 -F1 1 -4F 1 -6F 1 -D2 1 -D3 1 -D4 1 -D5 1 -F2 1 -F3 1 -F4 1 -F5 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -53 1 -73 1 -54 1 -74 1 -55 1 -75 1 -D9 1 -DA 1 -DB 1 -F9 1 -FA 1 -FB 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -DC 1 -DD 1 -FC 1 -FD 1 -5A 1 -7A 1 -5B 1 -C4 1 -C6 1 -E4 1 -E6 1 -5C 1 -D6 1 -D8 1 -F6 1 -F8 1 -5D 1 -C5 1 -E5 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -D7 1 -DE 1 -DF 1 -F7 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES latin1; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET latin1 COLLATE latin1_general_ci) ENGINE=NDB CHARACTER SET latin1 COLLATE latin1_general_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # latin1_general_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -C0 1 -E0 1 -C1 1 -E1 1 -C2 1 -E2 1 -C3 1 -E3 1 -C4 1 -E4 1 -C5 1 -E5 1 -C6 1 -E6 1 -42 1 -62 1 -43 1 -63 1 -C7 1 -E7 1 -44 1 -64 1 -D0 1 -F0 1 -45 1 -65 1 -C8 1 -E8 1 -C9 1 -E9 1 -CA 1 -EA 1 -CB 1 -EB 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -CC 1 -EC 1 -CD 1 -ED 1 -CE 1 -EE 1 -CF 1 -EF 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -4D 1 -6D 1 -4E 1 -6E 1 -D1 1 -F1 1 -4F 1 -6F 1 -D2 1 -F2 1 -D3 1 -F3 1 -D4 1 -F4 1 -D5 1 -F5 1 -D6 1 -F6 1 -D8 1 -F8 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -53 1 -73 1 -DF 1 -54 1 -74 1 -55 1 -75 1 -D9 1 -F9 1 -DA 1 -FA 1 -DB 1 -FB 1 -DC 1 -FC 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -DD 1 -FD 1 -5A 1 -7A 1 -DE 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -D7 1 -F7 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES latin1; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET latin1 COLLATE latin1_general_cs) ENGINE=NDB CHARACTER SET latin1 COLLATE latin1_general_cs; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # latin1_general_cs # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -C0 1 -E0 1 -C1 1 -E1 1 -C2 1 -E2 1 -C3 1 -E3 1 -C4 1 -E4 1 -C5 1 -E5 1 -C6 1 -E6 1 -42 1 -62 1 -43 1 -63 1 -C7 1 -E7 1 -44 1 -64 1 -D0 1 -F0 1 -45 1 -65 1 -C8 1 -E8 1 -C9 1 -E9 1 -CA 1 -EA 1 -CB 1 -EB 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -CC 1 -EC 1 -CD 1 -ED 1 -CE 1 -EE 1 -CF 1 -EF 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -4D 1 -6D 1 -4E 1 -6E 1 -D1 1 -F1 1 -4F 1 -6F 1 -D2 1 -F2 1 -D3 1 -F3 1 -D4 1 -F4 1 -D5 1 -F5 1 -D6 1 -F6 1 -D8 1 -F8 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -53 1 -73 1 -DF 1 -54 1 -74 1 -55 1 -75 1 -D9 1 -F9 1 -DA 1 -FA 1 -DB 1 -FB 1 -DC 1 -FC 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -DD 1 -FD 1 -5A 1 -7A 1 -DE 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -D7 1 -F7 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES latin1; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET latin1 COLLATE latin1_german1_ci) ENGINE=NDB CHARACTER SET latin1 COLLATE latin1_german1_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # latin1_german1_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -E6 1 -42 1 -62 1 -43 1 -63 1 -C7 1 -E7 1 -44 1 -64 1 -45 1 -65 1 -C8 1 -C9 1 -CA 1 -CB 1 -E8 1 -E9 1 -EA 1 -EB 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -CC 1 -CD 1 -CE 1 -CF 1 -EC 1 -ED 1 -EE 1 -EF 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -4D 1 -6D 1 -4E 1 -6E 1 -D1 1 -F1 1 -4F 1 -6F 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D8 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F8 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -53 1 -73 1 -DF 1 -54 1 -74 1 -55 1 -75 1 -D9 1 -DA 1 -DB 1 -DC 1 -F9 1 -FA 1 -FB 1 -FC 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -DD 1 -FD 1 -5A 1 -7A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -D0 1 -F0 1 -D7 1 -DE 1 -F7 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES latin1; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET latin1 COLLATE latin1_german2_ci) ENGINE=NDB CHARACTER SET latin1 COLLATE latin1_german2_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # latin1_german2_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -C0 1 -C1 1 -C2 1 -C3 1 -C5 1 -E0 1 -E1 1 -E2 1 -E3 1 -E5 1 -C4 1 -E4 1 -42 1 -62 1 -43 1 -63 1 -C7 1 -E7 1 -44 1 -64 1 -D0 1 -F0 1 -45 1 -65 1 -C8 1 -C9 1 -CA 1 -CB 1 -E8 1 -E9 1 -EA 1 -EB 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -CC 1 -CD 1 -CE 1 -CF 1 -EC 1 -ED 1 -EE 1 -EF 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -4D 1 -6D 1 -4E 1 -6E 1 -D1 1 -F1 1 -4F 1 -6F 1 -D2 1 -D3 1 -D4 1 -D5 1 -F2 1 -F3 1 -F4 1 -F5 1 -D6 1 -F6 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -53 1 -73 1 -DF 1 -54 1 -74 1 -55 1 -75 1 -D9 1 -DA 1 -DB 1 -F9 1 -FA 1 -FB 1 -DC 1 -FC 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -DD 1 -FD 1 -5A 1 -7A 1 -5B 1 -5C 1 -C6 1 -E6 1 -5D 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -D7 1 -D8 1 -F8 1 -DE 1 -F7 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES latin1; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET latin1 COLLATE latin1_spanish_ci) ENGINE=NDB CHARACTER SET latin1 COLLATE latin1_spanish_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # latin1_spanish_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -E6 1 -42 1 -62 1 -43 1 -63 1 -C7 1 -E7 1 -44 1 -64 1 -D0 1 -F0 1 -45 1 -65 1 -C8 1 -C9 1 -CA 1 -CB 1 -E8 1 -E9 1 -EA 1 -EB 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -CC 1 -CD 1 -CE 1 -CF 1 -EC 1 -ED 1 -EE 1 -EF 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -4D 1 -6D 1 -4E 1 -6E 1 -D1 1 -F1 1 -4F 1 -6F 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D8 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F8 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -53 1 -73 1 -DF 1 -54 1 -74 1 -55 1 -75 1 -D9 1 -DA 1 -DB 1 -DC 1 -F9 1 -FA 1 -FB 1 -FC 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -DD 1 -FD 1 -5A 1 -7A 1 -DE 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -D7 1 -F7 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES latin1; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET latin1 COLLATE latin1_swedish_ci) ENGINE=NDB CHARACTER SET latin1 COLLATE latin1_swedish_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # latin1_swedish_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -C0 1 -C1 1 -C2 1 -C3 1 -E0 1 -E1 1 -E2 1 -E3 1 -42 1 -62 1 -43 1 -63 1 -C7 1 -E7 1 -44 1 -64 1 -D0 1 -F0 1 -45 1 -65 1 -C8 1 -C9 1 -CA 1 -CB 1 -E8 1 -E9 1 -EA 1 -EB 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -CC 1 -CD 1 -CE 1 -CF 1 -EC 1 -ED 1 -EE 1 -EF 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -4D 1 -6D 1 -4E 1 -6E 1 -D1 1 -F1 1 -4F 1 -6F 1 -D2 1 -D3 1 -D4 1 -D5 1 -F2 1 -F3 1 -F4 1 -F5 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -53 1 -73 1 -54 1 -74 1 -55 1 -75 1 -D9 1 -DA 1 -DB 1 -F9 1 -FA 1 -FB 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -DC 1 -DD 1 -FC 1 -FD 1 -5A 1 -7A 1 -5B 1 -C5 1 -E5 1 -5C 1 -C4 1 -C6 1 -E4 1 -E6 1 -5D 1 -D6 1 -F6 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -D7 1 -D8 1 -F8 1 -DE 1 -DF 1 -F7 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES latin2; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET latin2 COLLATE latin2_bin) ENGINE=NDB CHARACTER SET latin2 COLLATE latin2_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # latin2_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -E6 1 -E7 1 -E8 1 -E9 1 -EA 1 -EB 1 -EC 1 -ED 1 -EE 1 -EF 1 -F0 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES latin2; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET latin2 COLLATE latin2_croatian_ci) ENGINE=NDB CHARACTER SET latin2 COLLATE latin2_croatian_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # latin2_croatian_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -A1 1 -B1 1 -C1 1 -C2 1 -C3 1 -C4 1 -E1 1 -E2 1 -E3 1 -E4 1 -42 1 -62 1 -43 1 -63 1 -C7 1 -E7 1 -C8 1 -E8 1 -C6 1 -E6 1 -44 1 -64 1 -CF 1 -EF 1 -D0 1 -F0 1 -45 1 -65 1 -C9 1 -CA 1 -CB 1 -CC 1 -E9 1 -EA 1 -EB 1 -EC 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -CD 1 -CE 1 -ED 1 -EE 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -A3 1 -A5 1 -B3 1 -B5 1 -C5 1 -E5 1 -4D 1 -6D 1 -4E 1 -6E 1 -D1 1 -D2 1 -F1 1 -F2 1 -4F 1 -6F 1 -D3 1 -D4 1 -D5 1 -D6 1 -F3 1 -F4 1 -F5 1 -F6 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -C0 1 -D8 1 -E0 1 -F8 1 -53 1 -73 1 -A6 1 -AA 1 -B6 1 -BA 1 -DF 1 -A9 1 -B9 1 -54 1 -74 1 -AB 1 -BB 1 -DE 1 -55 1 -75 1 -D9 1 -DA 1 -DB 1 -DC 1 -F9 1 -FA 1 -FB 1 -FC 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -DD 1 -FD 1 -5A 1 -7A 1 -AC 1 -AF 1 -BC 1 -BF 1 -AE 1 -BE 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A2 1 -A4 1 -A7 1 -A8 1 -AD 1 -B0 1 -B2 1 -B4 1 -B7 1 -B8 1 -BD 1 -D7 1 -F7 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES latin2; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET latin2 COLLATE latin2_czech_cs) ENGINE=NDB CHARACTER SET latin2 COLLATE latin2_czech_cs; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # latin2_czech_cs # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -2E 1 -2C 1 -3B 1 -3F 1 -21 1 -3A 1 -22 1 -60 1 -27 1 -2F 1 -7C 1 -5C 1 -28 1 -29 1 -5B 1 -5D 1 -3C 1 -3E 1 -7B 1 -7D 1 -40 1 -26 1 -25 1 -23 1 -5E 1 -5F 1 -7E 1 -3D 1 -2B 1 -2A 1 -2D 1 -D7 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -24 1 -7F 1 -A0 1 -A2 1 -A4 1 -A7 1 -A8 1 -AD 1 -B0 1 -B2 1 -B4 1 -B7 1 -B8 1 -BD 1 -DF 1 -F7 1 -61 1 -41 1 -E1 1 -C1 1 -E2 1 -C2 1 -E4 1 -C4 1 -E3 1 -C3 1 -B1 1 -A1 1 -62 1 -42 1 -63 1 -43 1 -E8 1 -C8 1 -E6 1 -C6 1 -E7 1 -C7 1 -64 1 -44 1 -EF 1 -CF 1 -F0 1 -D0 1 -65 1 -45 1 -E9 1 -C9 1 -EC 1 -CC 1 -EB 1 -CB 1 -EA 1 -CA 1 -66 1 -46 1 -67 1 -47 1 -68 1 -48 1 -69 1 -49 1 -ED 1 -CD 1 -EE 1 -CE 1 -6A 1 -4A 1 -6B 1 -4B 1 -6C 1 -4C 1 -E5 1 -C5 1 -B5 1 -A5 1 -B3 1 -A3 1 -6D 1 -4D 1 -6E 1 -4E 1 -F2 1 -D2 1 -F1 1 -D1 1 -6F 1 -4F 1 -F3 1 -D3 1 -F4 1 -D4 1 -F6 1 -D6 1 -F5 1 -D5 1 -70 1 -50 1 -71 1 -51 1 -72 1 -52 1 -E0 1 -C0 1 -F8 1 -D8 1 -73 1 -53 1 -B9 1 -A9 1 -B6 1 -A6 1 -BA 1 -AA 1 -74 1 -54 1 -BB 1 -AB 1 -DE 1 -75 1 -55 1 -FA 1 -DA 1 -F9 1 -D9 1 -FC 1 -DC 1 -FB 1 -DB 1 -76 1 -56 1 -77 1 -57 1 -78 1 -58 1 -79 1 -59 1 -FD 1 -DD 1 -7A 1 -5A 1 -BE 1 -AE 1 -BC 1 -AC 1 -BF 1 -AF 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES latin2; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET latin2 COLLATE latin2_general_ci) ENGINE=NDB CHARACTER SET latin2 COLLATE latin2_general_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # latin2_general_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -A1 1 -B1 1 -C1 1 -C2 1 -C3 1 -C4 1 -E1 1 -E2 1 -E3 1 -E4 1 -42 1 -62 1 -43 1 -63 1 -C7 1 -E7 1 -C6 1 -E6 1 -C8 1 -E8 1 -44 1 -64 1 -CF 1 -EF 1 -45 1 -65 1 -C9 1 -CB 1 -CC 1 -E9 1 -EB 1 -EC 1 -CA 1 -EA 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -CD 1 -CE 1 -ED 1 -EE 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -A5 1 -B5 1 -C5 1 -E5 1 -A3 1 -B3 1 -4D 1 -6D 1 -4E 1 -6E 1 -D2 1 -F2 1 -D1 1 -F1 1 -4F 1 -6F 1 -D4 1 -D5 1 -D6 1 -F4 1 -F5 1 -F6 1 -D3 1 -F3 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -C0 1 -D8 1 -E0 1 -F8 1 -53 1 -73 1 -AA 1 -BA 1 -A6 1 -B6 1 -A9 1 -B9 1 -54 1 -74 1 -AB 1 -BB 1 -DE 1 -55 1 -75 1 -D9 1 -DA 1 -DB 1 -DC 1 -F9 1 -FA 1 -FB 1 -FC 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -DD 1 -FD 1 -5A 1 -7A 1 -AC 1 -BC 1 -AF 1 -BF 1 -AE 1 -BE 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A2 1 -A4 1 -A7 1 -A8 1 -AD 1 -B0 1 -B2 1 -B4 1 -B7 1 -B8 1 -BD 1 -D0 1 -D7 1 -DF 1 -F0 1 -F7 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES latin2; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET latin2 COLLATE latin2_hungarian_ci) ENGINE=NDB CHARACTER SET latin2 COLLATE latin2_hungarian_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # latin2_hungarian_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -7F 1 -80 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8E 1 -91 1 -92 1 -9B 1 -9C 1 -9D 1 -9E 1 -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -8F 1 -A0 1 -B5 1 -C1 1 -E1 1 -B1 1 -C2 1 -E2 1 -C3 1 -E3 1 -C4 1 -E4 1 -42 1 -62 1 -43 1 -63 1 -C6 1 -E6 1 -C8 1 -E8 1 -C7 1 -E7 1 -44 1 -64 1 -CF 1 -EF 1 -45 1 -65 1 -82 1 -90 1 -C9 1 -E9 1 -CC 1 -EC 1 -CA 1 -EA 1 -CB 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -8C 1 -8D 1 -A1 1 -CD 1 -ED 1 -CE 1 -EE 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -B3 1 -A4 1 -C5 1 -E5 1 -4D 1 -6D 1 -4E 1 -6E 1 -D1 1 -F1 1 -D2 1 -F2 1 -4F 1 -6F 1 -95 1 -A2 1 -D3 1 -E0 1 -F3 1 -D4 1 -F4 1 -8A 1 -8B 1 -93 1 -94 1 -99 1 -A7 1 -D5 1 -D6 1 -F5 1 -F6 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -C0 1 -D8 1 -F8 1 -53 1 -73 1 -A5 1 -B6 1 -A9 1 -B9 1 -AA 1 -BA 1 -54 1 -74 1 -AB 1 -BB 1 -DE 1 -55 1 -75 1 -97 1 -A3 1 -DA 1 -FA 1 -D9 1 -F9 1 -81 1 -96 1 -98 1 -9A 1 -DB 1 -DC 1 -EB 1 -FB 1 -FC 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -DD 1 -FD 1 -5A 1 -7A 1 -AC 1 -BC 1 -AE 1 -BE 1 -AF 1 -BF 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -9F 1 -A6 1 -A8 1 -AD 1 -B0 1 -B2 1 -B4 1 -B7 1 -B8 1 -BD 1 -D0 1 -D7 1 -DF 1 -F0 1 -F7 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES latin5; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET latin5 COLLATE latin5_bin) ENGINE=NDB CHARACTER SET latin5 COLLATE latin5_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # latin5_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -E6 1 -E7 1 -E8 1 -E9 1 -EA 1 -EB 1 -EC 1 -ED 1 -EE 1 -EF 1 -F0 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES latin5; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET latin5 COLLATE latin5_turkish_ci) ENGINE=NDB CHARACTER SET latin5 COLLATE latin5_turkish_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # latin5_turkish_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -E6 1 -42 1 -62 1 -43 1 -63 1 -C7 1 -E7 1 -44 1 -64 1 -45 1 -65 1 -C8 1 -C9 1 -CA 1 -CB 1 -E8 1 -E9 1 -EA 1 -EB 1 -46 1 -66 1 -47 1 -67 1 -D0 1 -F0 1 -48 1 -68 1 -49 1 -FD 1 -69 1 -CC 1 -CD 1 -CE 1 -CF 1 -DD 1 -EC 1 -ED 1 -EE 1 -EF 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -4D 1 -6D 1 -4E 1 -6E 1 -D1 1 -F1 1 -4F 1 -6F 1 -D2 1 -D3 1 -D4 1 -D5 1 -D8 1 -F2 1 -F3 1 -F4 1 -F5 1 -F8 1 -D6 1 -F6 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -53 1 -73 1 -DF 1 -DE 1 -54 1 -74 1 -55 1 -75 1 -D9 1 -DA 1 -DB 1 -F9 1 -FA 1 -FB 1 -DC 1 -FC 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -5A 1 -7A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -D7 1 -F7 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES latin7; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET latin7 COLLATE latin7_bin) ENGINE=NDB CHARACTER SET latin7 COLLATE latin7_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # latin7_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -E6 1 -E7 1 -E8 1 -E9 1 -EA 1 -EB 1 -EC 1 -ED 1 -EE 1 -EF 1 -F0 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES latin7; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET latin7 COLLATE latin7_estonian_cs) ENGINE=NDB CHARACTER SET latin7 COLLATE latin7_estonian_cs; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # latin7_estonian_cs # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -80 1 -7F 1 -81 1 -83 1 -88 1 -8A 1 -8C 1 -90 1 -98 1 -9A 1 -9C 1 -9F 1 -27 1 -2D 1 -AD 1 -96 1 -97 1 -A0 1 -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -28 1 -29 1 -2A 1 -2C 1 -2E 1 -2F 1 -3A 1 -3B 1 -3F 1 -40 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -A6 1 -8D 1 -9D 1 -B4 1 -8F 1 -8E 1 -9E 1 -91 1 -92 1 -82 1 -93 1 -94 1 -84 1 -8B 1 -9B 1 -2B 1 -3C 1 -3D 1 -3E 1 -B1 1 -AB 1 -BB 1 -D7 1 -F7 1 -A2 1 -A3 1 -A4 1 -A7 1 -A9 1 -AC 1 -AE 1 -B0 1 -B5 1 -B6 1 -B7 1 -86 1 -87 1 -95 1 -85 1 -89 1 -30 1 -BC 1 -BD 1 -BE 1 -31 1 -B9 1 -32 1 -B2 1 -33 1 -B3 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -41 1 -61 1 -C2 1 -E2 1 -C5 1 -E5 1 -C0 1 -E0 1 -AF 1 -BF 1 -42 1 -62 1 -43 1 -63 1 -C3 1 -E3 1 -C8 1 -E8 1 -44 1 -64 1 -45 1 -65 1 -C9 1 -E9 1 -CB 1 -EB 1 -C7 1 -E7 1 -C6 1 -E6 1 -46 1 -66 1 -47 1 -67 1 -CC 1 -EC 1 -48 1 -68 1 -49 1 -69 1 -CE 1 -EE 1 -C1 1 -E1 1 -4A 1 -6A 1 -4B 1 -6B 1 -CD 1 -ED 1 -4C 1 -6C 1 -CF 1 -EF 1 -D9 1 -F9 1 -4D 1 -6D 1 -4E 1 -6E 1 -D1 1 -F1 1 -D2 1 -F2 1 -4F 1 -6F 1 -D3 1 -F3 1 -D4 1 -F4 1 -A8 1 -B8 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -AA 1 -BA 1 -53 1 -73 1 -DA 1 -FA 1 -DF 1 -D0 1 -F0 1 -5A 1 -7A 1 -CA 1 -EA 1 -DD 1 -FD 1 -DE 1 -54 1 -74 1 -99 1 -55 1 -75 1 -DB 1 -FB 1 -D8 1 -F8 1 -56 1 -76 1 -57 1 -77 1 -D5 1 -F5 1 -C4 1 -E4 1 -D6 1 -F6 1 -DC 1 -FC 1 -58 1 -78 1 -59 1 -79 1 -A1 1 -A5 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES latin7; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET latin7 COLLATE latin7_general_ci) ENGINE=NDB CHARACTER SET latin7 COLLATE latin7_general_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # latin7_general_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -7F 1 -81 1 -83 1 -88 1 -8A 1 -8C 1 -90 1 -98 1 -9A 1 -9C 1 -9F 1 -27 1 -2D 1 -A8 1 -AD 1 -96 1 -97 1 -A0 1 -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -28 1 -29 1 -2A 1 -2C 1 -2E 1 -2F 1 -3A 1 -3B 1 -3F 1 -40 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -A6 1 -8D 1 -9D 1 -B4 1 -8F 1 -8E 1 -9E 1 -91 1 -92 1 -82 1 -93 1 -94 1 -84 1 -8B 1 -9B 1 -2B 1 -3C 1 -3D 1 -3E 1 -B1 1 -AB 1 -BB 1 -D7 1 -F7 1 -A2 1 -A3 1 -A4 1 -A7 1 -A9 1 -AC 1 -AE 1 -B0 1 -B5 1 -B6 1 -B7 1 -86 1 -87 1 -95 1 -85 1 -89 1 -80 1 -30 1 -BC 1 -BD 1 -BE 1 -31 1 -B9 1 -32 1 -B2 1 -33 1 -B3 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -41 1 -61 1 -C4 1 -E4 1 -C2 1 -E2 1 -C5 1 -E5 1 -C0 1 -E0 1 -AF 1 -BF 1 -42 1 -62 1 -43 1 -63 1 -C3 1 -E3 1 -C8 1 -E8 1 -44 1 -64 1 -45 1 -65 1 -C9 1 -E9 1 -CB 1 -EB 1 -C7 1 -E7 1 -C6 1 -E6 1 -46 1 -66 1 -47 1 -67 1 -CC 1 -EC 1 -48 1 -68 1 -49 1 -69 1 -CE 1 -EE 1 -C1 1 -E1 1 -4A 1 -6A 1 -4B 1 -6B 1 -CD 1 -ED 1 -4C 1 -6C 1 -D9 1 -F9 1 -CF 1 -EF 1 -4D 1 -6D 1 -4E 1 -6E 1 -D1 1 -F1 1 -D2 1 -F2 1 -4F 1 -6F 1 -D3 1 -F3 1 -D6 1 -F6 1 -D4 1 -F4 1 -D5 1 -F5 1 -B8 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -AA 1 -BA 1 -53 1 -73 1 -DA 1 -FA 1 -DF 1 -D0 1 -F0 1 -74 1 -54 1 -99 1 -55 1 -75 1 -DC 1 -FC 1 -DB 1 -FB 1 -D8 1 -F8 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -5A 1 -7A 1 -CA 1 -EA 1 -DD 1 -FD 1 -DE 1 -A1 1 -A5 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES latin7; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET latin7 COLLATE latin7_general_cs) ENGINE=NDB CHARACTER SET latin7 COLLATE latin7_general_cs; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # latin7_general_cs # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -7F 1 -81 1 -83 1 -88 1 -8A 1 -8C 1 -90 1 -98 1 -9A 1 -9C 1 -9F 1 -27 1 -2D 1 -AD 1 -96 1 -97 1 -A0 1 -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -28 1 -29 1 -2A 1 -2C 1 -2E 1 -2F 1 -3A 1 -3B 1 -3F 1 -40 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -A6 1 -8D 1 -9D 1 -B4 1 -8F 1 -8E 1 -9E 1 -91 1 -92 1 -82 1 -93 1 -94 1 -84 1 -8B 1 -9B 1 -2B 1 -3C 1 -3D 1 -3E 1 -B1 1 -AB 1 -BB 1 -D7 1 -F7 1 -A2 1 -A3 1 -A4 1 -A7 1 -A9 1 -AC 1 -AE 1 -B0 1 -B5 1 -B6 1 -B7 1 -86 1 -87 1 -95 1 -85 1 -89 1 -80 1 -30 1 -BC 1 -BD 1 -BE 1 -31 1 -B9 1 -32 1 -B2 1 -33 1 -B3 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -41 1 -61 1 -C4 1 -E4 1 -C2 1 -E2 1 -C5 1 -E5 1 -C0 1 -E0 1 -AF 1 -BF 1 -42 1 -62 1 -43 1 -63 1 -C3 1 -E3 1 -C8 1 -E8 1 -44 1 -64 1 -45 1 -65 1 -C9 1 -E9 1 -CB 1 -EB 1 -C7 1 -E7 1 -C6 1 -E6 1 -46 1 -66 1 -47 1 -67 1 -CC 1 -EC 1 -48 1 -68 1 -49 1 -69 1 -CE 1 -EE 1 -C1 1 -E1 1 -4A 1 -6A 1 -4B 1 -6B 1 -CD 1 -ED 1 -4C 1 -6C 1 -D9 1 -F9 1 -CF 1 -EF 1 -4D 1 -6D 1 -4E 1 -6E 1 -D1 1 -F1 1 -D2 1 -F2 1 -4F 1 -6F 1 -D3 1 -F3 1 -D6 1 -F6 1 -D4 1 -F4 1 -D5 1 -F5 1 -B8 1 -A8 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -AA 1 -BA 1 -53 1 -73 1 -DA 1 -FA 1 -DF 1 -D0 1 -F0 1 -54 1 -74 1 -99 1 -55 1 -75 1 -DC 1 -FC 1 -DB 1 -FB 1 -D8 1 -F8 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -5A 1 -7A 1 -CA 1 -EA 1 -DD 1 -FD 1 -DE 1 -A1 1 -A5 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES macce; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET macce COLLATE macce_bin) ENGINE=NDB CHARACTER SET macce COLLATE macce_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # macce_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -E6 1 -E7 1 -E8 1 -E9 1 -EA 1 -EB 1 -EC 1 -ED 1 -EE 1 -EF 1 -F0 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES macce; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET macce COLLATE macce_general_ci) ENGINE=NDB CHARACTER SET macce COLLATE macce_general_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # macce_general_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -80 1 -81 1 -82 1 -84 1 -87 1 -88 1 -8A 1 -E7 1 -42 1 -62 1 -43 1 -63 1 -89 1 -8B 1 -8C 1 -8D 1 -44 1 -64 1 -91 1 -93 1 -45 1 -65 1 -83 1 -8E 1 -94 1 -95 1 -96 1 -98 1 -9D 1 -9E 1 -A2 1 -AB 1 -46 1 -66 1 -47 1 -67 1 -AE 1 -48 1 -68 1 -49 1 -69 1 -92 1 -AF 1 -B0 1 -B1 1 -B4 1 -EA 1 -4A 1 -6A 1 -4B 1 -6B 1 -B5 1 -FA 1 -4C 1 -6C 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -FC 1 -4D 1 -4E 1 -6D 1 -6E 1 -BF 1 -C0 1 -C1 1 -C4 1 -C5 1 -CB 1 -4F 1 -6F 1 -85 1 -97 1 -99 1 -9A 1 -9B 1 -CC 1 -CD 1 -CE 1 -CF 1 -D8 1 -EE 1 -EF 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -D9 1 -DA 1 -DB 1 -DE 1 -DF 1 -E0 1 -53 1 -73 1 -A7 1 -E1 1 -E4 1 -E5 1 -E6 1 -54 1 -74 1 -E8 1 -E9 1 -55 1 -75 1 -86 1 -9C 1 -9F 1 -ED 1 -F0 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -F8 1 -F9 1 -5A 1 -7A 1 -8F 1 -90 1 -EB 1 -EC 1 -FB 1 -FD 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -A0 1 -A1 1 -A3 1 -A4 1 -A5 1 -A6 1 -A8 1 -A9 1 -AA 1 -AC 1 -AD 1 -B2 1 -B3 1 -B6 1 -B7 1 -C2 1 -C3 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -DC 1 -DD 1 -E2 1 -E3 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES macroman; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET macroman COLLATE macroman_bin) ENGINE=NDB CHARACTER SET macroman COLLATE macroman_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # macroman_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -E6 1 -E7 1 -E8 1 -E9 1 -EA 1 -EB 1 -EC 1 -ED 1 -EE 1 -EF 1 -F0 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES macroman; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET macroman COLLATE macroman_general_ci) ENGINE=NDB CHARACTER SET macroman COLLATE macroman_general_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # macroman_general_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -80 1 -81 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -CB 1 -CC 1 -E5 1 -E7 1 -AE 1 -BE 1 -42 1 -62 1 -43 1 -63 1 -82 1 -8D 1 -44 1 -64 1 -45 1 -65 1 -83 1 -8E 1 -8F 1 -90 1 -91 1 -E6 1 -E8 1 -E9 1 -46 1 -66 1 -C4 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -92 1 -93 1 -94 1 -95 1 -EA 1 -EB 1 -EC 1 -ED 1 -F5 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -4D 1 -6D 1 -4E 1 -6E 1 -84 1 -96 1 -4F 1 -6F 1 -85 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -AF 1 -BF 1 -CD 1 -EE 1 -EF 1 -F1 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -53 1 -73 1 -A7 1 -54 1 -74 1 -55 1 -75 1 -86 1 -9C 1 -9D 1 -9E 1 -9F 1 -F2 1 -F3 1 -F4 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -D8 1 -D9 1 -5A 1 -7A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -C0 1 -C1 1 -C2 1 -C3 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -F0 1 -F6 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES sjis; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET sjis COLLATE sjis_bin) ENGINE=NDB CHARACTER SET sjis COLLATE sjis_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # sjis_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES sjis; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET sjis COLLATE sjis_japanese_ci) ENGINE=NDB CHARACTER SET sjis COLLATE sjis_japanese_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # sjis_japanese_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -42 1 -62 1 -43 1 -63 1 -44 1 -64 1 -45 1 -65 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -4D 1 -6D 1 -4E 1 -6E 1 -4F 1 -6F 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -53 1 -73 1 -54 1 -74 1 -55 1 -75 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -5A 1 -7A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES swe7; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET swe7 COLLATE swe7_bin) ENGINE=NDB CHARACTER SET swe7 COLLATE swe7_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # swe7_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -E6 1 -E7 1 -E8 1 -E9 1 -EA 1 -EB 1 -EC 1 -ED 1 -EE 1 -EF 1 -F0 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES swe7; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET swe7 COLLATE swe7_swedish_ci) ENGINE=NDB CHARACTER SET swe7 COLLATE swe7_swedish_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # swe7_swedish_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -41 1 -61 1 -42 1 -62 1 -43 1 -63 1 -44 1 -64 1 -40 1 -45 1 -60 1 -65 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -4D 1 -6D 1 -4E 1 -6E 1 -4F 1 -6F 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -53 1 -73 1 -54 1 -74 1 -55 1 -75 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -5E 1 -79 1 -7E 1 -5A 1 -7A 1 -5D 1 -7D 1 -5B 1 -7B 1 -5C 1 -7C 1 -5F 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -E6 1 -E7 1 -E8 1 -E9 1 -EA 1 -EB 1 -EC 1 -ED 1 -EE 1 -EF 1 -F0 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES tis620; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET tis620 COLLATE tis620_bin) ENGINE=NDB CHARACTER SET tis620 COLLATE tis620_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # tis620_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -E6 1 -E7 1 -E8 1 -E9 1 -EA 1 -EB 1 -EC 1 -ED 1 -EE 1 -EF 1 -F0 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES tis620; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET tis620 COLLATE tis620_thai_ci) ENGINE=NDB CHARACTER SET tis620 COLLATE tis620_thai_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # tis620_thai_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -41 1 -61 1 -42 1 -62 1 -43 1 -63 1 -44 1 -64 1 -45 1 -65 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -4D 1 -6D 1 -4E 1 -6E 1 -4F 1 -6F 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -53 1 -73 1 -54 1 -74 1 -55 1 -75 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -5A 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -E6 1 -ED 1 -EE 1 -EF 1 -F0 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F8 1 -EC 1 -F9 1 -E7 1 -FA 1 -E8 1 -FB 1 -E9 1 -FC 1 -EA 1 -FD 1 -EB 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES ujis; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET ujis COLLATE ujis_bin) ENGINE=NDB CHARACTER SET ujis COLLATE ujis_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # ujis_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES ujis; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET ujis COLLATE ujis_japanese_ci) ENGINE=NDB CHARACTER SET ujis COLLATE ujis_japanese_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # ujis_japanese_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -42 1 -62 1 -43 1 -63 1 -44 1 -64 1 -45 1 -65 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -4D 1 -6D 1 -4E 1 -6E 1 -4F 1 -6F 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -53 1 -73 1 -54 1 -74 1 -55 1 -75 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -5A 1 -7A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -SET NAMES utf8; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=NDB CHARACTER SET utf8; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_general_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_bin; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -E6 1 -E7 1 -E8 1 -E9 1 -EA 1 -EB 1 -EC 1 -ED 1 -EE 1 -EF 1 -F0 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -FE 1 -FF 1 -100 1 -101 1 -102 1 -103 1 -104 1 -105 1 -106 1 -107 1 -108 1 -109 1 -10A 1 -10B 1 -10C 1 -10D 1 -10E 1 -10F 1 -110 1 -111 1 -112 1 -113 1 -114 1 -115 1 -116 1 -117 1 -118 1 -119 1 -11A 1 -11B 1 -11C 1 -11D 1 -11E 1 -11F 1 -120 1 -121 1 -122 1 -123 1 -124 1 -125 1 -126 1 -127 1 -128 1 -129 1 -12A 1 -12B 1 -12C 1 -12D 1 -12E 1 -12F 1 -130 1 -131 1 -132 1 -133 1 -134 1 -135 1 -136 1 -137 1 -138 1 -139 1 -13A 1 -13B 1 -13C 1 -13D 1 -13E 1 -13F 1 -140 1 -141 1 -142 1 -143 1 -144 1 -145 1 -146 1 -147 1 -148 1 -149 1 -14A 1 -14B 1 -14C 1 -14D 1 -14E 1 -14F 1 -150 1 -151 1 -152 1 -153 1 -154 1 -155 1 -156 1 -157 1 -158 1 -159 1 -15A 1 -15B 1 -15C 1 -15D 1 -15E 1 -15F 1 -160 1 -161 1 -162 1 -163 1 -164 1 -165 1 -166 1 -167 1 -168 1 -169 1 -16A 1 -16B 1 -16C 1 -16D 1 -16E 1 -16F 1 -170 1 -171 1 -172 1 -173 1 -174 1 -175 1 -176 1 -177 1 -178 1 -179 1 -17A 1 -17B 1 -17C 1 -17D 1 -17E 1 -17F 1 -180 1 -181 1 -182 1 -183 1 -184 1 -185 1 -186 1 -187 1 -188 1 -189 1 -18A 1 -18B 1 -18C 1 -18D 1 -18E 1 -18F 1 -190 1 -191 1 -192 1 -193 1 -194 1 -195 1 -196 1 -197 1 -198 1 -199 1 -19A 1 -19B 1 -19C 1 -19D 1 -19E 1 -19F 1 -1A0 1 -1A1 1 -1A2 1 -1A3 1 -1A4 1 -1A5 1 -1A6 1 -1A7 1 -1A8 1 -1A9 1 -1AA 1 -1AB 1 -1AC 1 -1AD 1 -1AE 1 -1AF 1 -1B0 1 -1B1 1 -1B2 1 -1B3 1 -1B4 1 -1B5 1 -1B6 1 -1B7 1 -1B8 1 -1B9 1 -1BA 1 -1BB 1 -1BC 1 -1BD 1 -1BE 1 -1BF 1 -1C0 1 -1C1 1 -1C2 1 -1C3 1 -1C4 1 -1C5 1 -1C6 1 -1C7 1 -1C8 1 -1C9 1 -1CA 1 -1CB 1 -1CC 1 -1CD 1 -1CE 1 -1CF 1 -1D0 1 -1D1 1 -1D2 1 -1D3 1 -1D4 1 -1D5 1 -1D6 1 -1D7 1 -1D8 1 -1D9 1 -1DA 1 -1DB 1 -1DC 1 -1DD 1 -1DE 1 -1DF 1 -1E0 1 -1E1 1 -1E2 1 -1E3 1 -1E4 1 -1E5 1 -1E6 1 -1E7 1 -1E8 1 -1E9 1 -1EA 1 -1EB 1 -1EC 1 -1ED 1 -1EE 1 -1EF 1 -1F0 1 -1F1 1 -1F2 1 -1F3 1 -1F4 1 -1F5 1 -1F6 1 -1F7 1 -1F8 1 -1F9 1 -1FA 1 -1FB 1 -1FC 1 -1FD 1 -1FE 1 -1FF 1 -200 1 -201 1 -202 1 -203 1 -204 1 -205 1 -206 1 -207 1 -208 1 -209 1 -20A 1 -20B 1 -20C 1 -20D 1 -20E 1 -20F 1 -210 1 -211 1 -212 1 -213 1 -214 1 -215 1 -216 1 -217 1 -218 1 -219 1 -21A 1 -21B 1 -21C 1 -21D 1 -21E 1 -21F 1 -220 1 -221 1 -222 1 -223 1 -224 1 -225 1 -226 1 -227 1 -228 1 -229 1 -22A 1 -22B 1 -22C 1 -22D 1 -22E 1 -22F 1 -230 1 -231 1 -232 1 -233 1 -234 1 -235 1 -236 1 -237 1 -238 1 -239 1 -23A 1 -23B 1 -23C 1 -23D 1 -23E 1 -23F 1 -240 1 -241 1 -242 1 -243 1 -244 1 -245 1 -246 1 -247 1 -248 1 -249 1 -24A 1 -24B 1 -24C 1 -24D 1 -24E 1 -24F 1 -250 1 -251 1 -252 1 -253 1 -254 1 -255 1 -256 1 -257 1 -258 1 -259 1 -25A 1 -25B 1 -25C 1 -25D 1 -25E 1 -25F 1 -260 1 -261 1 -262 1 -263 1 -264 1 -265 1 -266 1 -267 1 -268 1 -269 1 -26A 1 -26B 1 -26C 1 -26D 1 -26E 1 -26F 1 -270 1 -271 1 -272 1 -273 1 -274 1 -275 1 -276 1 -277 1 -278 1 -279 1 -27A 1 -27B 1 -27C 1 -27D 1 -27E 1 -27F 1 -280 1 -281 1 -282 1 -283 1 -284 1 -285 1 -286 1 -287 1 -288 1 -289 1 -28A 1 -28B 1 -28C 1 -28D 1 -28E 1 -28F 1 -290 1 -291 1 -292 1 -293 1 -294 1 -295 1 -296 1 -297 1 -298 1 -299 1 -29A 1 -29B 1 -29C 1 -29D 1 -29E 1 -29F 1 -2A0 1 -2A1 1 -2A2 1 -2A3 1 -2A4 1 -2A5 1 -2A6 1 -2A7 1 -2A8 1 -2A9 1 -2AA 1 -2AB 1 -2AC 1 -2AD 1 -2AE 1 -2AF 1 -2B0 1 -2B1 1 -2B2 1 -2B3 1 -2B4 1 -2B5 1 -2B6 1 -2B7 1 -2B8 1 -2B9 1 -2BA 1 -2BB 1 -2BC 1 -2BD 1 -2BE 1 -2BF 1 -2C0 1 -2C1 1 -2C2 1 -2C3 1 -2C4 1 -2C5 1 -2C6 1 -2C7 1 -2C8 1 -2C9 1 -2CA 1 -2CB 1 -2CC 1 -2CD 1 -2CE 1 -2CF 1 -2D0 1 -2D1 1 -2D2 1 -2D3 1 -2D4 1 -2D5 1 -2D6 1 -2D7 1 -2D8 1 -2D9 1 -2DA 1 -2DB 1 -2DC 1 -2DD 1 -2DE 1 -2DF 1 -2E0 1 -2E1 1 -2E2 1 -2E3 1 -2E4 1 -2E5 1 -2E6 1 -2E7 1 -2E8 1 -2E9 1 -2EA 1 -2EB 1 -2EC 1 -2ED 1 -2EE 1 -2EF 1 -2F0 1 -2F1 1 -2F2 1 -2F3 1 -2F4 1 -2F5 1 -2F6 1 -2F7 1 -2F8 1 -2F9 1 -2FA 1 -2FB 1 -2FC 1 -2FD 1 -2FE 1 -2FF 1 -300 1 -301 1 -302 1 -303 1 -304 1 -305 1 -306 1 -307 1 -308 1 -309 1 -30A 1 -30B 1 -30C 1 -30D 1 -30E 1 -30F 1 -310 1 -311 1 -312 1 -313 1 -314 1 -315 1 -316 1 -317 1 -318 1 -319 1 -31A 1 -31B 1 -31C 1 -31D 1 -31E 1 -31F 1 -320 1 -321 1 -322 1 -323 1 -324 1 -325 1 -326 1 -327 1 -328 1 -329 1 -32A 1 -32B 1 -32C 1 -32D 1 -32E 1 -32F 1 -330 1 -331 1 -332 1 -333 1 -334 1 -335 1 -336 1 -337 1 -338 1 -339 1 -33A 1 -33B 1 -33C 1 -33D 1 -33E 1 -33F 1 -340 1 -341 1 -342 1 -343 1 -344 1 -345 1 -346 1 -347 1 -348 1 -349 1 -34A 1 -34B 1 -34C 1 -34D 1 -34E 1 -34F 1 -350 1 -351 1 -352 1 -353 1 -354 1 -355 1 -356 1 -357 1 -358 1 -359 1 -35A 1 -35B 1 -35C 1 -35D 1 -35E 1 -35F 1 -360 1 -361 1 -362 1 -363 1 -364 1 -365 1 -366 1 -367 1 -368 1 -369 1 -36A 1 -36B 1 -36C 1 -36D 1 -36E 1 -36F 1 -370 1 -371 1 -372 1 -373 1 -374 1 -375 1 -376 1 -377 1 -378 1 -379 1 -37A 1 -37B 1 -37C 1 -37D 1 -37E 1 -37F 1 -380 1 -381 1 -382 1 -383 1 -384 1 -385 1 -386 1 -387 1 -388 1 -389 1 -38A 1 -38B 1 -38C 1 -38D 1 -38E 1 -38F 1 -390 1 -391 1 -392 1 -393 1 -394 1 -395 1 -396 1 -397 1 -398 1 -399 1 -39A 1 -39B 1 -39C 1 -39D 1 -39E 1 -39F 1 -3A0 1 -3A1 1 -3A2 1 -3A3 1 -3A4 1 -3A5 1 -3A6 1 -3A7 1 -3A8 1 -3A9 1 -3AA 1 -3AB 1 -3AC 1 -3AD 1 -3AE 1 -3AF 1 -3B0 1 -3B1 1 -3B2 1 -3B3 1 -3B4 1 -3B5 1 -3B6 1 -3B7 1 -3B8 1 -3B9 1 -3BA 1 -3BB 1 -3BC 1 -3BD 1 -3BE 1 -3BF 1 -3C0 1 -3C1 1 -3C2 1 -3C3 1 -3C4 1 -3C5 1 -3C6 1 -3C7 1 -3C8 1 -3C9 1 -3CA 1 -3CB 1 -3CC 1 -3CD 1 -3CE 1 -3CF 1 -3D0 1 -3D1 1 -3D2 1 -3D3 1 -3D4 1 -3D5 1 -3D6 1 -3D7 1 -3D8 1 -3D9 1 -3DA 1 -3DB 1 -3DC 1 -3DD 1 -3DE 1 -3DF 1 -3E0 1 -3E1 1 -3E2 1 -3E3 1 -3E4 1 -3E5 1 -3E6 1 -3E7 1 -3E8 1 -3E9 1 -3EA 1 -3EB 1 -3EC 1 -3ED 1 -3EE 1 -3EF 1 -3F0 1 -3F1 1 -3F2 1 -3F3 1 -3F4 1 -3F5 1 -3F6 1 -3F7 1 -3F8 1 -3F9 1 -3FA 1 -3FB 1 -3FC 1 -3FD 1 -3FE 1 -3FF 1 -400 1 -401 1 -402 1 -403 1 -404 1 -405 1 -406 1 -407 1 -408 1 -409 1 -40A 1 -40B 1 -40C 1 -40D 1 -40E 1 -40F 1 -410 1 -411 1 -412 1 -413 1 -414 1 -415 1 -416 1 -417 1 -418 1 -419 1 -41A 1 -41B 1 -41C 1 -41D 1 -41E 1 -41F 1 -420 1 -421 1 -422 1 -423 1 -424 1 -425 1 -426 1 -427 1 -428 1 -429 1 -42A 1 -42B 1 -42C 1 -42D 1 -42E 1 -42F 1 -430 1 -431 1 -432 1 -433 1 -434 1 -435 1 -436 1 -437 1 -438 1 -439 1 -43A 1 -43B 1 -43C 1 -43D 1 -43E 1 -43F 1 -440 1 -441 1 -442 1 -443 1 -444 1 -445 1 -446 1 -447 1 -448 1 -449 1 -44A 1 -44B 1 -44C 1 -44D 1 -44E 1 -44F 1 -450 1 -451 1 -452 1 -453 1 -454 1 -455 1 -456 1 -457 1 -458 1 -459 1 -45A 1 -45B 1 -45C 1 -45D 1 -45E 1 -45F 1 -460 1 -461 1 -462 1 -463 1 -464 1 -465 1 -466 1 -467 1 -468 1 -469 1 -46A 1 -46B 1 -46C 1 -46D 1 -46E 1 -46F 1 -470 1 -471 1 -472 1 -473 1 -474 1 -475 1 -476 1 -477 1 -478 1 -479 1 -47A 1 -47B 1 -47C 1 -47D 1 -47E 1 -47F 1 -480 1 -481 1 -482 1 -483 1 -484 1 -485 1 -486 1 -487 1 -488 1 -489 1 -48A 1 -48B 1 -48C 1 -48D 1 -48E 1 -48F 1 -490 1 -491 1 -492 1 -493 1 -494 1 -495 1 -496 1 -497 1 -498 1 -499 1 -49A 1 -49B 1 -49C 1 -49D 1 -49E 1 -49F 1 -4A0 1 -4A1 1 -4A2 1 -4A3 1 -4A4 1 -4A5 1 -4A6 1 -4A7 1 -4A8 1 -4A9 1 -4AA 1 -4AB 1 -4AC 1 -4AD 1 -4AE 1 -4AF 1 -4B0 1 -4B1 1 -4B2 1 -4B3 1 -4B4 1 -4B5 1 -4B6 1 -4B7 1 -4B8 1 -4B9 1 -4BA 1 -4BB 1 -4BC 1 -4BD 1 -4BE 1 -4BF 1 -4C0 1 -4C1 1 -4C2 1 -4C3 1 -4C4 1 -4C5 1 -4C6 1 -4C7 1 -4C8 1 -4C9 1 -4CA 1 -4CB 1 -4CC 1 -4CD 1 -4CE 1 -4CF 1 -4D0 1 -4D1 1 -4D2 1 -4D3 1 -4D4 1 -4D5 1 -4D6 1 -4D7 1 -4D8 1 -4D9 1 -4DA 1 -4DB 1 -4DC 1 -4DD 1 -4DE 1 -4DF 1 -4E0 1 -4E1 1 -4E2 1 -4E3 1 -4E4 1 -4E5 1 -4E6 1 -4E7 1 -4E8 1 -4E9 1 -4EA 1 -4EB 1 -4EC 1 -4ED 1 -4EE 1 -4EF 1 -4F0 1 -4F1 1 -4F2 1 -4F3 1 -4F4 1 -4F5 1 -4F6 1 -4F7 1 -4F8 1 -4F9 1 -4FA 1 -4FB 1 -4FC 1 -4FD 1 -4FE 1 -4FF 1 -500 1 -501 1 -502 1 -503 1 -504 1 -505 1 -506 1 -507 1 -508 1 -509 1 -50A 1 -50B 1 -50C 1 -50D 1 -50E 1 -50F 1 -510 1 -511 1 -512 1 -513 1 -514 1 -515 1 -516 1 -517 1 -518 1 -519 1 -51A 1 -51B 1 -51C 1 -51D 1 -51E 1 -51F 1 -520 1 -521 1 -522 1 -523 1 -524 1 -525 1 -526 1 -527 1 -528 1 -529 1 -52A 1 -52B 1 -52C 1 -52D 1 -52E 1 -52F 1 -530 1 -531 1 -532 1 -533 1 -534 1 -535 1 -536 1 -537 1 -538 1 -539 1 -53A 1 -53B 1 -53C 1 -53D 1 -53E 1 -53F 1 -540 1 -541 1 -542 1 -543 1 -544 1 -545 1 -546 1 -547 1 -548 1 -549 1 -54A 1 -54B 1 -54C 1 -54D 1 -54E 1 -54F 1 -550 1 -551 1 -552 1 -553 1 -554 1 -555 1 -556 1 -557 1 -558 1 -559 1 -55A 1 -55B 1 -55C 1 -55D 1 -55E 1 -55F 1 -560 1 -561 1 -562 1 -563 1 -564 1 -565 1 -566 1 -567 1 -568 1 -569 1 -56A 1 -56B 1 -56C 1 -56D 1 -56E 1 -56F 1 -570 1 -571 1 -572 1 -573 1 -574 1 -575 1 -576 1 -577 1 -578 1 -579 1 -57A 1 -57B 1 -57C 1 -57D 1 -57E 1 -57F 1 -580 1 -581 1 -582 1 -583 1 -584 1 -585 1 -586 1 -587 1 -588 1 -589 1 -58A 1 -58B 1 -58C 1 -58D 1 -58E 1 -58F 1 -590 1 -591 1 -592 1 -593 1 -594 1 -595 1 -596 1 -597 1 -598 1 -599 1 -59A 1 -59B 1 -59C 1 -59D 1 -59E 1 -59F 1 -5A0 1 -5A1 1 -5A2 1 -5A3 1 -5A4 1 -5A5 1 -5A6 1 -5A7 1 -5A8 1 -5A9 1 -5AA 1 -5AB 1 -5AC 1 -5AD 1 -5AE 1 -5AF 1 -5B0 1 -5B1 1 -5B2 1 -5B3 1 -5B4 1 -5B5 1 -5B6 1 -5B7 1 -5B8 1 -5B9 1 -5BA 1 -5BB 1 -5BC 1 -5BD 1 -5BE 1 -5BF 1 -5C0 1 -5C1 1 -5C2 1 -5C3 1 -5C4 1 -5C5 1 -5C6 1 -5C7 1 -5C8 1 -5C9 1 -5CA 1 -5CB 1 -5CC 1 -5CD 1 -5CE 1 -5CF 1 -5D0 1 -5D1 1 -5D2 1 -5D3 1 -5D4 1 -5D5 1 -5D6 1 -5D7 1 -5D8 1 -5D9 1 -5DA 1 -5DB 1 -5DC 1 -5DD 1 -5DE 1 -5DF 1 -5E0 1 -5E1 1 -5E2 1 -5E3 1 -5E4 1 -5E5 1 -5E6 1 -5E7 1 -5E8 1 -5E9 1 -5EA 1 -5EB 1 -5EC 1 -5ED 1 -5EE 1 -5EF 1 -5F0 1 -5F1 1 -5F2 1 -5F3 1 -5F4 1 -5F5 1 -5F6 1 -5F7 1 -5F8 1 -5F9 1 -5FA 1 -5FB 1 -5FC 1 -5FD 1 -5FE 1 -5FF 1 -600 1 -601 1 -602 1 -603 1 -604 1 -605 1 -606 1 -607 1 -608 1 -609 1 -60A 1 -60B 1 -60C 1 -60D 1 -60E 1 -60F 1 -610 1 -611 1 -612 1 -613 1 -614 1 -615 1 -616 1 -617 1 -618 1 -619 1 -61A 1 -61B 1 -61C 1 -61D 1 -61E 1 -61F 1 -620 1 -621 1 -622 1 -623 1 -624 1 -625 1 -626 1 -627 1 -628 1 -629 1 -62A 1 -62B 1 -62C 1 -62D 1 -62E 1 -62F 1 -630 1 -631 1 -632 1 -633 1 -634 1 -635 1 -636 1 -637 1 -638 1 -639 1 -63A 1 -63B 1 -63C 1 -63D 1 -63E 1 -63F 1 -640 1 -641 1 -642 1 -643 1 -644 1 -645 1 -646 1 -647 1 -648 1 -649 1 -64A 1 -64B 1 -64C 1 -64D 1 -64E 1 -64F 1 -650 1 -651 1 -652 1 -653 1 -654 1 -655 1 -656 1 -657 1 -658 1 -659 1 -65A 1 -65B 1 -65C 1 -65D 1 -65E 1 -65F 1 -660 1 -661 1 -662 1 -663 1 -664 1 -665 1 -666 1 -667 1 -668 1 -669 1 -66A 1 -66B 1 -66C 1 -66D 1 -66E 1 -66F 1 -670 1 -671 1 -672 1 -673 1 -674 1 -675 1 -676 1 -677 1 -678 1 -679 1 -67A 1 -67B 1 -67C 1 -67D 1 -67E 1 -67F 1 -680 1 -681 1 -682 1 -683 1 -684 1 -685 1 -686 1 -687 1 -688 1 -689 1 -68A 1 -68B 1 -68C 1 -68D 1 -68E 1 -68F 1 -690 1 -691 1 -692 1 -693 1 -694 1 -695 1 -696 1 -697 1 -698 1 -699 1 -69A 1 -69B 1 -69C 1 -69D 1 -69E 1 -69F 1 -6A0 1 -6A1 1 -6A2 1 -6A3 1 -6A4 1 -6A5 1 -6A6 1 -6A7 1 -6A8 1 -6A9 1 -6AA 1 -6AB 1 -6AC 1 -6AD 1 -6AE 1 -6AF 1 -6B0 1 -6B1 1 -6B2 1 -6B3 1 -6B4 1 -6B5 1 -6B6 1 -6B7 1 -6B8 1 -6B9 1 -6BA 1 -6BB 1 -6BC 1 -6BD 1 -6BE 1 -6BF 1 -6C0 1 -6C1 1 -6C2 1 -6C3 1 -6C4 1 -6C5 1 -6C6 1 -6C7 1 -6C8 1 -6C9 1 -6CA 1 -6CB 1 -6CC 1 -6CD 1 -6CE 1 -6CF 1 -6D0 1 -6D1 1 -6D2 1 -6D3 1 -6D4 1 -6D5 1 -6D6 1 -6D7 1 -6D8 1 -6D9 1 -6DA 1 -6DB 1 -6DC 1 -6DD 1 -6DE 1 -6DF 1 -6E0 1 -6E1 1 -6E2 1 -6E3 1 -6E4 1 -6E5 1 -6E6 1 -6E7 1 -6E8 1 -6E9 1 -6EA 1 -6EB 1 -6EC 1 -6ED 1 -6EE 1 -6EF 1 -6F0 1 -6F1 1 -6F2 1 -6F3 1 -6F4 1 -6F5 1 -6F6 1 -6F7 1 -6F8 1 -6F9 1 -6FA 1 -6FB 1 -6FC 1 -6FD 1 -6FE 1 -6FF 1 -700 1 -701 1 -702 1 -703 1 -704 1 -705 1 -706 1 -707 1 -708 1 -709 1 -70A 1 -70B 1 -70C 1 -70D 1 -70E 1 -70F 1 -710 1 -711 1 -712 1 -713 1 -714 1 -715 1 -716 1 -717 1 -718 1 -719 1 -71A 1 -71B 1 -71C 1 -71D 1 -71E 1 -71F 1 -720 1 -721 1 -722 1 -723 1 -724 1 -725 1 -726 1 -727 1 -728 1 -729 1 -72A 1 -72B 1 -72C 1 -72D 1 -72E 1 -72F 1 -730 1 -731 1 -732 1 -733 1 -734 1 -735 1 -736 1 -737 1 -738 1 -739 1 -73A 1 -73B 1 -73C 1 -73D 1 -73E 1 -73F 1 -740 1 -741 1 -742 1 -743 1 -744 1 -745 1 -746 1 -747 1 -748 1 -749 1 -74A 1 -74B 1 -74C 1 -74D 1 -74E 1 -74F 1 -750 1 -751 1 -752 1 -753 1 -754 1 -755 1 -756 1 -757 1 -758 1 -759 1 -75A 1 -75B 1 -75C 1 -75D 1 -75E 1 -75F 1 -760 1 -761 1 -762 1 -763 1 -764 1 -765 1 -766 1 -767 1 -768 1 -769 1 -76A 1 -76B 1 -76C 1 -76D 1 -76E 1 -76F 1 -770 1 -771 1 -772 1 -773 1 -774 1 -775 1 -776 1 -777 1 -778 1 -779 1 -77A 1 -77B 1 -77C 1 -77D 1 -77E 1 -77F 1 -780 1 -781 1 -782 1 -783 1 -784 1 -785 1 -786 1 -787 1 -788 1 -789 1 -78A 1 -78B 1 -78C 1 -78D 1 -78E 1 -78F 1 -790 1 -791 1 -792 1 -793 1 -794 1 -795 1 -796 1 -797 1 -798 1 -799 1 -79A 1 -79B 1 -79C 1 -79D 1 -79E 1 -79F 1 -7A0 1 -7A1 1 -7A2 1 -7A3 1 -7A4 1 -7A5 1 -7A6 1 -7A7 1 -7A8 1 -7A9 1 -7AA 1 -7AB 1 -7AC 1 -7AD 1 -7AE 1 -7AF 1 -7B0 1 -7B1 1 -7B2 1 -7B3 1 -7B4 1 -7B5 1 -7B6 1 -7B7 1 -7B8 1 -7B9 1 -7BA 1 -7BB 1 -7BC 1 -7BD 1 -7BE 1 -7BF 1 -7C0 1 -7C1 1 -7C2 1 -7C3 1 -7C4 1 -7C5 1 -7C6 1 -7C7 1 -7C8 1 -7C9 1 -7CA 1 -7CB 1 -7CC 1 -7CD 1 -7CE 1 -7CF 1 -7D0 1 -7D1 1 -7D2 1 -7D3 1 -7D4 1 -7D5 1 -7D6 1 -7D7 1 -7D8 1 -7D9 1 -7DA 1 -7DB 1 -7DC 1 -7DD 1 -7DE 1 -7DF 1 -7E0 1 -7E1 1 -7E2 1 -7E3 1 -7E4 1 -7E5 1 -7E6 1 -7E7 1 -7E8 1 -7E9 1 -7EA 1 -7EB 1 -7EC 1 -7ED 1 -7EE 1 -7EF 1 -7F0 1 -7F1 1 -7F2 1 -7F3 1 -7F4 1 -7F5 1 -7F6 1 -7F7 1 -7F8 1 -7F9 1 -7FA 1 -7FB 1 -7FC 1 -7FD 1 -7FE 1 -7FF 1 -4E00 1 -4E01 1 -4E02 1 -4E03 1 -4E04 1 -4E05 1 -4E06 1 -4E07 1 -4E08 1 -4E09 1 -4E0A 1 -4E0B 1 -4E0C 1 -4E0D 1 -4E0E 1 -4E0F 1 -4E10 1 -4E11 1 -4E12 1 -4E13 1 -4E14 1 -4E15 1 -4E16 1 -4E17 1 -4E18 1 -4E19 1 -4E1A 1 -4E1B 1 -4E1C 1 -4E1D 1 -4E1E 1 -4E1F 1 -4E20 1 -4E21 1 -4E22 1 -4E23 1 -4E24 1 -4E25 1 -4E26 1 -4E27 1 -4E28 1 -4E29 1 -4E2A 1 -4E2B 1 -4E2C 1 -4E2D 1 -4E2E 1 -4E2F 1 -4E30 1 -4E31 1 -4E32 1 -4E33 1 -4E34 1 -4E35 1 -4E36 1 -4E37 1 -4E38 1 -4E39 1 -4E3A 1 -4E3B 1 -4E3C 1 -4E3D 1 -4E3E 1 -4E3F 1 -4E40 1 -4E41 1 -4E42 1 -4E43 1 -4E44 1 -4E45 1 -4E46 1 -4E47 1 -4E48 1 -4E49 1 -4E4A 1 -4E4B 1 -4E4C 1 -4E4D 1 -4E4E 1 -4E4F 1 -4E50 1 -4E51 1 -4E52 1 -4E53 1 -4E54 1 -4E55 1 -4E56 1 -4E57 1 -4E58 1 -4E59 1 -4E5A 1 -4E5B 1 -4E5C 1 -4E5D 1 -4E5E 1 -4E5F 1 -4E60 1 -4E61 1 -4E62 1 -4E63 1 -4E64 1 -4E65 1 -4E66 1 -4E67 1 -4E68 1 -4E69 1 -4E6A 1 -4E6B 1 -4E6C 1 -4E6D 1 -4E6E 1 -4E6F 1 -4E70 1 -4E71 1 -4E72 1 -4E73 1 -4E74 1 -4E75 1 -4E76 1 -4E77 1 -4E78 1 -4E79 1 -4E7A 1 -4E7B 1 -4E7C 1 -4E7D 1 -4E7E 1 -4E7F 1 -4E80 1 -4E81 1 -4E82 1 -4E83 1 -4E84 1 -4E85 1 -4E86 1 -4E87 1 -4E88 1 -4E89 1 -4E8A 1 -4E8B 1 -4E8C 1 -4E8D 1 -4E8E 1 -4E8F 1 -4E90 1 -4E91 1 -4E92 1 -4E93 1 -4E94 1 -4E95 1 -4E96 1 -4E97 1 -4E98 1 -4E99 1 -4E9A 1 -4E9B 1 -4E9C 1 -4E9D 1 -4E9E 1 -4E9F 1 -4EA0 1 -4EA1 1 -4EA2 1 -4EA3 1 -4EA4 1 -4EA5 1 -4EA6 1 -4EA7 1 -4EA8 1 -4EA9 1 -4EAA 1 -4EAB 1 -4EAC 1 -4EAD 1 -4EAE 1 -4EAF 1 -4EB0 1 -4EB1 1 -4EB2 1 -4EB3 1 -4EB4 1 -4EB5 1 -4EB6 1 -4EB7 1 -4EB8 1 -4EB9 1 -4EBA 1 -4EBB 1 -4EBC 1 -4EBD 1 -4EBE 1 -4EBF 1 -4EC0 1 -4EC1 1 -4EC2 1 -4EC3 1 -4EC4 1 -4EC5 1 -4EC6 1 -4EC7 1 -4EC8 1 -4EC9 1 -4ECA 1 -4ECB 1 -4ECC 1 -4ECD 1 -4ECE 1 -4ECF 1 -4ED0 1 -4ED1 1 -4ED2 1 -4ED3 1 -4ED4 1 -4ED5 1 -4ED6 1 -4ED7 1 -4ED8 1 -4ED9 1 -4EDA 1 -4EDB 1 -4EDC 1 -4EDD 1 -4EDE 1 -4EDF 1 -4EE0 1 -4EE1 1 -4EE2 1 -4EE3 1 -4EE4 1 -4EE5 1 -4EE6 1 -4EE7 1 -4EE8 1 -4EE9 1 -4EEA 1 -4EEB 1 -4EEC 1 -4EED 1 -4EEE 1 -4EEF 1 -4EF0 1 -4EF1 1 -4EF2 1 -4EF3 1 -4EF4 1 -4EF5 1 -4EF6 1 -4EF7 1 -4EF8 1 -4EF9 1 -4EFA 1 -4EFB 1 -4EFC 1 -4EFD 1 -4EFE 1 -4EFF 1 -4F00 1 -4F01 1 -4F02 1 -4F03 1 -4F04 1 -4F05 1 -4F06 1 -4F07 1 -4F08 1 -4F09 1 -4F0A 1 -4F0B 1 -4F0C 1 -4F0D 1 -4F0E 1 -4F0F 1 -4F10 1 -4F11 1 -4F12 1 -4F13 1 -4F14 1 -4F15 1 -4F16 1 -4F17 1 -4F18 1 -4F19 1 -4F1A 1 -4F1B 1 -4F1C 1 -4F1D 1 -4F1E 1 -4F1F 1 -4F20 1 -4F21 1 -4F22 1 -4F23 1 -4F24 1 -4F25 1 -4F26 1 -4F27 1 -4F28 1 -4F29 1 -4F2A 1 -4F2B 1 -4F2C 1 -4F2D 1 -4F2E 1 -4F2F 1 -4F30 1 -4F31 1 -4F32 1 -4F33 1 -4F34 1 -4F35 1 -4F36 1 -4F37 1 -4F38 1 -4F39 1 -4F3A 1 -4F3B 1 -4F3C 1 -4F3D 1 -4F3E 1 -4F3F 1 -4F40 1 -4F41 1 -4F42 1 -4F43 1 -4F44 1 -4F45 1 -4F46 1 -4F47 1 -4F48 1 -4F49 1 -4F4A 1 -4F4B 1 -4F4C 1 -4F4D 1 -4F4E 1 -4F4F 1 -4F50 1 -4F51 1 -4F52 1 -4F53 1 -4F54 1 -4F55 1 -4F56 1 -4F57 1 -4F58 1 -4F59 1 -4F5A 1 -4F5B 1 -4F5C 1 -4F5D 1 -4F5E 1 -4F5F 1 -4F60 1 -4F61 1 -4F62 1 -4F63 1 -4F64 1 -4F65 1 -4F66 1 -4F67 1 -4F68 1 -4F69 1 -4F6A 1 -4F6B 1 -4F6C 1 -4F6D 1 -4F6E 1 -4F6F 1 -4F70 1 -4F71 1 -4F72 1 -4F73 1 -4F74 1 -4F75 1 -4F76 1 -4F77 1 -4F78 1 -4F79 1 -4F7A 1 -4F7B 1 -4F7C 1 -4F7D 1 -4F7E 1 -4F7F 1 -4F80 1 -4F81 1 -4F82 1 -4F83 1 -4F84 1 -4F85 1 -4F86 1 -4F87 1 -4F88 1 -4F89 1 -4F8A 1 -4F8B 1 -4F8C 1 -4F8D 1 -4F8E 1 -4F8F 1 -4F90 1 -4F91 1 -4F92 1 -4F93 1 -4F94 1 -4F95 1 -4F96 1 -4F97 1 -4F98 1 -4F99 1 -4F9A 1 -4F9B 1 -4F9C 1 -4F9D 1 -4F9E 1 -4F9F 1 -4FA0 1 -4FA1 1 -4FA2 1 -4FA3 1 -4FA4 1 -4FA5 1 -4FA6 1 -4FA7 1 -4FA8 1 -4FA9 1 -4FAA 1 -4FAB 1 -4FAC 1 -4FAD 1 -4FAE 1 -4FAF 1 -4FB0 1 -4FB1 1 -4FB2 1 -4FB3 1 -4FB4 1 -4FB5 1 -4FB6 1 -4FB7 1 -4FB8 1 -4FB9 1 -4FBA 1 -4FBB 1 -4FBC 1 -4FBD 1 -4FBE 1 -4FBF 1 -4FC0 1 -4FC1 1 -4FC2 1 -4FC3 1 -4FC4 1 -4FC5 1 -4FC6 1 -4FC7 1 -4FC8 1 -4FC9 1 -4FCA 1 -4FCB 1 -4FCC 1 -4FCD 1 -4FCE 1 -4FCF 1 -4FD0 1 -4FD1 1 -4FD2 1 -4FD3 1 -4FD4 1 -4FD5 1 -4FD6 1 -4FD7 1 -4FD8 1 -4FD9 1 -4FDA 1 -4FDB 1 -4FDC 1 -4FDD 1 -4FDE 1 -4FDF 1 -4FE0 1 -4FE1 1 -4FE2 1 -4FE3 1 -4FE4 1 -4FE5 1 -4FE6 1 -4FE7 1 -4FE8 1 -4FE9 1 -4FEA 1 -4FEB 1 -4FEC 1 -4FED 1 -4FEE 1 -4FEF 1 -4FF0 1 -4FF1 1 -4FF2 1 -4FF3 1 -4FF4 1 -4FF5 1 -4FF6 1 -4FF7 1 -4FF8 1 -4FF9 1 -4FFA 1 -4FFB 1 -4FFC 1 -4FFD 1 -4FFE 1 -4FFF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -SET NAMES utf8; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=NDB CHARACTER SET utf8; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_general_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_czech_ci; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -85 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -300 1 -301 1 -302 1 -303 1 -304 1 -305 1 -306 1 -307 1 -308 1 -309 1 -30A 1 -30B 1 -30C 1 -30D 1 -30E 1 -30F 1 -310 1 -311 1 -312 1 -313 1 -314 1 -315 1 -316 1 -317 1 -318 1 -319 1 -31A 1 -31B 1 -31C 1 -31D 1 -31E 1 -31F 1 -320 1 -321 1 -322 1 -323 1 -324 1 -325 1 -326 1 -327 1 -328 1 -329 1 -32A 1 -32B 1 -32C 1 -32D 1 -32E 1 -32F 1 -330 1 -331 1 -332 1 -333 1 -334 1 -335 1 -336 1 -337 1 -338 1 -339 1 -33A 1 -33B 1 -33C 1 -33D 1 -33E 1 -33F 1 -340 1 -341 1 -342 1 -343 1 -344 1 -345 1 -346 1 -347 1 -348 1 -349 1 -34A 1 -34B 1 -34C 1 -34D 1 -34E 1 -34F 1 -350 1 -351 1 -352 1 -353 1 -354 1 -355 1 -356 1 -357 1 -35D 1 -35E 1 -35F 1 -360 1 -361 1 -362 1 -483 1 -484 1 -485 1 -486 1 -488 1 -489 1 -591 1 -592 1 -593 1 -594 1 -595 1 -596 1 -597 1 -598 1 -599 1 -59A 1 -59B 1 -59C 1 -59D 1 -59E 1 -59F 1 -5A0 1 -5A1 1 -5A3 1 -5A4 1 -5A5 1 -5A6 1 -5A7 1 -5A8 1 -5A9 1 -5AA 1 -5AB 1 -5AC 1 -5AD 1 -5AE 1 -5AF 1 -5B0 1 -5B1 1 -5B2 1 -5B3 1 -5B4 1 -5B5 1 -5B6 1 -5B7 1 -5B8 1 -5B9 1 -5BB 1 -5BC 1 -5BD 1 -5BF 1 -5C1 1 -5C2 1 -5C4 1 -600 1 -601 1 -602 1 -603 1 -610 1 -611 1 -612 1 -613 1 -614 1 -615 1 -64B 1 -64C 1 -64D 1 -64E 1 -64F 1 -650 1 -651 1 -652 1 -653 1 -654 1 -655 1 -656 1 -657 1 -658 1 -670 1 -6D6 1 -6D7 1 -6D8 1 -6D9 1 -6DA 1 -6DB 1 -6DC 1 -6DD 1 -6DE 1 -6DF 1 -6E0 1 -6E1 1 -6E2 1 -6E3 1 -6E4 1 -6E7 1 -6E8 1 -6EA 1 -6EB 1 -6EC 1 -6ED 1 -70F 1 -711 1 -730 1 -731 1 -732 1 -733 1 -734 1 -735 1 -736 1 -737 1 -738 1 -739 1 -73A 1 -73B 1 -73C 1 -73D 1 -73E 1 -73F 1 -740 1 -741 1 -742 1 -743 1 -744 1 -745 1 -746 1 -747 1 -748 1 -749 1 -74A 1 -640 1 -60 1 -B4 1 -384 1 -2DC 1 -5E 1 -AF 1 -2D8 1 -2D9 1 -A8 1 -385 1 -2DA 1 -2DD 1 -B8 1 -2DB 1 -5F 1 -AD 1 -2D 1 -58A 1 -2C 1 -55D 1 -60C 1 -60D 1 -66B 1 -66C 1 -3B 1 -37E 1 -61B 1 -3A 1 -589 1 -703 1 -704 1 -705 1 -706 1 -707 1 -708 1 -21 1 -A1 1 -55C 1 -3F 1 -BF 1 -55E 1 -61F 1 -709 1 -2E 1 -6D4 1 -701 1 -702 1 -B7 1 -387 1 -700 1 -27 1 -22 1 -AB 1 -BB 1 -28 1 -29 1 -5B 1 -7B 1 -7D 1 -A7 1 -B6 1 -A9 1 -AE 1 -40 1 -2A 1 -66D 1 -2F 1 -26 1 -23 1 -25 1 -66A 1 -55A 1 -55B 1 -55F 1 -5BE 1 -5C0 1 -5C3 1 -5F3 1 -5F4 1 -70A 1 -70B 1 -70C 1 -70D 1 -2B9 1 -374 1 -375 1 -2BA 1 -2C2 1 -2C3 1 -2C4 1 -2C5 1 -2C6 1 -2C7 1 -2C8 1 -2C9 1 -2CA 1 -2CB 1 -2CC 1 -2CD 1 -2CE 1 -2CF 1 -2D2 1 -2D3 1 -2D4 1 -2D5 1 -2D6 1 -2D7 1 -2DE 1 -2DF 1 -2E5 1 -2E6 1 -2E7 1 -2E8 1 -2E9 1 -2EA 1 -2EB 1 -2EC 1 -2ED 1 -2EF 1 -2F0 1 -2F1 1 -2F2 1 -2F3 1 -2F4 1 -2F5 1 -2F6 1 -2F7 1 -2F8 1 -2F9 1 -2FA 1 -2FB 1 -2FC 1 -2FD 1 -2FE 1 -2FF 1 -B0 1 -482 1 -60E 1 -60F 1 -6E9 1 -3F6 1 -2B 1 -B1 1 -F7 1 -D7 1 -3C 1 -3D 1 -3E 1 -AC 1 -7C 1 -A6 1 -7E 1 -2D0 1 -2D1 1 -A4 1 -A2 1 -24 1 -A3 1 -A5 1 -30 1 -660 1 -6F0 1 -31 1 -B9 1 -661 1 -6F1 1 -BD 1 -BC 1 -32 1 -B2 1 -662 1 -6F2 1 -33 1 -B3 1 -663 1 -6F3 1 -BE 1 -34 1 -664 1 -6F4 1 -35 1 -665 1 -6F5 1 -36 1 -666 1 -6F6 1 -37 1 -667 1 -6F7 1 -38 1 -668 1 -6F8 1 -39 1 -669 1 -6F9 1 -41 1 -61 1 -AA 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -100 1 -101 1 -102 1 -103 1 -104 1 -105 1 -1CD 1 -1CE 1 -1DE 1 -1DF 1 -1E0 1 -1E1 1 -1FA 1 -1FB 1 -200 1 -201 1 -202 1 -203 1 -226 1 -227 1 -363 1 -C6 1 -E6 1 -1E2 1 -1E3 1 -1FC 1 -1FD 1 -250 1 -251 1 -252 1 -42 1 -62 1 -299 1 -180 1 -181 1 -253 1 -182 1 -183 1 -43 1 -63 1 -C7 1 -E7 1 -106 1 -107 1 -108 1 -109 1 -10A 1 -10B 1 -368 1 -10C 1 -10D 1 -187 1 -188 1 -255 1 -44 1 -64 1 -10E 1 -10F 1 -369 1 -1C4 1 -1C5 1 -1C6 1 -1F1 1 -1F2 1 -1F3 1 -2A3 1 -2A5 1 -2A4 1 -110 1 -111 1 -189 1 -256 1 -18A 1 -257 1 -18B 1 -18C 1 -221 1 -D0 1 -F0 1 -45 1 -65 1 -C8 1 -C9 1 -CA 1 -CB 1 -E8 1 -E9 1 -EA 1 -EB 1 -112 1 -113 1 -114 1 -115 1 -116 1 -117 1 -118 1 -119 1 -11A 1 -11B 1 -204 1 -205 1 -206 1 -207 1 -228 1 -229 1 -364 1 -18E 1 -1DD 1 -18F 1 -259 1 -190 1 -25B 1 -258 1 -25A 1 -25C 1 -25D 1 -25E 1 -29A 1 -264 1 -46 1 -66 1 -2A9 1 -191 1 -192 1 -47 1 -67 1 -11C 1 -11D 1 -11E 1 -11F 1 -120 1 -121 1 -122 1 -123 1 -1E6 1 -1E7 1 -1F4 1 -1F5 1 -261 1 -262 1 -1E4 1 -1E5 1 -193 1 -260 1 -29B 1 -194 1 -263 1 -2E0 1 -1A2 1 -1A3 1 -48 1 -68 1 -124 1 -125 1 -21E 1 -21F 1 -2B0 1 -36A 1 -29C 1 -195 1 -1F6 1 -126 1 -127 1 -266 1 -2B1 1 -267 1 -2BB 1 -2BD 1 -49 1 -69 1 -CC 1 -CD 1 -CE 1 -CF 1 -EC 1 -ED 1 -EE 1 -EF 1 -128 1 -129 1 -12A 1 -12B 1 -12C 1 -12D 1 -12E 1 -12F 1 -130 1 -1CF 1 -1D0 1 -208 1 -209 1 -20A 1 -20B 1 -365 1 -132 1 -133 1 -131 1 -26A 1 -197 1 -268 1 -196 1 -269 1 -4A 1 -6A 1 -134 1 -135 1 -1F0 1 -2B2 1 -29D 1 -25F 1 -284 1 -4B 1 -6B 1 -136 1 -137 1 -1E8 1 -1E9 1 -198 1 -199 1 -29E 1 -4C 1 -6C 1 -139 1 -13A 1 -13B 1 -13C 1 -13D 1 -13E 1 -2E1 1 -13F 1 -140 1 -1C7 1 -1C8 1 -1C9 1 -2AA 1 -2AB 1 -29F 1 -141 1 -142 1 -19A 1 -26B 1 -26C 1 -26D 1 -234 1 -26E 1 -19B 1 -28E 1 -4D 1 -6D 1 -36B 1 -271 1 -4E 1 -6E 1 -D1 1 -F1 1 -143 1 -144 1 -145 1 -146 1 -147 1 -148 1 -1F8 1 -1F9 1 -1CA 1 -1CB 1 -1CC 1 -274 1 -19D 1 -272 1 -19E 1 -220 1 -273 1 -235 1 -14A 1 -14B 1 -4F 1 -6F 1 -BA 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -14C 1 -14D 1 -14E 1 -14F 1 -150 1 -151 1 -1A0 1 -1A1 1 -1D1 1 -1D2 1 -1EA 1 -1EB 1 -1EC 1 -1ED 1 -20C 1 -20D 1 -20E 1 -20F 1 -22A 1 -22B 1 -22C 1 -22D 1 -22E 1 -22F 1 -230 1 -231 1 -366 1 -152 1 -153 1 -276 1 -D8 1 -F8 1 -1FE 1 -1FF 1 -186 1 -254 1 -19F 1 -275 1 -277 1 -222 1 -223 1 -50 1 -70 1 -1A4 1 -1A5 1 -278 1 -51 1 -71 1 -2A0 1 -138 1 -52 1 -72 1 -154 1 -155 1 -156 1 -157 1 -210 1 -211 1 -212 1 -213 1 -2B3 1 -36C 1 -158 1 -159 1 -1A6 1 -280 1 -279 1 -2B4 1 -27A 1 -27B 1 -2B5 1 -27C 1 -27D 1 -27E 1 -27F 1 -281 1 -2B6 1 -53 1 -73 1 -15A 1 -15B 1 -15C 1 -15D 1 -15E 1 -15F 1 -17F 1 -218 1 -219 1 -2E2 1 -DF 1 -160 1 -161 1 -282 1 -1A9 1 -283 1 -1AA 1 -285 1 -286 1 -54 1 -74 1 -162 1 -163 1 -164 1 -165 1 -21A 1 -21B 1 -36D 1 -2A8 1 -1BE 1 -2A6 1 -2A7 1 -166 1 -167 1 -1AB 1 -1AC 1 -1AD 1 -1AE 1 -288 1 -236 1 -287 1 -55 1 -75 1 -D9 1 -DA 1 -DB 1 -DC 1 -F9 1 -FA 1 -FB 1 -FC 1 -168 1 -169 1 -16A 1 -16B 1 -16C 1 -16D 1 -16E 1 -16F 1 -170 1 -171 1 -172 1 -173 1 -1AF 1 -1B0 1 -1D3 1 -1D4 1 -1D5 1 -1D6 1 -1D7 1 -1D8 1 -1D9 1 -1DA 1 -1DB 1 -1DC 1 -214 1 -215 1 -216 1 -217 1 -367 1 -289 1 -265 1 -2AE 1 -2AF 1 -19C 1 -26F 1 -270 1 -1B1 1 -28A 1 -56 1 -76 1 -36E 1 -1B2 1 -28B 1 -28C 1 -57 1 -77 1 -174 1 -175 1 -2B7 1 -28D 1 -58 1 -78 1 -2E3 1 -36F 1 -59 1 -79 1 -DD 1 -FD 1 -FF 1 -176 1 -177 1 -178 1 -232 1 -233 1 -2B8 1 -28F 1 -1B3 1 -1B4 1 -5A 1 -7A 1 -179 1 -17A 1 -17B 1 -17C 1 -18D 1 -17D 1 -17E 1 -1B5 1 -1B6 1 -224 1 -225 1 -290 1 -291 1 -1B7 1 -1EE 1 -1EF 1 -292 1 -1B8 1 -1B9 1 -1BA 1 -293 1 -21C 1 -21D 1 -DE 1 -FE 1 -1BF 1 -1F7 1 -1BB 1 -1A7 1 -1A8 1 -1BC 1 -1BD 1 -184 1 -185 1 -294 1 -2C0 1 -2BC 1 -149 1 -2EE 1 -2BE 1 -295 1 -2E4 1 -2BF 1 -2C1 1 -2A1 1 -2A2 1 -296 1 -1C0 1 -1C1 1 -1C2 1 -1C3 1 -297 1 -298 1 -2AC 1 -2AD 1 -386 1 -391 1 -3AC 1 -3B1 1 -392 1 -3B2 1 -3D0 1 -393 1 -3B3 1 -394 1 -3B4 1 -388 1 -395 1 -3AD 1 -3B5 1 -3F5 1 -3DC 1 -3DD 1 -3DA 1 -3DB 1 -396 1 -3B6 1 -389 1 -397 1 -3AE 1 -3B7 1 -398 1 -3B8 1 -3D1 1 -3F4 1 -37A 1 -38A 1 -390 1 -399 1 -3AA 1 -3AF 1 -3B9 1 -3CA 1 -3F3 1 -39A 1 -3BA 1 -3F0 1 -3D7 1 -39B 1 -3BB 1 -B5 1 -39C 1 -3BC 1 -39D 1 -3BD 1 -39E 1 -3BE 1 -38C 1 -39F 1 -3BF 1 -3CC 1 -3A0 1 -3C0 1 -3D6 1 -3DE 1 -3DF 1 -3D8 1 -3D9 1 -3A1 1 -3C1 1 -3F1 1 -3A3 1 -3C2 1 -3C3 1 -3F2 1 -3F9 1 -3A4 1 -3C4 1 -38E 1 -3A5 1 -3AB 1 -3B0 1 -3C5 1 -3CB 1 -3CD 1 -3D2 1 -3D3 1 -3D4 1 -3A6 1 -3C6 1 -3D5 1 -3A7 1 -3C7 1 -3A8 1 -3C8 1 -38F 1 -3A9 1 -3C9 1 -3CE 1 -3E0 1 -3E1 1 -3F7 1 -3F8 1 -3FA 1 -3FB 1 -3E2 1 -3E3 1 -3E4 1 -3E5 1 -3E6 1 -3E7 1 -3E8 1 -3E9 1 -3EA 1 -3EB 1 -3EC 1 -3ED 1 -3EE 1 -3EF 1 -410 1 -430 1 -4D0 1 -4D1 1 -4D2 1 -4D3 1 -4D8 1 -4D9 1 -4DA 1 -4DB 1 -4D4 1 -4D5 1 -411 1 -431 1 -412 1 -432 1 -413 1 -433 1 -490 1 -491 1 -492 1 -493 1 -494 1 -495 1 -414 1 -434 1 -500 1 -501 1 -402 1 -452 1 -502 1 -503 1 -403 1 -453 1 -498 1 -499 1 -400 1 -401 1 -415 1 -435 1 -450 1 -451 1 -4D6 1 -4D7 1 -404 1 -454 1 -416 1 -436 1 -4C1 1 -4C2 1 -4DC 1 -4DD 1 -496 1 -497 1 -417 1 -437 1 -504 1 -505 1 -4DE 1 -4DF 1 -405 1 -455 1 -4E0 1 -4E1 1 -506 1 -507 1 -40D 1 -418 1 -438 1 -45D 1 -4E2 1 -4E3 1 -48A 1 -48B 1 -4E4 1 -4E5 1 -406 1 -456 1 -407 1 -457 1 -419 1 -439 1 -408 1 -458 1 -41A 1 -43A 1 -49A 1 -49B 1 -4C3 1 -4C4 1 -4A0 1 -4A1 1 -49E 1 -49F 1 -49C 1 -49D 1 -41B 1 -43B 1 -4C5 1 -4C6 1 -409 1 -459 1 -508 1 -509 1 -41C 1 -43C 1 -4CD 1 -4CE 1 -41D 1 -43D 1 -4C9 1 -4CA 1 -4A2 1 -4A3 1 -4C7 1 -4C8 1 -4A4 1 -4A5 1 -40A 1 -45A 1 -50A 1 -50B 1 -41E 1 -43E 1 -4E6 1 -4E7 1 -4E8 1 -4E9 1 -4EA 1 -4EB 1 -41F 1 -43F 1 -4A6 1 -4A7 1 -480 1 -481 1 -420 1 -440 1 -48E 1 -48F 1 -421 1 -441 1 -50C 1 -50D 1 -4AA 1 -4AB 1 -422 1 -442 1 -50E 1 -50F 1 -4AC 1 -4AD 1 -40B 1 -45B 1 -40C 1 -45C 1 -423 1 -443 1 -4EE 1 -4EF 1 -40E 1 -45E 1 -4F0 1 -4F1 1 -4F2 1 -4F3 1 -4AE 1 -4AF 1 -4B0 1 -4B1 1 -478 1 -479 1 -424 1 -444 1 -425 1 -445 1 -4B2 1 -4B3 1 -4BA 1 -4BB 1 -460 1 -461 1 -47E 1 -47F 1 -47C 1 -47D 1 -47A 1 -47B 1 -426 1 -446 1 -4B4 1 -4B5 1 -427 1 -447 1 -4F4 1 -4F5 1 -4B6 1 -4B7 1 -4CB 1 -4CC 1 -4B8 1 -4B9 1 -4BC 1 -4BD 1 -4BE 1 -4BF 1 -40F 1 -45F 1 -428 1 -448 1 -429 1 -449 1 -42A 1 -44A 1 -42B 1 -44B 1 -4F8 1 -4F9 1 -42C 1 -44C 1 -48C 1 -48D 1 -462 1 -463 1 -42D 1 -44D 1 -4EC 1 -4ED 1 -42E 1 -44E 1 -42F 1 -44F 1 -464 1 -465 1 -466 1 -467 1 -46A 1 -46B 1 -468 1 -469 1 -46C 1 -46D 1 -46E 1 -46F 1 -470 1 -471 1 -472 1 -473 1 -474 1 -475 1 -476 1 -477 1 -4A8 1 -4A9 1 -4C0 1 -531 1 -561 1 -532 1 -562 1 -533 1 -563 1 -534 1 -564 1 -535 1 -565 1 -587 1 -536 1 -566 1 -537 1 -567 1 -538 1 -568 1 -539 1 -569 1 -53A 1 -56A 1 -53B 1 -56B 1 -53C 1 -56C 1 -53D 1 -56D 1 -53E 1 -56E 1 -53F 1 -56F 1 -540 1 -570 1 -541 1 -571 1 -542 1 -572 1 -543 1 -573 1 -544 1 -574 1 -545 1 -575 1 -546 1 -576 1 -547 1 -577 1 -548 1 -578 1 -549 1 -579 1 -54A 1 -57A 1 -54B 1 -57B 1 -54C 1 -57C 1 -54D 1 -57D 1 -54E 1 -57E 1 -54F 1 -57F 1 -550 1 -580 1 -551 1 -581 1 -552 1 -582 1 -553 1 -583 1 -554 1 -584 1 -555 1 -585 1 -556 1 -586 1 -559 1 -5D0 1 -5D1 1 -5D2 1 -5D3 1 -5D4 1 -5D5 1 -5F0 1 -5F1 1 -5D6 1 -5D7 1 -5D8 1 -5D9 1 -5F2 1 -5DA 1 -5DB 1 -5DC 1 -5DD 1 -5DE 1 -5DF 1 -5E0 1 -5E1 1 -5E2 1 -5E3 1 -5E4 1 -5E5 1 -5E6 1 -5E7 1 -5E8 1 -5E9 1 -5EA 1 -621 1 -674 1 -6FD 1 -622 1 -623 1 -672 1 -671 1 -624 1 -625 1 -673 1 -626 1 -627 1 -675 1 -66E 1 -628 1 -67B 1 -67E 1 -680 1 -629 1 -62A 1 -62B 1 -679 1 -67A 1 -67C 1 -67D 1 -67F 1 -62C 1 -683 1 -684 1 -686 1 -6BF 1 -687 1 -62D 1 -62E 1 -681 1 -682 1 -685 1 -62F 1 -630 1 -688 1 -689 1 -68A 1 -68B 1 -68C 1 -68D 1 -68E 1 -68F 1 -690 1 -6EE 1 -631 1 -632 1 -691 1 -692 1 -693 1 -694 1 -695 1 -696 1 -697 1 -698 1 -699 1 -6EF 1 -633 1 -634 1 -69A 1 -69B 1 -69C 1 -6FA 1 -635 1 -636 1 -69D 1 -69E 1 -6FB 1 -637 1 -638 1 -69F 1 -639 1 -63A 1 -6A0 1 -6FC 1 -641 1 -6A1 1 -6A2 1 -6A3 1 -6A4 1 -6A5 1 -6A6 1 -66F 1 -642 1 -6A7 1 -6A8 1 -643 1 -6A9 1 -6AA 1 -6AB 1 -6AC 1 -6AD 1 -6AE 1 -6AF 1 -6B0 1 -6B1 1 -6B2 1 -6B3 1 -6B4 1 -644 1 -6B5 1 -6B6 1 -6B7 1 -6B8 1 -645 1 -6FE 1 -646 1 -6BA 1 -6BB 1 -6BC 1 -6BD 1 -6B9 1 -647 1 -6BE 1 -6C1 1 -6C2 1 -6C3 1 -6FF 1 -6C0 1 -6D5 1 -648 1 -6E5 1 -676 1 -6C4 1 -6C5 1 -6C6 1 -6C7 1 -677 1 -6C8 1 -6C9 1 -6CA 1 -6CB 1 -6CF 1 -649 1 -64A 1 -6E6 1 -678 1 -6CC 1 -6CD 1 -6CE 1 -6D0 1 -6D1 1 -6D2 1 -6D3 1 -710 1 -712 1 -72D 1 -713 1 -714 1 -72E 1 -716 1 -715 1 -72F 1 -717 1 -718 1 -719 1 -74D 1 -71A 1 -71B 1 -71C 1 -71D 1 -71E 1 -71F 1 -74E 1 -720 1 -721 1 -722 1 -723 1 -724 1 -725 1 -726 1 -727 1 -74F 1 -728 1 -729 1 -72A 1 -72B 1 -72C 1 -780 1 -799 1 -79A 1 -781 1 -782 1 -783 1 -79C 1 -784 1 -785 1 -786 1 -787 1 -7A2 1 -7A3 1 -788 1 -7A5 1 -789 1 -78A 1 -78B 1 -79B 1 -78C 1 -798 1 -7A0 1 -7A1 1 -78D 1 -78E 1 -7A4 1 -78F 1 -790 1 -79D 1 -79E 1 -79F 1 -791 1 -792 1 -793 1 -794 1 -795 1 -796 1 -797 1 -7B1 1 -7A6 1 -7A7 1 -7A8 1 -7A9 1 -7AA 1 -7AB 1 -7AC 1 -7AD 1 -7AE 1 -7AF 1 -7B0 1 -4E00 1 -4E01 1 -4E02 1 -4E03 1 -4E04 1 -4E05 1 -4E06 1 -4E07 1 -4E08 1 -4E09 1 -4E0A 1 -4E0B 1 -4E0C 1 -4E0D 1 -4E0E 1 -4E0F 1 -4E10 1 -4E11 1 -4E12 1 -4E13 1 -4E14 1 -4E15 1 -4E16 1 -4E17 1 -4E18 1 -4E19 1 -4E1A 1 -4E1B 1 -4E1C 1 -4E1D 1 -4E1E 1 -4E1F 1 -4E20 1 -4E21 1 -4E22 1 -4E23 1 -4E24 1 -4E25 1 -4E26 1 -4E27 1 -4E28 1 -4E29 1 -4E2A 1 -4E2B 1 -4E2C 1 -4E2D 1 -4E2E 1 -4E2F 1 -4E30 1 -4E31 1 -4E32 1 -4E33 1 -4E34 1 -4E35 1 -4E36 1 -4E37 1 -4E38 1 -4E39 1 -4E3A 1 -4E3B 1 -4E3C 1 -4E3D 1 -4E3E 1 -4E3F 1 -4E40 1 -4E41 1 -4E42 1 -4E43 1 -4E44 1 -4E45 1 -4E46 1 -4E47 1 -4E48 1 -4E49 1 -4E4A 1 -4E4B 1 -4E4C 1 -4E4D 1 -4E4E 1 -4E4F 1 -4E50 1 -4E51 1 -4E52 1 -4E53 1 -4E54 1 -4E55 1 -4E56 1 -4E57 1 -4E58 1 -4E59 1 -4E5A 1 -4E5B 1 -4E5C 1 -4E5D 1 -4E5E 1 -4E5F 1 -4E60 1 -4E61 1 -4E62 1 -4E63 1 -4E64 1 -4E65 1 -4E66 1 -4E67 1 -4E68 1 -4E69 1 -4E6A 1 -4E6B 1 -4E6C 1 -4E6D 1 -4E6E 1 -4E6F 1 -4E70 1 -4E71 1 -4E72 1 -4E73 1 -4E74 1 -4E75 1 -4E76 1 -4E77 1 -4E78 1 -4E79 1 -4E7A 1 -4E7B 1 -4E7C 1 -4E7D 1 -4E7E 1 -4E7F 1 -4E80 1 -4E81 1 -4E82 1 -4E83 1 -4E84 1 -4E85 1 -4E86 1 -4E87 1 -4E88 1 -4E89 1 -4E8A 1 -4E8B 1 -4E8C 1 -4E8D 1 -4E8E 1 -4E8F 1 -4E90 1 -4E91 1 -4E92 1 -4E93 1 -4E94 1 -4E95 1 -4E96 1 -4E97 1 -4E98 1 -4E99 1 -4E9A 1 -4E9B 1 -4E9C 1 -4E9D 1 -4E9E 1 -4E9F 1 -4EA0 1 -4EA1 1 -4EA2 1 -4EA3 1 -4EA4 1 -4EA5 1 -4EA6 1 -4EA7 1 -4EA8 1 -4EA9 1 -4EAA 1 -4EAB 1 -4EAC 1 -4EAD 1 -4EAE 1 -4EAF 1 -4EB0 1 -4EB1 1 -4EB2 1 -4EB3 1 -4EB4 1 -4EB5 1 -4EB6 1 -4EB7 1 -4EB8 1 -4EB9 1 -4EBA 1 -4EBB 1 -4EBC 1 -4EBD 1 -4EBE 1 -4EBF 1 -4EC0 1 -4EC1 1 -4EC2 1 -4EC3 1 -4EC4 1 -4EC5 1 -4EC6 1 -4EC7 1 -4EC8 1 -4EC9 1 -4ECA 1 -4ECB 1 -4ECC 1 -4ECD 1 -4ECE 1 -4ECF 1 -4ED0 1 -4ED1 1 -4ED2 1 -4ED3 1 -4ED4 1 -4ED5 1 -4ED6 1 -4ED7 1 -4ED8 1 -4ED9 1 -4EDA 1 -4EDB 1 -4EDC 1 -4EDD 1 -4EDE 1 -4EDF 1 -4EE0 1 -4EE1 1 -4EE2 1 -4EE3 1 -4EE4 1 -4EE5 1 -4EE6 1 -4EE7 1 -4EE8 1 -4EE9 1 -4EEA 1 -4EEB 1 -4EEC 1 -4EED 1 -4EEE 1 -4EEF 1 -4EF0 1 -4EF1 1 -4EF2 1 -4EF3 1 -4EF4 1 -4EF5 1 -4EF6 1 -4EF7 1 -4EF8 1 -4EF9 1 -4EFA 1 -4EFB 1 -4EFC 1 -4EFD 1 -4EFE 1 -4EFF 1 -4F00 1 -4F01 1 -4F02 1 -4F03 1 -4F04 1 -4F05 1 -4F06 1 -4F07 1 -4F08 1 -4F09 1 -4F0A 1 -4F0B 1 -4F0C 1 -4F0D 1 -4F0E 1 -4F0F 1 -4F10 1 -4F11 1 -4F12 1 -4F13 1 -4F14 1 -4F15 1 -4F16 1 -4F17 1 -4F18 1 -4F19 1 -4F1A 1 -4F1B 1 -4F1C 1 -4F1D 1 -4F1E 1 -4F1F 1 -4F20 1 -4F21 1 -4F22 1 -4F23 1 -4F24 1 -4F25 1 -4F26 1 -4F27 1 -4F28 1 -4F29 1 -4F2A 1 -4F2B 1 -4F2C 1 -4F2D 1 -4F2E 1 -4F2F 1 -4F30 1 -4F31 1 -4F32 1 -4F33 1 -4F34 1 -4F35 1 -4F36 1 -4F37 1 -4F38 1 -4F39 1 -4F3A 1 -4F3B 1 -4F3C 1 -4F3D 1 -4F3E 1 -4F3F 1 -4F40 1 -4F41 1 -4F42 1 -4F43 1 -4F44 1 -4F45 1 -4F46 1 -4F47 1 -4F48 1 -4F49 1 -4F4A 1 -4F4B 1 -4F4C 1 -4F4D 1 -4F4E 1 -4F4F 1 -4F50 1 -4F51 1 -4F52 1 -4F53 1 -4F54 1 -4F55 1 -4F56 1 -4F57 1 -4F58 1 -4F59 1 -4F5A 1 -4F5B 1 -4F5C 1 -4F5D 1 -4F5E 1 -4F5F 1 -4F60 1 -4F61 1 -4F62 1 -4F63 1 -4F64 1 -4F65 1 -4F66 1 -4F67 1 -4F68 1 -4F69 1 -4F6A 1 -4F6B 1 -4F6C 1 -4F6D 1 -4F6E 1 -4F6F 1 -4F70 1 -4F71 1 -4F72 1 -4F73 1 -4F74 1 -4F75 1 -4F76 1 -4F77 1 -4F78 1 -4F79 1 -4F7A 1 -4F7B 1 -4F7C 1 -4F7D 1 -4F7E 1 -4F7F 1 -4F80 1 -4F81 1 -4F82 1 -4F83 1 -4F84 1 -4F85 1 -4F86 1 -4F87 1 -4F88 1 -4F89 1 -4F8A 1 -4F8B 1 -4F8C 1 -4F8D 1 -4F8E 1 -4F8F 1 -4F90 1 -4F91 1 -4F92 1 -4F93 1 -4F94 1 -4F95 1 -4F96 1 -4F97 1 -4F98 1 -4F99 1 -4F9A 1 -4F9B 1 -4F9C 1 -4F9D 1 -4F9E 1 -4F9F 1 -4FA0 1 -4FA1 1 -4FA2 1 -4FA3 1 -4FA4 1 -4FA5 1 -4FA6 1 -4FA7 1 -4FA8 1 -4FA9 1 -4FAA 1 -4FAB 1 -4FAC 1 -4FAD 1 -4FAE 1 -4FAF 1 -4FB0 1 -4FB1 1 -4FB2 1 -4FB3 1 -4FB4 1 -4FB5 1 -4FB6 1 -4FB7 1 -4FB8 1 -4FB9 1 -4FBA 1 -4FBB 1 -4FBC 1 -4FBD 1 -4FBE 1 -4FBF 1 -4FC0 1 -4FC1 1 -4FC2 1 -4FC3 1 -4FC4 1 -4FC5 1 -4FC6 1 -4FC7 1 -4FC8 1 -4FC9 1 -4FCA 1 -4FCB 1 -4FCC 1 -4FCD 1 -4FCE 1 -4FCF 1 -4FD0 1 -4FD1 1 -4FD2 1 -4FD3 1 -4FD4 1 -4FD5 1 -4FD6 1 -4FD7 1 -4FD8 1 -4FD9 1 -4FDA 1 -4FDB 1 -4FDC 1 -4FDD 1 -4FDE 1 -4FDF 1 -4FE0 1 -4FE1 1 -4FE2 1 -4FE3 1 -4FE4 1 -4FE5 1 -4FE6 1 -4FE7 1 -4FE8 1 -4FE9 1 -4FEA 1 -4FEB 1 -4FEC 1 -4FED 1 -4FEE 1 -4FEF 1 -4FF0 1 -4FF1 1 -4FF2 1 -4FF3 1 -4FF4 1 -4FF5 1 -4FF6 1 -4FF7 1 -4FF8 1 -4FF9 1 -4FFA 1 -4FFB 1 -4FFC 1 -4FFD 1 -4FFE 1 -4FFF 1 -237 1 -238 1 -239 1 -23A 1 -23B 1 -23C 1 -23D 1 -23E 1 -23F 1 -240 1 -241 1 -242 1 -243 1 -244 1 -245 1 -246 1 -247 1 -248 1 -249 1 -24A 1 -24B 1 -24C 1 -24D 1 -24E 1 -24F 1 -358 1 -359 1 -35A 1 -35B 1 -35C 1 -370 1 -371 1 -372 1 -373 1 -376 1 -377 1 -378 1 -379 1 -37B 1 -37C 1 -37D 1 -37F 1 -380 1 -381 1 -382 1 -383 1 -38B 1 -38D 1 -3A2 1 -3CF 1 -3FC 1 -3FD 1 -3FE 1 -3FF 1 -487 1 -4CF 1 -4F6 1 -4F7 1 -4FA 1 -4FB 1 -4FC 1 -4FD 1 -4FE 1 -4FF 1 -510 1 -511 1 -512 1 -513 1 -514 1 -515 1 -516 1 -517 1 -518 1 -519 1 -51A 1 -51B 1 -51C 1 -51D 1 -51E 1 -51F 1 -520 1 -521 1 -522 1 -523 1 -524 1 -525 1 -526 1 -527 1 -528 1 -529 1 -52A 1 -52B 1 -52C 1 -52D 1 -52E 1 -52F 1 -530 1 -557 1 -558 1 -560 1 -588 1 -58B 1 -58C 1 -58D 1 -58E 1 -58F 1 -590 1 -5A2 1 -5BA 1 -5C5 1 -5C6 1 -5C7 1 -5C8 1 -5C9 1 -5CA 1 -5CB 1 -5CC 1 -5CD 1 -5CE 1 -5CF 1 -5EB 1 -5EC 1 -5ED 1 -5EE 1 -5EF 1 -5F5 1 -5F6 1 -5F7 1 -5F8 1 -5F9 1 -5FA 1 -5FB 1 -5FC 1 -5FD 1 -5FE 1 -5FF 1 -604 1 -605 1 -606 1 -607 1 -608 1 -609 1 -60A 1 -60B 1 -616 1 -617 1 -618 1 -619 1 -61A 1 -61C 1 -61D 1 -61E 1 -620 1 -63B 1 -63C 1 -63D 1 -63E 1 -63F 1 -659 1 -65A 1 -65B 1 -65C 1 -65D 1 -65E 1 -65F 1 -70E 1 -74B 1 -74C 1 -750 1 -751 1 -752 1 -753 1 -754 1 -755 1 -756 1 -757 1 -758 1 -759 1 -75A 1 -75B 1 -75C 1 -75D 1 -75E 1 -75F 1 -760 1 -761 1 -762 1 -763 1 -764 1 -765 1 -766 1 -767 1 -768 1 -769 1 -76A 1 -76B 1 -76C 1 -76D 1 -76E 1 -76F 1 -770 1 -771 1 -772 1 -773 1 -774 1 -775 1 -776 1 -777 1 -778 1 -779 1 -77A 1 -77B 1 -77C 1 -77D 1 -77E 1 -77F 1 -7B2 1 -7B3 1 -7B4 1 -7B5 1 -7B6 1 -7B7 1 -7B8 1 -7B9 1 -7BA 1 -7BB 1 -7BC 1 -7BD 1 -7BE 1 -7BF 1 -7C0 1 -7C1 1 -7C2 1 -7C3 1 -7C4 1 -7C5 1 -7C6 1 -7C7 1 -7C8 1 -7C9 1 -7CA 1 -7CB 1 -7CC 1 -7CD 1 -7CE 1 -7CF 1 -7D0 1 -7D1 1 -7D2 1 -7D3 1 -7D4 1 -7D5 1 -7D6 1 -7D7 1 -7D8 1 -7D9 1 -7DA 1 -7DB 1 -7DC 1 -7DD 1 -7DE 1 -7DF 1 -7E0 1 -7E1 1 -7E2 1 -7E3 1 -7E4 1 -7E5 1 -7E6 1 -7E7 1 -7E8 1 -7E9 1 -7EA 1 -7EB 1 -7EC 1 -7ED 1 -7EE 1 -7EF 1 -7F0 1 -7F1 1 -7F2 1 -7F3 1 -7F4 1 -7F5 1 -7F6 1 -7F7 1 -7F8 1 -7F9 1 -7FA 1 -7FB 1 -7FC 1 -7FD 1 -7FE 1 -7FF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -SET NAMES utf8; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=NDB CHARACTER SET utf8; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_general_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_danish_ci; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -85 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -300 1 -301 1 -302 1 -303 1 -304 1 -305 1 -306 1 -307 1 -308 1 -309 1 -30A 1 -30B 1 -30C 1 -30D 1 -30E 1 -30F 1 -310 1 -311 1 -312 1 -313 1 -314 1 -315 1 -316 1 -317 1 -318 1 -319 1 -31A 1 -31B 1 -31C 1 -31D 1 -31E 1 -31F 1 -320 1 -321 1 -322 1 -323 1 -324 1 -325 1 -326 1 -327 1 -328 1 -329 1 -32A 1 -32B 1 -32C 1 -32D 1 -32E 1 -32F 1 -330 1 -331 1 -332 1 -333 1 -334 1 -335 1 -336 1 -337 1 -338 1 -339 1 -33A 1 -33B 1 -33C 1 -33D 1 -33E 1 -33F 1 -340 1 -341 1 -342 1 -343 1 -344 1 -345 1 -346 1 -347 1 -348 1 -349 1 -34A 1 -34B 1 -34C 1 -34D 1 -34E 1 -34F 1 -350 1 -351 1 -352 1 -353 1 -354 1 -355 1 -356 1 -357 1 -35D 1 -35E 1 -35F 1 -360 1 -361 1 -362 1 -483 1 -484 1 -485 1 -486 1 -488 1 -489 1 -591 1 -592 1 -593 1 -594 1 -595 1 -596 1 -597 1 -598 1 -599 1 -59A 1 -59B 1 -59C 1 -59D 1 -59E 1 -59F 1 -5A0 1 -5A1 1 -5A3 1 -5A4 1 -5A5 1 -5A6 1 -5A7 1 -5A8 1 -5A9 1 -5AA 1 -5AB 1 -5AC 1 -5AD 1 -5AE 1 -5AF 1 -5B0 1 -5B1 1 -5B2 1 -5B3 1 -5B4 1 -5B5 1 -5B6 1 -5B7 1 -5B8 1 -5B9 1 -5BB 1 -5BC 1 -5BD 1 -5BF 1 -5C1 1 -5C2 1 -5C4 1 -600 1 -601 1 -602 1 -603 1 -610 1 -611 1 -612 1 -613 1 -614 1 -615 1 -64B 1 -64C 1 -64D 1 -64E 1 -64F 1 -650 1 -651 1 -652 1 -653 1 -654 1 -655 1 -656 1 -657 1 -658 1 -670 1 -6D6 1 -6D7 1 -6D8 1 -6D9 1 -6DA 1 -6DB 1 -6DC 1 -6DD 1 -6DE 1 -6DF 1 -6E0 1 -6E1 1 -6E2 1 -6E3 1 -6E4 1 -6E7 1 -6E8 1 -6EA 1 -6EB 1 -6EC 1 -6ED 1 -70F 1 -711 1 -730 1 -731 1 -732 1 -733 1 -734 1 -735 1 -736 1 -737 1 -738 1 -739 1 -73A 1 -73B 1 -73C 1 -73D 1 -73E 1 -73F 1 -740 1 -741 1 -742 1 -743 1 -744 1 -745 1 -746 1 -747 1 -748 1 -749 1 -74A 1 -640 1 -60 1 -B4 1 -384 1 -2DC 1 -5E 1 -AF 1 -2D8 1 -2D9 1 -A8 1 -385 1 -2DA 1 -2DD 1 -B8 1 -2DB 1 -5F 1 -AD 1 -2D 1 -58A 1 -2C 1 -55D 1 -60C 1 -60D 1 -66B 1 -66C 1 -3B 1 -37E 1 -61B 1 -3A 1 -589 1 -703 1 -704 1 -705 1 -706 1 -707 1 -708 1 -21 1 -A1 1 -55C 1 -3F 1 -BF 1 -55E 1 -61F 1 -709 1 -2E 1 -6D4 1 -701 1 -702 1 -B7 1 -387 1 -700 1 -27 1 -22 1 -AB 1 -BB 1 -28 1 -29 1 -5B 1 -7B 1 -7D 1 -A7 1 -B6 1 -A9 1 -AE 1 -40 1 -2A 1 -66D 1 -2F 1 -26 1 -23 1 -25 1 -66A 1 -55A 1 -55B 1 -55F 1 -5BE 1 -5C0 1 -5C3 1 -5F3 1 -5F4 1 -70A 1 -70B 1 -70C 1 -70D 1 -2B9 1 -374 1 -375 1 -2BA 1 -2C2 1 -2C3 1 -2C4 1 -2C5 1 -2C6 1 -2C7 1 -2C8 1 -2C9 1 -2CA 1 -2CB 1 -2CC 1 -2CD 1 -2CE 1 -2CF 1 -2D2 1 -2D3 1 -2D4 1 -2D5 1 -2D6 1 -2D7 1 -2DE 1 -2DF 1 -2E5 1 -2E6 1 -2E7 1 -2E8 1 -2E9 1 -2EA 1 -2EB 1 -2EC 1 -2ED 1 -2EF 1 -2F0 1 -2F1 1 -2F2 1 -2F3 1 -2F4 1 -2F5 1 -2F6 1 -2F7 1 -2F8 1 -2F9 1 -2FA 1 -2FB 1 -2FC 1 -2FD 1 -2FE 1 -2FF 1 -B0 1 -482 1 -60E 1 -60F 1 -6E9 1 -3F6 1 -2B 1 -B1 1 -F7 1 -D7 1 -3C 1 -3D 1 -3E 1 -AC 1 -7C 1 -A6 1 -7E 1 -2D0 1 -2D1 1 -A4 1 -A2 1 -24 1 -A3 1 -A5 1 -30 1 -660 1 -6F0 1 -31 1 -B9 1 -661 1 -6F1 1 -BD 1 -BC 1 -32 1 -B2 1 -662 1 -6F2 1 -33 1 -B3 1 -663 1 -6F3 1 -BE 1 -34 1 -664 1 -6F4 1 -35 1 -665 1 -6F5 1 -36 1 -666 1 -6F6 1 -37 1 -667 1 -6F7 1 -38 1 -668 1 -6F8 1 -39 1 -669 1 -6F9 1 -41 1 -61 1 -AA 1 -C0 1 -C1 1 -C2 1 -C3 1 -E0 1 -E1 1 -E2 1 -E3 1 -100 1 -101 1 -102 1 -103 1 -104 1 -105 1 -1CD 1 -1CE 1 -1DE 1 -1DF 1 -1E0 1 -1E1 1 -1FA 1 -1FB 1 -200 1 -201 1 -202 1 -203 1 -226 1 -227 1 -363 1 -1E2 1 -1E3 1 -1FC 1 -1FD 1 -250 1 -251 1 -252 1 -42 1 -62 1 -299 1 -180 1 -181 1 -253 1 -182 1 -183 1 -43 1 -63 1 -C7 1 -E7 1 -106 1 -107 1 -108 1 -109 1 -10A 1 -10B 1 -10C 1 -10D 1 -368 1 -187 1 -188 1 -255 1 -44 1 -64 1 -10E 1 -10F 1 -369 1 -1C4 1 -1C5 1 -1C6 1 -1F1 1 -1F2 1 -1F3 1 -2A3 1 -2A5 1 -2A4 1 -110 1 -111 1 -189 1 -256 1 -18A 1 -257 1 -18B 1 -18C 1 -221 1 -D0 1 -F0 1 -45 1 -65 1 -C8 1 -C9 1 -CA 1 -CB 1 -E8 1 -E9 1 -EA 1 -EB 1 -112 1 -113 1 -114 1 -115 1 -116 1 -117 1 -118 1 -119 1 -11A 1 -11B 1 -204 1 -205 1 -206 1 -207 1 -228 1 -229 1 -364 1 -18E 1 -1DD 1 -18F 1 -259 1 -190 1 -25B 1 -258 1 -25A 1 -25C 1 -25D 1 -25E 1 -29A 1 -264 1 -46 1 -66 1 -2A9 1 -191 1 -192 1 -47 1 -67 1 -11C 1 -11D 1 -11E 1 -11F 1 -120 1 -121 1 -122 1 -123 1 -1E6 1 -1E7 1 -1F4 1 -1F5 1 -261 1 -262 1 -1E4 1 -1E5 1 -193 1 -260 1 -29B 1 -194 1 -263 1 -2E0 1 -1A2 1 -1A3 1 -48 1 -68 1 -124 1 -125 1 -21E 1 -21F 1 -2B0 1 -36A 1 -29C 1 -195 1 -1F6 1 -126 1 -127 1 -266 1 -2B1 1 -267 1 -2BB 1 -2BD 1 -49 1 -69 1 -CC 1 -CD 1 -CE 1 -CF 1 -EC 1 -ED 1 -EE 1 -EF 1 -128 1 -129 1 -12A 1 -12B 1 -12C 1 -12D 1 -12E 1 -12F 1 -130 1 -1CF 1 -1D0 1 -208 1 -209 1 -20A 1 -20B 1 -365 1 -132 1 -133 1 -131 1 -26A 1 -197 1 -268 1 -196 1 -269 1 -4A 1 -6A 1 -134 1 -135 1 -1F0 1 -2B2 1 -29D 1 -25F 1 -284 1 -4B 1 -6B 1 -136 1 -137 1 -1E8 1 -1E9 1 -198 1 -199 1 -29E 1 -4C 1 -6C 1 -139 1 -13A 1 -13B 1 -13C 1 -13D 1 -13E 1 -2E1 1 -13F 1 -140 1 -1C7 1 -1C8 1 -1C9 1 -2AA 1 -2AB 1 -29F 1 -141 1 -142 1 -19A 1 -26B 1 -26C 1 -26D 1 -234 1 -26E 1 -19B 1 -28E 1 -4D 1 -6D 1 -36B 1 -271 1 -4E 1 -6E 1 -D1 1 -F1 1 -143 1 -144 1 -145 1 -146 1 -147 1 -148 1 -1F8 1 -1F9 1 -1CA 1 -1CB 1 -1CC 1 -274 1 -19D 1 -272 1 -19E 1 -220 1 -273 1 -235 1 -14A 1 -14B 1 -4F 1 -6F 1 -BA 1 -D2 1 -D3 1 -D4 1 -D5 1 -F2 1 -F3 1 -F4 1 -F5 1 -14C 1 -14D 1 -14E 1 -14F 1 -1A0 1 -1A1 1 -1D1 1 -1D2 1 -1EA 1 -1EB 1 -1EC 1 -1ED 1 -20C 1 -20D 1 -20E 1 -20F 1 -22A 1 -22B 1 -22C 1 -22D 1 -22E 1 -22F 1 -230 1 -231 1 -366 1 -152 1 -153 1 -276 1 -1FE 1 -1FF 1 -186 1 -254 1 -19F 1 -275 1 -277 1 -222 1 -223 1 -50 1 -70 1 -1A4 1 -1A5 1 -278 1 -51 1 -71 1 -2A0 1 -138 1 -52 1 -72 1 -154 1 -155 1 -156 1 -157 1 -158 1 -159 1 -210 1 -211 1 -212 1 -213 1 -2B3 1 -36C 1 -1A6 1 -280 1 -279 1 -2B4 1 -27A 1 -27B 1 -2B5 1 -27C 1 -27D 1 -27E 1 -27F 1 -281 1 -2B6 1 -53 1 -73 1 -15A 1 -15B 1 -15C 1 -15D 1 -15E 1 -15F 1 -160 1 -161 1 -17F 1 -218 1 -219 1 -2E2 1 -DF 1 -282 1 -1A9 1 -283 1 -1AA 1 -285 1 -286 1 -54 1 -74 1 -162 1 -163 1 -164 1 -165 1 -21A 1 -21B 1 -36D 1 -2A8 1 -1BE 1 -2A6 1 -2A7 1 -166 1 -167 1 -1AB 1 -1AC 1 -1AD 1 -1AE 1 -288 1 -236 1 -287 1 -55 1 -75 1 -D9 1 -DA 1 -DB 1 -F9 1 -FA 1 -FB 1 -168 1 -169 1 -16A 1 -16B 1 -16C 1 -16D 1 -16E 1 -16F 1 -172 1 -173 1 -1AF 1 -1B0 1 -1D3 1 -1D4 1 -1D5 1 -1D6 1 -1D7 1 -1D8 1 -1D9 1 -1DA 1 -1DB 1 -1DC 1 -214 1 -215 1 -216 1 -217 1 -367 1 -289 1 -265 1 -2AE 1 -2AF 1 -19C 1 -26F 1 -270 1 -1B1 1 -28A 1 -56 1 -76 1 -36E 1 -1B2 1 -28B 1 -28C 1 -57 1 -77 1 -174 1 -175 1 -2B7 1 -28D 1 -58 1 -78 1 -2E3 1 -36F 1 -59 1 -79 1 -DC 1 -DD 1 -FC 1 -FD 1 -FF 1 -170 1 -171 1 -176 1 -177 1 -178 1 -232 1 -233 1 -2B8 1 -28F 1 -1B3 1 -1B4 1 -5A 1 -7A 1 -179 1 -17A 1 -17B 1 -17C 1 -17D 1 -17E 1 -18D 1 -C4 1 -C6 1 -E4 1 -E6 1 -D6 1 -D8 1 -F6 1 -F8 1 -150 1 -151 1 -C5 1 -E5 1 -1B5 1 -1B6 1 -224 1 -225 1 -290 1 -291 1 -1B7 1 -1EE 1 -1EF 1 -292 1 -1B8 1 -1B9 1 -1BA 1 -293 1 -21C 1 -21D 1 -DE 1 -FE 1 -1BF 1 -1F7 1 -1BB 1 -1A7 1 -1A8 1 -1BC 1 -1BD 1 -184 1 -185 1 -294 1 -2C0 1 -2BC 1 -149 1 -2EE 1 -2BE 1 -295 1 -2E4 1 -2BF 1 -2C1 1 -2A1 1 -2A2 1 -296 1 -1C0 1 -1C1 1 -1C2 1 -1C3 1 -297 1 -298 1 -2AC 1 -2AD 1 -386 1 -391 1 -3AC 1 -3B1 1 -392 1 -3B2 1 -3D0 1 -393 1 -3B3 1 -394 1 -3B4 1 -388 1 -395 1 -3AD 1 -3B5 1 -3F5 1 -3DC 1 -3DD 1 -3DA 1 -3DB 1 -396 1 -3B6 1 -389 1 -397 1 -3AE 1 -3B7 1 -398 1 -3B8 1 -3D1 1 -3F4 1 -37A 1 -38A 1 -390 1 -399 1 -3AA 1 -3AF 1 -3B9 1 -3CA 1 -3F3 1 -39A 1 -3BA 1 -3F0 1 -3D7 1 -39B 1 -3BB 1 -B5 1 -39C 1 -3BC 1 -39D 1 -3BD 1 -39E 1 -3BE 1 -38C 1 -39F 1 -3BF 1 -3CC 1 -3A0 1 -3C0 1 -3D6 1 -3DE 1 -3DF 1 -3D8 1 -3D9 1 -3A1 1 -3C1 1 -3F1 1 -3A3 1 -3C2 1 -3C3 1 -3F2 1 -3F9 1 -3A4 1 -3C4 1 -38E 1 -3A5 1 -3AB 1 -3B0 1 -3C5 1 -3CB 1 -3CD 1 -3D2 1 -3D3 1 -3D4 1 -3A6 1 -3C6 1 -3D5 1 -3A7 1 -3C7 1 -3A8 1 -3C8 1 -38F 1 -3A9 1 -3C9 1 -3CE 1 -3E0 1 -3E1 1 -3F7 1 -3F8 1 -3FA 1 -3FB 1 -3E2 1 -3E3 1 -3E4 1 -3E5 1 -3E6 1 -3E7 1 -3E8 1 -3E9 1 -3EA 1 -3EB 1 -3EC 1 -3ED 1 -3EE 1 -3EF 1 -410 1 -430 1 -4D0 1 -4D1 1 -4D2 1 -4D3 1 -4D8 1 -4D9 1 -4DA 1 -4DB 1 -4D4 1 -4D5 1 -411 1 -431 1 -412 1 -432 1 -413 1 -433 1 -490 1 -491 1 -492 1 -493 1 -494 1 -495 1 -414 1 -434 1 -500 1 -501 1 -402 1 -452 1 -502 1 -503 1 -403 1 -453 1 -498 1 -499 1 -400 1 -401 1 -415 1 -435 1 -450 1 -451 1 -4D6 1 -4D7 1 -404 1 -454 1 -416 1 -436 1 -4C1 1 -4C2 1 -4DC 1 -4DD 1 -496 1 -497 1 -417 1 -437 1 -504 1 -505 1 -4DE 1 -4DF 1 -405 1 -455 1 -4E0 1 -4E1 1 -506 1 -507 1 -40D 1 -418 1 -438 1 -45D 1 -4E2 1 -4E3 1 -48A 1 -48B 1 -4E4 1 -4E5 1 -406 1 -456 1 -407 1 -457 1 -419 1 -439 1 -408 1 -458 1 -41A 1 -43A 1 -49A 1 -49B 1 -4C3 1 -4C4 1 -4A0 1 -4A1 1 -49E 1 -49F 1 -49C 1 -49D 1 -41B 1 -43B 1 -4C5 1 -4C6 1 -409 1 -459 1 -508 1 -509 1 -41C 1 -43C 1 -4CD 1 -4CE 1 -41D 1 -43D 1 -4C9 1 -4CA 1 -4A2 1 -4A3 1 -4C7 1 -4C8 1 -4A4 1 -4A5 1 -40A 1 -45A 1 -50A 1 -50B 1 -41E 1 -43E 1 -4E6 1 -4E7 1 -4E8 1 -4E9 1 -4EA 1 -4EB 1 -41F 1 -43F 1 -4A6 1 -4A7 1 -480 1 -481 1 -420 1 -440 1 -48E 1 -48F 1 -421 1 -441 1 -50C 1 -50D 1 -4AA 1 -4AB 1 -422 1 -442 1 -50E 1 -50F 1 -4AC 1 -4AD 1 -40B 1 -45B 1 -40C 1 -45C 1 -423 1 -443 1 -4EE 1 -4EF 1 -40E 1 -45E 1 -4F0 1 -4F1 1 -4F2 1 -4F3 1 -4AE 1 -4AF 1 -4B0 1 -4B1 1 -478 1 -479 1 -424 1 -444 1 -425 1 -445 1 -4B2 1 -4B3 1 -4BA 1 -4BB 1 -460 1 -461 1 -47E 1 -47F 1 -47C 1 -47D 1 -47A 1 -47B 1 -426 1 -446 1 -4B4 1 -4B5 1 -427 1 -447 1 -4F4 1 -4F5 1 -4B6 1 -4B7 1 -4CB 1 -4CC 1 -4B8 1 -4B9 1 -4BC 1 -4BD 1 -4BE 1 -4BF 1 -40F 1 -45F 1 -428 1 -448 1 -429 1 -449 1 -42A 1 -44A 1 -42B 1 -44B 1 -4F8 1 -4F9 1 -42C 1 -44C 1 -48C 1 -48D 1 -462 1 -463 1 -42D 1 -44D 1 -4EC 1 -4ED 1 -42E 1 -44E 1 -42F 1 -44F 1 -464 1 -465 1 -466 1 -467 1 -46A 1 -46B 1 -468 1 -469 1 -46C 1 -46D 1 -46E 1 -46F 1 -470 1 -471 1 -472 1 -473 1 -474 1 -475 1 -476 1 -477 1 -4A8 1 -4A9 1 -4C0 1 -531 1 -561 1 -532 1 -562 1 -533 1 -563 1 -534 1 -564 1 -535 1 -565 1 -587 1 -536 1 -566 1 -537 1 -567 1 -538 1 -568 1 -539 1 -569 1 -53A 1 -56A 1 -53B 1 -56B 1 -53C 1 -56C 1 -53D 1 -56D 1 -53E 1 -56E 1 -53F 1 -56F 1 -540 1 -570 1 -541 1 -571 1 -542 1 -572 1 -543 1 -573 1 -544 1 -574 1 -545 1 -575 1 -546 1 -576 1 -547 1 -577 1 -548 1 -578 1 -549 1 -579 1 -54A 1 -57A 1 -54B 1 -57B 1 -54C 1 -57C 1 -54D 1 -57D 1 -54E 1 -57E 1 -54F 1 -57F 1 -550 1 -580 1 -551 1 -581 1 -552 1 -582 1 -553 1 -583 1 -554 1 -584 1 -555 1 -585 1 -556 1 -586 1 -559 1 -5D0 1 -5D1 1 -5D2 1 -5D3 1 -5D4 1 -5D5 1 -5F0 1 -5F1 1 -5D6 1 -5D7 1 -5D8 1 -5D9 1 -5F2 1 -5DA 1 -5DB 1 -5DC 1 -5DD 1 -5DE 1 -5DF 1 -5E0 1 -5E1 1 -5E2 1 -5E3 1 -5E4 1 -5E5 1 -5E6 1 -5E7 1 -5E8 1 -5E9 1 -5EA 1 -621 1 -674 1 -6FD 1 -622 1 -623 1 -672 1 -671 1 -624 1 -625 1 -673 1 -626 1 -627 1 -675 1 -66E 1 -628 1 -67B 1 -67E 1 -680 1 -629 1 -62A 1 -62B 1 -679 1 -67A 1 -67C 1 -67D 1 -67F 1 -62C 1 -683 1 -684 1 -686 1 -6BF 1 -687 1 -62D 1 -62E 1 -681 1 -682 1 -685 1 -62F 1 -630 1 -688 1 -689 1 -68A 1 -68B 1 -68C 1 -68D 1 -68E 1 -68F 1 -690 1 -6EE 1 -631 1 -632 1 -691 1 -692 1 -693 1 -694 1 -695 1 -696 1 -697 1 -698 1 -699 1 -6EF 1 -633 1 -634 1 -69A 1 -69B 1 -69C 1 -6FA 1 -635 1 -636 1 -69D 1 -69E 1 -6FB 1 -637 1 -638 1 -69F 1 -639 1 -63A 1 -6A0 1 -6FC 1 -641 1 -6A1 1 -6A2 1 -6A3 1 -6A4 1 -6A5 1 -6A6 1 -66F 1 -642 1 -6A7 1 -6A8 1 -643 1 -6A9 1 -6AA 1 -6AB 1 -6AC 1 -6AD 1 -6AE 1 -6AF 1 -6B0 1 -6B1 1 -6B2 1 -6B3 1 -6B4 1 -644 1 -6B5 1 -6B6 1 -6B7 1 -6B8 1 -645 1 -6FE 1 -646 1 -6BA 1 -6BB 1 -6BC 1 -6BD 1 -6B9 1 -647 1 -6BE 1 -6C1 1 -6C2 1 -6C3 1 -6FF 1 -6C0 1 -6D5 1 -648 1 -6E5 1 -676 1 -6C4 1 -6C5 1 -6C6 1 -6C7 1 -677 1 -6C8 1 -6C9 1 -6CA 1 -6CB 1 -6CF 1 -649 1 -64A 1 -6E6 1 -678 1 -6CC 1 -6CD 1 -6CE 1 -6D0 1 -6D1 1 -6D2 1 -6D3 1 -710 1 -712 1 -72D 1 -713 1 -714 1 -72E 1 -716 1 -715 1 -72F 1 -717 1 -718 1 -719 1 -74D 1 -71A 1 -71B 1 -71C 1 -71D 1 -71E 1 -71F 1 -74E 1 -720 1 -721 1 -722 1 -723 1 -724 1 -725 1 -726 1 -727 1 -74F 1 -728 1 -729 1 -72A 1 -72B 1 -72C 1 -780 1 -799 1 -79A 1 -781 1 -782 1 -783 1 -79C 1 -784 1 -785 1 -786 1 -787 1 -7A2 1 -7A3 1 -788 1 -7A5 1 -789 1 -78A 1 -78B 1 -79B 1 -78C 1 -798 1 -7A0 1 -7A1 1 -78D 1 -78E 1 -7A4 1 -78F 1 -790 1 -79D 1 -79E 1 -79F 1 -791 1 -792 1 -793 1 -794 1 -795 1 -796 1 -797 1 -7B1 1 -7A6 1 -7A7 1 -7A8 1 -7A9 1 -7AA 1 -7AB 1 -7AC 1 -7AD 1 -7AE 1 -7AF 1 -7B0 1 -4E00 1 -4E01 1 -4E02 1 -4E03 1 -4E04 1 -4E05 1 -4E06 1 -4E07 1 -4E08 1 -4E09 1 -4E0A 1 -4E0B 1 -4E0C 1 -4E0D 1 -4E0E 1 -4E0F 1 -4E10 1 -4E11 1 -4E12 1 -4E13 1 -4E14 1 -4E15 1 -4E16 1 -4E17 1 -4E18 1 -4E19 1 -4E1A 1 -4E1B 1 -4E1C 1 -4E1D 1 -4E1E 1 -4E1F 1 -4E20 1 -4E21 1 -4E22 1 -4E23 1 -4E24 1 -4E25 1 -4E26 1 -4E27 1 -4E28 1 -4E29 1 -4E2A 1 -4E2B 1 -4E2C 1 -4E2D 1 -4E2E 1 -4E2F 1 -4E30 1 -4E31 1 -4E32 1 -4E33 1 -4E34 1 -4E35 1 -4E36 1 -4E37 1 -4E38 1 -4E39 1 -4E3A 1 -4E3B 1 -4E3C 1 -4E3D 1 -4E3E 1 -4E3F 1 -4E40 1 -4E41 1 -4E42 1 -4E43 1 -4E44 1 -4E45 1 -4E46 1 -4E47 1 -4E48 1 -4E49 1 -4E4A 1 -4E4B 1 -4E4C 1 -4E4D 1 -4E4E 1 -4E4F 1 -4E50 1 -4E51 1 -4E52 1 -4E53 1 -4E54 1 -4E55 1 -4E56 1 -4E57 1 -4E58 1 -4E59 1 -4E5A 1 -4E5B 1 -4E5C 1 -4E5D 1 -4E5E 1 -4E5F 1 -4E60 1 -4E61 1 -4E62 1 -4E63 1 -4E64 1 -4E65 1 -4E66 1 -4E67 1 -4E68 1 -4E69 1 -4E6A 1 -4E6B 1 -4E6C 1 -4E6D 1 -4E6E 1 -4E6F 1 -4E70 1 -4E71 1 -4E72 1 -4E73 1 -4E74 1 -4E75 1 -4E76 1 -4E77 1 -4E78 1 -4E79 1 -4E7A 1 -4E7B 1 -4E7C 1 -4E7D 1 -4E7E 1 -4E7F 1 -4E80 1 -4E81 1 -4E82 1 -4E83 1 -4E84 1 -4E85 1 -4E86 1 -4E87 1 -4E88 1 -4E89 1 -4E8A 1 -4E8B 1 -4E8C 1 -4E8D 1 -4E8E 1 -4E8F 1 -4E90 1 -4E91 1 -4E92 1 -4E93 1 -4E94 1 -4E95 1 -4E96 1 -4E97 1 -4E98 1 -4E99 1 -4E9A 1 -4E9B 1 -4E9C 1 -4E9D 1 -4E9E 1 -4E9F 1 -4EA0 1 -4EA1 1 -4EA2 1 -4EA3 1 -4EA4 1 -4EA5 1 -4EA6 1 -4EA7 1 -4EA8 1 -4EA9 1 -4EAA 1 -4EAB 1 -4EAC 1 -4EAD 1 -4EAE 1 -4EAF 1 -4EB0 1 -4EB1 1 -4EB2 1 -4EB3 1 -4EB4 1 -4EB5 1 -4EB6 1 -4EB7 1 -4EB8 1 -4EB9 1 -4EBA 1 -4EBB 1 -4EBC 1 -4EBD 1 -4EBE 1 -4EBF 1 -4EC0 1 -4EC1 1 -4EC2 1 -4EC3 1 -4EC4 1 -4EC5 1 -4EC6 1 -4EC7 1 -4EC8 1 -4EC9 1 -4ECA 1 -4ECB 1 -4ECC 1 -4ECD 1 -4ECE 1 -4ECF 1 -4ED0 1 -4ED1 1 -4ED2 1 -4ED3 1 -4ED4 1 -4ED5 1 -4ED6 1 -4ED7 1 -4ED8 1 -4ED9 1 -4EDA 1 -4EDB 1 -4EDC 1 -4EDD 1 -4EDE 1 -4EDF 1 -4EE0 1 -4EE1 1 -4EE2 1 -4EE3 1 -4EE4 1 -4EE5 1 -4EE6 1 -4EE7 1 -4EE8 1 -4EE9 1 -4EEA 1 -4EEB 1 -4EEC 1 -4EED 1 -4EEE 1 -4EEF 1 -4EF0 1 -4EF1 1 -4EF2 1 -4EF3 1 -4EF4 1 -4EF5 1 -4EF6 1 -4EF7 1 -4EF8 1 -4EF9 1 -4EFA 1 -4EFB 1 -4EFC 1 -4EFD 1 -4EFE 1 -4EFF 1 -4F00 1 -4F01 1 -4F02 1 -4F03 1 -4F04 1 -4F05 1 -4F06 1 -4F07 1 -4F08 1 -4F09 1 -4F0A 1 -4F0B 1 -4F0C 1 -4F0D 1 -4F0E 1 -4F0F 1 -4F10 1 -4F11 1 -4F12 1 -4F13 1 -4F14 1 -4F15 1 -4F16 1 -4F17 1 -4F18 1 -4F19 1 -4F1A 1 -4F1B 1 -4F1C 1 -4F1D 1 -4F1E 1 -4F1F 1 -4F20 1 -4F21 1 -4F22 1 -4F23 1 -4F24 1 -4F25 1 -4F26 1 -4F27 1 -4F28 1 -4F29 1 -4F2A 1 -4F2B 1 -4F2C 1 -4F2D 1 -4F2E 1 -4F2F 1 -4F30 1 -4F31 1 -4F32 1 -4F33 1 -4F34 1 -4F35 1 -4F36 1 -4F37 1 -4F38 1 -4F39 1 -4F3A 1 -4F3B 1 -4F3C 1 -4F3D 1 -4F3E 1 -4F3F 1 -4F40 1 -4F41 1 -4F42 1 -4F43 1 -4F44 1 -4F45 1 -4F46 1 -4F47 1 -4F48 1 -4F49 1 -4F4A 1 -4F4B 1 -4F4C 1 -4F4D 1 -4F4E 1 -4F4F 1 -4F50 1 -4F51 1 -4F52 1 -4F53 1 -4F54 1 -4F55 1 -4F56 1 -4F57 1 -4F58 1 -4F59 1 -4F5A 1 -4F5B 1 -4F5C 1 -4F5D 1 -4F5E 1 -4F5F 1 -4F60 1 -4F61 1 -4F62 1 -4F63 1 -4F64 1 -4F65 1 -4F66 1 -4F67 1 -4F68 1 -4F69 1 -4F6A 1 -4F6B 1 -4F6C 1 -4F6D 1 -4F6E 1 -4F6F 1 -4F70 1 -4F71 1 -4F72 1 -4F73 1 -4F74 1 -4F75 1 -4F76 1 -4F77 1 -4F78 1 -4F79 1 -4F7A 1 -4F7B 1 -4F7C 1 -4F7D 1 -4F7E 1 -4F7F 1 -4F80 1 -4F81 1 -4F82 1 -4F83 1 -4F84 1 -4F85 1 -4F86 1 -4F87 1 -4F88 1 -4F89 1 -4F8A 1 -4F8B 1 -4F8C 1 -4F8D 1 -4F8E 1 -4F8F 1 -4F90 1 -4F91 1 -4F92 1 -4F93 1 -4F94 1 -4F95 1 -4F96 1 -4F97 1 -4F98 1 -4F99 1 -4F9A 1 -4F9B 1 -4F9C 1 -4F9D 1 -4F9E 1 -4F9F 1 -4FA0 1 -4FA1 1 -4FA2 1 -4FA3 1 -4FA4 1 -4FA5 1 -4FA6 1 -4FA7 1 -4FA8 1 -4FA9 1 -4FAA 1 -4FAB 1 -4FAC 1 -4FAD 1 -4FAE 1 -4FAF 1 -4FB0 1 -4FB1 1 -4FB2 1 -4FB3 1 -4FB4 1 -4FB5 1 -4FB6 1 -4FB7 1 -4FB8 1 -4FB9 1 -4FBA 1 -4FBB 1 -4FBC 1 -4FBD 1 -4FBE 1 -4FBF 1 -4FC0 1 -4FC1 1 -4FC2 1 -4FC3 1 -4FC4 1 -4FC5 1 -4FC6 1 -4FC7 1 -4FC8 1 -4FC9 1 -4FCA 1 -4FCB 1 -4FCC 1 -4FCD 1 -4FCE 1 -4FCF 1 -4FD0 1 -4FD1 1 -4FD2 1 -4FD3 1 -4FD4 1 -4FD5 1 -4FD6 1 -4FD7 1 -4FD8 1 -4FD9 1 -4FDA 1 -4FDB 1 -4FDC 1 -4FDD 1 -4FDE 1 -4FDF 1 -4FE0 1 -4FE1 1 -4FE2 1 -4FE3 1 -4FE4 1 -4FE5 1 -4FE6 1 -4FE7 1 -4FE8 1 -4FE9 1 -4FEA 1 -4FEB 1 -4FEC 1 -4FED 1 -4FEE 1 -4FEF 1 -4FF0 1 -4FF1 1 -4FF2 1 -4FF3 1 -4FF4 1 -4FF5 1 -4FF6 1 -4FF7 1 -4FF8 1 -4FF9 1 -4FFA 1 -4FFB 1 -4FFC 1 -4FFD 1 -4FFE 1 -4FFF 1 -237 1 -238 1 -239 1 -23A 1 -23B 1 -23C 1 -23D 1 -23E 1 -23F 1 -240 1 -241 1 -242 1 -243 1 -244 1 -245 1 -246 1 -247 1 -248 1 -249 1 -24A 1 -24B 1 -24C 1 -24D 1 -24E 1 -24F 1 -358 1 -359 1 -35A 1 -35B 1 -35C 1 -370 1 -371 1 -372 1 -373 1 -376 1 -377 1 -378 1 -379 1 -37B 1 -37C 1 -37D 1 -37F 1 -380 1 -381 1 -382 1 -383 1 -38B 1 -38D 1 -3A2 1 -3CF 1 -3FC 1 -3FD 1 -3FE 1 -3FF 1 -487 1 -4CF 1 -4F6 1 -4F7 1 -4FA 1 -4FB 1 -4FC 1 -4FD 1 -4FE 1 -4FF 1 -510 1 -511 1 -512 1 -513 1 -514 1 -515 1 -516 1 -517 1 -518 1 -519 1 -51A 1 -51B 1 -51C 1 -51D 1 -51E 1 -51F 1 -520 1 -521 1 -522 1 -523 1 -524 1 -525 1 -526 1 -527 1 -528 1 -529 1 -52A 1 -52B 1 -52C 1 -52D 1 -52E 1 -52F 1 -530 1 -557 1 -558 1 -560 1 -588 1 -58B 1 -58C 1 -58D 1 -58E 1 -58F 1 -590 1 -5A2 1 -5BA 1 -5C5 1 -5C6 1 -5C7 1 -5C8 1 -5C9 1 -5CA 1 -5CB 1 -5CC 1 -5CD 1 -5CE 1 -5CF 1 -5EB 1 -5EC 1 -5ED 1 -5EE 1 -5EF 1 -5F5 1 -5F6 1 -5F7 1 -5F8 1 -5F9 1 -5FA 1 -5FB 1 -5FC 1 -5FD 1 -5FE 1 -5FF 1 -604 1 -605 1 -606 1 -607 1 -608 1 -609 1 -60A 1 -60B 1 -616 1 -617 1 -618 1 -619 1 -61A 1 -61C 1 -61D 1 -61E 1 -620 1 -63B 1 -63C 1 -63D 1 -63E 1 -63F 1 -659 1 -65A 1 -65B 1 -65C 1 -65D 1 -65E 1 -65F 1 -70E 1 -74B 1 -74C 1 -750 1 -751 1 -752 1 -753 1 -754 1 -755 1 -756 1 -757 1 -758 1 -759 1 -75A 1 -75B 1 -75C 1 -75D 1 -75E 1 -75F 1 -760 1 -761 1 -762 1 -763 1 -764 1 -765 1 -766 1 -767 1 -768 1 -769 1 -76A 1 -76B 1 -76C 1 -76D 1 -76E 1 -76F 1 -770 1 -771 1 -772 1 -773 1 -774 1 -775 1 -776 1 -777 1 -778 1 -779 1 -77A 1 -77B 1 -77C 1 -77D 1 -77E 1 -77F 1 -7B2 1 -7B3 1 -7B4 1 -7B5 1 -7B6 1 -7B7 1 -7B8 1 -7B9 1 -7BA 1 -7BB 1 -7BC 1 -7BD 1 -7BE 1 -7BF 1 -7C0 1 -7C1 1 -7C2 1 -7C3 1 -7C4 1 -7C5 1 -7C6 1 -7C7 1 -7C8 1 -7C9 1 -7CA 1 -7CB 1 -7CC 1 -7CD 1 -7CE 1 -7CF 1 -7D0 1 -7D1 1 -7D2 1 -7D3 1 -7D4 1 -7D5 1 -7D6 1 -7D7 1 -7D8 1 -7D9 1 -7DA 1 -7DB 1 -7DC 1 -7DD 1 -7DE 1 -7DF 1 -7E0 1 -7E1 1 -7E2 1 -7E3 1 -7E4 1 -7E5 1 -7E6 1 -7E7 1 -7E8 1 -7E9 1 -7EA 1 -7EB 1 -7EC 1 -7ED 1 -7EE 1 -7EF 1 -7F0 1 -7F1 1 -7F2 1 -7F3 1 -7F4 1 -7F5 1 -7F6 1 -7F7 1 -7F8 1 -7F9 1 -7FA 1 -7FB 1 -7FC 1 -7FD 1 -7FE 1 -7FF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -SET NAMES utf8; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=NDB CHARACTER SET utf8; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_general_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_estonian_ci; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -85 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -300 1 -301 1 -302 1 -303 1 -304 1 -305 1 -306 1 -307 1 -308 1 -309 1 -30A 1 -30B 1 -30C 1 -30D 1 -30E 1 -30F 1 -310 1 -311 1 -312 1 -313 1 -314 1 -315 1 -316 1 -317 1 -318 1 -319 1 -31A 1 -31B 1 -31C 1 -31D 1 -31E 1 -31F 1 -320 1 -321 1 -322 1 -323 1 -324 1 -325 1 -326 1 -327 1 -328 1 -329 1 -32A 1 -32B 1 -32C 1 -32D 1 -32E 1 -32F 1 -330 1 -331 1 -332 1 -333 1 -334 1 -335 1 -336 1 -337 1 -338 1 -339 1 -33A 1 -33B 1 -33C 1 -33D 1 -33E 1 -33F 1 -340 1 -341 1 -342 1 -343 1 -344 1 -345 1 -346 1 -347 1 -348 1 -349 1 -34A 1 -34B 1 -34C 1 -34D 1 -34E 1 -34F 1 -350 1 -351 1 -352 1 -353 1 -354 1 -355 1 -356 1 -357 1 -35D 1 -35E 1 -35F 1 -360 1 -361 1 -362 1 -483 1 -484 1 -485 1 -486 1 -488 1 -489 1 -591 1 -592 1 -593 1 -594 1 -595 1 -596 1 -597 1 -598 1 -599 1 -59A 1 -59B 1 -59C 1 -59D 1 -59E 1 -59F 1 -5A0 1 -5A1 1 -5A3 1 -5A4 1 -5A5 1 -5A6 1 -5A7 1 -5A8 1 -5A9 1 -5AA 1 -5AB 1 -5AC 1 -5AD 1 -5AE 1 -5AF 1 -5B0 1 -5B1 1 -5B2 1 -5B3 1 -5B4 1 -5B5 1 -5B6 1 -5B7 1 -5B8 1 -5B9 1 -5BB 1 -5BC 1 -5BD 1 -5BF 1 -5C1 1 -5C2 1 -5C4 1 -600 1 -601 1 -602 1 -603 1 -610 1 -611 1 -612 1 -613 1 -614 1 -615 1 -64B 1 -64C 1 -64D 1 -64E 1 -64F 1 -650 1 -651 1 -652 1 -653 1 -654 1 -655 1 -656 1 -657 1 -658 1 -670 1 -6D6 1 -6D7 1 -6D8 1 -6D9 1 -6DA 1 -6DB 1 -6DC 1 -6DD 1 -6DE 1 -6DF 1 -6E0 1 -6E1 1 -6E2 1 -6E3 1 -6E4 1 -6E7 1 -6E8 1 -6EA 1 -6EB 1 -6EC 1 -6ED 1 -70F 1 -711 1 -730 1 -731 1 -732 1 -733 1 -734 1 -735 1 -736 1 -737 1 -738 1 -739 1 -73A 1 -73B 1 -73C 1 -73D 1 -73E 1 -73F 1 -740 1 -741 1 -742 1 -743 1 -744 1 -745 1 -746 1 -747 1 -748 1 -749 1 -74A 1 -640 1 -60 1 -B4 1 -384 1 -2DC 1 -5E 1 -AF 1 -2D8 1 -2D9 1 -A8 1 -385 1 -2DA 1 -2DD 1 -B8 1 -2DB 1 -5F 1 -AD 1 -2D 1 -58A 1 -2C 1 -55D 1 -60C 1 -60D 1 -66B 1 -66C 1 -3B 1 -37E 1 -61B 1 -3A 1 -589 1 -703 1 -704 1 -705 1 -706 1 -707 1 -708 1 -21 1 -A1 1 -55C 1 -3F 1 -BF 1 -55E 1 -61F 1 -709 1 -2E 1 -6D4 1 -701 1 -702 1 -B7 1 -387 1 -700 1 -27 1 -22 1 -AB 1 -BB 1 -28 1 -29 1 -5B 1 -7B 1 -7D 1 -A7 1 -B6 1 -A9 1 -AE 1 -40 1 -2A 1 -66D 1 -2F 1 -26 1 -23 1 -25 1 -66A 1 -55A 1 -55B 1 -55F 1 -5BE 1 -5C0 1 -5C3 1 -5F3 1 -5F4 1 -70A 1 -70B 1 -70C 1 -70D 1 -2B9 1 -374 1 -375 1 -2BA 1 -2C2 1 -2C3 1 -2C4 1 -2C5 1 -2C6 1 -2C7 1 -2C8 1 -2C9 1 -2CA 1 -2CB 1 -2CC 1 -2CD 1 -2CE 1 -2CF 1 -2D2 1 -2D3 1 -2D4 1 -2D5 1 -2D6 1 -2D7 1 -2DE 1 -2DF 1 -2E5 1 -2E6 1 -2E7 1 -2E8 1 -2E9 1 -2EA 1 -2EB 1 -2EC 1 -2ED 1 -2EF 1 -2F0 1 -2F1 1 -2F2 1 -2F3 1 -2F4 1 -2F5 1 -2F6 1 -2F7 1 -2F8 1 -2F9 1 -2FA 1 -2FB 1 -2FC 1 -2FD 1 -2FE 1 -2FF 1 -B0 1 -482 1 -60E 1 -60F 1 -6E9 1 -3F6 1 -2B 1 -B1 1 -F7 1 -D7 1 -3C 1 -3D 1 -3E 1 -AC 1 -7C 1 -A6 1 -7E 1 -2D0 1 -2D1 1 -A4 1 -A2 1 -24 1 -A3 1 -A5 1 -30 1 -660 1 -6F0 1 -31 1 -B9 1 -661 1 -6F1 1 -BD 1 -BC 1 -32 1 -B2 1 -662 1 -6F2 1 -33 1 -B3 1 -663 1 -6F3 1 -BE 1 -34 1 -664 1 -6F4 1 -35 1 -665 1 -6F5 1 -36 1 -666 1 -6F6 1 -37 1 -667 1 -6F7 1 -38 1 -668 1 -6F8 1 -39 1 -669 1 -6F9 1 -41 1 -61 1 -AA 1 -C0 1 -C1 1 -C2 1 -C3 1 -C5 1 -E0 1 -E1 1 -E2 1 -E3 1 -E5 1 -100 1 -101 1 -102 1 -103 1 -104 1 -105 1 -1CD 1 -1CE 1 -1DE 1 -1DF 1 -1E0 1 -1E1 1 -1FA 1 -1FB 1 -200 1 -201 1 -202 1 -203 1 -226 1 -227 1 -363 1 -C6 1 -E6 1 -1E2 1 -1E3 1 -1FC 1 -1FD 1 -250 1 -251 1 -252 1 -42 1 -62 1 -299 1 -180 1 -181 1 -253 1 -182 1 -183 1 -43 1 -63 1 -C7 1 -E7 1 -106 1 -107 1 -108 1 -109 1 -10A 1 -10B 1 -10C 1 -10D 1 -368 1 -187 1 -188 1 -255 1 -44 1 -64 1 -10E 1 -10F 1 -369 1 -1C4 1 -1C5 1 -1C6 1 -1F1 1 -1F2 1 -1F3 1 -2A3 1 -2A5 1 -2A4 1 -110 1 -111 1 -189 1 -256 1 -18A 1 -257 1 -18B 1 -18C 1 -221 1 -D0 1 -F0 1 -45 1 -65 1 -C8 1 -C9 1 -CA 1 -CB 1 -E8 1 -E9 1 -EA 1 -EB 1 -112 1 -113 1 -114 1 -115 1 -116 1 -117 1 -118 1 -119 1 -11A 1 -11B 1 -204 1 -205 1 -206 1 -207 1 -228 1 -229 1 -364 1 -18E 1 -1DD 1 -18F 1 -259 1 -190 1 -25B 1 -258 1 -25A 1 -25C 1 -25D 1 -25E 1 -29A 1 -264 1 -46 1 -66 1 -2A9 1 -191 1 -192 1 -47 1 -67 1 -11C 1 -11D 1 -11E 1 -11F 1 -120 1 -121 1 -122 1 -123 1 -1E6 1 -1E7 1 -1F4 1 -1F5 1 -261 1 -262 1 -1E4 1 -1E5 1 -193 1 -260 1 -29B 1 -194 1 -263 1 -2E0 1 -1A2 1 -1A3 1 -48 1 -68 1 -124 1 -125 1 -21E 1 -21F 1 -2B0 1 -36A 1 -29C 1 -195 1 -1F6 1 -126 1 -127 1 -266 1 -2B1 1 -267 1 -2BB 1 -2BD 1 -49 1 -69 1 -CC 1 -CD 1 -CE 1 -CF 1 -EC 1 -ED 1 -EE 1 -EF 1 -128 1 -129 1 -12A 1 -12B 1 -12C 1 -12D 1 -12E 1 -12F 1 -130 1 -1CF 1 -1D0 1 -208 1 -209 1 -20A 1 -20B 1 -365 1 -132 1 -133 1 -131 1 -26A 1 -197 1 -268 1 -196 1 -269 1 -4A 1 -6A 1 -134 1 -135 1 -1F0 1 -2B2 1 -29D 1 -25F 1 -284 1 -4B 1 -6B 1 -136 1 -137 1 -1E8 1 -1E9 1 -198 1 -199 1 -29E 1 -4C 1 -6C 1 -139 1 -13A 1 -13B 1 -13C 1 -13D 1 -13E 1 -2E1 1 -13F 1 -140 1 -1C7 1 -1C8 1 -1C9 1 -2AA 1 -2AB 1 -29F 1 -141 1 -142 1 -19A 1 -26B 1 -26C 1 -26D 1 -234 1 -26E 1 -19B 1 -28E 1 -4D 1 -6D 1 -36B 1 -271 1 -4E 1 -6E 1 -D1 1 -F1 1 -143 1 -144 1 -145 1 -146 1 -147 1 -148 1 -1F8 1 -1F9 1 -1CA 1 -1CB 1 -1CC 1 -274 1 -19D 1 -272 1 -19E 1 -220 1 -273 1 -235 1 -14A 1 -14B 1 -4F 1 -6F 1 -BA 1 -D2 1 -D3 1 -D4 1 -F2 1 -F3 1 -F4 1 -14C 1 -14D 1 -14E 1 -14F 1 -150 1 -151 1 -1A0 1 -1A1 1 -1D1 1 -1D2 1 -1EA 1 -1EB 1 -1EC 1 -1ED 1 -20C 1 -20D 1 -20E 1 -20F 1 -22A 1 -22B 1 -22C 1 -22D 1 -22E 1 -22F 1 -230 1 -231 1 -366 1 -152 1 -153 1 -276 1 -D8 1 -F8 1 -1FE 1 -1FF 1 -186 1 -254 1 -19F 1 -275 1 -277 1 -222 1 -223 1 -50 1 -70 1 -1A4 1 -1A5 1 -278 1 -51 1 -71 1 -2A0 1 -138 1 -52 1 -72 1 -154 1 -155 1 -156 1 -157 1 -158 1 -159 1 -210 1 -211 1 -212 1 -213 1 -2B3 1 -36C 1 -1A6 1 -280 1 -279 1 -2B4 1 -27A 1 -27B 1 -2B5 1 -27C 1 -27D 1 -27E 1 -27F 1 -281 1 -2B6 1 -53 1 -73 1 -15A 1 -15B 1 -15C 1 -15D 1 -15E 1 -15F 1 -17F 1 -218 1 -219 1 -2E2 1 -DF 1 -160 1 -161 1 -5A 1 -7A 1 -17D 1 -17E 1 -282 1 -1A9 1 -283 1 -1AA 1 -285 1 -286 1 -54 1 -74 1 -162 1 -163 1 -164 1 -165 1 -21A 1 -21B 1 -36D 1 -2A8 1 -1BE 1 -2A6 1 -2A7 1 -166 1 -167 1 -1AB 1 -1AC 1 -1AD 1 -1AE 1 -288 1 -236 1 -287 1 -55 1 -75 1 -D9 1 -DA 1 -DB 1 -F9 1 -FA 1 -FB 1 -168 1 -169 1 -16A 1 -16B 1 -16C 1 -16D 1 -16E 1 -16F 1 -170 1 -171 1 -172 1 -173 1 -1AF 1 -1B0 1 -1D3 1 -1D4 1 -1D5 1 -1D6 1 -1D7 1 -1D8 1 -1D9 1 -1DA 1 -1DB 1 -1DC 1 -214 1 -215 1 -216 1 -217 1 -367 1 -289 1 -265 1 -2AE 1 -2AF 1 -19C 1 -26F 1 -270 1 -1B1 1 -28A 1 -56 1 -76 1 -36E 1 -1B2 1 -28B 1 -28C 1 -57 1 -77 1 -174 1 -175 1 -2B7 1 -D5 1 -F5 1 -C4 1 -E4 1 -D6 1 -F6 1 -DC 1 -FC 1 -28D 1 -58 1 -78 1 -2E3 1 -36F 1 -59 1 -79 1 -DD 1 -FD 1 -FF 1 -176 1 -177 1 -178 1 -232 1 -233 1 -2B8 1 -28F 1 -1B3 1 -1B4 1 -179 1 -17A 1 -17B 1 -17C 1 -18D 1 -1B5 1 -1B6 1 -224 1 -225 1 -290 1 -291 1 -1B7 1 -1EE 1 -1EF 1 -292 1 -1B8 1 -1B9 1 -1BA 1 -293 1 -21C 1 -21D 1 -DE 1 -FE 1 -1BF 1 -1F7 1 -1BB 1 -1A7 1 -1A8 1 -1BC 1 -1BD 1 -184 1 -185 1 -294 1 -2C0 1 -2BC 1 -149 1 -2EE 1 -2BE 1 -295 1 -2E4 1 -2BF 1 -2C1 1 -2A1 1 -2A2 1 -296 1 -1C0 1 -1C1 1 -1C2 1 -1C3 1 -297 1 -298 1 -2AC 1 -2AD 1 -386 1 -391 1 -3AC 1 -3B1 1 -392 1 -3B2 1 -3D0 1 -393 1 -3B3 1 -394 1 -3B4 1 -388 1 -395 1 -3AD 1 -3B5 1 -3F5 1 -3DC 1 -3DD 1 -3DA 1 -3DB 1 -396 1 -3B6 1 -389 1 -397 1 -3AE 1 -3B7 1 -398 1 -3B8 1 -3D1 1 -3F4 1 -37A 1 -38A 1 -390 1 -399 1 -3AA 1 -3AF 1 -3B9 1 -3CA 1 -3F3 1 -39A 1 -3BA 1 -3F0 1 -3D7 1 -39B 1 -3BB 1 -B5 1 -39C 1 -3BC 1 -39D 1 -3BD 1 -39E 1 -3BE 1 -38C 1 -39F 1 -3BF 1 -3CC 1 -3A0 1 -3C0 1 -3D6 1 -3DE 1 -3DF 1 -3D8 1 -3D9 1 -3A1 1 -3C1 1 -3F1 1 -3A3 1 -3C2 1 -3C3 1 -3F2 1 -3F9 1 -3A4 1 -3C4 1 -38E 1 -3A5 1 -3AB 1 -3B0 1 -3C5 1 -3CB 1 -3CD 1 -3D2 1 -3D3 1 -3D4 1 -3A6 1 -3C6 1 -3D5 1 -3A7 1 -3C7 1 -3A8 1 -3C8 1 -38F 1 -3A9 1 -3C9 1 -3CE 1 -3E0 1 -3E1 1 -3F7 1 -3F8 1 -3FA 1 -3FB 1 -3E2 1 -3E3 1 -3E4 1 -3E5 1 -3E6 1 -3E7 1 -3E8 1 -3E9 1 -3EA 1 -3EB 1 -3EC 1 -3ED 1 -3EE 1 -3EF 1 -410 1 -430 1 -4D0 1 -4D1 1 -4D2 1 -4D3 1 -4D8 1 -4D9 1 -4DA 1 -4DB 1 -4D4 1 -4D5 1 -411 1 -431 1 -412 1 -432 1 -413 1 -433 1 -490 1 -491 1 -492 1 -493 1 -494 1 -495 1 -414 1 -434 1 -500 1 -501 1 -402 1 -452 1 -502 1 -503 1 -403 1 -453 1 -498 1 -499 1 -400 1 -401 1 -415 1 -435 1 -450 1 -451 1 -4D6 1 -4D7 1 -404 1 -454 1 -416 1 -436 1 -4C1 1 -4C2 1 -4DC 1 -4DD 1 -496 1 -497 1 -417 1 -437 1 -504 1 -505 1 -4DE 1 -4DF 1 -405 1 -455 1 -4E0 1 -4E1 1 -506 1 -507 1 -40D 1 -418 1 -438 1 -45D 1 -4E2 1 -4E3 1 -48A 1 -48B 1 -4E4 1 -4E5 1 -406 1 -456 1 -407 1 -457 1 -419 1 -439 1 -408 1 -458 1 -41A 1 -43A 1 -49A 1 -49B 1 -4C3 1 -4C4 1 -4A0 1 -4A1 1 -49E 1 -49F 1 -49C 1 -49D 1 -41B 1 -43B 1 -4C5 1 -4C6 1 -409 1 -459 1 -508 1 -509 1 -41C 1 -43C 1 -4CD 1 -4CE 1 -41D 1 -43D 1 -4C9 1 -4CA 1 -4A2 1 -4A3 1 -4C7 1 -4C8 1 -4A4 1 -4A5 1 -40A 1 -45A 1 -50A 1 -50B 1 -41E 1 -43E 1 -4E6 1 -4E7 1 -4E8 1 -4E9 1 -4EA 1 -4EB 1 -41F 1 -43F 1 -4A6 1 -4A7 1 -480 1 -481 1 -420 1 -440 1 -48E 1 -48F 1 -421 1 -441 1 -50C 1 -50D 1 -4AA 1 -4AB 1 -422 1 -442 1 -50E 1 -50F 1 -4AC 1 -4AD 1 -40B 1 -45B 1 -40C 1 -45C 1 -423 1 -443 1 -4EE 1 -4EF 1 -40E 1 -45E 1 -4F0 1 -4F1 1 -4F2 1 -4F3 1 -4AE 1 -4AF 1 -4B0 1 -4B1 1 -478 1 -479 1 -424 1 -444 1 -425 1 -445 1 -4B2 1 -4B3 1 -4BA 1 -4BB 1 -460 1 -461 1 -47E 1 -47F 1 -47C 1 -47D 1 -47A 1 -47B 1 -426 1 -446 1 -4B4 1 -4B5 1 -427 1 -447 1 -4F4 1 -4F5 1 -4B6 1 -4B7 1 -4CB 1 -4CC 1 -4B8 1 -4B9 1 -4BC 1 -4BD 1 -4BE 1 -4BF 1 -40F 1 -45F 1 -428 1 -448 1 -429 1 -449 1 -42A 1 -44A 1 -42B 1 -44B 1 -4F8 1 -4F9 1 -42C 1 -44C 1 -48C 1 -48D 1 -462 1 -463 1 -42D 1 -44D 1 -4EC 1 -4ED 1 -42E 1 -44E 1 -42F 1 -44F 1 -464 1 -465 1 -466 1 -467 1 -46A 1 -46B 1 -468 1 -469 1 -46C 1 -46D 1 -46E 1 -46F 1 -470 1 -471 1 -472 1 -473 1 -474 1 -475 1 -476 1 -477 1 -4A8 1 -4A9 1 -4C0 1 -531 1 -561 1 -532 1 -562 1 -533 1 -563 1 -534 1 -564 1 -535 1 -565 1 -587 1 -536 1 -566 1 -537 1 -567 1 -538 1 -568 1 -539 1 -569 1 -53A 1 -56A 1 -53B 1 -56B 1 -53C 1 -56C 1 -53D 1 -56D 1 -53E 1 -56E 1 -53F 1 -56F 1 -540 1 -570 1 -541 1 -571 1 -542 1 -572 1 -543 1 -573 1 -544 1 -574 1 -545 1 -575 1 -546 1 -576 1 -547 1 -577 1 -548 1 -578 1 -549 1 -579 1 -54A 1 -57A 1 -54B 1 -57B 1 -54C 1 -57C 1 -54D 1 -57D 1 -54E 1 -57E 1 -54F 1 -57F 1 -550 1 -580 1 -551 1 -581 1 -552 1 -582 1 -553 1 -583 1 -554 1 -584 1 -555 1 -585 1 -556 1 -586 1 -559 1 -5D0 1 -5D1 1 -5D2 1 -5D3 1 -5D4 1 -5D5 1 -5F0 1 -5F1 1 -5D6 1 -5D7 1 -5D8 1 -5D9 1 -5F2 1 -5DA 1 -5DB 1 -5DC 1 -5DD 1 -5DE 1 -5DF 1 -5E0 1 -5E1 1 -5E2 1 -5E3 1 -5E4 1 -5E5 1 -5E6 1 -5E7 1 -5E8 1 -5E9 1 -5EA 1 -621 1 -674 1 -6FD 1 -622 1 -623 1 -672 1 -671 1 -624 1 -625 1 -673 1 -626 1 -627 1 -675 1 -66E 1 -628 1 -67B 1 -67E 1 -680 1 -629 1 -62A 1 -62B 1 -679 1 -67A 1 -67C 1 -67D 1 -67F 1 -62C 1 -683 1 -684 1 -686 1 -6BF 1 -687 1 -62D 1 -62E 1 -681 1 -682 1 -685 1 -62F 1 -630 1 -688 1 -689 1 -68A 1 -68B 1 -68C 1 -68D 1 -68E 1 -68F 1 -690 1 -6EE 1 -631 1 -632 1 -691 1 -692 1 -693 1 -694 1 -695 1 -696 1 -697 1 -698 1 -699 1 -6EF 1 -633 1 -634 1 -69A 1 -69B 1 -69C 1 -6FA 1 -635 1 -636 1 -69D 1 -69E 1 -6FB 1 -637 1 -638 1 -69F 1 -639 1 -63A 1 -6A0 1 -6FC 1 -641 1 -6A1 1 -6A2 1 -6A3 1 -6A4 1 -6A5 1 -6A6 1 -66F 1 -642 1 -6A7 1 -6A8 1 -643 1 -6A9 1 -6AA 1 -6AB 1 -6AC 1 -6AD 1 -6AE 1 -6AF 1 -6B0 1 -6B1 1 -6B2 1 -6B3 1 -6B4 1 -644 1 -6B5 1 -6B6 1 -6B7 1 -6B8 1 -645 1 -6FE 1 -646 1 -6BA 1 -6BB 1 -6BC 1 -6BD 1 -6B9 1 -647 1 -6BE 1 -6C1 1 -6C2 1 -6C3 1 -6FF 1 -6C0 1 -6D5 1 -648 1 -6E5 1 -676 1 -6C4 1 -6C5 1 -6C6 1 -6C7 1 -677 1 -6C8 1 -6C9 1 -6CA 1 -6CB 1 -6CF 1 -649 1 -64A 1 -6E6 1 -678 1 -6CC 1 -6CD 1 -6CE 1 -6D0 1 -6D1 1 -6D2 1 -6D3 1 -710 1 -712 1 -72D 1 -713 1 -714 1 -72E 1 -716 1 -715 1 -72F 1 -717 1 -718 1 -719 1 -74D 1 -71A 1 -71B 1 -71C 1 -71D 1 -71E 1 -71F 1 -74E 1 -720 1 -721 1 -722 1 -723 1 -724 1 -725 1 -726 1 -727 1 -74F 1 -728 1 -729 1 -72A 1 -72B 1 -72C 1 -780 1 -799 1 -79A 1 -781 1 -782 1 -783 1 -79C 1 -784 1 -785 1 -786 1 -787 1 -7A2 1 -7A3 1 -788 1 -7A5 1 -789 1 -78A 1 -78B 1 -79B 1 -78C 1 -798 1 -7A0 1 -7A1 1 -78D 1 -78E 1 -7A4 1 -78F 1 -790 1 -79D 1 -79E 1 -79F 1 -791 1 -792 1 -793 1 -794 1 -795 1 -796 1 -797 1 -7B1 1 -7A6 1 -7A7 1 -7A8 1 -7A9 1 -7AA 1 -7AB 1 -7AC 1 -7AD 1 -7AE 1 -7AF 1 -7B0 1 -4E00 1 -4E01 1 -4E02 1 -4E03 1 -4E04 1 -4E05 1 -4E06 1 -4E07 1 -4E08 1 -4E09 1 -4E0A 1 -4E0B 1 -4E0C 1 -4E0D 1 -4E0E 1 -4E0F 1 -4E10 1 -4E11 1 -4E12 1 -4E13 1 -4E14 1 -4E15 1 -4E16 1 -4E17 1 -4E18 1 -4E19 1 -4E1A 1 -4E1B 1 -4E1C 1 -4E1D 1 -4E1E 1 -4E1F 1 -4E20 1 -4E21 1 -4E22 1 -4E23 1 -4E24 1 -4E25 1 -4E26 1 -4E27 1 -4E28 1 -4E29 1 -4E2A 1 -4E2B 1 -4E2C 1 -4E2D 1 -4E2E 1 -4E2F 1 -4E30 1 -4E31 1 -4E32 1 -4E33 1 -4E34 1 -4E35 1 -4E36 1 -4E37 1 -4E38 1 -4E39 1 -4E3A 1 -4E3B 1 -4E3C 1 -4E3D 1 -4E3E 1 -4E3F 1 -4E40 1 -4E41 1 -4E42 1 -4E43 1 -4E44 1 -4E45 1 -4E46 1 -4E47 1 -4E48 1 -4E49 1 -4E4A 1 -4E4B 1 -4E4C 1 -4E4D 1 -4E4E 1 -4E4F 1 -4E50 1 -4E51 1 -4E52 1 -4E53 1 -4E54 1 -4E55 1 -4E56 1 -4E57 1 -4E58 1 -4E59 1 -4E5A 1 -4E5B 1 -4E5C 1 -4E5D 1 -4E5E 1 -4E5F 1 -4E60 1 -4E61 1 -4E62 1 -4E63 1 -4E64 1 -4E65 1 -4E66 1 -4E67 1 -4E68 1 -4E69 1 -4E6A 1 -4E6B 1 -4E6C 1 -4E6D 1 -4E6E 1 -4E6F 1 -4E70 1 -4E71 1 -4E72 1 -4E73 1 -4E74 1 -4E75 1 -4E76 1 -4E77 1 -4E78 1 -4E79 1 -4E7A 1 -4E7B 1 -4E7C 1 -4E7D 1 -4E7E 1 -4E7F 1 -4E80 1 -4E81 1 -4E82 1 -4E83 1 -4E84 1 -4E85 1 -4E86 1 -4E87 1 -4E88 1 -4E89 1 -4E8A 1 -4E8B 1 -4E8C 1 -4E8D 1 -4E8E 1 -4E8F 1 -4E90 1 -4E91 1 -4E92 1 -4E93 1 -4E94 1 -4E95 1 -4E96 1 -4E97 1 -4E98 1 -4E99 1 -4E9A 1 -4E9B 1 -4E9C 1 -4E9D 1 -4E9E 1 -4E9F 1 -4EA0 1 -4EA1 1 -4EA2 1 -4EA3 1 -4EA4 1 -4EA5 1 -4EA6 1 -4EA7 1 -4EA8 1 -4EA9 1 -4EAA 1 -4EAB 1 -4EAC 1 -4EAD 1 -4EAE 1 -4EAF 1 -4EB0 1 -4EB1 1 -4EB2 1 -4EB3 1 -4EB4 1 -4EB5 1 -4EB6 1 -4EB7 1 -4EB8 1 -4EB9 1 -4EBA 1 -4EBB 1 -4EBC 1 -4EBD 1 -4EBE 1 -4EBF 1 -4EC0 1 -4EC1 1 -4EC2 1 -4EC3 1 -4EC4 1 -4EC5 1 -4EC6 1 -4EC7 1 -4EC8 1 -4EC9 1 -4ECA 1 -4ECB 1 -4ECC 1 -4ECD 1 -4ECE 1 -4ECF 1 -4ED0 1 -4ED1 1 -4ED2 1 -4ED3 1 -4ED4 1 -4ED5 1 -4ED6 1 -4ED7 1 -4ED8 1 -4ED9 1 -4EDA 1 -4EDB 1 -4EDC 1 -4EDD 1 -4EDE 1 -4EDF 1 -4EE0 1 -4EE1 1 -4EE2 1 -4EE3 1 -4EE4 1 -4EE5 1 -4EE6 1 -4EE7 1 -4EE8 1 -4EE9 1 -4EEA 1 -4EEB 1 -4EEC 1 -4EED 1 -4EEE 1 -4EEF 1 -4EF0 1 -4EF1 1 -4EF2 1 -4EF3 1 -4EF4 1 -4EF5 1 -4EF6 1 -4EF7 1 -4EF8 1 -4EF9 1 -4EFA 1 -4EFB 1 -4EFC 1 -4EFD 1 -4EFE 1 -4EFF 1 -4F00 1 -4F01 1 -4F02 1 -4F03 1 -4F04 1 -4F05 1 -4F06 1 -4F07 1 -4F08 1 -4F09 1 -4F0A 1 -4F0B 1 -4F0C 1 -4F0D 1 -4F0E 1 -4F0F 1 -4F10 1 -4F11 1 -4F12 1 -4F13 1 -4F14 1 -4F15 1 -4F16 1 -4F17 1 -4F18 1 -4F19 1 -4F1A 1 -4F1B 1 -4F1C 1 -4F1D 1 -4F1E 1 -4F1F 1 -4F20 1 -4F21 1 -4F22 1 -4F23 1 -4F24 1 -4F25 1 -4F26 1 -4F27 1 -4F28 1 -4F29 1 -4F2A 1 -4F2B 1 -4F2C 1 -4F2D 1 -4F2E 1 -4F2F 1 -4F30 1 -4F31 1 -4F32 1 -4F33 1 -4F34 1 -4F35 1 -4F36 1 -4F37 1 -4F38 1 -4F39 1 -4F3A 1 -4F3B 1 -4F3C 1 -4F3D 1 -4F3E 1 -4F3F 1 -4F40 1 -4F41 1 -4F42 1 -4F43 1 -4F44 1 -4F45 1 -4F46 1 -4F47 1 -4F48 1 -4F49 1 -4F4A 1 -4F4B 1 -4F4C 1 -4F4D 1 -4F4E 1 -4F4F 1 -4F50 1 -4F51 1 -4F52 1 -4F53 1 -4F54 1 -4F55 1 -4F56 1 -4F57 1 -4F58 1 -4F59 1 -4F5A 1 -4F5B 1 -4F5C 1 -4F5D 1 -4F5E 1 -4F5F 1 -4F60 1 -4F61 1 -4F62 1 -4F63 1 -4F64 1 -4F65 1 -4F66 1 -4F67 1 -4F68 1 -4F69 1 -4F6A 1 -4F6B 1 -4F6C 1 -4F6D 1 -4F6E 1 -4F6F 1 -4F70 1 -4F71 1 -4F72 1 -4F73 1 -4F74 1 -4F75 1 -4F76 1 -4F77 1 -4F78 1 -4F79 1 -4F7A 1 -4F7B 1 -4F7C 1 -4F7D 1 -4F7E 1 -4F7F 1 -4F80 1 -4F81 1 -4F82 1 -4F83 1 -4F84 1 -4F85 1 -4F86 1 -4F87 1 -4F88 1 -4F89 1 -4F8A 1 -4F8B 1 -4F8C 1 -4F8D 1 -4F8E 1 -4F8F 1 -4F90 1 -4F91 1 -4F92 1 -4F93 1 -4F94 1 -4F95 1 -4F96 1 -4F97 1 -4F98 1 -4F99 1 -4F9A 1 -4F9B 1 -4F9C 1 -4F9D 1 -4F9E 1 -4F9F 1 -4FA0 1 -4FA1 1 -4FA2 1 -4FA3 1 -4FA4 1 -4FA5 1 -4FA6 1 -4FA7 1 -4FA8 1 -4FA9 1 -4FAA 1 -4FAB 1 -4FAC 1 -4FAD 1 -4FAE 1 -4FAF 1 -4FB0 1 -4FB1 1 -4FB2 1 -4FB3 1 -4FB4 1 -4FB5 1 -4FB6 1 -4FB7 1 -4FB8 1 -4FB9 1 -4FBA 1 -4FBB 1 -4FBC 1 -4FBD 1 -4FBE 1 -4FBF 1 -4FC0 1 -4FC1 1 -4FC2 1 -4FC3 1 -4FC4 1 -4FC5 1 -4FC6 1 -4FC7 1 -4FC8 1 -4FC9 1 -4FCA 1 -4FCB 1 -4FCC 1 -4FCD 1 -4FCE 1 -4FCF 1 -4FD0 1 -4FD1 1 -4FD2 1 -4FD3 1 -4FD4 1 -4FD5 1 -4FD6 1 -4FD7 1 -4FD8 1 -4FD9 1 -4FDA 1 -4FDB 1 -4FDC 1 -4FDD 1 -4FDE 1 -4FDF 1 -4FE0 1 -4FE1 1 -4FE2 1 -4FE3 1 -4FE4 1 -4FE5 1 -4FE6 1 -4FE7 1 -4FE8 1 -4FE9 1 -4FEA 1 -4FEB 1 -4FEC 1 -4FED 1 -4FEE 1 -4FEF 1 -4FF0 1 -4FF1 1 -4FF2 1 -4FF3 1 -4FF4 1 -4FF5 1 -4FF6 1 -4FF7 1 -4FF8 1 -4FF9 1 -4FFA 1 -4FFB 1 -4FFC 1 -4FFD 1 -4FFE 1 -4FFF 1 -237 1 -238 1 -239 1 -23A 1 -23B 1 -23C 1 -23D 1 -23E 1 -23F 1 -240 1 -241 1 -242 1 -243 1 -244 1 -245 1 -246 1 -247 1 -248 1 -249 1 -24A 1 -24B 1 -24C 1 -24D 1 -24E 1 -24F 1 -358 1 -359 1 -35A 1 -35B 1 -35C 1 -370 1 -371 1 -372 1 -373 1 -376 1 -377 1 -378 1 -379 1 -37B 1 -37C 1 -37D 1 -37F 1 -380 1 -381 1 -382 1 -383 1 -38B 1 -38D 1 -3A2 1 -3CF 1 -3FC 1 -3FD 1 -3FE 1 -3FF 1 -487 1 -4CF 1 -4F6 1 -4F7 1 -4FA 1 -4FB 1 -4FC 1 -4FD 1 -4FE 1 -4FF 1 -510 1 -511 1 -512 1 -513 1 -514 1 -515 1 -516 1 -517 1 -518 1 -519 1 -51A 1 -51B 1 -51C 1 -51D 1 -51E 1 -51F 1 -520 1 -521 1 -522 1 -523 1 -524 1 -525 1 -526 1 -527 1 -528 1 -529 1 -52A 1 -52B 1 -52C 1 -52D 1 -52E 1 -52F 1 -530 1 -557 1 -558 1 -560 1 -588 1 -58B 1 -58C 1 -58D 1 -58E 1 -58F 1 -590 1 -5A2 1 -5BA 1 -5C5 1 -5C6 1 -5C7 1 -5C8 1 -5C9 1 -5CA 1 -5CB 1 -5CC 1 -5CD 1 -5CE 1 -5CF 1 -5EB 1 -5EC 1 -5ED 1 -5EE 1 -5EF 1 -5F5 1 -5F6 1 -5F7 1 -5F8 1 -5F9 1 -5FA 1 -5FB 1 -5FC 1 -5FD 1 -5FE 1 -5FF 1 -604 1 -605 1 -606 1 -607 1 -608 1 -609 1 -60A 1 -60B 1 -616 1 -617 1 -618 1 -619 1 -61A 1 -61C 1 -61D 1 -61E 1 -620 1 -63B 1 -63C 1 -63D 1 -63E 1 -63F 1 -659 1 -65A 1 -65B 1 -65C 1 -65D 1 -65E 1 -65F 1 -70E 1 -74B 1 -74C 1 -750 1 -751 1 -752 1 -753 1 -754 1 -755 1 -756 1 -757 1 -758 1 -759 1 -75A 1 -75B 1 -75C 1 -75D 1 -75E 1 -75F 1 -760 1 -761 1 -762 1 -763 1 -764 1 -765 1 -766 1 -767 1 -768 1 -769 1 -76A 1 -76B 1 -76C 1 -76D 1 -76E 1 -76F 1 -770 1 -771 1 -772 1 -773 1 -774 1 -775 1 -776 1 -777 1 -778 1 -779 1 -77A 1 -77B 1 -77C 1 -77D 1 -77E 1 -77F 1 -7B2 1 -7B3 1 -7B4 1 -7B5 1 -7B6 1 -7B7 1 -7B8 1 -7B9 1 -7BA 1 -7BB 1 -7BC 1 -7BD 1 -7BE 1 -7BF 1 -7C0 1 -7C1 1 -7C2 1 -7C3 1 -7C4 1 -7C5 1 -7C6 1 -7C7 1 -7C8 1 -7C9 1 -7CA 1 -7CB 1 -7CC 1 -7CD 1 -7CE 1 -7CF 1 -7D0 1 -7D1 1 -7D2 1 -7D3 1 -7D4 1 -7D5 1 -7D6 1 -7D7 1 -7D8 1 -7D9 1 -7DA 1 -7DB 1 -7DC 1 -7DD 1 -7DE 1 -7DF 1 -7E0 1 -7E1 1 -7E2 1 -7E3 1 -7E4 1 -7E5 1 -7E6 1 -7E7 1 -7E8 1 -7E9 1 -7EA 1 -7EB 1 -7EC 1 -7ED 1 -7EE 1 -7EF 1 -7F0 1 -7F1 1 -7F2 1 -7F3 1 -7F4 1 -7F5 1 -7F6 1 -7F7 1 -7F8 1 -7F9 1 -7FA 1 -7FB 1 -7FC 1 -7FD 1 -7FE 1 -7FF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -SET NAMES utf8; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=NDB CHARACTER SET utf8; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_general_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_general_ci; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -100 1 -101 1 -102 1 -103 1 -104 1 -105 1 -1CD 1 -1CE 1 -1DE 1 -1DF 1 -1E0 1 -1E1 1 -1FA 1 -1FB 1 -200 1 -201 1 -202 1 -203 1 -226 1 -227 1 -42 1 -62 1 -43 1 -63 1 -C7 1 -E7 1 -106 1 -107 1 -108 1 -109 1 -10A 1 -10B 1 -10C 1 -10D 1 -44 1 -64 1 -10E 1 -10F 1 -45 1 -65 1 -C8 1 -C9 1 -CA 1 -CB 1 -E8 1 -E9 1 -EA 1 -EB 1 -112 1 -113 1 -114 1 -115 1 -116 1 -117 1 -118 1 -119 1 -11A 1 -11B 1 -204 1 -205 1 -206 1 -207 1 -228 1 -229 1 -46 1 -66 1 -47 1 -67 1 -11C 1 -11D 1 -11E 1 -11F 1 -120 1 -121 1 -122 1 -123 1 -1E6 1 -1E7 1 -1F4 1 -1F5 1 -48 1 -68 1 -124 1 -125 1 -21E 1 -21F 1 -49 1 -69 1 -CC 1 -CD 1 -CE 1 -CF 1 -EC 1 -ED 1 -EE 1 -EF 1 -128 1 -129 1 -12A 1 -12B 1 -12C 1 -12D 1 -12E 1 -12F 1 -130 1 -131 1 -1CF 1 -1D0 1 -208 1 -209 1 -20A 1 -20B 1 -4A 1 -6A 1 -134 1 -135 1 -1F0 1 -4B 1 -6B 1 -136 1 -137 1 -1E8 1 -1E9 1 -4C 1 -6C 1 -139 1 -13A 1 -13B 1 -13C 1 -13D 1 -13E 1 -4D 1 -6D 1 -4E 1 -6E 1 -D1 1 -F1 1 -143 1 -144 1 -145 1 -146 1 -147 1 -148 1 -1F8 1 -1F9 1 -4F 1 -6F 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -14C 1 -14D 1 -14E 1 -14F 1 -150 1 -151 1 -1A0 1 -1A1 1 -1D1 1 -1D2 1 -1EA 1 -1EB 1 -1EC 1 -1ED 1 -20C 1 -20D 1 -20E 1 -20F 1 -22A 1 -22B 1 -22C 1 -22D 1 -22E 1 -22F 1 -230 1 -231 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -154 1 -155 1 -156 1 -157 1 -158 1 -159 1 -210 1 -211 1 -212 1 -213 1 -53 1 -73 1 -15A 1 -15B 1 -15C 1 -15D 1 -15E 1 -15F 1 -160 1 -161 1 -17F 1 -218 1 -219 1 -54 1 -74 1 -162 1 -163 1 -164 1 -165 1 -21A 1 -21B 1 -55 1 -75 1 -D9 1 -DA 1 -DB 1 -DC 1 -F9 1 -FA 1 -FB 1 -FC 1 -168 1 -169 1 -16A 1 -16B 1 -16C 1 -16D 1 -16E 1 -16F 1 -170 1 -171 1 -172 1 -173 1 -1AF 1 -1B0 1 -1D3 1 -1D4 1 -1D5 1 -1D6 1 -1D7 1 -1D8 1 -1D9 1 -1DA 1 -1DB 1 -1DC 1 -214 1 -215 1 -216 1 -217 1 -56 1 -76 1 -57 1 -77 1 -174 1 -175 1 -58 1 -78 1 -59 1 -79 1 -DD 1 -FD 1 -FF 1 -176 1 -177 1 -178 1 -232 1 -233 1 -5A 1 -7A 1 -179 1 -17A 1 -17B 1 -17C 1 -17D 1 -17E 1 -5B 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C6 1 -E6 1 -1E2 1 -1E3 1 -1FC 1 -1FD 1 -D0 1 -F0 1 -D7 1 -D8 1 -F8 1 -1FE 1 -1FF 1 -DE 1 -FE 1 -DF 1 -F7 1 -110 1 -111 1 -126 1 -127 1 -132 1 -133 1 -138 1 -13F 1 -140 1 -141 1 -142 1 -149 1 -14A 1 -14B 1 -152 1 -153 1 -166 1 -167 1 -180 1 -181 1 -253 1 -182 1 -183 1 -184 1 -185 1 -186 1 -254 1 -187 1 -188 1 -189 1 -256 1 -18A 1 -257 1 -18B 1 -18C 1 -18D 1 -18E 1 -1DD 1 -18F 1 -259 1 -190 1 -25B 1 -191 1 -192 1 -193 1 -260 1 -194 1 -263 1 -196 1 -269 1 -197 1 -268 1 -198 1 -199 1 -19A 1 -19B 1 -19C 1 -26F 1 -19D 1 -272 1 -19E 1 -19F 1 -275 1 -1A2 1 -1A3 1 -1A4 1 -1A5 1 -1A6 1 -280 1 -1A7 1 -1A8 1 -1A9 1 -283 1 -1AA 1 -1AB 1 -1AC 1 -1AD 1 -1AE 1 -288 1 -1B1 1 -28A 1 -1B2 1 -28B 1 -1B3 1 -1B4 1 -1B5 1 -1B6 1 -1B7 1 -1EE 1 -1EF 1 -292 1 -1B8 1 -1B9 1 -1BA 1 -1BB 1 -1BC 1 -1BD 1 -1BE 1 -1C0 1 -1C1 1 -1C2 1 -1C3 1 -1C4 1 -1C5 1 -1C6 1 -1C7 1 -1C8 1 -1C9 1 -1CA 1 -1CB 1 -1CC 1 -1E4 1 -1E5 1 -1F1 1 -1F2 1 -1F3 1 -195 1 -1F6 1 -1BF 1 -1F7 1 -21C 1 -21D 1 -220 1 -221 1 -222 1 -223 1 -224 1 -225 1 -234 1 -235 1 -236 1 -237 1 -238 1 -239 1 -23A 1 -23B 1 -23C 1 -23D 1 -23E 1 -23F 1 -240 1 -241 1 -242 1 -243 1 -244 1 -245 1 -246 1 -247 1 -248 1 -249 1 -24A 1 -24B 1 -24C 1 -24D 1 -24E 1 -24F 1 -250 1 -251 1 -252 1 -255 1 -258 1 -25A 1 -25C 1 -25D 1 -25E 1 -25F 1 -261 1 -262 1 -264 1 -265 1 -266 1 -267 1 -26A 1 -26B 1 -26C 1 -26D 1 -26E 1 -270 1 -271 1 -273 1 -274 1 -276 1 -277 1 -278 1 -279 1 -27A 1 -27B 1 -27C 1 -27D 1 -27E 1 -27F 1 -281 1 -282 1 -284 1 -285 1 -286 1 -287 1 -289 1 -28C 1 -28D 1 -28E 1 -28F 1 -290 1 -291 1 -293 1 -294 1 -295 1 -296 1 -297 1 -298 1 -299 1 -29A 1 -29B 1 -29C 1 -29D 1 -29E 1 -29F 1 -2A0 1 -2A1 1 -2A2 1 -2A3 1 -2A4 1 -2A5 1 -2A6 1 -2A7 1 -2A8 1 -2A9 1 -2AA 1 -2AB 1 -2AC 1 -2AD 1 -2AE 1 -2AF 1 -2B0 1 -2B1 1 -2B2 1 -2B3 1 -2B4 1 -2B5 1 -2B6 1 -2B7 1 -2B8 1 -2B9 1 -2BA 1 -2BB 1 -2BC 1 -2BD 1 -2BE 1 -2BF 1 -2C0 1 -2C1 1 -2C2 1 -2C3 1 -2C4 1 -2C5 1 -2C6 1 -2C7 1 -2C8 1 -2C9 1 -2CA 1 -2CB 1 -2CC 1 -2CD 1 -2CE 1 -2CF 1 -2D0 1 -2D1 1 -2D2 1 -2D3 1 -2D4 1 -2D5 1 -2D6 1 -2D7 1 -2D8 1 -2D9 1 -2DA 1 -2DB 1 -2DC 1 -2DD 1 -2DE 1 -2DF 1 -2E0 1 -2E1 1 -2E2 1 -2E3 1 -2E4 1 -2E5 1 -2E6 1 -2E7 1 -2E8 1 -2E9 1 -2EA 1 -2EB 1 -2EC 1 -2ED 1 -2EE 1 -2EF 1 -2F0 1 -2F1 1 -2F2 1 -2F3 1 -2F4 1 -2F5 1 -2F6 1 -2F7 1 -2F8 1 -2F9 1 -2FA 1 -2FB 1 -2FC 1 -2FD 1 -2FE 1 -2FF 1 -300 1 -301 1 -302 1 -303 1 -304 1 -305 1 -306 1 -307 1 -308 1 -309 1 -30A 1 -30B 1 -30C 1 -30D 1 -30E 1 -30F 1 -310 1 -311 1 -312 1 -313 1 -314 1 -315 1 -316 1 -317 1 -318 1 -319 1 -31A 1 -31B 1 -31C 1 -31D 1 -31E 1 -31F 1 -320 1 -321 1 -322 1 -323 1 -324 1 -325 1 -326 1 -327 1 -328 1 -329 1 -32A 1 -32B 1 -32C 1 -32D 1 -32E 1 -32F 1 -330 1 -331 1 -332 1 -333 1 -334 1 -335 1 -336 1 -337 1 -338 1 -339 1 -33A 1 -33B 1 -33C 1 -33D 1 -33E 1 -33F 1 -340 1 -341 1 -342 1 -343 1 -344 1 -346 1 -347 1 -348 1 -349 1 -34A 1 -34B 1 -34C 1 -34D 1 -34E 1 -34F 1 -350 1 -351 1 -352 1 -353 1 -354 1 -355 1 -356 1 -357 1 -358 1 -359 1 -35A 1 -35B 1 -35C 1 -35D 1 -35E 1 -35F 1 -360 1 -361 1 -362 1 -363 1 -364 1 -365 1 -366 1 -367 1 -368 1 -369 1 -36A 1 -36B 1 -36C 1 -36D 1 -36E 1 -36F 1 -370 1 -371 1 -372 1 -373 1 -374 1 -375 1 -376 1 -377 1 -378 1 -379 1 -37A 1 -37B 1 -37C 1 -37D 1 -37E 1 -37F 1 -380 1 -381 1 -382 1 -383 1 -384 1 -385 1 -387 1 -38B 1 -38D 1 -386 1 -391 1 -3AC 1 -3B1 1 -392 1 -3B2 1 -3D0 1 -393 1 -3B3 1 -394 1 -3B4 1 -388 1 -395 1 -3AD 1 -3B5 1 -396 1 -3B6 1 -389 1 -397 1 -3AE 1 -3B7 1 -398 1 -3B8 1 -3D1 1 -345 1 -38A 1 -390 1 -399 1 -3AA 1 -3AF 1 -3B9 1 -3CA 1 -39A 1 -3BA 1 -3F0 1 -39B 1 -3BB 1 -B5 1 -39C 1 -3BC 1 -39D 1 -3BD 1 -39E 1 -3BE 1 -38C 1 -39F 1 -3BF 1 -3CC 1 -3A0 1 -3C0 1 -3D6 1 -3A1 1 -3C1 1 -3F1 1 -3A2 1 -3A3 1 -3C2 1 -3C3 1 -3F2 1 -3A4 1 -3C4 1 -38E 1 -3A5 1 -3AB 1 -3B0 1 -3C5 1 -3CB 1 -3CD 1 -3A6 1 -3C6 1 -3D5 1 -3A7 1 -3C7 1 -3A8 1 -3C8 1 -38F 1 -3A9 1 -3C9 1 -3CE 1 -3CF 1 -3D2 1 -3D3 1 -3D4 1 -3D7 1 -3D8 1 -3D9 1 -3DA 1 -3DB 1 -3DC 1 -3DD 1 -3DE 1 -3DF 1 -3E0 1 -3E1 1 -3E2 1 -3E3 1 -3E4 1 -3E5 1 -3E6 1 -3E7 1 -3E8 1 -3E9 1 -3EA 1 -3EB 1 -3EC 1 -3ED 1 -3EE 1 -3EF 1 -3F3 1 -3F4 1 -3F5 1 -3F6 1 -3F7 1 -3F8 1 -3F9 1 -3FA 1 -3FB 1 -3FC 1 -3FD 1 -3FE 1 -3FF 1 -402 1 -452 1 -404 1 -454 1 -405 1 -455 1 -406 1 -407 1 -456 1 -457 1 -408 1 -458 1 -409 1 -459 1 -40A 1 -45A 1 -40B 1 -45B 1 -40F 1 -45F 1 -410 1 -430 1 -4D0 1 -4D1 1 -4D2 1 -4D3 1 -411 1 -431 1 -412 1 -432 1 -403 1 -413 1 -433 1 -453 1 -414 1 -434 1 -400 1 -401 1 -415 1 -435 1 -450 1 -451 1 -4D6 1 -4D7 1 -416 1 -436 1 -4C1 1 -4C2 1 -4DC 1 -4DD 1 -417 1 -437 1 -4DE 1 -4DF 1 -40D 1 -418 1 -438 1 -45D 1 -4E2 1 -4E3 1 -4E4 1 -4E5 1 -419 1 -439 1 -40C 1 -41A 1 -43A 1 -45C 1 -41B 1 -43B 1 -41C 1 -43C 1 -41D 1 -43D 1 -41E 1 -43E 1 -4E6 1 -4E7 1 -41F 1 -43F 1 -420 1 -440 1 -421 1 -441 1 -422 1 -442 1 -40E 1 -423 1 -443 1 -45E 1 -4EE 1 -4EF 1 -4F0 1 -4F1 1 -4F2 1 -4F3 1 -424 1 -444 1 -425 1 -445 1 -426 1 -446 1 -427 1 -447 1 -4F4 1 -4F5 1 -428 1 -448 1 -429 1 -449 1 -42A 1 -44A 1 -42B 1 -44B 1 -4F8 1 -4F9 1 -42C 1 -44C 1 -42D 1 -44D 1 -4EC 1 -4ED 1 -42E 1 -44E 1 -42F 1 -44F 1 -460 1 -461 1 -462 1 -463 1 -464 1 -465 1 -466 1 -467 1 -468 1 -469 1 -46A 1 -46B 1 -46C 1 -46D 1 -46E 1 -46F 1 -470 1 -471 1 -472 1 -473 1 -474 1 -475 1 -476 1 -477 1 -478 1 -479 1 -47A 1 -47B 1 -47C 1 -47D 1 -47E 1 -47F 1 -480 1 -481 1 -482 1 -483 1 -484 1 -485 1 -486 1 -487 1 -488 1 -489 1 -48A 1 -48B 1 -48C 1 -48D 1 -48E 1 -48F 1 -490 1 -491 1 -492 1 -493 1 -494 1 -495 1 -496 1 -497 1 -498 1 -499 1 -49A 1 -49B 1 -49C 1 -49D 1 -49E 1 -49F 1 -4A0 1 -4A1 1 -4A2 1 -4A3 1 -4A4 1 -4A5 1 -4A6 1 -4A7 1 -4A8 1 -4A9 1 -4AA 1 -4AB 1 -4AC 1 -4AD 1 -4AE 1 -4AF 1 -4B0 1 -4B1 1 -4B2 1 -4B3 1 -4B4 1 -4B5 1 -4B6 1 -4B7 1 -4B8 1 -4B9 1 -4BA 1 -4BB 1 -4BC 1 -4BD 1 -4BE 1 -4BF 1 -4C0 1 -4C3 1 -4C4 1 -4C5 1 -4C6 1 -4C7 1 -4C8 1 -4C9 1 -4CA 1 -4CB 1 -4CC 1 -4CD 1 -4CE 1 -4CF 1 -4D4 1 -4D5 1 -4D8 1 -4D9 1 -4DA 1 -4DB 1 -4E0 1 -4E1 1 -4E8 1 -4E9 1 -4EA 1 -4EB 1 -4F6 1 -4F7 1 -4FA 1 -4FB 1 -4FC 1 -4FD 1 -4FE 1 -4FF 1 -500 1 -501 1 -502 1 -503 1 -504 1 -505 1 -506 1 -507 1 -508 1 -509 1 -50A 1 -50B 1 -50C 1 -50D 1 -50E 1 -50F 1 -510 1 -511 1 -512 1 -513 1 -514 1 -515 1 -516 1 -517 1 -518 1 -519 1 -51A 1 -51B 1 -51C 1 -51D 1 -51E 1 -51F 1 -520 1 -521 1 -522 1 -523 1 -524 1 -525 1 -526 1 -527 1 -528 1 -529 1 -52A 1 -52B 1 -52C 1 -52D 1 -52E 1 -52F 1 -530 1 -531 1 -561 1 -532 1 -562 1 -533 1 -563 1 -534 1 -564 1 -535 1 -565 1 -536 1 -566 1 -537 1 -567 1 -538 1 -568 1 -539 1 -569 1 -53A 1 -56A 1 -53B 1 -56B 1 -53C 1 -56C 1 -53D 1 -56D 1 -53E 1 -56E 1 -53F 1 -56F 1 -540 1 -570 1 -541 1 -571 1 -542 1 -572 1 -543 1 -573 1 -544 1 -574 1 -545 1 -575 1 -546 1 -576 1 -547 1 -577 1 -548 1 -578 1 -549 1 -579 1 -54A 1 -57A 1 -54B 1 -57B 1 -54C 1 -57C 1 -54D 1 -57D 1 -54E 1 -57E 1 -54F 1 -57F 1 -550 1 -580 1 -551 1 -581 1 -552 1 -582 1 -553 1 -583 1 -554 1 -584 1 -555 1 -585 1 -556 1 -586 1 -557 1 -558 1 -559 1 -55A 1 -55B 1 -55C 1 -55D 1 -55E 1 -55F 1 -560 1 -587 1 -588 1 -589 1 -58A 1 -58B 1 -58C 1 -58D 1 -58E 1 -58F 1 -590 1 -591 1 -592 1 -593 1 -594 1 -595 1 -596 1 -597 1 -598 1 -599 1 -59A 1 -59B 1 -59C 1 -59D 1 -59E 1 -59F 1 -5A0 1 -5A1 1 -5A2 1 -5A3 1 -5A4 1 -5A5 1 -5A6 1 -5A7 1 -5A8 1 -5A9 1 -5AA 1 -5AB 1 -5AC 1 -5AD 1 -5AE 1 -5AF 1 -5B0 1 -5B1 1 -5B2 1 -5B3 1 -5B4 1 -5B5 1 -5B6 1 -5B7 1 -5B8 1 -5B9 1 -5BA 1 -5BB 1 -5BC 1 -5BD 1 -5BE 1 -5BF 1 -5C0 1 -5C1 1 -5C2 1 -5C3 1 -5C4 1 -5C5 1 -5C6 1 -5C7 1 -5C8 1 -5C9 1 -5CA 1 -5CB 1 -5CC 1 -5CD 1 -5CE 1 -5CF 1 -5D0 1 -5D1 1 -5D2 1 -5D3 1 -5D4 1 -5D5 1 -5D6 1 -5D7 1 -5D8 1 -5D9 1 -5DA 1 -5DB 1 -5DC 1 -5DD 1 -5DE 1 -5DF 1 -5E0 1 -5E1 1 -5E2 1 -5E3 1 -5E4 1 -5E5 1 -5E6 1 -5E7 1 -5E8 1 -5E9 1 -5EA 1 -5EB 1 -5EC 1 -5ED 1 -5EE 1 -5EF 1 -5F0 1 -5F1 1 -5F2 1 -5F3 1 -5F4 1 -5F5 1 -5F6 1 -5F7 1 -5F8 1 -5F9 1 -5FA 1 -5FB 1 -5FC 1 -5FD 1 -5FE 1 -5FF 1 -600 1 -601 1 -602 1 -603 1 -604 1 -605 1 -606 1 -607 1 -608 1 -609 1 -60A 1 -60B 1 -60C 1 -60D 1 -60E 1 -60F 1 -610 1 -611 1 -612 1 -613 1 -614 1 -615 1 -616 1 -617 1 -618 1 -619 1 -61A 1 -61B 1 -61C 1 -61D 1 -61E 1 -61F 1 -620 1 -621 1 -622 1 -623 1 -624 1 -625 1 -626 1 -627 1 -628 1 -629 1 -62A 1 -62B 1 -62C 1 -62D 1 -62E 1 -62F 1 -630 1 -631 1 -632 1 -633 1 -634 1 -635 1 -636 1 -637 1 -638 1 -639 1 -63A 1 -63B 1 -63C 1 -63D 1 -63E 1 -63F 1 -640 1 -641 1 -642 1 -643 1 -644 1 -645 1 -646 1 -647 1 -648 1 -649 1 -64A 1 -64B 1 -64C 1 -64D 1 -64E 1 -64F 1 -650 1 -651 1 -652 1 -653 1 -654 1 -655 1 -656 1 -657 1 -658 1 -659 1 -65A 1 -65B 1 -65C 1 -65D 1 -65E 1 -65F 1 -660 1 -661 1 -662 1 -663 1 -664 1 -665 1 -666 1 -667 1 -668 1 -669 1 -66A 1 -66B 1 -66C 1 -66D 1 -66E 1 -66F 1 -670 1 -671 1 -672 1 -673 1 -674 1 -675 1 -676 1 -677 1 -678 1 -679 1 -67A 1 -67B 1 -67C 1 -67D 1 -67E 1 -67F 1 -680 1 -681 1 -682 1 -683 1 -684 1 -685 1 -686 1 -687 1 -688 1 -689 1 -68A 1 -68B 1 -68C 1 -68D 1 -68E 1 -68F 1 -690 1 -691 1 -692 1 -693 1 -694 1 -695 1 -696 1 -697 1 -698 1 -699 1 -69A 1 -69B 1 -69C 1 -69D 1 -69E 1 -69F 1 -6A0 1 -6A1 1 -6A2 1 -6A3 1 -6A4 1 -6A5 1 -6A6 1 -6A7 1 -6A8 1 -6A9 1 -6AA 1 -6AB 1 -6AC 1 -6AD 1 -6AE 1 -6AF 1 -6B0 1 -6B1 1 -6B2 1 -6B3 1 -6B4 1 -6B5 1 -6B6 1 -6B7 1 -6B8 1 -6B9 1 -6BA 1 -6BB 1 -6BC 1 -6BD 1 -6BE 1 -6BF 1 -6C0 1 -6C1 1 -6C2 1 -6C3 1 -6C4 1 -6C5 1 -6C6 1 -6C7 1 -6C8 1 -6C9 1 -6CA 1 -6CB 1 -6CC 1 -6CD 1 -6CE 1 -6CF 1 -6D0 1 -6D1 1 -6D2 1 -6D3 1 -6D4 1 -6D5 1 -6D6 1 -6D7 1 -6D8 1 -6D9 1 -6DA 1 -6DB 1 -6DC 1 -6DD 1 -6DE 1 -6DF 1 -6E0 1 -6E1 1 -6E2 1 -6E3 1 -6E4 1 -6E5 1 -6E6 1 -6E7 1 -6E8 1 -6E9 1 -6EA 1 -6EB 1 -6EC 1 -6ED 1 -6EE 1 -6EF 1 -6F0 1 -6F1 1 -6F2 1 -6F3 1 -6F4 1 -6F5 1 -6F6 1 -6F7 1 -6F8 1 -6F9 1 -6FA 1 -6FB 1 -6FC 1 -6FD 1 -6FE 1 -6FF 1 -700 1 -701 1 -702 1 -703 1 -704 1 -705 1 -706 1 -707 1 -708 1 -709 1 -70A 1 -70B 1 -70C 1 -70D 1 -70E 1 -70F 1 -710 1 -711 1 -712 1 -713 1 -714 1 -715 1 -716 1 -717 1 -718 1 -719 1 -71A 1 -71B 1 -71C 1 -71D 1 -71E 1 -71F 1 -720 1 -721 1 -722 1 -723 1 -724 1 -725 1 -726 1 -727 1 -728 1 -729 1 -72A 1 -72B 1 -72C 1 -72D 1 -72E 1 -72F 1 -730 1 -731 1 -732 1 -733 1 -734 1 -735 1 -736 1 -737 1 -738 1 -739 1 -73A 1 -73B 1 -73C 1 -73D 1 -73E 1 -73F 1 -740 1 -741 1 -742 1 -743 1 -744 1 -745 1 -746 1 -747 1 -748 1 -749 1 -74A 1 -74B 1 -74C 1 -74D 1 -74E 1 -74F 1 -750 1 -751 1 -752 1 -753 1 -754 1 -755 1 -756 1 -757 1 -758 1 -759 1 -75A 1 -75B 1 -75C 1 -75D 1 -75E 1 -75F 1 -760 1 -761 1 -762 1 -763 1 -764 1 -765 1 -766 1 -767 1 -768 1 -769 1 -76A 1 -76B 1 -76C 1 -76D 1 -76E 1 -76F 1 -770 1 -771 1 -772 1 -773 1 -774 1 -775 1 -776 1 -777 1 -778 1 -779 1 -77A 1 -77B 1 -77C 1 -77D 1 -77E 1 -77F 1 -780 1 -781 1 -782 1 -783 1 -784 1 -785 1 -786 1 -787 1 -788 1 -789 1 -78A 1 -78B 1 -78C 1 -78D 1 -78E 1 -78F 1 -790 1 -791 1 -792 1 -793 1 -794 1 -795 1 -796 1 -797 1 -798 1 -799 1 -79A 1 -79B 1 -79C 1 -79D 1 -79E 1 -79F 1 -7A0 1 -7A1 1 -7A2 1 -7A3 1 -7A4 1 -7A5 1 -7A6 1 -7A7 1 -7A8 1 -7A9 1 -7AA 1 -7AB 1 -7AC 1 -7AD 1 -7AE 1 -7AF 1 -7B0 1 -7B1 1 -7B2 1 -7B3 1 -7B4 1 -7B5 1 -7B6 1 -7B7 1 -7B8 1 -7B9 1 -7BA 1 -7BB 1 -7BC 1 -7BD 1 -7BE 1 -7BF 1 -7C0 1 -7C1 1 -7C2 1 -7C3 1 -7C4 1 -7C5 1 -7C6 1 -7C7 1 -7C8 1 -7C9 1 -7CA 1 -7CB 1 -7CC 1 -7CD 1 -7CE 1 -7CF 1 -7D0 1 -7D1 1 -7D2 1 -7D3 1 -7D4 1 -7D5 1 -7D6 1 -7D7 1 -7D8 1 -7D9 1 -7DA 1 -7DB 1 -7DC 1 -7DD 1 -7DE 1 -7DF 1 -7E0 1 -7E1 1 -7E2 1 -7E3 1 -7E4 1 -7E5 1 -7E6 1 -7E7 1 -7E8 1 -7E9 1 -7EA 1 -7EB 1 -7EC 1 -7ED 1 -7EE 1 -7EF 1 -7F0 1 -7F1 1 -7F2 1 -7F3 1 -7F4 1 -7F5 1 -7F6 1 -7F7 1 -7F8 1 -7F9 1 -7FA 1 -7FB 1 -7FC 1 -7FD 1 -7FE 1 -7FF 1 -4E00 1 -4E01 1 -4E02 1 -4E03 1 -4E04 1 -4E05 1 -4E06 1 -4E07 1 -4E08 1 -4E09 1 -4E0A 1 -4E0B 1 -4E0C 1 -4E0D 1 -4E0E 1 -4E0F 1 -4E10 1 -4E11 1 -4E12 1 -4E13 1 -4E14 1 -4E15 1 -4E16 1 -4E17 1 -4E18 1 -4E19 1 -4E1A 1 -4E1B 1 -4E1C 1 -4E1D 1 -4E1E 1 -4E1F 1 -4E20 1 -4E21 1 -4E22 1 -4E23 1 -4E24 1 -4E25 1 -4E26 1 -4E27 1 -4E28 1 -4E29 1 -4E2A 1 -4E2B 1 -4E2C 1 -4E2D 1 -4E2E 1 -4E2F 1 -4E30 1 -4E31 1 -4E32 1 -4E33 1 -4E34 1 -4E35 1 -4E36 1 -4E37 1 -4E38 1 -4E39 1 -4E3A 1 -4E3B 1 -4E3C 1 -4E3D 1 -4E3E 1 -4E3F 1 -4E40 1 -4E41 1 -4E42 1 -4E43 1 -4E44 1 -4E45 1 -4E46 1 -4E47 1 -4E48 1 -4E49 1 -4E4A 1 -4E4B 1 -4E4C 1 -4E4D 1 -4E4E 1 -4E4F 1 -4E50 1 -4E51 1 -4E52 1 -4E53 1 -4E54 1 -4E55 1 -4E56 1 -4E57 1 -4E58 1 -4E59 1 -4E5A 1 -4E5B 1 -4E5C 1 -4E5D 1 -4E5E 1 -4E5F 1 -4E60 1 -4E61 1 -4E62 1 -4E63 1 -4E64 1 -4E65 1 -4E66 1 -4E67 1 -4E68 1 -4E69 1 -4E6A 1 -4E6B 1 -4E6C 1 -4E6D 1 -4E6E 1 -4E6F 1 -4E70 1 -4E71 1 -4E72 1 -4E73 1 -4E74 1 -4E75 1 -4E76 1 -4E77 1 -4E78 1 -4E79 1 -4E7A 1 -4E7B 1 -4E7C 1 -4E7D 1 -4E7E 1 -4E7F 1 -4E80 1 -4E81 1 -4E82 1 -4E83 1 -4E84 1 -4E85 1 -4E86 1 -4E87 1 -4E88 1 -4E89 1 -4E8A 1 -4E8B 1 -4E8C 1 -4E8D 1 -4E8E 1 -4E8F 1 -4E90 1 -4E91 1 -4E92 1 -4E93 1 -4E94 1 -4E95 1 -4E96 1 -4E97 1 -4E98 1 -4E99 1 -4E9A 1 -4E9B 1 -4E9C 1 -4E9D 1 -4E9E 1 -4E9F 1 -4EA0 1 -4EA1 1 -4EA2 1 -4EA3 1 -4EA4 1 -4EA5 1 -4EA6 1 -4EA7 1 -4EA8 1 -4EA9 1 -4EAA 1 -4EAB 1 -4EAC 1 -4EAD 1 -4EAE 1 -4EAF 1 -4EB0 1 -4EB1 1 -4EB2 1 -4EB3 1 -4EB4 1 -4EB5 1 -4EB6 1 -4EB7 1 -4EB8 1 -4EB9 1 -4EBA 1 -4EBB 1 -4EBC 1 -4EBD 1 -4EBE 1 -4EBF 1 -4EC0 1 -4EC1 1 -4EC2 1 -4EC3 1 -4EC4 1 -4EC5 1 -4EC6 1 -4EC7 1 -4EC8 1 -4EC9 1 -4ECA 1 -4ECB 1 -4ECC 1 -4ECD 1 -4ECE 1 -4ECF 1 -4ED0 1 -4ED1 1 -4ED2 1 -4ED3 1 -4ED4 1 -4ED5 1 -4ED6 1 -4ED7 1 -4ED8 1 -4ED9 1 -4EDA 1 -4EDB 1 -4EDC 1 -4EDD 1 -4EDE 1 -4EDF 1 -4EE0 1 -4EE1 1 -4EE2 1 -4EE3 1 -4EE4 1 -4EE5 1 -4EE6 1 -4EE7 1 -4EE8 1 -4EE9 1 -4EEA 1 -4EEB 1 -4EEC 1 -4EED 1 -4EEE 1 -4EEF 1 -4EF0 1 -4EF1 1 -4EF2 1 -4EF3 1 -4EF4 1 -4EF5 1 -4EF6 1 -4EF7 1 -4EF8 1 -4EF9 1 -4EFA 1 -4EFB 1 -4EFC 1 -4EFD 1 -4EFE 1 -4EFF 1 -4F00 1 -4F01 1 -4F02 1 -4F03 1 -4F04 1 -4F05 1 -4F06 1 -4F07 1 -4F08 1 -4F09 1 -4F0A 1 -4F0B 1 -4F0C 1 -4F0D 1 -4F0E 1 -4F0F 1 -4F10 1 -4F11 1 -4F12 1 -4F13 1 -4F14 1 -4F15 1 -4F16 1 -4F17 1 -4F18 1 -4F19 1 -4F1A 1 -4F1B 1 -4F1C 1 -4F1D 1 -4F1E 1 -4F1F 1 -4F20 1 -4F21 1 -4F22 1 -4F23 1 -4F24 1 -4F25 1 -4F26 1 -4F27 1 -4F28 1 -4F29 1 -4F2A 1 -4F2B 1 -4F2C 1 -4F2D 1 -4F2E 1 -4F2F 1 -4F30 1 -4F31 1 -4F32 1 -4F33 1 -4F34 1 -4F35 1 -4F36 1 -4F37 1 -4F38 1 -4F39 1 -4F3A 1 -4F3B 1 -4F3C 1 -4F3D 1 -4F3E 1 -4F3F 1 -4F40 1 -4F41 1 -4F42 1 -4F43 1 -4F44 1 -4F45 1 -4F46 1 -4F47 1 -4F48 1 -4F49 1 -4F4A 1 -4F4B 1 -4F4C 1 -4F4D 1 -4F4E 1 -4F4F 1 -4F50 1 -4F51 1 -4F52 1 -4F53 1 -4F54 1 -4F55 1 -4F56 1 -4F57 1 -4F58 1 -4F59 1 -4F5A 1 -4F5B 1 -4F5C 1 -4F5D 1 -4F5E 1 -4F5F 1 -4F60 1 -4F61 1 -4F62 1 -4F63 1 -4F64 1 -4F65 1 -4F66 1 -4F67 1 -4F68 1 -4F69 1 -4F6A 1 -4F6B 1 -4F6C 1 -4F6D 1 -4F6E 1 -4F6F 1 -4F70 1 -4F71 1 -4F72 1 -4F73 1 -4F74 1 -4F75 1 -4F76 1 -4F77 1 -4F78 1 -4F79 1 -4F7A 1 -4F7B 1 -4F7C 1 -4F7D 1 -4F7E 1 -4F7F 1 -4F80 1 -4F81 1 -4F82 1 -4F83 1 -4F84 1 -4F85 1 -4F86 1 -4F87 1 -4F88 1 -4F89 1 -4F8A 1 -4F8B 1 -4F8C 1 -4F8D 1 -4F8E 1 -4F8F 1 -4F90 1 -4F91 1 -4F92 1 -4F93 1 -4F94 1 -4F95 1 -4F96 1 -4F97 1 -4F98 1 -4F99 1 -4F9A 1 -4F9B 1 -4F9C 1 -4F9D 1 -4F9E 1 -4F9F 1 -4FA0 1 -4FA1 1 -4FA2 1 -4FA3 1 -4FA4 1 -4FA5 1 -4FA6 1 -4FA7 1 -4FA8 1 -4FA9 1 -4FAA 1 -4FAB 1 -4FAC 1 -4FAD 1 -4FAE 1 -4FAF 1 -4FB0 1 -4FB1 1 -4FB2 1 -4FB3 1 -4FB4 1 -4FB5 1 -4FB6 1 -4FB7 1 -4FB8 1 -4FB9 1 -4FBA 1 -4FBB 1 -4FBC 1 -4FBD 1 -4FBE 1 -4FBF 1 -4FC0 1 -4FC1 1 -4FC2 1 -4FC3 1 -4FC4 1 -4FC5 1 -4FC6 1 -4FC7 1 -4FC8 1 -4FC9 1 -4FCA 1 -4FCB 1 -4FCC 1 -4FCD 1 -4FCE 1 -4FCF 1 -4FD0 1 -4FD1 1 -4FD2 1 -4FD3 1 -4FD4 1 -4FD5 1 -4FD6 1 -4FD7 1 -4FD8 1 -4FD9 1 -4FDA 1 -4FDB 1 -4FDC 1 -4FDD 1 -4FDE 1 -4FDF 1 -4FE0 1 -4FE1 1 -4FE2 1 -4FE3 1 -4FE4 1 -4FE5 1 -4FE6 1 -4FE7 1 -4FE8 1 -4FE9 1 -4FEA 1 -4FEB 1 -4FEC 1 -4FED 1 -4FEE 1 -4FEF 1 -4FF0 1 -4FF1 1 -4FF2 1 -4FF3 1 -4FF4 1 -4FF5 1 -4FF6 1 -4FF7 1 -4FF8 1 -4FF9 1 -4FFA 1 -4FFB 1 -4FFC 1 -4FFD 1 -4FFE 1 -4FFF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -SET NAMES utf8; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=NDB CHARACTER SET utf8; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_general_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_hungarian_ci; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -85 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -300 1 -301 1 -302 1 -303 1 -304 1 -305 1 -306 1 -307 1 -308 1 -309 1 -30A 1 -30B 1 -30C 1 -30D 1 -30E 1 -30F 1 -310 1 -311 1 -312 1 -313 1 -314 1 -315 1 -316 1 -317 1 -318 1 -319 1 -31A 1 -31B 1 -31C 1 -31D 1 -31E 1 -31F 1 -320 1 -321 1 -322 1 -323 1 -324 1 -325 1 -326 1 -327 1 -328 1 -329 1 -32A 1 -32B 1 -32C 1 -32D 1 -32E 1 -32F 1 -330 1 -331 1 -332 1 -333 1 -334 1 -335 1 -336 1 -337 1 -338 1 -339 1 -33A 1 -33B 1 -33C 1 -33D 1 -33E 1 -33F 1 -340 1 -341 1 -342 1 -343 1 -344 1 -345 1 -346 1 -347 1 -348 1 -349 1 -34A 1 -34B 1 -34C 1 -34D 1 -34E 1 -34F 1 -350 1 -351 1 -352 1 -353 1 -354 1 -355 1 -356 1 -357 1 -35D 1 -35E 1 -35F 1 -360 1 -361 1 -362 1 -483 1 -484 1 -485 1 -486 1 -488 1 -489 1 -591 1 -592 1 -593 1 -594 1 -595 1 -596 1 -597 1 -598 1 -599 1 -59A 1 -59B 1 -59C 1 -59D 1 -59E 1 -59F 1 -5A0 1 -5A1 1 -5A3 1 -5A4 1 -5A5 1 -5A6 1 -5A7 1 -5A8 1 -5A9 1 -5AA 1 -5AB 1 -5AC 1 -5AD 1 -5AE 1 -5AF 1 -5B0 1 -5B1 1 -5B2 1 -5B3 1 -5B4 1 -5B5 1 -5B6 1 -5B7 1 -5B8 1 -5B9 1 -5BB 1 -5BC 1 -5BD 1 -5BF 1 -5C1 1 -5C2 1 -5C4 1 -600 1 -601 1 -602 1 -603 1 -610 1 -611 1 -612 1 -613 1 -614 1 -615 1 -64B 1 -64C 1 -64D 1 -64E 1 -64F 1 -650 1 -651 1 -652 1 -653 1 -654 1 -655 1 -656 1 -657 1 -658 1 -670 1 -6D6 1 -6D7 1 -6D8 1 -6D9 1 -6DA 1 -6DB 1 -6DC 1 -6DD 1 -6DE 1 -6DF 1 -6E0 1 -6E1 1 -6E2 1 -6E3 1 -6E4 1 -6E7 1 -6E8 1 -6EA 1 -6EB 1 -6EC 1 -6ED 1 -70F 1 -711 1 -730 1 -731 1 -732 1 -733 1 -734 1 -735 1 -736 1 -737 1 -738 1 -739 1 -73A 1 -73B 1 -73C 1 -73D 1 -73E 1 -73F 1 -740 1 -741 1 -742 1 -743 1 -744 1 -745 1 -746 1 -747 1 -748 1 -749 1 -74A 1 -640 1 -60 1 -B4 1 -384 1 -2DC 1 -5E 1 -AF 1 -2D8 1 -2D9 1 -A8 1 -385 1 -2DA 1 -2DD 1 -B8 1 -2DB 1 -5F 1 -AD 1 -2D 1 -58A 1 -2C 1 -55D 1 -60C 1 -60D 1 -66B 1 -66C 1 -3B 1 -37E 1 -61B 1 -3A 1 -589 1 -703 1 -704 1 -705 1 -706 1 -707 1 -708 1 -21 1 -A1 1 -55C 1 -3F 1 -BF 1 -55E 1 -61F 1 -709 1 -2E 1 -6D4 1 -701 1 -702 1 -B7 1 -387 1 -700 1 -27 1 -22 1 -AB 1 -BB 1 -28 1 -29 1 -5B 1 -7B 1 -7D 1 -A7 1 -B6 1 -A9 1 -AE 1 -40 1 -2A 1 -66D 1 -2F 1 -26 1 -23 1 -25 1 -66A 1 -55A 1 -55B 1 -55F 1 -5BE 1 -5C0 1 -5C3 1 -5F3 1 -5F4 1 -70A 1 -70B 1 -70C 1 -70D 1 -2B9 1 -374 1 -375 1 -2BA 1 -2C2 1 -2C3 1 -2C4 1 -2C5 1 -2C6 1 -2C7 1 -2C8 1 -2C9 1 -2CA 1 -2CB 1 -2CC 1 -2CD 1 -2CE 1 -2CF 1 -2D2 1 -2D3 1 -2D4 1 -2D5 1 -2D6 1 -2D7 1 -2DE 1 -2DF 1 -2E5 1 -2E6 1 -2E7 1 -2E8 1 -2E9 1 -2EA 1 -2EB 1 -2EC 1 -2ED 1 -2EF 1 -2F0 1 -2F1 1 -2F2 1 -2F3 1 -2F4 1 -2F5 1 -2F6 1 -2F7 1 -2F8 1 -2F9 1 -2FA 1 -2FB 1 -2FC 1 -2FD 1 -2FE 1 -2FF 1 -B0 1 -482 1 -60E 1 -60F 1 -6E9 1 -3F6 1 -2B 1 -B1 1 -F7 1 -D7 1 -3C 1 -3D 1 -3E 1 -AC 1 -7C 1 -A6 1 -7E 1 -2D0 1 -2D1 1 -A4 1 -A2 1 -24 1 -A3 1 -A5 1 -30 1 -660 1 -6F0 1 -31 1 -B9 1 -661 1 -6F1 1 -BD 1 -BC 1 -32 1 -B2 1 -662 1 -6F2 1 -33 1 -B3 1 -663 1 -6F3 1 -BE 1 -34 1 -664 1 -6F4 1 -35 1 -665 1 -6F5 1 -36 1 -666 1 -6F6 1 -37 1 -667 1 -6F7 1 -38 1 -668 1 -6F8 1 -39 1 -669 1 -6F9 1 -41 1 -61 1 -AA 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -100 1 -101 1 -102 1 -103 1 -104 1 -105 1 -1CD 1 -1CE 1 -1DE 1 -1DF 1 -1E0 1 -1E1 1 -1FA 1 -1FB 1 -200 1 -201 1 -202 1 -203 1 -226 1 -227 1 -363 1 -C6 1 -E6 1 -1E2 1 -1E3 1 -1FC 1 -1FD 1 -250 1 -251 1 -252 1 -42 1 -62 1 -299 1 -180 1 -181 1 -253 1 -182 1 -183 1 -43 1 -63 1 -C7 1 -E7 1 -106 1 -107 1 -108 1 -109 1 -10A 1 -10B 1 -10C 1 -10D 1 -368 1 -187 1 -188 1 -255 1 -44 1 -64 1 -10E 1 -10F 1 -369 1 -1C4 1 -1C5 1 -1C6 1 -1F1 1 -1F2 1 -1F3 1 -2A3 1 -2A5 1 -2A4 1 -110 1 -111 1 -189 1 -256 1 -18A 1 -257 1 -18B 1 -18C 1 -221 1 -D0 1 -F0 1 -45 1 -65 1 -C8 1 -C9 1 -CA 1 -CB 1 -E8 1 -E9 1 -EA 1 -EB 1 -112 1 -113 1 -114 1 -115 1 -116 1 -117 1 -118 1 -119 1 -11A 1 -11B 1 -204 1 -205 1 -206 1 -207 1 -228 1 -229 1 -364 1 -18E 1 -1DD 1 -18F 1 -259 1 -190 1 -25B 1 -258 1 -25A 1 -25C 1 -25D 1 -25E 1 -29A 1 -264 1 -46 1 -66 1 -2A9 1 -191 1 -192 1 -47 1 -67 1 -11C 1 -11D 1 -11E 1 -11F 1 -120 1 -121 1 -122 1 -123 1 -1E6 1 -1E7 1 -1F4 1 -1F5 1 -261 1 -262 1 -1E4 1 -1E5 1 -193 1 -260 1 -29B 1 -194 1 -263 1 -2E0 1 -1A2 1 -1A3 1 -48 1 -68 1 -124 1 -125 1 -21E 1 -21F 1 -2B0 1 -36A 1 -29C 1 -195 1 -1F6 1 -126 1 -127 1 -266 1 -2B1 1 -267 1 -2BB 1 -2BD 1 -49 1 -69 1 -CC 1 -CD 1 -CE 1 -CF 1 -EC 1 -ED 1 -EE 1 -EF 1 -128 1 -129 1 -12A 1 -12B 1 -12C 1 -12D 1 -12E 1 -12F 1 -130 1 -1CF 1 -1D0 1 -208 1 -209 1 -20A 1 -20B 1 -365 1 -132 1 -133 1 -131 1 -26A 1 -197 1 -268 1 -196 1 -269 1 -4A 1 -6A 1 -134 1 -135 1 -1F0 1 -2B2 1 -29D 1 -25F 1 -284 1 -4B 1 -6B 1 -136 1 -137 1 -1E8 1 -1E9 1 -198 1 -199 1 -29E 1 -4C 1 -6C 1 -139 1 -13A 1 -13B 1 -13C 1 -13D 1 -13E 1 -2E1 1 -13F 1 -140 1 -1C7 1 -1C8 1 -1C9 1 -2AA 1 -2AB 1 -29F 1 -141 1 -142 1 -19A 1 -26B 1 -26C 1 -26D 1 -234 1 -26E 1 -19B 1 -28E 1 -4D 1 -6D 1 -36B 1 -271 1 -4E 1 -6E 1 -D1 1 -F1 1 -143 1 -144 1 -145 1 -146 1 -147 1 -148 1 -1F8 1 -1F9 1 -1CA 1 -1CB 1 -1CC 1 -274 1 -19D 1 -272 1 -19E 1 -220 1 -273 1 -235 1 -14A 1 -14B 1 -4F 1 -6F 1 -BA 1 -D2 1 -D3 1 -D4 1 -D5 1 -F2 1 -F3 1 -F4 1 -F5 1 -14C 1 -14D 1 -14E 1 -14F 1 -1A0 1 -1A1 1 -1D1 1 -1D2 1 -1EA 1 -1EB 1 -1EC 1 -1ED 1 -20C 1 -20D 1 -20E 1 -20F 1 -22A 1 -22B 1 -22C 1 -22D 1 -22E 1 -22F 1 -230 1 -231 1 -366 1 -152 1 -153 1 -D6 1 -F6 1 -150 1 -151 1 -276 1 -D8 1 -F8 1 -1FE 1 -1FF 1 -186 1 -254 1 -19F 1 -275 1 -277 1 -222 1 -223 1 -50 1 -70 1 -1A4 1 -1A5 1 -278 1 -51 1 -71 1 -2A0 1 -138 1 -52 1 -72 1 -154 1 -155 1 -156 1 -157 1 -158 1 -159 1 -210 1 -211 1 -212 1 -213 1 -2B3 1 -36C 1 -1A6 1 -280 1 -279 1 -2B4 1 -27A 1 -27B 1 -2B5 1 -27C 1 -27D 1 -27E 1 -27F 1 -281 1 -2B6 1 -53 1 -73 1 -15A 1 -15B 1 -15C 1 -15D 1 -15E 1 -15F 1 -160 1 -161 1 -17F 1 -218 1 -219 1 -2E2 1 -DF 1 -282 1 -1A9 1 -283 1 -1AA 1 -285 1 -286 1 -54 1 -74 1 -162 1 -163 1 -164 1 -165 1 -21A 1 -21B 1 -36D 1 -2A8 1 -1BE 1 -2A6 1 -2A7 1 -166 1 -167 1 -1AB 1 -1AC 1 -1AD 1 -1AE 1 -288 1 -236 1 -287 1 -55 1 -75 1 -D9 1 -DA 1 -DB 1 -F9 1 -FA 1 -FB 1 -168 1 -169 1 -16A 1 -16B 1 -16C 1 -16D 1 -16E 1 -16F 1 -172 1 -173 1 -1AF 1 -1B0 1 -1D3 1 -1D4 1 -1D5 1 -1D6 1 -1D7 1 -1D8 1 -1D9 1 -1DA 1 -1DB 1 -1DC 1 -214 1 -215 1 -216 1 -217 1 -367 1 -DC 1 -FC 1 -170 1 -171 1 -289 1 -265 1 -2AE 1 -2AF 1 -19C 1 -26F 1 -270 1 -1B1 1 -28A 1 -56 1 -76 1 -36E 1 -1B2 1 -28B 1 -28C 1 -57 1 -77 1 -174 1 -175 1 -2B7 1 -28D 1 -58 1 -78 1 -2E3 1 -36F 1 -59 1 -79 1 -DD 1 -FD 1 -FF 1 -176 1 -177 1 -178 1 -232 1 -233 1 -2B8 1 -28F 1 -1B3 1 -1B4 1 -5A 1 -7A 1 -179 1 -17A 1 -17B 1 -17C 1 -17D 1 -17E 1 -18D 1 -1B5 1 -1B6 1 -224 1 -225 1 -290 1 -291 1 -1B7 1 -1EE 1 -1EF 1 -292 1 -1B8 1 -1B9 1 -1BA 1 -293 1 -21C 1 -21D 1 -DE 1 -FE 1 -1BF 1 -1F7 1 -1BB 1 -1A7 1 -1A8 1 -1BC 1 -1BD 1 -184 1 -185 1 -294 1 -2C0 1 -2BC 1 -149 1 -2EE 1 -2BE 1 -295 1 -2E4 1 -2BF 1 -2C1 1 -2A1 1 -2A2 1 -296 1 -1C0 1 -1C1 1 -1C2 1 -1C3 1 -297 1 -298 1 -2AC 1 -2AD 1 -386 1 -391 1 -3AC 1 -3B1 1 -392 1 -3B2 1 -3D0 1 -393 1 -3B3 1 -394 1 -3B4 1 -388 1 -395 1 -3AD 1 -3B5 1 -3F5 1 -3DC 1 -3DD 1 -3DA 1 -3DB 1 -396 1 -3B6 1 -389 1 -397 1 -3AE 1 -3B7 1 -398 1 -3B8 1 -3D1 1 -3F4 1 -37A 1 -38A 1 -390 1 -399 1 -3AA 1 -3AF 1 -3B9 1 -3CA 1 -3F3 1 -39A 1 -3BA 1 -3F0 1 -3D7 1 -39B 1 -3BB 1 -B5 1 -39C 1 -3BC 1 -39D 1 -3BD 1 -39E 1 -3BE 1 -38C 1 -39F 1 -3BF 1 -3CC 1 -3A0 1 -3C0 1 -3D6 1 -3DE 1 -3DF 1 -3D8 1 -3D9 1 -3A1 1 -3C1 1 -3F1 1 -3A3 1 -3C2 1 -3C3 1 -3F2 1 -3F9 1 -3A4 1 -3C4 1 -38E 1 -3A5 1 -3AB 1 -3B0 1 -3C5 1 -3CB 1 -3CD 1 -3D2 1 -3D3 1 -3D4 1 -3A6 1 -3C6 1 -3D5 1 -3A7 1 -3C7 1 -3A8 1 -3C8 1 -38F 1 -3A9 1 -3C9 1 -3CE 1 -3E0 1 -3E1 1 -3F7 1 -3F8 1 -3FA 1 -3FB 1 -3E2 1 -3E3 1 -3E4 1 -3E5 1 -3E6 1 -3E7 1 -3E8 1 -3E9 1 -3EA 1 -3EB 1 -3EC 1 -3ED 1 -3EE 1 -3EF 1 -410 1 -430 1 -4D0 1 -4D1 1 -4D2 1 -4D3 1 -4D8 1 -4D9 1 -4DA 1 -4DB 1 -4D4 1 -4D5 1 -411 1 -431 1 -412 1 -432 1 -413 1 -433 1 -490 1 -491 1 -492 1 -493 1 -494 1 -495 1 -414 1 -434 1 -500 1 -501 1 -402 1 -452 1 -502 1 -503 1 -403 1 -453 1 -498 1 -499 1 -400 1 -401 1 -415 1 -435 1 -450 1 -451 1 -4D6 1 -4D7 1 -404 1 -454 1 -416 1 -436 1 -4C1 1 -4C2 1 -4DC 1 -4DD 1 -496 1 -497 1 -417 1 -437 1 -504 1 -505 1 -4DE 1 -4DF 1 -405 1 -455 1 -4E0 1 -4E1 1 -506 1 -507 1 -40D 1 -418 1 -438 1 -45D 1 -4E2 1 -4E3 1 -48A 1 -48B 1 -4E4 1 -4E5 1 -406 1 -456 1 -407 1 -457 1 -419 1 -439 1 -408 1 -458 1 -41A 1 -43A 1 -49A 1 -49B 1 -4C3 1 -4C4 1 -4A0 1 -4A1 1 -49E 1 -49F 1 -49C 1 -49D 1 -41B 1 -43B 1 -4C5 1 -4C6 1 -409 1 -459 1 -508 1 -509 1 -41C 1 -43C 1 -4CD 1 -4CE 1 -41D 1 -43D 1 -4C9 1 -4CA 1 -4A2 1 -4A3 1 -4C7 1 -4C8 1 -4A4 1 -4A5 1 -40A 1 -45A 1 -50A 1 -50B 1 -41E 1 -43E 1 -4E6 1 -4E7 1 -4E8 1 -4E9 1 -4EA 1 -4EB 1 -41F 1 -43F 1 -4A6 1 -4A7 1 -480 1 -481 1 -420 1 -440 1 -48E 1 -48F 1 -421 1 -441 1 -50C 1 -50D 1 -4AA 1 -4AB 1 -422 1 -442 1 -50E 1 -50F 1 -4AC 1 -4AD 1 -40B 1 -45B 1 -40C 1 -45C 1 -423 1 -443 1 -4EE 1 -4EF 1 -40E 1 -45E 1 -4F0 1 -4F1 1 -4F2 1 -4F3 1 -4AE 1 -4AF 1 -4B0 1 -4B1 1 -478 1 -479 1 -424 1 -444 1 -425 1 -445 1 -4B2 1 -4B3 1 -4BA 1 -4BB 1 -460 1 -461 1 -47E 1 -47F 1 -47C 1 -47D 1 -47A 1 -47B 1 -426 1 -446 1 -4B4 1 -4B5 1 -427 1 -447 1 -4F4 1 -4F5 1 -4B6 1 -4B7 1 -4CB 1 -4CC 1 -4B8 1 -4B9 1 -4BC 1 -4BD 1 -4BE 1 -4BF 1 -40F 1 -45F 1 -428 1 -448 1 -429 1 -449 1 -42A 1 -44A 1 -42B 1 -44B 1 -4F8 1 -4F9 1 -42C 1 -44C 1 -48C 1 -48D 1 -462 1 -463 1 -42D 1 -44D 1 -4EC 1 -4ED 1 -42E 1 -44E 1 -42F 1 -44F 1 -464 1 -465 1 -466 1 -467 1 -46A 1 -46B 1 -468 1 -469 1 -46C 1 -46D 1 -46E 1 -46F 1 -470 1 -471 1 -472 1 -473 1 -474 1 -475 1 -476 1 -477 1 -4A8 1 -4A9 1 -4C0 1 -531 1 -561 1 -532 1 -562 1 -533 1 -563 1 -534 1 -564 1 -535 1 -565 1 -587 1 -536 1 -566 1 -537 1 -567 1 -538 1 -568 1 -539 1 -569 1 -53A 1 -56A 1 -53B 1 -56B 1 -53C 1 -56C 1 -53D 1 -56D 1 -53E 1 -56E 1 -53F 1 -56F 1 -540 1 -570 1 -541 1 -571 1 -542 1 -572 1 -543 1 -573 1 -544 1 -574 1 -545 1 -575 1 -546 1 -576 1 -547 1 -577 1 -548 1 -578 1 -549 1 -579 1 -54A 1 -57A 1 -54B 1 -57B 1 -54C 1 -57C 1 -54D 1 -57D 1 -54E 1 -57E 1 -54F 1 -57F 1 -550 1 -580 1 -551 1 -581 1 -552 1 -582 1 -553 1 -583 1 -554 1 -584 1 -555 1 -585 1 -556 1 -586 1 -559 1 -5D0 1 -5D1 1 -5D2 1 -5D3 1 -5D4 1 -5D5 1 -5F0 1 -5F1 1 -5D6 1 -5D7 1 -5D8 1 -5D9 1 -5F2 1 -5DA 1 -5DB 1 -5DC 1 -5DD 1 -5DE 1 -5DF 1 -5E0 1 -5E1 1 -5E2 1 -5E3 1 -5E4 1 -5E5 1 -5E6 1 -5E7 1 -5E8 1 -5E9 1 -5EA 1 -621 1 -674 1 -6FD 1 -622 1 -623 1 -672 1 -671 1 -624 1 -625 1 -673 1 -626 1 -627 1 -675 1 -66E 1 -628 1 -67B 1 -67E 1 -680 1 -629 1 -62A 1 -62B 1 -679 1 -67A 1 -67C 1 -67D 1 -67F 1 -62C 1 -683 1 -684 1 -686 1 -6BF 1 -687 1 -62D 1 -62E 1 -681 1 -682 1 -685 1 -62F 1 -630 1 -688 1 -689 1 -68A 1 -68B 1 -68C 1 -68D 1 -68E 1 -68F 1 -690 1 -6EE 1 -631 1 -632 1 -691 1 -692 1 -693 1 -694 1 -695 1 -696 1 -697 1 -698 1 -699 1 -6EF 1 -633 1 -634 1 -69A 1 -69B 1 -69C 1 -6FA 1 -635 1 -636 1 -69D 1 -69E 1 -6FB 1 -637 1 -638 1 -69F 1 -639 1 -63A 1 -6A0 1 -6FC 1 -641 1 -6A1 1 -6A2 1 -6A3 1 -6A4 1 -6A5 1 -6A6 1 -66F 1 -642 1 -6A7 1 -6A8 1 -643 1 -6A9 1 -6AA 1 -6AB 1 -6AC 1 -6AD 1 -6AE 1 -6AF 1 -6B0 1 -6B1 1 -6B2 1 -6B3 1 -6B4 1 -644 1 -6B5 1 -6B6 1 -6B7 1 -6B8 1 -645 1 -6FE 1 -646 1 -6BA 1 -6BB 1 -6BC 1 -6BD 1 -6B9 1 -647 1 -6BE 1 -6C1 1 -6C2 1 -6C3 1 -6FF 1 -6C0 1 -6D5 1 -648 1 -6E5 1 -676 1 -6C4 1 -6C5 1 -6C6 1 -6C7 1 -677 1 -6C8 1 -6C9 1 -6CA 1 -6CB 1 -6CF 1 -649 1 -64A 1 -6E6 1 -678 1 -6CC 1 -6CD 1 -6CE 1 -6D0 1 -6D1 1 -6D2 1 -6D3 1 -710 1 -712 1 -72D 1 -713 1 -714 1 -72E 1 -716 1 -715 1 -72F 1 -717 1 -718 1 -719 1 -74D 1 -71A 1 -71B 1 -71C 1 -71D 1 -71E 1 -71F 1 -74E 1 -720 1 -721 1 -722 1 -723 1 -724 1 -725 1 -726 1 -727 1 -74F 1 -728 1 -729 1 -72A 1 -72B 1 -72C 1 -780 1 -799 1 -79A 1 -781 1 -782 1 -783 1 -79C 1 -784 1 -785 1 -786 1 -787 1 -7A2 1 -7A3 1 -788 1 -7A5 1 -789 1 -78A 1 -78B 1 -79B 1 -78C 1 -798 1 -7A0 1 -7A1 1 -78D 1 -78E 1 -7A4 1 -78F 1 -790 1 -79D 1 -79E 1 -79F 1 -791 1 -792 1 -793 1 -794 1 -795 1 -796 1 -797 1 -7B1 1 -7A6 1 -7A7 1 -7A8 1 -7A9 1 -7AA 1 -7AB 1 -7AC 1 -7AD 1 -7AE 1 -7AF 1 -7B0 1 -4E00 1 -4E01 1 -4E02 1 -4E03 1 -4E04 1 -4E05 1 -4E06 1 -4E07 1 -4E08 1 -4E09 1 -4E0A 1 -4E0B 1 -4E0C 1 -4E0D 1 -4E0E 1 -4E0F 1 -4E10 1 -4E11 1 -4E12 1 -4E13 1 -4E14 1 -4E15 1 -4E16 1 -4E17 1 -4E18 1 -4E19 1 -4E1A 1 -4E1B 1 -4E1C 1 -4E1D 1 -4E1E 1 -4E1F 1 -4E20 1 -4E21 1 -4E22 1 -4E23 1 -4E24 1 -4E25 1 -4E26 1 -4E27 1 -4E28 1 -4E29 1 -4E2A 1 -4E2B 1 -4E2C 1 -4E2D 1 -4E2E 1 -4E2F 1 -4E30 1 -4E31 1 -4E32 1 -4E33 1 -4E34 1 -4E35 1 -4E36 1 -4E37 1 -4E38 1 -4E39 1 -4E3A 1 -4E3B 1 -4E3C 1 -4E3D 1 -4E3E 1 -4E3F 1 -4E40 1 -4E41 1 -4E42 1 -4E43 1 -4E44 1 -4E45 1 -4E46 1 -4E47 1 -4E48 1 -4E49 1 -4E4A 1 -4E4B 1 -4E4C 1 -4E4D 1 -4E4E 1 -4E4F 1 -4E50 1 -4E51 1 -4E52 1 -4E53 1 -4E54 1 -4E55 1 -4E56 1 -4E57 1 -4E58 1 -4E59 1 -4E5A 1 -4E5B 1 -4E5C 1 -4E5D 1 -4E5E 1 -4E5F 1 -4E60 1 -4E61 1 -4E62 1 -4E63 1 -4E64 1 -4E65 1 -4E66 1 -4E67 1 -4E68 1 -4E69 1 -4E6A 1 -4E6B 1 -4E6C 1 -4E6D 1 -4E6E 1 -4E6F 1 -4E70 1 -4E71 1 -4E72 1 -4E73 1 -4E74 1 -4E75 1 -4E76 1 -4E77 1 -4E78 1 -4E79 1 -4E7A 1 -4E7B 1 -4E7C 1 -4E7D 1 -4E7E 1 -4E7F 1 -4E80 1 -4E81 1 -4E82 1 -4E83 1 -4E84 1 -4E85 1 -4E86 1 -4E87 1 -4E88 1 -4E89 1 -4E8A 1 -4E8B 1 -4E8C 1 -4E8D 1 -4E8E 1 -4E8F 1 -4E90 1 -4E91 1 -4E92 1 -4E93 1 -4E94 1 -4E95 1 -4E96 1 -4E97 1 -4E98 1 -4E99 1 -4E9A 1 -4E9B 1 -4E9C 1 -4E9D 1 -4E9E 1 -4E9F 1 -4EA0 1 -4EA1 1 -4EA2 1 -4EA3 1 -4EA4 1 -4EA5 1 -4EA6 1 -4EA7 1 -4EA8 1 -4EA9 1 -4EAA 1 -4EAB 1 -4EAC 1 -4EAD 1 -4EAE 1 -4EAF 1 -4EB0 1 -4EB1 1 -4EB2 1 -4EB3 1 -4EB4 1 -4EB5 1 -4EB6 1 -4EB7 1 -4EB8 1 -4EB9 1 -4EBA 1 -4EBB 1 -4EBC 1 -4EBD 1 -4EBE 1 -4EBF 1 -4EC0 1 -4EC1 1 -4EC2 1 -4EC3 1 -4EC4 1 -4EC5 1 -4EC6 1 -4EC7 1 -4EC8 1 -4EC9 1 -4ECA 1 -4ECB 1 -4ECC 1 -4ECD 1 -4ECE 1 -4ECF 1 -4ED0 1 -4ED1 1 -4ED2 1 -4ED3 1 -4ED4 1 -4ED5 1 -4ED6 1 -4ED7 1 -4ED8 1 -4ED9 1 -4EDA 1 -4EDB 1 -4EDC 1 -4EDD 1 -4EDE 1 -4EDF 1 -4EE0 1 -4EE1 1 -4EE2 1 -4EE3 1 -4EE4 1 -4EE5 1 -4EE6 1 -4EE7 1 -4EE8 1 -4EE9 1 -4EEA 1 -4EEB 1 -4EEC 1 -4EED 1 -4EEE 1 -4EEF 1 -4EF0 1 -4EF1 1 -4EF2 1 -4EF3 1 -4EF4 1 -4EF5 1 -4EF6 1 -4EF7 1 -4EF8 1 -4EF9 1 -4EFA 1 -4EFB 1 -4EFC 1 -4EFD 1 -4EFE 1 -4EFF 1 -4F00 1 -4F01 1 -4F02 1 -4F03 1 -4F04 1 -4F05 1 -4F06 1 -4F07 1 -4F08 1 -4F09 1 -4F0A 1 -4F0B 1 -4F0C 1 -4F0D 1 -4F0E 1 -4F0F 1 -4F10 1 -4F11 1 -4F12 1 -4F13 1 -4F14 1 -4F15 1 -4F16 1 -4F17 1 -4F18 1 -4F19 1 -4F1A 1 -4F1B 1 -4F1C 1 -4F1D 1 -4F1E 1 -4F1F 1 -4F20 1 -4F21 1 -4F22 1 -4F23 1 -4F24 1 -4F25 1 -4F26 1 -4F27 1 -4F28 1 -4F29 1 -4F2A 1 -4F2B 1 -4F2C 1 -4F2D 1 -4F2E 1 -4F2F 1 -4F30 1 -4F31 1 -4F32 1 -4F33 1 -4F34 1 -4F35 1 -4F36 1 -4F37 1 -4F38 1 -4F39 1 -4F3A 1 -4F3B 1 -4F3C 1 -4F3D 1 -4F3E 1 -4F3F 1 -4F40 1 -4F41 1 -4F42 1 -4F43 1 -4F44 1 -4F45 1 -4F46 1 -4F47 1 -4F48 1 -4F49 1 -4F4A 1 -4F4B 1 -4F4C 1 -4F4D 1 -4F4E 1 -4F4F 1 -4F50 1 -4F51 1 -4F52 1 -4F53 1 -4F54 1 -4F55 1 -4F56 1 -4F57 1 -4F58 1 -4F59 1 -4F5A 1 -4F5B 1 -4F5C 1 -4F5D 1 -4F5E 1 -4F5F 1 -4F60 1 -4F61 1 -4F62 1 -4F63 1 -4F64 1 -4F65 1 -4F66 1 -4F67 1 -4F68 1 -4F69 1 -4F6A 1 -4F6B 1 -4F6C 1 -4F6D 1 -4F6E 1 -4F6F 1 -4F70 1 -4F71 1 -4F72 1 -4F73 1 -4F74 1 -4F75 1 -4F76 1 -4F77 1 -4F78 1 -4F79 1 -4F7A 1 -4F7B 1 -4F7C 1 -4F7D 1 -4F7E 1 -4F7F 1 -4F80 1 -4F81 1 -4F82 1 -4F83 1 -4F84 1 -4F85 1 -4F86 1 -4F87 1 -4F88 1 -4F89 1 -4F8A 1 -4F8B 1 -4F8C 1 -4F8D 1 -4F8E 1 -4F8F 1 -4F90 1 -4F91 1 -4F92 1 -4F93 1 -4F94 1 -4F95 1 -4F96 1 -4F97 1 -4F98 1 -4F99 1 -4F9A 1 -4F9B 1 -4F9C 1 -4F9D 1 -4F9E 1 -4F9F 1 -4FA0 1 -4FA1 1 -4FA2 1 -4FA3 1 -4FA4 1 -4FA5 1 -4FA6 1 -4FA7 1 -4FA8 1 -4FA9 1 -4FAA 1 -4FAB 1 -4FAC 1 -4FAD 1 -4FAE 1 -4FAF 1 -4FB0 1 -4FB1 1 -4FB2 1 -4FB3 1 -4FB4 1 -4FB5 1 -4FB6 1 -4FB7 1 -4FB8 1 -4FB9 1 -4FBA 1 -4FBB 1 -4FBC 1 -4FBD 1 -4FBE 1 -4FBF 1 -4FC0 1 -4FC1 1 -4FC2 1 -4FC3 1 -4FC4 1 -4FC5 1 -4FC6 1 -4FC7 1 -4FC8 1 -4FC9 1 -4FCA 1 -4FCB 1 -4FCC 1 -4FCD 1 -4FCE 1 -4FCF 1 -4FD0 1 -4FD1 1 -4FD2 1 -4FD3 1 -4FD4 1 -4FD5 1 -4FD6 1 -4FD7 1 -4FD8 1 -4FD9 1 -4FDA 1 -4FDB 1 -4FDC 1 -4FDD 1 -4FDE 1 -4FDF 1 -4FE0 1 -4FE1 1 -4FE2 1 -4FE3 1 -4FE4 1 -4FE5 1 -4FE6 1 -4FE7 1 -4FE8 1 -4FE9 1 -4FEA 1 -4FEB 1 -4FEC 1 -4FED 1 -4FEE 1 -4FEF 1 -4FF0 1 -4FF1 1 -4FF2 1 -4FF3 1 -4FF4 1 -4FF5 1 -4FF6 1 -4FF7 1 -4FF8 1 -4FF9 1 -4FFA 1 -4FFB 1 -4FFC 1 -4FFD 1 -4FFE 1 -4FFF 1 -237 1 -238 1 -239 1 -23A 1 -23B 1 -23C 1 -23D 1 -23E 1 -23F 1 -240 1 -241 1 -242 1 -243 1 -244 1 -245 1 -246 1 -247 1 -248 1 -249 1 -24A 1 -24B 1 -24C 1 -24D 1 -24E 1 -24F 1 -358 1 -359 1 -35A 1 -35B 1 -35C 1 -370 1 -371 1 -372 1 -373 1 -376 1 -377 1 -378 1 -379 1 -37B 1 -37C 1 -37D 1 -37F 1 -380 1 -381 1 -382 1 -383 1 -38B 1 -38D 1 -3A2 1 -3CF 1 -3FC 1 -3FD 1 -3FE 1 -3FF 1 -487 1 -4CF 1 -4F6 1 -4F7 1 -4FA 1 -4FB 1 -4FC 1 -4FD 1 -4FE 1 -4FF 1 -510 1 -511 1 -512 1 -513 1 -514 1 -515 1 -516 1 -517 1 -518 1 -519 1 -51A 1 -51B 1 -51C 1 -51D 1 -51E 1 -51F 1 -520 1 -521 1 -522 1 -523 1 -524 1 -525 1 -526 1 -527 1 -528 1 -529 1 -52A 1 -52B 1 -52C 1 -52D 1 -52E 1 -52F 1 -530 1 -557 1 -558 1 -560 1 -588 1 -58B 1 -58C 1 -58D 1 -58E 1 -58F 1 -590 1 -5A2 1 -5BA 1 -5C5 1 -5C6 1 -5C7 1 -5C8 1 -5C9 1 -5CA 1 -5CB 1 -5CC 1 -5CD 1 -5CE 1 -5CF 1 -5EB 1 -5EC 1 -5ED 1 -5EE 1 -5EF 1 -5F5 1 -5F6 1 -5F7 1 -5F8 1 -5F9 1 -5FA 1 -5FB 1 -5FC 1 -5FD 1 -5FE 1 -5FF 1 -604 1 -605 1 -606 1 -607 1 -608 1 -609 1 -60A 1 -60B 1 -616 1 -617 1 -618 1 -619 1 -61A 1 -61C 1 -61D 1 -61E 1 -620 1 -63B 1 -63C 1 -63D 1 -63E 1 -63F 1 -659 1 -65A 1 -65B 1 -65C 1 -65D 1 -65E 1 -65F 1 -70E 1 -74B 1 -74C 1 -750 1 -751 1 -752 1 -753 1 -754 1 -755 1 -756 1 -757 1 -758 1 -759 1 -75A 1 -75B 1 -75C 1 -75D 1 -75E 1 -75F 1 -760 1 -761 1 -762 1 -763 1 -764 1 -765 1 -766 1 -767 1 -768 1 -769 1 -76A 1 -76B 1 -76C 1 -76D 1 -76E 1 -76F 1 -770 1 -771 1 -772 1 -773 1 -774 1 -775 1 -776 1 -777 1 -778 1 -779 1 -77A 1 -77B 1 -77C 1 -77D 1 -77E 1 -77F 1 -7B2 1 -7B3 1 -7B4 1 -7B5 1 -7B6 1 -7B7 1 -7B8 1 -7B9 1 -7BA 1 -7BB 1 -7BC 1 -7BD 1 -7BE 1 -7BF 1 -7C0 1 -7C1 1 -7C2 1 -7C3 1 -7C4 1 -7C5 1 -7C6 1 -7C7 1 -7C8 1 -7C9 1 -7CA 1 -7CB 1 -7CC 1 -7CD 1 -7CE 1 -7CF 1 -7D0 1 -7D1 1 -7D2 1 -7D3 1 -7D4 1 -7D5 1 -7D6 1 -7D7 1 -7D8 1 -7D9 1 -7DA 1 -7DB 1 -7DC 1 -7DD 1 -7DE 1 -7DF 1 -7E0 1 -7E1 1 -7E2 1 -7E3 1 -7E4 1 -7E5 1 -7E6 1 -7E7 1 -7E8 1 -7E9 1 -7EA 1 -7EB 1 -7EC 1 -7ED 1 -7EE 1 -7EF 1 -7F0 1 -7F1 1 -7F2 1 -7F3 1 -7F4 1 -7F5 1 -7F6 1 -7F7 1 -7F8 1 -7F9 1 -7FA 1 -7FB 1 -7FC 1 -7FD 1 -7FE 1 -7FF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -SET NAMES utf8; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=NDB CHARACTER SET utf8; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_general_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_icelandic_ci; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -85 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -300 1 -301 1 -302 1 -303 1 -304 1 -305 1 -306 1 -307 1 -308 1 -309 1 -30A 1 -30B 1 -30C 1 -30D 1 -30E 1 -30F 1 -310 1 -311 1 -312 1 -313 1 -314 1 -315 1 -316 1 -317 1 -318 1 -319 1 -31A 1 -31B 1 -31C 1 -31D 1 -31E 1 -31F 1 -320 1 -321 1 -322 1 -323 1 -324 1 -325 1 -326 1 -327 1 -328 1 -329 1 -32A 1 -32B 1 -32C 1 -32D 1 -32E 1 -32F 1 -330 1 -331 1 -332 1 -333 1 -334 1 -335 1 -336 1 -337 1 -338 1 -339 1 -33A 1 -33B 1 -33C 1 -33D 1 -33E 1 -33F 1 -340 1 -341 1 -342 1 -343 1 -344 1 -345 1 -346 1 -347 1 -348 1 -349 1 -34A 1 -34B 1 -34C 1 -34D 1 -34E 1 -34F 1 -350 1 -351 1 -352 1 -353 1 -354 1 -355 1 -356 1 -357 1 -35D 1 -35E 1 -35F 1 -360 1 -361 1 -362 1 -483 1 -484 1 -485 1 -486 1 -488 1 -489 1 -591 1 -592 1 -593 1 -594 1 -595 1 -596 1 -597 1 -598 1 -599 1 -59A 1 -59B 1 -59C 1 -59D 1 -59E 1 -59F 1 -5A0 1 -5A1 1 -5A3 1 -5A4 1 -5A5 1 -5A6 1 -5A7 1 -5A8 1 -5A9 1 -5AA 1 -5AB 1 -5AC 1 -5AD 1 -5AE 1 -5AF 1 -5B0 1 -5B1 1 -5B2 1 -5B3 1 -5B4 1 -5B5 1 -5B6 1 -5B7 1 -5B8 1 -5B9 1 -5BB 1 -5BC 1 -5BD 1 -5BF 1 -5C1 1 -5C2 1 -5C4 1 -600 1 -601 1 -602 1 -603 1 -610 1 -611 1 -612 1 -613 1 -614 1 -615 1 -64B 1 -64C 1 -64D 1 -64E 1 -64F 1 -650 1 -651 1 -652 1 -653 1 -654 1 -655 1 -656 1 -657 1 -658 1 -670 1 -6D6 1 -6D7 1 -6D8 1 -6D9 1 -6DA 1 -6DB 1 -6DC 1 -6DD 1 -6DE 1 -6DF 1 -6E0 1 -6E1 1 -6E2 1 -6E3 1 -6E4 1 -6E7 1 -6E8 1 -6EA 1 -6EB 1 -6EC 1 -6ED 1 -70F 1 -711 1 -730 1 -731 1 -732 1 -733 1 -734 1 -735 1 -736 1 -737 1 -738 1 -739 1 -73A 1 -73B 1 -73C 1 -73D 1 -73E 1 -73F 1 -740 1 -741 1 -742 1 -743 1 -744 1 -745 1 -746 1 -747 1 -748 1 -749 1 -74A 1 -640 1 -60 1 -B4 1 -384 1 -2DC 1 -5E 1 -AF 1 -2D8 1 -2D9 1 -A8 1 -385 1 -2DA 1 -2DD 1 -B8 1 -2DB 1 -5F 1 -AD 1 -2D 1 -58A 1 -2C 1 -55D 1 -60C 1 -60D 1 -66B 1 -66C 1 -3B 1 -37E 1 -61B 1 -3A 1 -589 1 -703 1 -704 1 -705 1 -706 1 -707 1 -708 1 -21 1 -A1 1 -55C 1 -3F 1 -BF 1 -55E 1 -61F 1 -709 1 -2E 1 -6D4 1 -701 1 -702 1 -B7 1 -387 1 -700 1 -27 1 -22 1 -AB 1 -BB 1 -28 1 -29 1 -5B 1 -7B 1 -7D 1 -A7 1 -B6 1 -A9 1 -AE 1 -40 1 -2A 1 -66D 1 -2F 1 -26 1 -23 1 -25 1 -66A 1 -55A 1 -55B 1 -55F 1 -5BE 1 -5C0 1 -5C3 1 -5F3 1 -5F4 1 -70A 1 -70B 1 -70C 1 -70D 1 -2B9 1 -374 1 -375 1 -2BA 1 -2C2 1 -2C3 1 -2C4 1 -2C5 1 -2C6 1 -2C7 1 -2C8 1 -2C9 1 -2CA 1 -2CB 1 -2CC 1 -2CD 1 -2CE 1 -2CF 1 -2D2 1 -2D3 1 -2D4 1 -2D5 1 -2D6 1 -2D7 1 -2DE 1 -2DF 1 -2E5 1 -2E6 1 -2E7 1 -2E8 1 -2E9 1 -2EA 1 -2EB 1 -2EC 1 -2ED 1 -2EF 1 -2F0 1 -2F1 1 -2F2 1 -2F3 1 -2F4 1 -2F5 1 -2F6 1 -2F7 1 -2F8 1 -2F9 1 -2FA 1 -2FB 1 -2FC 1 -2FD 1 -2FE 1 -2FF 1 -B0 1 -482 1 -60E 1 -60F 1 -6E9 1 -3F6 1 -2B 1 -B1 1 -F7 1 -D7 1 -3C 1 -3D 1 -3E 1 -AC 1 -7C 1 -A6 1 -7E 1 -2D0 1 -2D1 1 -A4 1 -A2 1 -24 1 -A3 1 -A5 1 -30 1 -660 1 -6F0 1 -31 1 -B9 1 -661 1 -6F1 1 -BD 1 -BC 1 -32 1 -B2 1 -662 1 -6F2 1 -33 1 -B3 1 -663 1 -6F3 1 -BE 1 -34 1 -664 1 -6F4 1 -35 1 -665 1 -6F5 1 -36 1 -666 1 -6F6 1 -37 1 -667 1 -6F7 1 -38 1 -668 1 -6F8 1 -39 1 -669 1 -6F9 1 -41 1 -61 1 -AA 1 -C0 1 -C2 1 -C3 1 -E0 1 -E2 1 -E3 1 -100 1 -101 1 -102 1 -103 1 -104 1 -105 1 -1CD 1 -1CE 1 -1DE 1 -1DF 1 -1E0 1 -1E1 1 -1FA 1 -1FB 1 -200 1 -201 1 -202 1 -203 1 -226 1 -227 1 -363 1 -C1 1 -E1 1 -1E2 1 -1E3 1 -1FC 1 -1FD 1 -250 1 -251 1 -252 1 -42 1 -62 1 -299 1 -180 1 -181 1 -253 1 -182 1 -183 1 -43 1 -63 1 -C7 1 -E7 1 -106 1 -107 1 -108 1 -109 1 -10A 1 -10B 1 -10C 1 -10D 1 -368 1 -187 1 -188 1 -255 1 -44 1 -64 1 -10E 1 -10F 1 -369 1 -1C4 1 -1C5 1 -1C6 1 -1F1 1 -1F2 1 -1F3 1 -2A3 1 -2A5 1 -2A4 1 -D0 1 -F0 1 -110 1 -111 1 -189 1 -256 1 -18A 1 -257 1 -18B 1 -18C 1 -221 1 -45 1 -65 1 -C8 1 -CA 1 -CB 1 -E8 1 -EA 1 -EB 1 -112 1 -113 1 -114 1 -115 1 -116 1 -117 1 -118 1 -119 1 -11A 1 -11B 1 -204 1 -205 1 -206 1 -207 1 -228 1 -229 1 -364 1 -C9 1 -E9 1 -18E 1 -1DD 1 -18F 1 -259 1 -190 1 -25B 1 -258 1 -25A 1 -25C 1 -25D 1 -25E 1 -29A 1 -264 1 -46 1 -66 1 -2A9 1 -191 1 -192 1 -47 1 -67 1 -11C 1 -11D 1 -11E 1 -11F 1 -120 1 -121 1 -122 1 -123 1 -1E6 1 -1E7 1 -1F4 1 -1F5 1 -261 1 -262 1 -1E4 1 -1E5 1 -193 1 -260 1 -29B 1 -194 1 -263 1 -2E0 1 -1A2 1 -1A3 1 -48 1 -68 1 -124 1 -125 1 -21E 1 -21F 1 -2B0 1 -36A 1 -29C 1 -195 1 -1F6 1 -126 1 -127 1 -266 1 -2B1 1 -267 1 -2BB 1 -2BD 1 -49 1 -69 1 -CC 1 -CE 1 -CF 1 -EC 1 -EE 1 -EF 1 -128 1 -129 1 -12A 1 -12B 1 -12C 1 -12D 1 -12E 1 -12F 1 -130 1 -1CF 1 -1D0 1 -208 1 -209 1 -20A 1 -20B 1 -365 1 -132 1 -133 1 -CD 1 -ED 1 -131 1 -26A 1 -197 1 -268 1 -196 1 -269 1 -4A 1 -6A 1 -134 1 -135 1 -1F0 1 -2B2 1 -29D 1 -25F 1 -284 1 -4B 1 -6B 1 -136 1 -137 1 -1E8 1 -1E9 1 -198 1 -199 1 -29E 1 -4C 1 -6C 1 -139 1 -13A 1 -13B 1 -13C 1 -13D 1 -13E 1 -2E1 1 -13F 1 -140 1 -1C7 1 -1C8 1 -1C9 1 -2AA 1 -2AB 1 -29F 1 -141 1 -142 1 -19A 1 -26B 1 -26C 1 -26D 1 -234 1 -26E 1 -19B 1 -28E 1 -4D 1 -6D 1 -36B 1 -271 1 -4E 1 -6E 1 -D1 1 -F1 1 -143 1 -144 1 -145 1 -146 1 -147 1 -148 1 -1F8 1 -1F9 1 -1CA 1 -1CB 1 -1CC 1 -274 1 -19D 1 -272 1 -19E 1 -220 1 -273 1 -235 1 -14A 1 -14B 1 -4F 1 -6F 1 -BA 1 -D2 1 -D4 1 -D5 1 -F2 1 -F4 1 -F5 1 -14C 1 -14D 1 -14E 1 -14F 1 -150 1 -151 1 -1A0 1 -1A1 1 -1D1 1 -1D2 1 -1EA 1 -1EB 1 -1EC 1 -1ED 1 -20C 1 -20D 1 -20E 1 -20F 1 -22A 1 -22B 1 -22C 1 -22D 1 -22E 1 -22F 1 -230 1 -231 1 -366 1 -152 1 -153 1 -D3 1 -F3 1 -276 1 -1FE 1 -1FF 1 -186 1 -254 1 -19F 1 -275 1 -277 1 -222 1 -223 1 -50 1 -70 1 -1A4 1 -1A5 1 -278 1 -51 1 -71 1 -2A0 1 -138 1 -52 1 -72 1 -154 1 -155 1 -156 1 -157 1 -158 1 -159 1 -210 1 -211 1 -212 1 -213 1 -2B3 1 -36C 1 -1A6 1 -280 1 -279 1 -2B4 1 -27A 1 -27B 1 -2B5 1 -27C 1 -27D 1 -27E 1 -27F 1 -281 1 -2B6 1 -53 1 -73 1 -15A 1 -15B 1 -15C 1 -15D 1 -15E 1 -15F 1 -160 1 -161 1 -17F 1 -218 1 -219 1 -2E2 1 -DF 1 -282 1 -1A9 1 -283 1 -1AA 1 -285 1 -286 1 -54 1 -74 1 -162 1 -163 1 -164 1 -165 1 -21A 1 -21B 1 -36D 1 -2A8 1 -1BE 1 -2A6 1 -2A7 1 -166 1 -167 1 -1AB 1 -1AC 1 -1AD 1 -1AE 1 -288 1 -236 1 -287 1 -55 1 -75 1 -D9 1 -DB 1 -DC 1 -F9 1 -FB 1 -FC 1 -168 1 -169 1 -16A 1 -16B 1 -16C 1 -16D 1 -16E 1 -16F 1 -170 1 -171 1 -172 1 -173 1 -1AF 1 -1B0 1 -1D3 1 -1D4 1 -1D5 1 -1D6 1 -1D7 1 -1D8 1 -1D9 1 -1DA 1 -1DB 1 -1DC 1 -214 1 -215 1 -216 1 -217 1 -367 1 -DA 1 -FA 1 -289 1 -265 1 -2AE 1 -2AF 1 -19C 1 -26F 1 -270 1 -1B1 1 -28A 1 -56 1 -76 1 -36E 1 -1B2 1 -28B 1 -28C 1 -57 1 -77 1 -174 1 -175 1 -2B7 1 -28D 1 -58 1 -78 1 -2E3 1 -36F 1 -59 1 -79 1 -FF 1 -176 1 -177 1 -178 1 -232 1 -233 1 -2B8 1 -DD 1 -FD 1 -28F 1 -1B3 1 -1B4 1 -5A 1 -7A 1 -179 1 -17A 1 -17B 1 -17C 1 -17D 1 -17E 1 -18D 1 -DE 1 -FE 1 -C4 1 -C6 1 -E4 1 -E6 1 -D6 1 -D8 1 -F6 1 -F8 1 -C5 1 -E5 1 -1B5 1 -1B6 1 -224 1 -225 1 -290 1 -291 1 -1B7 1 -1EE 1 -1EF 1 -292 1 -1B8 1 -1B9 1 -1BA 1 -293 1 -21C 1 -21D 1 -1BF 1 -1F7 1 -1BB 1 -1A7 1 -1A8 1 -1BC 1 -1BD 1 -184 1 -185 1 -294 1 -2C0 1 -2BC 1 -149 1 -2EE 1 -2BE 1 -295 1 -2E4 1 -2BF 1 -2C1 1 -2A1 1 -2A2 1 -296 1 -1C0 1 -1C1 1 -1C2 1 -1C3 1 -297 1 -298 1 -2AC 1 -2AD 1 -386 1 -391 1 -3AC 1 -3B1 1 -392 1 -3B2 1 -3D0 1 -393 1 -3B3 1 -394 1 -3B4 1 -388 1 -395 1 -3AD 1 -3B5 1 -3F5 1 -3DC 1 -3DD 1 -3DA 1 -3DB 1 -396 1 -3B6 1 -389 1 -397 1 -3AE 1 -3B7 1 -398 1 -3B8 1 -3D1 1 -3F4 1 -37A 1 -38A 1 -390 1 -399 1 -3AA 1 -3AF 1 -3B9 1 -3CA 1 -3F3 1 -39A 1 -3BA 1 -3F0 1 -3D7 1 -39B 1 -3BB 1 -B5 1 -39C 1 -3BC 1 -39D 1 -3BD 1 -39E 1 -3BE 1 -38C 1 -39F 1 -3BF 1 -3CC 1 -3A0 1 -3C0 1 -3D6 1 -3DE 1 -3DF 1 -3D8 1 -3D9 1 -3A1 1 -3C1 1 -3F1 1 -3A3 1 -3C2 1 -3C3 1 -3F2 1 -3F9 1 -3A4 1 -3C4 1 -38E 1 -3A5 1 -3AB 1 -3B0 1 -3C5 1 -3CB 1 -3CD 1 -3D2 1 -3D3 1 -3D4 1 -3A6 1 -3C6 1 -3D5 1 -3A7 1 -3C7 1 -3A8 1 -3C8 1 -38F 1 -3A9 1 -3C9 1 -3CE 1 -3E0 1 -3E1 1 -3F7 1 -3F8 1 -3FA 1 -3FB 1 -3E2 1 -3E3 1 -3E4 1 -3E5 1 -3E6 1 -3E7 1 -3E8 1 -3E9 1 -3EA 1 -3EB 1 -3EC 1 -3ED 1 -3EE 1 -3EF 1 -410 1 -430 1 -4D0 1 -4D1 1 -4D2 1 -4D3 1 -4D8 1 -4D9 1 -4DA 1 -4DB 1 -4D4 1 -4D5 1 -411 1 -431 1 -412 1 -432 1 -413 1 -433 1 -490 1 -491 1 -492 1 -493 1 -494 1 -495 1 -414 1 -434 1 -500 1 -501 1 -402 1 -452 1 -502 1 -503 1 -403 1 -453 1 -498 1 -499 1 -400 1 -401 1 -415 1 -435 1 -450 1 -451 1 -4D6 1 -4D7 1 -404 1 -454 1 -416 1 -436 1 -4C1 1 -4C2 1 -4DC 1 -4DD 1 -496 1 -497 1 -417 1 -437 1 -504 1 -505 1 -4DE 1 -4DF 1 -405 1 -455 1 -4E0 1 -4E1 1 -506 1 -507 1 -40D 1 -418 1 -438 1 -45D 1 -4E2 1 -4E3 1 -48A 1 -48B 1 -4E4 1 -4E5 1 -406 1 -456 1 -407 1 -457 1 -419 1 -439 1 -408 1 -458 1 -41A 1 -43A 1 -49A 1 -49B 1 -4C3 1 -4C4 1 -4A0 1 -4A1 1 -49E 1 -49F 1 -49C 1 -49D 1 -41B 1 -43B 1 -4C5 1 -4C6 1 -409 1 -459 1 -508 1 -509 1 -41C 1 -43C 1 -4CD 1 -4CE 1 -41D 1 -43D 1 -4C9 1 -4CA 1 -4A2 1 -4A3 1 -4C7 1 -4C8 1 -4A4 1 -4A5 1 -40A 1 -45A 1 -50A 1 -50B 1 -41E 1 -43E 1 -4E6 1 -4E7 1 -4E8 1 -4E9 1 -4EA 1 -4EB 1 -41F 1 -43F 1 -4A6 1 -4A7 1 -480 1 -481 1 -420 1 -440 1 -48E 1 -48F 1 -421 1 -441 1 -50C 1 -50D 1 -4AA 1 -4AB 1 -422 1 -442 1 -50E 1 -50F 1 -4AC 1 -4AD 1 -40B 1 -45B 1 -40C 1 -45C 1 -423 1 -443 1 -4EE 1 -4EF 1 -40E 1 -45E 1 -4F0 1 -4F1 1 -4F2 1 -4F3 1 -4AE 1 -4AF 1 -4B0 1 -4B1 1 -478 1 -479 1 -424 1 -444 1 -425 1 -445 1 -4B2 1 -4B3 1 -4BA 1 -4BB 1 -460 1 -461 1 -47E 1 -47F 1 -47C 1 -47D 1 -47A 1 -47B 1 -426 1 -446 1 -4B4 1 -4B5 1 -427 1 -447 1 -4F4 1 -4F5 1 -4B6 1 -4B7 1 -4CB 1 -4CC 1 -4B8 1 -4B9 1 -4BC 1 -4BD 1 -4BE 1 -4BF 1 -40F 1 -45F 1 -428 1 -448 1 -429 1 -449 1 -42A 1 -44A 1 -42B 1 -44B 1 -4F8 1 -4F9 1 -42C 1 -44C 1 -48C 1 -48D 1 -462 1 -463 1 -42D 1 -44D 1 -4EC 1 -4ED 1 -42E 1 -44E 1 -42F 1 -44F 1 -464 1 -465 1 -466 1 -467 1 -46A 1 -46B 1 -468 1 -469 1 -46C 1 -46D 1 -46E 1 -46F 1 -470 1 -471 1 -472 1 -473 1 -474 1 -475 1 -476 1 -477 1 -4A8 1 -4A9 1 -4C0 1 -531 1 -561 1 -532 1 -562 1 -533 1 -563 1 -534 1 -564 1 -535 1 -565 1 -587 1 -536 1 -566 1 -537 1 -567 1 -538 1 -568 1 -539 1 -569 1 -53A 1 -56A 1 -53B 1 -56B 1 -53C 1 -56C 1 -53D 1 -56D 1 -53E 1 -56E 1 -53F 1 -56F 1 -540 1 -570 1 -541 1 -571 1 -542 1 -572 1 -543 1 -573 1 -544 1 -574 1 -545 1 -575 1 -546 1 -576 1 -547 1 -577 1 -548 1 -578 1 -549 1 -579 1 -54A 1 -57A 1 -54B 1 -57B 1 -54C 1 -57C 1 -54D 1 -57D 1 -54E 1 -57E 1 -54F 1 -57F 1 -550 1 -580 1 -551 1 -581 1 -552 1 -582 1 -553 1 -583 1 -554 1 -584 1 -555 1 -585 1 -556 1 -586 1 -559 1 -5D0 1 -5D1 1 -5D2 1 -5D3 1 -5D4 1 -5D5 1 -5F0 1 -5F1 1 -5D6 1 -5D7 1 -5D8 1 -5D9 1 -5F2 1 -5DA 1 -5DB 1 -5DC 1 -5DD 1 -5DE 1 -5DF 1 -5E0 1 -5E1 1 -5E2 1 -5E3 1 -5E4 1 -5E5 1 -5E6 1 -5E7 1 -5E8 1 -5E9 1 -5EA 1 -621 1 -674 1 -6FD 1 -622 1 -623 1 -672 1 -671 1 -624 1 -625 1 -673 1 -626 1 -627 1 -675 1 -66E 1 -628 1 -67B 1 -67E 1 -680 1 -629 1 -62A 1 -62B 1 -679 1 -67A 1 -67C 1 -67D 1 -67F 1 -62C 1 -683 1 -684 1 -686 1 -6BF 1 -687 1 -62D 1 -62E 1 -681 1 -682 1 -685 1 -62F 1 -630 1 -688 1 -689 1 -68A 1 -68B 1 -68C 1 -68D 1 -68E 1 -68F 1 -690 1 -6EE 1 -631 1 -632 1 -691 1 -692 1 -693 1 -694 1 -695 1 -696 1 -697 1 -698 1 -699 1 -6EF 1 -633 1 -634 1 -69A 1 -69B 1 -69C 1 -6FA 1 -635 1 -636 1 -69D 1 -69E 1 -6FB 1 -637 1 -638 1 -69F 1 -639 1 -63A 1 -6A0 1 -6FC 1 -641 1 -6A1 1 -6A2 1 -6A3 1 -6A4 1 -6A5 1 -6A6 1 -66F 1 -642 1 -6A7 1 -6A8 1 -643 1 -6A9 1 -6AA 1 -6AB 1 -6AC 1 -6AD 1 -6AE 1 -6AF 1 -6B0 1 -6B1 1 -6B2 1 -6B3 1 -6B4 1 -644 1 -6B5 1 -6B6 1 -6B7 1 -6B8 1 -645 1 -6FE 1 -646 1 -6BA 1 -6BB 1 -6BC 1 -6BD 1 -6B9 1 -647 1 -6BE 1 -6C1 1 -6C2 1 -6C3 1 -6FF 1 -6C0 1 -6D5 1 -648 1 -6E5 1 -676 1 -6C4 1 -6C5 1 -6C6 1 -6C7 1 -677 1 -6C8 1 -6C9 1 -6CA 1 -6CB 1 -6CF 1 -649 1 -64A 1 -6E6 1 -678 1 -6CC 1 -6CD 1 -6CE 1 -6D0 1 -6D1 1 -6D2 1 -6D3 1 -710 1 -712 1 -72D 1 -713 1 -714 1 -72E 1 -716 1 -715 1 -72F 1 -717 1 -718 1 -719 1 -74D 1 -71A 1 -71B 1 -71C 1 -71D 1 -71E 1 -71F 1 -74E 1 -720 1 -721 1 -722 1 -723 1 -724 1 -725 1 -726 1 -727 1 -74F 1 -728 1 -729 1 -72A 1 -72B 1 -72C 1 -780 1 -799 1 -79A 1 -781 1 -782 1 -783 1 -79C 1 -784 1 -785 1 -786 1 -787 1 -7A2 1 -7A3 1 -788 1 -7A5 1 -789 1 -78A 1 -78B 1 -79B 1 -78C 1 -798 1 -7A0 1 -7A1 1 -78D 1 -78E 1 -7A4 1 -78F 1 -790 1 -79D 1 -79E 1 -79F 1 -791 1 -792 1 -793 1 -794 1 -795 1 -796 1 -797 1 -7B1 1 -7A6 1 -7A7 1 -7A8 1 -7A9 1 -7AA 1 -7AB 1 -7AC 1 -7AD 1 -7AE 1 -7AF 1 -7B0 1 -4E00 1 -4E01 1 -4E02 1 -4E03 1 -4E04 1 -4E05 1 -4E06 1 -4E07 1 -4E08 1 -4E09 1 -4E0A 1 -4E0B 1 -4E0C 1 -4E0D 1 -4E0E 1 -4E0F 1 -4E10 1 -4E11 1 -4E12 1 -4E13 1 -4E14 1 -4E15 1 -4E16 1 -4E17 1 -4E18 1 -4E19 1 -4E1A 1 -4E1B 1 -4E1C 1 -4E1D 1 -4E1E 1 -4E1F 1 -4E20 1 -4E21 1 -4E22 1 -4E23 1 -4E24 1 -4E25 1 -4E26 1 -4E27 1 -4E28 1 -4E29 1 -4E2A 1 -4E2B 1 -4E2C 1 -4E2D 1 -4E2E 1 -4E2F 1 -4E30 1 -4E31 1 -4E32 1 -4E33 1 -4E34 1 -4E35 1 -4E36 1 -4E37 1 -4E38 1 -4E39 1 -4E3A 1 -4E3B 1 -4E3C 1 -4E3D 1 -4E3E 1 -4E3F 1 -4E40 1 -4E41 1 -4E42 1 -4E43 1 -4E44 1 -4E45 1 -4E46 1 -4E47 1 -4E48 1 -4E49 1 -4E4A 1 -4E4B 1 -4E4C 1 -4E4D 1 -4E4E 1 -4E4F 1 -4E50 1 -4E51 1 -4E52 1 -4E53 1 -4E54 1 -4E55 1 -4E56 1 -4E57 1 -4E58 1 -4E59 1 -4E5A 1 -4E5B 1 -4E5C 1 -4E5D 1 -4E5E 1 -4E5F 1 -4E60 1 -4E61 1 -4E62 1 -4E63 1 -4E64 1 -4E65 1 -4E66 1 -4E67 1 -4E68 1 -4E69 1 -4E6A 1 -4E6B 1 -4E6C 1 -4E6D 1 -4E6E 1 -4E6F 1 -4E70 1 -4E71 1 -4E72 1 -4E73 1 -4E74 1 -4E75 1 -4E76 1 -4E77 1 -4E78 1 -4E79 1 -4E7A 1 -4E7B 1 -4E7C 1 -4E7D 1 -4E7E 1 -4E7F 1 -4E80 1 -4E81 1 -4E82 1 -4E83 1 -4E84 1 -4E85 1 -4E86 1 -4E87 1 -4E88 1 -4E89 1 -4E8A 1 -4E8B 1 -4E8C 1 -4E8D 1 -4E8E 1 -4E8F 1 -4E90 1 -4E91 1 -4E92 1 -4E93 1 -4E94 1 -4E95 1 -4E96 1 -4E97 1 -4E98 1 -4E99 1 -4E9A 1 -4E9B 1 -4E9C 1 -4E9D 1 -4E9E 1 -4E9F 1 -4EA0 1 -4EA1 1 -4EA2 1 -4EA3 1 -4EA4 1 -4EA5 1 -4EA6 1 -4EA7 1 -4EA8 1 -4EA9 1 -4EAA 1 -4EAB 1 -4EAC 1 -4EAD 1 -4EAE 1 -4EAF 1 -4EB0 1 -4EB1 1 -4EB2 1 -4EB3 1 -4EB4 1 -4EB5 1 -4EB6 1 -4EB7 1 -4EB8 1 -4EB9 1 -4EBA 1 -4EBB 1 -4EBC 1 -4EBD 1 -4EBE 1 -4EBF 1 -4EC0 1 -4EC1 1 -4EC2 1 -4EC3 1 -4EC4 1 -4EC5 1 -4EC6 1 -4EC7 1 -4EC8 1 -4EC9 1 -4ECA 1 -4ECB 1 -4ECC 1 -4ECD 1 -4ECE 1 -4ECF 1 -4ED0 1 -4ED1 1 -4ED2 1 -4ED3 1 -4ED4 1 -4ED5 1 -4ED6 1 -4ED7 1 -4ED8 1 -4ED9 1 -4EDA 1 -4EDB 1 -4EDC 1 -4EDD 1 -4EDE 1 -4EDF 1 -4EE0 1 -4EE1 1 -4EE2 1 -4EE3 1 -4EE4 1 -4EE5 1 -4EE6 1 -4EE7 1 -4EE8 1 -4EE9 1 -4EEA 1 -4EEB 1 -4EEC 1 -4EED 1 -4EEE 1 -4EEF 1 -4EF0 1 -4EF1 1 -4EF2 1 -4EF3 1 -4EF4 1 -4EF5 1 -4EF6 1 -4EF7 1 -4EF8 1 -4EF9 1 -4EFA 1 -4EFB 1 -4EFC 1 -4EFD 1 -4EFE 1 -4EFF 1 -4F00 1 -4F01 1 -4F02 1 -4F03 1 -4F04 1 -4F05 1 -4F06 1 -4F07 1 -4F08 1 -4F09 1 -4F0A 1 -4F0B 1 -4F0C 1 -4F0D 1 -4F0E 1 -4F0F 1 -4F10 1 -4F11 1 -4F12 1 -4F13 1 -4F14 1 -4F15 1 -4F16 1 -4F17 1 -4F18 1 -4F19 1 -4F1A 1 -4F1B 1 -4F1C 1 -4F1D 1 -4F1E 1 -4F1F 1 -4F20 1 -4F21 1 -4F22 1 -4F23 1 -4F24 1 -4F25 1 -4F26 1 -4F27 1 -4F28 1 -4F29 1 -4F2A 1 -4F2B 1 -4F2C 1 -4F2D 1 -4F2E 1 -4F2F 1 -4F30 1 -4F31 1 -4F32 1 -4F33 1 -4F34 1 -4F35 1 -4F36 1 -4F37 1 -4F38 1 -4F39 1 -4F3A 1 -4F3B 1 -4F3C 1 -4F3D 1 -4F3E 1 -4F3F 1 -4F40 1 -4F41 1 -4F42 1 -4F43 1 -4F44 1 -4F45 1 -4F46 1 -4F47 1 -4F48 1 -4F49 1 -4F4A 1 -4F4B 1 -4F4C 1 -4F4D 1 -4F4E 1 -4F4F 1 -4F50 1 -4F51 1 -4F52 1 -4F53 1 -4F54 1 -4F55 1 -4F56 1 -4F57 1 -4F58 1 -4F59 1 -4F5A 1 -4F5B 1 -4F5C 1 -4F5D 1 -4F5E 1 -4F5F 1 -4F60 1 -4F61 1 -4F62 1 -4F63 1 -4F64 1 -4F65 1 -4F66 1 -4F67 1 -4F68 1 -4F69 1 -4F6A 1 -4F6B 1 -4F6C 1 -4F6D 1 -4F6E 1 -4F6F 1 -4F70 1 -4F71 1 -4F72 1 -4F73 1 -4F74 1 -4F75 1 -4F76 1 -4F77 1 -4F78 1 -4F79 1 -4F7A 1 -4F7B 1 -4F7C 1 -4F7D 1 -4F7E 1 -4F7F 1 -4F80 1 -4F81 1 -4F82 1 -4F83 1 -4F84 1 -4F85 1 -4F86 1 -4F87 1 -4F88 1 -4F89 1 -4F8A 1 -4F8B 1 -4F8C 1 -4F8D 1 -4F8E 1 -4F8F 1 -4F90 1 -4F91 1 -4F92 1 -4F93 1 -4F94 1 -4F95 1 -4F96 1 -4F97 1 -4F98 1 -4F99 1 -4F9A 1 -4F9B 1 -4F9C 1 -4F9D 1 -4F9E 1 -4F9F 1 -4FA0 1 -4FA1 1 -4FA2 1 -4FA3 1 -4FA4 1 -4FA5 1 -4FA6 1 -4FA7 1 -4FA8 1 -4FA9 1 -4FAA 1 -4FAB 1 -4FAC 1 -4FAD 1 -4FAE 1 -4FAF 1 -4FB0 1 -4FB1 1 -4FB2 1 -4FB3 1 -4FB4 1 -4FB5 1 -4FB6 1 -4FB7 1 -4FB8 1 -4FB9 1 -4FBA 1 -4FBB 1 -4FBC 1 -4FBD 1 -4FBE 1 -4FBF 1 -4FC0 1 -4FC1 1 -4FC2 1 -4FC3 1 -4FC4 1 -4FC5 1 -4FC6 1 -4FC7 1 -4FC8 1 -4FC9 1 -4FCA 1 -4FCB 1 -4FCC 1 -4FCD 1 -4FCE 1 -4FCF 1 -4FD0 1 -4FD1 1 -4FD2 1 -4FD3 1 -4FD4 1 -4FD5 1 -4FD6 1 -4FD7 1 -4FD8 1 -4FD9 1 -4FDA 1 -4FDB 1 -4FDC 1 -4FDD 1 -4FDE 1 -4FDF 1 -4FE0 1 -4FE1 1 -4FE2 1 -4FE3 1 -4FE4 1 -4FE5 1 -4FE6 1 -4FE7 1 -4FE8 1 -4FE9 1 -4FEA 1 -4FEB 1 -4FEC 1 -4FED 1 -4FEE 1 -4FEF 1 -4FF0 1 -4FF1 1 -4FF2 1 -4FF3 1 -4FF4 1 -4FF5 1 -4FF6 1 -4FF7 1 -4FF8 1 -4FF9 1 -4FFA 1 -4FFB 1 -4FFC 1 -4FFD 1 -4FFE 1 -4FFF 1 -237 1 -238 1 -239 1 -23A 1 -23B 1 -23C 1 -23D 1 -23E 1 -23F 1 -240 1 -241 1 -242 1 -243 1 -244 1 -245 1 -246 1 -247 1 -248 1 -249 1 -24A 1 -24B 1 -24C 1 -24D 1 -24E 1 -24F 1 -358 1 -359 1 -35A 1 -35B 1 -35C 1 -370 1 -371 1 -372 1 -373 1 -376 1 -377 1 -378 1 -379 1 -37B 1 -37C 1 -37D 1 -37F 1 -380 1 -381 1 -382 1 -383 1 -38B 1 -38D 1 -3A2 1 -3CF 1 -3FC 1 -3FD 1 -3FE 1 -3FF 1 -487 1 -4CF 1 -4F6 1 -4F7 1 -4FA 1 -4FB 1 -4FC 1 -4FD 1 -4FE 1 -4FF 1 -510 1 -511 1 -512 1 -513 1 -514 1 -515 1 -516 1 -517 1 -518 1 -519 1 -51A 1 -51B 1 -51C 1 -51D 1 -51E 1 -51F 1 -520 1 -521 1 -522 1 -523 1 -524 1 -525 1 -526 1 -527 1 -528 1 -529 1 -52A 1 -52B 1 -52C 1 -52D 1 -52E 1 -52F 1 -530 1 -557 1 -558 1 -560 1 -588 1 -58B 1 -58C 1 -58D 1 -58E 1 -58F 1 -590 1 -5A2 1 -5BA 1 -5C5 1 -5C6 1 -5C7 1 -5C8 1 -5C9 1 -5CA 1 -5CB 1 -5CC 1 -5CD 1 -5CE 1 -5CF 1 -5EB 1 -5EC 1 -5ED 1 -5EE 1 -5EF 1 -5F5 1 -5F6 1 -5F7 1 -5F8 1 -5F9 1 -5FA 1 -5FB 1 -5FC 1 -5FD 1 -5FE 1 -5FF 1 -604 1 -605 1 -606 1 -607 1 -608 1 -609 1 -60A 1 -60B 1 -616 1 -617 1 -618 1 -619 1 -61A 1 -61C 1 -61D 1 -61E 1 -620 1 -63B 1 -63C 1 -63D 1 -63E 1 -63F 1 -659 1 -65A 1 -65B 1 -65C 1 -65D 1 -65E 1 -65F 1 -70E 1 -74B 1 -74C 1 -750 1 -751 1 -752 1 -753 1 -754 1 -755 1 -756 1 -757 1 -758 1 -759 1 -75A 1 -75B 1 -75C 1 -75D 1 -75E 1 -75F 1 -760 1 -761 1 -762 1 -763 1 -764 1 -765 1 -766 1 -767 1 -768 1 -769 1 -76A 1 -76B 1 -76C 1 -76D 1 -76E 1 -76F 1 -770 1 -771 1 -772 1 -773 1 -774 1 -775 1 -776 1 -777 1 -778 1 -779 1 -77A 1 -77B 1 -77C 1 -77D 1 -77E 1 -77F 1 -7B2 1 -7B3 1 -7B4 1 -7B5 1 -7B6 1 -7B7 1 -7B8 1 -7B9 1 -7BA 1 -7BB 1 -7BC 1 -7BD 1 -7BE 1 -7BF 1 -7C0 1 -7C1 1 -7C2 1 -7C3 1 -7C4 1 -7C5 1 -7C6 1 -7C7 1 -7C8 1 -7C9 1 -7CA 1 -7CB 1 -7CC 1 -7CD 1 -7CE 1 -7CF 1 -7D0 1 -7D1 1 -7D2 1 -7D3 1 -7D4 1 -7D5 1 -7D6 1 -7D7 1 -7D8 1 -7D9 1 -7DA 1 -7DB 1 -7DC 1 -7DD 1 -7DE 1 -7DF 1 -7E0 1 -7E1 1 -7E2 1 -7E3 1 -7E4 1 -7E5 1 -7E6 1 -7E7 1 -7E8 1 -7E9 1 -7EA 1 -7EB 1 -7EC 1 -7ED 1 -7EE 1 -7EF 1 -7F0 1 -7F1 1 -7F2 1 -7F3 1 -7F4 1 -7F5 1 -7F6 1 -7F7 1 -7F8 1 -7F9 1 -7FA 1 -7FB 1 -7FC 1 -7FD 1 -7FE 1 -7FF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -SET NAMES utf8; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=NDB CHARACTER SET utf8; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_general_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_latvian_ci; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -85 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -300 1 -301 1 -302 1 -303 1 -304 1 -305 1 -306 1 -307 1 -308 1 -309 1 -30A 1 -30B 1 -30C 1 -30D 1 -30E 1 -30F 1 -310 1 -311 1 -312 1 -313 1 -314 1 -315 1 -316 1 -317 1 -318 1 -319 1 -31A 1 -31B 1 -31C 1 -31D 1 -31E 1 -31F 1 -320 1 -321 1 -322 1 -323 1 -324 1 -325 1 -326 1 -327 1 -328 1 -329 1 -32A 1 -32B 1 -32C 1 -32D 1 -32E 1 -32F 1 -330 1 -331 1 -332 1 -333 1 -334 1 -335 1 -336 1 -337 1 -338 1 -339 1 -33A 1 -33B 1 -33C 1 -33D 1 -33E 1 -33F 1 -340 1 -341 1 -342 1 -343 1 -344 1 -345 1 -346 1 -347 1 -348 1 -349 1 -34A 1 -34B 1 -34C 1 -34D 1 -34E 1 -34F 1 -350 1 -351 1 -352 1 -353 1 -354 1 -355 1 -356 1 -357 1 -35D 1 -35E 1 -35F 1 -360 1 -361 1 -362 1 -483 1 -484 1 -485 1 -486 1 -488 1 -489 1 -591 1 -592 1 -593 1 -594 1 -595 1 -596 1 -597 1 -598 1 -599 1 -59A 1 -59B 1 -59C 1 -59D 1 -59E 1 -59F 1 -5A0 1 -5A1 1 -5A3 1 -5A4 1 -5A5 1 -5A6 1 -5A7 1 -5A8 1 -5A9 1 -5AA 1 -5AB 1 -5AC 1 -5AD 1 -5AE 1 -5AF 1 -5B0 1 -5B1 1 -5B2 1 -5B3 1 -5B4 1 -5B5 1 -5B6 1 -5B7 1 -5B8 1 -5B9 1 -5BB 1 -5BC 1 -5BD 1 -5BF 1 -5C1 1 -5C2 1 -5C4 1 -600 1 -601 1 -602 1 -603 1 -610 1 -611 1 -612 1 -613 1 -614 1 -615 1 -64B 1 -64C 1 -64D 1 -64E 1 -64F 1 -650 1 -651 1 -652 1 -653 1 -654 1 -655 1 -656 1 -657 1 -658 1 -670 1 -6D6 1 -6D7 1 -6D8 1 -6D9 1 -6DA 1 -6DB 1 -6DC 1 -6DD 1 -6DE 1 -6DF 1 -6E0 1 -6E1 1 -6E2 1 -6E3 1 -6E4 1 -6E7 1 -6E8 1 -6EA 1 -6EB 1 -6EC 1 -6ED 1 -70F 1 -711 1 -730 1 -731 1 -732 1 -733 1 -734 1 -735 1 -736 1 -737 1 -738 1 -739 1 -73A 1 -73B 1 -73C 1 -73D 1 -73E 1 -73F 1 -740 1 -741 1 -742 1 -743 1 -744 1 -745 1 -746 1 -747 1 -748 1 -749 1 -74A 1 -640 1 -60 1 -B4 1 -384 1 -2DC 1 -5E 1 -AF 1 -2D8 1 -2D9 1 -A8 1 -385 1 -2DA 1 -2DD 1 -B8 1 -2DB 1 -5F 1 -AD 1 -2D 1 -58A 1 -2C 1 -55D 1 -60C 1 -60D 1 -66B 1 -66C 1 -3B 1 -37E 1 -61B 1 -3A 1 -589 1 -703 1 -704 1 -705 1 -706 1 -707 1 -708 1 -21 1 -A1 1 -55C 1 -3F 1 -BF 1 -55E 1 -61F 1 -709 1 -2E 1 -6D4 1 -701 1 -702 1 -B7 1 -387 1 -700 1 -27 1 -22 1 -AB 1 -BB 1 -28 1 -29 1 -5B 1 -7B 1 -7D 1 -A7 1 -B6 1 -A9 1 -AE 1 -40 1 -2A 1 -66D 1 -2F 1 -26 1 -23 1 -25 1 -66A 1 -55A 1 -55B 1 -55F 1 -5BE 1 -5C0 1 -5C3 1 -5F3 1 -5F4 1 -70A 1 -70B 1 -70C 1 -70D 1 -2B9 1 -374 1 -375 1 -2BA 1 -2C2 1 -2C3 1 -2C4 1 -2C5 1 -2C6 1 -2C7 1 -2C8 1 -2C9 1 -2CA 1 -2CB 1 -2CC 1 -2CD 1 -2CE 1 -2CF 1 -2D2 1 -2D3 1 -2D4 1 -2D5 1 -2D6 1 -2D7 1 -2DE 1 -2DF 1 -2E5 1 -2E6 1 -2E7 1 -2E8 1 -2E9 1 -2EA 1 -2EB 1 -2EC 1 -2ED 1 -2EF 1 -2F0 1 -2F1 1 -2F2 1 -2F3 1 -2F4 1 -2F5 1 -2F6 1 -2F7 1 -2F8 1 -2F9 1 -2FA 1 -2FB 1 -2FC 1 -2FD 1 -2FE 1 -2FF 1 -B0 1 -482 1 -60E 1 -60F 1 -6E9 1 -3F6 1 -2B 1 -B1 1 -F7 1 -D7 1 -3C 1 -3D 1 -3E 1 -AC 1 -7C 1 -A6 1 -7E 1 -2D0 1 -2D1 1 -A4 1 -A2 1 -24 1 -A3 1 -A5 1 -30 1 -660 1 -6F0 1 -31 1 -B9 1 -661 1 -6F1 1 -BD 1 -BC 1 -32 1 -B2 1 -662 1 -6F2 1 -33 1 -B3 1 -663 1 -6F3 1 -BE 1 -34 1 -664 1 -6F4 1 -35 1 -665 1 -6F5 1 -36 1 -666 1 -6F6 1 -37 1 -667 1 -6F7 1 -38 1 -668 1 -6F8 1 -39 1 -669 1 -6F9 1 -41 1 -61 1 -AA 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -100 1 -101 1 -102 1 -103 1 -104 1 -105 1 -1CD 1 -1CE 1 -1DE 1 -1DF 1 -1E0 1 -1E1 1 -1FA 1 -1FB 1 -200 1 -201 1 -202 1 -203 1 -226 1 -227 1 -363 1 -C6 1 -E6 1 -1E2 1 -1E3 1 -1FC 1 -1FD 1 -250 1 -251 1 -252 1 -42 1 -62 1 -299 1 -180 1 -181 1 -253 1 -182 1 -183 1 -43 1 -63 1 -C7 1 -E7 1 -106 1 -107 1 -108 1 -109 1 -10A 1 -10B 1 -368 1 -10C 1 -10D 1 -187 1 -188 1 -255 1 -44 1 -64 1 -10E 1 -10F 1 -369 1 -1C4 1 -1C5 1 -1C6 1 -1F1 1 -1F2 1 -1F3 1 -2A3 1 -2A5 1 -2A4 1 -110 1 -111 1 -189 1 -256 1 -18A 1 -257 1 -18B 1 -18C 1 -221 1 -D0 1 -F0 1 -45 1 -65 1 -C8 1 -C9 1 -CA 1 -CB 1 -E8 1 -E9 1 -EA 1 -EB 1 -112 1 -113 1 -114 1 -115 1 -116 1 -117 1 -118 1 -119 1 -11A 1 -11B 1 -204 1 -205 1 -206 1 -207 1 -228 1 -229 1 -364 1 -18E 1 -1DD 1 -18F 1 -259 1 -190 1 -25B 1 -258 1 -25A 1 -25C 1 -25D 1 -25E 1 -29A 1 -264 1 -46 1 -66 1 -2A9 1 -191 1 -192 1 -47 1 -67 1 -11C 1 -11D 1 -11E 1 -11F 1 -120 1 -121 1 -1E6 1 -1E7 1 -1F4 1 -1F5 1 -122 1 -123 1 -261 1 -262 1 -1E4 1 -1E5 1 -193 1 -260 1 -29B 1 -194 1 -263 1 -2E0 1 -1A2 1 -1A3 1 -48 1 -68 1 -124 1 -125 1 -21E 1 -21F 1 -2B0 1 -36A 1 -29C 1 -195 1 -1F6 1 -126 1 -127 1 -266 1 -2B1 1 -267 1 -2BB 1 -2BD 1 -49 1 -69 1 -CC 1 -CD 1 -CE 1 -CF 1 -EC 1 -ED 1 -EE 1 -EF 1 -128 1 -129 1 -12A 1 -12B 1 -12C 1 -12D 1 -12E 1 -12F 1 -130 1 -1CF 1 -1D0 1 -208 1 -209 1 -20A 1 -20B 1 -365 1 -132 1 -133 1 -59 1 -79 1 -131 1 -26A 1 -197 1 -268 1 -196 1 -269 1 -4A 1 -6A 1 -134 1 -135 1 -1F0 1 -2B2 1 -29D 1 -25F 1 -284 1 -4B 1 -6B 1 -1E8 1 -1E9 1 -136 1 -137 1 -198 1 -199 1 -29E 1 -4C 1 -6C 1 -139 1 -13A 1 -13D 1 -13E 1 -2E1 1 -13F 1 -140 1 -1C7 1 -1C8 1 -1C9 1 -2AA 1 -2AB 1 -13B 1 -13C 1 -29F 1 -141 1 -142 1 -19A 1 -26B 1 -26C 1 -26D 1 -234 1 -26E 1 -19B 1 -28E 1 -4D 1 -6D 1 -36B 1 -271 1 -4E 1 -6E 1 -D1 1 -F1 1 -143 1 -144 1 -147 1 -148 1 -1F8 1 -1F9 1 -1CA 1 -1CB 1 -1CC 1 -145 1 -146 1 -274 1 -19D 1 -272 1 -19E 1 -220 1 -273 1 -235 1 -14A 1 -14B 1 -4F 1 -6F 1 -BA 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -14C 1 -14D 1 -14E 1 -14F 1 -150 1 -151 1 -1A0 1 -1A1 1 -1D1 1 -1D2 1 -1EA 1 -1EB 1 -1EC 1 -1ED 1 -20C 1 -20D 1 -20E 1 -20F 1 -22A 1 -22B 1 -22C 1 -22D 1 -22E 1 -22F 1 -230 1 -231 1 -366 1 -152 1 -153 1 -276 1 -D8 1 -F8 1 -1FE 1 -1FF 1 -186 1 -254 1 -19F 1 -275 1 -277 1 -222 1 -223 1 -50 1 -70 1 -1A4 1 -1A5 1 -278 1 -51 1 -71 1 -2A0 1 -138 1 -52 1 -72 1 -154 1 -155 1 -158 1 -159 1 -210 1 -211 1 -212 1 -213 1 -2B3 1 -36C 1 -156 1 -157 1 -1A6 1 -280 1 -279 1 -2B4 1 -27A 1 -27B 1 -2B5 1 -27C 1 -27D 1 -27E 1 -27F 1 -281 1 -2B6 1 -53 1 -73 1 -15A 1 -15B 1 -15C 1 -15D 1 -15E 1 -15F 1 -17F 1 -218 1 -219 1 -2E2 1 -DF 1 -160 1 -161 1 -282 1 -1A9 1 -283 1 -1AA 1 -285 1 -286 1 -54 1 -74 1 -162 1 -163 1 -164 1 -165 1 -21A 1 -21B 1 -36D 1 -2A8 1 -1BE 1 -2A6 1 -2A7 1 -166 1 -167 1 -1AB 1 -1AC 1 -1AD 1 -1AE 1 -288 1 -236 1 -287 1 -55 1 -75 1 -D9 1 -DA 1 -DB 1 -DC 1 -F9 1 -FA 1 -FB 1 -FC 1 -168 1 -169 1 -16A 1 -16B 1 -16C 1 -16D 1 -16E 1 -16F 1 -170 1 -171 1 -172 1 -173 1 -1AF 1 -1B0 1 -1D3 1 -1D4 1 -1D5 1 -1D6 1 -1D7 1 -1D8 1 -1D9 1 -1DA 1 -1DB 1 -1DC 1 -214 1 -215 1 -216 1 -217 1 -367 1 -289 1 -265 1 -2AE 1 -2AF 1 -19C 1 -26F 1 -270 1 -1B1 1 -28A 1 -56 1 -76 1 -36E 1 -1B2 1 -28B 1 -28C 1 -57 1 -77 1 -174 1 -175 1 -2B7 1 -28D 1 -58 1 -78 1 -2E3 1 -36F 1 -DD 1 -FD 1 -FF 1 -176 1 -177 1 -178 1 -232 1 -233 1 -2B8 1 -28F 1 -1B3 1 -1B4 1 -5A 1 -7A 1 -179 1 -17A 1 -17B 1 -17C 1 -18D 1 -17D 1 -17E 1 -1B5 1 -1B6 1 -224 1 -225 1 -290 1 -291 1 -1B7 1 -1EE 1 -1EF 1 -292 1 -1B8 1 -1B9 1 -1BA 1 -293 1 -21C 1 -21D 1 -DE 1 -FE 1 -1BF 1 -1F7 1 -1BB 1 -1A7 1 -1A8 1 -1BC 1 -1BD 1 -184 1 -185 1 -294 1 -2C0 1 -2BC 1 -149 1 -2EE 1 -2BE 1 -295 1 -2E4 1 -2BF 1 -2C1 1 -2A1 1 -2A2 1 -296 1 -1C0 1 -1C1 1 -1C2 1 -1C3 1 -297 1 -298 1 -2AC 1 -2AD 1 -386 1 -391 1 -3AC 1 -3B1 1 -392 1 -3B2 1 -3D0 1 -393 1 -3B3 1 -394 1 -3B4 1 -388 1 -395 1 -3AD 1 -3B5 1 -3F5 1 -3DC 1 -3DD 1 -3DA 1 -3DB 1 -396 1 -3B6 1 -389 1 -397 1 -3AE 1 -3B7 1 -398 1 -3B8 1 -3D1 1 -3F4 1 -37A 1 -38A 1 -390 1 -399 1 -3AA 1 -3AF 1 -3B9 1 -3CA 1 -3F3 1 -39A 1 -3BA 1 -3F0 1 -3D7 1 -39B 1 -3BB 1 -B5 1 -39C 1 -3BC 1 -39D 1 -3BD 1 -39E 1 -3BE 1 -38C 1 -39F 1 -3BF 1 -3CC 1 -3A0 1 -3C0 1 -3D6 1 -3DE 1 -3DF 1 -3D8 1 -3D9 1 -3A1 1 -3C1 1 -3F1 1 -3A3 1 -3C2 1 -3C3 1 -3F2 1 -3F9 1 -3A4 1 -3C4 1 -38E 1 -3A5 1 -3AB 1 -3B0 1 -3C5 1 -3CB 1 -3CD 1 -3D2 1 -3D3 1 -3D4 1 -3A6 1 -3C6 1 -3D5 1 -3A7 1 -3C7 1 -3A8 1 -3C8 1 -38F 1 -3A9 1 -3C9 1 -3CE 1 -3E0 1 -3E1 1 -3F7 1 -3F8 1 -3FA 1 -3FB 1 -3E2 1 -3E3 1 -3E4 1 -3E5 1 -3E6 1 -3E7 1 -3E8 1 -3E9 1 -3EA 1 -3EB 1 -3EC 1 -3ED 1 -3EE 1 -3EF 1 -410 1 -430 1 -4D0 1 -4D1 1 -4D2 1 -4D3 1 -4D8 1 -4D9 1 -4DA 1 -4DB 1 -4D4 1 -4D5 1 -411 1 -431 1 -412 1 -432 1 -413 1 -433 1 -490 1 -491 1 -492 1 -493 1 -494 1 -495 1 -414 1 -434 1 -500 1 -501 1 -402 1 -452 1 -502 1 -503 1 -403 1 -453 1 -498 1 -499 1 -400 1 -401 1 -415 1 -435 1 -450 1 -451 1 -4D6 1 -4D7 1 -404 1 -454 1 -416 1 -436 1 -4C1 1 -4C2 1 -4DC 1 -4DD 1 -496 1 -497 1 -417 1 -437 1 -504 1 -505 1 -4DE 1 -4DF 1 -405 1 -455 1 -4E0 1 -4E1 1 -506 1 -507 1 -40D 1 -418 1 -438 1 -45D 1 -4E2 1 -4E3 1 -48A 1 -48B 1 -4E4 1 -4E5 1 -406 1 -456 1 -407 1 -457 1 -419 1 -439 1 -408 1 -458 1 -41A 1 -43A 1 -49A 1 -49B 1 -4C3 1 -4C4 1 -4A0 1 -4A1 1 -49E 1 -49F 1 -49C 1 -49D 1 -41B 1 -43B 1 -4C5 1 -4C6 1 -409 1 -459 1 -508 1 -509 1 -41C 1 -43C 1 -4CD 1 -4CE 1 -41D 1 -43D 1 -4C9 1 -4CA 1 -4A2 1 -4A3 1 -4C7 1 -4C8 1 -4A4 1 -4A5 1 -40A 1 -45A 1 -50A 1 -50B 1 -41E 1 -43E 1 -4E6 1 -4E7 1 -4E8 1 -4E9 1 -4EA 1 -4EB 1 -41F 1 -43F 1 -4A6 1 -4A7 1 -480 1 -481 1 -420 1 -440 1 -48E 1 -48F 1 -421 1 -441 1 -50C 1 -50D 1 -4AA 1 -4AB 1 -422 1 -442 1 -50E 1 -50F 1 -4AC 1 -4AD 1 -40B 1 -45B 1 -40C 1 -45C 1 -423 1 -443 1 -4EE 1 -4EF 1 -40E 1 -45E 1 -4F0 1 -4F1 1 -4F2 1 -4F3 1 -4AE 1 -4AF 1 -4B0 1 -4B1 1 -478 1 -479 1 -424 1 -444 1 -425 1 -445 1 -4B2 1 -4B3 1 -4BA 1 -4BB 1 -460 1 -461 1 -47E 1 -47F 1 -47C 1 -47D 1 -47A 1 -47B 1 -426 1 -446 1 -4B4 1 -4B5 1 -427 1 -447 1 -4F4 1 -4F5 1 -4B6 1 -4B7 1 -4CB 1 -4CC 1 -4B8 1 -4B9 1 -4BC 1 -4BD 1 -4BE 1 -4BF 1 -40F 1 -45F 1 -428 1 -448 1 -429 1 -449 1 -42A 1 -44A 1 -42B 1 -44B 1 -4F8 1 -4F9 1 -42C 1 -44C 1 -48C 1 -48D 1 -462 1 -463 1 -42D 1 -44D 1 -4EC 1 -4ED 1 -42E 1 -44E 1 -42F 1 -44F 1 -464 1 -465 1 -466 1 -467 1 -46A 1 -46B 1 -468 1 -469 1 -46C 1 -46D 1 -46E 1 -46F 1 -470 1 -471 1 -472 1 -473 1 -474 1 -475 1 -476 1 -477 1 -4A8 1 -4A9 1 -4C0 1 -531 1 -561 1 -532 1 -562 1 -533 1 -563 1 -534 1 -564 1 -535 1 -565 1 -587 1 -536 1 -566 1 -537 1 -567 1 -538 1 -568 1 -539 1 -569 1 -53A 1 -56A 1 -53B 1 -56B 1 -53C 1 -56C 1 -53D 1 -56D 1 -53E 1 -56E 1 -53F 1 -56F 1 -540 1 -570 1 -541 1 -571 1 -542 1 -572 1 -543 1 -573 1 -544 1 -574 1 -545 1 -575 1 -546 1 -576 1 -547 1 -577 1 -548 1 -578 1 -549 1 -579 1 -54A 1 -57A 1 -54B 1 -57B 1 -54C 1 -57C 1 -54D 1 -57D 1 -54E 1 -57E 1 -54F 1 -57F 1 -550 1 -580 1 -551 1 -581 1 -552 1 -582 1 -553 1 -583 1 -554 1 -584 1 -555 1 -585 1 -556 1 -586 1 -559 1 -5D0 1 -5D1 1 -5D2 1 -5D3 1 -5D4 1 -5D5 1 -5F0 1 -5F1 1 -5D6 1 -5D7 1 -5D8 1 -5D9 1 -5F2 1 -5DA 1 -5DB 1 -5DC 1 -5DD 1 -5DE 1 -5DF 1 -5E0 1 -5E1 1 -5E2 1 -5E3 1 -5E4 1 -5E5 1 -5E6 1 -5E7 1 -5E8 1 -5E9 1 -5EA 1 -621 1 -674 1 -6FD 1 -622 1 -623 1 -672 1 -671 1 -624 1 -625 1 -673 1 -626 1 -627 1 -675 1 -66E 1 -628 1 -67B 1 -67E 1 -680 1 -629 1 -62A 1 -62B 1 -679 1 -67A 1 -67C 1 -67D 1 -67F 1 -62C 1 -683 1 -684 1 -686 1 -6BF 1 -687 1 -62D 1 -62E 1 -681 1 -682 1 -685 1 -62F 1 -630 1 -688 1 -689 1 -68A 1 -68B 1 -68C 1 -68D 1 -68E 1 -68F 1 -690 1 -6EE 1 -631 1 -632 1 -691 1 -692 1 -693 1 -694 1 -695 1 -696 1 -697 1 -698 1 -699 1 -6EF 1 -633 1 -634 1 -69A 1 -69B 1 -69C 1 -6FA 1 -635 1 -636 1 -69D 1 -69E 1 -6FB 1 -637 1 -638 1 -69F 1 -639 1 -63A 1 -6A0 1 -6FC 1 -641 1 -6A1 1 -6A2 1 -6A3 1 -6A4 1 -6A5 1 -6A6 1 -66F 1 -642 1 -6A7 1 -6A8 1 -643 1 -6A9 1 -6AA 1 -6AB 1 -6AC 1 -6AD 1 -6AE 1 -6AF 1 -6B0 1 -6B1 1 -6B2 1 -6B3 1 -6B4 1 -644 1 -6B5 1 -6B6 1 -6B7 1 -6B8 1 -645 1 -6FE 1 -646 1 -6BA 1 -6BB 1 -6BC 1 -6BD 1 -6B9 1 -647 1 -6BE 1 -6C1 1 -6C2 1 -6C3 1 -6FF 1 -6C0 1 -6D5 1 -648 1 -6E5 1 -676 1 -6C4 1 -6C5 1 -6C6 1 -6C7 1 -677 1 -6C8 1 -6C9 1 -6CA 1 -6CB 1 -6CF 1 -649 1 -64A 1 -6E6 1 -678 1 -6CC 1 -6CD 1 -6CE 1 -6D0 1 -6D1 1 -6D2 1 -6D3 1 -710 1 -712 1 -72D 1 -713 1 -714 1 -72E 1 -716 1 -715 1 -72F 1 -717 1 -718 1 -719 1 -74D 1 -71A 1 -71B 1 -71C 1 -71D 1 -71E 1 -71F 1 -74E 1 -720 1 -721 1 -722 1 -723 1 -724 1 -725 1 -726 1 -727 1 -74F 1 -728 1 -729 1 -72A 1 -72B 1 -72C 1 -780 1 -799 1 -79A 1 -781 1 -782 1 -783 1 -79C 1 -784 1 -785 1 -786 1 -787 1 -7A2 1 -7A3 1 -788 1 -7A5 1 -789 1 -78A 1 -78B 1 -79B 1 -78C 1 -798 1 -7A0 1 -7A1 1 -78D 1 -78E 1 -7A4 1 -78F 1 -790 1 -79D 1 -79E 1 -79F 1 -791 1 -792 1 -793 1 -794 1 -795 1 -796 1 -797 1 -7B1 1 -7A6 1 -7A7 1 -7A8 1 -7A9 1 -7AA 1 -7AB 1 -7AC 1 -7AD 1 -7AE 1 -7AF 1 -7B0 1 -4E00 1 -4E01 1 -4E02 1 -4E03 1 -4E04 1 -4E05 1 -4E06 1 -4E07 1 -4E08 1 -4E09 1 -4E0A 1 -4E0B 1 -4E0C 1 -4E0D 1 -4E0E 1 -4E0F 1 -4E10 1 -4E11 1 -4E12 1 -4E13 1 -4E14 1 -4E15 1 -4E16 1 -4E17 1 -4E18 1 -4E19 1 -4E1A 1 -4E1B 1 -4E1C 1 -4E1D 1 -4E1E 1 -4E1F 1 -4E20 1 -4E21 1 -4E22 1 -4E23 1 -4E24 1 -4E25 1 -4E26 1 -4E27 1 -4E28 1 -4E29 1 -4E2A 1 -4E2B 1 -4E2C 1 -4E2D 1 -4E2E 1 -4E2F 1 -4E30 1 -4E31 1 -4E32 1 -4E33 1 -4E34 1 -4E35 1 -4E36 1 -4E37 1 -4E38 1 -4E39 1 -4E3A 1 -4E3B 1 -4E3C 1 -4E3D 1 -4E3E 1 -4E3F 1 -4E40 1 -4E41 1 -4E42 1 -4E43 1 -4E44 1 -4E45 1 -4E46 1 -4E47 1 -4E48 1 -4E49 1 -4E4A 1 -4E4B 1 -4E4C 1 -4E4D 1 -4E4E 1 -4E4F 1 -4E50 1 -4E51 1 -4E52 1 -4E53 1 -4E54 1 -4E55 1 -4E56 1 -4E57 1 -4E58 1 -4E59 1 -4E5A 1 -4E5B 1 -4E5C 1 -4E5D 1 -4E5E 1 -4E5F 1 -4E60 1 -4E61 1 -4E62 1 -4E63 1 -4E64 1 -4E65 1 -4E66 1 -4E67 1 -4E68 1 -4E69 1 -4E6A 1 -4E6B 1 -4E6C 1 -4E6D 1 -4E6E 1 -4E6F 1 -4E70 1 -4E71 1 -4E72 1 -4E73 1 -4E74 1 -4E75 1 -4E76 1 -4E77 1 -4E78 1 -4E79 1 -4E7A 1 -4E7B 1 -4E7C 1 -4E7D 1 -4E7E 1 -4E7F 1 -4E80 1 -4E81 1 -4E82 1 -4E83 1 -4E84 1 -4E85 1 -4E86 1 -4E87 1 -4E88 1 -4E89 1 -4E8A 1 -4E8B 1 -4E8C 1 -4E8D 1 -4E8E 1 -4E8F 1 -4E90 1 -4E91 1 -4E92 1 -4E93 1 -4E94 1 -4E95 1 -4E96 1 -4E97 1 -4E98 1 -4E99 1 -4E9A 1 -4E9B 1 -4E9C 1 -4E9D 1 -4E9E 1 -4E9F 1 -4EA0 1 -4EA1 1 -4EA2 1 -4EA3 1 -4EA4 1 -4EA5 1 -4EA6 1 -4EA7 1 -4EA8 1 -4EA9 1 -4EAA 1 -4EAB 1 -4EAC 1 -4EAD 1 -4EAE 1 -4EAF 1 -4EB0 1 -4EB1 1 -4EB2 1 -4EB3 1 -4EB4 1 -4EB5 1 -4EB6 1 -4EB7 1 -4EB8 1 -4EB9 1 -4EBA 1 -4EBB 1 -4EBC 1 -4EBD 1 -4EBE 1 -4EBF 1 -4EC0 1 -4EC1 1 -4EC2 1 -4EC3 1 -4EC4 1 -4EC5 1 -4EC6 1 -4EC7 1 -4EC8 1 -4EC9 1 -4ECA 1 -4ECB 1 -4ECC 1 -4ECD 1 -4ECE 1 -4ECF 1 -4ED0 1 -4ED1 1 -4ED2 1 -4ED3 1 -4ED4 1 -4ED5 1 -4ED6 1 -4ED7 1 -4ED8 1 -4ED9 1 -4EDA 1 -4EDB 1 -4EDC 1 -4EDD 1 -4EDE 1 -4EDF 1 -4EE0 1 -4EE1 1 -4EE2 1 -4EE3 1 -4EE4 1 -4EE5 1 -4EE6 1 -4EE7 1 -4EE8 1 -4EE9 1 -4EEA 1 -4EEB 1 -4EEC 1 -4EED 1 -4EEE 1 -4EEF 1 -4EF0 1 -4EF1 1 -4EF2 1 -4EF3 1 -4EF4 1 -4EF5 1 -4EF6 1 -4EF7 1 -4EF8 1 -4EF9 1 -4EFA 1 -4EFB 1 -4EFC 1 -4EFD 1 -4EFE 1 -4EFF 1 -4F00 1 -4F01 1 -4F02 1 -4F03 1 -4F04 1 -4F05 1 -4F06 1 -4F07 1 -4F08 1 -4F09 1 -4F0A 1 -4F0B 1 -4F0C 1 -4F0D 1 -4F0E 1 -4F0F 1 -4F10 1 -4F11 1 -4F12 1 -4F13 1 -4F14 1 -4F15 1 -4F16 1 -4F17 1 -4F18 1 -4F19 1 -4F1A 1 -4F1B 1 -4F1C 1 -4F1D 1 -4F1E 1 -4F1F 1 -4F20 1 -4F21 1 -4F22 1 -4F23 1 -4F24 1 -4F25 1 -4F26 1 -4F27 1 -4F28 1 -4F29 1 -4F2A 1 -4F2B 1 -4F2C 1 -4F2D 1 -4F2E 1 -4F2F 1 -4F30 1 -4F31 1 -4F32 1 -4F33 1 -4F34 1 -4F35 1 -4F36 1 -4F37 1 -4F38 1 -4F39 1 -4F3A 1 -4F3B 1 -4F3C 1 -4F3D 1 -4F3E 1 -4F3F 1 -4F40 1 -4F41 1 -4F42 1 -4F43 1 -4F44 1 -4F45 1 -4F46 1 -4F47 1 -4F48 1 -4F49 1 -4F4A 1 -4F4B 1 -4F4C 1 -4F4D 1 -4F4E 1 -4F4F 1 -4F50 1 -4F51 1 -4F52 1 -4F53 1 -4F54 1 -4F55 1 -4F56 1 -4F57 1 -4F58 1 -4F59 1 -4F5A 1 -4F5B 1 -4F5C 1 -4F5D 1 -4F5E 1 -4F5F 1 -4F60 1 -4F61 1 -4F62 1 -4F63 1 -4F64 1 -4F65 1 -4F66 1 -4F67 1 -4F68 1 -4F69 1 -4F6A 1 -4F6B 1 -4F6C 1 -4F6D 1 -4F6E 1 -4F6F 1 -4F70 1 -4F71 1 -4F72 1 -4F73 1 -4F74 1 -4F75 1 -4F76 1 -4F77 1 -4F78 1 -4F79 1 -4F7A 1 -4F7B 1 -4F7C 1 -4F7D 1 -4F7E 1 -4F7F 1 -4F80 1 -4F81 1 -4F82 1 -4F83 1 -4F84 1 -4F85 1 -4F86 1 -4F87 1 -4F88 1 -4F89 1 -4F8A 1 -4F8B 1 -4F8C 1 -4F8D 1 -4F8E 1 -4F8F 1 -4F90 1 -4F91 1 -4F92 1 -4F93 1 -4F94 1 -4F95 1 -4F96 1 -4F97 1 -4F98 1 -4F99 1 -4F9A 1 -4F9B 1 -4F9C 1 -4F9D 1 -4F9E 1 -4F9F 1 -4FA0 1 -4FA1 1 -4FA2 1 -4FA3 1 -4FA4 1 -4FA5 1 -4FA6 1 -4FA7 1 -4FA8 1 -4FA9 1 -4FAA 1 -4FAB 1 -4FAC 1 -4FAD 1 -4FAE 1 -4FAF 1 -4FB0 1 -4FB1 1 -4FB2 1 -4FB3 1 -4FB4 1 -4FB5 1 -4FB6 1 -4FB7 1 -4FB8 1 -4FB9 1 -4FBA 1 -4FBB 1 -4FBC 1 -4FBD 1 -4FBE 1 -4FBF 1 -4FC0 1 -4FC1 1 -4FC2 1 -4FC3 1 -4FC4 1 -4FC5 1 -4FC6 1 -4FC7 1 -4FC8 1 -4FC9 1 -4FCA 1 -4FCB 1 -4FCC 1 -4FCD 1 -4FCE 1 -4FCF 1 -4FD0 1 -4FD1 1 -4FD2 1 -4FD3 1 -4FD4 1 -4FD5 1 -4FD6 1 -4FD7 1 -4FD8 1 -4FD9 1 -4FDA 1 -4FDB 1 -4FDC 1 -4FDD 1 -4FDE 1 -4FDF 1 -4FE0 1 -4FE1 1 -4FE2 1 -4FE3 1 -4FE4 1 -4FE5 1 -4FE6 1 -4FE7 1 -4FE8 1 -4FE9 1 -4FEA 1 -4FEB 1 -4FEC 1 -4FED 1 -4FEE 1 -4FEF 1 -4FF0 1 -4FF1 1 -4FF2 1 -4FF3 1 -4FF4 1 -4FF5 1 -4FF6 1 -4FF7 1 -4FF8 1 -4FF9 1 -4FFA 1 -4FFB 1 -4FFC 1 -4FFD 1 -4FFE 1 -4FFF 1 -237 1 -238 1 -239 1 -23A 1 -23B 1 -23C 1 -23D 1 -23E 1 -23F 1 -240 1 -241 1 -242 1 -243 1 -244 1 -245 1 -246 1 -247 1 -248 1 -249 1 -24A 1 -24B 1 -24C 1 -24D 1 -24E 1 -24F 1 -358 1 -359 1 -35A 1 -35B 1 -35C 1 -370 1 -371 1 -372 1 -373 1 -376 1 -377 1 -378 1 -379 1 -37B 1 -37C 1 -37D 1 -37F 1 -380 1 -381 1 -382 1 -383 1 -38B 1 -38D 1 -3A2 1 -3CF 1 -3FC 1 -3FD 1 -3FE 1 -3FF 1 -487 1 -4CF 1 -4F6 1 -4F7 1 -4FA 1 -4FB 1 -4FC 1 -4FD 1 -4FE 1 -4FF 1 -510 1 -511 1 -512 1 -513 1 -514 1 -515 1 -516 1 -517 1 -518 1 -519 1 -51A 1 -51B 1 -51C 1 -51D 1 -51E 1 -51F 1 -520 1 -521 1 -522 1 -523 1 -524 1 -525 1 -526 1 -527 1 -528 1 -529 1 -52A 1 -52B 1 -52C 1 -52D 1 -52E 1 -52F 1 -530 1 -557 1 -558 1 -560 1 -588 1 -58B 1 -58C 1 -58D 1 -58E 1 -58F 1 -590 1 -5A2 1 -5BA 1 -5C5 1 -5C6 1 -5C7 1 -5C8 1 -5C9 1 -5CA 1 -5CB 1 -5CC 1 -5CD 1 -5CE 1 -5CF 1 -5EB 1 -5EC 1 -5ED 1 -5EE 1 -5EF 1 -5F5 1 -5F6 1 -5F7 1 -5F8 1 -5F9 1 -5FA 1 -5FB 1 -5FC 1 -5FD 1 -5FE 1 -5FF 1 -604 1 -605 1 -606 1 -607 1 -608 1 -609 1 -60A 1 -60B 1 -616 1 -617 1 -618 1 -619 1 -61A 1 -61C 1 -61D 1 -61E 1 -620 1 -63B 1 -63C 1 -63D 1 -63E 1 -63F 1 -659 1 -65A 1 -65B 1 -65C 1 -65D 1 -65E 1 -65F 1 -70E 1 -74B 1 -74C 1 -750 1 -751 1 -752 1 -753 1 -754 1 -755 1 -756 1 -757 1 -758 1 -759 1 -75A 1 -75B 1 -75C 1 -75D 1 -75E 1 -75F 1 -760 1 -761 1 -762 1 -763 1 -764 1 -765 1 -766 1 -767 1 -768 1 -769 1 -76A 1 -76B 1 -76C 1 -76D 1 -76E 1 -76F 1 -770 1 -771 1 -772 1 -773 1 -774 1 -775 1 -776 1 -777 1 -778 1 -779 1 -77A 1 -77B 1 -77C 1 -77D 1 -77E 1 -77F 1 -7B2 1 -7B3 1 -7B4 1 -7B5 1 -7B6 1 -7B7 1 -7B8 1 -7B9 1 -7BA 1 -7BB 1 -7BC 1 -7BD 1 -7BE 1 -7BF 1 -7C0 1 -7C1 1 -7C2 1 -7C3 1 -7C4 1 -7C5 1 -7C6 1 -7C7 1 -7C8 1 -7C9 1 -7CA 1 -7CB 1 -7CC 1 -7CD 1 -7CE 1 -7CF 1 -7D0 1 -7D1 1 -7D2 1 -7D3 1 -7D4 1 -7D5 1 -7D6 1 -7D7 1 -7D8 1 -7D9 1 -7DA 1 -7DB 1 -7DC 1 -7DD 1 -7DE 1 -7DF 1 -7E0 1 -7E1 1 -7E2 1 -7E3 1 -7E4 1 -7E5 1 -7E6 1 -7E7 1 -7E8 1 -7E9 1 -7EA 1 -7EB 1 -7EC 1 -7ED 1 -7EE 1 -7EF 1 -7F0 1 -7F1 1 -7F2 1 -7F3 1 -7F4 1 -7F5 1 -7F6 1 -7F7 1 -7F8 1 -7F9 1 -7FA 1 -7FB 1 -7FC 1 -7FD 1 -7FE 1 -7FF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -SET NAMES utf8; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=NDB CHARACTER SET utf8; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_general_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_lithuanian_ci; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -85 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -300 1 -301 1 -302 1 -303 1 -304 1 -305 1 -306 1 -307 1 -308 1 -309 1 -30A 1 -30B 1 -30C 1 -30D 1 -30E 1 -30F 1 -310 1 -311 1 -312 1 -313 1 -314 1 -315 1 -316 1 -317 1 -318 1 -319 1 -31A 1 -31B 1 -31C 1 -31D 1 -31E 1 -31F 1 -320 1 -321 1 -322 1 -323 1 -324 1 -325 1 -326 1 -327 1 -328 1 -329 1 -32A 1 -32B 1 -32C 1 -32D 1 -32E 1 -32F 1 -330 1 -331 1 -332 1 -333 1 -334 1 -335 1 -336 1 -337 1 -338 1 -339 1 -33A 1 -33B 1 -33C 1 -33D 1 -33E 1 -33F 1 -340 1 -341 1 -342 1 -343 1 -344 1 -345 1 -346 1 -347 1 -348 1 -349 1 -34A 1 -34B 1 -34C 1 -34D 1 -34E 1 -34F 1 -350 1 -351 1 -352 1 -353 1 -354 1 -355 1 -356 1 -357 1 -35D 1 -35E 1 -35F 1 -360 1 -361 1 -362 1 -483 1 -484 1 -485 1 -486 1 -488 1 -489 1 -591 1 -592 1 -593 1 -594 1 -595 1 -596 1 -597 1 -598 1 -599 1 -59A 1 -59B 1 -59C 1 -59D 1 -59E 1 -59F 1 -5A0 1 -5A1 1 -5A3 1 -5A4 1 -5A5 1 -5A6 1 -5A7 1 -5A8 1 -5A9 1 -5AA 1 -5AB 1 -5AC 1 -5AD 1 -5AE 1 -5AF 1 -5B0 1 -5B1 1 -5B2 1 -5B3 1 -5B4 1 -5B5 1 -5B6 1 -5B7 1 -5B8 1 -5B9 1 -5BB 1 -5BC 1 -5BD 1 -5BF 1 -5C1 1 -5C2 1 -5C4 1 -600 1 -601 1 -602 1 -603 1 -610 1 -611 1 -612 1 -613 1 -614 1 -615 1 -64B 1 -64C 1 -64D 1 -64E 1 -64F 1 -650 1 -651 1 -652 1 -653 1 -654 1 -655 1 -656 1 -657 1 -658 1 -670 1 -6D6 1 -6D7 1 -6D8 1 -6D9 1 -6DA 1 -6DB 1 -6DC 1 -6DD 1 -6DE 1 -6DF 1 -6E0 1 -6E1 1 -6E2 1 -6E3 1 -6E4 1 -6E7 1 -6E8 1 -6EA 1 -6EB 1 -6EC 1 -6ED 1 -70F 1 -711 1 -730 1 -731 1 -732 1 -733 1 -734 1 -735 1 -736 1 -737 1 -738 1 -739 1 -73A 1 -73B 1 -73C 1 -73D 1 -73E 1 -73F 1 -740 1 -741 1 -742 1 -743 1 -744 1 -745 1 -746 1 -747 1 -748 1 -749 1 -74A 1 -640 1 -60 1 -B4 1 -384 1 -2DC 1 -5E 1 -AF 1 -2D8 1 -2D9 1 -A8 1 -385 1 -2DA 1 -2DD 1 -B8 1 -2DB 1 -5F 1 -AD 1 -2D 1 -58A 1 -2C 1 -55D 1 -60C 1 -60D 1 -66B 1 -66C 1 -3B 1 -37E 1 -61B 1 -3A 1 -589 1 -703 1 -704 1 -705 1 -706 1 -707 1 -708 1 -21 1 -A1 1 -55C 1 -3F 1 -BF 1 -55E 1 -61F 1 -709 1 -2E 1 -6D4 1 -701 1 -702 1 -B7 1 -387 1 -700 1 -27 1 -22 1 -AB 1 -BB 1 -28 1 -29 1 -5B 1 -7B 1 -7D 1 -A7 1 -B6 1 -A9 1 -AE 1 -40 1 -2A 1 -66D 1 -2F 1 -26 1 -23 1 -25 1 -66A 1 -55A 1 -55B 1 -55F 1 -5BE 1 -5C0 1 -5C3 1 -5F3 1 -5F4 1 -70A 1 -70B 1 -70C 1 -70D 1 -2B9 1 -374 1 -375 1 -2BA 1 -2C2 1 -2C3 1 -2C4 1 -2C5 1 -2C6 1 -2C7 1 -2C8 1 -2C9 1 -2CA 1 -2CB 1 -2CC 1 -2CD 1 -2CE 1 -2CF 1 -2D2 1 -2D3 1 -2D4 1 -2D5 1 -2D6 1 -2D7 1 -2DE 1 -2DF 1 -2E5 1 -2E6 1 -2E7 1 -2E8 1 -2E9 1 -2EA 1 -2EB 1 -2EC 1 -2ED 1 -2EF 1 -2F0 1 -2F1 1 -2F2 1 -2F3 1 -2F4 1 -2F5 1 -2F6 1 -2F7 1 -2F8 1 -2F9 1 -2FA 1 -2FB 1 -2FC 1 -2FD 1 -2FE 1 -2FF 1 -B0 1 -482 1 -60E 1 -60F 1 -6E9 1 -3F6 1 -2B 1 -B1 1 -F7 1 -D7 1 -3C 1 -3D 1 -3E 1 -AC 1 -7C 1 -A6 1 -7E 1 -2D0 1 -2D1 1 -A4 1 -A2 1 -24 1 -A3 1 -A5 1 -30 1 -660 1 -6F0 1 -31 1 -B9 1 -661 1 -6F1 1 -BD 1 -BC 1 -32 1 -B2 1 -662 1 -6F2 1 -33 1 -B3 1 -663 1 -6F3 1 -BE 1 -34 1 -664 1 -6F4 1 -35 1 -665 1 -6F5 1 -36 1 -666 1 -6F6 1 -37 1 -667 1 -6F7 1 -38 1 -668 1 -6F8 1 -39 1 -669 1 -6F9 1 -41 1 -61 1 -AA 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -100 1 -101 1 -102 1 -103 1 -104 1 -105 1 -1CD 1 -1CE 1 -1DE 1 -1DF 1 -1E0 1 -1E1 1 -1FA 1 -1FB 1 -200 1 -201 1 -202 1 -203 1 -226 1 -227 1 -363 1 -C6 1 -E6 1 -1E2 1 -1E3 1 -1FC 1 -1FD 1 -250 1 -251 1 -252 1 -42 1 -62 1 -299 1 -180 1 -181 1 -253 1 -182 1 -183 1 -43 1 -63 1 -C7 1 -E7 1 -106 1 -107 1 -108 1 -109 1 -10A 1 -10B 1 -368 1 -10C 1 -10D 1 -187 1 -188 1 -255 1 -44 1 -64 1 -10E 1 -10F 1 -369 1 -1C4 1 -1C5 1 -1C6 1 -1F1 1 -1F2 1 -1F3 1 -2A3 1 -2A5 1 -2A4 1 -110 1 -111 1 -189 1 -256 1 -18A 1 -257 1 -18B 1 -18C 1 -221 1 -D0 1 -F0 1 -45 1 -65 1 -C8 1 -C9 1 -CA 1 -CB 1 -E8 1 -E9 1 -EA 1 -EB 1 -112 1 -113 1 -114 1 -115 1 -116 1 -117 1 -118 1 -119 1 -11A 1 -11B 1 -204 1 -205 1 -206 1 -207 1 -228 1 -229 1 -364 1 -18E 1 -1DD 1 -18F 1 -259 1 -190 1 -25B 1 -258 1 -25A 1 -25C 1 -25D 1 -25E 1 -29A 1 -264 1 -46 1 -66 1 -2A9 1 -191 1 -192 1 -47 1 -67 1 -11C 1 -11D 1 -11E 1 -11F 1 -120 1 -121 1 -122 1 -123 1 -1E6 1 -1E7 1 -1F4 1 -1F5 1 -261 1 -262 1 -1E4 1 -1E5 1 -193 1 -260 1 -29B 1 -194 1 -263 1 -2E0 1 -1A2 1 -1A3 1 -48 1 -68 1 -124 1 -125 1 -21E 1 -21F 1 -2B0 1 -36A 1 -29C 1 -195 1 -1F6 1 -126 1 -127 1 -266 1 -2B1 1 -267 1 -2BB 1 -2BD 1 -49 1 -59 1 -69 1 -79 1 -CC 1 -CD 1 -CE 1 -CF 1 -EC 1 -ED 1 -EE 1 -EF 1 -128 1 -129 1 -12A 1 -12B 1 -12C 1 -12D 1 -12E 1 -12F 1 -130 1 -1CF 1 -1D0 1 -208 1 -209 1 -20A 1 -20B 1 -365 1 -132 1 -133 1 -131 1 -26A 1 -197 1 -268 1 -196 1 -269 1 -4A 1 -6A 1 -134 1 -135 1 -1F0 1 -2B2 1 -29D 1 -25F 1 -284 1 -4B 1 -6B 1 -136 1 -137 1 -1E8 1 -1E9 1 -198 1 -199 1 -29E 1 -4C 1 -6C 1 -139 1 -13A 1 -13B 1 -13C 1 -13D 1 -13E 1 -2E1 1 -13F 1 -140 1 -1C7 1 -1C8 1 -1C9 1 -2AA 1 -2AB 1 -29F 1 -141 1 -142 1 -19A 1 -26B 1 -26C 1 -26D 1 -234 1 -26E 1 -19B 1 -28E 1 -4D 1 -6D 1 -36B 1 -271 1 -4E 1 -6E 1 -D1 1 -F1 1 -143 1 -144 1 -145 1 -146 1 -147 1 -148 1 -1F8 1 -1F9 1 -1CA 1 -1CB 1 -1CC 1 -274 1 -19D 1 -272 1 -19E 1 -220 1 -273 1 -235 1 -14A 1 -14B 1 -4F 1 -6F 1 -BA 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -14C 1 -14D 1 -14E 1 -14F 1 -150 1 -151 1 -1A0 1 -1A1 1 -1D1 1 -1D2 1 -1EA 1 -1EB 1 -1EC 1 -1ED 1 -20C 1 -20D 1 -20E 1 -20F 1 -22A 1 -22B 1 -22C 1 -22D 1 -22E 1 -22F 1 -230 1 -231 1 -366 1 -152 1 -153 1 -276 1 -D8 1 -F8 1 -1FE 1 -1FF 1 -186 1 -254 1 -19F 1 -275 1 -277 1 -222 1 -223 1 -50 1 -70 1 -1A4 1 -1A5 1 -278 1 -51 1 -71 1 -2A0 1 -138 1 -52 1 -72 1 -154 1 -155 1 -156 1 -157 1 -158 1 -159 1 -210 1 -211 1 -212 1 -213 1 -2B3 1 -36C 1 -1A6 1 -280 1 -279 1 -2B4 1 -27A 1 -27B 1 -2B5 1 -27C 1 -27D 1 -27E 1 -27F 1 -281 1 -2B6 1 -53 1 -73 1 -15A 1 -15B 1 -15C 1 -15D 1 -15E 1 -15F 1 -17F 1 -218 1 -219 1 -2E2 1 -DF 1 -160 1 -161 1 -282 1 -1A9 1 -283 1 -1AA 1 -285 1 -286 1 -54 1 -74 1 -162 1 -163 1 -164 1 -165 1 -21A 1 -21B 1 -36D 1 -2A8 1 -1BE 1 -2A6 1 -2A7 1 -166 1 -167 1 -1AB 1 -1AC 1 -1AD 1 -1AE 1 -288 1 -236 1 -287 1 -55 1 -75 1 -D9 1 -DA 1 -DB 1 -DC 1 -F9 1 -FA 1 -FB 1 -FC 1 -168 1 -169 1 -16A 1 -16B 1 -16C 1 -16D 1 -16E 1 -16F 1 -170 1 -171 1 -172 1 -173 1 -1AF 1 -1B0 1 -1D3 1 -1D4 1 -1D5 1 -1D6 1 -1D7 1 -1D8 1 -1D9 1 -1DA 1 -1DB 1 -1DC 1 -214 1 -215 1 -216 1 -217 1 -367 1 -289 1 -265 1 -2AE 1 -2AF 1 -19C 1 -26F 1 -270 1 -1B1 1 -28A 1 -56 1 -76 1 -36E 1 -1B2 1 -28B 1 -28C 1 -57 1 -77 1 -174 1 -175 1 -2B7 1 -28D 1 -58 1 -78 1 -2E3 1 -36F 1 -DD 1 -FD 1 -FF 1 -176 1 -177 1 -178 1 -232 1 -233 1 -2B8 1 -28F 1 -1B3 1 -1B4 1 -5A 1 -7A 1 -179 1 -17A 1 -17B 1 -17C 1 -18D 1 -17D 1 -17E 1 -1B5 1 -1B6 1 -224 1 -225 1 -290 1 -291 1 -1B7 1 -1EE 1 -1EF 1 -292 1 -1B8 1 -1B9 1 -1BA 1 -293 1 -21C 1 -21D 1 -DE 1 -FE 1 -1BF 1 -1F7 1 -1BB 1 -1A7 1 -1A8 1 -1BC 1 -1BD 1 -184 1 -185 1 -294 1 -2C0 1 -2BC 1 -149 1 -2EE 1 -2BE 1 -295 1 -2E4 1 -2BF 1 -2C1 1 -2A1 1 -2A2 1 -296 1 -1C0 1 -1C1 1 -1C2 1 -1C3 1 -297 1 -298 1 -2AC 1 -2AD 1 -386 1 -391 1 -3AC 1 -3B1 1 -392 1 -3B2 1 -3D0 1 -393 1 -3B3 1 -394 1 -3B4 1 -388 1 -395 1 -3AD 1 -3B5 1 -3F5 1 -3DC 1 -3DD 1 -3DA 1 -3DB 1 -396 1 -3B6 1 -389 1 -397 1 -3AE 1 -3B7 1 -398 1 -3B8 1 -3D1 1 -3F4 1 -37A 1 -38A 1 -390 1 -399 1 -3AA 1 -3AF 1 -3B9 1 -3CA 1 -3F3 1 -39A 1 -3BA 1 -3F0 1 -3D7 1 -39B 1 -3BB 1 -B5 1 -39C 1 -3BC 1 -39D 1 -3BD 1 -39E 1 -3BE 1 -38C 1 -39F 1 -3BF 1 -3CC 1 -3A0 1 -3C0 1 -3D6 1 -3DE 1 -3DF 1 -3D8 1 -3D9 1 -3A1 1 -3C1 1 -3F1 1 -3A3 1 -3C2 1 -3C3 1 -3F2 1 -3F9 1 -3A4 1 -3C4 1 -38E 1 -3A5 1 -3AB 1 -3B0 1 -3C5 1 -3CB 1 -3CD 1 -3D2 1 -3D3 1 -3D4 1 -3A6 1 -3C6 1 -3D5 1 -3A7 1 -3C7 1 -3A8 1 -3C8 1 -38F 1 -3A9 1 -3C9 1 -3CE 1 -3E0 1 -3E1 1 -3F7 1 -3F8 1 -3FA 1 -3FB 1 -3E2 1 -3E3 1 -3E4 1 -3E5 1 -3E6 1 -3E7 1 -3E8 1 -3E9 1 -3EA 1 -3EB 1 -3EC 1 -3ED 1 -3EE 1 -3EF 1 -410 1 -430 1 -4D0 1 -4D1 1 -4D2 1 -4D3 1 -4D8 1 -4D9 1 -4DA 1 -4DB 1 -4D4 1 -4D5 1 -411 1 -431 1 -412 1 -432 1 -413 1 -433 1 -490 1 -491 1 -492 1 -493 1 -494 1 -495 1 -414 1 -434 1 -500 1 -501 1 -402 1 -452 1 -502 1 -503 1 -403 1 -453 1 -498 1 -499 1 -400 1 -401 1 -415 1 -435 1 -450 1 -451 1 -4D6 1 -4D7 1 -404 1 -454 1 -416 1 -436 1 -4C1 1 -4C2 1 -4DC 1 -4DD 1 -496 1 -497 1 -417 1 -437 1 -504 1 -505 1 -4DE 1 -4DF 1 -405 1 -455 1 -4E0 1 -4E1 1 -506 1 -507 1 -40D 1 -418 1 -438 1 -45D 1 -4E2 1 -4E3 1 -48A 1 -48B 1 -4E4 1 -4E5 1 -406 1 -456 1 -407 1 -457 1 -419 1 -439 1 -408 1 -458 1 -41A 1 -43A 1 -49A 1 -49B 1 -4C3 1 -4C4 1 -4A0 1 -4A1 1 -49E 1 -49F 1 -49C 1 -49D 1 -41B 1 -43B 1 -4C5 1 -4C6 1 -409 1 -459 1 -508 1 -509 1 -41C 1 -43C 1 -4CD 1 -4CE 1 -41D 1 -43D 1 -4C9 1 -4CA 1 -4A2 1 -4A3 1 -4C7 1 -4C8 1 -4A4 1 -4A5 1 -40A 1 -45A 1 -50A 1 -50B 1 -41E 1 -43E 1 -4E6 1 -4E7 1 -4E8 1 -4E9 1 -4EA 1 -4EB 1 -41F 1 -43F 1 -4A6 1 -4A7 1 -480 1 -481 1 -420 1 -440 1 -48E 1 -48F 1 -421 1 -441 1 -50C 1 -50D 1 -4AA 1 -4AB 1 -422 1 -442 1 -50E 1 -50F 1 -4AC 1 -4AD 1 -40B 1 -45B 1 -40C 1 -45C 1 -423 1 -443 1 -4EE 1 -4EF 1 -40E 1 -45E 1 -4F0 1 -4F1 1 -4F2 1 -4F3 1 -4AE 1 -4AF 1 -4B0 1 -4B1 1 -478 1 -479 1 -424 1 -444 1 -425 1 -445 1 -4B2 1 -4B3 1 -4BA 1 -4BB 1 -460 1 -461 1 -47E 1 -47F 1 -47C 1 -47D 1 -47A 1 -47B 1 -426 1 -446 1 -4B4 1 -4B5 1 -427 1 -447 1 -4F4 1 -4F5 1 -4B6 1 -4B7 1 -4CB 1 -4CC 1 -4B8 1 -4B9 1 -4BC 1 -4BD 1 -4BE 1 -4BF 1 -40F 1 -45F 1 -428 1 -448 1 -429 1 -449 1 -42A 1 -44A 1 -42B 1 -44B 1 -4F8 1 -4F9 1 -42C 1 -44C 1 -48C 1 -48D 1 -462 1 -463 1 -42D 1 -44D 1 -4EC 1 -4ED 1 -42E 1 -44E 1 -42F 1 -44F 1 -464 1 -465 1 -466 1 -467 1 -46A 1 -46B 1 -468 1 -469 1 -46C 1 -46D 1 -46E 1 -46F 1 -470 1 -471 1 -472 1 -473 1 -474 1 -475 1 -476 1 -477 1 -4A8 1 -4A9 1 -4C0 1 -531 1 -561 1 -532 1 -562 1 -533 1 -563 1 -534 1 -564 1 -535 1 -565 1 -587 1 -536 1 -566 1 -537 1 -567 1 -538 1 -568 1 -539 1 -569 1 -53A 1 -56A 1 -53B 1 -56B 1 -53C 1 -56C 1 -53D 1 -56D 1 -53E 1 -56E 1 -53F 1 -56F 1 -540 1 -570 1 -541 1 -571 1 -542 1 -572 1 -543 1 -573 1 -544 1 -574 1 -545 1 -575 1 -546 1 -576 1 -547 1 -577 1 -548 1 -578 1 -549 1 -579 1 -54A 1 -57A 1 -54B 1 -57B 1 -54C 1 -57C 1 -54D 1 -57D 1 -54E 1 -57E 1 -54F 1 -57F 1 -550 1 -580 1 -551 1 -581 1 -552 1 -582 1 -553 1 -583 1 -554 1 -584 1 -555 1 -585 1 -556 1 -586 1 -559 1 -5D0 1 -5D1 1 -5D2 1 -5D3 1 -5D4 1 -5D5 1 -5F0 1 -5F1 1 -5D6 1 -5D7 1 -5D8 1 -5D9 1 -5F2 1 -5DA 1 -5DB 1 -5DC 1 -5DD 1 -5DE 1 -5DF 1 -5E0 1 -5E1 1 -5E2 1 -5E3 1 -5E4 1 -5E5 1 -5E6 1 -5E7 1 -5E8 1 -5E9 1 -5EA 1 -621 1 -674 1 -6FD 1 -622 1 -623 1 -672 1 -671 1 -624 1 -625 1 -673 1 -626 1 -627 1 -675 1 -66E 1 -628 1 -67B 1 -67E 1 -680 1 -629 1 -62A 1 -62B 1 -679 1 -67A 1 -67C 1 -67D 1 -67F 1 -62C 1 -683 1 -684 1 -686 1 -6BF 1 -687 1 -62D 1 -62E 1 -681 1 -682 1 -685 1 -62F 1 -630 1 -688 1 -689 1 -68A 1 -68B 1 -68C 1 -68D 1 -68E 1 -68F 1 -690 1 -6EE 1 -631 1 -632 1 -691 1 -692 1 -693 1 -694 1 -695 1 -696 1 -697 1 -698 1 -699 1 -6EF 1 -633 1 -634 1 -69A 1 -69B 1 -69C 1 -6FA 1 -635 1 -636 1 -69D 1 -69E 1 -6FB 1 -637 1 -638 1 -69F 1 -639 1 -63A 1 -6A0 1 -6FC 1 -641 1 -6A1 1 -6A2 1 -6A3 1 -6A4 1 -6A5 1 -6A6 1 -66F 1 -642 1 -6A7 1 -6A8 1 -643 1 -6A9 1 -6AA 1 -6AB 1 -6AC 1 -6AD 1 -6AE 1 -6AF 1 -6B0 1 -6B1 1 -6B2 1 -6B3 1 -6B4 1 -644 1 -6B5 1 -6B6 1 -6B7 1 -6B8 1 -645 1 -6FE 1 -646 1 -6BA 1 -6BB 1 -6BC 1 -6BD 1 -6B9 1 -647 1 -6BE 1 -6C1 1 -6C2 1 -6C3 1 -6FF 1 -6C0 1 -6D5 1 -648 1 -6E5 1 -676 1 -6C4 1 -6C5 1 -6C6 1 -6C7 1 -677 1 -6C8 1 -6C9 1 -6CA 1 -6CB 1 -6CF 1 -649 1 -64A 1 -6E6 1 -678 1 -6CC 1 -6CD 1 -6CE 1 -6D0 1 -6D1 1 -6D2 1 -6D3 1 -710 1 -712 1 -72D 1 -713 1 -714 1 -72E 1 -716 1 -715 1 -72F 1 -717 1 -718 1 -719 1 -74D 1 -71A 1 -71B 1 -71C 1 -71D 1 -71E 1 -71F 1 -74E 1 -720 1 -721 1 -722 1 -723 1 -724 1 -725 1 -726 1 -727 1 -74F 1 -728 1 -729 1 -72A 1 -72B 1 -72C 1 -780 1 -799 1 -79A 1 -781 1 -782 1 -783 1 -79C 1 -784 1 -785 1 -786 1 -787 1 -7A2 1 -7A3 1 -788 1 -7A5 1 -789 1 -78A 1 -78B 1 -79B 1 -78C 1 -798 1 -7A0 1 -7A1 1 -78D 1 -78E 1 -7A4 1 -78F 1 -790 1 -79D 1 -79E 1 -79F 1 -791 1 -792 1 -793 1 -794 1 -795 1 -796 1 -797 1 -7B1 1 -7A6 1 -7A7 1 -7A8 1 -7A9 1 -7AA 1 -7AB 1 -7AC 1 -7AD 1 -7AE 1 -7AF 1 -7B0 1 -4E00 1 -4E01 1 -4E02 1 -4E03 1 -4E04 1 -4E05 1 -4E06 1 -4E07 1 -4E08 1 -4E09 1 -4E0A 1 -4E0B 1 -4E0C 1 -4E0D 1 -4E0E 1 -4E0F 1 -4E10 1 -4E11 1 -4E12 1 -4E13 1 -4E14 1 -4E15 1 -4E16 1 -4E17 1 -4E18 1 -4E19 1 -4E1A 1 -4E1B 1 -4E1C 1 -4E1D 1 -4E1E 1 -4E1F 1 -4E20 1 -4E21 1 -4E22 1 -4E23 1 -4E24 1 -4E25 1 -4E26 1 -4E27 1 -4E28 1 -4E29 1 -4E2A 1 -4E2B 1 -4E2C 1 -4E2D 1 -4E2E 1 -4E2F 1 -4E30 1 -4E31 1 -4E32 1 -4E33 1 -4E34 1 -4E35 1 -4E36 1 -4E37 1 -4E38 1 -4E39 1 -4E3A 1 -4E3B 1 -4E3C 1 -4E3D 1 -4E3E 1 -4E3F 1 -4E40 1 -4E41 1 -4E42 1 -4E43 1 -4E44 1 -4E45 1 -4E46 1 -4E47 1 -4E48 1 -4E49 1 -4E4A 1 -4E4B 1 -4E4C 1 -4E4D 1 -4E4E 1 -4E4F 1 -4E50 1 -4E51 1 -4E52 1 -4E53 1 -4E54 1 -4E55 1 -4E56 1 -4E57 1 -4E58 1 -4E59 1 -4E5A 1 -4E5B 1 -4E5C 1 -4E5D 1 -4E5E 1 -4E5F 1 -4E60 1 -4E61 1 -4E62 1 -4E63 1 -4E64 1 -4E65 1 -4E66 1 -4E67 1 -4E68 1 -4E69 1 -4E6A 1 -4E6B 1 -4E6C 1 -4E6D 1 -4E6E 1 -4E6F 1 -4E70 1 -4E71 1 -4E72 1 -4E73 1 -4E74 1 -4E75 1 -4E76 1 -4E77 1 -4E78 1 -4E79 1 -4E7A 1 -4E7B 1 -4E7C 1 -4E7D 1 -4E7E 1 -4E7F 1 -4E80 1 -4E81 1 -4E82 1 -4E83 1 -4E84 1 -4E85 1 -4E86 1 -4E87 1 -4E88 1 -4E89 1 -4E8A 1 -4E8B 1 -4E8C 1 -4E8D 1 -4E8E 1 -4E8F 1 -4E90 1 -4E91 1 -4E92 1 -4E93 1 -4E94 1 -4E95 1 -4E96 1 -4E97 1 -4E98 1 -4E99 1 -4E9A 1 -4E9B 1 -4E9C 1 -4E9D 1 -4E9E 1 -4E9F 1 -4EA0 1 -4EA1 1 -4EA2 1 -4EA3 1 -4EA4 1 -4EA5 1 -4EA6 1 -4EA7 1 -4EA8 1 -4EA9 1 -4EAA 1 -4EAB 1 -4EAC 1 -4EAD 1 -4EAE 1 -4EAF 1 -4EB0 1 -4EB1 1 -4EB2 1 -4EB3 1 -4EB4 1 -4EB5 1 -4EB6 1 -4EB7 1 -4EB8 1 -4EB9 1 -4EBA 1 -4EBB 1 -4EBC 1 -4EBD 1 -4EBE 1 -4EBF 1 -4EC0 1 -4EC1 1 -4EC2 1 -4EC3 1 -4EC4 1 -4EC5 1 -4EC6 1 -4EC7 1 -4EC8 1 -4EC9 1 -4ECA 1 -4ECB 1 -4ECC 1 -4ECD 1 -4ECE 1 -4ECF 1 -4ED0 1 -4ED1 1 -4ED2 1 -4ED3 1 -4ED4 1 -4ED5 1 -4ED6 1 -4ED7 1 -4ED8 1 -4ED9 1 -4EDA 1 -4EDB 1 -4EDC 1 -4EDD 1 -4EDE 1 -4EDF 1 -4EE0 1 -4EE1 1 -4EE2 1 -4EE3 1 -4EE4 1 -4EE5 1 -4EE6 1 -4EE7 1 -4EE8 1 -4EE9 1 -4EEA 1 -4EEB 1 -4EEC 1 -4EED 1 -4EEE 1 -4EEF 1 -4EF0 1 -4EF1 1 -4EF2 1 -4EF3 1 -4EF4 1 -4EF5 1 -4EF6 1 -4EF7 1 -4EF8 1 -4EF9 1 -4EFA 1 -4EFB 1 -4EFC 1 -4EFD 1 -4EFE 1 -4EFF 1 -4F00 1 -4F01 1 -4F02 1 -4F03 1 -4F04 1 -4F05 1 -4F06 1 -4F07 1 -4F08 1 -4F09 1 -4F0A 1 -4F0B 1 -4F0C 1 -4F0D 1 -4F0E 1 -4F0F 1 -4F10 1 -4F11 1 -4F12 1 -4F13 1 -4F14 1 -4F15 1 -4F16 1 -4F17 1 -4F18 1 -4F19 1 -4F1A 1 -4F1B 1 -4F1C 1 -4F1D 1 -4F1E 1 -4F1F 1 -4F20 1 -4F21 1 -4F22 1 -4F23 1 -4F24 1 -4F25 1 -4F26 1 -4F27 1 -4F28 1 -4F29 1 -4F2A 1 -4F2B 1 -4F2C 1 -4F2D 1 -4F2E 1 -4F2F 1 -4F30 1 -4F31 1 -4F32 1 -4F33 1 -4F34 1 -4F35 1 -4F36 1 -4F37 1 -4F38 1 -4F39 1 -4F3A 1 -4F3B 1 -4F3C 1 -4F3D 1 -4F3E 1 -4F3F 1 -4F40 1 -4F41 1 -4F42 1 -4F43 1 -4F44 1 -4F45 1 -4F46 1 -4F47 1 -4F48 1 -4F49 1 -4F4A 1 -4F4B 1 -4F4C 1 -4F4D 1 -4F4E 1 -4F4F 1 -4F50 1 -4F51 1 -4F52 1 -4F53 1 -4F54 1 -4F55 1 -4F56 1 -4F57 1 -4F58 1 -4F59 1 -4F5A 1 -4F5B 1 -4F5C 1 -4F5D 1 -4F5E 1 -4F5F 1 -4F60 1 -4F61 1 -4F62 1 -4F63 1 -4F64 1 -4F65 1 -4F66 1 -4F67 1 -4F68 1 -4F69 1 -4F6A 1 -4F6B 1 -4F6C 1 -4F6D 1 -4F6E 1 -4F6F 1 -4F70 1 -4F71 1 -4F72 1 -4F73 1 -4F74 1 -4F75 1 -4F76 1 -4F77 1 -4F78 1 -4F79 1 -4F7A 1 -4F7B 1 -4F7C 1 -4F7D 1 -4F7E 1 -4F7F 1 -4F80 1 -4F81 1 -4F82 1 -4F83 1 -4F84 1 -4F85 1 -4F86 1 -4F87 1 -4F88 1 -4F89 1 -4F8A 1 -4F8B 1 -4F8C 1 -4F8D 1 -4F8E 1 -4F8F 1 -4F90 1 -4F91 1 -4F92 1 -4F93 1 -4F94 1 -4F95 1 -4F96 1 -4F97 1 -4F98 1 -4F99 1 -4F9A 1 -4F9B 1 -4F9C 1 -4F9D 1 -4F9E 1 -4F9F 1 -4FA0 1 -4FA1 1 -4FA2 1 -4FA3 1 -4FA4 1 -4FA5 1 -4FA6 1 -4FA7 1 -4FA8 1 -4FA9 1 -4FAA 1 -4FAB 1 -4FAC 1 -4FAD 1 -4FAE 1 -4FAF 1 -4FB0 1 -4FB1 1 -4FB2 1 -4FB3 1 -4FB4 1 -4FB5 1 -4FB6 1 -4FB7 1 -4FB8 1 -4FB9 1 -4FBA 1 -4FBB 1 -4FBC 1 -4FBD 1 -4FBE 1 -4FBF 1 -4FC0 1 -4FC1 1 -4FC2 1 -4FC3 1 -4FC4 1 -4FC5 1 -4FC6 1 -4FC7 1 -4FC8 1 -4FC9 1 -4FCA 1 -4FCB 1 -4FCC 1 -4FCD 1 -4FCE 1 -4FCF 1 -4FD0 1 -4FD1 1 -4FD2 1 -4FD3 1 -4FD4 1 -4FD5 1 -4FD6 1 -4FD7 1 -4FD8 1 -4FD9 1 -4FDA 1 -4FDB 1 -4FDC 1 -4FDD 1 -4FDE 1 -4FDF 1 -4FE0 1 -4FE1 1 -4FE2 1 -4FE3 1 -4FE4 1 -4FE5 1 -4FE6 1 -4FE7 1 -4FE8 1 -4FE9 1 -4FEA 1 -4FEB 1 -4FEC 1 -4FED 1 -4FEE 1 -4FEF 1 -4FF0 1 -4FF1 1 -4FF2 1 -4FF3 1 -4FF4 1 -4FF5 1 -4FF6 1 -4FF7 1 -4FF8 1 -4FF9 1 -4FFA 1 -4FFB 1 -4FFC 1 -4FFD 1 -4FFE 1 -4FFF 1 -237 1 -238 1 -239 1 -23A 1 -23B 1 -23C 1 -23D 1 -23E 1 -23F 1 -240 1 -241 1 -242 1 -243 1 -244 1 -245 1 -246 1 -247 1 -248 1 -249 1 -24A 1 -24B 1 -24C 1 -24D 1 -24E 1 -24F 1 -358 1 -359 1 -35A 1 -35B 1 -35C 1 -370 1 -371 1 -372 1 -373 1 -376 1 -377 1 -378 1 -379 1 -37B 1 -37C 1 -37D 1 -37F 1 -380 1 -381 1 -382 1 -383 1 -38B 1 -38D 1 -3A2 1 -3CF 1 -3FC 1 -3FD 1 -3FE 1 -3FF 1 -487 1 -4CF 1 -4F6 1 -4F7 1 -4FA 1 -4FB 1 -4FC 1 -4FD 1 -4FE 1 -4FF 1 -510 1 -511 1 -512 1 -513 1 -514 1 -515 1 -516 1 -517 1 -518 1 -519 1 -51A 1 -51B 1 -51C 1 -51D 1 -51E 1 -51F 1 -520 1 -521 1 -522 1 -523 1 -524 1 -525 1 -526 1 -527 1 -528 1 -529 1 -52A 1 -52B 1 -52C 1 -52D 1 -52E 1 -52F 1 -530 1 -557 1 -558 1 -560 1 -588 1 -58B 1 -58C 1 -58D 1 -58E 1 -58F 1 -590 1 -5A2 1 -5BA 1 -5C5 1 -5C6 1 -5C7 1 -5C8 1 -5C9 1 -5CA 1 -5CB 1 -5CC 1 -5CD 1 -5CE 1 -5CF 1 -5EB 1 -5EC 1 -5ED 1 -5EE 1 -5EF 1 -5F5 1 -5F6 1 -5F7 1 -5F8 1 -5F9 1 -5FA 1 -5FB 1 -5FC 1 -5FD 1 -5FE 1 -5FF 1 -604 1 -605 1 -606 1 -607 1 -608 1 -609 1 -60A 1 -60B 1 -616 1 -617 1 -618 1 -619 1 -61A 1 -61C 1 -61D 1 -61E 1 -620 1 -63B 1 -63C 1 -63D 1 -63E 1 -63F 1 -659 1 -65A 1 -65B 1 -65C 1 -65D 1 -65E 1 -65F 1 -70E 1 -74B 1 -74C 1 -750 1 -751 1 -752 1 -753 1 -754 1 -755 1 -756 1 -757 1 -758 1 -759 1 -75A 1 -75B 1 -75C 1 -75D 1 -75E 1 -75F 1 -760 1 -761 1 -762 1 -763 1 -764 1 -765 1 -766 1 -767 1 -768 1 -769 1 -76A 1 -76B 1 -76C 1 -76D 1 -76E 1 -76F 1 -770 1 -771 1 -772 1 -773 1 -774 1 -775 1 -776 1 -777 1 -778 1 -779 1 -77A 1 -77B 1 -77C 1 -77D 1 -77E 1 -77F 1 -7B2 1 -7B3 1 -7B4 1 -7B5 1 -7B6 1 -7B7 1 -7B8 1 -7B9 1 -7BA 1 -7BB 1 -7BC 1 -7BD 1 -7BE 1 -7BF 1 -7C0 1 -7C1 1 -7C2 1 -7C3 1 -7C4 1 -7C5 1 -7C6 1 -7C7 1 -7C8 1 -7C9 1 -7CA 1 -7CB 1 -7CC 1 -7CD 1 -7CE 1 -7CF 1 -7D0 1 -7D1 1 -7D2 1 -7D3 1 -7D4 1 -7D5 1 -7D6 1 -7D7 1 -7D8 1 -7D9 1 -7DA 1 -7DB 1 -7DC 1 -7DD 1 -7DE 1 -7DF 1 -7E0 1 -7E1 1 -7E2 1 -7E3 1 -7E4 1 -7E5 1 -7E6 1 -7E7 1 -7E8 1 -7E9 1 -7EA 1 -7EB 1 -7EC 1 -7ED 1 -7EE 1 -7EF 1 -7F0 1 -7F1 1 -7F2 1 -7F3 1 -7F4 1 -7F5 1 -7F6 1 -7F7 1 -7F8 1 -7F9 1 -7FA 1 -7FB 1 -7FC 1 -7FD 1 -7FE 1 -7FF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -SET NAMES utf8; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=NDB CHARACTER SET utf8; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_general_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_persian_ci; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -653 1 -654 1 -655 1 -670 1 -85 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -300 1 -301 1 -302 1 -303 1 -304 1 -305 1 -306 1 -307 1 -308 1 -309 1 -30A 1 -30B 1 -30C 1 -30D 1 -30E 1 -30F 1 -310 1 -311 1 -312 1 -313 1 -314 1 -315 1 -316 1 -317 1 -318 1 -319 1 -31A 1 -31B 1 -31C 1 -31D 1 -31E 1 -31F 1 -320 1 -321 1 -322 1 -323 1 -324 1 -325 1 -326 1 -327 1 -328 1 -329 1 -32A 1 -32B 1 -32C 1 -32D 1 -32E 1 -32F 1 -330 1 -331 1 -332 1 -333 1 -334 1 -335 1 -336 1 -337 1 -338 1 -339 1 -33A 1 -33B 1 -33C 1 -33D 1 -33E 1 -33F 1 -340 1 -341 1 -342 1 -343 1 -344 1 -345 1 -346 1 -347 1 -348 1 -349 1 -34A 1 -34B 1 -34C 1 -34D 1 -34E 1 -34F 1 -350 1 -351 1 -352 1 -353 1 -354 1 -355 1 -356 1 -357 1 -35D 1 -35E 1 -35F 1 -360 1 -361 1 -362 1 -483 1 -484 1 -485 1 -486 1 -488 1 -489 1 -591 1 -592 1 -593 1 -594 1 -595 1 -596 1 -597 1 -598 1 -599 1 -59A 1 -59B 1 -59C 1 -59D 1 -59E 1 -59F 1 -5A0 1 -5A1 1 -5A3 1 -5A4 1 -5A5 1 -5A6 1 -5A7 1 -5A8 1 -5A9 1 -5AA 1 -5AB 1 -5AC 1 -5AD 1 -5AE 1 -5AF 1 -5B0 1 -5B1 1 -5B2 1 -5B3 1 -5B4 1 -5B5 1 -5B6 1 -5B7 1 -5B8 1 -5B9 1 -5BB 1 -5BC 1 -5BD 1 -5BF 1 -5C1 1 -5C2 1 -5C4 1 -600 1 -601 1 -602 1 -603 1 -610 1 -611 1 -612 1 -613 1 -614 1 -615 1 -651 1 -652 1 -656 1 -657 1 -658 1 -6D6 1 -6D7 1 -6D8 1 -6D9 1 -6DA 1 -6DB 1 -6DC 1 -6DD 1 -6DE 1 -6DF 1 -6E0 1 -6E1 1 -6E2 1 -6E3 1 -6E4 1 -6E7 1 -6E8 1 -6EA 1 -6EB 1 -6EC 1 -6ED 1 -70F 1 -711 1 -730 1 -731 1 -732 1 -733 1 -734 1 -735 1 -736 1 -737 1 -738 1 -739 1 -73A 1 -73B 1 -73C 1 -73D 1 -73E 1 -73F 1 -740 1 -741 1 -742 1 -743 1 -744 1 -745 1 -746 1 -747 1 -748 1 -749 1 -74A 1 -640 1 -60 1 -B4 1 -384 1 -2DC 1 -5E 1 -AF 1 -2D8 1 -2D9 1 -A8 1 -385 1 -2DA 1 -2DD 1 -B8 1 -2DB 1 -5F 1 -AD 1 -2D 1 -58A 1 -2C 1 -55D 1 -60C 1 -60D 1 -66B 1 -66C 1 -3B 1 -37E 1 -61B 1 -3A 1 -589 1 -703 1 -704 1 -705 1 -706 1 -707 1 -708 1 -21 1 -A1 1 -55C 1 -3F 1 -BF 1 -55E 1 -61F 1 -709 1 -2E 1 -6D4 1 -701 1 -702 1 -B7 1 -387 1 -700 1 -27 1 -22 1 -AB 1 -BB 1 -28 1 -29 1 -5B 1 -7B 1 -7D 1 -A7 1 -B6 1 -A9 1 -AE 1 -40 1 -2A 1 -66D 1 -2F 1 -64E 1 -26 1 -650 1 -23 1 -64F 1 -25 1 -66A 1 -64B 1 -64D 1 -64C 1 -55A 1 -55B 1 -55F 1 -5BE 1 -5C0 1 -5C3 1 -5F3 1 -5F4 1 -70A 1 -70B 1 -70C 1 -70D 1 -2B9 1 -374 1 -375 1 -2BA 1 -2C2 1 -2C3 1 -2C4 1 -2C5 1 -2C6 1 -2C7 1 -2C8 1 -2C9 1 -2CA 1 -2CB 1 -2CC 1 -2CD 1 -2CE 1 -2CF 1 -2D2 1 -2D3 1 -2D4 1 -2D5 1 -2D6 1 -2D7 1 -2DE 1 -2DF 1 -2E5 1 -2E6 1 -2E7 1 -2E8 1 -2E9 1 -2EA 1 -2EB 1 -2EC 1 -2ED 1 -2EF 1 -2F0 1 -2F1 1 -2F2 1 -2F3 1 -2F4 1 -2F5 1 -2F6 1 -2F7 1 -2F8 1 -2F9 1 -2FA 1 -2FB 1 -2FC 1 -2FD 1 -2FE 1 -2FF 1 -B0 1 -482 1 -60E 1 -60F 1 -6E9 1 -3F6 1 -2B 1 -B1 1 -F7 1 -D7 1 -3C 1 -3D 1 -3E 1 -AC 1 -7C 1 -A6 1 -7E 1 -2D0 1 -2D1 1 -A4 1 -A2 1 -24 1 -A3 1 -A5 1 -30 1 -660 1 -6F0 1 -31 1 -B9 1 -661 1 -6F1 1 -BD 1 -BC 1 -32 1 -B2 1 -662 1 -6F2 1 -33 1 -B3 1 -663 1 -6F3 1 -BE 1 -34 1 -664 1 -6F4 1 -35 1 -665 1 -6F5 1 -36 1 -666 1 -6F6 1 -37 1 -667 1 -6F7 1 -38 1 -668 1 -6F8 1 -39 1 -669 1 -6F9 1 -41 1 -61 1 -AA 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -100 1 -101 1 -102 1 -103 1 -104 1 -105 1 -1CD 1 -1CE 1 -1DE 1 -1DF 1 -1E0 1 -1E1 1 -1FA 1 -1FB 1 -200 1 -201 1 -202 1 -203 1 -226 1 -227 1 -363 1 -622 1 -627 1 -671 1 -621 1 -623 1 -C6 1 -E6 1 -1E2 1 -1E3 1 -1FC 1 -1FD 1 -625 1 -624 1 -626 1 -250 1 -251 1 -252 1 -42 1 -62 1 -299 1 -180 1 -181 1 -253 1 -182 1 -183 1 -43 1 -63 1 -C7 1 -E7 1 -106 1 -107 1 -108 1 -109 1 -10A 1 -10B 1 -10C 1 -10D 1 -368 1 -187 1 -188 1 -255 1 -44 1 -64 1 -10E 1 -10F 1 -369 1 -1C4 1 -1C5 1 -1C6 1 -1F1 1 -1F2 1 -1F3 1 -2A3 1 -2A5 1 -2A4 1 -110 1 -111 1 -189 1 -256 1 -18A 1 -257 1 -18B 1 -18C 1 -221 1 -D0 1 -F0 1 -45 1 -65 1 -C8 1 -C9 1 -CA 1 -CB 1 -E8 1 -E9 1 -EA 1 -EB 1 -112 1 -113 1 -114 1 -115 1 -116 1 -117 1 -118 1 -119 1 -11A 1 -11B 1 -204 1 -205 1 -206 1 -207 1 -228 1 -229 1 -364 1 -18E 1 -1DD 1 -18F 1 -259 1 -190 1 -25B 1 -258 1 -25A 1 -25C 1 -25D 1 -25E 1 -29A 1 -264 1 -46 1 -66 1 -2A9 1 -191 1 -192 1 -47 1 -67 1 -11C 1 -11D 1 -11E 1 -11F 1 -120 1 -121 1 -122 1 -123 1 -1E6 1 -1E7 1 -1F4 1 -1F5 1 -261 1 -262 1 -1E4 1 -1E5 1 -193 1 -260 1 -29B 1 -194 1 -263 1 -2E0 1 -1A2 1 -1A3 1 -48 1 -68 1 -124 1 -125 1 -21E 1 -21F 1 -2B0 1 -36A 1 -29C 1 -195 1 -1F6 1 -126 1 -127 1 -266 1 -2B1 1 -267 1 -2BB 1 -2BD 1 -49 1 -69 1 -CC 1 -CD 1 -CE 1 -CF 1 -EC 1 -ED 1 -EE 1 -EF 1 -128 1 -129 1 -12A 1 -12B 1 -12C 1 -12D 1 -12E 1 -12F 1 -130 1 -1CF 1 -1D0 1 -208 1 -209 1 -20A 1 -20B 1 -365 1 -132 1 -133 1 -131 1 -26A 1 -197 1 -268 1 -196 1 -269 1 -4A 1 -6A 1 -134 1 -135 1 -1F0 1 -2B2 1 -29D 1 -25F 1 -284 1 -4B 1 -6B 1 -136 1 -137 1 -1E8 1 -1E9 1 -198 1 -199 1 -29E 1 -4C 1 -6C 1 -139 1 -13A 1 -13B 1 -13C 1 -13D 1 -13E 1 -2E1 1 -13F 1 -140 1 -1C7 1 -1C8 1 -1C9 1 -2AA 1 -2AB 1 -29F 1 -141 1 -142 1 -19A 1 -26B 1 -26C 1 -26D 1 -234 1 -26E 1 -19B 1 -28E 1 -4D 1 -6D 1 -36B 1 -271 1 -4E 1 -6E 1 -D1 1 -F1 1 -143 1 -144 1 -145 1 -146 1 -147 1 -148 1 -1F8 1 -1F9 1 -1CA 1 -1CB 1 -1CC 1 -274 1 -19D 1 -272 1 -19E 1 -220 1 -273 1 -235 1 -14A 1 -14B 1 -4F 1 -6F 1 -BA 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -14C 1 -14D 1 -14E 1 -14F 1 -150 1 -151 1 -1A0 1 -1A1 1 -1D1 1 -1D2 1 -1EA 1 -1EB 1 -1EC 1 -1ED 1 -20C 1 -20D 1 -20E 1 -20F 1 -22A 1 -22B 1 -22C 1 -22D 1 -22E 1 -22F 1 -230 1 -231 1 -366 1 -152 1 -153 1 -276 1 -D8 1 -F8 1 -1FE 1 -1FF 1 -186 1 -254 1 -19F 1 -275 1 -277 1 -222 1 -223 1 -50 1 -70 1 -1A4 1 -1A5 1 -278 1 -51 1 -71 1 -2A0 1 -138 1 -52 1 -72 1 -154 1 -155 1 -156 1 -157 1 -158 1 -159 1 -210 1 -211 1 -212 1 -213 1 -2B3 1 -36C 1 -1A6 1 -280 1 -279 1 -2B4 1 -27A 1 -27B 1 -2B5 1 -27C 1 -27D 1 -27E 1 -27F 1 -281 1 -2B6 1 -53 1 -73 1 -15A 1 -15B 1 -15C 1 -15D 1 -15E 1 -15F 1 -160 1 -161 1 -17F 1 -218 1 -219 1 -2E2 1 -DF 1 -282 1 -1A9 1 -283 1 -1AA 1 -285 1 -286 1 -54 1 -74 1 -162 1 -163 1 -164 1 -165 1 -21A 1 -21B 1 -36D 1 -2A8 1 -1BE 1 -2A6 1 -2A7 1 -166 1 -167 1 -1AB 1 -1AC 1 -1AD 1 -1AE 1 -288 1 -236 1 -287 1 -55 1 -75 1 -D9 1 -DA 1 -DB 1 -DC 1 -F9 1 -FA 1 -FB 1 -FC 1 -168 1 -169 1 -16A 1 -16B 1 -16C 1 -16D 1 -16E 1 -16F 1 -170 1 -171 1 -172 1 -173 1 -1AF 1 -1B0 1 -1D3 1 -1D4 1 -1D5 1 -1D6 1 -1D7 1 -1D8 1 -1D9 1 -1DA 1 -1DB 1 -1DC 1 -214 1 -215 1 -216 1 -217 1 -367 1 -289 1 -265 1 -2AE 1 -2AF 1 -19C 1 -26F 1 -270 1 -1B1 1 -28A 1 -56 1 -76 1 -36E 1 -1B2 1 -28B 1 -28C 1 -57 1 -77 1 -174 1 -175 1 -2B7 1 -28D 1 -58 1 -78 1 -2E3 1 -36F 1 -59 1 -79 1 -DD 1 -FD 1 -FF 1 -176 1 -177 1 -178 1 -232 1 -233 1 -2B8 1 -28F 1 -1B3 1 -1B4 1 -5A 1 -7A 1 -179 1 -17A 1 -17B 1 -17C 1 -17D 1 -17E 1 -18D 1 -1B5 1 -1B6 1 -224 1 -225 1 -290 1 -291 1 -1B7 1 -1EE 1 -1EF 1 -292 1 -1B8 1 -1B9 1 -1BA 1 -293 1 -21C 1 -21D 1 -DE 1 -FE 1 -1BF 1 -1F7 1 -1BB 1 -1A7 1 -1A8 1 -1BC 1 -1BD 1 -184 1 -185 1 -294 1 -2C0 1 -2BC 1 -149 1 -2EE 1 -2BE 1 -295 1 -2E4 1 -2BF 1 -2C1 1 -2A1 1 -2A2 1 -296 1 -1C0 1 -1C1 1 -1C2 1 -1C3 1 -297 1 -298 1 -2AC 1 -2AD 1 -386 1 -391 1 -3AC 1 -3B1 1 -392 1 -3B2 1 -3D0 1 -393 1 -3B3 1 -394 1 -3B4 1 -388 1 -395 1 -3AD 1 -3B5 1 -3F5 1 -3DC 1 -3DD 1 -3DA 1 -3DB 1 -396 1 -3B6 1 -389 1 -397 1 -3AE 1 -3B7 1 -398 1 -3B8 1 -3D1 1 -3F4 1 -37A 1 -38A 1 -390 1 -399 1 -3AA 1 -3AF 1 -3B9 1 -3CA 1 -3F3 1 -39A 1 -3BA 1 -3F0 1 -3D7 1 -39B 1 -3BB 1 -B5 1 -39C 1 -3BC 1 -39D 1 -3BD 1 -39E 1 -3BE 1 -38C 1 -39F 1 -3BF 1 -3CC 1 -3A0 1 -3C0 1 -3D6 1 -3DE 1 -3DF 1 -3D8 1 -3D9 1 -3A1 1 -3C1 1 -3F1 1 -3A3 1 -3C2 1 -3C3 1 -3F2 1 -3F9 1 -3A4 1 -3C4 1 -38E 1 -3A5 1 -3AB 1 -3B0 1 -3C5 1 -3CB 1 -3CD 1 -3D2 1 -3D3 1 -3D4 1 -3A6 1 -3C6 1 -3D5 1 -3A7 1 -3C7 1 -3A8 1 -3C8 1 -38F 1 -3A9 1 -3C9 1 -3CE 1 -3E0 1 -3E1 1 -3F7 1 -3F8 1 -3FA 1 -3FB 1 -3E2 1 -3E3 1 -3E4 1 -3E5 1 -3E6 1 -3E7 1 -3E8 1 -3E9 1 -3EA 1 -3EB 1 -3EC 1 -3ED 1 -3EE 1 -3EF 1 -410 1 -430 1 -4D0 1 -4D1 1 -4D2 1 -4D3 1 -4D8 1 -4D9 1 -4DA 1 -4DB 1 -4D4 1 -4D5 1 -411 1 -431 1 -412 1 -432 1 -413 1 -433 1 -490 1 -491 1 -492 1 -493 1 -494 1 -495 1 -414 1 -434 1 -500 1 -501 1 -402 1 -452 1 -502 1 -503 1 -403 1 -453 1 -498 1 -499 1 -400 1 -401 1 -415 1 -435 1 -450 1 -451 1 -4D6 1 -4D7 1 -404 1 -454 1 -416 1 -436 1 -4C1 1 -4C2 1 -4DC 1 -4DD 1 -496 1 -497 1 -417 1 -437 1 -504 1 -505 1 -4DE 1 -4DF 1 -405 1 -455 1 -4E0 1 -4E1 1 -506 1 -507 1 -40D 1 -418 1 -438 1 -45D 1 -4E2 1 -4E3 1 -48A 1 -48B 1 -4E4 1 -4E5 1 -406 1 -456 1 -407 1 -457 1 -419 1 -439 1 -408 1 -458 1 -41A 1 -43A 1 -49A 1 -49B 1 -4C3 1 -4C4 1 -4A0 1 -4A1 1 -49E 1 -49F 1 -49C 1 -49D 1 -41B 1 -43B 1 -4C5 1 -4C6 1 -409 1 -459 1 -508 1 -509 1 -41C 1 -43C 1 -4CD 1 -4CE 1 -41D 1 -43D 1 -4C9 1 -4CA 1 -4A2 1 -4A3 1 -4C7 1 -4C8 1 -4A4 1 -4A5 1 -40A 1 -45A 1 -50A 1 -50B 1 -41E 1 -43E 1 -4E6 1 -4E7 1 -4E8 1 -4E9 1 -4EA 1 -4EB 1 -41F 1 -43F 1 -4A6 1 -4A7 1 -480 1 -481 1 -420 1 -440 1 -48E 1 -48F 1 -421 1 -441 1 -50C 1 -50D 1 -4AA 1 -4AB 1 -422 1 -442 1 -50E 1 -50F 1 -4AC 1 -4AD 1 -40B 1 -45B 1 -40C 1 -45C 1 -423 1 -443 1 -4EE 1 -4EF 1 -40E 1 -45E 1 -4F0 1 -4F1 1 -4F2 1 -4F3 1 -4AE 1 -4AF 1 -4B0 1 -4B1 1 -478 1 -479 1 -424 1 -444 1 -425 1 -445 1 -4B2 1 -4B3 1 -4BA 1 -4BB 1 -460 1 -461 1 -47E 1 -47F 1 -47C 1 -47D 1 -47A 1 -47B 1 -426 1 -446 1 -4B4 1 -4B5 1 -427 1 -447 1 -4F4 1 -4F5 1 -4B6 1 -4B7 1 -4CB 1 -4CC 1 -4B8 1 -4B9 1 -4BC 1 -4BD 1 -4BE 1 -4BF 1 -40F 1 -45F 1 -428 1 -448 1 -429 1 -449 1 -42A 1 -44A 1 -42B 1 -44B 1 -4F8 1 -4F9 1 -42C 1 -44C 1 -48C 1 -48D 1 -462 1 -463 1 -42D 1 -44D 1 -4EC 1 -4ED 1 -42E 1 -44E 1 -42F 1 -44F 1 -464 1 -465 1 -466 1 -467 1 -46A 1 -46B 1 -468 1 -469 1 -46C 1 -46D 1 -46E 1 -46F 1 -470 1 -471 1 -472 1 -473 1 -474 1 -475 1 -476 1 -477 1 -4A8 1 -4A9 1 -4C0 1 -531 1 -561 1 -532 1 -562 1 -533 1 -563 1 -534 1 -564 1 -535 1 -565 1 -587 1 -536 1 -566 1 -537 1 -567 1 -538 1 -568 1 -539 1 -569 1 -53A 1 -56A 1 -53B 1 -56B 1 -53C 1 -56C 1 -53D 1 -56D 1 -53E 1 -56E 1 -53F 1 -56F 1 -540 1 -570 1 -541 1 -571 1 -542 1 -572 1 -543 1 -573 1 -544 1 -574 1 -545 1 -575 1 -546 1 -576 1 -547 1 -577 1 -548 1 -578 1 -549 1 -579 1 -54A 1 -57A 1 -54B 1 -57B 1 -54C 1 -57C 1 -54D 1 -57D 1 -54E 1 -57E 1 -54F 1 -57F 1 -550 1 -580 1 -551 1 -581 1 -552 1 -582 1 -553 1 -583 1 -554 1 -584 1 -555 1 -585 1 -556 1 -586 1 -559 1 -5D0 1 -5D1 1 -5D2 1 -5D3 1 -5D4 1 -5D5 1 -5F0 1 -5F1 1 -5D6 1 -5D7 1 -5D8 1 -5D9 1 -5F2 1 -5DA 1 -5DB 1 -5DC 1 -5DD 1 -5DE 1 -5DF 1 -5E0 1 -5E1 1 -5E2 1 -5E3 1 -5E4 1 -5E5 1 -5E6 1 -5E7 1 -5E8 1 -5E9 1 -5EA 1 -674 1 -6FD 1 -672 1 -673 1 -675 1 -66E 1 -628 1 -67B 1 -67E 1 -680 1 -689 1 -68A 1 -62A 1 -62B 1 -679 1 -67A 1 -67C 1 -67D 1 -67F 1 -62C 1 -683 1 -684 1 -686 1 -6BF 1 -687 1 -62D 1 -62E 1 -681 1 -682 1 -685 1 -62F 1 -630 1 -688 1 -68B 1 -68C 1 -68D 1 -68E 1 -68F 1 -690 1 -6EE 1 -631 1 -632 1 -691 1 -692 1 -693 1 -694 1 -695 1 -696 1 -697 1 -698 1 -699 1 -6EF 1 -633 1 -634 1 -69A 1 -69B 1 -69C 1 -6FA 1 -635 1 -636 1 -69D 1 -69E 1 -6FB 1 -637 1 -638 1 -69F 1 -639 1 -63A 1 -6A0 1 -6FC 1 -641 1 -6A1 1 -6A2 1 -6A3 1 -6A4 1 -6A5 1 -6A6 1 -66F 1 -642 1 -6A7 1 -6A9 1 -643 1 -6A8 1 -6AA 1 -6AB 1 -6AC 1 -6AD 1 -6AE 1 -6AF 1 -6B0 1 -6B1 1 -6B2 1 -6B3 1 -6B4 1 -644 1 -6B5 1 -6B6 1 -6B7 1 -6B8 1 -645 1 -6FE 1 -646 1 -6BA 1 -6BB 1 -6BC 1 -6BD 1 -6B9 1 -6BE 1 -6C1 1 -6C2 1 -6C3 1 -6FF 1 -6D5 1 -648 1 -6E5 1 -676 1 -647 1 -6C4 1 -629 1 -6C5 1 -6C0 1 -6C6 1 -6C7 1 -6CC 1 -677 1 -649 1 -6C8 1 -64A 1 -6C9 1 -6CA 1 -6CB 1 -6CF 1 -6E6 1 -678 1 -6CD 1 -6CE 1 -6D0 1 -6D1 1 -6D2 1 -6D3 1 -710 1 -712 1 -72D 1 -713 1 -714 1 -72E 1 -716 1 -715 1 -72F 1 -717 1 -718 1 -719 1 -74D 1 -71A 1 -71B 1 -71C 1 -71D 1 -71E 1 -71F 1 -74E 1 -720 1 -721 1 -722 1 -723 1 -724 1 -725 1 -726 1 -727 1 -74F 1 -728 1 -729 1 -72A 1 -72B 1 -72C 1 -780 1 -799 1 -79A 1 -781 1 -782 1 -783 1 -79C 1 -784 1 -785 1 -786 1 -787 1 -7A2 1 -7A3 1 -788 1 -7A5 1 -789 1 -78A 1 -78B 1 -79B 1 -78C 1 -798 1 -7A0 1 -7A1 1 -78D 1 -78E 1 -7A4 1 -78F 1 -790 1 -79D 1 -79E 1 -79F 1 -791 1 -792 1 -793 1 -794 1 -795 1 -796 1 -797 1 -7B1 1 -7A6 1 -7A7 1 -7A8 1 -7A9 1 -7AA 1 -7AB 1 -7AC 1 -7AD 1 -7AE 1 -7AF 1 -7B0 1 -4E00 1 -4E01 1 -4E02 1 -4E03 1 -4E04 1 -4E05 1 -4E06 1 -4E07 1 -4E08 1 -4E09 1 -4E0A 1 -4E0B 1 -4E0C 1 -4E0D 1 -4E0E 1 -4E0F 1 -4E10 1 -4E11 1 -4E12 1 -4E13 1 -4E14 1 -4E15 1 -4E16 1 -4E17 1 -4E18 1 -4E19 1 -4E1A 1 -4E1B 1 -4E1C 1 -4E1D 1 -4E1E 1 -4E1F 1 -4E20 1 -4E21 1 -4E22 1 -4E23 1 -4E24 1 -4E25 1 -4E26 1 -4E27 1 -4E28 1 -4E29 1 -4E2A 1 -4E2B 1 -4E2C 1 -4E2D 1 -4E2E 1 -4E2F 1 -4E30 1 -4E31 1 -4E32 1 -4E33 1 -4E34 1 -4E35 1 -4E36 1 -4E37 1 -4E38 1 -4E39 1 -4E3A 1 -4E3B 1 -4E3C 1 -4E3D 1 -4E3E 1 -4E3F 1 -4E40 1 -4E41 1 -4E42 1 -4E43 1 -4E44 1 -4E45 1 -4E46 1 -4E47 1 -4E48 1 -4E49 1 -4E4A 1 -4E4B 1 -4E4C 1 -4E4D 1 -4E4E 1 -4E4F 1 -4E50 1 -4E51 1 -4E52 1 -4E53 1 -4E54 1 -4E55 1 -4E56 1 -4E57 1 -4E58 1 -4E59 1 -4E5A 1 -4E5B 1 -4E5C 1 -4E5D 1 -4E5E 1 -4E5F 1 -4E60 1 -4E61 1 -4E62 1 -4E63 1 -4E64 1 -4E65 1 -4E66 1 -4E67 1 -4E68 1 -4E69 1 -4E6A 1 -4E6B 1 -4E6C 1 -4E6D 1 -4E6E 1 -4E6F 1 -4E70 1 -4E71 1 -4E72 1 -4E73 1 -4E74 1 -4E75 1 -4E76 1 -4E77 1 -4E78 1 -4E79 1 -4E7A 1 -4E7B 1 -4E7C 1 -4E7D 1 -4E7E 1 -4E7F 1 -4E80 1 -4E81 1 -4E82 1 -4E83 1 -4E84 1 -4E85 1 -4E86 1 -4E87 1 -4E88 1 -4E89 1 -4E8A 1 -4E8B 1 -4E8C 1 -4E8D 1 -4E8E 1 -4E8F 1 -4E90 1 -4E91 1 -4E92 1 -4E93 1 -4E94 1 -4E95 1 -4E96 1 -4E97 1 -4E98 1 -4E99 1 -4E9A 1 -4E9B 1 -4E9C 1 -4E9D 1 -4E9E 1 -4E9F 1 -4EA0 1 -4EA1 1 -4EA2 1 -4EA3 1 -4EA4 1 -4EA5 1 -4EA6 1 -4EA7 1 -4EA8 1 -4EA9 1 -4EAA 1 -4EAB 1 -4EAC 1 -4EAD 1 -4EAE 1 -4EAF 1 -4EB0 1 -4EB1 1 -4EB2 1 -4EB3 1 -4EB4 1 -4EB5 1 -4EB6 1 -4EB7 1 -4EB8 1 -4EB9 1 -4EBA 1 -4EBB 1 -4EBC 1 -4EBD 1 -4EBE 1 -4EBF 1 -4EC0 1 -4EC1 1 -4EC2 1 -4EC3 1 -4EC4 1 -4EC5 1 -4EC6 1 -4EC7 1 -4EC8 1 -4EC9 1 -4ECA 1 -4ECB 1 -4ECC 1 -4ECD 1 -4ECE 1 -4ECF 1 -4ED0 1 -4ED1 1 -4ED2 1 -4ED3 1 -4ED4 1 -4ED5 1 -4ED6 1 -4ED7 1 -4ED8 1 -4ED9 1 -4EDA 1 -4EDB 1 -4EDC 1 -4EDD 1 -4EDE 1 -4EDF 1 -4EE0 1 -4EE1 1 -4EE2 1 -4EE3 1 -4EE4 1 -4EE5 1 -4EE6 1 -4EE7 1 -4EE8 1 -4EE9 1 -4EEA 1 -4EEB 1 -4EEC 1 -4EED 1 -4EEE 1 -4EEF 1 -4EF0 1 -4EF1 1 -4EF2 1 -4EF3 1 -4EF4 1 -4EF5 1 -4EF6 1 -4EF7 1 -4EF8 1 -4EF9 1 -4EFA 1 -4EFB 1 -4EFC 1 -4EFD 1 -4EFE 1 -4EFF 1 -4F00 1 -4F01 1 -4F02 1 -4F03 1 -4F04 1 -4F05 1 -4F06 1 -4F07 1 -4F08 1 -4F09 1 -4F0A 1 -4F0B 1 -4F0C 1 -4F0D 1 -4F0E 1 -4F0F 1 -4F10 1 -4F11 1 -4F12 1 -4F13 1 -4F14 1 -4F15 1 -4F16 1 -4F17 1 -4F18 1 -4F19 1 -4F1A 1 -4F1B 1 -4F1C 1 -4F1D 1 -4F1E 1 -4F1F 1 -4F20 1 -4F21 1 -4F22 1 -4F23 1 -4F24 1 -4F25 1 -4F26 1 -4F27 1 -4F28 1 -4F29 1 -4F2A 1 -4F2B 1 -4F2C 1 -4F2D 1 -4F2E 1 -4F2F 1 -4F30 1 -4F31 1 -4F32 1 -4F33 1 -4F34 1 -4F35 1 -4F36 1 -4F37 1 -4F38 1 -4F39 1 -4F3A 1 -4F3B 1 -4F3C 1 -4F3D 1 -4F3E 1 -4F3F 1 -4F40 1 -4F41 1 -4F42 1 -4F43 1 -4F44 1 -4F45 1 -4F46 1 -4F47 1 -4F48 1 -4F49 1 -4F4A 1 -4F4B 1 -4F4C 1 -4F4D 1 -4F4E 1 -4F4F 1 -4F50 1 -4F51 1 -4F52 1 -4F53 1 -4F54 1 -4F55 1 -4F56 1 -4F57 1 -4F58 1 -4F59 1 -4F5A 1 -4F5B 1 -4F5C 1 -4F5D 1 -4F5E 1 -4F5F 1 -4F60 1 -4F61 1 -4F62 1 -4F63 1 -4F64 1 -4F65 1 -4F66 1 -4F67 1 -4F68 1 -4F69 1 -4F6A 1 -4F6B 1 -4F6C 1 -4F6D 1 -4F6E 1 -4F6F 1 -4F70 1 -4F71 1 -4F72 1 -4F73 1 -4F74 1 -4F75 1 -4F76 1 -4F77 1 -4F78 1 -4F79 1 -4F7A 1 -4F7B 1 -4F7C 1 -4F7D 1 -4F7E 1 -4F7F 1 -4F80 1 -4F81 1 -4F82 1 -4F83 1 -4F84 1 -4F85 1 -4F86 1 -4F87 1 -4F88 1 -4F89 1 -4F8A 1 -4F8B 1 -4F8C 1 -4F8D 1 -4F8E 1 -4F8F 1 -4F90 1 -4F91 1 -4F92 1 -4F93 1 -4F94 1 -4F95 1 -4F96 1 -4F97 1 -4F98 1 -4F99 1 -4F9A 1 -4F9B 1 -4F9C 1 -4F9D 1 -4F9E 1 -4F9F 1 -4FA0 1 -4FA1 1 -4FA2 1 -4FA3 1 -4FA4 1 -4FA5 1 -4FA6 1 -4FA7 1 -4FA8 1 -4FA9 1 -4FAA 1 -4FAB 1 -4FAC 1 -4FAD 1 -4FAE 1 -4FAF 1 -4FB0 1 -4FB1 1 -4FB2 1 -4FB3 1 -4FB4 1 -4FB5 1 -4FB6 1 -4FB7 1 -4FB8 1 -4FB9 1 -4FBA 1 -4FBB 1 -4FBC 1 -4FBD 1 -4FBE 1 -4FBF 1 -4FC0 1 -4FC1 1 -4FC2 1 -4FC3 1 -4FC4 1 -4FC5 1 -4FC6 1 -4FC7 1 -4FC8 1 -4FC9 1 -4FCA 1 -4FCB 1 -4FCC 1 -4FCD 1 -4FCE 1 -4FCF 1 -4FD0 1 -4FD1 1 -4FD2 1 -4FD3 1 -4FD4 1 -4FD5 1 -4FD6 1 -4FD7 1 -4FD8 1 -4FD9 1 -4FDA 1 -4FDB 1 -4FDC 1 -4FDD 1 -4FDE 1 -4FDF 1 -4FE0 1 -4FE1 1 -4FE2 1 -4FE3 1 -4FE4 1 -4FE5 1 -4FE6 1 -4FE7 1 -4FE8 1 -4FE9 1 -4FEA 1 -4FEB 1 -4FEC 1 -4FED 1 -4FEE 1 -4FEF 1 -4FF0 1 -4FF1 1 -4FF2 1 -4FF3 1 -4FF4 1 -4FF5 1 -4FF6 1 -4FF7 1 -4FF8 1 -4FF9 1 -4FFA 1 -4FFB 1 -4FFC 1 -4FFD 1 -4FFE 1 -4FFF 1 -237 1 -238 1 -239 1 -23A 1 -23B 1 -23C 1 -23D 1 -23E 1 -23F 1 -240 1 -241 1 -242 1 -243 1 -244 1 -245 1 -246 1 -247 1 -248 1 -249 1 -24A 1 -24B 1 -24C 1 -24D 1 -24E 1 -24F 1 -358 1 -359 1 -35A 1 -35B 1 -35C 1 -370 1 -371 1 -372 1 -373 1 -376 1 -377 1 -378 1 -379 1 -37B 1 -37C 1 -37D 1 -37F 1 -380 1 -381 1 -382 1 -383 1 -38B 1 -38D 1 -3A2 1 -3CF 1 -3FC 1 -3FD 1 -3FE 1 -3FF 1 -487 1 -4CF 1 -4F6 1 -4F7 1 -4FA 1 -4FB 1 -4FC 1 -4FD 1 -4FE 1 -4FF 1 -510 1 -511 1 -512 1 -513 1 -514 1 -515 1 -516 1 -517 1 -518 1 -519 1 -51A 1 -51B 1 -51C 1 -51D 1 -51E 1 -51F 1 -520 1 -521 1 -522 1 -523 1 -524 1 -525 1 -526 1 -527 1 -528 1 -529 1 -52A 1 -52B 1 -52C 1 -52D 1 -52E 1 -52F 1 -530 1 -557 1 -558 1 -560 1 -588 1 -58B 1 -58C 1 -58D 1 -58E 1 -58F 1 -590 1 -5A2 1 -5BA 1 -5C5 1 -5C6 1 -5C7 1 -5C8 1 -5C9 1 -5CA 1 -5CB 1 -5CC 1 -5CD 1 -5CE 1 -5CF 1 -5EB 1 -5EC 1 -5ED 1 -5EE 1 -5EF 1 -5F5 1 -5F6 1 -5F7 1 -5F8 1 -5F9 1 -5FA 1 -5FB 1 -5FC 1 -5FD 1 -5FE 1 -5FF 1 -604 1 -605 1 -606 1 -607 1 -608 1 -609 1 -60A 1 -60B 1 -616 1 -617 1 -618 1 -619 1 -61A 1 -61C 1 -61D 1 -61E 1 -620 1 -63B 1 -63C 1 -63D 1 -63E 1 -63F 1 -659 1 -65A 1 -65B 1 -65C 1 -65D 1 -65E 1 -65F 1 -70E 1 -74B 1 -74C 1 -750 1 -751 1 -752 1 -753 1 -754 1 -755 1 -756 1 -757 1 -758 1 -759 1 -75A 1 -75B 1 -75C 1 -75D 1 -75E 1 -75F 1 -760 1 -761 1 -762 1 -763 1 -764 1 -765 1 -766 1 -767 1 -768 1 -769 1 -76A 1 -76B 1 -76C 1 -76D 1 -76E 1 -76F 1 -770 1 -771 1 -772 1 -773 1 -774 1 -775 1 -776 1 -777 1 -778 1 -779 1 -77A 1 -77B 1 -77C 1 -77D 1 -77E 1 -77F 1 -7B2 1 -7B3 1 -7B4 1 -7B5 1 -7B6 1 -7B7 1 -7B8 1 -7B9 1 -7BA 1 -7BB 1 -7BC 1 -7BD 1 -7BE 1 -7BF 1 -7C0 1 -7C1 1 -7C2 1 -7C3 1 -7C4 1 -7C5 1 -7C6 1 -7C7 1 -7C8 1 -7C9 1 -7CA 1 -7CB 1 -7CC 1 -7CD 1 -7CE 1 -7CF 1 -7D0 1 -7D1 1 -7D2 1 -7D3 1 -7D4 1 -7D5 1 -7D6 1 -7D7 1 -7D8 1 -7D9 1 -7DA 1 -7DB 1 -7DC 1 -7DD 1 -7DE 1 -7DF 1 -7E0 1 -7E1 1 -7E2 1 -7E3 1 -7E4 1 -7E5 1 -7E6 1 -7E7 1 -7E8 1 -7E9 1 -7EA 1 -7EB 1 -7EC 1 -7ED 1 -7EE 1 -7EF 1 -7F0 1 -7F1 1 -7F2 1 -7F3 1 -7F4 1 -7F5 1 -7F6 1 -7F7 1 -7F8 1 -7F9 1 -7FA 1 -7FB 1 -7FC 1 -7FD 1 -7FE 1 -7FF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -SET NAMES utf8; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=NDB CHARACTER SET utf8; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_general_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_polish_ci; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -85 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -300 1 -301 1 -302 1 -303 1 -304 1 -305 1 -306 1 -307 1 -308 1 -309 1 -30A 1 -30B 1 -30C 1 -30D 1 -30E 1 -30F 1 -310 1 -311 1 -312 1 -313 1 -314 1 -315 1 -316 1 -317 1 -318 1 -319 1 -31A 1 -31B 1 -31C 1 -31D 1 -31E 1 -31F 1 -320 1 -321 1 -322 1 -323 1 -324 1 -325 1 -326 1 -327 1 -328 1 -329 1 -32A 1 -32B 1 -32C 1 -32D 1 -32E 1 -32F 1 -330 1 -331 1 -332 1 -333 1 -334 1 -335 1 -336 1 -337 1 -338 1 -339 1 -33A 1 -33B 1 -33C 1 -33D 1 -33E 1 -33F 1 -340 1 -341 1 -342 1 -343 1 -344 1 -345 1 -346 1 -347 1 -348 1 -349 1 -34A 1 -34B 1 -34C 1 -34D 1 -34E 1 -34F 1 -350 1 -351 1 -352 1 -353 1 -354 1 -355 1 -356 1 -357 1 -35D 1 -35E 1 -35F 1 -360 1 -361 1 -362 1 -483 1 -484 1 -485 1 -486 1 -488 1 -489 1 -591 1 -592 1 -593 1 -594 1 -595 1 -596 1 -597 1 -598 1 -599 1 -59A 1 -59B 1 -59C 1 -59D 1 -59E 1 -59F 1 -5A0 1 -5A1 1 -5A3 1 -5A4 1 -5A5 1 -5A6 1 -5A7 1 -5A8 1 -5A9 1 -5AA 1 -5AB 1 -5AC 1 -5AD 1 -5AE 1 -5AF 1 -5B0 1 -5B1 1 -5B2 1 -5B3 1 -5B4 1 -5B5 1 -5B6 1 -5B7 1 -5B8 1 -5B9 1 -5BB 1 -5BC 1 -5BD 1 -5BF 1 -5C1 1 -5C2 1 -5C4 1 -600 1 -601 1 -602 1 -603 1 -610 1 -611 1 -612 1 -613 1 -614 1 -615 1 -64B 1 -64C 1 -64D 1 -64E 1 -64F 1 -650 1 -651 1 -652 1 -653 1 -654 1 -655 1 -656 1 -657 1 -658 1 -670 1 -6D6 1 -6D7 1 -6D8 1 -6D9 1 -6DA 1 -6DB 1 -6DC 1 -6DD 1 -6DE 1 -6DF 1 -6E0 1 -6E1 1 -6E2 1 -6E3 1 -6E4 1 -6E7 1 -6E8 1 -6EA 1 -6EB 1 -6EC 1 -6ED 1 -70F 1 -711 1 -730 1 -731 1 -732 1 -733 1 -734 1 -735 1 -736 1 -737 1 -738 1 -739 1 -73A 1 -73B 1 -73C 1 -73D 1 -73E 1 -73F 1 -740 1 -741 1 -742 1 -743 1 -744 1 -745 1 -746 1 -747 1 -748 1 -749 1 -74A 1 -640 1 -60 1 -B4 1 -384 1 -2DC 1 -5E 1 -AF 1 -2D8 1 -2D9 1 -A8 1 -385 1 -2DA 1 -2DD 1 -B8 1 -2DB 1 -5F 1 -AD 1 -2D 1 -58A 1 -2C 1 -55D 1 -60C 1 -60D 1 -66B 1 -66C 1 -3B 1 -37E 1 -61B 1 -3A 1 -589 1 -703 1 -704 1 -705 1 -706 1 -707 1 -708 1 -21 1 -A1 1 -55C 1 -3F 1 -BF 1 -55E 1 -61F 1 -709 1 -2E 1 -6D4 1 -701 1 -702 1 -B7 1 -387 1 -700 1 -27 1 -22 1 -AB 1 -BB 1 -28 1 -29 1 -5B 1 -7B 1 -7D 1 -A7 1 -B6 1 -A9 1 -AE 1 -40 1 -2A 1 -66D 1 -2F 1 -26 1 -23 1 -25 1 -66A 1 -55A 1 -55B 1 -55F 1 -5BE 1 -5C0 1 -5C3 1 -5F3 1 -5F4 1 -70A 1 -70B 1 -70C 1 -70D 1 -2B9 1 -374 1 -375 1 -2BA 1 -2C2 1 -2C3 1 -2C4 1 -2C5 1 -2C6 1 -2C7 1 -2C8 1 -2C9 1 -2CA 1 -2CB 1 -2CC 1 -2CD 1 -2CE 1 -2CF 1 -2D2 1 -2D3 1 -2D4 1 -2D5 1 -2D6 1 -2D7 1 -2DE 1 -2DF 1 -2E5 1 -2E6 1 -2E7 1 -2E8 1 -2E9 1 -2EA 1 -2EB 1 -2EC 1 -2ED 1 -2EF 1 -2F0 1 -2F1 1 -2F2 1 -2F3 1 -2F4 1 -2F5 1 -2F6 1 -2F7 1 -2F8 1 -2F9 1 -2FA 1 -2FB 1 -2FC 1 -2FD 1 -2FE 1 -2FF 1 -B0 1 -482 1 -60E 1 -60F 1 -6E9 1 -3F6 1 -2B 1 -B1 1 -F7 1 -D7 1 -3C 1 -3D 1 -3E 1 -AC 1 -7C 1 -A6 1 -7E 1 -2D0 1 -2D1 1 -A4 1 -A2 1 -24 1 -A3 1 -A5 1 -30 1 -660 1 -6F0 1 -31 1 -B9 1 -661 1 -6F1 1 -BD 1 -BC 1 -32 1 -B2 1 -662 1 -6F2 1 -33 1 -B3 1 -663 1 -6F3 1 -BE 1 -34 1 -664 1 -6F4 1 -35 1 -665 1 -6F5 1 -36 1 -666 1 -6F6 1 -37 1 -667 1 -6F7 1 -38 1 -668 1 -6F8 1 -39 1 -669 1 -6F9 1 -41 1 -61 1 -AA 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -100 1 -101 1 -102 1 -103 1 -1CD 1 -1CE 1 -1DE 1 -1DF 1 -1E0 1 -1E1 1 -1FA 1 -1FB 1 -200 1 -201 1 -202 1 -203 1 -226 1 -227 1 -363 1 -104 1 -105 1 -C6 1 -E6 1 -1E2 1 -1E3 1 -1FC 1 -1FD 1 -250 1 -251 1 -252 1 -42 1 -62 1 -299 1 -180 1 -181 1 -253 1 -182 1 -183 1 -43 1 -63 1 -C7 1 -E7 1 -108 1 -109 1 -10A 1 -10B 1 -10C 1 -10D 1 -368 1 -106 1 -107 1 -187 1 -188 1 -255 1 -44 1 -64 1 -10E 1 -10F 1 -369 1 -1C4 1 -1C5 1 -1C6 1 -1F1 1 -1F2 1 -1F3 1 -2A3 1 -2A5 1 -2A4 1 -110 1 -111 1 -189 1 -256 1 -18A 1 -257 1 -18B 1 -18C 1 -221 1 -D0 1 -F0 1 -45 1 -65 1 -C8 1 -C9 1 -CA 1 -CB 1 -E8 1 -E9 1 -EA 1 -EB 1 -112 1 -113 1 -114 1 -115 1 -116 1 -117 1 -11A 1 -11B 1 -204 1 -205 1 -206 1 -207 1 -228 1 -229 1 -364 1 -118 1 -119 1 -18E 1 -1DD 1 -18F 1 -259 1 -190 1 -25B 1 -258 1 -25A 1 -25C 1 -25D 1 -25E 1 -29A 1 -264 1 -46 1 -66 1 -2A9 1 -191 1 -192 1 -47 1 -67 1 -11C 1 -11D 1 -11E 1 -11F 1 -120 1 -121 1 -122 1 -123 1 -1E6 1 -1E7 1 -1F4 1 -1F5 1 -261 1 -262 1 -1E4 1 -1E5 1 -193 1 -260 1 -29B 1 -194 1 -263 1 -2E0 1 -1A2 1 -1A3 1 -48 1 -68 1 -124 1 -125 1 -21E 1 -21F 1 -2B0 1 -36A 1 -29C 1 -195 1 -1F6 1 -126 1 -127 1 -266 1 -2B1 1 -267 1 -2BB 1 -2BD 1 -49 1 -69 1 -CC 1 -CD 1 -CE 1 -CF 1 -EC 1 -ED 1 -EE 1 -EF 1 -128 1 -129 1 -12A 1 -12B 1 -12C 1 -12D 1 -12E 1 -12F 1 -130 1 -1CF 1 -1D0 1 -208 1 -209 1 -20A 1 -20B 1 -365 1 -132 1 -133 1 -131 1 -26A 1 -197 1 -268 1 -196 1 -269 1 -4A 1 -6A 1 -134 1 -135 1 -1F0 1 -2B2 1 -29D 1 -25F 1 -284 1 -4B 1 -6B 1 -136 1 -137 1 -1E8 1 -1E9 1 -198 1 -199 1 -29E 1 -4C 1 -6C 1 -139 1 -13A 1 -13B 1 -13C 1 -13D 1 -13E 1 -2E1 1 -13F 1 -140 1 -1C7 1 -1C8 1 -1C9 1 -2AA 1 -2AB 1 -141 1 -142 1 -29F 1 -19A 1 -26B 1 -26C 1 -26D 1 -234 1 -26E 1 -19B 1 -28E 1 -4D 1 -6D 1 -36B 1 -271 1 -4E 1 -6E 1 -D1 1 -F1 1 -145 1 -146 1 -147 1 -148 1 -1F8 1 -1F9 1 -1CA 1 -1CB 1 -1CC 1 -143 1 -144 1 -274 1 -19D 1 -272 1 -19E 1 -220 1 -273 1 -235 1 -14A 1 -14B 1 -4F 1 -6F 1 -BA 1 -D2 1 -D4 1 -D5 1 -D6 1 -F2 1 -F4 1 -F5 1 -F6 1 -14C 1 -14D 1 -14E 1 -14F 1 -150 1 -151 1 -1A0 1 -1A1 1 -1D1 1 -1D2 1 -1EA 1 -1EB 1 -1EC 1 -1ED 1 -20C 1 -20D 1 -20E 1 -20F 1 -22A 1 -22B 1 -22C 1 -22D 1 -22E 1 -22F 1 -230 1 -231 1 -366 1 -152 1 -153 1 -D3 1 -F3 1 -276 1 -D8 1 -F8 1 -1FE 1 -1FF 1 -186 1 -254 1 -19F 1 -275 1 -277 1 -222 1 -223 1 -50 1 -70 1 -1A4 1 -1A5 1 -278 1 -51 1 -71 1 -2A0 1 -138 1 -52 1 -72 1 -154 1 -155 1 -156 1 -157 1 -158 1 -159 1 -210 1 -211 1 -212 1 -213 1 -2B3 1 -36C 1 -1A6 1 -280 1 -279 1 -2B4 1 -27A 1 -27B 1 -2B5 1 -27C 1 -27D 1 -27E 1 -27F 1 -281 1 -2B6 1 -53 1 -73 1 -15C 1 -15D 1 -15E 1 -15F 1 -160 1 -161 1 -17F 1 -218 1 -219 1 -2E2 1 -DF 1 -15A 1 -15B 1 -282 1 -1A9 1 -283 1 -1AA 1 -285 1 -286 1 -54 1 -74 1 -162 1 -163 1 -164 1 -165 1 -21A 1 -21B 1 -36D 1 -2A8 1 -1BE 1 -2A6 1 -2A7 1 -166 1 -167 1 -1AB 1 -1AC 1 -1AD 1 -1AE 1 -288 1 -236 1 -287 1 -55 1 -75 1 -D9 1 -DA 1 -DB 1 -DC 1 -F9 1 -FA 1 -FB 1 -FC 1 -168 1 -169 1 -16A 1 -16B 1 -16C 1 -16D 1 -16E 1 -16F 1 -170 1 -171 1 -172 1 -173 1 -1AF 1 -1B0 1 -1D3 1 -1D4 1 -1D5 1 -1D6 1 -1D7 1 -1D8 1 -1D9 1 -1DA 1 -1DB 1 -1DC 1 -214 1 -215 1 -216 1 -217 1 -367 1 -289 1 -265 1 -2AE 1 -2AF 1 -19C 1 -26F 1 -270 1 -1B1 1 -28A 1 -56 1 -76 1 -36E 1 -1B2 1 -28B 1 -28C 1 -57 1 -77 1 -174 1 -175 1 -2B7 1 -28D 1 -58 1 -78 1 -2E3 1 -36F 1 -59 1 -79 1 -DD 1 -FD 1 -FF 1 -176 1 -177 1 -178 1 -232 1 -233 1 -2B8 1 -28F 1 -1B3 1 -1B4 1 -5A 1 -7A 1 -17D 1 -17E 1 -18D 1 -179 1 -17A 1 -17B 1 -17C 1 -1B5 1 -1B6 1 -224 1 -225 1 -290 1 -291 1 -1B7 1 -1EE 1 -1EF 1 -292 1 -1B8 1 -1B9 1 -1BA 1 -293 1 -21C 1 -21D 1 -DE 1 -FE 1 -1BF 1 -1F7 1 -1BB 1 -1A7 1 -1A8 1 -1BC 1 -1BD 1 -184 1 -185 1 -294 1 -2C0 1 -2BC 1 -149 1 -2EE 1 -2BE 1 -295 1 -2E4 1 -2BF 1 -2C1 1 -2A1 1 -2A2 1 -296 1 -1C0 1 -1C1 1 -1C2 1 -1C3 1 -297 1 -298 1 -2AC 1 -2AD 1 -386 1 -391 1 -3AC 1 -3B1 1 -392 1 -3B2 1 -3D0 1 -393 1 -3B3 1 -394 1 -3B4 1 -388 1 -395 1 -3AD 1 -3B5 1 -3F5 1 -3DC 1 -3DD 1 -3DA 1 -3DB 1 -396 1 -3B6 1 -389 1 -397 1 -3AE 1 -3B7 1 -398 1 -3B8 1 -3D1 1 -3F4 1 -37A 1 -38A 1 -390 1 -399 1 -3AA 1 -3AF 1 -3B9 1 -3CA 1 -3F3 1 -39A 1 -3BA 1 -3F0 1 -3D7 1 -39B 1 -3BB 1 -B5 1 -39C 1 -3BC 1 -39D 1 -3BD 1 -39E 1 -3BE 1 -38C 1 -39F 1 -3BF 1 -3CC 1 -3A0 1 -3C0 1 -3D6 1 -3DE 1 -3DF 1 -3D8 1 -3D9 1 -3A1 1 -3C1 1 -3F1 1 -3A3 1 -3C2 1 -3C3 1 -3F2 1 -3F9 1 -3A4 1 -3C4 1 -38E 1 -3A5 1 -3AB 1 -3B0 1 -3C5 1 -3CB 1 -3CD 1 -3D2 1 -3D3 1 -3D4 1 -3A6 1 -3C6 1 -3D5 1 -3A7 1 -3C7 1 -3A8 1 -3C8 1 -38F 1 -3A9 1 -3C9 1 -3CE 1 -3E0 1 -3E1 1 -3F7 1 -3F8 1 -3FA 1 -3FB 1 -3E2 1 -3E3 1 -3E4 1 -3E5 1 -3E6 1 -3E7 1 -3E8 1 -3E9 1 -3EA 1 -3EB 1 -3EC 1 -3ED 1 -3EE 1 -3EF 1 -410 1 -430 1 -4D0 1 -4D1 1 -4D2 1 -4D3 1 -4D8 1 -4D9 1 -4DA 1 -4DB 1 -4D4 1 -4D5 1 -411 1 -431 1 -412 1 -432 1 -413 1 -433 1 -490 1 -491 1 -492 1 -493 1 -494 1 -495 1 -414 1 -434 1 -500 1 -501 1 -402 1 -452 1 -502 1 -503 1 -403 1 -453 1 -498 1 -499 1 -400 1 -401 1 -415 1 -435 1 -450 1 -451 1 -4D6 1 -4D7 1 -404 1 -454 1 -416 1 -436 1 -4C1 1 -4C2 1 -4DC 1 -4DD 1 -496 1 -497 1 -417 1 -437 1 -504 1 -505 1 -4DE 1 -4DF 1 -405 1 -455 1 -4E0 1 -4E1 1 -506 1 -507 1 -40D 1 -418 1 -438 1 -45D 1 -4E2 1 -4E3 1 -48A 1 -48B 1 -4E4 1 -4E5 1 -406 1 -456 1 -407 1 -457 1 -419 1 -439 1 -408 1 -458 1 -41A 1 -43A 1 -49A 1 -49B 1 -4C3 1 -4C4 1 -4A0 1 -4A1 1 -49E 1 -49F 1 -49C 1 -49D 1 -41B 1 -43B 1 -4C5 1 -4C6 1 -409 1 -459 1 -508 1 -509 1 -41C 1 -43C 1 -4CD 1 -4CE 1 -41D 1 -43D 1 -4C9 1 -4CA 1 -4A2 1 -4A3 1 -4C7 1 -4C8 1 -4A4 1 -4A5 1 -40A 1 -45A 1 -50A 1 -50B 1 -41E 1 -43E 1 -4E6 1 -4E7 1 -4E8 1 -4E9 1 -4EA 1 -4EB 1 -41F 1 -43F 1 -4A6 1 -4A7 1 -480 1 -481 1 -420 1 -440 1 -48E 1 -48F 1 -421 1 -441 1 -50C 1 -50D 1 -4AA 1 -4AB 1 -422 1 -442 1 -50E 1 -50F 1 -4AC 1 -4AD 1 -40B 1 -45B 1 -40C 1 -45C 1 -423 1 -443 1 -4EE 1 -4EF 1 -40E 1 -45E 1 -4F0 1 -4F1 1 -4F2 1 -4F3 1 -4AE 1 -4AF 1 -4B0 1 -4B1 1 -478 1 -479 1 -424 1 -444 1 -425 1 -445 1 -4B2 1 -4B3 1 -4BA 1 -4BB 1 -460 1 -461 1 -47E 1 -47F 1 -47C 1 -47D 1 -47A 1 -47B 1 -426 1 -446 1 -4B4 1 -4B5 1 -427 1 -447 1 -4F4 1 -4F5 1 -4B6 1 -4B7 1 -4CB 1 -4CC 1 -4B8 1 -4B9 1 -4BC 1 -4BD 1 -4BE 1 -4BF 1 -40F 1 -45F 1 -428 1 -448 1 -429 1 -449 1 -42A 1 -44A 1 -42B 1 -44B 1 -4F8 1 -4F9 1 -42C 1 -44C 1 -48C 1 -48D 1 -462 1 -463 1 -42D 1 -44D 1 -4EC 1 -4ED 1 -42E 1 -44E 1 -42F 1 -44F 1 -464 1 -465 1 -466 1 -467 1 -46A 1 -46B 1 -468 1 -469 1 -46C 1 -46D 1 -46E 1 -46F 1 -470 1 -471 1 -472 1 -473 1 -474 1 -475 1 -476 1 -477 1 -4A8 1 -4A9 1 -4C0 1 -531 1 -561 1 -532 1 -562 1 -533 1 -563 1 -534 1 -564 1 -535 1 -565 1 -587 1 -536 1 -566 1 -537 1 -567 1 -538 1 -568 1 -539 1 -569 1 -53A 1 -56A 1 -53B 1 -56B 1 -53C 1 -56C 1 -53D 1 -56D 1 -53E 1 -56E 1 -53F 1 -56F 1 -540 1 -570 1 -541 1 -571 1 -542 1 -572 1 -543 1 -573 1 -544 1 -574 1 -545 1 -575 1 -546 1 -576 1 -547 1 -577 1 -548 1 -578 1 -549 1 -579 1 -54A 1 -57A 1 -54B 1 -57B 1 -54C 1 -57C 1 -54D 1 -57D 1 -54E 1 -57E 1 -54F 1 -57F 1 -550 1 -580 1 -551 1 -581 1 -552 1 -582 1 -553 1 -583 1 -554 1 -584 1 -555 1 -585 1 -556 1 -586 1 -559 1 -5D0 1 -5D1 1 -5D2 1 -5D3 1 -5D4 1 -5D5 1 -5F0 1 -5F1 1 -5D6 1 -5D7 1 -5D8 1 -5D9 1 -5F2 1 -5DA 1 -5DB 1 -5DC 1 -5DD 1 -5DE 1 -5DF 1 -5E0 1 -5E1 1 -5E2 1 -5E3 1 -5E4 1 -5E5 1 -5E6 1 -5E7 1 -5E8 1 -5E9 1 -5EA 1 -621 1 -674 1 -6FD 1 -622 1 -623 1 -672 1 -671 1 -624 1 -625 1 -673 1 -626 1 -627 1 -675 1 -66E 1 -628 1 -67B 1 -67E 1 -680 1 -629 1 -62A 1 -62B 1 -679 1 -67A 1 -67C 1 -67D 1 -67F 1 -62C 1 -683 1 -684 1 -686 1 -6BF 1 -687 1 -62D 1 -62E 1 -681 1 -682 1 -685 1 -62F 1 -630 1 -688 1 -689 1 -68A 1 -68B 1 -68C 1 -68D 1 -68E 1 -68F 1 -690 1 -6EE 1 -631 1 -632 1 -691 1 -692 1 -693 1 -694 1 -695 1 -696 1 -697 1 -698 1 -699 1 -6EF 1 -633 1 -634 1 -69A 1 -69B 1 -69C 1 -6FA 1 -635 1 -636 1 -69D 1 -69E 1 -6FB 1 -637 1 -638 1 -69F 1 -639 1 -63A 1 -6A0 1 -6FC 1 -641 1 -6A1 1 -6A2 1 -6A3 1 -6A4 1 -6A5 1 -6A6 1 -66F 1 -642 1 -6A7 1 -6A8 1 -643 1 -6A9 1 -6AA 1 -6AB 1 -6AC 1 -6AD 1 -6AE 1 -6AF 1 -6B0 1 -6B1 1 -6B2 1 -6B3 1 -6B4 1 -644 1 -6B5 1 -6B6 1 -6B7 1 -6B8 1 -645 1 -6FE 1 -646 1 -6BA 1 -6BB 1 -6BC 1 -6BD 1 -6B9 1 -647 1 -6BE 1 -6C1 1 -6C2 1 -6C3 1 -6FF 1 -6C0 1 -6D5 1 -648 1 -6E5 1 -676 1 -6C4 1 -6C5 1 -6C6 1 -6C7 1 -677 1 -6C8 1 -6C9 1 -6CA 1 -6CB 1 -6CF 1 -649 1 -64A 1 -6E6 1 -678 1 -6CC 1 -6CD 1 -6CE 1 -6D0 1 -6D1 1 -6D2 1 -6D3 1 -710 1 -712 1 -72D 1 -713 1 -714 1 -72E 1 -716 1 -715 1 -72F 1 -717 1 -718 1 -719 1 -74D 1 -71A 1 -71B 1 -71C 1 -71D 1 -71E 1 -71F 1 -74E 1 -720 1 -721 1 -722 1 -723 1 -724 1 -725 1 -726 1 -727 1 -74F 1 -728 1 -729 1 -72A 1 -72B 1 -72C 1 -780 1 -799 1 -79A 1 -781 1 -782 1 -783 1 -79C 1 -784 1 -785 1 -786 1 -787 1 -7A2 1 -7A3 1 -788 1 -7A5 1 -789 1 -78A 1 -78B 1 -79B 1 -78C 1 -798 1 -7A0 1 -7A1 1 -78D 1 -78E 1 -7A4 1 -78F 1 -790 1 -79D 1 -79E 1 -79F 1 -791 1 -792 1 -793 1 -794 1 -795 1 -796 1 -797 1 -7B1 1 -7A6 1 -7A7 1 -7A8 1 -7A9 1 -7AA 1 -7AB 1 -7AC 1 -7AD 1 -7AE 1 -7AF 1 -7B0 1 -4E00 1 -4E01 1 -4E02 1 -4E03 1 -4E04 1 -4E05 1 -4E06 1 -4E07 1 -4E08 1 -4E09 1 -4E0A 1 -4E0B 1 -4E0C 1 -4E0D 1 -4E0E 1 -4E0F 1 -4E10 1 -4E11 1 -4E12 1 -4E13 1 -4E14 1 -4E15 1 -4E16 1 -4E17 1 -4E18 1 -4E19 1 -4E1A 1 -4E1B 1 -4E1C 1 -4E1D 1 -4E1E 1 -4E1F 1 -4E20 1 -4E21 1 -4E22 1 -4E23 1 -4E24 1 -4E25 1 -4E26 1 -4E27 1 -4E28 1 -4E29 1 -4E2A 1 -4E2B 1 -4E2C 1 -4E2D 1 -4E2E 1 -4E2F 1 -4E30 1 -4E31 1 -4E32 1 -4E33 1 -4E34 1 -4E35 1 -4E36 1 -4E37 1 -4E38 1 -4E39 1 -4E3A 1 -4E3B 1 -4E3C 1 -4E3D 1 -4E3E 1 -4E3F 1 -4E40 1 -4E41 1 -4E42 1 -4E43 1 -4E44 1 -4E45 1 -4E46 1 -4E47 1 -4E48 1 -4E49 1 -4E4A 1 -4E4B 1 -4E4C 1 -4E4D 1 -4E4E 1 -4E4F 1 -4E50 1 -4E51 1 -4E52 1 -4E53 1 -4E54 1 -4E55 1 -4E56 1 -4E57 1 -4E58 1 -4E59 1 -4E5A 1 -4E5B 1 -4E5C 1 -4E5D 1 -4E5E 1 -4E5F 1 -4E60 1 -4E61 1 -4E62 1 -4E63 1 -4E64 1 -4E65 1 -4E66 1 -4E67 1 -4E68 1 -4E69 1 -4E6A 1 -4E6B 1 -4E6C 1 -4E6D 1 -4E6E 1 -4E6F 1 -4E70 1 -4E71 1 -4E72 1 -4E73 1 -4E74 1 -4E75 1 -4E76 1 -4E77 1 -4E78 1 -4E79 1 -4E7A 1 -4E7B 1 -4E7C 1 -4E7D 1 -4E7E 1 -4E7F 1 -4E80 1 -4E81 1 -4E82 1 -4E83 1 -4E84 1 -4E85 1 -4E86 1 -4E87 1 -4E88 1 -4E89 1 -4E8A 1 -4E8B 1 -4E8C 1 -4E8D 1 -4E8E 1 -4E8F 1 -4E90 1 -4E91 1 -4E92 1 -4E93 1 -4E94 1 -4E95 1 -4E96 1 -4E97 1 -4E98 1 -4E99 1 -4E9A 1 -4E9B 1 -4E9C 1 -4E9D 1 -4E9E 1 -4E9F 1 -4EA0 1 -4EA1 1 -4EA2 1 -4EA3 1 -4EA4 1 -4EA5 1 -4EA6 1 -4EA7 1 -4EA8 1 -4EA9 1 -4EAA 1 -4EAB 1 -4EAC 1 -4EAD 1 -4EAE 1 -4EAF 1 -4EB0 1 -4EB1 1 -4EB2 1 -4EB3 1 -4EB4 1 -4EB5 1 -4EB6 1 -4EB7 1 -4EB8 1 -4EB9 1 -4EBA 1 -4EBB 1 -4EBC 1 -4EBD 1 -4EBE 1 -4EBF 1 -4EC0 1 -4EC1 1 -4EC2 1 -4EC3 1 -4EC4 1 -4EC5 1 -4EC6 1 -4EC7 1 -4EC8 1 -4EC9 1 -4ECA 1 -4ECB 1 -4ECC 1 -4ECD 1 -4ECE 1 -4ECF 1 -4ED0 1 -4ED1 1 -4ED2 1 -4ED3 1 -4ED4 1 -4ED5 1 -4ED6 1 -4ED7 1 -4ED8 1 -4ED9 1 -4EDA 1 -4EDB 1 -4EDC 1 -4EDD 1 -4EDE 1 -4EDF 1 -4EE0 1 -4EE1 1 -4EE2 1 -4EE3 1 -4EE4 1 -4EE5 1 -4EE6 1 -4EE7 1 -4EE8 1 -4EE9 1 -4EEA 1 -4EEB 1 -4EEC 1 -4EED 1 -4EEE 1 -4EEF 1 -4EF0 1 -4EF1 1 -4EF2 1 -4EF3 1 -4EF4 1 -4EF5 1 -4EF6 1 -4EF7 1 -4EF8 1 -4EF9 1 -4EFA 1 -4EFB 1 -4EFC 1 -4EFD 1 -4EFE 1 -4EFF 1 -4F00 1 -4F01 1 -4F02 1 -4F03 1 -4F04 1 -4F05 1 -4F06 1 -4F07 1 -4F08 1 -4F09 1 -4F0A 1 -4F0B 1 -4F0C 1 -4F0D 1 -4F0E 1 -4F0F 1 -4F10 1 -4F11 1 -4F12 1 -4F13 1 -4F14 1 -4F15 1 -4F16 1 -4F17 1 -4F18 1 -4F19 1 -4F1A 1 -4F1B 1 -4F1C 1 -4F1D 1 -4F1E 1 -4F1F 1 -4F20 1 -4F21 1 -4F22 1 -4F23 1 -4F24 1 -4F25 1 -4F26 1 -4F27 1 -4F28 1 -4F29 1 -4F2A 1 -4F2B 1 -4F2C 1 -4F2D 1 -4F2E 1 -4F2F 1 -4F30 1 -4F31 1 -4F32 1 -4F33 1 -4F34 1 -4F35 1 -4F36 1 -4F37 1 -4F38 1 -4F39 1 -4F3A 1 -4F3B 1 -4F3C 1 -4F3D 1 -4F3E 1 -4F3F 1 -4F40 1 -4F41 1 -4F42 1 -4F43 1 -4F44 1 -4F45 1 -4F46 1 -4F47 1 -4F48 1 -4F49 1 -4F4A 1 -4F4B 1 -4F4C 1 -4F4D 1 -4F4E 1 -4F4F 1 -4F50 1 -4F51 1 -4F52 1 -4F53 1 -4F54 1 -4F55 1 -4F56 1 -4F57 1 -4F58 1 -4F59 1 -4F5A 1 -4F5B 1 -4F5C 1 -4F5D 1 -4F5E 1 -4F5F 1 -4F60 1 -4F61 1 -4F62 1 -4F63 1 -4F64 1 -4F65 1 -4F66 1 -4F67 1 -4F68 1 -4F69 1 -4F6A 1 -4F6B 1 -4F6C 1 -4F6D 1 -4F6E 1 -4F6F 1 -4F70 1 -4F71 1 -4F72 1 -4F73 1 -4F74 1 -4F75 1 -4F76 1 -4F77 1 -4F78 1 -4F79 1 -4F7A 1 -4F7B 1 -4F7C 1 -4F7D 1 -4F7E 1 -4F7F 1 -4F80 1 -4F81 1 -4F82 1 -4F83 1 -4F84 1 -4F85 1 -4F86 1 -4F87 1 -4F88 1 -4F89 1 -4F8A 1 -4F8B 1 -4F8C 1 -4F8D 1 -4F8E 1 -4F8F 1 -4F90 1 -4F91 1 -4F92 1 -4F93 1 -4F94 1 -4F95 1 -4F96 1 -4F97 1 -4F98 1 -4F99 1 -4F9A 1 -4F9B 1 -4F9C 1 -4F9D 1 -4F9E 1 -4F9F 1 -4FA0 1 -4FA1 1 -4FA2 1 -4FA3 1 -4FA4 1 -4FA5 1 -4FA6 1 -4FA7 1 -4FA8 1 -4FA9 1 -4FAA 1 -4FAB 1 -4FAC 1 -4FAD 1 -4FAE 1 -4FAF 1 -4FB0 1 -4FB1 1 -4FB2 1 -4FB3 1 -4FB4 1 -4FB5 1 -4FB6 1 -4FB7 1 -4FB8 1 -4FB9 1 -4FBA 1 -4FBB 1 -4FBC 1 -4FBD 1 -4FBE 1 -4FBF 1 -4FC0 1 -4FC1 1 -4FC2 1 -4FC3 1 -4FC4 1 -4FC5 1 -4FC6 1 -4FC7 1 -4FC8 1 -4FC9 1 -4FCA 1 -4FCB 1 -4FCC 1 -4FCD 1 -4FCE 1 -4FCF 1 -4FD0 1 -4FD1 1 -4FD2 1 -4FD3 1 -4FD4 1 -4FD5 1 -4FD6 1 -4FD7 1 -4FD8 1 -4FD9 1 -4FDA 1 -4FDB 1 -4FDC 1 -4FDD 1 -4FDE 1 -4FDF 1 -4FE0 1 -4FE1 1 -4FE2 1 -4FE3 1 -4FE4 1 -4FE5 1 -4FE6 1 -4FE7 1 -4FE8 1 -4FE9 1 -4FEA 1 -4FEB 1 -4FEC 1 -4FED 1 -4FEE 1 -4FEF 1 -4FF0 1 -4FF1 1 -4FF2 1 -4FF3 1 -4FF4 1 -4FF5 1 -4FF6 1 -4FF7 1 -4FF8 1 -4FF9 1 -4FFA 1 -4FFB 1 -4FFC 1 -4FFD 1 -4FFE 1 -4FFF 1 -237 1 -238 1 -239 1 -23A 1 -23B 1 -23C 1 -23D 1 -23E 1 -23F 1 -240 1 -241 1 -242 1 -243 1 -244 1 -245 1 -246 1 -247 1 -248 1 -249 1 -24A 1 -24B 1 -24C 1 -24D 1 -24E 1 -24F 1 -358 1 -359 1 -35A 1 -35B 1 -35C 1 -370 1 -371 1 -372 1 -373 1 -376 1 -377 1 -378 1 -379 1 -37B 1 -37C 1 -37D 1 -37F 1 -380 1 -381 1 -382 1 -383 1 -38B 1 -38D 1 -3A2 1 -3CF 1 -3FC 1 -3FD 1 -3FE 1 -3FF 1 -487 1 -4CF 1 -4F6 1 -4F7 1 -4FA 1 -4FB 1 -4FC 1 -4FD 1 -4FE 1 -4FF 1 -510 1 -511 1 -512 1 -513 1 -514 1 -515 1 -516 1 -517 1 -518 1 -519 1 -51A 1 -51B 1 -51C 1 -51D 1 -51E 1 -51F 1 -520 1 -521 1 -522 1 -523 1 -524 1 -525 1 -526 1 -527 1 -528 1 -529 1 -52A 1 -52B 1 -52C 1 -52D 1 -52E 1 -52F 1 -530 1 -557 1 -558 1 -560 1 -588 1 -58B 1 -58C 1 -58D 1 -58E 1 -58F 1 -590 1 -5A2 1 -5BA 1 -5C5 1 -5C6 1 -5C7 1 -5C8 1 -5C9 1 -5CA 1 -5CB 1 -5CC 1 -5CD 1 -5CE 1 -5CF 1 -5EB 1 -5EC 1 -5ED 1 -5EE 1 -5EF 1 -5F5 1 -5F6 1 -5F7 1 -5F8 1 -5F9 1 -5FA 1 -5FB 1 -5FC 1 -5FD 1 -5FE 1 -5FF 1 -604 1 -605 1 -606 1 -607 1 -608 1 -609 1 -60A 1 -60B 1 -616 1 -617 1 -618 1 -619 1 -61A 1 -61C 1 -61D 1 -61E 1 -620 1 -63B 1 -63C 1 -63D 1 -63E 1 -63F 1 -659 1 -65A 1 -65B 1 -65C 1 -65D 1 -65E 1 -65F 1 -70E 1 -74B 1 -74C 1 -750 1 -751 1 -752 1 -753 1 -754 1 -755 1 -756 1 -757 1 -758 1 -759 1 -75A 1 -75B 1 -75C 1 -75D 1 -75E 1 -75F 1 -760 1 -761 1 -762 1 -763 1 -764 1 -765 1 -766 1 -767 1 -768 1 -769 1 -76A 1 -76B 1 -76C 1 -76D 1 -76E 1 -76F 1 -770 1 -771 1 -772 1 -773 1 -774 1 -775 1 -776 1 -777 1 -778 1 -779 1 -77A 1 -77B 1 -77C 1 -77D 1 -77E 1 -77F 1 -7B2 1 -7B3 1 -7B4 1 -7B5 1 -7B6 1 -7B7 1 -7B8 1 -7B9 1 -7BA 1 -7BB 1 -7BC 1 -7BD 1 -7BE 1 -7BF 1 -7C0 1 -7C1 1 -7C2 1 -7C3 1 -7C4 1 -7C5 1 -7C6 1 -7C7 1 -7C8 1 -7C9 1 -7CA 1 -7CB 1 -7CC 1 -7CD 1 -7CE 1 -7CF 1 -7D0 1 -7D1 1 -7D2 1 -7D3 1 -7D4 1 -7D5 1 -7D6 1 -7D7 1 -7D8 1 -7D9 1 -7DA 1 -7DB 1 -7DC 1 -7DD 1 -7DE 1 -7DF 1 -7E0 1 -7E1 1 -7E2 1 -7E3 1 -7E4 1 -7E5 1 -7E6 1 -7E7 1 -7E8 1 -7E9 1 -7EA 1 -7EB 1 -7EC 1 -7ED 1 -7EE 1 -7EF 1 -7F0 1 -7F1 1 -7F2 1 -7F3 1 -7F4 1 -7F5 1 -7F6 1 -7F7 1 -7F8 1 -7F9 1 -7FA 1 -7FB 1 -7FC 1 -7FD 1 -7FE 1 -7FF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -SET NAMES utf8; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=NDB CHARACTER SET utf8; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_general_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_roman_ci; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -85 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -300 1 -301 1 -302 1 -303 1 -304 1 -305 1 -306 1 -307 1 -308 1 -309 1 -30A 1 -30B 1 -30C 1 -30D 1 -30E 1 -30F 1 -310 1 -311 1 -312 1 -313 1 -314 1 -315 1 -316 1 -317 1 -318 1 -319 1 -31A 1 -31B 1 -31C 1 -31D 1 -31E 1 -31F 1 -320 1 -321 1 -322 1 -323 1 -324 1 -325 1 -326 1 -327 1 -328 1 -329 1 -32A 1 -32B 1 -32C 1 -32D 1 -32E 1 -32F 1 -330 1 -331 1 -332 1 -333 1 -334 1 -335 1 -336 1 -337 1 -338 1 -339 1 -33A 1 -33B 1 -33C 1 -33D 1 -33E 1 -33F 1 -340 1 -341 1 -342 1 -343 1 -344 1 -345 1 -346 1 -347 1 -348 1 -349 1 -34A 1 -34B 1 -34C 1 -34D 1 -34E 1 -34F 1 -350 1 -351 1 -352 1 -353 1 -354 1 -355 1 -356 1 -357 1 -35D 1 -35E 1 -35F 1 -360 1 -361 1 -362 1 -483 1 -484 1 -485 1 -486 1 -488 1 -489 1 -591 1 -592 1 -593 1 -594 1 -595 1 -596 1 -597 1 -598 1 -599 1 -59A 1 -59B 1 -59C 1 -59D 1 -59E 1 -59F 1 -5A0 1 -5A1 1 -5A3 1 -5A4 1 -5A5 1 -5A6 1 -5A7 1 -5A8 1 -5A9 1 -5AA 1 -5AB 1 -5AC 1 -5AD 1 -5AE 1 -5AF 1 -5B0 1 -5B1 1 -5B2 1 -5B3 1 -5B4 1 -5B5 1 -5B6 1 -5B7 1 -5B8 1 -5B9 1 -5BB 1 -5BC 1 -5BD 1 -5BF 1 -5C1 1 -5C2 1 -5C4 1 -600 1 -601 1 -602 1 -603 1 -610 1 -611 1 -612 1 -613 1 -614 1 -615 1 -64B 1 -64C 1 -64D 1 -64E 1 -64F 1 -650 1 -651 1 -652 1 -653 1 -654 1 -655 1 -656 1 -657 1 -658 1 -670 1 -6D6 1 -6D7 1 -6D8 1 -6D9 1 -6DA 1 -6DB 1 -6DC 1 -6DD 1 -6DE 1 -6DF 1 -6E0 1 -6E1 1 -6E2 1 -6E3 1 -6E4 1 -6E7 1 -6E8 1 -6EA 1 -6EB 1 -6EC 1 -6ED 1 -70F 1 -711 1 -730 1 -731 1 -732 1 -733 1 -734 1 -735 1 -736 1 -737 1 -738 1 -739 1 -73A 1 -73B 1 -73C 1 -73D 1 -73E 1 -73F 1 -740 1 -741 1 -742 1 -743 1 -744 1 -745 1 -746 1 -747 1 -748 1 -749 1 -74A 1 -640 1 -60 1 -B4 1 -384 1 -2DC 1 -5E 1 -AF 1 -2D8 1 -2D9 1 -A8 1 -385 1 -2DA 1 -2DD 1 -B8 1 -2DB 1 -5F 1 -AD 1 -2D 1 -58A 1 -2C 1 -55D 1 -60C 1 -60D 1 -66B 1 -66C 1 -3B 1 -37E 1 -61B 1 -3A 1 -589 1 -703 1 -704 1 -705 1 -706 1 -707 1 -708 1 -21 1 -A1 1 -55C 1 -3F 1 -BF 1 -55E 1 -61F 1 -709 1 -2E 1 -6D4 1 -701 1 -702 1 -B7 1 -387 1 -700 1 -27 1 -22 1 -AB 1 -BB 1 -28 1 -29 1 -5B 1 -7B 1 -7D 1 -A7 1 -B6 1 -A9 1 -AE 1 -40 1 -2A 1 -66D 1 -2F 1 -26 1 -23 1 -25 1 -66A 1 -55A 1 -55B 1 -55F 1 -5BE 1 -5C0 1 -5C3 1 -5F3 1 -5F4 1 -70A 1 -70B 1 -70C 1 -70D 1 -2B9 1 -374 1 -375 1 -2BA 1 -2C2 1 -2C3 1 -2C4 1 -2C5 1 -2C6 1 -2C7 1 -2C8 1 -2C9 1 -2CA 1 -2CB 1 -2CC 1 -2CD 1 -2CE 1 -2CF 1 -2D2 1 -2D3 1 -2D4 1 -2D5 1 -2D6 1 -2D7 1 -2DE 1 -2DF 1 -2E5 1 -2E6 1 -2E7 1 -2E8 1 -2E9 1 -2EA 1 -2EB 1 -2EC 1 -2ED 1 -2EF 1 -2F0 1 -2F1 1 -2F2 1 -2F3 1 -2F4 1 -2F5 1 -2F6 1 -2F7 1 -2F8 1 -2F9 1 -2FA 1 -2FB 1 -2FC 1 -2FD 1 -2FE 1 -2FF 1 -B0 1 -482 1 -60E 1 -60F 1 -6E9 1 -3F6 1 -2B 1 -B1 1 -F7 1 -D7 1 -3C 1 -3D 1 -3E 1 -AC 1 -7C 1 -A6 1 -7E 1 -2D0 1 -2D1 1 -A4 1 -A2 1 -24 1 -A3 1 -A5 1 -30 1 -660 1 -6F0 1 -31 1 -B9 1 -661 1 -6F1 1 -BD 1 -BC 1 -32 1 -B2 1 -662 1 -6F2 1 -33 1 -B3 1 -663 1 -6F3 1 -BE 1 -34 1 -664 1 -6F4 1 -35 1 -665 1 -6F5 1 -36 1 -666 1 -6F6 1 -37 1 -667 1 -6F7 1 -38 1 -668 1 -6F8 1 -39 1 -669 1 -6F9 1 -41 1 -61 1 -AA 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -100 1 -101 1 -102 1 -103 1 -104 1 -105 1 -1CD 1 -1CE 1 -1DE 1 -1DF 1 -1E0 1 -1E1 1 -1FA 1 -1FB 1 -200 1 -201 1 -202 1 -203 1 -226 1 -227 1 -363 1 -C6 1 -E6 1 -1E2 1 -1E3 1 -1FC 1 -1FD 1 -250 1 -251 1 -252 1 -42 1 -62 1 -299 1 -180 1 -181 1 -253 1 -182 1 -183 1 -43 1 -63 1 -C7 1 -E7 1 -106 1 -107 1 -108 1 -109 1 -10A 1 -10B 1 -10C 1 -10D 1 -368 1 -187 1 -188 1 -255 1 -44 1 -64 1 -10E 1 -10F 1 -369 1 -1C4 1 -1C5 1 -1C6 1 -1F1 1 -1F2 1 -1F3 1 -2A3 1 -2A5 1 -2A4 1 -110 1 -111 1 -189 1 -256 1 -18A 1 -257 1 -18B 1 -18C 1 -221 1 -D0 1 -F0 1 -45 1 -65 1 -C8 1 -C9 1 -CA 1 -CB 1 -E8 1 -E9 1 -EA 1 -EB 1 -112 1 -113 1 -114 1 -115 1 -116 1 -117 1 -118 1 -119 1 -11A 1 -11B 1 -204 1 -205 1 -206 1 -207 1 -228 1 -229 1 -364 1 -18E 1 -1DD 1 -18F 1 -259 1 -190 1 -25B 1 -258 1 -25A 1 -25C 1 -25D 1 -25E 1 -29A 1 -264 1 -46 1 -66 1 -2A9 1 -191 1 -192 1 -47 1 -67 1 -11C 1 -11D 1 -11E 1 -11F 1 -120 1 -121 1 -122 1 -123 1 -1E6 1 -1E7 1 -1F4 1 -1F5 1 -261 1 -262 1 -1E4 1 -1E5 1 -193 1 -260 1 -29B 1 -194 1 -263 1 -2E0 1 -1A2 1 -1A3 1 -48 1 -68 1 -124 1 -125 1 -21E 1 -21F 1 -2B0 1 -36A 1 -29C 1 -195 1 -1F6 1 -126 1 -127 1 -266 1 -2B1 1 -267 1 -2BB 1 -2BD 1 -49 1 -4A 1 -69 1 -6A 1 -CC 1 -CD 1 -CE 1 -CF 1 -EC 1 -ED 1 -EE 1 -EF 1 -128 1 -129 1 -12A 1 -12B 1 -12C 1 -12D 1 -12E 1 -12F 1 -130 1 -1CF 1 -1D0 1 -208 1 -209 1 -20A 1 -20B 1 -365 1 -132 1 -133 1 -131 1 -26A 1 -197 1 -268 1 -196 1 -269 1 -134 1 -135 1 -1F0 1 -2B2 1 -29D 1 -25F 1 -284 1 -4B 1 -6B 1 -136 1 -137 1 -1E8 1 -1E9 1 -198 1 -199 1 -29E 1 -4C 1 -6C 1 -139 1 -13A 1 -13B 1 -13C 1 -13D 1 -13E 1 -2E1 1 -13F 1 -140 1 -1C7 1 -1C8 1 -1C9 1 -2AA 1 -2AB 1 -29F 1 -141 1 -142 1 -19A 1 -26B 1 -26C 1 -26D 1 -234 1 -26E 1 -19B 1 -28E 1 -4D 1 -6D 1 -36B 1 -271 1 -4E 1 -6E 1 -D1 1 -F1 1 -143 1 -144 1 -145 1 -146 1 -147 1 -148 1 -1F8 1 -1F9 1 -1CA 1 -1CB 1 -1CC 1 -274 1 -19D 1 -272 1 -19E 1 -220 1 -273 1 -235 1 -14A 1 -14B 1 -4F 1 -6F 1 -BA 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -14C 1 -14D 1 -14E 1 -14F 1 -150 1 -151 1 -1A0 1 -1A1 1 -1D1 1 -1D2 1 -1EA 1 -1EB 1 -1EC 1 -1ED 1 -20C 1 -20D 1 -20E 1 -20F 1 -22A 1 -22B 1 -22C 1 -22D 1 -22E 1 -22F 1 -230 1 -231 1 -366 1 -152 1 -153 1 -276 1 -D8 1 -F8 1 -1FE 1 -1FF 1 -186 1 -254 1 -19F 1 -275 1 -277 1 -222 1 -223 1 -50 1 -70 1 -1A4 1 -1A5 1 -278 1 -51 1 -71 1 -2A0 1 -138 1 -52 1 -72 1 -154 1 -155 1 -156 1 -157 1 -158 1 -159 1 -210 1 -211 1 -212 1 -213 1 -2B3 1 -36C 1 -1A6 1 -280 1 -279 1 -2B4 1 -27A 1 -27B 1 -2B5 1 -27C 1 -27D 1 -27E 1 -27F 1 -281 1 -2B6 1 -53 1 -73 1 -15A 1 -15B 1 -15C 1 -15D 1 -15E 1 -15F 1 -160 1 -161 1 -17F 1 -218 1 -219 1 -2E2 1 -DF 1 -282 1 -1A9 1 -283 1 -1AA 1 -285 1 -286 1 -54 1 -74 1 -162 1 -163 1 -164 1 -165 1 -21A 1 -21B 1 -36D 1 -2A8 1 -1BE 1 -2A6 1 -2A7 1 -166 1 -167 1 -1AB 1 -1AC 1 -1AD 1 -1AE 1 -288 1 -236 1 -287 1 -D9 1 -DA 1 -DB 1 -DC 1 -F9 1 -FA 1 -FB 1 -FC 1 -168 1 -169 1 -16A 1 -16B 1 -16C 1 -16D 1 -16E 1 -16F 1 -170 1 -171 1 -172 1 -173 1 -1AF 1 -1B0 1 -1D3 1 -1D4 1 -1D5 1 -1D6 1 -1D7 1 -1D8 1 -1D9 1 -1DA 1 -1DB 1 -1DC 1 -214 1 -215 1 -216 1 -217 1 -367 1 -289 1 -265 1 -2AE 1 -2AF 1 -19C 1 -26F 1 -270 1 -1B1 1 -28A 1 -55 1 -56 1 -75 1 -76 1 -36E 1 -1B2 1 -28B 1 -28C 1 -57 1 -77 1 -174 1 -175 1 -2B7 1 -28D 1 -58 1 -78 1 -2E3 1 -36F 1 -59 1 -79 1 -DD 1 -FD 1 -FF 1 -176 1 -177 1 -178 1 -232 1 -233 1 -2B8 1 -28F 1 -1B3 1 -1B4 1 -5A 1 -7A 1 -179 1 -17A 1 -17B 1 -17C 1 -17D 1 -17E 1 -18D 1 -1B5 1 -1B6 1 -224 1 -225 1 -290 1 -291 1 -1B7 1 -1EE 1 -1EF 1 -292 1 -1B8 1 -1B9 1 -1BA 1 -293 1 -21C 1 -21D 1 -DE 1 -FE 1 -1BF 1 -1F7 1 -1BB 1 -1A7 1 -1A8 1 -1BC 1 -1BD 1 -184 1 -185 1 -294 1 -2C0 1 -2BC 1 -149 1 -2EE 1 -2BE 1 -295 1 -2E4 1 -2BF 1 -2C1 1 -2A1 1 -2A2 1 -296 1 -1C0 1 -1C1 1 -1C2 1 -1C3 1 -297 1 -298 1 -2AC 1 -2AD 1 -386 1 -391 1 -3AC 1 -3B1 1 -392 1 -3B2 1 -3D0 1 -393 1 -3B3 1 -394 1 -3B4 1 -388 1 -395 1 -3AD 1 -3B5 1 -3F5 1 -3DC 1 -3DD 1 -3DA 1 -3DB 1 -396 1 -3B6 1 -389 1 -397 1 -3AE 1 -3B7 1 -398 1 -3B8 1 -3D1 1 -3F4 1 -37A 1 -38A 1 -390 1 -399 1 -3AA 1 -3AF 1 -3B9 1 -3CA 1 -3F3 1 -39A 1 -3BA 1 -3F0 1 -3D7 1 -39B 1 -3BB 1 -B5 1 -39C 1 -3BC 1 -39D 1 -3BD 1 -39E 1 -3BE 1 -38C 1 -39F 1 -3BF 1 -3CC 1 -3A0 1 -3C0 1 -3D6 1 -3DE 1 -3DF 1 -3D8 1 -3D9 1 -3A1 1 -3C1 1 -3F1 1 -3A3 1 -3C2 1 -3C3 1 -3F2 1 -3F9 1 -3A4 1 -3C4 1 -38E 1 -3A5 1 -3AB 1 -3B0 1 -3C5 1 -3CB 1 -3CD 1 -3D2 1 -3D3 1 -3D4 1 -3A6 1 -3C6 1 -3D5 1 -3A7 1 -3C7 1 -3A8 1 -3C8 1 -38F 1 -3A9 1 -3C9 1 -3CE 1 -3E0 1 -3E1 1 -3F7 1 -3F8 1 -3FA 1 -3FB 1 -3E2 1 -3E3 1 -3E4 1 -3E5 1 -3E6 1 -3E7 1 -3E8 1 -3E9 1 -3EA 1 -3EB 1 -3EC 1 -3ED 1 -3EE 1 -3EF 1 -410 1 -430 1 -4D0 1 -4D1 1 -4D2 1 -4D3 1 -4D8 1 -4D9 1 -4DA 1 -4DB 1 -4D4 1 -4D5 1 -411 1 -431 1 -412 1 -432 1 -413 1 -433 1 -490 1 -491 1 -492 1 -493 1 -494 1 -495 1 -414 1 -434 1 -500 1 -501 1 -402 1 -452 1 -502 1 -503 1 -403 1 -453 1 -498 1 -499 1 -400 1 -401 1 -415 1 -435 1 -450 1 -451 1 -4D6 1 -4D7 1 -404 1 -454 1 -416 1 -436 1 -4C1 1 -4C2 1 -4DC 1 -4DD 1 -496 1 -497 1 -417 1 -437 1 -504 1 -505 1 -4DE 1 -4DF 1 -405 1 -455 1 -4E0 1 -4E1 1 -506 1 -507 1 -40D 1 -418 1 -438 1 -45D 1 -4E2 1 -4E3 1 -48A 1 -48B 1 -4E4 1 -4E5 1 -406 1 -456 1 -407 1 -457 1 -419 1 -439 1 -408 1 -458 1 -41A 1 -43A 1 -49A 1 -49B 1 -4C3 1 -4C4 1 -4A0 1 -4A1 1 -49E 1 -49F 1 -49C 1 -49D 1 -41B 1 -43B 1 -4C5 1 -4C6 1 -409 1 -459 1 -508 1 -509 1 -41C 1 -43C 1 -4CD 1 -4CE 1 -41D 1 -43D 1 -4C9 1 -4CA 1 -4A2 1 -4A3 1 -4C7 1 -4C8 1 -4A4 1 -4A5 1 -40A 1 -45A 1 -50A 1 -50B 1 -41E 1 -43E 1 -4E6 1 -4E7 1 -4E8 1 -4E9 1 -4EA 1 -4EB 1 -41F 1 -43F 1 -4A6 1 -4A7 1 -480 1 -481 1 -420 1 -440 1 -48E 1 -48F 1 -421 1 -441 1 -50C 1 -50D 1 -4AA 1 -4AB 1 -422 1 -442 1 -50E 1 -50F 1 -4AC 1 -4AD 1 -40B 1 -45B 1 -40C 1 -45C 1 -423 1 -443 1 -4EE 1 -4EF 1 -40E 1 -45E 1 -4F0 1 -4F1 1 -4F2 1 -4F3 1 -4AE 1 -4AF 1 -4B0 1 -4B1 1 -478 1 -479 1 -424 1 -444 1 -425 1 -445 1 -4B2 1 -4B3 1 -4BA 1 -4BB 1 -460 1 -461 1 -47E 1 -47F 1 -47C 1 -47D 1 -47A 1 -47B 1 -426 1 -446 1 -4B4 1 -4B5 1 -427 1 -447 1 -4F4 1 -4F5 1 -4B6 1 -4B7 1 -4CB 1 -4CC 1 -4B8 1 -4B9 1 -4BC 1 -4BD 1 -4BE 1 -4BF 1 -40F 1 -45F 1 -428 1 -448 1 -429 1 -449 1 -42A 1 -44A 1 -42B 1 -44B 1 -4F8 1 -4F9 1 -42C 1 -44C 1 -48C 1 -48D 1 -462 1 -463 1 -42D 1 -44D 1 -4EC 1 -4ED 1 -42E 1 -44E 1 -42F 1 -44F 1 -464 1 -465 1 -466 1 -467 1 -46A 1 -46B 1 -468 1 -469 1 -46C 1 -46D 1 -46E 1 -46F 1 -470 1 -471 1 -472 1 -473 1 -474 1 -475 1 -476 1 -477 1 -4A8 1 -4A9 1 -4C0 1 -531 1 -561 1 -532 1 -562 1 -533 1 -563 1 -534 1 -564 1 -535 1 -565 1 -587 1 -536 1 -566 1 -537 1 -567 1 -538 1 -568 1 -539 1 -569 1 -53A 1 -56A 1 -53B 1 -56B 1 -53C 1 -56C 1 -53D 1 -56D 1 -53E 1 -56E 1 -53F 1 -56F 1 -540 1 -570 1 -541 1 -571 1 -542 1 -572 1 -543 1 -573 1 -544 1 -574 1 -545 1 -575 1 -546 1 -576 1 -547 1 -577 1 -548 1 -578 1 -549 1 -579 1 -54A 1 -57A 1 -54B 1 -57B 1 -54C 1 -57C 1 -54D 1 -57D 1 -54E 1 -57E 1 -54F 1 -57F 1 -550 1 -580 1 -551 1 -581 1 -552 1 -582 1 -553 1 -583 1 -554 1 -584 1 -555 1 -585 1 -556 1 -586 1 -559 1 -5D0 1 -5D1 1 -5D2 1 -5D3 1 -5D4 1 -5D5 1 -5F0 1 -5F1 1 -5D6 1 -5D7 1 -5D8 1 -5D9 1 -5F2 1 -5DA 1 -5DB 1 -5DC 1 -5DD 1 -5DE 1 -5DF 1 -5E0 1 -5E1 1 -5E2 1 -5E3 1 -5E4 1 -5E5 1 -5E6 1 -5E7 1 -5E8 1 -5E9 1 -5EA 1 -621 1 -674 1 -6FD 1 -622 1 -623 1 -672 1 -671 1 -624 1 -625 1 -673 1 -626 1 -627 1 -675 1 -66E 1 -628 1 -67B 1 -67E 1 -680 1 -629 1 -62A 1 -62B 1 -679 1 -67A 1 -67C 1 -67D 1 -67F 1 -62C 1 -683 1 -684 1 -686 1 -6BF 1 -687 1 -62D 1 -62E 1 -681 1 -682 1 -685 1 -62F 1 -630 1 -688 1 -689 1 -68A 1 -68B 1 -68C 1 -68D 1 -68E 1 -68F 1 -690 1 -6EE 1 -631 1 -632 1 -691 1 -692 1 -693 1 -694 1 -695 1 -696 1 -697 1 -698 1 -699 1 -6EF 1 -633 1 -634 1 -69A 1 -69B 1 -69C 1 -6FA 1 -635 1 -636 1 -69D 1 -69E 1 -6FB 1 -637 1 -638 1 -69F 1 -639 1 -63A 1 -6A0 1 -6FC 1 -641 1 -6A1 1 -6A2 1 -6A3 1 -6A4 1 -6A5 1 -6A6 1 -66F 1 -642 1 -6A7 1 -6A8 1 -643 1 -6A9 1 -6AA 1 -6AB 1 -6AC 1 -6AD 1 -6AE 1 -6AF 1 -6B0 1 -6B1 1 -6B2 1 -6B3 1 -6B4 1 -644 1 -6B5 1 -6B6 1 -6B7 1 -6B8 1 -645 1 -6FE 1 -646 1 -6BA 1 -6BB 1 -6BC 1 -6BD 1 -6B9 1 -647 1 -6BE 1 -6C1 1 -6C2 1 -6C3 1 -6FF 1 -6C0 1 -6D5 1 -648 1 -6E5 1 -676 1 -6C4 1 -6C5 1 -6C6 1 -6C7 1 -677 1 -6C8 1 -6C9 1 -6CA 1 -6CB 1 -6CF 1 -649 1 -64A 1 -6E6 1 -678 1 -6CC 1 -6CD 1 -6CE 1 -6D0 1 -6D1 1 -6D2 1 -6D3 1 -710 1 -712 1 -72D 1 -713 1 -714 1 -72E 1 -716 1 -715 1 -72F 1 -717 1 -718 1 -719 1 -74D 1 -71A 1 -71B 1 -71C 1 -71D 1 -71E 1 -71F 1 -74E 1 -720 1 -721 1 -722 1 -723 1 -724 1 -725 1 -726 1 -727 1 -74F 1 -728 1 -729 1 -72A 1 -72B 1 -72C 1 -780 1 -799 1 -79A 1 -781 1 -782 1 -783 1 -79C 1 -784 1 -785 1 -786 1 -787 1 -7A2 1 -7A3 1 -788 1 -7A5 1 -789 1 -78A 1 -78B 1 -79B 1 -78C 1 -798 1 -7A0 1 -7A1 1 -78D 1 -78E 1 -7A4 1 -78F 1 -790 1 -79D 1 -79E 1 -79F 1 -791 1 -792 1 -793 1 -794 1 -795 1 -796 1 -797 1 -7B1 1 -7A6 1 -7A7 1 -7A8 1 -7A9 1 -7AA 1 -7AB 1 -7AC 1 -7AD 1 -7AE 1 -7AF 1 -7B0 1 -4E00 1 -4E01 1 -4E02 1 -4E03 1 -4E04 1 -4E05 1 -4E06 1 -4E07 1 -4E08 1 -4E09 1 -4E0A 1 -4E0B 1 -4E0C 1 -4E0D 1 -4E0E 1 -4E0F 1 -4E10 1 -4E11 1 -4E12 1 -4E13 1 -4E14 1 -4E15 1 -4E16 1 -4E17 1 -4E18 1 -4E19 1 -4E1A 1 -4E1B 1 -4E1C 1 -4E1D 1 -4E1E 1 -4E1F 1 -4E20 1 -4E21 1 -4E22 1 -4E23 1 -4E24 1 -4E25 1 -4E26 1 -4E27 1 -4E28 1 -4E29 1 -4E2A 1 -4E2B 1 -4E2C 1 -4E2D 1 -4E2E 1 -4E2F 1 -4E30 1 -4E31 1 -4E32 1 -4E33 1 -4E34 1 -4E35 1 -4E36 1 -4E37 1 -4E38 1 -4E39 1 -4E3A 1 -4E3B 1 -4E3C 1 -4E3D 1 -4E3E 1 -4E3F 1 -4E40 1 -4E41 1 -4E42 1 -4E43 1 -4E44 1 -4E45 1 -4E46 1 -4E47 1 -4E48 1 -4E49 1 -4E4A 1 -4E4B 1 -4E4C 1 -4E4D 1 -4E4E 1 -4E4F 1 -4E50 1 -4E51 1 -4E52 1 -4E53 1 -4E54 1 -4E55 1 -4E56 1 -4E57 1 -4E58 1 -4E59 1 -4E5A 1 -4E5B 1 -4E5C 1 -4E5D 1 -4E5E 1 -4E5F 1 -4E60 1 -4E61 1 -4E62 1 -4E63 1 -4E64 1 -4E65 1 -4E66 1 -4E67 1 -4E68 1 -4E69 1 -4E6A 1 -4E6B 1 -4E6C 1 -4E6D 1 -4E6E 1 -4E6F 1 -4E70 1 -4E71 1 -4E72 1 -4E73 1 -4E74 1 -4E75 1 -4E76 1 -4E77 1 -4E78 1 -4E79 1 -4E7A 1 -4E7B 1 -4E7C 1 -4E7D 1 -4E7E 1 -4E7F 1 -4E80 1 -4E81 1 -4E82 1 -4E83 1 -4E84 1 -4E85 1 -4E86 1 -4E87 1 -4E88 1 -4E89 1 -4E8A 1 -4E8B 1 -4E8C 1 -4E8D 1 -4E8E 1 -4E8F 1 -4E90 1 -4E91 1 -4E92 1 -4E93 1 -4E94 1 -4E95 1 -4E96 1 -4E97 1 -4E98 1 -4E99 1 -4E9A 1 -4E9B 1 -4E9C 1 -4E9D 1 -4E9E 1 -4E9F 1 -4EA0 1 -4EA1 1 -4EA2 1 -4EA3 1 -4EA4 1 -4EA5 1 -4EA6 1 -4EA7 1 -4EA8 1 -4EA9 1 -4EAA 1 -4EAB 1 -4EAC 1 -4EAD 1 -4EAE 1 -4EAF 1 -4EB0 1 -4EB1 1 -4EB2 1 -4EB3 1 -4EB4 1 -4EB5 1 -4EB6 1 -4EB7 1 -4EB8 1 -4EB9 1 -4EBA 1 -4EBB 1 -4EBC 1 -4EBD 1 -4EBE 1 -4EBF 1 -4EC0 1 -4EC1 1 -4EC2 1 -4EC3 1 -4EC4 1 -4EC5 1 -4EC6 1 -4EC7 1 -4EC8 1 -4EC9 1 -4ECA 1 -4ECB 1 -4ECC 1 -4ECD 1 -4ECE 1 -4ECF 1 -4ED0 1 -4ED1 1 -4ED2 1 -4ED3 1 -4ED4 1 -4ED5 1 -4ED6 1 -4ED7 1 -4ED8 1 -4ED9 1 -4EDA 1 -4EDB 1 -4EDC 1 -4EDD 1 -4EDE 1 -4EDF 1 -4EE0 1 -4EE1 1 -4EE2 1 -4EE3 1 -4EE4 1 -4EE5 1 -4EE6 1 -4EE7 1 -4EE8 1 -4EE9 1 -4EEA 1 -4EEB 1 -4EEC 1 -4EED 1 -4EEE 1 -4EEF 1 -4EF0 1 -4EF1 1 -4EF2 1 -4EF3 1 -4EF4 1 -4EF5 1 -4EF6 1 -4EF7 1 -4EF8 1 -4EF9 1 -4EFA 1 -4EFB 1 -4EFC 1 -4EFD 1 -4EFE 1 -4EFF 1 -4F00 1 -4F01 1 -4F02 1 -4F03 1 -4F04 1 -4F05 1 -4F06 1 -4F07 1 -4F08 1 -4F09 1 -4F0A 1 -4F0B 1 -4F0C 1 -4F0D 1 -4F0E 1 -4F0F 1 -4F10 1 -4F11 1 -4F12 1 -4F13 1 -4F14 1 -4F15 1 -4F16 1 -4F17 1 -4F18 1 -4F19 1 -4F1A 1 -4F1B 1 -4F1C 1 -4F1D 1 -4F1E 1 -4F1F 1 -4F20 1 -4F21 1 -4F22 1 -4F23 1 -4F24 1 -4F25 1 -4F26 1 -4F27 1 -4F28 1 -4F29 1 -4F2A 1 -4F2B 1 -4F2C 1 -4F2D 1 -4F2E 1 -4F2F 1 -4F30 1 -4F31 1 -4F32 1 -4F33 1 -4F34 1 -4F35 1 -4F36 1 -4F37 1 -4F38 1 -4F39 1 -4F3A 1 -4F3B 1 -4F3C 1 -4F3D 1 -4F3E 1 -4F3F 1 -4F40 1 -4F41 1 -4F42 1 -4F43 1 -4F44 1 -4F45 1 -4F46 1 -4F47 1 -4F48 1 -4F49 1 -4F4A 1 -4F4B 1 -4F4C 1 -4F4D 1 -4F4E 1 -4F4F 1 -4F50 1 -4F51 1 -4F52 1 -4F53 1 -4F54 1 -4F55 1 -4F56 1 -4F57 1 -4F58 1 -4F59 1 -4F5A 1 -4F5B 1 -4F5C 1 -4F5D 1 -4F5E 1 -4F5F 1 -4F60 1 -4F61 1 -4F62 1 -4F63 1 -4F64 1 -4F65 1 -4F66 1 -4F67 1 -4F68 1 -4F69 1 -4F6A 1 -4F6B 1 -4F6C 1 -4F6D 1 -4F6E 1 -4F6F 1 -4F70 1 -4F71 1 -4F72 1 -4F73 1 -4F74 1 -4F75 1 -4F76 1 -4F77 1 -4F78 1 -4F79 1 -4F7A 1 -4F7B 1 -4F7C 1 -4F7D 1 -4F7E 1 -4F7F 1 -4F80 1 -4F81 1 -4F82 1 -4F83 1 -4F84 1 -4F85 1 -4F86 1 -4F87 1 -4F88 1 -4F89 1 -4F8A 1 -4F8B 1 -4F8C 1 -4F8D 1 -4F8E 1 -4F8F 1 -4F90 1 -4F91 1 -4F92 1 -4F93 1 -4F94 1 -4F95 1 -4F96 1 -4F97 1 -4F98 1 -4F99 1 -4F9A 1 -4F9B 1 -4F9C 1 -4F9D 1 -4F9E 1 -4F9F 1 -4FA0 1 -4FA1 1 -4FA2 1 -4FA3 1 -4FA4 1 -4FA5 1 -4FA6 1 -4FA7 1 -4FA8 1 -4FA9 1 -4FAA 1 -4FAB 1 -4FAC 1 -4FAD 1 -4FAE 1 -4FAF 1 -4FB0 1 -4FB1 1 -4FB2 1 -4FB3 1 -4FB4 1 -4FB5 1 -4FB6 1 -4FB7 1 -4FB8 1 -4FB9 1 -4FBA 1 -4FBB 1 -4FBC 1 -4FBD 1 -4FBE 1 -4FBF 1 -4FC0 1 -4FC1 1 -4FC2 1 -4FC3 1 -4FC4 1 -4FC5 1 -4FC6 1 -4FC7 1 -4FC8 1 -4FC9 1 -4FCA 1 -4FCB 1 -4FCC 1 -4FCD 1 -4FCE 1 -4FCF 1 -4FD0 1 -4FD1 1 -4FD2 1 -4FD3 1 -4FD4 1 -4FD5 1 -4FD6 1 -4FD7 1 -4FD8 1 -4FD9 1 -4FDA 1 -4FDB 1 -4FDC 1 -4FDD 1 -4FDE 1 -4FDF 1 -4FE0 1 -4FE1 1 -4FE2 1 -4FE3 1 -4FE4 1 -4FE5 1 -4FE6 1 -4FE7 1 -4FE8 1 -4FE9 1 -4FEA 1 -4FEB 1 -4FEC 1 -4FED 1 -4FEE 1 -4FEF 1 -4FF0 1 -4FF1 1 -4FF2 1 -4FF3 1 -4FF4 1 -4FF5 1 -4FF6 1 -4FF7 1 -4FF8 1 -4FF9 1 -4FFA 1 -4FFB 1 -4FFC 1 -4FFD 1 -4FFE 1 -4FFF 1 -237 1 -238 1 -239 1 -23A 1 -23B 1 -23C 1 -23D 1 -23E 1 -23F 1 -240 1 -241 1 -242 1 -243 1 -244 1 -245 1 -246 1 -247 1 -248 1 -249 1 -24A 1 -24B 1 -24C 1 -24D 1 -24E 1 -24F 1 -358 1 -359 1 -35A 1 -35B 1 -35C 1 -370 1 -371 1 -372 1 -373 1 -376 1 -377 1 -378 1 -379 1 -37B 1 -37C 1 -37D 1 -37F 1 -380 1 -381 1 -382 1 -383 1 -38B 1 -38D 1 -3A2 1 -3CF 1 -3FC 1 -3FD 1 -3FE 1 -3FF 1 -487 1 -4CF 1 -4F6 1 -4F7 1 -4FA 1 -4FB 1 -4FC 1 -4FD 1 -4FE 1 -4FF 1 -510 1 -511 1 -512 1 -513 1 -514 1 -515 1 -516 1 -517 1 -518 1 -519 1 -51A 1 -51B 1 -51C 1 -51D 1 -51E 1 -51F 1 -520 1 -521 1 -522 1 -523 1 -524 1 -525 1 -526 1 -527 1 -528 1 -529 1 -52A 1 -52B 1 -52C 1 -52D 1 -52E 1 -52F 1 -530 1 -557 1 -558 1 -560 1 -588 1 -58B 1 -58C 1 -58D 1 -58E 1 -58F 1 -590 1 -5A2 1 -5BA 1 -5C5 1 -5C6 1 -5C7 1 -5C8 1 -5C9 1 -5CA 1 -5CB 1 -5CC 1 -5CD 1 -5CE 1 -5CF 1 -5EB 1 -5EC 1 -5ED 1 -5EE 1 -5EF 1 -5F5 1 -5F6 1 -5F7 1 -5F8 1 -5F9 1 -5FA 1 -5FB 1 -5FC 1 -5FD 1 -5FE 1 -5FF 1 -604 1 -605 1 -606 1 -607 1 -608 1 -609 1 -60A 1 -60B 1 -616 1 -617 1 -618 1 -619 1 -61A 1 -61C 1 -61D 1 -61E 1 -620 1 -63B 1 -63C 1 -63D 1 -63E 1 -63F 1 -659 1 -65A 1 -65B 1 -65C 1 -65D 1 -65E 1 -65F 1 -70E 1 -74B 1 -74C 1 -750 1 -751 1 -752 1 -753 1 -754 1 -755 1 -756 1 -757 1 -758 1 -759 1 -75A 1 -75B 1 -75C 1 -75D 1 -75E 1 -75F 1 -760 1 -761 1 -762 1 -763 1 -764 1 -765 1 -766 1 -767 1 -768 1 -769 1 -76A 1 -76B 1 -76C 1 -76D 1 -76E 1 -76F 1 -770 1 -771 1 -772 1 -773 1 -774 1 -775 1 -776 1 -777 1 -778 1 -779 1 -77A 1 -77B 1 -77C 1 -77D 1 -77E 1 -77F 1 -7B2 1 -7B3 1 -7B4 1 -7B5 1 -7B6 1 -7B7 1 -7B8 1 -7B9 1 -7BA 1 -7BB 1 -7BC 1 -7BD 1 -7BE 1 -7BF 1 -7C0 1 -7C1 1 -7C2 1 -7C3 1 -7C4 1 -7C5 1 -7C6 1 -7C7 1 -7C8 1 -7C9 1 -7CA 1 -7CB 1 -7CC 1 -7CD 1 -7CE 1 -7CF 1 -7D0 1 -7D1 1 -7D2 1 -7D3 1 -7D4 1 -7D5 1 -7D6 1 -7D7 1 -7D8 1 -7D9 1 -7DA 1 -7DB 1 -7DC 1 -7DD 1 -7DE 1 -7DF 1 -7E0 1 -7E1 1 -7E2 1 -7E3 1 -7E4 1 -7E5 1 -7E6 1 -7E7 1 -7E8 1 -7E9 1 -7EA 1 -7EB 1 -7EC 1 -7ED 1 -7EE 1 -7EF 1 -7F0 1 -7F1 1 -7F2 1 -7F3 1 -7F4 1 -7F5 1 -7F6 1 -7F7 1 -7F8 1 -7F9 1 -7FA 1 -7FB 1 -7FC 1 -7FD 1 -7FE 1 -7FF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -SET NAMES utf8; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=NDB CHARACTER SET utf8; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_general_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_romanian_ci; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -85 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -300 1 -301 1 -302 1 -303 1 -304 1 -305 1 -306 1 -307 1 -308 1 -309 1 -30A 1 -30B 1 -30C 1 -30D 1 -30E 1 -30F 1 -310 1 -311 1 -312 1 -313 1 -314 1 -315 1 -316 1 -317 1 -318 1 -319 1 -31A 1 -31B 1 -31C 1 -31D 1 -31E 1 -31F 1 -320 1 -321 1 -322 1 -323 1 -324 1 -325 1 -326 1 -327 1 -328 1 -329 1 -32A 1 -32B 1 -32C 1 -32D 1 -32E 1 -32F 1 -330 1 -331 1 -332 1 -333 1 -334 1 -335 1 -336 1 -337 1 -338 1 -339 1 -33A 1 -33B 1 -33C 1 -33D 1 -33E 1 -33F 1 -340 1 -341 1 -342 1 -343 1 -344 1 -345 1 -346 1 -347 1 -348 1 -349 1 -34A 1 -34B 1 -34C 1 -34D 1 -34E 1 -34F 1 -350 1 -351 1 -352 1 -353 1 -354 1 -355 1 -356 1 -357 1 -35D 1 -35E 1 -35F 1 -360 1 -361 1 -362 1 -483 1 -484 1 -485 1 -486 1 -488 1 -489 1 -591 1 -592 1 -593 1 -594 1 -595 1 -596 1 -597 1 -598 1 -599 1 -59A 1 -59B 1 -59C 1 -59D 1 -59E 1 -59F 1 -5A0 1 -5A1 1 -5A3 1 -5A4 1 -5A5 1 -5A6 1 -5A7 1 -5A8 1 -5A9 1 -5AA 1 -5AB 1 -5AC 1 -5AD 1 -5AE 1 -5AF 1 -5B0 1 -5B1 1 -5B2 1 -5B3 1 -5B4 1 -5B5 1 -5B6 1 -5B7 1 -5B8 1 -5B9 1 -5BB 1 -5BC 1 -5BD 1 -5BF 1 -5C1 1 -5C2 1 -5C4 1 -600 1 -601 1 -602 1 -603 1 -610 1 -611 1 -612 1 -613 1 -614 1 -615 1 -64B 1 -64C 1 -64D 1 -64E 1 -64F 1 -650 1 -651 1 -652 1 -653 1 -654 1 -655 1 -656 1 -657 1 -658 1 -670 1 -6D6 1 -6D7 1 -6D8 1 -6D9 1 -6DA 1 -6DB 1 -6DC 1 -6DD 1 -6DE 1 -6DF 1 -6E0 1 -6E1 1 -6E2 1 -6E3 1 -6E4 1 -6E7 1 -6E8 1 -6EA 1 -6EB 1 -6EC 1 -6ED 1 -70F 1 -711 1 -730 1 -731 1 -732 1 -733 1 -734 1 -735 1 -736 1 -737 1 -738 1 -739 1 -73A 1 -73B 1 -73C 1 -73D 1 -73E 1 -73F 1 -740 1 -741 1 -742 1 -743 1 -744 1 -745 1 -746 1 -747 1 -748 1 -749 1 -74A 1 -640 1 -60 1 -B4 1 -384 1 -2DC 1 -5E 1 -AF 1 -2D8 1 -2D9 1 -A8 1 -385 1 -2DA 1 -2DD 1 -B8 1 -2DB 1 -5F 1 -AD 1 -2D 1 -58A 1 -2C 1 -55D 1 -60C 1 -60D 1 -66B 1 -66C 1 -3B 1 -37E 1 -61B 1 -3A 1 -589 1 -703 1 -704 1 -705 1 -706 1 -707 1 -708 1 -21 1 -A1 1 -55C 1 -3F 1 -BF 1 -55E 1 -61F 1 -709 1 -2E 1 -6D4 1 -701 1 -702 1 -B7 1 -387 1 -700 1 -27 1 -22 1 -AB 1 -BB 1 -28 1 -29 1 -5B 1 -7B 1 -7D 1 -A7 1 -B6 1 -A9 1 -AE 1 -40 1 -2A 1 -66D 1 -2F 1 -26 1 -23 1 -25 1 -66A 1 -55A 1 -55B 1 -55F 1 -5BE 1 -5C0 1 -5C3 1 -5F3 1 -5F4 1 -70A 1 -70B 1 -70C 1 -70D 1 -2B9 1 -374 1 -375 1 -2BA 1 -2C2 1 -2C3 1 -2C4 1 -2C5 1 -2C6 1 -2C7 1 -2C8 1 -2C9 1 -2CA 1 -2CB 1 -2CC 1 -2CD 1 -2CE 1 -2CF 1 -2D2 1 -2D3 1 -2D4 1 -2D5 1 -2D6 1 -2D7 1 -2DE 1 -2DF 1 -2E5 1 -2E6 1 -2E7 1 -2E8 1 -2E9 1 -2EA 1 -2EB 1 -2EC 1 -2ED 1 -2EF 1 -2F0 1 -2F1 1 -2F2 1 -2F3 1 -2F4 1 -2F5 1 -2F6 1 -2F7 1 -2F8 1 -2F9 1 -2FA 1 -2FB 1 -2FC 1 -2FD 1 -2FE 1 -2FF 1 -B0 1 -482 1 -60E 1 -60F 1 -6E9 1 -3F6 1 -2B 1 -B1 1 -F7 1 -D7 1 -3C 1 -3D 1 -3E 1 -AC 1 -7C 1 -A6 1 -7E 1 -2D0 1 -2D1 1 -A4 1 -A2 1 -24 1 -A3 1 -A5 1 -30 1 -660 1 -6F0 1 -31 1 -B9 1 -661 1 -6F1 1 -BD 1 -BC 1 -32 1 -B2 1 -662 1 -6F2 1 -33 1 -B3 1 -663 1 -6F3 1 -BE 1 -34 1 -664 1 -6F4 1 -35 1 -665 1 -6F5 1 -36 1 -666 1 -6F6 1 -37 1 -667 1 -6F7 1 -38 1 -668 1 -6F8 1 -39 1 -669 1 -6F9 1 -41 1 -61 1 -AA 1 -C0 1 -C1 1 -C3 1 -C4 1 -C5 1 -E0 1 -E1 1 -E3 1 -E4 1 -E5 1 -100 1 -101 1 -104 1 -105 1 -1CD 1 -1CE 1 -1DE 1 -1DF 1 -1E0 1 -1E1 1 -1FA 1 -1FB 1 -200 1 -201 1 -202 1 -203 1 -226 1 -227 1 -363 1 -102 1 -103 1 -C2 1 -E2 1 -C6 1 -E6 1 -1E2 1 -1E3 1 -1FC 1 -1FD 1 -250 1 -251 1 -252 1 -42 1 -62 1 -299 1 -180 1 -181 1 -253 1 -182 1 -183 1 -43 1 -63 1 -C7 1 -E7 1 -106 1 -107 1 -108 1 -109 1 -10A 1 -10B 1 -10C 1 -10D 1 -368 1 -187 1 -188 1 -255 1 -44 1 -64 1 -10E 1 -10F 1 -369 1 -1C4 1 -1C5 1 -1C6 1 -1F1 1 -1F2 1 -1F3 1 -2A3 1 -2A5 1 -2A4 1 -110 1 -111 1 -189 1 -256 1 -18A 1 -257 1 -18B 1 -18C 1 -221 1 -D0 1 -F0 1 -45 1 -65 1 -C8 1 -C9 1 -CA 1 -CB 1 -E8 1 -E9 1 -EA 1 -EB 1 -112 1 -113 1 -114 1 -115 1 -116 1 -117 1 -118 1 -119 1 -11A 1 -11B 1 -204 1 -205 1 -206 1 -207 1 -228 1 -229 1 -364 1 -18E 1 -1DD 1 -18F 1 -259 1 -190 1 -25B 1 -258 1 -25A 1 -25C 1 -25D 1 -25E 1 -29A 1 -264 1 -46 1 -66 1 -2A9 1 -191 1 -192 1 -47 1 -67 1 -11C 1 -11D 1 -11E 1 -11F 1 -120 1 -121 1 -122 1 -123 1 -1E6 1 -1E7 1 -1F4 1 -1F5 1 -261 1 -262 1 -1E4 1 -1E5 1 -193 1 -260 1 -29B 1 -194 1 -263 1 -2E0 1 -1A2 1 -1A3 1 -48 1 -68 1 -124 1 -125 1 -21E 1 -21F 1 -2B0 1 -36A 1 -29C 1 -195 1 -1F6 1 -126 1 -127 1 -266 1 -2B1 1 -267 1 -2BB 1 -2BD 1 -49 1 -69 1 -CC 1 -CD 1 -CF 1 -EC 1 -ED 1 -EF 1 -128 1 -129 1 -12A 1 -12B 1 -12C 1 -12D 1 -12E 1 -12F 1 -130 1 -1CF 1 -1D0 1 -208 1 -209 1 -20A 1 -20B 1 -365 1 -132 1 -133 1 -CE 1 -EE 1 -131 1 -26A 1 -197 1 -268 1 -196 1 -269 1 -4A 1 -6A 1 -134 1 -135 1 -1F0 1 -2B2 1 -29D 1 -25F 1 -284 1 -4B 1 -6B 1 -136 1 -137 1 -1E8 1 -1E9 1 -198 1 -199 1 -29E 1 -4C 1 -6C 1 -139 1 -13A 1 -13B 1 -13C 1 -13D 1 -13E 1 -2E1 1 -13F 1 -140 1 -1C7 1 -1C8 1 -1C9 1 -2AA 1 -2AB 1 -29F 1 -141 1 -142 1 -19A 1 -26B 1 -26C 1 -26D 1 -234 1 -26E 1 -19B 1 -28E 1 -4D 1 -6D 1 -36B 1 -271 1 -4E 1 -6E 1 -D1 1 -F1 1 -143 1 -144 1 -145 1 -146 1 -147 1 -148 1 -1F8 1 -1F9 1 -1CA 1 -1CB 1 -1CC 1 -274 1 -19D 1 -272 1 -19E 1 -220 1 -273 1 -235 1 -14A 1 -14B 1 -4F 1 -6F 1 -BA 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -14C 1 -14D 1 -14E 1 -14F 1 -150 1 -151 1 -1A0 1 -1A1 1 -1D1 1 -1D2 1 -1EA 1 -1EB 1 -1EC 1 -1ED 1 -20C 1 -20D 1 -20E 1 -20F 1 -22A 1 -22B 1 -22C 1 -22D 1 -22E 1 -22F 1 -230 1 -231 1 -366 1 -152 1 -153 1 -276 1 -D8 1 -F8 1 -1FE 1 -1FF 1 -186 1 -254 1 -19F 1 -275 1 -277 1 -222 1 -223 1 -50 1 -70 1 -1A4 1 -1A5 1 -278 1 -51 1 -71 1 -2A0 1 -138 1 -52 1 -72 1 -154 1 -155 1 -156 1 -157 1 -158 1 -159 1 -210 1 -211 1 -212 1 -213 1 -2B3 1 -36C 1 -1A6 1 -280 1 -279 1 -2B4 1 -27A 1 -27B 1 -2B5 1 -27C 1 -27D 1 -27E 1 -27F 1 -281 1 -2B6 1 -53 1 -73 1 -15A 1 -15B 1 -15C 1 -15D 1 -160 1 -161 1 -17F 1 -2E2 1 -DF 1 -15E 1 -15F 1 -218 1 -219 1 -282 1 -1A9 1 -283 1 -1AA 1 -285 1 -286 1 -54 1 -74 1 -164 1 -165 1 -36D 1 -2A8 1 -1BE 1 -2A6 1 -2A7 1 -162 1 -163 1 -21A 1 -21B 1 -166 1 -167 1 -1AB 1 -1AC 1 -1AD 1 -1AE 1 -288 1 -236 1 -287 1 -55 1 -75 1 -D9 1 -DA 1 -DB 1 -DC 1 -F9 1 -FA 1 -FB 1 -FC 1 -168 1 -169 1 -16A 1 -16B 1 -16C 1 -16D 1 -16E 1 -16F 1 -170 1 -171 1 -172 1 -173 1 -1AF 1 -1B0 1 -1D3 1 -1D4 1 -1D5 1 -1D6 1 -1D7 1 -1D8 1 -1D9 1 -1DA 1 -1DB 1 -1DC 1 -214 1 -215 1 -216 1 -217 1 -367 1 -289 1 -265 1 -2AE 1 -2AF 1 -19C 1 -26F 1 -270 1 -1B1 1 -28A 1 -56 1 -76 1 -36E 1 -1B2 1 -28B 1 -28C 1 -57 1 -77 1 -174 1 -175 1 -2B7 1 -28D 1 -58 1 -78 1 -2E3 1 -36F 1 -59 1 -79 1 -DD 1 -FD 1 -FF 1 -176 1 -177 1 -178 1 -232 1 -233 1 -2B8 1 -28F 1 -1B3 1 -1B4 1 -5A 1 -7A 1 -179 1 -17A 1 -17B 1 -17C 1 -17D 1 -17E 1 -18D 1 -1B5 1 -1B6 1 -224 1 -225 1 -290 1 -291 1 -1B7 1 -1EE 1 -1EF 1 -292 1 -1B8 1 -1B9 1 -1BA 1 -293 1 -21C 1 -21D 1 -DE 1 -FE 1 -1BF 1 -1F7 1 -1BB 1 -1A7 1 -1A8 1 -1BC 1 -1BD 1 -184 1 -185 1 -294 1 -2C0 1 -2BC 1 -149 1 -2EE 1 -2BE 1 -295 1 -2E4 1 -2BF 1 -2C1 1 -2A1 1 -2A2 1 -296 1 -1C0 1 -1C1 1 -1C2 1 -1C3 1 -297 1 -298 1 -2AC 1 -2AD 1 -386 1 -391 1 -3AC 1 -3B1 1 -392 1 -3B2 1 -3D0 1 -393 1 -3B3 1 -394 1 -3B4 1 -388 1 -395 1 -3AD 1 -3B5 1 -3F5 1 -3DC 1 -3DD 1 -3DA 1 -3DB 1 -396 1 -3B6 1 -389 1 -397 1 -3AE 1 -3B7 1 -398 1 -3B8 1 -3D1 1 -3F4 1 -37A 1 -38A 1 -390 1 -399 1 -3AA 1 -3AF 1 -3B9 1 -3CA 1 -3F3 1 -39A 1 -3BA 1 -3F0 1 -3D7 1 -39B 1 -3BB 1 -B5 1 -39C 1 -3BC 1 -39D 1 -3BD 1 -39E 1 -3BE 1 -38C 1 -39F 1 -3BF 1 -3CC 1 -3A0 1 -3C0 1 -3D6 1 -3DE 1 -3DF 1 -3D8 1 -3D9 1 -3A1 1 -3C1 1 -3F1 1 -3A3 1 -3C2 1 -3C3 1 -3F2 1 -3F9 1 -3A4 1 -3C4 1 -38E 1 -3A5 1 -3AB 1 -3B0 1 -3C5 1 -3CB 1 -3CD 1 -3D2 1 -3D3 1 -3D4 1 -3A6 1 -3C6 1 -3D5 1 -3A7 1 -3C7 1 -3A8 1 -3C8 1 -38F 1 -3A9 1 -3C9 1 -3CE 1 -3E0 1 -3E1 1 -3F7 1 -3F8 1 -3FA 1 -3FB 1 -3E2 1 -3E3 1 -3E4 1 -3E5 1 -3E6 1 -3E7 1 -3E8 1 -3E9 1 -3EA 1 -3EB 1 -3EC 1 -3ED 1 -3EE 1 -3EF 1 -410 1 -430 1 -4D0 1 -4D1 1 -4D2 1 -4D3 1 -4D8 1 -4D9 1 -4DA 1 -4DB 1 -4D4 1 -4D5 1 -411 1 -431 1 -412 1 -432 1 -413 1 -433 1 -490 1 -491 1 -492 1 -493 1 -494 1 -495 1 -414 1 -434 1 -500 1 -501 1 -402 1 -452 1 -502 1 -503 1 -403 1 -453 1 -498 1 -499 1 -400 1 -401 1 -415 1 -435 1 -450 1 -451 1 -4D6 1 -4D7 1 -404 1 -454 1 -416 1 -436 1 -4C1 1 -4C2 1 -4DC 1 -4DD 1 -496 1 -497 1 -417 1 -437 1 -504 1 -505 1 -4DE 1 -4DF 1 -405 1 -455 1 -4E0 1 -4E1 1 -506 1 -507 1 -40D 1 -418 1 -438 1 -45D 1 -4E2 1 -4E3 1 -48A 1 -48B 1 -4E4 1 -4E5 1 -406 1 -456 1 -407 1 -457 1 -419 1 -439 1 -408 1 -458 1 -41A 1 -43A 1 -49A 1 -49B 1 -4C3 1 -4C4 1 -4A0 1 -4A1 1 -49E 1 -49F 1 -49C 1 -49D 1 -41B 1 -43B 1 -4C5 1 -4C6 1 -409 1 -459 1 -508 1 -509 1 -41C 1 -43C 1 -4CD 1 -4CE 1 -41D 1 -43D 1 -4C9 1 -4CA 1 -4A2 1 -4A3 1 -4C7 1 -4C8 1 -4A4 1 -4A5 1 -40A 1 -45A 1 -50A 1 -50B 1 -41E 1 -43E 1 -4E6 1 -4E7 1 -4E8 1 -4E9 1 -4EA 1 -4EB 1 -41F 1 -43F 1 -4A6 1 -4A7 1 -480 1 -481 1 -420 1 -440 1 -48E 1 -48F 1 -421 1 -441 1 -50C 1 -50D 1 -4AA 1 -4AB 1 -422 1 -442 1 -50E 1 -50F 1 -4AC 1 -4AD 1 -40B 1 -45B 1 -40C 1 -45C 1 -423 1 -443 1 -4EE 1 -4EF 1 -40E 1 -45E 1 -4F0 1 -4F1 1 -4F2 1 -4F3 1 -4AE 1 -4AF 1 -4B0 1 -4B1 1 -478 1 -479 1 -424 1 -444 1 -425 1 -445 1 -4B2 1 -4B3 1 -4BA 1 -4BB 1 -460 1 -461 1 -47E 1 -47F 1 -47C 1 -47D 1 -47A 1 -47B 1 -426 1 -446 1 -4B4 1 -4B5 1 -427 1 -447 1 -4F4 1 -4F5 1 -4B6 1 -4B7 1 -4CB 1 -4CC 1 -4B8 1 -4B9 1 -4BC 1 -4BD 1 -4BE 1 -4BF 1 -40F 1 -45F 1 -428 1 -448 1 -429 1 -449 1 -42A 1 -44A 1 -42B 1 -44B 1 -4F8 1 -4F9 1 -42C 1 -44C 1 -48C 1 -48D 1 -462 1 -463 1 -42D 1 -44D 1 -4EC 1 -4ED 1 -42E 1 -44E 1 -42F 1 -44F 1 -464 1 -465 1 -466 1 -467 1 -46A 1 -46B 1 -468 1 -469 1 -46C 1 -46D 1 -46E 1 -46F 1 -470 1 -471 1 -472 1 -473 1 -474 1 -475 1 -476 1 -477 1 -4A8 1 -4A9 1 -4C0 1 -531 1 -561 1 -532 1 -562 1 -533 1 -563 1 -534 1 -564 1 -535 1 -565 1 -587 1 -536 1 -566 1 -537 1 -567 1 -538 1 -568 1 -539 1 -569 1 -53A 1 -56A 1 -53B 1 -56B 1 -53C 1 -56C 1 -53D 1 -56D 1 -53E 1 -56E 1 -53F 1 -56F 1 -540 1 -570 1 -541 1 -571 1 -542 1 -572 1 -543 1 -573 1 -544 1 -574 1 -545 1 -575 1 -546 1 -576 1 -547 1 -577 1 -548 1 -578 1 -549 1 -579 1 -54A 1 -57A 1 -54B 1 -57B 1 -54C 1 -57C 1 -54D 1 -57D 1 -54E 1 -57E 1 -54F 1 -57F 1 -550 1 -580 1 -551 1 -581 1 -552 1 -582 1 -553 1 -583 1 -554 1 -584 1 -555 1 -585 1 -556 1 -586 1 -559 1 -5D0 1 -5D1 1 -5D2 1 -5D3 1 -5D4 1 -5D5 1 -5F0 1 -5F1 1 -5D6 1 -5D7 1 -5D8 1 -5D9 1 -5F2 1 -5DA 1 -5DB 1 -5DC 1 -5DD 1 -5DE 1 -5DF 1 -5E0 1 -5E1 1 -5E2 1 -5E3 1 -5E4 1 -5E5 1 -5E6 1 -5E7 1 -5E8 1 -5E9 1 -5EA 1 -621 1 -674 1 -6FD 1 -622 1 -623 1 -672 1 -671 1 -624 1 -625 1 -673 1 -626 1 -627 1 -675 1 -66E 1 -628 1 -67B 1 -67E 1 -680 1 -629 1 -62A 1 -62B 1 -679 1 -67A 1 -67C 1 -67D 1 -67F 1 -62C 1 -683 1 -684 1 -686 1 -6BF 1 -687 1 -62D 1 -62E 1 -681 1 -682 1 -685 1 -62F 1 -630 1 -688 1 -689 1 -68A 1 -68B 1 -68C 1 -68D 1 -68E 1 -68F 1 -690 1 -6EE 1 -631 1 -632 1 -691 1 -692 1 -693 1 -694 1 -695 1 -696 1 -697 1 -698 1 -699 1 -6EF 1 -633 1 -634 1 -69A 1 -69B 1 -69C 1 -6FA 1 -635 1 -636 1 -69D 1 -69E 1 -6FB 1 -637 1 -638 1 -69F 1 -639 1 -63A 1 -6A0 1 -6FC 1 -641 1 -6A1 1 -6A2 1 -6A3 1 -6A4 1 -6A5 1 -6A6 1 -66F 1 -642 1 -6A7 1 -6A8 1 -643 1 -6A9 1 -6AA 1 -6AB 1 -6AC 1 -6AD 1 -6AE 1 -6AF 1 -6B0 1 -6B1 1 -6B2 1 -6B3 1 -6B4 1 -644 1 -6B5 1 -6B6 1 -6B7 1 -6B8 1 -645 1 -6FE 1 -646 1 -6BA 1 -6BB 1 -6BC 1 -6BD 1 -6B9 1 -647 1 -6BE 1 -6C1 1 -6C2 1 -6C3 1 -6FF 1 -6C0 1 -6D5 1 -648 1 -6E5 1 -676 1 -6C4 1 -6C5 1 -6C6 1 -6C7 1 -677 1 -6C8 1 -6C9 1 -6CA 1 -6CB 1 -6CF 1 -649 1 -64A 1 -6E6 1 -678 1 -6CC 1 -6CD 1 -6CE 1 -6D0 1 -6D1 1 -6D2 1 -6D3 1 -710 1 -712 1 -72D 1 -713 1 -714 1 -72E 1 -716 1 -715 1 -72F 1 -717 1 -718 1 -719 1 -74D 1 -71A 1 -71B 1 -71C 1 -71D 1 -71E 1 -71F 1 -74E 1 -720 1 -721 1 -722 1 -723 1 -724 1 -725 1 -726 1 -727 1 -74F 1 -728 1 -729 1 -72A 1 -72B 1 -72C 1 -780 1 -799 1 -79A 1 -781 1 -782 1 -783 1 -79C 1 -784 1 -785 1 -786 1 -787 1 -7A2 1 -7A3 1 -788 1 -7A5 1 -789 1 -78A 1 -78B 1 -79B 1 -78C 1 -798 1 -7A0 1 -7A1 1 -78D 1 -78E 1 -7A4 1 -78F 1 -790 1 -79D 1 -79E 1 -79F 1 -791 1 -792 1 -793 1 -794 1 -795 1 -796 1 -797 1 -7B1 1 -7A6 1 -7A7 1 -7A8 1 -7A9 1 -7AA 1 -7AB 1 -7AC 1 -7AD 1 -7AE 1 -7AF 1 -7B0 1 -4E00 1 -4E01 1 -4E02 1 -4E03 1 -4E04 1 -4E05 1 -4E06 1 -4E07 1 -4E08 1 -4E09 1 -4E0A 1 -4E0B 1 -4E0C 1 -4E0D 1 -4E0E 1 -4E0F 1 -4E10 1 -4E11 1 -4E12 1 -4E13 1 -4E14 1 -4E15 1 -4E16 1 -4E17 1 -4E18 1 -4E19 1 -4E1A 1 -4E1B 1 -4E1C 1 -4E1D 1 -4E1E 1 -4E1F 1 -4E20 1 -4E21 1 -4E22 1 -4E23 1 -4E24 1 -4E25 1 -4E26 1 -4E27 1 -4E28 1 -4E29 1 -4E2A 1 -4E2B 1 -4E2C 1 -4E2D 1 -4E2E 1 -4E2F 1 -4E30 1 -4E31 1 -4E32 1 -4E33 1 -4E34 1 -4E35 1 -4E36 1 -4E37 1 -4E38 1 -4E39 1 -4E3A 1 -4E3B 1 -4E3C 1 -4E3D 1 -4E3E 1 -4E3F 1 -4E40 1 -4E41 1 -4E42 1 -4E43 1 -4E44 1 -4E45 1 -4E46 1 -4E47 1 -4E48 1 -4E49 1 -4E4A 1 -4E4B 1 -4E4C 1 -4E4D 1 -4E4E 1 -4E4F 1 -4E50 1 -4E51 1 -4E52 1 -4E53 1 -4E54 1 -4E55 1 -4E56 1 -4E57 1 -4E58 1 -4E59 1 -4E5A 1 -4E5B 1 -4E5C 1 -4E5D 1 -4E5E 1 -4E5F 1 -4E60 1 -4E61 1 -4E62 1 -4E63 1 -4E64 1 -4E65 1 -4E66 1 -4E67 1 -4E68 1 -4E69 1 -4E6A 1 -4E6B 1 -4E6C 1 -4E6D 1 -4E6E 1 -4E6F 1 -4E70 1 -4E71 1 -4E72 1 -4E73 1 -4E74 1 -4E75 1 -4E76 1 -4E77 1 -4E78 1 -4E79 1 -4E7A 1 -4E7B 1 -4E7C 1 -4E7D 1 -4E7E 1 -4E7F 1 -4E80 1 -4E81 1 -4E82 1 -4E83 1 -4E84 1 -4E85 1 -4E86 1 -4E87 1 -4E88 1 -4E89 1 -4E8A 1 -4E8B 1 -4E8C 1 -4E8D 1 -4E8E 1 -4E8F 1 -4E90 1 -4E91 1 -4E92 1 -4E93 1 -4E94 1 -4E95 1 -4E96 1 -4E97 1 -4E98 1 -4E99 1 -4E9A 1 -4E9B 1 -4E9C 1 -4E9D 1 -4E9E 1 -4E9F 1 -4EA0 1 -4EA1 1 -4EA2 1 -4EA3 1 -4EA4 1 -4EA5 1 -4EA6 1 -4EA7 1 -4EA8 1 -4EA9 1 -4EAA 1 -4EAB 1 -4EAC 1 -4EAD 1 -4EAE 1 -4EAF 1 -4EB0 1 -4EB1 1 -4EB2 1 -4EB3 1 -4EB4 1 -4EB5 1 -4EB6 1 -4EB7 1 -4EB8 1 -4EB9 1 -4EBA 1 -4EBB 1 -4EBC 1 -4EBD 1 -4EBE 1 -4EBF 1 -4EC0 1 -4EC1 1 -4EC2 1 -4EC3 1 -4EC4 1 -4EC5 1 -4EC6 1 -4EC7 1 -4EC8 1 -4EC9 1 -4ECA 1 -4ECB 1 -4ECC 1 -4ECD 1 -4ECE 1 -4ECF 1 -4ED0 1 -4ED1 1 -4ED2 1 -4ED3 1 -4ED4 1 -4ED5 1 -4ED6 1 -4ED7 1 -4ED8 1 -4ED9 1 -4EDA 1 -4EDB 1 -4EDC 1 -4EDD 1 -4EDE 1 -4EDF 1 -4EE0 1 -4EE1 1 -4EE2 1 -4EE3 1 -4EE4 1 -4EE5 1 -4EE6 1 -4EE7 1 -4EE8 1 -4EE9 1 -4EEA 1 -4EEB 1 -4EEC 1 -4EED 1 -4EEE 1 -4EEF 1 -4EF0 1 -4EF1 1 -4EF2 1 -4EF3 1 -4EF4 1 -4EF5 1 -4EF6 1 -4EF7 1 -4EF8 1 -4EF9 1 -4EFA 1 -4EFB 1 -4EFC 1 -4EFD 1 -4EFE 1 -4EFF 1 -4F00 1 -4F01 1 -4F02 1 -4F03 1 -4F04 1 -4F05 1 -4F06 1 -4F07 1 -4F08 1 -4F09 1 -4F0A 1 -4F0B 1 -4F0C 1 -4F0D 1 -4F0E 1 -4F0F 1 -4F10 1 -4F11 1 -4F12 1 -4F13 1 -4F14 1 -4F15 1 -4F16 1 -4F17 1 -4F18 1 -4F19 1 -4F1A 1 -4F1B 1 -4F1C 1 -4F1D 1 -4F1E 1 -4F1F 1 -4F20 1 -4F21 1 -4F22 1 -4F23 1 -4F24 1 -4F25 1 -4F26 1 -4F27 1 -4F28 1 -4F29 1 -4F2A 1 -4F2B 1 -4F2C 1 -4F2D 1 -4F2E 1 -4F2F 1 -4F30 1 -4F31 1 -4F32 1 -4F33 1 -4F34 1 -4F35 1 -4F36 1 -4F37 1 -4F38 1 -4F39 1 -4F3A 1 -4F3B 1 -4F3C 1 -4F3D 1 -4F3E 1 -4F3F 1 -4F40 1 -4F41 1 -4F42 1 -4F43 1 -4F44 1 -4F45 1 -4F46 1 -4F47 1 -4F48 1 -4F49 1 -4F4A 1 -4F4B 1 -4F4C 1 -4F4D 1 -4F4E 1 -4F4F 1 -4F50 1 -4F51 1 -4F52 1 -4F53 1 -4F54 1 -4F55 1 -4F56 1 -4F57 1 -4F58 1 -4F59 1 -4F5A 1 -4F5B 1 -4F5C 1 -4F5D 1 -4F5E 1 -4F5F 1 -4F60 1 -4F61 1 -4F62 1 -4F63 1 -4F64 1 -4F65 1 -4F66 1 -4F67 1 -4F68 1 -4F69 1 -4F6A 1 -4F6B 1 -4F6C 1 -4F6D 1 -4F6E 1 -4F6F 1 -4F70 1 -4F71 1 -4F72 1 -4F73 1 -4F74 1 -4F75 1 -4F76 1 -4F77 1 -4F78 1 -4F79 1 -4F7A 1 -4F7B 1 -4F7C 1 -4F7D 1 -4F7E 1 -4F7F 1 -4F80 1 -4F81 1 -4F82 1 -4F83 1 -4F84 1 -4F85 1 -4F86 1 -4F87 1 -4F88 1 -4F89 1 -4F8A 1 -4F8B 1 -4F8C 1 -4F8D 1 -4F8E 1 -4F8F 1 -4F90 1 -4F91 1 -4F92 1 -4F93 1 -4F94 1 -4F95 1 -4F96 1 -4F97 1 -4F98 1 -4F99 1 -4F9A 1 -4F9B 1 -4F9C 1 -4F9D 1 -4F9E 1 -4F9F 1 -4FA0 1 -4FA1 1 -4FA2 1 -4FA3 1 -4FA4 1 -4FA5 1 -4FA6 1 -4FA7 1 -4FA8 1 -4FA9 1 -4FAA 1 -4FAB 1 -4FAC 1 -4FAD 1 -4FAE 1 -4FAF 1 -4FB0 1 -4FB1 1 -4FB2 1 -4FB3 1 -4FB4 1 -4FB5 1 -4FB6 1 -4FB7 1 -4FB8 1 -4FB9 1 -4FBA 1 -4FBB 1 -4FBC 1 -4FBD 1 -4FBE 1 -4FBF 1 -4FC0 1 -4FC1 1 -4FC2 1 -4FC3 1 -4FC4 1 -4FC5 1 -4FC6 1 -4FC7 1 -4FC8 1 -4FC9 1 -4FCA 1 -4FCB 1 -4FCC 1 -4FCD 1 -4FCE 1 -4FCF 1 -4FD0 1 -4FD1 1 -4FD2 1 -4FD3 1 -4FD4 1 -4FD5 1 -4FD6 1 -4FD7 1 -4FD8 1 -4FD9 1 -4FDA 1 -4FDB 1 -4FDC 1 -4FDD 1 -4FDE 1 -4FDF 1 -4FE0 1 -4FE1 1 -4FE2 1 -4FE3 1 -4FE4 1 -4FE5 1 -4FE6 1 -4FE7 1 -4FE8 1 -4FE9 1 -4FEA 1 -4FEB 1 -4FEC 1 -4FED 1 -4FEE 1 -4FEF 1 -4FF0 1 -4FF1 1 -4FF2 1 -4FF3 1 -4FF4 1 -4FF5 1 -4FF6 1 -4FF7 1 -4FF8 1 -4FF9 1 -4FFA 1 -4FFB 1 -4FFC 1 -4FFD 1 -4FFE 1 -4FFF 1 -237 1 -238 1 -239 1 -23A 1 -23B 1 -23C 1 -23D 1 -23E 1 -23F 1 -240 1 -241 1 -242 1 -243 1 -244 1 -245 1 -246 1 -247 1 -248 1 -249 1 -24A 1 -24B 1 -24C 1 -24D 1 -24E 1 -24F 1 -358 1 -359 1 -35A 1 -35B 1 -35C 1 -370 1 -371 1 -372 1 -373 1 -376 1 -377 1 -378 1 -379 1 -37B 1 -37C 1 -37D 1 -37F 1 -380 1 -381 1 -382 1 -383 1 -38B 1 -38D 1 -3A2 1 -3CF 1 -3FC 1 -3FD 1 -3FE 1 -3FF 1 -487 1 -4CF 1 -4F6 1 -4F7 1 -4FA 1 -4FB 1 -4FC 1 -4FD 1 -4FE 1 -4FF 1 -510 1 -511 1 -512 1 -513 1 -514 1 -515 1 -516 1 -517 1 -518 1 -519 1 -51A 1 -51B 1 -51C 1 -51D 1 -51E 1 -51F 1 -520 1 -521 1 -522 1 -523 1 -524 1 -525 1 -526 1 -527 1 -528 1 -529 1 -52A 1 -52B 1 -52C 1 -52D 1 -52E 1 -52F 1 -530 1 -557 1 -558 1 -560 1 -588 1 -58B 1 -58C 1 -58D 1 -58E 1 -58F 1 -590 1 -5A2 1 -5BA 1 -5C5 1 -5C6 1 -5C7 1 -5C8 1 -5C9 1 -5CA 1 -5CB 1 -5CC 1 -5CD 1 -5CE 1 -5CF 1 -5EB 1 -5EC 1 -5ED 1 -5EE 1 -5EF 1 -5F5 1 -5F6 1 -5F7 1 -5F8 1 -5F9 1 -5FA 1 -5FB 1 -5FC 1 -5FD 1 -5FE 1 -5FF 1 -604 1 -605 1 -606 1 -607 1 -608 1 -609 1 -60A 1 -60B 1 -616 1 -617 1 -618 1 -619 1 -61A 1 -61C 1 -61D 1 -61E 1 -620 1 -63B 1 -63C 1 -63D 1 -63E 1 -63F 1 -659 1 -65A 1 -65B 1 -65C 1 -65D 1 -65E 1 -65F 1 -70E 1 -74B 1 -74C 1 -750 1 -751 1 -752 1 -753 1 -754 1 -755 1 -756 1 -757 1 -758 1 -759 1 -75A 1 -75B 1 -75C 1 -75D 1 -75E 1 -75F 1 -760 1 -761 1 -762 1 -763 1 -764 1 -765 1 -766 1 -767 1 -768 1 -769 1 -76A 1 -76B 1 -76C 1 -76D 1 -76E 1 -76F 1 -770 1 -771 1 -772 1 -773 1 -774 1 -775 1 -776 1 -777 1 -778 1 -779 1 -77A 1 -77B 1 -77C 1 -77D 1 -77E 1 -77F 1 -7B2 1 -7B3 1 -7B4 1 -7B5 1 -7B6 1 -7B7 1 -7B8 1 -7B9 1 -7BA 1 -7BB 1 -7BC 1 -7BD 1 -7BE 1 -7BF 1 -7C0 1 -7C1 1 -7C2 1 -7C3 1 -7C4 1 -7C5 1 -7C6 1 -7C7 1 -7C8 1 -7C9 1 -7CA 1 -7CB 1 -7CC 1 -7CD 1 -7CE 1 -7CF 1 -7D0 1 -7D1 1 -7D2 1 -7D3 1 -7D4 1 -7D5 1 -7D6 1 -7D7 1 -7D8 1 -7D9 1 -7DA 1 -7DB 1 -7DC 1 -7DD 1 -7DE 1 -7DF 1 -7E0 1 -7E1 1 -7E2 1 -7E3 1 -7E4 1 -7E5 1 -7E6 1 -7E7 1 -7E8 1 -7E9 1 -7EA 1 -7EB 1 -7EC 1 -7ED 1 -7EE 1 -7EF 1 -7F0 1 -7F1 1 -7F2 1 -7F3 1 -7F4 1 -7F5 1 -7F6 1 -7F7 1 -7F8 1 -7F9 1 -7FA 1 -7FB 1 -7FC 1 -7FD 1 -7FE 1 -7FF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -SET NAMES utf8; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=NDB CHARACTER SET utf8; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_general_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_slovak_ci; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -85 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -300 1 -301 1 -302 1 -303 1 -304 1 -305 1 -306 1 -307 1 -308 1 -309 1 -30A 1 -30B 1 -30C 1 -30D 1 -30E 1 -30F 1 -310 1 -311 1 -312 1 -313 1 -314 1 -315 1 -316 1 -317 1 -318 1 -319 1 -31A 1 -31B 1 -31C 1 -31D 1 -31E 1 -31F 1 -320 1 -321 1 -322 1 -323 1 -324 1 -325 1 -326 1 -327 1 -328 1 -329 1 -32A 1 -32B 1 -32C 1 -32D 1 -32E 1 -32F 1 -330 1 -331 1 -332 1 -333 1 -334 1 -335 1 -336 1 -337 1 -338 1 -339 1 -33A 1 -33B 1 -33C 1 -33D 1 -33E 1 -33F 1 -340 1 -341 1 -342 1 -343 1 -344 1 -345 1 -346 1 -347 1 -348 1 -349 1 -34A 1 -34B 1 -34C 1 -34D 1 -34E 1 -34F 1 -350 1 -351 1 -352 1 -353 1 -354 1 -355 1 -356 1 -357 1 -35D 1 -35E 1 -35F 1 -360 1 -361 1 -362 1 -483 1 -484 1 -485 1 -486 1 -488 1 -489 1 -591 1 -592 1 -593 1 -594 1 -595 1 -596 1 -597 1 -598 1 -599 1 -59A 1 -59B 1 -59C 1 -59D 1 -59E 1 -59F 1 -5A0 1 -5A1 1 -5A3 1 -5A4 1 -5A5 1 -5A6 1 -5A7 1 -5A8 1 -5A9 1 -5AA 1 -5AB 1 -5AC 1 -5AD 1 -5AE 1 -5AF 1 -5B0 1 -5B1 1 -5B2 1 -5B3 1 -5B4 1 -5B5 1 -5B6 1 -5B7 1 -5B8 1 -5B9 1 -5BB 1 -5BC 1 -5BD 1 -5BF 1 -5C1 1 -5C2 1 -5C4 1 -600 1 -601 1 -602 1 -603 1 -610 1 -611 1 -612 1 -613 1 -614 1 -615 1 -64B 1 -64C 1 -64D 1 -64E 1 -64F 1 -650 1 -651 1 -652 1 -653 1 -654 1 -655 1 -656 1 -657 1 -658 1 -670 1 -6D6 1 -6D7 1 -6D8 1 -6D9 1 -6DA 1 -6DB 1 -6DC 1 -6DD 1 -6DE 1 -6DF 1 -6E0 1 -6E1 1 -6E2 1 -6E3 1 -6E4 1 -6E7 1 -6E8 1 -6EA 1 -6EB 1 -6EC 1 -6ED 1 -70F 1 -711 1 -730 1 -731 1 -732 1 -733 1 -734 1 -735 1 -736 1 -737 1 -738 1 -739 1 -73A 1 -73B 1 -73C 1 -73D 1 -73E 1 -73F 1 -740 1 -741 1 -742 1 -743 1 -744 1 -745 1 -746 1 -747 1 -748 1 -749 1 -74A 1 -640 1 -60 1 -B4 1 -384 1 -2DC 1 -5E 1 -AF 1 -2D8 1 -2D9 1 -A8 1 -385 1 -2DA 1 -2DD 1 -B8 1 -2DB 1 -5F 1 -AD 1 -2D 1 -58A 1 -2C 1 -55D 1 -60C 1 -60D 1 -66B 1 -66C 1 -3B 1 -37E 1 -61B 1 -3A 1 -589 1 -703 1 -704 1 -705 1 -706 1 -707 1 -708 1 -21 1 -A1 1 -55C 1 -3F 1 -BF 1 -55E 1 -61F 1 -709 1 -2E 1 -6D4 1 -701 1 -702 1 -B7 1 -387 1 -700 1 -27 1 -22 1 -AB 1 -BB 1 -28 1 -29 1 -5B 1 -7B 1 -7D 1 -A7 1 -B6 1 -A9 1 -AE 1 -40 1 -2A 1 -66D 1 -2F 1 -26 1 -23 1 -25 1 -66A 1 -55A 1 -55B 1 -55F 1 -5BE 1 -5C0 1 -5C3 1 -5F3 1 -5F4 1 -70A 1 -70B 1 -70C 1 -70D 1 -2B9 1 -374 1 -375 1 -2BA 1 -2C2 1 -2C3 1 -2C4 1 -2C5 1 -2C6 1 -2C7 1 -2C8 1 -2C9 1 -2CA 1 -2CB 1 -2CC 1 -2CD 1 -2CE 1 -2CF 1 -2D2 1 -2D3 1 -2D4 1 -2D5 1 -2D6 1 -2D7 1 -2DE 1 -2DF 1 -2E5 1 -2E6 1 -2E7 1 -2E8 1 -2E9 1 -2EA 1 -2EB 1 -2EC 1 -2ED 1 -2EF 1 -2F0 1 -2F1 1 -2F2 1 -2F3 1 -2F4 1 -2F5 1 -2F6 1 -2F7 1 -2F8 1 -2F9 1 -2FA 1 -2FB 1 -2FC 1 -2FD 1 -2FE 1 -2FF 1 -B0 1 -482 1 -60E 1 -60F 1 -6E9 1 -3F6 1 -2B 1 -B1 1 -F7 1 -D7 1 -3C 1 -3D 1 -3E 1 -AC 1 -7C 1 -A6 1 -7E 1 -2D0 1 -2D1 1 -A4 1 -A2 1 -24 1 -A3 1 -A5 1 -30 1 -660 1 -6F0 1 -31 1 -B9 1 -661 1 -6F1 1 -BD 1 -BC 1 -32 1 -B2 1 -662 1 -6F2 1 -33 1 -B3 1 -663 1 -6F3 1 -BE 1 -34 1 -664 1 -6F4 1 -35 1 -665 1 -6F5 1 -36 1 -666 1 -6F6 1 -37 1 -667 1 -6F7 1 -38 1 -668 1 -6F8 1 -39 1 -669 1 -6F9 1 -41 1 -61 1 -AA 1 -C0 1 -C1 1 -C2 1 -C3 1 -C5 1 -E0 1 -E1 1 -E2 1 -E3 1 -E5 1 -100 1 -101 1 -102 1 -103 1 -104 1 -105 1 -1CD 1 -1CE 1 -1DE 1 -1DF 1 -1E0 1 -1E1 1 -1FA 1 -1FB 1 -200 1 -201 1 -202 1 -203 1 -226 1 -227 1 -363 1 -C4 1 -E4 1 -C6 1 -E6 1 -1E2 1 -1E3 1 -1FC 1 -1FD 1 -250 1 -251 1 -252 1 -42 1 -62 1 -299 1 -180 1 -181 1 -253 1 -182 1 -183 1 -43 1 -63 1 -C7 1 -E7 1 -106 1 -107 1 -108 1 -109 1 -10A 1 -10B 1 -368 1 -10C 1 -10D 1 -187 1 -188 1 -255 1 -44 1 -64 1 -10E 1 -10F 1 -369 1 -1C4 1 -1C5 1 -1C6 1 -1F1 1 -1F2 1 -1F3 1 -2A3 1 -2A5 1 -2A4 1 -110 1 -111 1 -189 1 -256 1 -18A 1 -257 1 -18B 1 -18C 1 -221 1 -D0 1 -F0 1 -45 1 -65 1 -C8 1 -C9 1 -CA 1 -CB 1 -E8 1 -E9 1 -EA 1 -EB 1 -112 1 -113 1 -114 1 -115 1 -116 1 -117 1 -118 1 -119 1 -11A 1 -11B 1 -204 1 -205 1 -206 1 -207 1 -228 1 -229 1 -364 1 -18E 1 -1DD 1 -18F 1 -259 1 -190 1 -25B 1 -258 1 -25A 1 -25C 1 -25D 1 -25E 1 -29A 1 -264 1 -46 1 -66 1 -2A9 1 -191 1 -192 1 -47 1 -67 1 -11C 1 -11D 1 -11E 1 -11F 1 -120 1 -121 1 -122 1 -123 1 -1E6 1 -1E7 1 -1F4 1 -1F5 1 -261 1 -262 1 -1E4 1 -1E5 1 -193 1 -260 1 -29B 1 -194 1 -263 1 -2E0 1 -1A2 1 -1A3 1 -48 1 -68 1 -124 1 -125 1 -21E 1 -21F 1 -2B0 1 -36A 1 -29C 1 -195 1 -1F6 1 -126 1 -127 1 -266 1 -2B1 1 -267 1 -2BB 1 -2BD 1 -49 1 -69 1 -CC 1 -CD 1 -CE 1 -CF 1 -EC 1 -ED 1 -EE 1 -EF 1 -128 1 -129 1 -12A 1 -12B 1 -12C 1 -12D 1 -12E 1 -12F 1 -130 1 -1CF 1 -1D0 1 -208 1 -209 1 -20A 1 -20B 1 -365 1 -132 1 -133 1 -131 1 -26A 1 -197 1 -268 1 -196 1 -269 1 -4A 1 -6A 1 -134 1 -135 1 -1F0 1 -2B2 1 -29D 1 -25F 1 -284 1 -4B 1 -6B 1 -136 1 -137 1 -1E8 1 -1E9 1 -198 1 -199 1 -29E 1 -4C 1 -6C 1 -139 1 -13A 1 -13B 1 -13C 1 -13D 1 -13E 1 -2E1 1 -13F 1 -140 1 -1C7 1 -1C8 1 -1C9 1 -2AA 1 -2AB 1 -29F 1 -141 1 -142 1 -19A 1 -26B 1 -26C 1 -26D 1 -234 1 -26E 1 -19B 1 -28E 1 -4D 1 -6D 1 -36B 1 -271 1 -4E 1 -6E 1 -D1 1 -F1 1 -143 1 -144 1 -145 1 -146 1 -147 1 -148 1 -1F8 1 -1F9 1 -1CA 1 -1CB 1 -1CC 1 -274 1 -19D 1 -272 1 -19E 1 -220 1 -273 1 -235 1 -14A 1 -14B 1 -4F 1 -6F 1 -BA 1 -D2 1 -D3 1 -D5 1 -D6 1 -F2 1 -F3 1 -F5 1 -F6 1 -14C 1 -14D 1 -14E 1 -14F 1 -150 1 -151 1 -1A0 1 -1A1 1 -1D1 1 -1D2 1 -1EA 1 -1EB 1 -1EC 1 -1ED 1 -20C 1 -20D 1 -20E 1 -20F 1 -22A 1 -22B 1 -22C 1 -22D 1 -22E 1 -22F 1 -230 1 -231 1 -366 1 -152 1 -153 1 -D4 1 -F4 1 -276 1 -D8 1 -F8 1 -1FE 1 -1FF 1 -186 1 -254 1 -19F 1 -275 1 -277 1 -222 1 -223 1 -50 1 -70 1 -1A4 1 -1A5 1 -278 1 -51 1 -71 1 -2A0 1 -138 1 -52 1 -72 1 -154 1 -155 1 -156 1 -157 1 -158 1 -159 1 -210 1 -211 1 -212 1 -213 1 -2B3 1 -36C 1 -1A6 1 -280 1 -279 1 -2B4 1 -27A 1 -27B 1 -2B5 1 -27C 1 -27D 1 -27E 1 -27F 1 -281 1 -2B6 1 -53 1 -73 1 -15A 1 -15B 1 -15C 1 -15D 1 -15E 1 -15F 1 -17F 1 -218 1 -219 1 -2E2 1 -DF 1 -160 1 -161 1 -282 1 -1A9 1 -283 1 -1AA 1 -285 1 -286 1 -54 1 -74 1 -162 1 -163 1 -164 1 -165 1 -21A 1 -21B 1 -36D 1 -2A8 1 -1BE 1 -2A6 1 -2A7 1 -166 1 -167 1 -1AB 1 -1AC 1 -1AD 1 -1AE 1 -288 1 -236 1 -287 1 -55 1 -75 1 -D9 1 -DA 1 -DB 1 -DC 1 -F9 1 -FA 1 -FB 1 -FC 1 -168 1 -169 1 -16A 1 -16B 1 -16C 1 -16D 1 -16E 1 -16F 1 -170 1 -171 1 -172 1 -173 1 -1AF 1 -1B0 1 -1D3 1 -1D4 1 -1D5 1 -1D6 1 -1D7 1 -1D8 1 -1D9 1 -1DA 1 -1DB 1 -1DC 1 -214 1 -215 1 -216 1 -217 1 -367 1 -289 1 -265 1 -2AE 1 -2AF 1 -19C 1 -26F 1 -270 1 -1B1 1 -28A 1 -56 1 -76 1 -36E 1 -1B2 1 -28B 1 -28C 1 -57 1 -77 1 -174 1 -175 1 -2B7 1 -28D 1 -58 1 -78 1 -2E3 1 -36F 1 -59 1 -79 1 -DD 1 -FD 1 -FF 1 -176 1 -177 1 -178 1 -232 1 -233 1 -2B8 1 -28F 1 -1B3 1 -1B4 1 -5A 1 -7A 1 -179 1 -17A 1 -17B 1 -17C 1 -18D 1 -17D 1 -17E 1 -1B5 1 -1B6 1 -224 1 -225 1 -290 1 -291 1 -1B7 1 -1EE 1 -1EF 1 -292 1 -1B8 1 -1B9 1 -1BA 1 -293 1 -21C 1 -21D 1 -DE 1 -FE 1 -1BF 1 -1F7 1 -1BB 1 -1A7 1 -1A8 1 -1BC 1 -1BD 1 -184 1 -185 1 -294 1 -2C0 1 -2BC 1 -149 1 -2EE 1 -2BE 1 -295 1 -2E4 1 -2BF 1 -2C1 1 -2A1 1 -2A2 1 -296 1 -1C0 1 -1C1 1 -1C2 1 -1C3 1 -297 1 -298 1 -2AC 1 -2AD 1 -386 1 -391 1 -3AC 1 -3B1 1 -392 1 -3B2 1 -3D0 1 -393 1 -3B3 1 -394 1 -3B4 1 -388 1 -395 1 -3AD 1 -3B5 1 -3F5 1 -3DC 1 -3DD 1 -3DA 1 -3DB 1 -396 1 -3B6 1 -389 1 -397 1 -3AE 1 -3B7 1 -398 1 -3B8 1 -3D1 1 -3F4 1 -37A 1 -38A 1 -390 1 -399 1 -3AA 1 -3AF 1 -3B9 1 -3CA 1 -3F3 1 -39A 1 -3BA 1 -3F0 1 -3D7 1 -39B 1 -3BB 1 -B5 1 -39C 1 -3BC 1 -39D 1 -3BD 1 -39E 1 -3BE 1 -38C 1 -39F 1 -3BF 1 -3CC 1 -3A0 1 -3C0 1 -3D6 1 -3DE 1 -3DF 1 -3D8 1 -3D9 1 -3A1 1 -3C1 1 -3F1 1 -3A3 1 -3C2 1 -3C3 1 -3F2 1 -3F9 1 -3A4 1 -3C4 1 -38E 1 -3A5 1 -3AB 1 -3B0 1 -3C5 1 -3CB 1 -3CD 1 -3D2 1 -3D3 1 -3D4 1 -3A6 1 -3C6 1 -3D5 1 -3A7 1 -3C7 1 -3A8 1 -3C8 1 -38F 1 -3A9 1 -3C9 1 -3CE 1 -3E0 1 -3E1 1 -3F7 1 -3F8 1 -3FA 1 -3FB 1 -3E2 1 -3E3 1 -3E4 1 -3E5 1 -3E6 1 -3E7 1 -3E8 1 -3E9 1 -3EA 1 -3EB 1 -3EC 1 -3ED 1 -3EE 1 -3EF 1 -410 1 -430 1 -4D0 1 -4D1 1 -4D2 1 -4D3 1 -4D8 1 -4D9 1 -4DA 1 -4DB 1 -4D4 1 -4D5 1 -411 1 -431 1 -412 1 -432 1 -413 1 -433 1 -490 1 -491 1 -492 1 -493 1 -494 1 -495 1 -414 1 -434 1 -500 1 -501 1 -402 1 -452 1 -502 1 -503 1 -403 1 -453 1 -498 1 -499 1 -400 1 -401 1 -415 1 -435 1 -450 1 -451 1 -4D6 1 -4D7 1 -404 1 -454 1 -416 1 -436 1 -4C1 1 -4C2 1 -4DC 1 -4DD 1 -496 1 -497 1 -417 1 -437 1 -504 1 -505 1 -4DE 1 -4DF 1 -405 1 -455 1 -4E0 1 -4E1 1 -506 1 -507 1 -40D 1 -418 1 -438 1 -45D 1 -4E2 1 -4E3 1 -48A 1 -48B 1 -4E4 1 -4E5 1 -406 1 -456 1 -407 1 -457 1 -419 1 -439 1 -408 1 -458 1 -41A 1 -43A 1 -49A 1 -49B 1 -4C3 1 -4C4 1 -4A0 1 -4A1 1 -49E 1 -49F 1 -49C 1 -49D 1 -41B 1 -43B 1 -4C5 1 -4C6 1 -409 1 -459 1 -508 1 -509 1 -41C 1 -43C 1 -4CD 1 -4CE 1 -41D 1 -43D 1 -4C9 1 -4CA 1 -4A2 1 -4A3 1 -4C7 1 -4C8 1 -4A4 1 -4A5 1 -40A 1 -45A 1 -50A 1 -50B 1 -41E 1 -43E 1 -4E6 1 -4E7 1 -4E8 1 -4E9 1 -4EA 1 -4EB 1 -41F 1 -43F 1 -4A6 1 -4A7 1 -480 1 -481 1 -420 1 -440 1 -48E 1 -48F 1 -421 1 -441 1 -50C 1 -50D 1 -4AA 1 -4AB 1 -422 1 -442 1 -50E 1 -50F 1 -4AC 1 -4AD 1 -40B 1 -45B 1 -40C 1 -45C 1 -423 1 -443 1 -4EE 1 -4EF 1 -40E 1 -45E 1 -4F0 1 -4F1 1 -4F2 1 -4F3 1 -4AE 1 -4AF 1 -4B0 1 -4B1 1 -478 1 -479 1 -424 1 -444 1 -425 1 -445 1 -4B2 1 -4B3 1 -4BA 1 -4BB 1 -460 1 -461 1 -47E 1 -47F 1 -47C 1 -47D 1 -47A 1 -47B 1 -426 1 -446 1 -4B4 1 -4B5 1 -427 1 -447 1 -4F4 1 -4F5 1 -4B6 1 -4B7 1 -4CB 1 -4CC 1 -4B8 1 -4B9 1 -4BC 1 -4BD 1 -4BE 1 -4BF 1 -40F 1 -45F 1 -428 1 -448 1 -429 1 -449 1 -42A 1 -44A 1 -42B 1 -44B 1 -4F8 1 -4F9 1 -42C 1 -44C 1 -48C 1 -48D 1 -462 1 -463 1 -42D 1 -44D 1 -4EC 1 -4ED 1 -42E 1 -44E 1 -42F 1 -44F 1 -464 1 -465 1 -466 1 -467 1 -46A 1 -46B 1 -468 1 -469 1 -46C 1 -46D 1 -46E 1 -46F 1 -470 1 -471 1 -472 1 -473 1 -474 1 -475 1 -476 1 -477 1 -4A8 1 -4A9 1 -4C0 1 -531 1 -561 1 -532 1 -562 1 -533 1 -563 1 -534 1 -564 1 -535 1 -565 1 -587 1 -536 1 -566 1 -537 1 -567 1 -538 1 -568 1 -539 1 -569 1 -53A 1 -56A 1 -53B 1 -56B 1 -53C 1 -56C 1 -53D 1 -56D 1 -53E 1 -56E 1 -53F 1 -56F 1 -540 1 -570 1 -541 1 -571 1 -542 1 -572 1 -543 1 -573 1 -544 1 -574 1 -545 1 -575 1 -546 1 -576 1 -547 1 -577 1 -548 1 -578 1 -549 1 -579 1 -54A 1 -57A 1 -54B 1 -57B 1 -54C 1 -57C 1 -54D 1 -57D 1 -54E 1 -57E 1 -54F 1 -57F 1 -550 1 -580 1 -551 1 -581 1 -552 1 -582 1 -553 1 -583 1 -554 1 -584 1 -555 1 -585 1 -556 1 -586 1 -559 1 -5D0 1 -5D1 1 -5D2 1 -5D3 1 -5D4 1 -5D5 1 -5F0 1 -5F1 1 -5D6 1 -5D7 1 -5D8 1 -5D9 1 -5F2 1 -5DA 1 -5DB 1 -5DC 1 -5DD 1 -5DE 1 -5DF 1 -5E0 1 -5E1 1 -5E2 1 -5E3 1 -5E4 1 -5E5 1 -5E6 1 -5E7 1 -5E8 1 -5E9 1 -5EA 1 -621 1 -674 1 -6FD 1 -622 1 -623 1 -672 1 -671 1 -624 1 -625 1 -673 1 -626 1 -627 1 -675 1 -66E 1 -628 1 -67B 1 -67E 1 -680 1 -629 1 -62A 1 -62B 1 -679 1 -67A 1 -67C 1 -67D 1 -67F 1 -62C 1 -683 1 -684 1 -686 1 -6BF 1 -687 1 -62D 1 -62E 1 -681 1 -682 1 -685 1 -62F 1 -630 1 -688 1 -689 1 -68A 1 -68B 1 -68C 1 -68D 1 -68E 1 -68F 1 -690 1 -6EE 1 -631 1 -632 1 -691 1 -692 1 -693 1 -694 1 -695 1 -696 1 -697 1 -698 1 -699 1 -6EF 1 -633 1 -634 1 -69A 1 -69B 1 -69C 1 -6FA 1 -635 1 -636 1 -69D 1 -69E 1 -6FB 1 -637 1 -638 1 -69F 1 -639 1 -63A 1 -6A0 1 -6FC 1 -641 1 -6A1 1 -6A2 1 -6A3 1 -6A4 1 -6A5 1 -6A6 1 -66F 1 -642 1 -6A7 1 -6A8 1 -643 1 -6A9 1 -6AA 1 -6AB 1 -6AC 1 -6AD 1 -6AE 1 -6AF 1 -6B0 1 -6B1 1 -6B2 1 -6B3 1 -6B4 1 -644 1 -6B5 1 -6B6 1 -6B7 1 -6B8 1 -645 1 -6FE 1 -646 1 -6BA 1 -6BB 1 -6BC 1 -6BD 1 -6B9 1 -647 1 -6BE 1 -6C1 1 -6C2 1 -6C3 1 -6FF 1 -6C0 1 -6D5 1 -648 1 -6E5 1 -676 1 -6C4 1 -6C5 1 -6C6 1 -6C7 1 -677 1 -6C8 1 -6C9 1 -6CA 1 -6CB 1 -6CF 1 -649 1 -64A 1 -6E6 1 -678 1 -6CC 1 -6CD 1 -6CE 1 -6D0 1 -6D1 1 -6D2 1 -6D3 1 -710 1 -712 1 -72D 1 -713 1 -714 1 -72E 1 -716 1 -715 1 -72F 1 -717 1 -718 1 -719 1 -74D 1 -71A 1 -71B 1 -71C 1 -71D 1 -71E 1 -71F 1 -74E 1 -720 1 -721 1 -722 1 -723 1 -724 1 -725 1 -726 1 -727 1 -74F 1 -728 1 -729 1 -72A 1 -72B 1 -72C 1 -780 1 -799 1 -79A 1 -781 1 -782 1 -783 1 -79C 1 -784 1 -785 1 -786 1 -787 1 -7A2 1 -7A3 1 -788 1 -7A5 1 -789 1 -78A 1 -78B 1 -79B 1 -78C 1 -798 1 -7A0 1 -7A1 1 -78D 1 -78E 1 -7A4 1 -78F 1 -790 1 -79D 1 -79E 1 -79F 1 -791 1 -792 1 -793 1 -794 1 -795 1 -796 1 -797 1 -7B1 1 -7A6 1 -7A7 1 -7A8 1 -7A9 1 -7AA 1 -7AB 1 -7AC 1 -7AD 1 -7AE 1 -7AF 1 -7B0 1 -4E00 1 -4E01 1 -4E02 1 -4E03 1 -4E04 1 -4E05 1 -4E06 1 -4E07 1 -4E08 1 -4E09 1 -4E0A 1 -4E0B 1 -4E0C 1 -4E0D 1 -4E0E 1 -4E0F 1 -4E10 1 -4E11 1 -4E12 1 -4E13 1 -4E14 1 -4E15 1 -4E16 1 -4E17 1 -4E18 1 -4E19 1 -4E1A 1 -4E1B 1 -4E1C 1 -4E1D 1 -4E1E 1 -4E1F 1 -4E20 1 -4E21 1 -4E22 1 -4E23 1 -4E24 1 -4E25 1 -4E26 1 -4E27 1 -4E28 1 -4E29 1 -4E2A 1 -4E2B 1 -4E2C 1 -4E2D 1 -4E2E 1 -4E2F 1 -4E30 1 -4E31 1 -4E32 1 -4E33 1 -4E34 1 -4E35 1 -4E36 1 -4E37 1 -4E38 1 -4E39 1 -4E3A 1 -4E3B 1 -4E3C 1 -4E3D 1 -4E3E 1 -4E3F 1 -4E40 1 -4E41 1 -4E42 1 -4E43 1 -4E44 1 -4E45 1 -4E46 1 -4E47 1 -4E48 1 -4E49 1 -4E4A 1 -4E4B 1 -4E4C 1 -4E4D 1 -4E4E 1 -4E4F 1 -4E50 1 -4E51 1 -4E52 1 -4E53 1 -4E54 1 -4E55 1 -4E56 1 -4E57 1 -4E58 1 -4E59 1 -4E5A 1 -4E5B 1 -4E5C 1 -4E5D 1 -4E5E 1 -4E5F 1 -4E60 1 -4E61 1 -4E62 1 -4E63 1 -4E64 1 -4E65 1 -4E66 1 -4E67 1 -4E68 1 -4E69 1 -4E6A 1 -4E6B 1 -4E6C 1 -4E6D 1 -4E6E 1 -4E6F 1 -4E70 1 -4E71 1 -4E72 1 -4E73 1 -4E74 1 -4E75 1 -4E76 1 -4E77 1 -4E78 1 -4E79 1 -4E7A 1 -4E7B 1 -4E7C 1 -4E7D 1 -4E7E 1 -4E7F 1 -4E80 1 -4E81 1 -4E82 1 -4E83 1 -4E84 1 -4E85 1 -4E86 1 -4E87 1 -4E88 1 -4E89 1 -4E8A 1 -4E8B 1 -4E8C 1 -4E8D 1 -4E8E 1 -4E8F 1 -4E90 1 -4E91 1 -4E92 1 -4E93 1 -4E94 1 -4E95 1 -4E96 1 -4E97 1 -4E98 1 -4E99 1 -4E9A 1 -4E9B 1 -4E9C 1 -4E9D 1 -4E9E 1 -4E9F 1 -4EA0 1 -4EA1 1 -4EA2 1 -4EA3 1 -4EA4 1 -4EA5 1 -4EA6 1 -4EA7 1 -4EA8 1 -4EA9 1 -4EAA 1 -4EAB 1 -4EAC 1 -4EAD 1 -4EAE 1 -4EAF 1 -4EB0 1 -4EB1 1 -4EB2 1 -4EB3 1 -4EB4 1 -4EB5 1 -4EB6 1 -4EB7 1 -4EB8 1 -4EB9 1 -4EBA 1 -4EBB 1 -4EBC 1 -4EBD 1 -4EBE 1 -4EBF 1 -4EC0 1 -4EC1 1 -4EC2 1 -4EC3 1 -4EC4 1 -4EC5 1 -4EC6 1 -4EC7 1 -4EC8 1 -4EC9 1 -4ECA 1 -4ECB 1 -4ECC 1 -4ECD 1 -4ECE 1 -4ECF 1 -4ED0 1 -4ED1 1 -4ED2 1 -4ED3 1 -4ED4 1 -4ED5 1 -4ED6 1 -4ED7 1 -4ED8 1 -4ED9 1 -4EDA 1 -4EDB 1 -4EDC 1 -4EDD 1 -4EDE 1 -4EDF 1 -4EE0 1 -4EE1 1 -4EE2 1 -4EE3 1 -4EE4 1 -4EE5 1 -4EE6 1 -4EE7 1 -4EE8 1 -4EE9 1 -4EEA 1 -4EEB 1 -4EEC 1 -4EED 1 -4EEE 1 -4EEF 1 -4EF0 1 -4EF1 1 -4EF2 1 -4EF3 1 -4EF4 1 -4EF5 1 -4EF6 1 -4EF7 1 -4EF8 1 -4EF9 1 -4EFA 1 -4EFB 1 -4EFC 1 -4EFD 1 -4EFE 1 -4EFF 1 -4F00 1 -4F01 1 -4F02 1 -4F03 1 -4F04 1 -4F05 1 -4F06 1 -4F07 1 -4F08 1 -4F09 1 -4F0A 1 -4F0B 1 -4F0C 1 -4F0D 1 -4F0E 1 -4F0F 1 -4F10 1 -4F11 1 -4F12 1 -4F13 1 -4F14 1 -4F15 1 -4F16 1 -4F17 1 -4F18 1 -4F19 1 -4F1A 1 -4F1B 1 -4F1C 1 -4F1D 1 -4F1E 1 -4F1F 1 -4F20 1 -4F21 1 -4F22 1 -4F23 1 -4F24 1 -4F25 1 -4F26 1 -4F27 1 -4F28 1 -4F29 1 -4F2A 1 -4F2B 1 -4F2C 1 -4F2D 1 -4F2E 1 -4F2F 1 -4F30 1 -4F31 1 -4F32 1 -4F33 1 -4F34 1 -4F35 1 -4F36 1 -4F37 1 -4F38 1 -4F39 1 -4F3A 1 -4F3B 1 -4F3C 1 -4F3D 1 -4F3E 1 -4F3F 1 -4F40 1 -4F41 1 -4F42 1 -4F43 1 -4F44 1 -4F45 1 -4F46 1 -4F47 1 -4F48 1 -4F49 1 -4F4A 1 -4F4B 1 -4F4C 1 -4F4D 1 -4F4E 1 -4F4F 1 -4F50 1 -4F51 1 -4F52 1 -4F53 1 -4F54 1 -4F55 1 -4F56 1 -4F57 1 -4F58 1 -4F59 1 -4F5A 1 -4F5B 1 -4F5C 1 -4F5D 1 -4F5E 1 -4F5F 1 -4F60 1 -4F61 1 -4F62 1 -4F63 1 -4F64 1 -4F65 1 -4F66 1 -4F67 1 -4F68 1 -4F69 1 -4F6A 1 -4F6B 1 -4F6C 1 -4F6D 1 -4F6E 1 -4F6F 1 -4F70 1 -4F71 1 -4F72 1 -4F73 1 -4F74 1 -4F75 1 -4F76 1 -4F77 1 -4F78 1 -4F79 1 -4F7A 1 -4F7B 1 -4F7C 1 -4F7D 1 -4F7E 1 -4F7F 1 -4F80 1 -4F81 1 -4F82 1 -4F83 1 -4F84 1 -4F85 1 -4F86 1 -4F87 1 -4F88 1 -4F89 1 -4F8A 1 -4F8B 1 -4F8C 1 -4F8D 1 -4F8E 1 -4F8F 1 -4F90 1 -4F91 1 -4F92 1 -4F93 1 -4F94 1 -4F95 1 -4F96 1 -4F97 1 -4F98 1 -4F99 1 -4F9A 1 -4F9B 1 -4F9C 1 -4F9D 1 -4F9E 1 -4F9F 1 -4FA0 1 -4FA1 1 -4FA2 1 -4FA3 1 -4FA4 1 -4FA5 1 -4FA6 1 -4FA7 1 -4FA8 1 -4FA9 1 -4FAA 1 -4FAB 1 -4FAC 1 -4FAD 1 -4FAE 1 -4FAF 1 -4FB0 1 -4FB1 1 -4FB2 1 -4FB3 1 -4FB4 1 -4FB5 1 -4FB6 1 -4FB7 1 -4FB8 1 -4FB9 1 -4FBA 1 -4FBB 1 -4FBC 1 -4FBD 1 -4FBE 1 -4FBF 1 -4FC0 1 -4FC1 1 -4FC2 1 -4FC3 1 -4FC4 1 -4FC5 1 -4FC6 1 -4FC7 1 -4FC8 1 -4FC9 1 -4FCA 1 -4FCB 1 -4FCC 1 -4FCD 1 -4FCE 1 -4FCF 1 -4FD0 1 -4FD1 1 -4FD2 1 -4FD3 1 -4FD4 1 -4FD5 1 -4FD6 1 -4FD7 1 -4FD8 1 -4FD9 1 -4FDA 1 -4FDB 1 -4FDC 1 -4FDD 1 -4FDE 1 -4FDF 1 -4FE0 1 -4FE1 1 -4FE2 1 -4FE3 1 -4FE4 1 -4FE5 1 -4FE6 1 -4FE7 1 -4FE8 1 -4FE9 1 -4FEA 1 -4FEB 1 -4FEC 1 -4FED 1 -4FEE 1 -4FEF 1 -4FF0 1 -4FF1 1 -4FF2 1 -4FF3 1 -4FF4 1 -4FF5 1 -4FF6 1 -4FF7 1 -4FF8 1 -4FF9 1 -4FFA 1 -4FFB 1 -4FFC 1 -4FFD 1 -4FFE 1 -4FFF 1 -237 1 -238 1 -239 1 -23A 1 -23B 1 -23C 1 -23D 1 -23E 1 -23F 1 -240 1 -241 1 -242 1 -243 1 -244 1 -245 1 -246 1 -247 1 -248 1 -249 1 -24A 1 -24B 1 -24C 1 -24D 1 -24E 1 -24F 1 -358 1 -359 1 -35A 1 -35B 1 -35C 1 -370 1 -371 1 -372 1 -373 1 -376 1 -377 1 -378 1 -379 1 -37B 1 -37C 1 -37D 1 -37F 1 -380 1 -381 1 -382 1 -383 1 -38B 1 -38D 1 -3A2 1 -3CF 1 -3FC 1 -3FD 1 -3FE 1 -3FF 1 -487 1 -4CF 1 -4F6 1 -4F7 1 -4FA 1 -4FB 1 -4FC 1 -4FD 1 -4FE 1 -4FF 1 -510 1 -511 1 -512 1 -513 1 -514 1 -515 1 -516 1 -517 1 -518 1 -519 1 -51A 1 -51B 1 -51C 1 -51D 1 -51E 1 -51F 1 -520 1 -521 1 -522 1 -523 1 -524 1 -525 1 -526 1 -527 1 -528 1 -529 1 -52A 1 -52B 1 -52C 1 -52D 1 -52E 1 -52F 1 -530 1 -557 1 -558 1 -560 1 -588 1 -58B 1 -58C 1 -58D 1 -58E 1 -58F 1 -590 1 -5A2 1 -5BA 1 -5C5 1 -5C6 1 -5C7 1 -5C8 1 -5C9 1 -5CA 1 -5CB 1 -5CC 1 -5CD 1 -5CE 1 -5CF 1 -5EB 1 -5EC 1 -5ED 1 -5EE 1 -5EF 1 -5F5 1 -5F6 1 -5F7 1 -5F8 1 -5F9 1 -5FA 1 -5FB 1 -5FC 1 -5FD 1 -5FE 1 -5FF 1 -604 1 -605 1 -606 1 -607 1 -608 1 -609 1 -60A 1 -60B 1 -616 1 -617 1 -618 1 -619 1 -61A 1 -61C 1 -61D 1 -61E 1 -620 1 -63B 1 -63C 1 -63D 1 -63E 1 -63F 1 -659 1 -65A 1 -65B 1 -65C 1 -65D 1 -65E 1 -65F 1 -70E 1 -74B 1 -74C 1 -750 1 -751 1 -752 1 -753 1 -754 1 -755 1 -756 1 -757 1 -758 1 -759 1 -75A 1 -75B 1 -75C 1 -75D 1 -75E 1 -75F 1 -760 1 -761 1 -762 1 -763 1 -764 1 -765 1 -766 1 -767 1 -768 1 -769 1 -76A 1 -76B 1 -76C 1 -76D 1 -76E 1 -76F 1 -770 1 -771 1 -772 1 -773 1 -774 1 -775 1 -776 1 -777 1 -778 1 -779 1 -77A 1 -77B 1 -77C 1 -77D 1 -77E 1 -77F 1 -7B2 1 -7B3 1 -7B4 1 -7B5 1 -7B6 1 -7B7 1 -7B8 1 -7B9 1 -7BA 1 -7BB 1 -7BC 1 -7BD 1 -7BE 1 -7BF 1 -7C0 1 -7C1 1 -7C2 1 -7C3 1 -7C4 1 -7C5 1 -7C6 1 -7C7 1 -7C8 1 -7C9 1 -7CA 1 -7CB 1 -7CC 1 -7CD 1 -7CE 1 -7CF 1 -7D0 1 -7D1 1 -7D2 1 -7D3 1 -7D4 1 -7D5 1 -7D6 1 -7D7 1 -7D8 1 -7D9 1 -7DA 1 -7DB 1 -7DC 1 -7DD 1 -7DE 1 -7DF 1 -7E0 1 -7E1 1 -7E2 1 -7E3 1 -7E4 1 -7E5 1 -7E6 1 -7E7 1 -7E8 1 -7E9 1 -7EA 1 -7EB 1 -7EC 1 -7ED 1 -7EE 1 -7EF 1 -7F0 1 -7F1 1 -7F2 1 -7F3 1 -7F4 1 -7F5 1 -7F6 1 -7F7 1 -7F8 1 -7F9 1 -7FA 1 -7FB 1 -7FC 1 -7FD 1 -7FE 1 -7FF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -SET NAMES utf8; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=NDB CHARACTER SET utf8; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_general_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_slovenian_ci; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -85 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -300 1 -301 1 -302 1 -303 1 -304 1 -305 1 -306 1 -307 1 -308 1 -309 1 -30A 1 -30B 1 -30C 1 -30D 1 -30E 1 -30F 1 -310 1 -311 1 -312 1 -313 1 -314 1 -315 1 -316 1 -317 1 -318 1 -319 1 -31A 1 -31B 1 -31C 1 -31D 1 -31E 1 -31F 1 -320 1 -321 1 -322 1 -323 1 -324 1 -325 1 -326 1 -327 1 -328 1 -329 1 -32A 1 -32B 1 -32C 1 -32D 1 -32E 1 -32F 1 -330 1 -331 1 -332 1 -333 1 -334 1 -335 1 -336 1 -337 1 -338 1 -339 1 -33A 1 -33B 1 -33C 1 -33D 1 -33E 1 -33F 1 -340 1 -341 1 -342 1 -343 1 -344 1 -345 1 -346 1 -347 1 -348 1 -349 1 -34A 1 -34B 1 -34C 1 -34D 1 -34E 1 -34F 1 -350 1 -351 1 -352 1 -353 1 -354 1 -355 1 -356 1 -357 1 -35D 1 -35E 1 -35F 1 -360 1 -361 1 -362 1 -483 1 -484 1 -485 1 -486 1 -488 1 -489 1 -591 1 -592 1 -593 1 -594 1 -595 1 -596 1 -597 1 -598 1 -599 1 -59A 1 -59B 1 -59C 1 -59D 1 -59E 1 -59F 1 -5A0 1 -5A1 1 -5A3 1 -5A4 1 -5A5 1 -5A6 1 -5A7 1 -5A8 1 -5A9 1 -5AA 1 -5AB 1 -5AC 1 -5AD 1 -5AE 1 -5AF 1 -5B0 1 -5B1 1 -5B2 1 -5B3 1 -5B4 1 -5B5 1 -5B6 1 -5B7 1 -5B8 1 -5B9 1 -5BB 1 -5BC 1 -5BD 1 -5BF 1 -5C1 1 -5C2 1 -5C4 1 -600 1 -601 1 -602 1 -603 1 -610 1 -611 1 -612 1 -613 1 -614 1 -615 1 -64B 1 -64C 1 -64D 1 -64E 1 -64F 1 -650 1 -651 1 -652 1 -653 1 -654 1 -655 1 -656 1 -657 1 -658 1 -670 1 -6D6 1 -6D7 1 -6D8 1 -6D9 1 -6DA 1 -6DB 1 -6DC 1 -6DD 1 -6DE 1 -6DF 1 -6E0 1 -6E1 1 -6E2 1 -6E3 1 -6E4 1 -6E7 1 -6E8 1 -6EA 1 -6EB 1 -6EC 1 -6ED 1 -70F 1 -711 1 -730 1 -731 1 -732 1 -733 1 -734 1 -735 1 -736 1 -737 1 -738 1 -739 1 -73A 1 -73B 1 -73C 1 -73D 1 -73E 1 -73F 1 -740 1 -741 1 -742 1 -743 1 -744 1 -745 1 -746 1 -747 1 -748 1 -749 1 -74A 1 -640 1 -60 1 -B4 1 -384 1 -2DC 1 -5E 1 -AF 1 -2D8 1 -2D9 1 -A8 1 -385 1 -2DA 1 -2DD 1 -B8 1 -2DB 1 -5F 1 -AD 1 -2D 1 -58A 1 -2C 1 -55D 1 -60C 1 -60D 1 -66B 1 -66C 1 -3B 1 -37E 1 -61B 1 -3A 1 -589 1 -703 1 -704 1 -705 1 -706 1 -707 1 -708 1 -21 1 -A1 1 -55C 1 -3F 1 -BF 1 -55E 1 -61F 1 -709 1 -2E 1 -6D4 1 -701 1 -702 1 -B7 1 -387 1 -700 1 -27 1 -22 1 -AB 1 -BB 1 -28 1 -29 1 -5B 1 -7B 1 -7D 1 -A7 1 -B6 1 -A9 1 -AE 1 -40 1 -2A 1 -66D 1 -2F 1 -26 1 -23 1 -25 1 -66A 1 -55A 1 -55B 1 -55F 1 -5BE 1 -5C0 1 -5C3 1 -5F3 1 -5F4 1 -70A 1 -70B 1 -70C 1 -70D 1 -2B9 1 -374 1 -375 1 -2BA 1 -2C2 1 -2C3 1 -2C4 1 -2C5 1 -2C6 1 -2C7 1 -2C8 1 -2C9 1 -2CA 1 -2CB 1 -2CC 1 -2CD 1 -2CE 1 -2CF 1 -2D2 1 -2D3 1 -2D4 1 -2D5 1 -2D6 1 -2D7 1 -2DE 1 -2DF 1 -2E5 1 -2E6 1 -2E7 1 -2E8 1 -2E9 1 -2EA 1 -2EB 1 -2EC 1 -2ED 1 -2EF 1 -2F0 1 -2F1 1 -2F2 1 -2F3 1 -2F4 1 -2F5 1 -2F6 1 -2F7 1 -2F8 1 -2F9 1 -2FA 1 -2FB 1 -2FC 1 -2FD 1 -2FE 1 -2FF 1 -B0 1 -482 1 -60E 1 -60F 1 -6E9 1 -3F6 1 -2B 1 -B1 1 -F7 1 -D7 1 -3C 1 -3D 1 -3E 1 -AC 1 -7C 1 -A6 1 -7E 1 -2D0 1 -2D1 1 -A4 1 -A2 1 -24 1 -A3 1 -A5 1 -30 1 -660 1 -6F0 1 -31 1 -B9 1 -661 1 -6F1 1 -BD 1 -BC 1 -32 1 -B2 1 -662 1 -6F2 1 -33 1 -B3 1 -663 1 -6F3 1 -BE 1 -34 1 -664 1 -6F4 1 -35 1 -665 1 -6F5 1 -36 1 -666 1 -6F6 1 -37 1 -667 1 -6F7 1 -38 1 -668 1 -6F8 1 -39 1 -669 1 -6F9 1 -41 1 -61 1 -AA 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -100 1 -101 1 -102 1 -103 1 -104 1 -105 1 -1CD 1 -1CE 1 -1DE 1 -1DF 1 -1E0 1 -1E1 1 -1FA 1 -1FB 1 -200 1 -201 1 -202 1 -203 1 -226 1 -227 1 -363 1 -C6 1 -E6 1 -1E2 1 -1E3 1 -1FC 1 -1FD 1 -250 1 -251 1 -252 1 -42 1 -62 1 -299 1 -180 1 -181 1 -253 1 -182 1 -183 1 -43 1 -63 1 -C7 1 -E7 1 -106 1 -107 1 -108 1 -109 1 -10A 1 -10B 1 -368 1 -10C 1 -10D 1 -187 1 -188 1 -255 1 -44 1 -64 1 -10E 1 -10F 1 -369 1 -1C4 1 -1C5 1 -1C6 1 -1F1 1 -1F2 1 -1F3 1 -2A3 1 -2A5 1 -2A4 1 -110 1 -111 1 -189 1 -256 1 -18A 1 -257 1 -18B 1 -18C 1 -221 1 -D0 1 -F0 1 -45 1 -65 1 -C8 1 -C9 1 -CA 1 -CB 1 -E8 1 -E9 1 -EA 1 -EB 1 -112 1 -113 1 -114 1 -115 1 -116 1 -117 1 -118 1 -119 1 -11A 1 -11B 1 -204 1 -205 1 -206 1 -207 1 -228 1 -229 1 -364 1 -18E 1 -1DD 1 -18F 1 -259 1 -190 1 -25B 1 -258 1 -25A 1 -25C 1 -25D 1 -25E 1 -29A 1 -264 1 -46 1 -66 1 -2A9 1 -191 1 -192 1 -47 1 -67 1 -11C 1 -11D 1 -11E 1 -11F 1 -120 1 -121 1 -122 1 -123 1 -1E6 1 -1E7 1 -1F4 1 -1F5 1 -261 1 -262 1 -1E4 1 -1E5 1 -193 1 -260 1 -29B 1 -194 1 -263 1 -2E0 1 -1A2 1 -1A3 1 -48 1 -68 1 -124 1 -125 1 -21E 1 -21F 1 -2B0 1 -36A 1 -29C 1 -195 1 -1F6 1 -126 1 -127 1 -266 1 -2B1 1 -267 1 -2BB 1 -2BD 1 -49 1 -69 1 -CC 1 -CD 1 -CE 1 -CF 1 -EC 1 -ED 1 -EE 1 -EF 1 -128 1 -129 1 -12A 1 -12B 1 -12C 1 -12D 1 -12E 1 -12F 1 -130 1 -1CF 1 -1D0 1 -208 1 -209 1 -20A 1 -20B 1 -365 1 -132 1 -133 1 -131 1 -26A 1 -197 1 -268 1 -196 1 -269 1 -4A 1 -6A 1 -134 1 -135 1 -1F0 1 -2B2 1 -29D 1 -25F 1 -284 1 -4B 1 -6B 1 -136 1 -137 1 -1E8 1 -1E9 1 -198 1 -199 1 -29E 1 -4C 1 -6C 1 -139 1 -13A 1 -13B 1 -13C 1 -13D 1 -13E 1 -2E1 1 -13F 1 -140 1 -1C7 1 -1C8 1 -1C9 1 -2AA 1 -2AB 1 -29F 1 -141 1 -142 1 -19A 1 -26B 1 -26C 1 -26D 1 -234 1 -26E 1 -19B 1 -28E 1 -4D 1 -6D 1 -36B 1 -271 1 -4E 1 -6E 1 -D1 1 -F1 1 -143 1 -144 1 -145 1 -146 1 -147 1 -148 1 -1F8 1 -1F9 1 -1CA 1 -1CB 1 -1CC 1 -274 1 -19D 1 -272 1 -19E 1 -220 1 -273 1 -235 1 -14A 1 -14B 1 -4F 1 -6F 1 -BA 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -14C 1 -14D 1 -14E 1 -14F 1 -150 1 -151 1 -1A0 1 -1A1 1 -1D1 1 -1D2 1 -1EA 1 -1EB 1 -1EC 1 -1ED 1 -20C 1 -20D 1 -20E 1 -20F 1 -22A 1 -22B 1 -22C 1 -22D 1 -22E 1 -22F 1 -230 1 -231 1 -366 1 -152 1 -153 1 -276 1 -D8 1 -F8 1 -1FE 1 -1FF 1 -186 1 -254 1 -19F 1 -275 1 -277 1 -222 1 -223 1 -50 1 -70 1 -1A4 1 -1A5 1 -278 1 -51 1 -71 1 -2A0 1 -138 1 -52 1 -72 1 -154 1 -155 1 -156 1 -157 1 -158 1 -159 1 -210 1 -211 1 -212 1 -213 1 -2B3 1 -36C 1 -1A6 1 -280 1 -279 1 -2B4 1 -27A 1 -27B 1 -2B5 1 -27C 1 -27D 1 -27E 1 -27F 1 -281 1 -2B6 1 -53 1 -73 1 -15A 1 -15B 1 -15C 1 -15D 1 -15E 1 -15F 1 -17F 1 -218 1 -219 1 -2E2 1 -DF 1 -160 1 -161 1 -282 1 -1A9 1 -283 1 -1AA 1 -285 1 -286 1 -54 1 -74 1 -162 1 -163 1 -164 1 -165 1 -21A 1 -21B 1 -36D 1 -2A8 1 -1BE 1 -2A6 1 -2A7 1 -166 1 -167 1 -1AB 1 -1AC 1 -1AD 1 -1AE 1 -288 1 -236 1 -287 1 -55 1 -75 1 -D9 1 -DA 1 -DB 1 -DC 1 -F9 1 -FA 1 -FB 1 -FC 1 -168 1 -169 1 -16A 1 -16B 1 -16C 1 -16D 1 -16E 1 -16F 1 -170 1 -171 1 -172 1 -173 1 -1AF 1 -1B0 1 -1D3 1 -1D4 1 -1D5 1 -1D6 1 -1D7 1 -1D8 1 -1D9 1 -1DA 1 -1DB 1 -1DC 1 -214 1 -215 1 -216 1 -217 1 -367 1 -289 1 -265 1 -2AE 1 -2AF 1 -19C 1 -26F 1 -270 1 -1B1 1 -28A 1 -56 1 -76 1 -36E 1 -1B2 1 -28B 1 -28C 1 -57 1 -77 1 -174 1 -175 1 -2B7 1 -28D 1 -58 1 -78 1 -2E3 1 -36F 1 -59 1 -79 1 -DD 1 -FD 1 -FF 1 -176 1 -177 1 -178 1 -232 1 -233 1 -2B8 1 -28F 1 -1B3 1 -1B4 1 -5A 1 -7A 1 -179 1 -17A 1 -17B 1 -17C 1 -18D 1 -17D 1 -17E 1 -1B5 1 -1B6 1 -224 1 -225 1 -290 1 -291 1 -1B7 1 -1EE 1 -1EF 1 -292 1 -1B8 1 -1B9 1 -1BA 1 -293 1 -21C 1 -21D 1 -DE 1 -FE 1 -1BF 1 -1F7 1 -1BB 1 -1A7 1 -1A8 1 -1BC 1 -1BD 1 -184 1 -185 1 -294 1 -2C0 1 -2BC 1 -149 1 -2EE 1 -2BE 1 -295 1 -2E4 1 -2BF 1 -2C1 1 -2A1 1 -2A2 1 -296 1 -1C0 1 -1C1 1 -1C2 1 -1C3 1 -297 1 -298 1 -2AC 1 -2AD 1 -386 1 -391 1 -3AC 1 -3B1 1 -392 1 -3B2 1 -3D0 1 -393 1 -3B3 1 -394 1 -3B4 1 -388 1 -395 1 -3AD 1 -3B5 1 -3F5 1 -3DC 1 -3DD 1 -3DA 1 -3DB 1 -396 1 -3B6 1 -389 1 -397 1 -3AE 1 -3B7 1 -398 1 -3B8 1 -3D1 1 -3F4 1 -37A 1 -38A 1 -390 1 -399 1 -3AA 1 -3AF 1 -3B9 1 -3CA 1 -3F3 1 -39A 1 -3BA 1 -3F0 1 -3D7 1 -39B 1 -3BB 1 -B5 1 -39C 1 -3BC 1 -39D 1 -3BD 1 -39E 1 -3BE 1 -38C 1 -39F 1 -3BF 1 -3CC 1 -3A0 1 -3C0 1 -3D6 1 -3DE 1 -3DF 1 -3D8 1 -3D9 1 -3A1 1 -3C1 1 -3F1 1 -3A3 1 -3C2 1 -3C3 1 -3F2 1 -3F9 1 -3A4 1 -3C4 1 -38E 1 -3A5 1 -3AB 1 -3B0 1 -3C5 1 -3CB 1 -3CD 1 -3D2 1 -3D3 1 -3D4 1 -3A6 1 -3C6 1 -3D5 1 -3A7 1 -3C7 1 -3A8 1 -3C8 1 -38F 1 -3A9 1 -3C9 1 -3CE 1 -3E0 1 -3E1 1 -3F7 1 -3F8 1 -3FA 1 -3FB 1 -3E2 1 -3E3 1 -3E4 1 -3E5 1 -3E6 1 -3E7 1 -3E8 1 -3E9 1 -3EA 1 -3EB 1 -3EC 1 -3ED 1 -3EE 1 -3EF 1 -410 1 -430 1 -4D0 1 -4D1 1 -4D2 1 -4D3 1 -4D8 1 -4D9 1 -4DA 1 -4DB 1 -4D4 1 -4D5 1 -411 1 -431 1 -412 1 -432 1 -413 1 -433 1 -490 1 -491 1 -492 1 -493 1 -494 1 -495 1 -414 1 -434 1 -500 1 -501 1 -402 1 -452 1 -502 1 -503 1 -403 1 -453 1 -498 1 -499 1 -400 1 -401 1 -415 1 -435 1 -450 1 -451 1 -4D6 1 -4D7 1 -404 1 -454 1 -416 1 -436 1 -4C1 1 -4C2 1 -4DC 1 -4DD 1 -496 1 -497 1 -417 1 -437 1 -504 1 -505 1 -4DE 1 -4DF 1 -405 1 -455 1 -4E0 1 -4E1 1 -506 1 -507 1 -40D 1 -418 1 -438 1 -45D 1 -4E2 1 -4E3 1 -48A 1 -48B 1 -4E4 1 -4E5 1 -406 1 -456 1 -407 1 -457 1 -419 1 -439 1 -408 1 -458 1 -41A 1 -43A 1 -49A 1 -49B 1 -4C3 1 -4C4 1 -4A0 1 -4A1 1 -49E 1 -49F 1 -49C 1 -49D 1 -41B 1 -43B 1 -4C5 1 -4C6 1 -409 1 -459 1 -508 1 -509 1 -41C 1 -43C 1 -4CD 1 -4CE 1 -41D 1 -43D 1 -4C9 1 -4CA 1 -4A2 1 -4A3 1 -4C7 1 -4C8 1 -4A4 1 -4A5 1 -40A 1 -45A 1 -50A 1 -50B 1 -41E 1 -43E 1 -4E6 1 -4E7 1 -4E8 1 -4E9 1 -4EA 1 -4EB 1 -41F 1 -43F 1 -4A6 1 -4A7 1 -480 1 -481 1 -420 1 -440 1 -48E 1 -48F 1 -421 1 -441 1 -50C 1 -50D 1 -4AA 1 -4AB 1 -422 1 -442 1 -50E 1 -50F 1 -4AC 1 -4AD 1 -40B 1 -45B 1 -40C 1 -45C 1 -423 1 -443 1 -4EE 1 -4EF 1 -40E 1 -45E 1 -4F0 1 -4F1 1 -4F2 1 -4F3 1 -4AE 1 -4AF 1 -4B0 1 -4B1 1 -478 1 -479 1 -424 1 -444 1 -425 1 -445 1 -4B2 1 -4B3 1 -4BA 1 -4BB 1 -460 1 -461 1 -47E 1 -47F 1 -47C 1 -47D 1 -47A 1 -47B 1 -426 1 -446 1 -4B4 1 -4B5 1 -427 1 -447 1 -4F4 1 -4F5 1 -4B6 1 -4B7 1 -4CB 1 -4CC 1 -4B8 1 -4B9 1 -4BC 1 -4BD 1 -4BE 1 -4BF 1 -40F 1 -45F 1 -428 1 -448 1 -429 1 -449 1 -42A 1 -44A 1 -42B 1 -44B 1 -4F8 1 -4F9 1 -42C 1 -44C 1 -48C 1 -48D 1 -462 1 -463 1 -42D 1 -44D 1 -4EC 1 -4ED 1 -42E 1 -44E 1 -42F 1 -44F 1 -464 1 -465 1 -466 1 -467 1 -46A 1 -46B 1 -468 1 -469 1 -46C 1 -46D 1 -46E 1 -46F 1 -470 1 -471 1 -472 1 -473 1 -474 1 -475 1 -476 1 -477 1 -4A8 1 -4A9 1 -4C0 1 -531 1 -561 1 -532 1 -562 1 -533 1 -563 1 -534 1 -564 1 -535 1 -565 1 -587 1 -536 1 -566 1 -537 1 -567 1 -538 1 -568 1 -539 1 -569 1 -53A 1 -56A 1 -53B 1 -56B 1 -53C 1 -56C 1 -53D 1 -56D 1 -53E 1 -56E 1 -53F 1 -56F 1 -540 1 -570 1 -541 1 -571 1 -542 1 -572 1 -543 1 -573 1 -544 1 -574 1 -545 1 -575 1 -546 1 -576 1 -547 1 -577 1 -548 1 -578 1 -549 1 -579 1 -54A 1 -57A 1 -54B 1 -57B 1 -54C 1 -57C 1 -54D 1 -57D 1 -54E 1 -57E 1 -54F 1 -57F 1 -550 1 -580 1 -551 1 -581 1 -552 1 -582 1 -553 1 -583 1 -554 1 -584 1 -555 1 -585 1 -556 1 -586 1 -559 1 -5D0 1 -5D1 1 -5D2 1 -5D3 1 -5D4 1 -5D5 1 -5F0 1 -5F1 1 -5D6 1 -5D7 1 -5D8 1 -5D9 1 -5F2 1 -5DA 1 -5DB 1 -5DC 1 -5DD 1 -5DE 1 -5DF 1 -5E0 1 -5E1 1 -5E2 1 -5E3 1 -5E4 1 -5E5 1 -5E6 1 -5E7 1 -5E8 1 -5E9 1 -5EA 1 -621 1 -674 1 -6FD 1 -622 1 -623 1 -672 1 -671 1 -624 1 -625 1 -673 1 -626 1 -627 1 -675 1 -66E 1 -628 1 -67B 1 -67E 1 -680 1 -629 1 -62A 1 -62B 1 -679 1 -67A 1 -67C 1 -67D 1 -67F 1 -62C 1 -683 1 -684 1 -686 1 -6BF 1 -687 1 -62D 1 -62E 1 -681 1 -682 1 -685 1 -62F 1 -630 1 -688 1 -689 1 -68A 1 -68B 1 -68C 1 -68D 1 -68E 1 -68F 1 -690 1 -6EE 1 -631 1 -632 1 -691 1 -692 1 -693 1 -694 1 -695 1 -696 1 -697 1 -698 1 -699 1 -6EF 1 -633 1 -634 1 -69A 1 -69B 1 -69C 1 -6FA 1 -635 1 -636 1 -69D 1 -69E 1 -6FB 1 -637 1 -638 1 -69F 1 -639 1 -63A 1 -6A0 1 -6FC 1 -641 1 -6A1 1 -6A2 1 -6A3 1 -6A4 1 -6A5 1 -6A6 1 -66F 1 -642 1 -6A7 1 -6A8 1 -643 1 -6A9 1 -6AA 1 -6AB 1 -6AC 1 -6AD 1 -6AE 1 -6AF 1 -6B0 1 -6B1 1 -6B2 1 -6B3 1 -6B4 1 -644 1 -6B5 1 -6B6 1 -6B7 1 -6B8 1 -645 1 -6FE 1 -646 1 -6BA 1 -6BB 1 -6BC 1 -6BD 1 -6B9 1 -647 1 -6BE 1 -6C1 1 -6C2 1 -6C3 1 -6FF 1 -6C0 1 -6D5 1 -648 1 -6E5 1 -676 1 -6C4 1 -6C5 1 -6C6 1 -6C7 1 -677 1 -6C8 1 -6C9 1 -6CA 1 -6CB 1 -6CF 1 -649 1 -64A 1 -6E6 1 -678 1 -6CC 1 -6CD 1 -6CE 1 -6D0 1 -6D1 1 -6D2 1 -6D3 1 -710 1 -712 1 -72D 1 -713 1 -714 1 -72E 1 -716 1 -715 1 -72F 1 -717 1 -718 1 -719 1 -74D 1 -71A 1 -71B 1 -71C 1 -71D 1 -71E 1 -71F 1 -74E 1 -720 1 -721 1 -722 1 -723 1 -724 1 -725 1 -726 1 -727 1 -74F 1 -728 1 -729 1 -72A 1 -72B 1 -72C 1 -780 1 -799 1 -79A 1 -781 1 -782 1 -783 1 -79C 1 -784 1 -785 1 -786 1 -787 1 -7A2 1 -7A3 1 -788 1 -7A5 1 -789 1 -78A 1 -78B 1 -79B 1 -78C 1 -798 1 -7A0 1 -7A1 1 -78D 1 -78E 1 -7A4 1 -78F 1 -790 1 -79D 1 -79E 1 -79F 1 -791 1 -792 1 -793 1 -794 1 -795 1 -796 1 -797 1 -7B1 1 -7A6 1 -7A7 1 -7A8 1 -7A9 1 -7AA 1 -7AB 1 -7AC 1 -7AD 1 -7AE 1 -7AF 1 -7B0 1 -4E00 1 -4E01 1 -4E02 1 -4E03 1 -4E04 1 -4E05 1 -4E06 1 -4E07 1 -4E08 1 -4E09 1 -4E0A 1 -4E0B 1 -4E0C 1 -4E0D 1 -4E0E 1 -4E0F 1 -4E10 1 -4E11 1 -4E12 1 -4E13 1 -4E14 1 -4E15 1 -4E16 1 -4E17 1 -4E18 1 -4E19 1 -4E1A 1 -4E1B 1 -4E1C 1 -4E1D 1 -4E1E 1 -4E1F 1 -4E20 1 -4E21 1 -4E22 1 -4E23 1 -4E24 1 -4E25 1 -4E26 1 -4E27 1 -4E28 1 -4E29 1 -4E2A 1 -4E2B 1 -4E2C 1 -4E2D 1 -4E2E 1 -4E2F 1 -4E30 1 -4E31 1 -4E32 1 -4E33 1 -4E34 1 -4E35 1 -4E36 1 -4E37 1 -4E38 1 -4E39 1 -4E3A 1 -4E3B 1 -4E3C 1 -4E3D 1 -4E3E 1 -4E3F 1 -4E40 1 -4E41 1 -4E42 1 -4E43 1 -4E44 1 -4E45 1 -4E46 1 -4E47 1 -4E48 1 -4E49 1 -4E4A 1 -4E4B 1 -4E4C 1 -4E4D 1 -4E4E 1 -4E4F 1 -4E50 1 -4E51 1 -4E52 1 -4E53 1 -4E54 1 -4E55 1 -4E56 1 -4E57 1 -4E58 1 -4E59 1 -4E5A 1 -4E5B 1 -4E5C 1 -4E5D 1 -4E5E 1 -4E5F 1 -4E60 1 -4E61 1 -4E62 1 -4E63 1 -4E64 1 -4E65 1 -4E66 1 -4E67 1 -4E68 1 -4E69 1 -4E6A 1 -4E6B 1 -4E6C 1 -4E6D 1 -4E6E 1 -4E6F 1 -4E70 1 -4E71 1 -4E72 1 -4E73 1 -4E74 1 -4E75 1 -4E76 1 -4E77 1 -4E78 1 -4E79 1 -4E7A 1 -4E7B 1 -4E7C 1 -4E7D 1 -4E7E 1 -4E7F 1 -4E80 1 -4E81 1 -4E82 1 -4E83 1 -4E84 1 -4E85 1 -4E86 1 -4E87 1 -4E88 1 -4E89 1 -4E8A 1 -4E8B 1 -4E8C 1 -4E8D 1 -4E8E 1 -4E8F 1 -4E90 1 -4E91 1 -4E92 1 -4E93 1 -4E94 1 -4E95 1 -4E96 1 -4E97 1 -4E98 1 -4E99 1 -4E9A 1 -4E9B 1 -4E9C 1 -4E9D 1 -4E9E 1 -4E9F 1 -4EA0 1 -4EA1 1 -4EA2 1 -4EA3 1 -4EA4 1 -4EA5 1 -4EA6 1 -4EA7 1 -4EA8 1 -4EA9 1 -4EAA 1 -4EAB 1 -4EAC 1 -4EAD 1 -4EAE 1 -4EAF 1 -4EB0 1 -4EB1 1 -4EB2 1 -4EB3 1 -4EB4 1 -4EB5 1 -4EB6 1 -4EB7 1 -4EB8 1 -4EB9 1 -4EBA 1 -4EBB 1 -4EBC 1 -4EBD 1 -4EBE 1 -4EBF 1 -4EC0 1 -4EC1 1 -4EC2 1 -4EC3 1 -4EC4 1 -4EC5 1 -4EC6 1 -4EC7 1 -4EC8 1 -4EC9 1 -4ECA 1 -4ECB 1 -4ECC 1 -4ECD 1 -4ECE 1 -4ECF 1 -4ED0 1 -4ED1 1 -4ED2 1 -4ED3 1 -4ED4 1 -4ED5 1 -4ED6 1 -4ED7 1 -4ED8 1 -4ED9 1 -4EDA 1 -4EDB 1 -4EDC 1 -4EDD 1 -4EDE 1 -4EDF 1 -4EE0 1 -4EE1 1 -4EE2 1 -4EE3 1 -4EE4 1 -4EE5 1 -4EE6 1 -4EE7 1 -4EE8 1 -4EE9 1 -4EEA 1 -4EEB 1 -4EEC 1 -4EED 1 -4EEE 1 -4EEF 1 -4EF0 1 -4EF1 1 -4EF2 1 -4EF3 1 -4EF4 1 -4EF5 1 -4EF6 1 -4EF7 1 -4EF8 1 -4EF9 1 -4EFA 1 -4EFB 1 -4EFC 1 -4EFD 1 -4EFE 1 -4EFF 1 -4F00 1 -4F01 1 -4F02 1 -4F03 1 -4F04 1 -4F05 1 -4F06 1 -4F07 1 -4F08 1 -4F09 1 -4F0A 1 -4F0B 1 -4F0C 1 -4F0D 1 -4F0E 1 -4F0F 1 -4F10 1 -4F11 1 -4F12 1 -4F13 1 -4F14 1 -4F15 1 -4F16 1 -4F17 1 -4F18 1 -4F19 1 -4F1A 1 -4F1B 1 -4F1C 1 -4F1D 1 -4F1E 1 -4F1F 1 -4F20 1 -4F21 1 -4F22 1 -4F23 1 -4F24 1 -4F25 1 -4F26 1 -4F27 1 -4F28 1 -4F29 1 -4F2A 1 -4F2B 1 -4F2C 1 -4F2D 1 -4F2E 1 -4F2F 1 -4F30 1 -4F31 1 -4F32 1 -4F33 1 -4F34 1 -4F35 1 -4F36 1 -4F37 1 -4F38 1 -4F39 1 -4F3A 1 -4F3B 1 -4F3C 1 -4F3D 1 -4F3E 1 -4F3F 1 -4F40 1 -4F41 1 -4F42 1 -4F43 1 -4F44 1 -4F45 1 -4F46 1 -4F47 1 -4F48 1 -4F49 1 -4F4A 1 -4F4B 1 -4F4C 1 -4F4D 1 -4F4E 1 -4F4F 1 -4F50 1 -4F51 1 -4F52 1 -4F53 1 -4F54 1 -4F55 1 -4F56 1 -4F57 1 -4F58 1 -4F59 1 -4F5A 1 -4F5B 1 -4F5C 1 -4F5D 1 -4F5E 1 -4F5F 1 -4F60 1 -4F61 1 -4F62 1 -4F63 1 -4F64 1 -4F65 1 -4F66 1 -4F67 1 -4F68 1 -4F69 1 -4F6A 1 -4F6B 1 -4F6C 1 -4F6D 1 -4F6E 1 -4F6F 1 -4F70 1 -4F71 1 -4F72 1 -4F73 1 -4F74 1 -4F75 1 -4F76 1 -4F77 1 -4F78 1 -4F79 1 -4F7A 1 -4F7B 1 -4F7C 1 -4F7D 1 -4F7E 1 -4F7F 1 -4F80 1 -4F81 1 -4F82 1 -4F83 1 -4F84 1 -4F85 1 -4F86 1 -4F87 1 -4F88 1 -4F89 1 -4F8A 1 -4F8B 1 -4F8C 1 -4F8D 1 -4F8E 1 -4F8F 1 -4F90 1 -4F91 1 -4F92 1 -4F93 1 -4F94 1 -4F95 1 -4F96 1 -4F97 1 -4F98 1 -4F99 1 -4F9A 1 -4F9B 1 -4F9C 1 -4F9D 1 -4F9E 1 -4F9F 1 -4FA0 1 -4FA1 1 -4FA2 1 -4FA3 1 -4FA4 1 -4FA5 1 -4FA6 1 -4FA7 1 -4FA8 1 -4FA9 1 -4FAA 1 -4FAB 1 -4FAC 1 -4FAD 1 -4FAE 1 -4FAF 1 -4FB0 1 -4FB1 1 -4FB2 1 -4FB3 1 -4FB4 1 -4FB5 1 -4FB6 1 -4FB7 1 -4FB8 1 -4FB9 1 -4FBA 1 -4FBB 1 -4FBC 1 -4FBD 1 -4FBE 1 -4FBF 1 -4FC0 1 -4FC1 1 -4FC2 1 -4FC3 1 -4FC4 1 -4FC5 1 -4FC6 1 -4FC7 1 -4FC8 1 -4FC9 1 -4FCA 1 -4FCB 1 -4FCC 1 -4FCD 1 -4FCE 1 -4FCF 1 -4FD0 1 -4FD1 1 -4FD2 1 -4FD3 1 -4FD4 1 -4FD5 1 -4FD6 1 -4FD7 1 -4FD8 1 -4FD9 1 -4FDA 1 -4FDB 1 -4FDC 1 -4FDD 1 -4FDE 1 -4FDF 1 -4FE0 1 -4FE1 1 -4FE2 1 -4FE3 1 -4FE4 1 -4FE5 1 -4FE6 1 -4FE7 1 -4FE8 1 -4FE9 1 -4FEA 1 -4FEB 1 -4FEC 1 -4FED 1 -4FEE 1 -4FEF 1 -4FF0 1 -4FF1 1 -4FF2 1 -4FF3 1 -4FF4 1 -4FF5 1 -4FF6 1 -4FF7 1 -4FF8 1 -4FF9 1 -4FFA 1 -4FFB 1 -4FFC 1 -4FFD 1 -4FFE 1 -4FFF 1 -237 1 -238 1 -239 1 -23A 1 -23B 1 -23C 1 -23D 1 -23E 1 -23F 1 -240 1 -241 1 -242 1 -243 1 -244 1 -245 1 -246 1 -247 1 -248 1 -249 1 -24A 1 -24B 1 -24C 1 -24D 1 -24E 1 -24F 1 -358 1 -359 1 -35A 1 -35B 1 -35C 1 -370 1 -371 1 -372 1 -373 1 -376 1 -377 1 -378 1 -379 1 -37B 1 -37C 1 -37D 1 -37F 1 -380 1 -381 1 -382 1 -383 1 -38B 1 -38D 1 -3A2 1 -3CF 1 -3FC 1 -3FD 1 -3FE 1 -3FF 1 -487 1 -4CF 1 -4F6 1 -4F7 1 -4FA 1 -4FB 1 -4FC 1 -4FD 1 -4FE 1 -4FF 1 -510 1 -511 1 -512 1 -513 1 -514 1 -515 1 -516 1 -517 1 -518 1 -519 1 -51A 1 -51B 1 -51C 1 -51D 1 -51E 1 -51F 1 -520 1 -521 1 -522 1 -523 1 -524 1 -525 1 -526 1 -527 1 -528 1 -529 1 -52A 1 -52B 1 -52C 1 -52D 1 -52E 1 -52F 1 -530 1 -557 1 -558 1 -560 1 -588 1 -58B 1 -58C 1 -58D 1 -58E 1 -58F 1 -590 1 -5A2 1 -5BA 1 -5C5 1 -5C6 1 -5C7 1 -5C8 1 -5C9 1 -5CA 1 -5CB 1 -5CC 1 -5CD 1 -5CE 1 -5CF 1 -5EB 1 -5EC 1 -5ED 1 -5EE 1 -5EF 1 -5F5 1 -5F6 1 -5F7 1 -5F8 1 -5F9 1 -5FA 1 -5FB 1 -5FC 1 -5FD 1 -5FE 1 -5FF 1 -604 1 -605 1 -606 1 -607 1 -608 1 -609 1 -60A 1 -60B 1 -616 1 -617 1 -618 1 -619 1 -61A 1 -61C 1 -61D 1 -61E 1 -620 1 -63B 1 -63C 1 -63D 1 -63E 1 -63F 1 -659 1 -65A 1 -65B 1 -65C 1 -65D 1 -65E 1 -65F 1 -70E 1 -74B 1 -74C 1 -750 1 -751 1 -752 1 -753 1 -754 1 -755 1 -756 1 -757 1 -758 1 -759 1 -75A 1 -75B 1 -75C 1 -75D 1 -75E 1 -75F 1 -760 1 -761 1 -762 1 -763 1 -764 1 -765 1 -766 1 -767 1 -768 1 -769 1 -76A 1 -76B 1 -76C 1 -76D 1 -76E 1 -76F 1 -770 1 -771 1 -772 1 -773 1 -774 1 -775 1 -776 1 -777 1 -778 1 -779 1 -77A 1 -77B 1 -77C 1 -77D 1 -77E 1 -77F 1 -7B2 1 -7B3 1 -7B4 1 -7B5 1 -7B6 1 -7B7 1 -7B8 1 -7B9 1 -7BA 1 -7BB 1 -7BC 1 -7BD 1 -7BE 1 -7BF 1 -7C0 1 -7C1 1 -7C2 1 -7C3 1 -7C4 1 -7C5 1 -7C6 1 -7C7 1 -7C8 1 -7C9 1 -7CA 1 -7CB 1 -7CC 1 -7CD 1 -7CE 1 -7CF 1 -7D0 1 -7D1 1 -7D2 1 -7D3 1 -7D4 1 -7D5 1 -7D6 1 -7D7 1 -7D8 1 -7D9 1 -7DA 1 -7DB 1 -7DC 1 -7DD 1 -7DE 1 -7DF 1 -7E0 1 -7E1 1 -7E2 1 -7E3 1 -7E4 1 -7E5 1 -7E6 1 -7E7 1 -7E8 1 -7E9 1 -7EA 1 -7EB 1 -7EC 1 -7ED 1 -7EE 1 -7EF 1 -7F0 1 -7F1 1 -7F2 1 -7F3 1 -7F4 1 -7F5 1 -7F6 1 -7F7 1 -7F8 1 -7F9 1 -7FA 1 -7FB 1 -7FC 1 -7FD 1 -7FE 1 -7FF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -SET NAMES utf8; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=NDB CHARACTER SET utf8; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_general_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_spanish2_ci; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -85 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -300 1 -301 1 -302 1 -303 1 -304 1 -305 1 -306 1 -307 1 -308 1 -309 1 -30A 1 -30B 1 -30C 1 -30D 1 -30E 1 -30F 1 -310 1 -311 1 -312 1 -313 1 -314 1 -315 1 -316 1 -317 1 -318 1 -319 1 -31A 1 -31B 1 -31C 1 -31D 1 -31E 1 -31F 1 -320 1 -321 1 -322 1 -323 1 -324 1 -325 1 -326 1 -327 1 -328 1 -329 1 -32A 1 -32B 1 -32C 1 -32D 1 -32E 1 -32F 1 -330 1 -331 1 -332 1 -333 1 -334 1 -335 1 -336 1 -337 1 -338 1 -339 1 -33A 1 -33B 1 -33C 1 -33D 1 -33E 1 -33F 1 -340 1 -341 1 -342 1 -343 1 -344 1 -345 1 -346 1 -347 1 -348 1 -349 1 -34A 1 -34B 1 -34C 1 -34D 1 -34E 1 -34F 1 -350 1 -351 1 -352 1 -353 1 -354 1 -355 1 -356 1 -357 1 -35D 1 -35E 1 -35F 1 -360 1 -361 1 -362 1 -483 1 -484 1 -485 1 -486 1 -488 1 -489 1 -591 1 -592 1 -593 1 -594 1 -595 1 -596 1 -597 1 -598 1 -599 1 -59A 1 -59B 1 -59C 1 -59D 1 -59E 1 -59F 1 -5A0 1 -5A1 1 -5A3 1 -5A4 1 -5A5 1 -5A6 1 -5A7 1 -5A8 1 -5A9 1 -5AA 1 -5AB 1 -5AC 1 -5AD 1 -5AE 1 -5AF 1 -5B0 1 -5B1 1 -5B2 1 -5B3 1 -5B4 1 -5B5 1 -5B6 1 -5B7 1 -5B8 1 -5B9 1 -5BB 1 -5BC 1 -5BD 1 -5BF 1 -5C1 1 -5C2 1 -5C4 1 -600 1 -601 1 -602 1 -603 1 -610 1 -611 1 -612 1 -613 1 -614 1 -615 1 -64B 1 -64C 1 -64D 1 -64E 1 -64F 1 -650 1 -651 1 -652 1 -653 1 -654 1 -655 1 -656 1 -657 1 -658 1 -670 1 -6D6 1 -6D7 1 -6D8 1 -6D9 1 -6DA 1 -6DB 1 -6DC 1 -6DD 1 -6DE 1 -6DF 1 -6E0 1 -6E1 1 -6E2 1 -6E3 1 -6E4 1 -6E7 1 -6E8 1 -6EA 1 -6EB 1 -6EC 1 -6ED 1 -70F 1 -711 1 -730 1 -731 1 -732 1 -733 1 -734 1 -735 1 -736 1 -737 1 -738 1 -739 1 -73A 1 -73B 1 -73C 1 -73D 1 -73E 1 -73F 1 -740 1 -741 1 -742 1 -743 1 -744 1 -745 1 -746 1 -747 1 -748 1 -749 1 -74A 1 -640 1 -60 1 -B4 1 -384 1 -2DC 1 -5E 1 -AF 1 -2D8 1 -2D9 1 -A8 1 -385 1 -2DA 1 -2DD 1 -B8 1 -2DB 1 -5F 1 -AD 1 -2D 1 -58A 1 -2C 1 -55D 1 -60C 1 -60D 1 -66B 1 -66C 1 -3B 1 -37E 1 -61B 1 -3A 1 -589 1 -703 1 -704 1 -705 1 -706 1 -707 1 -708 1 -21 1 -A1 1 -55C 1 -3F 1 -BF 1 -55E 1 -61F 1 -709 1 -2E 1 -6D4 1 -701 1 -702 1 -B7 1 -387 1 -700 1 -27 1 -22 1 -AB 1 -BB 1 -28 1 -29 1 -5B 1 -7B 1 -7D 1 -A7 1 -B6 1 -A9 1 -AE 1 -40 1 -2A 1 -66D 1 -2F 1 -26 1 -23 1 -25 1 -66A 1 -55A 1 -55B 1 -55F 1 -5BE 1 -5C0 1 -5C3 1 -5F3 1 -5F4 1 -70A 1 -70B 1 -70C 1 -70D 1 -2B9 1 -374 1 -375 1 -2BA 1 -2C2 1 -2C3 1 -2C4 1 -2C5 1 -2C6 1 -2C7 1 -2C8 1 -2C9 1 -2CA 1 -2CB 1 -2CC 1 -2CD 1 -2CE 1 -2CF 1 -2D2 1 -2D3 1 -2D4 1 -2D5 1 -2D6 1 -2D7 1 -2DE 1 -2DF 1 -2E5 1 -2E6 1 -2E7 1 -2E8 1 -2E9 1 -2EA 1 -2EB 1 -2EC 1 -2ED 1 -2EF 1 -2F0 1 -2F1 1 -2F2 1 -2F3 1 -2F4 1 -2F5 1 -2F6 1 -2F7 1 -2F8 1 -2F9 1 -2FA 1 -2FB 1 -2FC 1 -2FD 1 -2FE 1 -2FF 1 -B0 1 -482 1 -60E 1 -60F 1 -6E9 1 -3F6 1 -2B 1 -B1 1 -F7 1 -D7 1 -3C 1 -3D 1 -3E 1 -AC 1 -7C 1 -A6 1 -7E 1 -2D0 1 -2D1 1 -A4 1 -A2 1 -24 1 -A3 1 -A5 1 -30 1 -660 1 -6F0 1 -31 1 -B9 1 -661 1 -6F1 1 -BD 1 -BC 1 -32 1 -B2 1 -662 1 -6F2 1 -33 1 -B3 1 -663 1 -6F3 1 -BE 1 -34 1 -664 1 -6F4 1 -35 1 -665 1 -6F5 1 -36 1 -666 1 -6F6 1 -37 1 -667 1 -6F7 1 -38 1 -668 1 -6F8 1 -39 1 -669 1 -6F9 1 -41 1 -61 1 -AA 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -100 1 -101 1 -102 1 -103 1 -104 1 -105 1 -1CD 1 -1CE 1 -1DE 1 -1DF 1 -1E0 1 -1E1 1 -1FA 1 -1FB 1 -200 1 -201 1 -202 1 -203 1 -226 1 -227 1 -363 1 -C6 1 -E6 1 -1E2 1 -1E3 1 -1FC 1 -1FD 1 -250 1 -251 1 -252 1 -42 1 -62 1 -299 1 -180 1 -181 1 -253 1 -182 1 -183 1 -43 1 -63 1 -C7 1 -E7 1 -106 1 -107 1 -108 1 -109 1 -10A 1 -10B 1 -10C 1 -10D 1 -368 1 -187 1 -188 1 -255 1 -44 1 -64 1 -10E 1 -10F 1 -369 1 -1C4 1 -1C5 1 -1C6 1 -1F1 1 -1F2 1 -1F3 1 -2A3 1 -2A5 1 -2A4 1 -110 1 -111 1 -189 1 -256 1 -18A 1 -257 1 -18B 1 -18C 1 -221 1 -D0 1 -F0 1 -45 1 -65 1 -C8 1 -C9 1 -CA 1 -CB 1 -E8 1 -E9 1 -EA 1 -EB 1 -112 1 -113 1 -114 1 -115 1 -116 1 -117 1 -118 1 -119 1 -11A 1 -11B 1 -204 1 -205 1 -206 1 -207 1 -228 1 -229 1 -364 1 -18E 1 -1DD 1 -18F 1 -259 1 -190 1 -25B 1 -258 1 -25A 1 -25C 1 -25D 1 -25E 1 -29A 1 -264 1 -46 1 -66 1 -2A9 1 -191 1 -192 1 -47 1 -67 1 -11C 1 -11D 1 -11E 1 -11F 1 -120 1 -121 1 -122 1 -123 1 -1E6 1 -1E7 1 -1F4 1 -1F5 1 -261 1 -262 1 -1E4 1 -1E5 1 -193 1 -260 1 -29B 1 -194 1 -263 1 -2E0 1 -1A2 1 -1A3 1 -48 1 -68 1 -124 1 -125 1 -21E 1 -21F 1 -2B0 1 -36A 1 -29C 1 -195 1 -1F6 1 -126 1 -127 1 -266 1 -2B1 1 -267 1 -2BB 1 -2BD 1 -49 1 -69 1 -CC 1 -CD 1 -CE 1 -CF 1 -EC 1 -ED 1 -EE 1 -EF 1 -128 1 -129 1 -12A 1 -12B 1 -12C 1 -12D 1 -12E 1 -12F 1 -130 1 -1CF 1 -1D0 1 -208 1 -209 1 -20A 1 -20B 1 -365 1 -132 1 -133 1 -131 1 -26A 1 -197 1 -268 1 -196 1 -269 1 -4A 1 -6A 1 -134 1 -135 1 -1F0 1 -2B2 1 -29D 1 -25F 1 -284 1 -4B 1 -6B 1 -136 1 -137 1 -1E8 1 -1E9 1 -198 1 -199 1 -29E 1 -4C 1 -6C 1 -139 1 -13A 1 -13B 1 -13C 1 -13D 1 -13E 1 -2E1 1 -13F 1 -140 1 -1C7 1 -1C8 1 -1C9 1 -2AA 1 -2AB 1 -29F 1 -141 1 -142 1 -19A 1 -26B 1 -26C 1 -26D 1 -234 1 -26E 1 -19B 1 -28E 1 -4D 1 -6D 1 -36B 1 -271 1 -4E 1 -6E 1 -143 1 -144 1 -145 1 -146 1 -147 1 -148 1 -1F8 1 -1F9 1 -1CA 1 -1CB 1 -1CC 1 -D1 1 -F1 1 -274 1 -19D 1 -272 1 -19E 1 -220 1 -273 1 -235 1 -14A 1 -14B 1 -4F 1 -6F 1 -BA 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -14C 1 -14D 1 -14E 1 -14F 1 -150 1 -151 1 -1A0 1 -1A1 1 -1D1 1 -1D2 1 -1EA 1 -1EB 1 -1EC 1 -1ED 1 -20C 1 -20D 1 -20E 1 -20F 1 -22A 1 -22B 1 -22C 1 -22D 1 -22E 1 -22F 1 -230 1 -231 1 -366 1 -152 1 -153 1 -276 1 -D8 1 -F8 1 -1FE 1 -1FF 1 -186 1 -254 1 -19F 1 -275 1 -277 1 -222 1 -223 1 -50 1 -70 1 -1A4 1 -1A5 1 -278 1 -51 1 -71 1 -2A0 1 -138 1 -52 1 -72 1 -154 1 -155 1 -156 1 -157 1 -158 1 -159 1 -210 1 -211 1 -212 1 -213 1 -2B3 1 -36C 1 -1A6 1 -280 1 -279 1 -2B4 1 -27A 1 -27B 1 -2B5 1 -27C 1 -27D 1 -27E 1 -27F 1 -281 1 -2B6 1 -53 1 -73 1 -15A 1 -15B 1 -15C 1 -15D 1 -15E 1 -15F 1 -160 1 -161 1 -17F 1 -218 1 -219 1 -2E2 1 -DF 1 -282 1 -1A9 1 -283 1 -1AA 1 -285 1 -286 1 -54 1 -74 1 -162 1 -163 1 -164 1 -165 1 -21A 1 -21B 1 -36D 1 -2A8 1 -1BE 1 -2A6 1 -2A7 1 -166 1 -167 1 -1AB 1 -1AC 1 -1AD 1 -1AE 1 -288 1 -236 1 -287 1 -55 1 -75 1 -D9 1 -DA 1 -DB 1 -DC 1 -F9 1 -FA 1 -FB 1 -FC 1 -168 1 -169 1 -16A 1 -16B 1 -16C 1 -16D 1 -16E 1 -16F 1 -170 1 -171 1 -172 1 -173 1 -1AF 1 -1B0 1 -1D3 1 -1D4 1 -1D5 1 -1D6 1 -1D7 1 -1D8 1 -1D9 1 -1DA 1 -1DB 1 -1DC 1 -214 1 -215 1 -216 1 -217 1 -367 1 -289 1 -265 1 -2AE 1 -2AF 1 -19C 1 -26F 1 -270 1 -1B1 1 -28A 1 -56 1 -76 1 -36E 1 -1B2 1 -28B 1 -28C 1 -57 1 -77 1 -174 1 -175 1 -2B7 1 -28D 1 -58 1 -78 1 -2E3 1 -36F 1 -59 1 -79 1 -DD 1 -FD 1 -FF 1 -176 1 -177 1 -178 1 -232 1 -233 1 -2B8 1 -28F 1 -1B3 1 -1B4 1 -5A 1 -7A 1 -179 1 -17A 1 -17B 1 -17C 1 -17D 1 -17E 1 -18D 1 -1B5 1 -1B6 1 -224 1 -225 1 -290 1 -291 1 -1B7 1 -1EE 1 -1EF 1 -292 1 -1B8 1 -1B9 1 -1BA 1 -293 1 -21C 1 -21D 1 -DE 1 -FE 1 -1BF 1 -1F7 1 -1BB 1 -1A7 1 -1A8 1 -1BC 1 -1BD 1 -184 1 -185 1 -294 1 -2C0 1 -2BC 1 -149 1 -2EE 1 -2BE 1 -295 1 -2E4 1 -2BF 1 -2C1 1 -2A1 1 -2A2 1 -296 1 -1C0 1 -1C1 1 -1C2 1 -1C3 1 -297 1 -298 1 -2AC 1 -2AD 1 -386 1 -391 1 -3AC 1 -3B1 1 -392 1 -3B2 1 -3D0 1 -393 1 -3B3 1 -394 1 -3B4 1 -388 1 -395 1 -3AD 1 -3B5 1 -3F5 1 -3DC 1 -3DD 1 -3DA 1 -3DB 1 -396 1 -3B6 1 -389 1 -397 1 -3AE 1 -3B7 1 -398 1 -3B8 1 -3D1 1 -3F4 1 -37A 1 -38A 1 -390 1 -399 1 -3AA 1 -3AF 1 -3B9 1 -3CA 1 -3F3 1 -39A 1 -3BA 1 -3F0 1 -3D7 1 -39B 1 -3BB 1 -B5 1 -39C 1 -3BC 1 -39D 1 -3BD 1 -39E 1 -3BE 1 -38C 1 -39F 1 -3BF 1 -3CC 1 -3A0 1 -3C0 1 -3D6 1 -3DE 1 -3DF 1 -3D8 1 -3D9 1 -3A1 1 -3C1 1 -3F1 1 -3A3 1 -3C2 1 -3C3 1 -3F2 1 -3F9 1 -3A4 1 -3C4 1 -38E 1 -3A5 1 -3AB 1 -3B0 1 -3C5 1 -3CB 1 -3CD 1 -3D2 1 -3D3 1 -3D4 1 -3A6 1 -3C6 1 -3D5 1 -3A7 1 -3C7 1 -3A8 1 -3C8 1 -38F 1 -3A9 1 -3C9 1 -3CE 1 -3E0 1 -3E1 1 -3F7 1 -3F8 1 -3FA 1 -3FB 1 -3E2 1 -3E3 1 -3E4 1 -3E5 1 -3E6 1 -3E7 1 -3E8 1 -3E9 1 -3EA 1 -3EB 1 -3EC 1 -3ED 1 -3EE 1 -3EF 1 -410 1 -430 1 -4D0 1 -4D1 1 -4D2 1 -4D3 1 -4D8 1 -4D9 1 -4DA 1 -4DB 1 -4D4 1 -4D5 1 -411 1 -431 1 -412 1 -432 1 -413 1 -433 1 -490 1 -491 1 -492 1 -493 1 -494 1 -495 1 -414 1 -434 1 -500 1 -501 1 -402 1 -452 1 -502 1 -503 1 -403 1 -453 1 -498 1 -499 1 -400 1 -401 1 -415 1 -435 1 -450 1 -451 1 -4D6 1 -4D7 1 -404 1 -454 1 -416 1 -436 1 -4C1 1 -4C2 1 -4DC 1 -4DD 1 -496 1 -497 1 -417 1 -437 1 -504 1 -505 1 -4DE 1 -4DF 1 -405 1 -455 1 -4E0 1 -4E1 1 -506 1 -507 1 -40D 1 -418 1 -438 1 -45D 1 -4E2 1 -4E3 1 -48A 1 -48B 1 -4E4 1 -4E5 1 -406 1 -456 1 -407 1 -457 1 -419 1 -439 1 -408 1 -458 1 -41A 1 -43A 1 -49A 1 -49B 1 -4C3 1 -4C4 1 -4A0 1 -4A1 1 -49E 1 -49F 1 -49C 1 -49D 1 -41B 1 -43B 1 -4C5 1 -4C6 1 -409 1 -459 1 -508 1 -509 1 -41C 1 -43C 1 -4CD 1 -4CE 1 -41D 1 -43D 1 -4C9 1 -4CA 1 -4A2 1 -4A3 1 -4C7 1 -4C8 1 -4A4 1 -4A5 1 -40A 1 -45A 1 -50A 1 -50B 1 -41E 1 -43E 1 -4E6 1 -4E7 1 -4E8 1 -4E9 1 -4EA 1 -4EB 1 -41F 1 -43F 1 -4A6 1 -4A7 1 -480 1 -481 1 -420 1 -440 1 -48E 1 -48F 1 -421 1 -441 1 -50C 1 -50D 1 -4AA 1 -4AB 1 -422 1 -442 1 -50E 1 -50F 1 -4AC 1 -4AD 1 -40B 1 -45B 1 -40C 1 -45C 1 -423 1 -443 1 -4EE 1 -4EF 1 -40E 1 -45E 1 -4F0 1 -4F1 1 -4F2 1 -4F3 1 -4AE 1 -4AF 1 -4B0 1 -4B1 1 -478 1 -479 1 -424 1 -444 1 -425 1 -445 1 -4B2 1 -4B3 1 -4BA 1 -4BB 1 -460 1 -461 1 -47E 1 -47F 1 -47C 1 -47D 1 -47A 1 -47B 1 -426 1 -446 1 -4B4 1 -4B5 1 -427 1 -447 1 -4F4 1 -4F5 1 -4B6 1 -4B7 1 -4CB 1 -4CC 1 -4B8 1 -4B9 1 -4BC 1 -4BD 1 -4BE 1 -4BF 1 -40F 1 -45F 1 -428 1 -448 1 -429 1 -449 1 -42A 1 -44A 1 -42B 1 -44B 1 -4F8 1 -4F9 1 -42C 1 -44C 1 -48C 1 -48D 1 -462 1 -463 1 -42D 1 -44D 1 -4EC 1 -4ED 1 -42E 1 -44E 1 -42F 1 -44F 1 -464 1 -465 1 -466 1 -467 1 -46A 1 -46B 1 -468 1 -469 1 -46C 1 -46D 1 -46E 1 -46F 1 -470 1 -471 1 -472 1 -473 1 -474 1 -475 1 -476 1 -477 1 -4A8 1 -4A9 1 -4C0 1 -531 1 -561 1 -532 1 -562 1 -533 1 -563 1 -534 1 -564 1 -535 1 -565 1 -587 1 -536 1 -566 1 -537 1 -567 1 -538 1 -568 1 -539 1 -569 1 -53A 1 -56A 1 -53B 1 -56B 1 -53C 1 -56C 1 -53D 1 -56D 1 -53E 1 -56E 1 -53F 1 -56F 1 -540 1 -570 1 -541 1 -571 1 -542 1 -572 1 -543 1 -573 1 -544 1 -574 1 -545 1 -575 1 -546 1 -576 1 -547 1 -577 1 -548 1 -578 1 -549 1 -579 1 -54A 1 -57A 1 -54B 1 -57B 1 -54C 1 -57C 1 -54D 1 -57D 1 -54E 1 -57E 1 -54F 1 -57F 1 -550 1 -580 1 -551 1 -581 1 -552 1 -582 1 -553 1 -583 1 -554 1 -584 1 -555 1 -585 1 -556 1 -586 1 -559 1 -5D0 1 -5D1 1 -5D2 1 -5D3 1 -5D4 1 -5D5 1 -5F0 1 -5F1 1 -5D6 1 -5D7 1 -5D8 1 -5D9 1 -5F2 1 -5DA 1 -5DB 1 -5DC 1 -5DD 1 -5DE 1 -5DF 1 -5E0 1 -5E1 1 -5E2 1 -5E3 1 -5E4 1 -5E5 1 -5E6 1 -5E7 1 -5E8 1 -5E9 1 -5EA 1 -621 1 -674 1 -6FD 1 -622 1 -623 1 -672 1 -671 1 -624 1 -625 1 -673 1 -626 1 -627 1 -675 1 -66E 1 -628 1 -67B 1 -67E 1 -680 1 -629 1 -62A 1 -62B 1 -679 1 -67A 1 -67C 1 -67D 1 -67F 1 -62C 1 -683 1 -684 1 -686 1 -6BF 1 -687 1 -62D 1 -62E 1 -681 1 -682 1 -685 1 -62F 1 -630 1 -688 1 -689 1 -68A 1 -68B 1 -68C 1 -68D 1 -68E 1 -68F 1 -690 1 -6EE 1 -631 1 -632 1 -691 1 -692 1 -693 1 -694 1 -695 1 -696 1 -697 1 -698 1 -699 1 -6EF 1 -633 1 -634 1 -69A 1 -69B 1 -69C 1 -6FA 1 -635 1 -636 1 -69D 1 -69E 1 -6FB 1 -637 1 -638 1 -69F 1 -639 1 -63A 1 -6A0 1 -6FC 1 -641 1 -6A1 1 -6A2 1 -6A3 1 -6A4 1 -6A5 1 -6A6 1 -66F 1 -642 1 -6A7 1 -6A8 1 -643 1 -6A9 1 -6AA 1 -6AB 1 -6AC 1 -6AD 1 -6AE 1 -6AF 1 -6B0 1 -6B1 1 -6B2 1 -6B3 1 -6B4 1 -644 1 -6B5 1 -6B6 1 -6B7 1 -6B8 1 -645 1 -6FE 1 -646 1 -6BA 1 -6BB 1 -6BC 1 -6BD 1 -6B9 1 -647 1 -6BE 1 -6C1 1 -6C2 1 -6C3 1 -6FF 1 -6C0 1 -6D5 1 -648 1 -6E5 1 -676 1 -6C4 1 -6C5 1 -6C6 1 -6C7 1 -677 1 -6C8 1 -6C9 1 -6CA 1 -6CB 1 -6CF 1 -649 1 -64A 1 -6E6 1 -678 1 -6CC 1 -6CD 1 -6CE 1 -6D0 1 -6D1 1 -6D2 1 -6D3 1 -710 1 -712 1 -72D 1 -713 1 -714 1 -72E 1 -716 1 -715 1 -72F 1 -717 1 -718 1 -719 1 -74D 1 -71A 1 -71B 1 -71C 1 -71D 1 -71E 1 -71F 1 -74E 1 -720 1 -721 1 -722 1 -723 1 -724 1 -725 1 -726 1 -727 1 -74F 1 -728 1 -729 1 -72A 1 -72B 1 -72C 1 -780 1 -799 1 -79A 1 -781 1 -782 1 -783 1 -79C 1 -784 1 -785 1 -786 1 -787 1 -7A2 1 -7A3 1 -788 1 -7A5 1 -789 1 -78A 1 -78B 1 -79B 1 -78C 1 -798 1 -7A0 1 -7A1 1 -78D 1 -78E 1 -7A4 1 -78F 1 -790 1 -79D 1 -79E 1 -79F 1 -791 1 -792 1 -793 1 -794 1 -795 1 -796 1 -797 1 -7B1 1 -7A6 1 -7A7 1 -7A8 1 -7A9 1 -7AA 1 -7AB 1 -7AC 1 -7AD 1 -7AE 1 -7AF 1 -7B0 1 -4E00 1 -4E01 1 -4E02 1 -4E03 1 -4E04 1 -4E05 1 -4E06 1 -4E07 1 -4E08 1 -4E09 1 -4E0A 1 -4E0B 1 -4E0C 1 -4E0D 1 -4E0E 1 -4E0F 1 -4E10 1 -4E11 1 -4E12 1 -4E13 1 -4E14 1 -4E15 1 -4E16 1 -4E17 1 -4E18 1 -4E19 1 -4E1A 1 -4E1B 1 -4E1C 1 -4E1D 1 -4E1E 1 -4E1F 1 -4E20 1 -4E21 1 -4E22 1 -4E23 1 -4E24 1 -4E25 1 -4E26 1 -4E27 1 -4E28 1 -4E29 1 -4E2A 1 -4E2B 1 -4E2C 1 -4E2D 1 -4E2E 1 -4E2F 1 -4E30 1 -4E31 1 -4E32 1 -4E33 1 -4E34 1 -4E35 1 -4E36 1 -4E37 1 -4E38 1 -4E39 1 -4E3A 1 -4E3B 1 -4E3C 1 -4E3D 1 -4E3E 1 -4E3F 1 -4E40 1 -4E41 1 -4E42 1 -4E43 1 -4E44 1 -4E45 1 -4E46 1 -4E47 1 -4E48 1 -4E49 1 -4E4A 1 -4E4B 1 -4E4C 1 -4E4D 1 -4E4E 1 -4E4F 1 -4E50 1 -4E51 1 -4E52 1 -4E53 1 -4E54 1 -4E55 1 -4E56 1 -4E57 1 -4E58 1 -4E59 1 -4E5A 1 -4E5B 1 -4E5C 1 -4E5D 1 -4E5E 1 -4E5F 1 -4E60 1 -4E61 1 -4E62 1 -4E63 1 -4E64 1 -4E65 1 -4E66 1 -4E67 1 -4E68 1 -4E69 1 -4E6A 1 -4E6B 1 -4E6C 1 -4E6D 1 -4E6E 1 -4E6F 1 -4E70 1 -4E71 1 -4E72 1 -4E73 1 -4E74 1 -4E75 1 -4E76 1 -4E77 1 -4E78 1 -4E79 1 -4E7A 1 -4E7B 1 -4E7C 1 -4E7D 1 -4E7E 1 -4E7F 1 -4E80 1 -4E81 1 -4E82 1 -4E83 1 -4E84 1 -4E85 1 -4E86 1 -4E87 1 -4E88 1 -4E89 1 -4E8A 1 -4E8B 1 -4E8C 1 -4E8D 1 -4E8E 1 -4E8F 1 -4E90 1 -4E91 1 -4E92 1 -4E93 1 -4E94 1 -4E95 1 -4E96 1 -4E97 1 -4E98 1 -4E99 1 -4E9A 1 -4E9B 1 -4E9C 1 -4E9D 1 -4E9E 1 -4E9F 1 -4EA0 1 -4EA1 1 -4EA2 1 -4EA3 1 -4EA4 1 -4EA5 1 -4EA6 1 -4EA7 1 -4EA8 1 -4EA9 1 -4EAA 1 -4EAB 1 -4EAC 1 -4EAD 1 -4EAE 1 -4EAF 1 -4EB0 1 -4EB1 1 -4EB2 1 -4EB3 1 -4EB4 1 -4EB5 1 -4EB6 1 -4EB7 1 -4EB8 1 -4EB9 1 -4EBA 1 -4EBB 1 -4EBC 1 -4EBD 1 -4EBE 1 -4EBF 1 -4EC0 1 -4EC1 1 -4EC2 1 -4EC3 1 -4EC4 1 -4EC5 1 -4EC6 1 -4EC7 1 -4EC8 1 -4EC9 1 -4ECA 1 -4ECB 1 -4ECC 1 -4ECD 1 -4ECE 1 -4ECF 1 -4ED0 1 -4ED1 1 -4ED2 1 -4ED3 1 -4ED4 1 -4ED5 1 -4ED6 1 -4ED7 1 -4ED8 1 -4ED9 1 -4EDA 1 -4EDB 1 -4EDC 1 -4EDD 1 -4EDE 1 -4EDF 1 -4EE0 1 -4EE1 1 -4EE2 1 -4EE3 1 -4EE4 1 -4EE5 1 -4EE6 1 -4EE7 1 -4EE8 1 -4EE9 1 -4EEA 1 -4EEB 1 -4EEC 1 -4EED 1 -4EEE 1 -4EEF 1 -4EF0 1 -4EF1 1 -4EF2 1 -4EF3 1 -4EF4 1 -4EF5 1 -4EF6 1 -4EF7 1 -4EF8 1 -4EF9 1 -4EFA 1 -4EFB 1 -4EFC 1 -4EFD 1 -4EFE 1 -4EFF 1 -4F00 1 -4F01 1 -4F02 1 -4F03 1 -4F04 1 -4F05 1 -4F06 1 -4F07 1 -4F08 1 -4F09 1 -4F0A 1 -4F0B 1 -4F0C 1 -4F0D 1 -4F0E 1 -4F0F 1 -4F10 1 -4F11 1 -4F12 1 -4F13 1 -4F14 1 -4F15 1 -4F16 1 -4F17 1 -4F18 1 -4F19 1 -4F1A 1 -4F1B 1 -4F1C 1 -4F1D 1 -4F1E 1 -4F1F 1 -4F20 1 -4F21 1 -4F22 1 -4F23 1 -4F24 1 -4F25 1 -4F26 1 -4F27 1 -4F28 1 -4F29 1 -4F2A 1 -4F2B 1 -4F2C 1 -4F2D 1 -4F2E 1 -4F2F 1 -4F30 1 -4F31 1 -4F32 1 -4F33 1 -4F34 1 -4F35 1 -4F36 1 -4F37 1 -4F38 1 -4F39 1 -4F3A 1 -4F3B 1 -4F3C 1 -4F3D 1 -4F3E 1 -4F3F 1 -4F40 1 -4F41 1 -4F42 1 -4F43 1 -4F44 1 -4F45 1 -4F46 1 -4F47 1 -4F48 1 -4F49 1 -4F4A 1 -4F4B 1 -4F4C 1 -4F4D 1 -4F4E 1 -4F4F 1 -4F50 1 -4F51 1 -4F52 1 -4F53 1 -4F54 1 -4F55 1 -4F56 1 -4F57 1 -4F58 1 -4F59 1 -4F5A 1 -4F5B 1 -4F5C 1 -4F5D 1 -4F5E 1 -4F5F 1 -4F60 1 -4F61 1 -4F62 1 -4F63 1 -4F64 1 -4F65 1 -4F66 1 -4F67 1 -4F68 1 -4F69 1 -4F6A 1 -4F6B 1 -4F6C 1 -4F6D 1 -4F6E 1 -4F6F 1 -4F70 1 -4F71 1 -4F72 1 -4F73 1 -4F74 1 -4F75 1 -4F76 1 -4F77 1 -4F78 1 -4F79 1 -4F7A 1 -4F7B 1 -4F7C 1 -4F7D 1 -4F7E 1 -4F7F 1 -4F80 1 -4F81 1 -4F82 1 -4F83 1 -4F84 1 -4F85 1 -4F86 1 -4F87 1 -4F88 1 -4F89 1 -4F8A 1 -4F8B 1 -4F8C 1 -4F8D 1 -4F8E 1 -4F8F 1 -4F90 1 -4F91 1 -4F92 1 -4F93 1 -4F94 1 -4F95 1 -4F96 1 -4F97 1 -4F98 1 -4F99 1 -4F9A 1 -4F9B 1 -4F9C 1 -4F9D 1 -4F9E 1 -4F9F 1 -4FA0 1 -4FA1 1 -4FA2 1 -4FA3 1 -4FA4 1 -4FA5 1 -4FA6 1 -4FA7 1 -4FA8 1 -4FA9 1 -4FAA 1 -4FAB 1 -4FAC 1 -4FAD 1 -4FAE 1 -4FAF 1 -4FB0 1 -4FB1 1 -4FB2 1 -4FB3 1 -4FB4 1 -4FB5 1 -4FB6 1 -4FB7 1 -4FB8 1 -4FB9 1 -4FBA 1 -4FBB 1 -4FBC 1 -4FBD 1 -4FBE 1 -4FBF 1 -4FC0 1 -4FC1 1 -4FC2 1 -4FC3 1 -4FC4 1 -4FC5 1 -4FC6 1 -4FC7 1 -4FC8 1 -4FC9 1 -4FCA 1 -4FCB 1 -4FCC 1 -4FCD 1 -4FCE 1 -4FCF 1 -4FD0 1 -4FD1 1 -4FD2 1 -4FD3 1 -4FD4 1 -4FD5 1 -4FD6 1 -4FD7 1 -4FD8 1 -4FD9 1 -4FDA 1 -4FDB 1 -4FDC 1 -4FDD 1 -4FDE 1 -4FDF 1 -4FE0 1 -4FE1 1 -4FE2 1 -4FE3 1 -4FE4 1 -4FE5 1 -4FE6 1 -4FE7 1 -4FE8 1 -4FE9 1 -4FEA 1 -4FEB 1 -4FEC 1 -4FED 1 -4FEE 1 -4FEF 1 -4FF0 1 -4FF1 1 -4FF2 1 -4FF3 1 -4FF4 1 -4FF5 1 -4FF6 1 -4FF7 1 -4FF8 1 -4FF9 1 -4FFA 1 -4FFB 1 -4FFC 1 -4FFD 1 -4FFE 1 -4FFF 1 -237 1 -238 1 -239 1 -23A 1 -23B 1 -23C 1 -23D 1 -23E 1 -23F 1 -240 1 -241 1 -242 1 -243 1 -244 1 -245 1 -246 1 -247 1 -248 1 -249 1 -24A 1 -24B 1 -24C 1 -24D 1 -24E 1 -24F 1 -358 1 -359 1 -35A 1 -35B 1 -35C 1 -370 1 -371 1 -372 1 -373 1 -376 1 -377 1 -378 1 -379 1 -37B 1 -37C 1 -37D 1 -37F 1 -380 1 -381 1 -382 1 -383 1 -38B 1 -38D 1 -3A2 1 -3CF 1 -3FC 1 -3FD 1 -3FE 1 -3FF 1 -487 1 -4CF 1 -4F6 1 -4F7 1 -4FA 1 -4FB 1 -4FC 1 -4FD 1 -4FE 1 -4FF 1 -510 1 -511 1 -512 1 -513 1 -514 1 -515 1 -516 1 -517 1 -518 1 -519 1 -51A 1 -51B 1 -51C 1 -51D 1 -51E 1 -51F 1 -520 1 -521 1 -522 1 -523 1 -524 1 -525 1 -526 1 -527 1 -528 1 -529 1 -52A 1 -52B 1 -52C 1 -52D 1 -52E 1 -52F 1 -530 1 -557 1 -558 1 -560 1 -588 1 -58B 1 -58C 1 -58D 1 -58E 1 -58F 1 -590 1 -5A2 1 -5BA 1 -5C5 1 -5C6 1 -5C7 1 -5C8 1 -5C9 1 -5CA 1 -5CB 1 -5CC 1 -5CD 1 -5CE 1 -5CF 1 -5EB 1 -5EC 1 -5ED 1 -5EE 1 -5EF 1 -5F5 1 -5F6 1 -5F7 1 -5F8 1 -5F9 1 -5FA 1 -5FB 1 -5FC 1 -5FD 1 -5FE 1 -5FF 1 -604 1 -605 1 -606 1 -607 1 -608 1 -609 1 -60A 1 -60B 1 -616 1 -617 1 -618 1 -619 1 -61A 1 -61C 1 -61D 1 -61E 1 -620 1 -63B 1 -63C 1 -63D 1 -63E 1 -63F 1 -659 1 -65A 1 -65B 1 -65C 1 -65D 1 -65E 1 -65F 1 -70E 1 -74B 1 -74C 1 -750 1 -751 1 -752 1 -753 1 -754 1 -755 1 -756 1 -757 1 -758 1 -759 1 -75A 1 -75B 1 -75C 1 -75D 1 -75E 1 -75F 1 -760 1 -761 1 -762 1 -763 1 -764 1 -765 1 -766 1 -767 1 -768 1 -769 1 -76A 1 -76B 1 -76C 1 -76D 1 -76E 1 -76F 1 -770 1 -771 1 -772 1 -773 1 -774 1 -775 1 -776 1 -777 1 -778 1 -779 1 -77A 1 -77B 1 -77C 1 -77D 1 -77E 1 -77F 1 -7B2 1 -7B3 1 -7B4 1 -7B5 1 -7B6 1 -7B7 1 -7B8 1 -7B9 1 -7BA 1 -7BB 1 -7BC 1 -7BD 1 -7BE 1 -7BF 1 -7C0 1 -7C1 1 -7C2 1 -7C3 1 -7C4 1 -7C5 1 -7C6 1 -7C7 1 -7C8 1 -7C9 1 -7CA 1 -7CB 1 -7CC 1 -7CD 1 -7CE 1 -7CF 1 -7D0 1 -7D1 1 -7D2 1 -7D3 1 -7D4 1 -7D5 1 -7D6 1 -7D7 1 -7D8 1 -7D9 1 -7DA 1 -7DB 1 -7DC 1 -7DD 1 -7DE 1 -7DF 1 -7E0 1 -7E1 1 -7E2 1 -7E3 1 -7E4 1 -7E5 1 -7E6 1 -7E7 1 -7E8 1 -7E9 1 -7EA 1 -7EB 1 -7EC 1 -7ED 1 -7EE 1 -7EF 1 -7F0 1 -7F1 1 -7F2 1 -7F3 1 -7F4 1 -7F5 1 -7F6 1 -7F7 1 -7F8 1 -7F9 1 -7FA 1 -7FB 1 -7FC 1 -7FD 1 -7FE 1 -7FF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -SET NAMES utf8; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=NDB CHARACTER SET utf8; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_general_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_spanish_ci; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -85 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -300 1 -301 1 -302 1 -303 1 -304 1 -305 1 -306 1 -307 1 -308 1 -309 1 -30A 1 -30B 1 -30C 1 -30D 1 -30E 1 -30F 1 -310 1 -311 1 -312 1 -313 1 -314 1 -315 1 -316 1 -317 1 -318 1 -319 1 -31A 1 -31B 1 -31C 1 -31D 1 -31E 1 -31F 1 -320 1 -321 1 -322 1 -323 1 -324 1 -325 1 -326 1 -327 1 -328 1 -329 1 -32A 1 -32B 1 -32C 1 -32D 1 -32E 1 -32F 1 -330 1 -331 1 -332 1 -333 1 -334 1 -335 1 -336 1 -337 1 -338 1 -339 1 -33A 1 -33B 1 -33C 1 -33D 1 -33E 1 -33F 1 -340 1 -341 1 -342 1 -343 1 -344 1 -345 1 -346 1 -347 1 -348 1 -349 1 -34A 1 -34B 1 -34C 1 -34D 1 -34E 1 -34F 1 -350 1 -351 1 -352 1 -353 1 -354 1 -355 1 -356 1 -357 1 -35D 1 -35E 1 -35F 1 -360 1 -361 1 -362 1 -483 1 -484 1 -485 1 -486 1 -488 1 -489 1 -591 1 -592 1 -593 1 -594 1 -595 1 -596 1 -597 1 -598 1 -599 1 -59A 1 -59B 1 -59C 1 -59D 1 -59E 1 -59F 1 -5A0 1 -5A1 1 -5A3 1 -5A4 1 -5A5 1 -5A6 1 -5A7 1 -5A8 1 -5A9 1 -5AA 1 -5AB 1 -5AC 1 -5AD 1 -5AE 1 -5AF 1 -5B0 1 -5B1 1 -5B2 1 -5B3 1 -5B4 1 -5B5 1 -5B6 1 -5B7 1 -5B8 1 -5B9 1 -5BB 1 -5BC 1 -5BD 1 -5BF 1 -5C1 1 -5C2 1 -5C4 1 -600 1 -601 1 -602 1 -603 1 -610 1 -611 1 -612 1 -613 1 -614 1 -615 1 -64B 1 -64C 1 -64D 1 -64E 1 -64F 1 -650 1 -651 1 -652 1 -653 1 -654 1 -655 1 -656 1 -657 1 -658 1 -670 1 -6D6 1 -6D7 1 -6D8 1 -6D9 1 -6DA 1 -6DB 1 -6DC 1 -6DD 1 -6DE 1 -6DF 1 -6E0 1 -6E1 1 -6E2 1 -6E3 1 -6E4 1 -6E7 1 -6E8 1 -6EA 1 -6EB 1 -6EC 1 -6ED 1 -70F 1 -711 1 -730 1 -731 1 -732 1 -733 1 -734 1 -735 1 -736 1 -737 1 -738 1 -739 1 -73A 1 -73B 1 -73C 1 -73D 1 -73E 1 -73F 1 -740 1 -741 1 -742 1 -743 1 -744 1 -745 1 -746 1 -747 1 -748 1 -749 1 -74A 1 -640 1 -60 1 -B4 1 -384 1 -2DC 1 -5E 1 -AF 1 -2D8 1 -2D9 1 -A8 1 -385 1 -2DA 1 -2DD 1 -B8 1 -2DB 1 -5F 1 -AD 1 -2D 1 -58A 1 -2C 1 -55D 1 -60C 1 -60D 1 -66B 1 -66C 1 -3B 1 -37E 1 -61B 1 -3A 1 -589 1 -703 1 -704 1 -705 1 -706 1 -707 1 -708 1 -21 1 -A1 1 -55C 1 -3F 1 -BF 1 -55E 1 -61F 1 -709 1 -2E 1 -6D4 1 -701 1 -702 1 -B7 1 -387 1 -700 1 -27 1 -22 1 -AB 1 -BB 1 -28 1 -29 1 -5B 1 -7B 1 -7D 1 -A7 1 -B6 1 -A9 1 -AE 1 -40 1 -2A 1 -66D 1 -2F 1 -26 1 -23 1 -25 1 -66A 1 -55A 1 -55B 1 -55F 1 -5BE 1 -5C0 1 -5C3 1 -5F3 1 -5F4 1 -70A 1 -70B 1 -70C 1 -70D 1 -2B9 1 -374 1 -375 1 -2BA 1 -2C2 1 -2C3 1 -2C4 1 -2C5 1 -2C6 1 -2C7 1 -2C8 1 -2C9 1 -2CA 1 -2CB 1 -2CC 1 -2CD 1 -2CE 1 -2CF 1 -2D2 1 -2D3 1 -2D4 1 -2D5 1 -2D6 1 -2D7 1 -2DE 1 -2DF 1 -2E5 1 -2E6 1 -2E7 1 -2E8 1 -2E9 1 -2EA 1 -2EB 1 -2EC 1 -2ED 1 -2EF 1 -2F0 1 -2F1 1 -2F2 1 -2F3 1 -2F4 1 -2F5 1 -2F6 1 -2F7 1 -2F8 1 -2F9 1 -2FA 1 -2FB 1 -2FC 1 -2FD 1 -2FE 1 -2FF 1 -B0 1 -482 1 -60E 1 -60F 1 -6E9 1 -3F6 1 -2B 1 -B1 1 -F7 1 -D7 1 -3C 1 -3D 1 -3E 1 -AC 1 -7C 1 -A6 1 -7E 1 -2D0 1 -2D1 1 -A4 1 -A2 1 -24 1 -A3 1 -A5 1 -30 1 -660 1 -6F0 1 -31 1 -B9 1 -661 1 -6F1 1 -BD 1 -BC 1 -32 1 -B2 1 -662 1 -6F2 1 -33 1 -B3 1 -663 1 -6F3 1 -BE 1 -34 1 -664 1 -6F4 1 -35 1 -665 1 -6F5 1 -36 1 -666 1 -6F6 1 -37 1 -667 1 -6F7 1 -38 1 -668 1 -6F8 1 -39 1 -669 1 -6F9 1 -41 1 -61 1 -AA 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -100 1 -101 1 -102 1 -103 1 -104 1 -105 1 -1CD 1 -1CE 1 -1DE 1 -1DF 1 -1E0 1 -1E1 1 -1FA 1 -1FB 1 -200 1 -201 1 -202 1 -203 1 -226 1 -227 1 -363 1 -C6 1 -E6 1 -1E2 1 -1E3 1 -1FC 1 -1FD 1 -250 1 -251 1 -252 1 -42 1 -62 1 -299 1 -180 1 -181 1 -253 1 -182 1 -183 1 -43 1 -63 1 -C7 1 -E7 1 -106 1 -107 1 -108 1 -109 1 -10A 1 -10B 1 -10C 1 -10D 1 -368 1 -187 1 -188 1 -255 1 -44 1 -64 1 -10E 1 -10F 1 -369 1 -1C4 1 -1C5 1 -1C6 1 -1F1 1 -1F2 1 -1F3 1 -2A3 1 -2A5 1 -2A4 1 -110 1 -111 1 -189 1 -256 1 -18A 1 -257 1 -18B 1 -18C 1 -221 1 -D0 1 -F0 1 -45 1 -65 1 -C8 1 -C9 1 -CA 1 -CB 1 -E8 1 -E9 1 -EA 1 -EB 1 -112 1 -113 1 -114 1 -115 1 -116 1 -117 1 -118 1 -119 1 -11A 1 -11B 1 -204 1 -205 1 -206 1 -207 1 -228 1 -229 1 -364 1 -18E 1 -1DD 1 -18F 1 -259 1 -190 1 -25B 1 -258 1 -25A 1 -25C 1 -25D 1 -25E 1 -29A 1 -264 1 -46 1 -66 1 -2A9 1 -191 1 -192 1 -47 1 -67 1 -11C 1 -11D 1 -11E 1 -11F 1 -120 1 -121 1 -122 1 -123 1 -1E6 1 -1E7 1 -1F4 1 -1F5 1 -261 1 -262 1 -1E4 1 -1E5 1 -193 1 -260 1 -29B 1 -194 1 -263 1 -2E0 1 -1A2 1 -1A3 1 -48 1 -68 1 -124 1 -125 1 -21E 1 -21F 1 -2B0 1 -36A 1 -29C 1 -195 1 -1F6 1 -126 1 -127 1 -266 1 -2B1 1 -267 1 -2BB 1 -2BD 1 -49 1 -69 1 -CC 1 -CD 1 -CE 1 -CF 1 -EC 1 -ED 1 -EE 1 -EF 1 -128 1 -129 1 -12A 1 -12B 1 -12C 1 -12D 1 -12E 1 -12F 1 -130 1 -1CF 1 -1D0 1 -208 1 -209 1 -20A 1 -20B 1 -365 1 -132 1 -133 1 -131 1 -26A 1 -197 1 -268 1 -196 1 -269 1 -4A 1 -6A 1 -134 1 -135 1 -1F0 1 -2B2 1 -29D 1 -25F 1 -284 1 -4B 1 -6B 1 -136 1 -137 1 -1E8 1 -1E9 1 -198 1 -199 1 -29E 1 -4C 1 -6C 1 -139 1 -13A 1 -13B 1 -13C 1 -13D 1 -13E 1 -2E1 1 -13F 1 -140 1 -1C7 1 -1C8 1 -1C9 1 -2AA 1 -2AB 1 -29F 1 -141 1 -142 1 -19A 1 -26B 1 -26C 1 -26D 1 -234 1 -26E 1 -19B 1 -28E 1 -4D 1 -6D 1 -36B 1 -271 1 -4E 1 -6E 1 -143 1 -144 1 -145 1 -146 1 -147 1 -148 1 -1F8 1 -1F9 1 -1CA 1 -1CB 1 -1CC 1 -D1 1 -F1 1 -274 1 -19D 1 -272 1 -19E 1 -220 1 -273 1 -235 1 -14A 1 -14B 1 -4F 1 -6F 1 -BA 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -14C 1 -14D 1 -14E 1 -14F 1 -150 1 -151 1 -1A0 1 -1A1 1 -1D1 1 -1D2 1 -1EA 1 -1EB 1 -1EC 1 -1ED 1 -20C 1 -20D 1 -20E 1 -20F 1 -22A 1 -22B 1 -22C 1 -22D 1 -22E 1 -22F 1 -230 1 -231 1 -366 1 -152 1 -153 1 -276 1 -D8 1 -F8 1 -1FE 1 -1FF 1 -186 1 -254 1 -19F 1 -275 1 -277 1 -222 1 -223 1 -50 1 -70 1 -1A4 1 -1A5 1 -278 1 -51 1 -71 1 -2A0 1 -138 1 -52 1 -72 1 -154 1 -155 1 -156 1 -157 1 -158 1 -159 1 -210 1 -211 1 -212 1 -213 1 -2B3 1 -36C 1 -1A6 1 -280 1 -279 1 -2B4 1 -27A 1 -27B 1 -2B5 1 -27C 1 -27D 1 -27E 1 -27F 1 -281 1 -2B6 1 -53 1 -73 1 -15A 1 -15B 1 -15C 1 -15D 1 -15E 1 -15F 1 -160 1 -161 1 -17F 1 -218 1 -219 1 -2E2 1 -DF 1 -282 1 -1A9 1 -283 1 -1AA 1 -285 1 -286 1 -54 1 -74 1 -162 1 -163 1 -164 1 -165 1 -21A 1 -21B 1 -36D 1 -2A8 1 -1BE 1 -2A6 1 -2A7 1 -166 1 -167 1 -1AB 1 -1AC 1 -1AD 1 -1AE 1 -288 1 -236 1 -287 1 -55 1 -75 1 -D9 1 -DA 1 -DB 1 -DC 1 -F9 1 -FA 1 -FB 1 -FC 1 -168 1 -169 1 -16A 1 -16B 1 -16C 1 -16D 1 -16E 1 -16F 1 -170 1 -171 1 -172 1 -173 1 -1AF 1 -1B0 1 -1D3 1 -1D4 1 -1D5 1 -1D6 1 -1D7 1 -1D8 1 -1D9 1 -1DA 1 -1DB 1 -1DC 1 -214 1 -215 1 -216 1 -217 1 -367 1 -289 1 -265 1 -2AE 1 -2AF 1 -19C 1 -26F 1 -270 1 -1B1 1 -28A 1 -56 1 -76 1 -36E 1 -1B2 1 -28B 1 -28C 1 -57 1 -77 1 -174 1 -175 1 -2B7 1 -28D 1 -58 1 -78 1 -2E3 1 -36F 1 -59 1 -79 1 -DD 1 -FD 1 -FF 1 -176 1 -177 1 -178 1 -232 1 -233 1 -2B8 1 -28F 1 -1B3 1 -1B4 1 -5A 1 -7A 1 -179 1 -17A 1 -17B 1 -17C 1 -17D 1 -17E 1 -18D 1 -1B5 1 -1B6 1 -224 1 -225 1 -290 1 -291 1 -1B7 1 -1EE 1 -1EF 1 -292 1 -1B8 1 -1B9 1 -1BA 1 -293 1 -21C 1 -21D 1 -DE 1 -FE 1 -1BF 1 -1F7 1 -1BB 1 -1A7 1 -1A8 1 -1BC 1 -1BD 1 -184 1 -185 1 -294 1 -2C0 1 -2BC 1 -149 1 -2EE 1 -2BE 1 -295 1 -2E4 1 -2BF 1 -2C1 1 -2A1 1 -2A2 1 -296 1 -1C0 1 -1C1 1 -1C2 1 -1C3 1 -297 1 -298 1 -2AC 1 -2AD 1 -386 1 -391 1 -3AC 1 -3B1 1 -392 1 -3B2 1 -3D0 1 -393 1 -3B3 1 -394 1 -3B4 1 -388 1 -395 1 -3AD 1 -3B5 1 -3F5 1 -3DC 1 -3DD 1 -3DA 1 -3DB 1 -396 1 -3B6 1 -389 1 -397 1 -3AE 1 -3B7 1 -398 1 -3B8 1 -3D1 1 -3F4 1 -37A 1 -38A 1 -390 1 -399 1 -3AA 1 -3AF 1 -3B9 1 -3CA 1 -3F3 1 -39A 1 -3BA 1 -3F0 1 -3D7 1 -39B 1 -3BB 1 -B5 1 -39C 1 -3BC 1 -39D 1 -3BD 1 -39E 1 -3BE 1 -38C 1 -39F 1 -3BF 1 -3CC 1 -3A0 1 -3C0 1 -3D6 1 -3DE 1 -3DF 1 -3D8 1 -3D9 1 -3A1 1 -3C1 1 -3F1 1 -3A3 1 -3C2 1 -3C3 1 -3F2 1 -3F9 1 -3A4 1 -3C4 1 -38E 1 -3A5 1 -3AB 1 -3B0 1 -3C5 1 -3CB 1 -3CD 1 -3D2 1 -3D3 1 -3D4 1 -3A6 1 -3C6 1 -3D5 1 -3A7 1 -3C7 1 -3A8 1 -3C8 1 -38F 1 -3A9 1 -3C9 1 -3CE 1 -3E0 1 -3E1 1 -3F7 1 -3F8 1 -3FA 1 -3FB 1 -3E2 1 -3E3 1 -3E4 1 -3E5 1 -3E6 1 -3E7 1 -3E8 1 -3E9 1 -3EA 1 -3EB 1 -3EC 1 -3ED 1 -3EE 1 -3EF 1 -410 1 -430 1 -4D0 1 -4D1 1 -4D2 1 -4D3 1 -4D8 1 -4D9 1 -4DA 1 -4DB 1 -4D4 1 -4D5 1 -411 1 -431 1 -412 1 -432 1 -413 1 -433 1 -490 1 -491 1 -492 1 -493 1 -494 1 -495 1 -414 1 -434 1 -500 1 -501 1 -402 1 -452 1 -502 1 -503 1 -403 1 -453 1 -498 1 -499 1 -400 1 -401 1 -415 1 -435 1 -450 1 -451 1 -4D6 1 -4D7 1 -404 1 -454 1 -416 1 -436 1 -4C1 1 -4C2 1 -4DC 1 -4DD 1 -496 1 -497 1 -417 1 -437 1 -504 1 -505 1 -4DE 1 -4DF 1 -405 1 -455 1 -4E0 1 -4E1 1 -506 1 -507 1 -40D 1 -418 1 -438 1 -45D 1 -4E2 1 -4E3 1 -48A 1 -48B 1 -4E4 1 -4E5 1 -406 1 -456 1 -407 1 -457 1 -419 1 -439 1 -408 1 -458 1 -41A 1 -43A 1 -49A 1 -49B 1 -4C3 1 -4C4 1 -4A0 1 -4A1 1 -49E 1 -49F 1 -49C 1 -49D 1 -41B 1 -43B 1 -4C5 1 -4C6 1 -409 1 -459 1 -508 1 -509 1 -41C 1 -43C 1 -4CD 1 -4CE 1 -41D 1 -43D 1 -4C9 1 -4CA 1 -4A2 1 -4A3 1 -4C7 1 -4C8 1 -4A4 1 -4A5 1 -40A 1 -45A 1 -50A 1 -50B 1 -41E 1 -43E 1 -4E6 1 -4E7 1 -4E8 1 -4E9 1 -4EA 1 -4EB 1 -41F 1 -43F 1 -4A6 1 -4A7 1 -480 1 -481 1 -420 1 -440 1 -48E 1 -48F 1 -421 1 -441 1 -50C 1 -50D 1 -4AA 1 -4AB 1 -422 1 -442 1 -50E 1 -50F 1 -4AC 1 -4AD 1 -40B 1 -45B 1 -40C 1 -45C 1 -423 1 -443 1 -4EE 1 -4EF 1 -40E 1 -45E 1 -4F0 1 -4F1 1 -4F2 1 -4F3 1 -4AE 1 -4AF 1 -4B0 1 -4B1 1 -478 1 -479 1 -424 1 -444 1 -425 1 -445 1 -4B2 1 -4B3 1 -4BA 1 -4BB 1 -460 1 -461 1 -47E 1 -47F 1 -47C 1 -47D 1 -47A 1 -47B 1 -426 1 -446 1 -4B4 1 -4B5 1 -427 1 -447 1 -4F4 1 -4F5 1 -4B6 1 -4B7 1 -4CB 1 -4CC 1 -4B8 1 -4B9 1 -4BC 1 -4BD 1 -4BE 1 -4BF 1 -40F 1 -45F 1 -428 1 -448 1 -429 1 -449 1 -42A 1 -44A 1 -42B 1 -44B 1 -4F8 1 -4F9 1 -42C 1 -44C 1 -48C 1 -48D 1 -462 1 -463 1 -42D 1 -44D 1 -4EC 1 -4ED 1 -42E 1 -44E 1 -42F 1 -44F 1 -464 1 -465 1 -466 1 -467 1 -46A 1 -46B 1 -468 1 -469 1 -46C 1 -46D 1 -46E 1 -46F 1 -470 1 -471 1 -472 1 -473 1 -474 1 -475 1 -476 1 -477 1 -4A8 1 -4A9 1 -4C0 1 -531 1 -561 1 -532 1 -562 1 -533 1 -563 1 -534 1 -564 1 -535 1 -565 1 -587 1 -536 1 -566 1 -537 1 -567 1 -538 1 -568 1 -539 1 -569 1 -53A 1 -56A 1 -53B 1 -56B 1 -53C 1 -56C 1 -53D 1 -56D 1 -53E 1 -56E 1 -53F 1 -56F 1 -540 1 -570 1 -541 1 -571 1 -542 1 -572 1 -543 1 -573 1 -544 1 -574 1 -545 1 -575 1 -546 1 -576 1 -547 1 -577 1 -548 1 -578 1 -549 1 -579 1 -54A 1 -57A 1 -54B 1 -57B 1 -54C 1 -57C 1 -54D 1 -57D 1 -54E 1 -57E 1 -54F 1 -57F 1 -550 1 -580 1 -551 1 -581 1 -552 1 -582 1 -553 1 -583 1 -554 1 -584 1 -555 1 -585 1 -556 1 -586 1 -559 1 -5D0 1 -5D1 1 -5D2 1 -5D3 1 -5D4 1 -5D5 1 -5F0 1 -5F1 1 -5D6 1 -5D7 1 -5D8 1 -5D9 1 -5F2 1 -5DA 1 -5DB 1 -5DC 1 -5DD 1 -5DE 1 -5DF 1 -5E0 1 -5E1 1 -5E2 1 -5E3 1 -5E4 1 -5E5 1 -5E6 1 -5E7 1 -5E8 1 -5E9 1 -5EA 1 -621 1 -674 1 -6FD 1 -622 1 -623 1 -672 1 -671 1 -624 1 -625 1 -673 1 -626 1 -627 1 -675 1 -66E 1 -628 1 -67B 1 -67E 1 -680 1 -629 1 -62A 1 -62B 1 -679 1 -67A 1 -67C 1 -67D 1 -67F 1 -62C 1 -683 1 -684 1 -686 1 -6BF 1 -687 1 -62D 1 -62E 1 -681 1 -682 1 -685 1 -62F 1 -630 1 -688 1 -689 1 -68A 1 -68B 1 -68C 1 -68D 1 -68E 1 -68F 1 -690 1 -6EE 1 -631 1 -632 1 -691 1 -692 1 -693 1 -694 1 -695 1 -696 1 -697 1 -698 1 -699 1 -6EF 1 -633 1 -634 1 -69A 1 -69B 1 -69C 1 -6FA 1 -635 1 -636 1 -69D 1 -69E 1 -6FB 1 -637 1 -638 1 -69F 1 -639 1 -63A 1 -6A0 1 -6FC 1 -641 1 -6A1 1 -6A2 1 -6A3 1 -6A4 1 -6A5 1 -6A6 1 -66F 1 -642 1 -6A7 1 -6A8 1 -643 1 -6A9 1 -6AA 1 -6AB 1 -6AC 1 -6AD 1 -6AE 1 -6AF 1 -6B0 1 -6B1 1 -6B2 1 -6B3 1 -6B4 1 -644 1 -6B5 1 -6B6 1 -6B7 1 -6B8 1 -645 1 -6FE 1 -646 1 -6BA 1 -6BB 1 -6BC 1 -6BD 1 -6B9 1 -647 1 -6BE 1 -6C1 1 -6C2 1 -6C3 1 -6FF 1 -6C0 1 -6D5 1 -648 1 -6E5 1 -676 1 -6C4 1 -6C5 1 -6C6 1 -6C7 1 -677 1 -6C8 1 -6C9 1 -6CA 1 -6CB 1 -6CF 1 -649 1 -64A 1 -6E6 1 -678 1 -6CC 1 -6CD 1 -6CE 1 -6D0 1 -6D1 1 -6D2 1 -6D3 1 -710 1 -712 1 -72D 1 -713 1 -714 1 -72E 1 -716 1 -715 1 -72F 1 -717 1 -718 1 -719 1 -74D 1 -71A 1 -71B 1 -71C 1 -71D 1 -71E 1 -71F 1 -74E 1 -720 1 -721 1 -722 1 -723 1 -724 1 -725 1 -726 1 -727 1 -74F 1 -728 1 -729 1 -72A 1 -72B 1 -72C 1 -780 1 -799 1 -79A 1 -781 1 -782 1 -783 1 -79C 1 -784 1 -785 1 -786 1 -787 1 -7A2 1 -7A3 1 -788 1 -7A5 1 -789 1 -78A 1 -78B 1 -79B 1 -78C 1 -798 1 -7A0 1 -7A1 1 -78D 1 -78E 1 -7A4 1 -78F 1 -790 1 -79D 1 -79E 1 -79F 1 -791 1 -792 1 -793 1 -794 1 -795 1 -796 1 -797 1 -7B1 1 -7A6 1 -7A7 1 -7A8 1 -7A9 1 -7AA 1 -7AB 1 -7AC 1 -7AD 1 -7AE 1 -7AF 1 -7B0 1 -4E00 1 -4E01 1 -4E02 1 -4E03 1 -4E04 1 -4E05 1 -4E06 1 -4E07 1 -4E08 1 -4E09 1 -4E0A 1 -4E0B 1 -4E0C 1 -4E0D 1 -4E0E 1 -4E0F 1 -4E10 1 -4E11 1 -4E12 1 -4E13 1 -4E14 1 -4E15 1 -4E16 1 -4E17 1 -4E18 1 -4E19 1 -4E1A 1 -4E1B 1 -4E1C 1 -4E1D 1 -4E1E 1 -4E1F 1 -4E20 1 -4E21 1 -4E22 1 -4E23 1 -4E24 1 -4E25 1 -4E26 1 -4E27 1 -4E28 1 -4E29 1 -4E2A 1 -4E2B 1 -4E2C 1 -4E2D 1 -4E2E 1 -4E2F 1 -4E30 1 -4E31 1 -4E32 1 -4E33 1 -4E34 1 -4E35 1 -4E36 1 -4E37 1 -4E38 1 -4E39 1 -4E3A 1 -4E3B 1 -4E3C 1 -4E3D 1 -4E3E 1 -4E3F 1 -4E40 1 -4E41 1 -4E42 1 -4E43 1 -4E44 1 -4E45 1 -4E46 1 -4E47 1 -4E48 1 -4E49 1 -4E4A 1 -4E4B 1 -4E4C 1 -4E4D 1 -4E4E 1 -4E4F 1 -4E50 1 -4E51 1 -4E52 1 -4E53 1 -4E54 1 -4E55 1 -4E56 1 -4E57 1 -4E58 1 -4E59 1 -4E5A 1 -4E5B 1 -4E5C 1 -4E5D 1 -4E5E 1 -4E5F 1 -4E60 1 -4E61 1 -4E62 1 -4E63 1 -4E64 1 -4E65 1 -4E66 1 -4E67 1 -4E68 1 -4E69 1 -4E6A 1 -4E6B 1 -4E6C 1 -4E6D 1 -4E6E 1 -4E6F 1 -4E70 1 -4E71 1 -4E72 1 -4E73 1 -4E74 1 -4E75 1 -4E76 1 -4E77 1 -4E78 1 -4E79 1 -4E7A 1 -4E7B 1 -4E7C 1 -4E7D 1 -4E7E 1 -4E7F 1 -4E80 1 -4E81 1 -4E82 1 -4E83 1 -4E84 1 -4E85 1 -4E86 1 -4E87 1 -4E88 1 -4E89 1 -4E8A 1 -4E8B 1 -4E8C 1 -4E8D 1 -4E8E 1 -4E8F 1 -4E90 1 -4E91 1 -4E92 1 -4E93 1 -4E94 1 -4E95 1 -4E96 1 -4E97 1 -4E98 1 -4E99 1 -4E9A 1 -4E9B 1 -4E9C 1 -4E9D 1 -4E9E 1 -4E9F 1 -4EA0 1 -4EA1 1 -4EA2 1 -4EA3 1 -4EA4 1 -4EA5 1 -4EA6 1 -4EA7 1 -4EA8 1 -4EA9 1 -4EAA 1 -4EAB 1 -4EAC 1 -4EAD 1 -4EAE 1 -4EAF 1 -4EB0 1 -4EB1 1 -4EB2 1 -4EB3 1 -4EB4 1 -4EB5 1 -4EB6 1 -4EB7 1 -4EB8 1 -4EB9 1 -4EBA 1 -4EBB 1 -4EBC 1 -4EBD 1 -4EBE 1 -4EBF 1 -4EC0 1 -4EC1 1 -4EC2 1 -4EC3 1 -4EC4 1 -4EC5 1 -4EC6 1 -4EC7 1 -4EC8 1 -4EC9 1 -4ECA 1 -4ECB 1 -4ECC 1 -4ECD 1 -4ECE 1 -4ECF 1 -4ED0 1 -4ED1 1 -4ED2 1 -4ED3 1 -4ED4 1 -4ED5 1 -4ED6 1 -4ED7 1 -4ED8 1 -4ED9 1 -4EDA 1 -4EDB 1 -4EDC 1 -4EDD 1 -4EDE 1 -4EDF 1 -4EE0 1 -4EE1 1 -4EE2 1 -4EE3 1 -4EE4 1 -4EE5 1 -4EE6 1 -4EE7 1 -4EE8 1 -4EE9 1 -4EEA 1 -4EEB 1 -4EEC 1 -4EED 1 -4EEE 1 -4EEF 1 -4EF0 1 -4EF1 1 -4EF2 1 -4EF3 1 -4EF4 1 -4EF5 1 -4EF6 1 -4EF7 1 -4EF8 1 -4EF9 1 -4EFA 1 -4EFB 1 -4EFC 1 -4EFD 1 -4EFE 1 -4EFF 1 -4F00 1 -4F01 1 -4F02 1 -4F03 1 -4F04 1 -4F05 1 -4F06 1 -4F07 1 -4F08 1 -4F09 1 -4F0A 1 -4F0B 1 -4F0C 1 -4F0D 1 -4F0E 1 -4F0F 1 -4F10 1 -4F11 1 -4F12 1 -4F13 1 -4F14 1 -4F15 1 -4F16 1 -4F17 1 -4F18 1 -4F19 1 -4F1A 1 -4F1B 1 -4F1C 1 -4F1D 1 -4F1E 1 -4F1F 1 -4F20 1 -4F21 1 -4F22 1 -4F23 1 -4F24 1 -4F25 1 -4F26 1 -4F27 1 -4F28 1 -4F29 1 -4F2A 1 -4F2B 1 -4F2C 1 -4F2D 1 -4F2E 1 -4F2F 1 -4F30 1 -4F31 1 -4F32 1 -4F33 1 -4F34 1 -4F35 1 -4F36 1 -4F37 1 -4F38 1 -4F39 1 -4F3A 1 -4F3B 1 -4F3C 1 -4F3D 1 -4F3E 1 -4F3F 1 -4F40 1 -4F41 1 -4F42 1 -4F43 1 -4F44 1 -4F45 1 -4F46 1 -4F47 1 -4F48 1 -4F49 1 -4F4A 1 -4F4B 1 -4F4C 1 -4F4D 1 -4F4E 1 -4F4F 1 -4F50 1 -4F51 1 -4F52 1 -4F53 1 -4F54 1 -4F55 1 -4F56 1 -4F57 1 -4F58 1 -4F59 1 -4F5A 1 -4F5B 1 -4F5C 1 -4F5D 1 -4F5E 1 -4F5F 1 -4F60 1 -4F61 1 -4F62 1 -4F63 1 -4F64 1 -4F65 1 -4F66 1 -4F67 1 -4F68 1 -4F69 1 -4F6A 1 -4F6B 1 -4F6C 1 -4F6D 1 -4F6E 1 -4F6F 1 -4F70 1 -4F71 1 -4F72 1 -4F73 1 -4F74 1 -4F75 1 -4F76 1 -4F77 1 -4F78 1 -4F79 1 -4F7A 1 -4F7B 1 -4F7C 1 -4F7D 1 -4F7E 1 -4F7F 1 -4F80 1 -4F81 1 -4F82 1 -4F83 1 -4F84 1 -4F85 1 -4F86 1 -4F87 1 -4F88 1 -4F89 1 -4F8A 1 -4F8B 1 -4F8C 1 -4F8D 1 -4F8E 1 -4F8F 1 -4F90 1 -4F91 1 -4F92 1 -4F93 1 -4F94 1 -4F95 1 -4F96 1 -4F97 1 -4F98 1 -4F99 1 -4F9A 1 -4F9B 1 -4F9C 1 -4F9D 1 -4F9E 1 -4F9F 1 -4FA0 1 -4FA1 1 -4FA2 1 -4FA3 1 -4FA4 1 -4FA5 1 -4FA6 1 -4FA7 1 -4FA8 1 -4FA9 1 -4FAA 1 -4FAB 1 -4FAC 1 -4FAD 1 -4FAE 1 -4FAF 1 -4FB0 1 -4FB1 1 -4FB2 1 -4FB3 1 -4FB4 1 -4FB5 1 -4FB6 1 -4FB7 1 -4FB8 1 -4FB9 1 -4FBA 1 -4FBB 1 -4FBC 1 -4FBD 1 -4FBE 1 -4FBF 1 -4FC0 1 -4FC1 1 -4FC2 1 -4FC3 1 -4FC4 1 -4FC5 1 -4FC6 1 -4FC7 1 -4FC8 1 -4FC9 1 -4FCA 1 -4FCB 1 -4FCC 1 -4FCD 1 -4FCE 1 -4FCF 1 -4FD0 1 -4FD1 1 -4FD2 1 -4FD3 1 -4FD4 1 -4FD5 1 -4FD6 1 -4FD7 1 -4FD8 1 -4FD9 1 -4FDA 1 -4FDB 1 -4FDC 1 -4FDD 1 -4FDE 1 -4FDF 1 -4FE0 1 -4FE1 1 -4FE2 1 -4FE3 1 -4FE4 1 -4FE5 1 -4FE6 1 -4FE7 1 -4FE8 1 -4FE9 1 -4FEA 1 -4FEB 1 -4FEC 1 -4FED 1 -4FEE 1 -4FEF 1 -4FF0 1 -4FF1 1 -4FF2 1 -4FF3 1 -4FF4 1 -4FF5 1 -4FF6 1 -4FF7 1 -4FF8 1 -4FF9 1 -4FFA 1 -4FFB 1 -4FFC 1 -4FFD 1 -4FFE 1 -4FFF 1 -237 1 -238 1 -239 1 -23A 1 -23B 1 -23C 1 -23D 1 -23E 1 -23F 1 -240 1 -241 1 -242 1 -243 1 -244 1 -245 1 -246 1 -247 1 -248 1 -249 1 -24A 1 -24B 1 -24C 1 -24D 1 -24E 1 -24F 1 -358 1 -359 1 -35A 1 -35B 1 -35C 1 -370 1 -371 1 -372 1 -373 1 -376 1 -377 1 -378 1 -379 1 -37B 1 -37C 1 -37D 1 -37F 1 -380 1 -381 1 -382 1 -383 1 -38B 1 -38D 1 -3A2 1 -3CF 1 -3FC 1 -3FD 1 -3FE 1 -3FF 1 -487 1 -4CF 1 -4F6 1 -4F7 1 -4FA 1 -4FB 1 -4FC 1 -4FD 1 -4FE 1 -4FF 1 -510 1 -511 1 -512 1 -513 1 -514 1 -515 1 -516 1 -517 1 -518 1 -519 1 -51A 1 -51B 1 -51C 1 -51D 1 -51E 1 -51F 1 -520 1 -521 1 -522 1 -523 1 -524 1 -525 1 -526 1 -527 1 -528 1 -529 1 -52A 1 -52B 1 -52C 1 -52D 1 -52E 1 -52F 1 -530 1 -557 1 -558 1 -560 1 -588 1 -58B 1 -58C 1 -58D 1 -58E 1 -58F 1 -590 1 -5A2 1 -5BA 1 -5C5 1 -5C6 1 -5C7 1 -5C8 1 -5C9 1 -5CA 1 -5CB 1 -5CC 1 -5CD 1 -5CE 1 -5CF 1 -5EB 1 -5EC 1 -5ED 1 -5EE 1 -5EF 1 -5F5 1 -5F6 1 -5F7 1 -5F8 1 -5F9 1 -5FA 1 -5FB 1 -5FC 1 -5FD 1 -5FE 1 -5FF 1 -604 1 -605 1 -606 1 -607 1 -608 1 -609 1 -60A 1 -60B 1 -616 1 -617 1 -618 1 -619 1 -61A 1 -61C 1 -61D 1 -61E 1 -620 1 -63B 1 -63C 1 -63D 1 -63E 1 -63F 1 -659 1 -65A 1 -65B 1 -65C 1 -65D 1 -65E 1 -65F 1 -70E 1 -74B 1 -74C 1 -750 1 -751 1 -752 1 -753 1 -754 1 -755 1 -756 1 -757 1 -758 1 -759 1 -75A 1 -75B 1 -75C 1 -75D 1 -75E 1 -75F 1 -760 1 -761 1 -762 1 -763 1 -764 1 -765 1 -766 1 -767 1 -768 1 -769 1 -76A 1 -76B 1 -76C 1 -76D 1 -76E 1 -76F 1 -770 1 -771 1 -772 1 -773 1 -774 1 -775 1 -776 1 -777 1 -778 1 -779 1 -77A 1 -77B 1 -77C 1 -77D 1 -77E 1 -77F 1 -7B2 1 -7B3 1 -7B4 1 -7B5 1 -7B6 1 -7B7 1 -7B8 1 -7B9 1 -7BA 1 -7BB 1 -7BC 1 -7BD 1 -7BE 1 -7BF 1 -7C0 1 -7C1 1 -7C2 1 -7C3 1 -7C4 1 -7C5 1 -7C6 1 -7C7 1 -7C8 1 -7C9 1 -7CA 1 -7CB 1 -7CC 1 -7CD 1 -7CE 1 -7CF 1 -7D0 1 -7D1 1 -7D2 1 -7D3 1 -7D4 1 -7D5 1 -7D6 1 -7D7 1 -7D8 1 -7D9 1 -7DA 1 -7DB 1 -7DC 1 -7DD 1 -7DE 1 -7DF 1 -7E0 1 -7E1 1 -7E2 1 -7E3 1 -7E4 1 -7E5 1 -7E6 1 -7E7 1 -7E8 1 -7E9 1 -7EA 1 -7EB 1 -7EC 1 -7ED 1 -7EE 1 -7EF 1 -7F0 1 -7F1 1 -7F2 1 -7F3 1 -7F4 1 -7F5 1 -7F6 1 -7F7 1 -7F8 1 -7F9 1 -7FA 1 -7FB 1 -7FC 1 -7FD 1 -7FE 1 -7FF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -SET NAMES utf8; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=NDB CHARACTER SET utf8; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_general_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_swedish_ci; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -85 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -300 1 -301 1 -302 1 -303 1 -304 1 -305 1 -306 1 -307 1 -308 1 -309 1 -30A 1 -30B 1 -30C 1 -30D 1 -30E 1 -30F 1 -310 1 -311 1 -312 1 -313 1 -314 1 -315 1 -316 1 -317 1 -318 1 -319 1 -31A 1 -31B 1 -31C 1 -31D 1 -31E 1 -31F 1 -320 1 -321 1 -322 1 -323 1 -324 1 -325 1 -326 1 -327 1 -328 1 -329 1 -32A 1 -32B 1 -32C 1 -32D 1 -32E 1 -32F 1 -330 1 -331 1 -332 1 -333 1 -334 1 -335 1 -336 1 -337 1 -338 1 -339 1 -33A 1 -33B 1 -33C 1 -33D 1 -33E 1 -33F 1 -340 1 -341 1 -342 1 -343 1 -344 1 -345 1 -346 1 -347 1 -348 1 -349 1 -34A 1 -34B 1 -34C 1 -34D 1 -34E 1 -34F 1 -350 1 -351 1 -352 1 -353 1 -354 1 -355 1 -356 1 -357 1 -35D 1 -35E 1 -35F 1 -360 1 -361 1 -362 1 -483 1 -484 1 -485 1 -486 1 -488 1 -489 1 -591 1 -592 1 -593 1 -594 1 -595 1 -596 1 -597 1 -598 1 -599 1 -59A 1 -59B 1 -59C 1 -59D 1 -59E 1 -59F 1 -5A0 1 -5A1 1 -5A3 1 -5A4 1 -5A5 1 -5A6 1 -5A7 1 -5A8 1 -5A9 1 -5AA 1 -5AB 1 -5AC 1 -5AD 1 -5AE 1 -5AF 1 -5B0 1 -5B1 1 -5B2 1 -5B3 1 -5B4 1 -5B5 1 -5B6 1 -5B7 1 -5B8 1 -5B9 1 -5BB 1 -5BC 1 -5BD 1 -5BF 1 -5C1 1 -5C2 1 -5C4 1 -600 1 -601 1 -602 1 -603 1 -610 1 -611 1 -612 1 -613 1 -614 1 -615 1 -64B 1 -64C 1 -64D 1 -64E 1 -64F 1 -650 1 -651 1 -652 1 -653 1 -654 1 -655 1 -656 1 -657 1 -658 1 -670 1 -6D6 1 -6D7 1 -6D8 1 -6D9 1 -6DA 1 -6DB 1 -6DC 1 -6DD 1 -6DE 1 -6DF 1 -6E0 1 -6E1 1 -6E2 1 -6E3 1 -6E4 1 -6E7 1 -6E8 1 -6EA 1 -6EB 1 -6EC 1 -6ED 1 -70F 1 -711 1 -730 1 -731 1 -732 1 -733 1 -734 1 -735 1 -736 1 -737 1 -738 1 -739 1 -73A 1 -73B 1 -73C 1 -73D 1 -73E 1 -73F 1 -740 1 -741 1 -742 1 -743 1 -744 1 -745 1 -746 1 -747 1 -748 1 -749 1 -74A 1 -640 1 -60 1 -B4 1 -384 1 -2DC 1 -5E 1 -AF 1 -2D8 1 -2D9 1 -A8 1 -385 1 -2DA 1 -2DD 1 -B8 1 -2DB 1 -5F 1 -AD 1 -2D 1 -58A 1 -2C 1 -55D 1 -60C 1 -60D 1 -66B 1 -66C 1 -3B 1 -37E 1 -61B 1 -3A 1 -589 1 -703 1 -704 1 -705 1 -706 1 -707 1 -708 1 -21 1 -A1 1 -55C 1 -3F 1 -BF 1 -55E 1 -61F 1 -709 1 -2E 1 -6D4 1 -701 1 -702 1 -B7 1 -387 1 -700 1 -27 1 -22 1 -AB 1 -BB 1 -28 1 -29 1 -5B 1 -7B 1 -7D 1 -A7 1 -B6 1 -A9 1 -AE 1 -40 1 -2A 1 -66D 1 -2F 1 -26 1 -23 1 -25 1 -66A 1 -55A 1 -55B 1 -55F 1 -5BE 1 -5C0 1 -5C3 1 -5F3 1 -5F4 1 -70A 1 -70B 1 -70C 1 -70D 1 -2B9 1 -374 1 -375 1 -2BA 1 -2C2 1 -2C3 1 -2C4 1 -2C5 1 -2C6 1 -2C7 1 -2C8 1 -2C9 1 -2CA 1 -2CB 1 -2CC 1 -2CD 1 -2CE 1 -2CF 1 -2D2 1 -2D3 1 -2D4 1 -2D5 1 -2D6 1 -2D7 1 -2DE 1 -2DF 1 -2E5 1 -2E6 1 -2E7 1 -2E8 1 -2E9 1 -2EA 1 -2EB 1 -2EC 1 -2ED 1 -2EF 1 -2F0 1 -2F1 1 -2F2 1 -2F3 1 -2F4 1 -2F5 1 -2F6 1 -2F7 1 -2F8 1 -2F9 1 -2FA 1 -2FB 1 -2FC 1 -2FD 1 -2FE 1 -2FF 1 -B0 1 -482 1 -60E 1 -60F 1 -6E9 1 -3F6 1 -2B 1 -B1 1 -F7 1 -D7 1 -3C 1 -3D 1 -3E 1 -AC 1 -7C 1 -A6 1 -7E 1 -2D0 1 -2D1 1 -A4 1 -A2 1 -24 1 -A3 1 -A5 1 -30 1 -660 1 -6F0 1 -31 1 -B9 1 -661 1 -6F1 1 -BD 1 -BC 1 -32 1 -B2 1 -662 1 -6F2 1 -33 1 -B3 1 -663 1 -6F3 1 -BE 1 -34 1 -664 1 -6F4 1 -35 1 -665 1 -6F5 1 -36 1 -666 1 -6F6 1 -37 1 -667 1 -6F7 1 -38 1 -668 1 -6F8 1 -39 1 -669 1 -6F9 1 -41 1 -61 1 -AA 1 -C0 1 -C1 1 -C2 1 -C3 1 -E0 1 -E1 1 -E2 1 -E3 1 -100 1 -101 1 -102 1 -103 1 -104 1 -105 1 -1CD 1 -1CE 1 -1DE 1 -1DF 1 -1E0 1 -1E1 1 -1FA 1 -1FB 1 -200 1 -201 1 -202 1 -203 1 -226 1 -227 1 -363 1 -1E2 1 -1E3 1 -1FC 1 -1FD 1 -250 1 -251 1 -252 1 -42 1 -62 1 -299 1 -180 1 -181 1 -253 1 -182 1 -183 1 -43 1 -63 1 -C7 1 -E7 1 -106 1 -107 1 -108 1 -109 1 -10A 1 -10B 1 -10C 1 -10D 1 -368 1 -187 1 -188 1 -255 1 -44 1 -64 1 -10E 1 -10F 1 -369 1 -1C4 1 -1C5 1 -1C6 1 -1F1 1 -1F2 1 -1F3 1 -2A3 1 -2A5 1 -2A4 1 -110 1 -111 1 -189 1 -256 1 -18A 1 -257 1 -18B 1 -18C 1 -221 1 -D0 1 -F0 1 -45 1 -65 1 -C8 1 -C9 1 -CA 1 -CB 1 -E8 1 -E9 1 -EA 1 -EB 1 -112 1 -113 1 -114 1 -115 1 -116 1 -117 1 -118 1 -119 1 -11A 1 -11B 1 -204 1 -205 1 -206 1 -207 1 -228 1 -229 1 -364 1 -18E 1 -1DD 1 -18F 1 -259 1 -190 1 -25B 1 -258 1 -25A 1 -25C 1 -25D 1 -25E 1 -29A 1 -264 1 -46 1 -66 1 -2A9 1 -191 1 -192 1 -47 1 -67 1 -11C 1 -11D 1 -11E 1 -11F 1 -120 1 -121 1 -122 1 -123 1 -1E6 1 -1E7 1 -1F4 1 -1F5 1 -261 1 -262 1 -1E4 1 -1E5 1 -193 1 -260 1 -29B 1 -194 1 -263 1 -2E0 1 -1A2 1 -1A3 1 -48 1 -68 1 -124 1 -125 1 -21E 1 -21F 1 -2B0 1 -36A 1 -29C 1 -195 1 -1F6 1 -126 1 -127 1 -266 1 -2B1 1 -267 1 -2BB 1 -2BD 1 -49 1 -69 1 -CC 1 -CD 1 -CE 1 -CF 1 -EC 1 -ED 1 -EE 1 -EF 1 -128 1 -129 1 -12A 1 -12B 1 -12C 1 -12D 1 -12E 1 -12F 1 -130 1 -1CF 1 -1D0 1 -208 1 -209 1 -20A 1 -20B 1 -365 1 -132 1 -133 1 -131 1 -26A 1 -197 1 -268 1 -196 1 -269 1 -4A 1 -6A 1 -134 1 -135 1 -1F0 1 -2B2 1 -29D 1 -25F 1 -284 1 -4B 1 -6B 1 -136 1 -137 1 -1E8 1 -1E9 1 -198 1 -199 1 -29E 1 -4C 1 -6C 1 -139 1 -13A 1 -13B 1 -13C 1 -13D 1 -13E 1 -2E1 1 -13F 1 -140 1 -1C7 1 -1C8 1 -1C9 1 -2AA 1 -2AB 1 -29F 1 -141 1 -142 1 -19A 1 -26B 1 -26C 1 -26D 1 -234 1 -26E 1 -19B 1 -28E 1 -4D 1 -6D 1 -36B 1 -271 1 -4E 1 -6E 1 -D1 1 -F1 1 -143 1 -144 1 -145 1 -146 1 -147 1 -148 1 -1F8 1 -1F9 1 -1CA 1 -1CB 1 -1CC 1 -274 1 -19D 1 -272 1 -19E 1 -220 1 -273 1 -235 1 -14A 1 -14B 1 -4F 1 -6F 1 -BA 1 -D2 1 -D3 1 -D4 1 -D5 1 -F2 1 -F3 1 -F4 1 -F5 1 -14C 1 -14D 1 -14E 1 -14F 1 -150 1 -151 1 -1A0 1 -1A1 1 -1D1 1 -1D2 1 -1EA 1 -1EB 1 -1EC 1 -1ED 1 -20C 1 -20D 1 -20E 1 -20F 1 -22A 1 -22B 1 -22C 1 -22D 1 -22E 1 -22F 1 -230 1 -231 1 -366 1 -152 1 -153 1 -276 1 -1FE 1 -1FF 1 -186 1 -254 1 -19F 1 -275 1 -277 1 -222 1 -223 1 -50 1 -70 1 -1A4 1 -1A5 1 -278 1 -51 1 -71 1 -2A0 1 -138 1 -52 1 -72 1 -154 1 -155 1 -156 1 -157 1 -158 1 -159 1 -210 1 -211 1 -212 1 -213 1 -2B3 1 -36C 1 -1A6 1 -280 1 -279 1 -2B4 1 -27A 1 -27B 1 -2B5 1 -27C 1 -27D 1 -27E 1 -27F 1 -281 1 -2B6 1 -53 1 -73 1 -15A 1 -15B 1 -15C 1 -15D 1 -15E 1 -15F 1 -160 1 -161 1 -17F 1 -218 1 -219 1 -2E2 1 -DF 1 -282 1 -1A9 1 -283 1 -1AA 1 -285 1 -286 1 -54 1 -74 1 -162 1 -163 1 -164 1 -165 1 -21A 1 -21B 1 -36D 1 -2A8 1 -1BE 1 -2A6 1 -2A7 1 -166 1 -167 1 -1AB 1 -1AC 1 -1AD 1 -1AE 1 -288 1 -236 1 -287 1 -55 1 -75 1 -D9 1 -DA 1 -DB 1 -F9 1 -FA 1 -FB 1 -168 1 -169 1 -16A 1 -16B 1 -16C 1 -16D 1 -16E 1 -16F 1 -170 1 -171 1 -172 1 -173 1 -1AF 1 -1B0 1 -1D3 1 -1D4 1 -1D5 1 -1D6 1 -1D7 1 -1D8 1 -1D9 1 -1DA 1 -1DB 1 -1DC 1 -214 1 -215 1 -216 1 -217 1 -367 1 -289 1 -265 1 -2AE 1 -2AF 1 -19C 1 -26F 1 -270 1 -1B1 1 -28A 1 -56 1 -76 1 -36E 1 -1B2 1 -28B 1 -28C 1 -57 1 -77 1 -174 1 -175 1 -2B7 1 -28D 1 -58 1 -78 1 -2E3 1 -36F 1 -59 1 -79 1 -DC 1 -DD 1 -FC 1 -FD 1 -FF 1 -176 1 -177 1 -178 1 -232 1 -233 1 -2B8 1 -28F 1 -1B3 1 -1B4 1 -5A 1 -7A 1 -179 1 -17A 1 -17B 1 -17C 1 -17D 1 -17E 1 -18D 1 -C5 1 -E5 1 -C4 1 -C6 1 -E4 1 -E6 1 -D6 1 -D8 1 -F6 1 -F8 1 -1B5 1 -1B6 1 -224 1 -225 1 -290 1 -291 1 -1B7 1 -1EE 1 -1EF 1 -292 1 -1B8 1 -1B9 1 -1BA 1 -293 1 -21C 1 -21D 1 -DE 1 -FE 1 -1BF 1 -1F7 1 -1BB 1 -1A7 1 -1A8 1 -1BC 1 -1BD 1 -184 1 -185 1 -294 1 -2C0 1 -2BC 1 -149 1 -2EE 1 -2BE 1 -295 1 -2E4 1 -2BF 1 -2C1 1 -2A1 1 -2A2 1 -296 1 -1C0 1 -1C1 1 -1C2 1 -1C3 1 -297 1 -298 1 -2AC 1 -2AD 1 -386 1 -391 1 -3AC 1 -3B1 1 -392 1 -3B2 1 -3D0 1 -393 1 -3B3 1 -394 1 -3B4 1 -388 1 -395 1 -3AD 1 -3B5 1 -3F5 1 -3DC 1 -3DD 1 -3DA 1 -3DB 1 -396 1 -3B6 1 -389 1 -397 1 -3AE 1 -3B7 1 -398 1 -3B8 1 -3D1 1 -3F4 1 -37A 1 -38A 1 -390 1 -399 1 -3AA 1 -3AF 1 -3B9 1 -3CA 1 -3F3 1 -39A 1 -3BA 1 -3F0 1 -3D7 1 -39B 1 -3BB 1 -B5 1 -39C 1 -3BC 1 -39D 1 -3BD 1 -39E 1 -3BE 1 -38C 1 -39F 1 -3BF 1 -3CC 1 -3A0 1 -3C0 1 -3D6 1 -3DE 1 -3DF 1 -3D8 1 -3D9 1 -3A1 1 -3C1 1 -3F1 1 -3A3 1 -3C2 1 -3C3 1 -3F2 1 -3F9 1 -3A4 1 -3C4 1 -38E 1 -3A5 1 -3AB 1 -3B0 1 -3C5 1 -3CB 1 -3CD 1 -3D2 1 -3D3 1 -3D4 1 -3A6 1 -3C6 1 -3D5 1 -3A7 1 -3C7 1 -3A8 1 -3C8 1 -38F 1 -3A9 1 -3C9 1 -3CE 1 -3E0 1 -3E1 1 -3F7 1 -3F8 1 -3FA 1 -3FB 1 -3E2 1 -3E3 1 -3E4 1 -3E5 1 -3E6 1 -3E7 1 -3E8 1 -3E9 1 -3EA 1 -3EB 1 -3EC 1 -3ED 1 -3EE 1 -3EF 1 -410 1 -430 1 -4D0 1 -4D1 1 -4D2 1 -4D3 1 -4D8 1 -4D9 1 -4DA 1 -4DB 1 -4D4 1 -4D5 1 -411 1 -431 1 -412 1 -432 1 -413 1 -433 1 -490 1 -491 1 -492 1 -493 1 -494 1 -495 1 -414 1 -434 1 -500 1 -501 1 -402 1 -452 1 -502 1 -503 1 -403 1 -453 1 -498 1 -499 1 -400 1 -401 1 -415 1 -435 1 -450 1 -451 1 -4D6 1 -4D7 1 -404 1 -454 1 -416 1 -436 1 -4C1 1 -4C2 1 -4DC 1 -4DD 1 -496 1 -497 1 -417 1 -437 1 -504 1 -505 1 -4DE 1 -4DF 1 -405 1 -455 1 -4E0 1 -4E1 1 -506 1 -507 1 -40D 1 -418 1 -438 1 -45D 1 -4E2 1 -4E3 1 -48A 1 -48B 1 -4E4 1 -4E5 1 -406 1 -456 1 -407 1 -457 1 -419 1 -439 1 -408 1 -458 1 -41A 1 -43A 1 -49A 1 -49B 1 -4C3 1 -4C4 1 -4A0 1 -4A1 1 -49E 1 -49F 1 -49C 1 -49D 1 -41B 1 -43B 1 -4C5 1 -4C6 1 -409 1 -459 1 -508 1 -509 1 -41C 1 -43C 1 -4CD 1 -4CE 1 -41D 1 -43D 1 -4C9 1 -4CA 1 -4A2 1 -4A3 1 -4C7 1 -4C8 1 -4A4 1 -4A5 1 -40A 1 -45A 1 -50A 1 -50B 1 -41E 1 -43E 1 -4E6 1 -4E7 1 -4E8 1 -4E9 1 -4EA 1 -4EB 1 -41F 1 -43F 1 -4A6 1 -4A7 1 -480 1 -481 1 -420 1 -440 1 -48E 1 -48F 1 -421 1 -441 1 -50C 1 -50D 1 -4AA 1 -4AB 1 -422 1 -442 1 -50E 1 -50F 1 -4AC 1 -4AD 1 -40B 1 -45B 1 -40C 1 -45C 1 -423 1 -443 1 -4EE 1 -4EF 1 -40E 1 -45E 1 -4F0 1 -4F1 1 -4F2 1 -4F3 1 -4AE 1 -4AF 1 -4B0 1 -4B1 1 -478 1 -479 1 -424 1 -444 1 -425 1 -445 1 -4B2 1 -4B3 1 -4BA 1 -4BB 1 -460 1 -461 1 -47E 1 -47F 1 -47C 1 -47D 1 -47A 1 -47B 1 -426 1 -446 1 -4B4 1 -4B5 1 -427 1 -447 1 -4F4 1 -4F5 1 -4B6 1 -4B7 1 -4CB 1 -4CC 1 -4B8 1 -4B9 1 -4BC 1 -4BD 1 -4BE 1 -4BF 1 -40F 1 -45F 1 -428 1 -448 1 -429 1 -449 1 -42A 1 -44A 1 -42B 1 -44B 1 -4F8 1 -4F9 1 -42C 1 -44C 1 -48C 1 -48D 1 -462 1 -463 1 -42D 1 -44D 1 -4EC 1 -4ED 1 -42E 1 -44E 1 -42F 1 -44F 1 -464 1 -465 1 -466 1 -467 1 -46A 1 -46B 1 -468 1 -469 1 -46C 1 -46D 1 -46E 1 -46F 1 -470 1 -471 1 -472 1 -473 1 -474 1 -475 1 -476 1 -477 1 -4A8 1 -4A9 1 -4C0 1 -531 1 -561 1 -532 1 -562 1 -533 1 -563 1 -534 1 -564 1 -535 1 -565 1 -587 1 -536 1 -566 1 -537 1 -567 1 -538 1 -568 1 -539 1 -569 1 -53A 1 -56A 1 -53B 1 -56B 1 -53C 1 -56C 1 -53D 1 -56D 1 -53E 1 -56E 1 -53F 1 -56F 1 -540 1 -570 1 -541 1 -571 1 -542 1 -572 1 -543 1 -573 1 -544 1 -574 1 -545 1 -575 1 -546 1 -576 1 -547 1 -577 1 -548 1 -578 1 -549 1 -579 1 -54A 1 -57A 1 -54B 1 -57B 1 -54C 1 -57C 1 -54D 1 -57D 1 -54E 1 -57E 1 -54F 1 -57F 1 -550 1 -580 1 -551 1 -581 1 -552 1 -582 1 -553 1 -583 1 -554 1 -584 1 -555 1 -585 1 -556 1 -586 1 -559 1 -5D0 1 -5D1 1 -5D2 1 -5D3 1 -5D4 1 -5D5 1 -5F0 1 -5F1 1 -5D6 1 -5D7 1 -5D8 1 -5D9 1 -5F2 1 -5DA 1 -5DB 1 -5DC 1 -5DD 1 -5DE 1 -5DF 1 -5E0 1 -5E1 1 -5E2 1 -5E3 1 -5E4 1 -5E5 1 -5E6 1 -5E7 1 -5E8 1 -5E9 1 -5EA 1 -621 1 -674 1 -6FD 1 -622 1 -623 1 -672 1 -671 1 -624 1 -625 1 -673 1 -626 1 -627 1 -675 1 -66E 1 -628 1 -67B 1 -67E 1 -680 1 -629 1 -62A 1 -62B 1 -679 1 -67A 1 -67C 1 -67D 1 -67F 1 -62C 1 -683 1 -684 1 -686 1 -6BF 1 -687 1 -62D 1 -62E 1 -681 1 -682 1 -685 1 -62F 1 -630 1 -688 1 -689 1 -68A 1 -68B 1 -68C 1 -68D 1 -68E 1 -68F 1 -690 1 -6EE 1 -631 1 -632 1 -691 1 -692 1 -693 1 -694 1 -695 1 -696 1 -697 1 -698 1 -699 1 -6EF 1 -633 1 -634 1 -69A 1 -69B 1 -69C 1 -6FA 1 -635 1 -636 1 -69D 1 -69E 1 -6FB 1 -637 1 -638 1 -69F 1 -639 1 -63A 1 -6A0 1 -6FC 1 -641 1 -6A1 1 -6A2 1 -6A3 1 -6A4 1 -6A5 1 -6A6 1 -66F 1 -642 1 -6A7 1 -6A8 1 -643 1 -6A9 1 -6AA 1 -6AB 1 -6AC 1 -6AD 1 -6AE 1 -6AF 1 -6B0 1 -6B1 1 -6B2 1 -6B3 1 -6B4 1 -644 1 -6B5 1 -6B6 1 -6B7 1 -6B8 1 -645 1 -6FE 1 -646 1 -6BA 1 -6BB 1 -6BC 1 -6BD 1 -6B9 1 -647 1 -6BE 1 -6C1 1 -6C2 1 -6C3 1 -6FF 1 -6C0 1 -6D5 1 -648 1 -6E5 1 -676 1 -6C4 1 -6C5 1 -6C6 1 -6C7 1 -677 1 -6C8 1 -6C9 1 -6CA 1 -6CB 1 -6CF 1 -649 1 -64A 1 -6E6 1 -678 1 -6CC 1 -6CD 1 -6CE 1 -6D0 1 -6D1 1 -6D2 1 -6D3 1 -710 1 -712 1 -72D 1 -713 1 -714 1 -72E 1 -716 1 -715 1 -72F 1 -717 1 -718 1 -719 1 -74D 1 -71A 1 -71B 1 -71C 1 -71D 1 -71E 1 -71F 1 -74E 1 -720 1 -721 1 -722 1 -723 1 -724 1 -725 1 -726 1 -727 1 -74F 1 -728 1 -729 1 -72A 1 -72B 1 -72C 1 -780 1 -799 1 -79A 1 -781 1 -782 1 -783 1 -79C 1 -784 1 -785 1 -786 1 -787 1 -7A2 1 -7A3 1 -788 1 -7A5 1 -789 1 -78A 1 -78B 1 -79B 1 -78C 1 -798 1 -7A0 1 -7A1 1 -78D 1 -78E 1 -7A4 1 -78F 1 -790 1 -79D 1 -79E 1 -79F 1 -791 1 -792 1 -793 1 -794 1 -795 1 -796 1 -797 1 -7B1 1 -7A6 1 -7A7 1 -7A8 1 -7A9 1 -7AA 1 -7AB 1 -7AC 1 -7AD 1 -7AE 1 -7AF 1 -7B0 1 -4E00 1 -4E01 1 -4E02 1 -4E03 1 -4E04 1 -4E05 1 -4E06 1 -4E07 1 -4E08 1 -4E09 1 -4E0A 1 -4E0B 1 -4E0C 1 -4E0D 1 -4E0E 1 -4E0F 1 -4E10 1 -4E11 1 -4E12 1 -4E13 1 -4E14 1 -4E15 1 -4E16 1 -4E17 1 -4E18 1 -4E19 1 -4E1A 1 -4E1B 1 -4E1C 1 -4E1D 1 -4E1E 1 -4E1F 1 -4E20 1 -4E21 1 -4E22 1 -4E23 1 -4E24 1 -4E25 1 -4E26 1 -4E27 1 -4E28 1 -4E29 1 -4E2A 1 -4E2B 1 -4E2C 1 -4E2D 1 -4E2E 1 -4E2F 1 -4E30 1 -4E31 1 -4E32 1 -4E33 1 -4E34 1 -4E35 1 -4E36 1 -4E37 1 -4E38 1 -4E39 1 -4E3A 1 -4E3B 1 -4E3C 1 -4E3D 1 -4E3E 1 -4E3F 1 -4E40 1 -4E41 1 -4E42 1 -4E43 1 -4E44 1 -4E45 1 -4E46 1 -4E47 1 -4E48 1 -4E49 1 -4E4A 1 -4E4B 1 -4E4C 1 -4E4D 1 -4E4E 1 -4E4F 1 -4E50 1 -4E51 1 -4E52 1 -4E53 1 -4E54 1 -4E55 1 -4E56 1 -4E57 1 -4E58 1 -4E59 1 -4E5A 1 -4E5B 1 -4E5C 1 -4E5D 1 -4E5E 1 -4E5F 1 -4E60 1 -4E61 1 -4E62 1 -4E63 1 -4E64 1 -4E65 1 -4E66 1 -4E67 1 -4E68 1 -4E69 1 -4E6A 1 -4E6B 1 -4E6C 1 -4E6D 1 -4E6E 1 -4E6F 1 -4E70 1 -4E71 1 -4E72 1 -4E73 1 -4E74 1 -4E75 1 -4E76 1 -4E77 1 -4E78 1 -4E79 1 -4E7A 1 -4E7B 1 -4E7C 1 -4E7D 1 -4E7E 1 -4E7F 1 -4E80 1 -4E81 1 -4E82 1 -4E83 1 -4E84 1 -4E85 1 -4E86 1 -4E87 1 -4E88 1 -4E89 1 -4E8A 1 -4E8B 1 -4E8C 1 -4E8D 1 -4E8E 1 -4E8F 1 -4E90 1 -4E91 1 -4E92 1 -4E93 1 -4E94 1 -4E95 1 -4E96 1 -4E97 1 -4E98 1 -4E99 1 -4E9A 1 -4E9B 1 -4E9C 1 -4E9D 1 -4E9E 1 -4E9F 1 -4EA0 1 -4EA1 1 -4EA2 1 -4EA3 1 -4EA4 1 -4EA5 1 -4EA6 1 -4EA7 1 -4EA8 1 -4EA9 1 -4EAA 1 -4EAB 1 -4EAC 1 -4EAD 1 -4EAE 1 -4EAF 1 -4EB0 1 -4EB1 1 -4EB2 1 -4EB3 1 -4EB4 1 -4EB5 1 -4EB6 1 -4EB7 1 -4EB8 1 -4EB9 1 -4EBA 1 -4EBB 1 -4EBC 1 -4EBD 1 -4EBE 1 -4EBF 1 -4EC0 1 -4EC1 1 -4EC2 1 -4EC3 1 -4EC4 1 -4EC5 1 -4EC6 1 -4EC7 1 -4EC8 1 -4EC9 1 -4ECA 1 -4ECB 1 -4ECC 1 -4ECD 1 -4ECE 1 -4ECF 1 -4ED0 1 -4ED1 1 -4ED2 1 -4ED3 1 -4ED4 1 -4ED5 1 -4ED6 1 -4ED7 1 -4ED8 1 -4ED9 1 -4EDA 1 -4EDB 1 -4EDC 1 -4EDD 1 -4EDE 1 -4EDF 1 -4EE0 1 -4EE1 1 -4EE2 1 -4EE3 1 -4EE4 1 -4EE5 1 -4EE6 1 -4EE7 1 -4EE8 1 -4EE9 1 -4EEA 1 -4EEB 1 -4EEC 1 -4EED 1 -4EEE 1 -4EEF 1 -4EF0 1 -4EF1 1 -4EF2 1 -4EF3 1 -4EF4 1 -4EF5 1 -4EF6 1 -4EF7 1 -4EF8 1 -4EF9 1 -4EFA 1 -4EFB 1 -4EFC 1 -4EFD 1 -4EFE 1 -4EFF 1 -4F00 1 -4F01 1 -4F02 1 -4F03 1 -4F04 1 -4F05 1 -4F06 1 -4F07 1 -4F08 1 -4F09 1 -4F0A 1 -4F0B 1 -4F0C 1 -4F0D 1 -4F0E 1 -4F0F 1 -4F10 1 -4F11 1 -4F12 1 -4F13 1 -4F14 1 -4F15 1 -4F16 1 -4F17 1 -4F18 1 -4F19 1 -4F1A 1 -4F1B 1 -4F1C 1 -4F1D 1 -4F1E 1 -4F1F 1 -4F20 1 -4F21 1 -4F22 1 -4F23 1 -4F24 1 -4F25 1 -4F26 1 -4F27 1 -4F28 1 -4F29 1 -4F2A 1 -4F2B 1 -4F2C 1 -4F2D 1 -4F2E 1 -4F2F 1 -4F30 1 -4F31 1 -4F32 1 -4F33 1 -4F34 1 -4F35 1 -4F36 1 -4F37 1 -4F38 1 -4F39 1 -4F3A 1 -4F3B 1 -4F3C 1 -4F3D 1 -4F3E 1 -4F3F 1 -4F40 1 -4F41 1 -4F42 1 -4F43 1 -4F44 1 -4F45 1 -4F46 1 -4F47 1 -4F48 1 -4F49 1 -4F4A 1 -4F4B 1 -4F4C 1 -4F4D 1 -4F4E 1 -4F4F 1 -4F50 1 -4F51 1 -4F52 1 -4F53 1 -4F54 1 -4F55 1 -4F56 1 -4F57 1 -4F58 1 -4F59 1 -4F5A 1 -4F5B 1 -4F5C 1 -4F5D 1 -4F5E 1 -4F5F 1 -4F60 1 -4F61 1 -4F62 1 -4F63 1 -4F64 1 -4F65 1 -4F66 1 -4F67 1 -4F68 1 -4F69 1 -4F6A 1 -4F6B 1 -4F6C 1 -4F6D 1 -4F6E 1 -4F6F 1 -4F70 1 -4F71 1 -4F72 1 -4F73 1 -4F74 1 -4F75 1 -4F76 1 -4F77 1 -4F78 1 -4F79 1 -4F7A 1 -4F7B 1 -4F7C 1 -4F7D 1 -4F7E 1 -4F7F 1 -4F80 1 -4F81 1 -4F82 1 -4F83 1 -4F84 1 -4F85 1 -4F86 1 -4F87 1 -4F88 1 -4F89 1 -4F8A 1 -4F8B 1 -4F8C 1 -4F8D 1 -4F8E 1 -4F8F 1 -4F90 1 -4F91 1 -4F92 1 -4F93 1 -4F94 1 -4F95 1 -4F96 1 -4F97 1 -4F98 1 -4F99 1 -4F9A 1 -4F9B 1 -4F9C 1 -4F9D 1 -4F9E 1 -4F9F 1 -4FA0 1 -4FA1 1 -4FA2 1 -4FA3 1 -4FA4 1 -4FA5 1 -4FA6 1 -4FA7 1 -4FA8 1 -4FA9 1 -4FAA 1 -4FAB 1 -4FAC 1 -4FAD 1 -4FAE 1 -4FAF 1 -4FB0 1 -4FB1 1 -4FB2 1 -4FB3 1 -4FB4 1 -4FB5 1 -4FB6 1 -4FB7 1 -4FB8 1 -4FB9 1 -4FBA 1 -4FBB 1 -4FBC 1 -4FBD 1 -4FBE 1 -4FBF 1 -4FC0 1 -4FC1 1 -4FC2 1 -4FC3 1 -4FC4 1 -4FC5 1 -4FC6 1 -4FC7 1 -4FC8 1 -4FC9 1 -4FCA 1 -4FCB 1 -4FCC 1 -4FCD 1 -4FCE 1 -4FCF 1 -4FD0 1 -4FD1 1 -4FD2 1 -4FD3 1 -4FD4 1 -4FD5 1 -4FD6 1 -4FD7 1 -4FD8 1 -4FD9 1 -4FDA 1 -4FDB 1 -4FDC 1 -4FDD 1 -4FDE 1 -4FDF 1 -4FE0 1 -4FE1 1 -4FE2 1 -4FE3 1 -4FE4 1 -4FE5 1 -4FE6 1 -4FE7 1 -4FE8 1 -4FE9 1 -4FEA 1 -4FEB 1 -4FEC 1 -4FED 1 -4FEE 1 -4FEF 1 -4FF0 1 -4FF1 1 -4FF2 1 -4FF3 1 -4FF4 1 -4FF5 1 -4FF6 1 -4FF7 1 -4FF8 1 -4FF9 1 -4FFA 1 -4FFB 1 -4FFC 1 -4FFD 1 -4FFE 1 -4FFF 1 -237 1 -238 1 -239 1 -23A 1 -23B 1 -23C 1 -23D 1 -23E 1 -23F 1 -240 1 -241 1 -242 1 -243 1 -244 1 -245 1 -246 1 -247 1 -248 1 -249 1 -24A 1 -24B 1 -24C 1 -24D 1 -24E 1 -24F 1 -358 1 -359 1 -35A 1 -35B 1 -35C 1 -370 1 -371 1 -372 1 -373 1 -376 1 -377 1 -378 1 -379 1 -37B 1 -37C 1 -37D 1 -37F 1 -380 1 -381 1 -382 1 -383 1 -38B 1 -38D 1 -3A2 1 -3CF 1 -3FC 1 -3FD 1 -3FE 1 -3FF 1 -487 1 -4CF 1 -4F6 1 -4F7 1 -4FA 1 -4FB 1 -4FC 1 -4FD 1 -4FE 1 -4FF 1 -510 1 -511 1 -512 1 -513 1 -514 1 -515 1 -516 1 -517 1 -518 1 -519 1 -51A 1 -51B 1 -51C 1 -51D 1 -51E 1 -51F 1 -520 1 -521 1 -522 1 -523 1 -524 1 -525 1 -526 1 -527 1 -528 1 -529 1 -52A 1 -52B 1 -52C 1 -52D 1 -52E 1 -52F 1 -530 1 -557 1 -558 1 -560 1 -588 1 -58B 1 -58C 1 -58D 1 -58E 1 -58F 1 -590 1 -5A2 1 -5BA 1 -5C5 1 -5C6 1 -5C7 1 -5C8 1 -5C9 1 -5CA 1 -5CB 1 -5CC 1 -5CD 1 -5CE 1 -5CF 1 -5EB 1 -5EC 1 -5ED 1 -5EE 1 -5EF 1 -5F5 1 -5F6 1 -5F7 1 -5F8 1 -5F9 1 -5FA 1 -5FB 1 -5FC 1 -5FD 1 -5FE 1 -5FF 1 -604 1 -605 1 -606 1 -607 1 -608 1 -609 1 -60A 1 -60B 1 -616 1 -617 1 -618 1 -619 1 -61A 1 -61C 1 -61D 1 -61E 1 -620 1 -63B 1 -63C 1 -63D 1 -63E 1 -63F 1 -659 1 -65A 1 -65B 1 -65C 1 -65D 1 -65E 1 -65F 1 -70E 1 -74B 1 -74C 1 -750 1 -751 1 -752 1 -753 1 -754 1 -755 1 -756 1 -757 1 -758 1 -759 1 -75A 1 -75B 1 -75C 1 -75D 1 -75E 1 -75F 1 -760 1 -761 1 -762 1 -763 1 -764 1 -765 1 -766 1 -767 1 -768 1 -769 1 -76A 1 -76B 1 -76C 1 -76D 1 -76E 1 -76F 1 -770 1 -771 1 -772 1 -773 1 -774 1 -775 1 -776 1 -777 1 -778 1 -779 1 -77A 1 -77B 1 -77C 1 -77D 1 -77E 1 -77F 1 -7B2 1 -7B3 1 -7B4 1 -7B5 1 -7B6 1 -7B7 1 -7B8 1 -7B9 1 -7BA 1 -7BB 1 -7BC 1 -7BD 1 -7BE 1 -7BF 1 -7C0 1 -7C1 1 -7C2 1 -7C3 1 -7C4 1 -7C5 1 -7C6 1 -7C7 1 -7C8 1 -7C9 1 -7CA 1 -7CB 1 -7CC 1 -7CD 1 -7CE 1 -7CF 1 -7D0 1 -7D1 1 -7D2 1 -7D3 1 -7D4 1 -7D5 1 -7D6 1 -7D7 1 -7D8 1 -7D9 1 -7DA 1 -7DB 1 -7DC 1 -7DD 1 -7DE 1 -7DF 1 -7E0 1 -7E1 1 -7E2 1 -7E3 1 -7E4 1 -7E5 1 -7E6 1 -7E7 1 -7E8 1 -7E9 1 -7EA 1 -7EB 1 -7EC 1 -7ED 1 -7EE 1 -7EF 1 -7F0 1 -7F1 1 -7F2 1 -7F3 1 -7F4 1 -7F5 1 -7F6 1 -7F7 1 -7F8 1 -7F9 1 -7FA 1 -7FB 1 -7FC 1 -7FD 1 -7FE 1 -7FF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -SET NAMES utf8; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=NDB CHARACTER SET utf8; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_general_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_turkish_ci; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -85 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -300 1 -301 1 -302 1 -303 1 -304 1 -305 1 -306 1 -307 1 -308 1 -309 1 -30A 1 -30B 1 -30C 1 -30D 1 -30E 1 -30F 1 -310 1 -311 1 -312 1 -313 1 -314 1 -315 1 -316 1 -317 1 -318 1 -319 1 -31A 1 -31B 1 -31C 1 -31D 1 -31E 1 -31F 1 -320 1 -321 1 -322 1 -323 1 -324 1 -325 1 -326 1 -327 1 -328 1 -329 1 -32A 1 -32B 1 -32C 1 -32D 1 -32E 1 -32F 1 -330 1 -331 1 -332 1 -333 1 -334 1 -335 1 -336 1 -337 1 -338 1 -339 1 -33A 1 -33B 1 -33C 1 -33D 1 -33E 1 -33F 1 -340 1 -341 1 -342 1 -343 1 -344 1 -345 1 -346 1 -347 1 -348 1 -349 1 -34A 1 -34B 1 -34C 1 -34D 1 -34E 1 -34F 1 -350 1 -351 1 -352 1 -353 1 -354 1 -355 1 -356 1 -357 1 -35D 1 -35E 1 -35F 1 -360 1 -361 1 -362 1 -483 1 -484 1 -485 1 -486 1 -488 1 -489 1 -591 1 -592 1 -593 1 -594 1 -595 1 -596 1 -597 1 -598 1 -599 1 -59A 1 -59B 1 -59C 1 -59D 1 -59E 1 -59F 1 -5A0 1 -5A1 1 -5A3 1 -5A4 1 -5A5 1 -5A6 1 -5A7 1 -5A8 1 -5A9 1 -5AA 1 -5AB 1 -5AC 1 -5AD 1 -5AE 1 -5AF 1 -5B0 1 -5B1 1 -5B2 1 -5B3 1 -5B4 1 -5B5 1 -5B6 1 -5B7 1 -5B8 1 -5B9 1 -5BB 1 -5BC 1 -5BD 1 -5BF 1 -5C1 1 -5C2 1 -5C4 1 -600 1 -601 1 -602 1 -603 1 -610 1 -611 1 -612 1 -613 1 -614 1 -615 1 -64B 1 -64C 1 -64D 1 -64E 1 -64F 1 -650 1 -651 1 -652 1 -653 1 -654 1 -655 1 -656 1 -657 1 -658 1 -670 1 -6D6 1 -6D7 1 -6D8 1 -6D9 1 -6DA 1 -6DB 1 -6DC 1 -6DD 1 -6DE 1 -6DF 1 -6E0 1 -6E1 1 -6E2 1 -6E3 1 -6E4 1 -6E7 1 -6E8 1 -6EA 1 -6EB 1 -6EC 1 -6ED 1 -70F 1 -711 1 -730 1 -731 1 -732 1 -733 1 -734 1 -735 1 -736 1 -737 1 -738 1 -739 1 -73A 1 -73B 1 -73C 1 -73D 1 -73E 1 -73F 1 -740 1 -741 1 -742 1 -743 1 -744 1 -745 1 -746 1 -747 1 -748 1 -749 1 -74A 1 -640 1 -60 1 -B4 1 -384 1 -2DC 1 -5E 1 -AF 1 -2D8 1 -2D9 1 -A8 1 -385 1 -2DA 1 -2DD 1 -B8 1 -2DB 1 -5F 1 -AD 1 -2D 1 -58A 1 -2C 1 -55D 1 -60C 1 -60D 1 -66B 1 -66C 1 -3B 1 -37E 1 -61B 1 -3A 1 -589 1 -703 1 -704 1 -705 1 -706 1 -707 1 -708 1 -21 1 -A1 1 -55C 1 -3F 1 -BF 1 -55E 1 -61F 1 -709 1 -2E 1 -6D4 1 -701 1 -702 1 -B7 1 -387 1 -700 1 -27 1 -22 1 -AB 1 -BB 1 -28 1 -29 1 -5B 1 -7B 1 -7D 1 -A7 1 -B6 1 -A9 1 -AE 1 -40 1 -2A 1 -66D 1 -2F 1 -26 1 -23 1 -25 1 -66A 1 -55A 1 -55B 1 -55F 1 -5BE 1 -5C0 1 -5C3 1 -5F3 1 -5F4 1 -70A 1 -70B 1 -70C 1 -70D 1 -2B9 1 -374 1 -375 1 -2BA 1 -2C2 1 -2C3 1 -2C4 1 -2C5 1 -2C6 1 -2C7 1 -2C8 1 -2C9 1 -2CA 1 -2CB 1 -2CC 1 -2CD 1 -2CE 1 -2CF 1 -2D2 1 -2D3 1 -2D4 1 -2D5 1 -2D6 1 -2D7 1 -2DE 1 -2DF 1 -2E5 1 -2E6 1 -2E7 1 -2E8 1 -2E9 1 -2EA 1 -2EB 1 -2EC 1 -2ED 1 -2EF 1 -2F0 1 -2F1 1 -2F2 1 -2F3 1 -2F4 1 -2F5 1 -2F6 1 -2F7 1 -2F8 1 -2F9 1 -2FA 1 -2FB 1 -2FC 1 -2FD 1 -2FE 1 -2FF 1 -B0 1 -482 1 -60E 1 -60F 1 -6E9 1 -3F6 1 -2B 1 -B1 1 -F7 1 -D7 1 -3C 1 -3D 1 -3E 1 -AC 1 -7C 1 -A6 1 -7E 1 -2D0 1 -2D1 1 -A4 1 -A2 1 -24 1 -A3 1 -A5 1 -30 1 -660 1 -6F0 1 -31 1 -B9 1 -661 1 -6F1 1 -BD 1 -BC 1 -32 1 -B2 1 -662 1 -6F2 1 -33 1 -B3 1 -663 1 -6F3 1 -BE 1 -34 1 -664 1 -6F4 1 -35 1 -665 1 -6F5 1 -36 1 -666 1 -6F6 1 -37 1 -667 1 -6F7 1 -38 1 -668 1 -6F8 1 -39 1 -669 1 -6F9 1 -41 1 -61 1 -AA 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -100 1 -101 1 -102 1 -103 1 -104 1 -105 1 -1CD 1 -1CE 1 -1DE 1 -1DF 1 -1E0 1 -1E1 1 -1FA 1 -1FB 1 -200 1 -201 1 -202 1 -203 1 -226 1 -227 1 -363 1 -C6 1 -E6 1 -1E2 1 -1E3 1 -1FC 1 -1FD 1 -250 1 -251 1 -252 1 -42 1 -62 1 -299 1 -180 1 -181 1 -253 1 -182 1 -183 1 -43 1 -63 1 -106 1 -107 1 -108 1 -109 1 -10A 1 -10B 1 -10C 1 -10D 1 -368 1 -C7 1 -E7 1 -187 1 -188 1 -255 1 -44 1 -64 1 -10E 1 -10F 1 -369 1 -1C4 1 -1C5 1 -1C6 1 -1F1 1 -1F2 1 -1F3 1 -2A3 1 -2A5 1 -2A4 1 -110 1 -111 1 -189 1 -256 1 -18A 1 -257 1 -18B 1 -18C 1 -221 1 -D0 1 -F0 1 -45 1 -65 1 -C8 1 -C9 1 -CA 1 -CB 1 -E8 1 -E9 1 -EA 1 -EB 1 -112 1 -113 1 -114 1 -115 1 -116 1 -117 1 -118 1 -119 1 -11A 1 -11B 1 -204 1 -205 1 -206 1 -207 1 -228 1 -229 1 -364 1 -18E 1 -1DD 1 -18F 1 -259 1 -190 1 -25B 1 -258 1 -25A 1 -25C 1 -25D 1 -25E 1 -29A 1 -264 1 -46 1 -66 1 -2A9 1 -191 1 -192 1 -47 1 -67 1 -11C 1 -11D 1 -120 1 -121 1 -122 1 -123 1 -1E6 1 -1E7 1 -1F4 1 -1F5 1 -11E 1 -11F 1 -261 1 -262 1 -1E4 1 -1E5 1 -193 1 -260 1 -29B 1 -194 1 -263 1 -2E0 1 -1A2 1 -1A3 1 -48 1 -68 1 -124 1 -125 1 -21E 1 -21F 1 -2B0 1 -36A 1 -49 1 -131 1 -29C 1 -195 1 -1F6 1 -126 1 -127 1 -266 1 -2B1 1 -267 1 -2BB 1 -2BD 1 -69 1 -CC 1 -CD 1 -CE 1 -CF 1 -EC 1 -ED 1 -EE 1 -EF 1 -128 1 -129 1 -12A 1 -12B 1 -12C 1 -12D 1 -12E 1 -12F 1 -130 1 -1CF 1 -1D0 1 -208 1 -209 1 -20A 1 -20B 1 -365 1 -132 1 -133 1 -26A 1 -197 1 -268 1 -196 1 -269 1 -4A 1 -6A 1 -134 1 -135 1 -1F0 1 -2B2 1 -29D 1 -25F 1 -284 1 -4B 1 -6B 1 -136 1 -137 1 -1E8 1 -1E9 1 -198 1 -199 1 -29E 1 -4C 1 -6C 1 -139 1 -13A 1 -13B 1 -13C 1 -13D 1 -13E 1 -2E1 1 -13F 1 -140 1 -1C7 1 -1C8 1 -1C9 1 -2AA 1 -2AB 1 -29F 1 -141 1 -142 1 -19A 1 -26B 1 -26C 1 -26D 1 -234 1 -26E 1 -19B 1 -28E 1 -4D 1 -6D 1 -36B 1 -271 1 -4E 1 -6E 1 -D1 1 -F1 1 -143 1 -144 1 -145 1 -146 1 -147 1 -148 1 -1F8 1 -1F9 1 -1CA 1 -1CB 1 -1CC 1 -274 1 -19D 1 -272 1 -19E 1 -220 1 -273 1 -235 1 -14A 1 -14B 1 -4F 1 -6F 1 -BA 1 -D2 1 -D3 1 -D4 1 -D5 1 -F2 1 -F3 1 -F4 1 -F5 1 -14C 1 -14D 1 -14E 1 -14F 1 -150 1 -151 1 -1A0 1 -1A1 1 -1D1 1 -1D2 1 -1EA 1 -1EB 1 -1EC 1 -1ED 1 -20C 1 -20D 1 -20E 1 -20F 1 -22A 1 -22B 1 -22C 1 -22D 1 -22E 1 -22F 1 -230 1 -231 1 -366 1 -152 1 -153 1 -D6 1 -F6 1 -276 1 -D8 1 -F8 1 -1FE 1 -1FF 1 -186 1 -254 1 -19F 1 -275 1 -277 1 -222 1 -223 1 -50 1 -70 1 -1A4 1 -1A5 1 -278 1 -51 1 -71 1 -2A0 1 -138 1 -52 1 -72 1 -154 1 -155 1 -156 1 -157 1 -158 1 -159 1 -210 1 -211 1 -212 1 -213 1 -2B3 1 -36C 1 -1A6 1 -280 1 -279 1 -2B4 1 -27A 1 -27B 1 -2B5 1 -27C 1 -27D 1 -27E 1 -27F 1 -281 1 -2B6 1 -53 1 -73 1 -15A 1 -15B 1 -15C 1 -15D 1 -160 1 -161 1 -17F 1 -218 1 -219 1 -2E2 1 -DF 1 -15E 1 -15F 1 -282 1 -1A9 1 -283 1 -1AA 1 -285 1 -286 1 -54 1 -74 1 -162 1 -163 1 -164 1 -165 1 -21A 1 -21B 1 -36D 1 -2A8 1 -1BE 1 -2A6 1 -2A7 1 -166 1 -167 1 -1AB 1 -1AC 1 -1AD 1 -1AE 1 -288 1 -236 1 -287 1 -55 1 -75 1 -D9 1 -DA 1 -DB 1 -F9 1 -FA 1 -FB 1 -168 1 -169 1 -16A 1 -16B 1 -16C 1 -16D 1 -16E 1 -16F 1 -170 1 -171 1 -172 1 -173 1 -1AF 1 -1B0 1 -1D3 1 -1D4 1 -1D5 1 -1D6 1 -1D7 1 -1D8 1 -1D9 1 -1DA 1 -1DB 1 -1DC 1 -214 1 -215 1 -216 1 -217 1 -367 1 -DC 1 -FC 1 -289 1 -265 1 -2AE 1 -2AF 1 -19C 1 -26F 1 -270 1 -1B1 1 -28A 1 -56 1 -76 1 -36E 1 -1B2 1 -28B 1 -28C 1 -57 1 -77 1 -174 1 -175 1 -2B7 1 -28D 1 -58 1 -78 1 -2E3 1 -36F 1 -59 1 -79 1 -DD 1 -FD 1 -FF 1 -176 1 -177 1 -178 1 -232 1 -233 1 -2B8 1 -28F 1 -1B3 1 -1B4 1 -5A 1 -7A 1 -179 1 -17A 1 -17B 1 -17C 1 -17D 1 -17E 1 -18D 1 -1B5 1 -1B6 1 -224 1 -225 1 -290 1 -291 1 -1B7 1 -1EE 1 -1EF 1 -292 1 -1B8 1 -1B9 1 -1BA 1 -293 1 -21C 1 -21D 1 -DE 1 -FE 1 -1BF 1 -1F7 1 -1BB 1 -1A7 1 -1A8 1 -1BC 1 -1BD 1 -184 1 -185 1 -294 1 -2C0 1 -2BC 1 -149 1 -2EE 1 -2BE 1 -295 1 -2E4 1 -2BF 1 -2C1 1 -2A1 1 -2A2 1 -296 1 -1C0 1 -1C1 1 -1C2 1 -1C3 1 -297 1 -298 1 -2AC 1 -2AD 1 -386 1 -391 1 -3AC 1 -3B1 1 -392 1 -3B2 1 -3D0 1 -393 1 -3B3 1 -394 1 -3B4 1 -388 1 -395 1 -3AD 1 -3B5 1 -3F5 1 -3DC 1 -3DD 1 -3DA 1 -3DB 1 -396 1 -3B6 1 -389 1 -397 1 -3AE 1 -3B7 1 -398 1 -3B8 1 -3D1 1 -3F4 1 -37A 1 -38A 1 -390 1 -399 1 -3AA 1 -3AF 1 -3B9 1 -3CA 1 -3F3 1 -39A 1 -3BA 1 -3F0 1 -3D7 1 -39B 1 -3BB 1 -B5 1 -39C 1 -3BC 1 -39D 1 -3BD 1 -39E 1 -3BE 1 -38C 1 -39F 1 -3BF 1 -3CC 1 -3A0 1 -3C0 1 -3D6 1 -3DE 1 -3DF 1 -3D8 1 -3D9 1 -3A1 1 -3C1 1 -3F1 1 -3A3 1 -3C2 1 -3C3 1 -3F2 1 -3F9 1 -3A4 1 -3C4 1 -38E 1 -3A5 1 -3AB 1 -3B0 1 -3C5 1 -3CB 1 -3CD 1 -3D2 1 -3D3 1 -3D4 1 -3A6 1 -3C6 1 -3D5 1 -3A7 1 -3C7 1 -3A8 1 -3C8 1 -38F 1 -3A9 1 -3C9 1 -3CE 1 -3E0 1 -3E1 1 -3F7 1 -3F8 1 -3FA 1 -3FB 1 -3E2 1 -3E3 1 -3E4 1 -3E5 1 -3E6 1 -3E7 1 -3E8 1 -3E9 1 -3EA 1 -3EB 1 -3EC 1 -3ED 1 -3EE 1 -3EF 1 -410 1 -430 1 -4D0 1 -4D1 1 -4D2 1 -4D3 1 -4D8 1 -4D9 1 -4DA 1 -4DB 1 -4D4 1 -4D5 1 -411 1 -431 1 -412 1 -432 1 -413 1 -433 1 -490 1 -491 1 -492 1 -493 1 -494 1 -495 1 -414 1 -434 1 -500 1 -501 1 -402 1 -452 1 -502 1 -503 1 -403 1 -453 1 -498 1 -499 1 -400 1 -401 1 -415 1 -435 1 -450 1 -451 1 -4D6 1 -4D7 1 -404 1 -454 1 -416 1 -436 1 -4C1 1 -4C2 1 -4DC 1 -4DD 1 -496 1 -497 1 -417 1 -437 1 -504 1 -505 1 -4DE 1 -4DF 1 -405 1 -455 1 -4E0 1 -4E1 1 -506 1 -507 1 -40D 1 -418 1 -438 1 -45D 1 -4E2 1 -4E3 1 -48A 1 -48B 1 -4E4 1 -4E5 1 -406 1 -456 1 -407 1 -457 1 -419 1 -439 1 -408 1 -458 1 -41A 1 -43A 1 -49A 1 -49B 1 -4C3 1 -4C4 1 -4A0 1 -4A1 1 -49E 1 -49F 1 -49C 1 -49D 1 -41B 1 -43B 1 -4C5 1 -4C6 1 -409 1 -459 1 -508 1 -509 1 -41C 1 -43C 1 -4CD 1 -4CE 1 -41D 1 -43D 1 -4C9 1 -4CA 1 -4A2 1 -4A3 1 -4C7 1 -4C8 1 -4A4 1 -4A5 1 -40A 1 -45A 1 -50A 1 -50B 1 -41E 1 -43E 1 -4E6 1 -4E7 1 -4E8 1 -4E9 1 -4EA 1 -4EB 1 -41F 1 -43F 1 -4A6 1 -4A7 1 -480 1 -481 1 -420 1 -440 1 -48E 1 -48F 1 -421 1 -441 1 -50C 1 -50D 1 -4AA 1 -4AB 1 -422 1 -442 1 -50E 1 -50F 1 -4AC 1 -4AD 1 -40B 1 -45B 1 -40C 1 -45C 1 -423 1 -443 1 -4EE 1 -4EF 1 -40E 1 -45E 1 -4F0 1 -4F1 1 -4F2 1 -4F3 1 -4AE 1 -4AF 1 -4B0 1 -4B1 1 -478 1 -479 1 -424 1 -444 1 -425 1 -445 1 -4B2 1 -4B3 1 -4BA 1 -4BB 1 -460 1 -461 1 -47E 1 -47F 1 -47C 1 -47D 1 -47A 1 -47B 1 -426 1 -446 1 -4B4 1 -4B5 1 -427 1 -447 1 -4F4 1 -4F5 1 -4B6 1 -4B7 1 -4CB 1 -4CC 1 -4B8 1 -4B9 1 -4BC 1 -4BD 1 -4BE 1 -4BF 1 -40F 1 -45F 1 -428 1 -448 1 -429 1 -449 1 -42A 1 -44A 1 -42B 1 -44B 1 -4F8 1 -4F9 1 -42C 1 -44C 1 -48C 1 -48D 1 -462 1 -463 1 -42D 1 -44D 1 -4EC 1 -4ED 1 -42E 1 -44E 1 -42F 1 -44F 1 -464 1 -465 1 -466 1 -467 1 -46A 1 -46B 1 -468 1 -469 1 -46C 1 -46D 1 -46E 1 -46F 1 -470 1 -471 1 -472 1 -473 1 -474 1 -475 1 -476 1 -477 1 -4A8 1 -4A9 1 -4C0 1 -531 1 -561 1 -532 1 -562 1 -533 1 -563 1 -534 1 -564 1 -535 1 -565 1 -587 1 -536 1 -566 1 -537 1 -567 1 -538 1 -568 1 -539 1 -569 1 -53A 1 -56A 1 -53B 1 -56B 1 -53C 1 -56C 1 -53D 1 -56D 1 -53E 1 -56E 1 -53F 1 -56F 1 -540 1 -570 1 -541 1 -571 1 -542 1 -572 1 -543 1 -573 1 -544 1 -574 1 -545 1 -575 1 -546 1 -576 1 -547 1 -577 1 -548 1 -578 1 -549 1 -579 1 -54A 1 -57A 1 -54B 1 -57B 1 -54C 1 -57C 1 -54D 1 -57D 1 -54E 1 -57E 1 -54F 1 -57F 1 -550 1 -580 1 -551 1 -581 1 -552 1 -582 1 -553 1 -583 1 -554 1 -584 1 -555 1 -585 1 -556 1 -586 1 -559 1 -5D0 1 -5D1 1 -5D2 1 -5D3 1 -5D4 1 -5D5 1 -5F0 1 -5F1 1 -5D6 1 -5D7 1 -5D8 1 -5D9 1 -5F2 1 -5DA 1 -5DB 1 -5DC 1 -5DD 1 -5DE 1 -5DF 1 -5E0 1 -5E1 1 -5E2 1 -5E3 1 -5E4 1 -5E5 1 -5E6 1 -5E7 1 -5E8 1 -5E9 1 -5EA 1 -621 1 -674 1 -6FD 1 -622 1 -623 1 -672 1 -671 1 -624 1 -625 1 -673 1 -626 1 -627 1 -675 1 -66E 1 -628 1 -67B 1 -67E 1 -680 1 -629 1 -62A 1 -62B 1 -679 1 -67A 1 -67C 1 -67D 1 -67F 1 -62C 1 -683 1 -684 1 -686 1 -6BF 1 -687 1 -62D 1 -62E 1 -681 1 -682 1 -685 1 -62F 1 -630 1 -688 1 -689 1 -68A 1 -68B 1 -68C 1 -68D 1 -68E 1 -68F 1 -690 1 -6EE 1 -631 1 -632 1 -691 1 -692 1 -693 1 -694 1 -695 1 -696 1 -697 1 -698 1 -699 1 -6EF 1 -633 1 -634 1 -69A 1 -69B 1 -69C 1 -6FA 1 -635 1 -636 1 -69D 1 -69E 1 -6FB 1 -637 1 -638 1 -69F 1 -639 1 -63A 1 -6A0 1 -6FC 1 -641 1 -6A1 1 -6A2 1 -6A3 1 -6A4 1 -6A5 1 -6A6 1 -66F 1 -642 1 -6A7 1 -6A8 1 -643 1 -6A9 1 -6AA 1 -6AB 1 -6AC 1 -6AD 1 -6AE 1 -6AF 1 -6B0 1 -6B1 1 -6B2 1 -6B3 1 -6B4 1 -644 1 -6B5 1 -6B6 1 -6B7 1 -6B8 1 -645 1 -6FE 1 -646 1 -6BA 1 -6BB 1 -6BC 1 -6BD 1 -6B9 1 -647 1 -6BE 1 -6C1 1 -6C2 1 -6C3 1 -6FF 1 -6C0 1 -6D5 1 -648 1 -6E5 1 -676 1 -6C4 1 -6C5 1 -6C6 1 -6C7 1 -677 1 -6C8 1 -6C9 1 -6CA 1 -6CB 1 -6CF 1 -649 1 -64A 1 -6E6 1 -678 1 -6CC 1 -6CD 1 -6CE 1 -6D0 1 -6D1 1 -6D2 1 -6D3 1 -710 1 -712 1 -72D 1 -713 1 -714 1 -72E 1 -716 1 -715 1 -72F 1 -717 1 -718 1 -719 1 -74D 1 -71A 1 -71B 1 -71C 1 -71D 1 -71E 1 -71F 1 -74E 1 -720 1 -721 1 -722 1 -723 1 -724 1 -725 1 -726 1 -727 1 -74F 1 -728 1 -729 1 -72A 1 -72B 1 -72C 1 -780 1 -799 1 -79A 1 -781 1 -782 1 -783 1 -79C 1 -784 1 -785 1 -786 1 -787 1 -7A2 1 -7A3 1 -788 1 -7A5 1 -789 1 -78A 1 -78B 1 -79B 1 -78C 1 -798 1 -7A0 1 -7A1 1 -78D 1 -78E 1 -7A4 1 -78F 1 -790 1 -79D 1 -79E 1 -79F 1 -791 1 -792 1 -793 1 -794 1 -795 1 -796 1 -797 1 -7B1 1 -7A6 1 -7A7 1 -7A8 1 -7A9 1 -7AA 1 -7AB 1 -7AC 1 -7AD 1 -7AE 1 -7AF 1 -7B0 1 -4E00 1 -4E01 1 -4E02 1 -4E03 1 -4E04 1 -4E05 1 -4E06 1 -4E07 1 -4E08 1 -4E09 1 -4E0A 1 -4E0B 1 -4E0C 1 -4E0D 1 -4E0E 1 -4E0F 1 -4E10 1 -4E11 1 -4E12 1 -4E13 1 -4E14 1 -4E15 1 -4E16 1 -4E17 1 -4E18 1 -4E19 1 -4E1A 1 -4E1B 1 -4E1C 1 -4E1D 1 -4E1E 1 -4E1F 1 -4E20 1 -4E21 1 -4E22 1 -4E23 1 -4E24 1 -4E25 1 -4E26 1 -4E27 1 -4E28 1 -4E29 1 -4E2A 1 -4E2B 1 -4E2C 1 -4E2D 1 -4E2E 1 -4E2F 1 -4E30 1 -4E31 1 -4E32 1 -4E33 1 -4E34 1 -4E35 1 -4E36 1 -4E37 1 -4E38 1 -4E39 1 -4E3A 1 -4E3B 1 -4E3C 1 -4E3D 1 -4E3E 1 -4E3F 1 -4E40 1 -4E41 1 -4E42 1 -4E43 1 -4E44 1 -4E45 1 -4E46 1 -4E47 1 -4E48 1 -4E49 1 -4E4A 1 -4E4B 1 -4E4C 1 -4E4D 1 -4E4E 1 -4E4F 1 -4E50 1 -4E51 1 -4E52 1 -4E53 1 -4E54 1 -4E55 1 -4E56 1 -4E57 1 -4E58 1 -4E59 1 -4E5A 1 -4E5B 1 -4E5C 1 -4E5D 1 -4E5E 1 -4E5F 1 -4E60 1 -4E61 1 -4E62 1 -4E63 1 -4E64 1 -4E65 1 -4E66 1 -4E67 1 -4E68 1 -4E69 1 -4E6A 1 -4E6B 1 -4E6C 1 -4E6D 1 -4E6E 1 -4E6F 1 -4E70 1 -4E71 1 -4E72 1 -4E73 1 -4E74 1 -4E75 1 -4E76 1 -4E77 1 -4E78 1 -4E79 1 -4E7A 1 -4E7B 1 -4E7C 1 -4E7D 1 -4E7E 1 -4E7F 1 -4E80 1 -4E81 1 -4E82 1 -4E83 1 -4E84 1 -4E85 1 -4E86 1 -4E87 1 -4E88 1 -4E89 1 -4E8A 1 -4E8B 1 -4E8C 1 -4E8D 1 -4E8E 1 -4E8F 1 -4E90 1 -4E91 1 -4E92 1 -4E93 1 -4E94 1 -4E95 1 -4E96 1 -4E97 1 -4E98 1 -4E99 1 -4E9A 1 -4E9B 1 -4E9C 1 -4E9D 1 -4E9E 1 -4E9F 1 -4EA0 1 -4EA1 1 -4EA2 1 -4EA3 1 -4EA4 1 -4EA5 1 -4EA6 1 -4EA7 1 -4EA8 1 -4EA9 1 -4EAA 1 -4EAB 1 -4EAC 1 -4EAD 1 -4EAE 1 -4EAF 1 -4EB0 1 -4EB1 1 -4EB2 1 -4EB3 1 -4EB4 1 -4EB5 1 -4EB6 1 -4EB7 1 -4EB8 1 -4EB9 1 -4EBA 1 -4EBB 1 -4EBC 1 -4EBD 1 -4EBE 1 -4EBF 1 -4EC0 1 -4EC1 1 -4EC2 1 -4EC3 1 -4EC4 1 -4EC5 1 -4EC6 1 -4EC7 1 -4EC8 1 -4EC9 1 -4ECA 1 -4ECB 1 -4ECC 1 -4ECD 1 -4ECE 1 -4ECF 1 -4ED0 1 -4ED1 1 -4ED2 1 -4ED3 1 -4ED4 1 -4ED5 1 -4ED6 1 -4ED7 1 -4ED8 1 -4ED9 1 -4EDA 1 -4EDB 1 -4EDC 1 -4EDD 1 -4EDE 1 -4EDF 1 -4EE0 1 -4EE1 1 -4EE2 1 -4EE3 1 -4EE4 1 -4EE5 1 -4EE6 1 -4EE7 1 -4EE8 1 -4EE9 1 -4EEA 1 -4EEB 1 -4EEC 1 -4EED 1 -4EEE 1 -4EEF 1 -4EF0 1 -4EF1 1 -4EF2 1 -4EF3 1 -4EF4 1 -4EF5 1 -4EF6 1 -4EF7 1 -4EF8 1 -4EF9 1 -4EFA 1 -4EFB 1 -4EFC 1 -4EFD 1 -4EFE 1 -4EFF 1 -4F00 1 -4F01 1 -4F02 1 -4F03 1 -4F04 1 -4F05 1 -4F06 1 -4F07 1 -4F08 1 -4F09 1 -4F0A 1 -4F0B 1 -4F0C 1 -4F0D 1 -4F0E 1 -4F0F 1 -4F10 1 -4F11 1 -4F12 1 -4F13 1 -4F14 1 -4F15 1 -4F16 1 -4F17 1 -4F18 1 -4F19 1 -4F1A 1 -4F1B 1 -4F1C 1 -4F1D 1 -4F1E 1 -4F1F 1 -4F20 1 -4F21 1 -4F22 1 -4F23 1 -4F24 1 -4F25 1 -4F26 1 -4F27 1 -4F28 1 -4F29 1 -4F2A 1 -4F2B 1 -4F2C 1 -4F2D 1 -4F2E 1 -4F2F 1 -4F30 1 -4F31 1 -4F32 1 -4F33 1 -4F34 1 -4F35 1 -4F36 1 -4F37 1 -4F38 1 -4F39 1 -4F3A 1 -4F3B 1 -4F3C 1 -4F3D 1 -4F3E 1 -4F3F 1 -4F40 1 -4F41 1 -4F42 1 -4F43 1 -4F44 1 -4F45 1 -4F46 1 -4F47 1 -4F48 1 -4F49 1 -4F4A 1 -4F4B 1 -4F4C 1 -4F4D 1 -4F4E 1 -4F4F 1 -4F50 1 -4F51 1 -4F52 1 -4F53 1 -4F54 1 -4F55 1 -4F56 1 -4F57 1 -4F58 1 -4F59 1 -4F5A 1 -4F5B 1 -4F5C 1 -4F5D 1 -4F5E 1 -4F5F 1 -4F60 1 -4F61 1 -4F62 1 -4F63 1 -4F64 1 -4F65 1 -4F66 1 -4F67 1 -4F68 1 -4F69 1 -4F6A 1 -4F6B 1 -4F6C 1 -4F6D 1 -4F6E 1 -4F6F 1 -4F70 1 -4F71 1 -4F72 1 -4F73 1 -4F74 1 -4F75 1 -4F76 1 -4F77 1 -4F78 1 -4F79 1 -4F7A 1 -4F7B 1 -4F7C 1 -4F7D 1 -4F7E 1 -4F7F 1 -4F80 1 -4F81 1 -4F82 1 -4F83 1 -4F84 1 -4F85 1 -4F86 1 -4F87 1 -4F88 1 -4F89 1 -4F8A 1 -4F8B 1 -4F8C 1 -4F8D 1 -4F8E 1 -4F8F 1 -4F90 1 -4F91 1 -4F92 1 -4F93 1 -4F94 1 -4F95 1 -4F96 1 -4F97 1 -4F98 1 -4F99 1 -4F9A 1 -4F9B 1 -4F9C 1 -4F9D 1 -4F9E 1 -4F9F 1 -4FA0 1 -4FA1 1 -4FA2 1 -4FA3 1 -4FA4 1 -4FA5 1 -4FA6 1 -4FA7 1 -4FA8 1 -4FA9 1 -4FAA 1 -4FAB 1 -4FAC 1 -4FAD 1 -4FAE 1 -4FAF 1 -4FB0 1 -4FB1 1 -4FB2 1 -4FB3 1 -4FB4 1 -4FB5 1 -4FB6 1 -4FB7 1 -4FB8 1 -4FB9 1 -4FBA 1 -4FBB 1 -4FBC 1 -4FBD 1 -4FBE 1 -4FBF 1 -4FC0 1 -4FC1 1 -4FC2 1 -4FC3 1 -4FC4 1 -4FC5 1 -4FC6 1 -4FC7 1 -4FC8 1 -4FC9 1 -4FCA 1 -4FCB 1 -4FCC 1 -4FCD 1 -4FCE 1 -4FCF 1 -4FD0 1 -4FD1 1 -4FD2 1 -4FD3 1 -4FD4 1 -4FD5 1 -4FD6 1 -4FD7 1 -4FD8 1 -4FD9 1 -4FDA 1 -4FDB 1 -4FDC 1 -4FDD 1 -4FDE 1 -4FDF 1 -4FE0 1 -4FE1 1 -4FE2 1 -4FE3 1 -4FE4 1 -4FE5 1 -4FE6 1 -4FE7 1 -4FE8 1 -4FE9 1 -4FEA 1 -4FEB 1 -4FEC 1 -4FED 1 -4FEE 1 -4FEF 1 -4FF0 1 -4FF1 1 -4FF2 1 -4FF3 1 -4FF4 1 -4FF5 1 -4FF6 1 -4FF7 1 -4FF8 1 -4FF9 1 -4FFA 1 -4FFB 1 -4FFC 1 -4FFD 1 -4FFE 1 -4FFF 1 -237 1 -238 1 -239 1 -23A 1 -23B 1 -23C 1 -23D 1 -23E 1 -23F 1 -240 1 -241 1 -242 1 -243 1 -244 1 -245 1 -246 1 -247 1 -248 1 -249 1 -24A 1 -24B 1 -24C 1 -24D 1 -24E 1 -24F 1 -358 1 -359 1 -35A 1 -35B 1 -35C 1 -370 1 -371 1 -372 1 -373 1 -376 1 -377 1 -378 1 -379 1 -37B 1 -37C 1 -37D 1 -37F 1 -380 1 -381 1 -382 1 -383 1 -38B 1 -38D 1 -3A2 1 -3CF 1 -3FC 1 -3FD 1 -3FE 1 -3FF 1 -487 1 -4CF 1 -4F6 1 -4F7 1 -4FA 1 -4FB 1 -4FC 1 -4FD 1 -4FE 1 -4FF 1 -510 1 -511 1 -512 1 -513 1 -514 1 -515 1 -516 1 -517 1 -518 1 -519 1 -51A 1 -51B 1 -51C 1 -51D 1 -51E 1 -51F 1 -520 1 -521 1 -522 1 -523 1 -524 1 -525 1 -526 1 -527 1 -528 1 -529 1 -52A 1 -52B 1 -52C 1 -52D 1 -52E 1 -52F 1 -530 1 -557 1 -558 1 -560 1 -588 1 -58B 1 -58C 1 -58D 1 -58E 1 -58F 1 -590 1 -5A2 1 -5BA 1 -5C5 1 -5C6 1 -5C7 1 -5C8 1 -5C9 1 -5CA 1 -5CB 1 -5CC 1 -5CD 1 -5CE 1 -5CF 1 -5EB 1 -5EC 1 -5ED 1 -5EE 1 -5EF 1 -5F5 1 -5F6 1 -5F7 1 -5F8 1 -5F9 1 -5FA 1 -5FB 1 -5FC 1 -5FD 1 -5FE 1 -5FF 1 -604 1 -605 1 -606 1 -607 1 -608 1 -609 1 -60A 1 -60B 1 -616 1 -617 1 -618 1 -619 1 -61A 1 -61C 1 -61D 1 -61E 1 -620 1 -63B 1 -63C 1 -63D 1 -63E 1 -63F 1 -659 1 -65A 1 -65B 1 -65C 1 -65D 1 -65E 1 -65F 1 -70E 1 -74B 1 -74C 1 -750 1 -751 1 -752 1 -753 1 -754 1 -755 1 -756 1 -757 1 -758 1 -759 1 -75A 1 -75B 1 -75C 1 -75D 1 -75E 1 -75F 1 -760 1 -761 1 -762 1 -763 1 -764 1 -765 1 -766 1 -767 1 -768 1 -769 1 -76A 1 -76B 1 -76C 1 -76D 1 -76E 1 -76F 1 -770 1 -771 1 -772 1 -773 1 -774 1 -775 1 -776 1 -777 1 -778 1 -779 1 -77A 1 -77B 1 -77C 1 -77D 1 -77E 1 -77F 1 -7B2 1 -7B3 1 -7B4 1 -7B5 1 -7B6 1 -7B7 1 -7B8 1 -7B9 1 -7BA 1 -7BB 1 -7BC 1 -7BD 1 -7BE 1 -7BF 1 -7C0 1 -7C1 1 -7C2 1 -7C3 1 -7C4 1 -7C5 1 -7C6 1 -7C7 1 -7C8 1 -7C9 1 -7CA 1 -7CB 1 -7CC 1 -7CD 1 -7CE 1 -7CF 1 -7D0 1 -7D1 1 -7D2 1 -7D3 1 -7D4 1 -7D5 1 -7D6 1 -7D7 1 -7D8 1 -7D9 1 -7DA 1 -7DB 1 -7DC 1 -7DD 1 -7DE 1 -7DF 1 -7E0 1 -7E1 1 -7E2 1 -7E3 1 -7E4 1 -7E5 1 -7E6 1 -7E7 1 -7E8 1 -7E9 1 -7EA 1 -7EB 1 -7EC 1 -7ED 1 -7EE 1 -7EF 1 -7F0 1 -7F1 1 -7F2 1 -7F3 1 -7F4 1 -7F5 1 -7F6 1 -7F7 1 -7F8 1 -7F9 1 -7FA 1 -7FB 1 -7FC 1 -7FD 1 -7FE 1 -7FF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -SET NAMES utf8; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=NDB CHARACTER SET utf8; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_general_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_unicode_ci; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -85 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -300 1 -301 1 -302 1 -303 1 -304 1 -305 1 -306 1 -307 1 -308 1 -309 1 -30A 1 -30B 1 -30C 1 -30D 1 -30E 1 -30F 1 -310 1 -311 1 -312 1 -313 1 -314 1 -315 1 -316 1 -317 1 -318 1 -319 1 -31A 1 -31B 1 -31C 1 -31D 1 -31E 1 -31F 1 -320 1 -321 1 -322 1 -323 1 -324 1 -325 1 -326 1 -327 1 -328 1 -329 1 -32A 1 -32B 1 -32C 1 -32D 1 -32E 1 -32F 1 -330 1 -331 1 -332 1 -333 1 -334 1 -335 1 -336 1 -337 1 -338 1 -339 1 -33A 1 -33B 1 -33C 1 -33D 1 -33E 1 -33F 1 -340 1 -341 1 -342 1 -343 1 -344 1 -345 1 -346 1 -347 1 -348 1 -349 1 -34A 1 -34B 1 -34C 1 -34D 1 -34E 1 -34F 1 -350 1 -351 1 -352 1 -353 1 -354 1 -355 1 -356 1 -357 1 -35D 1 -35E 1 -35F 1 -360 1 -361 1 -362 1 -483 1 -484 1 -485 1 -486 1 -488 1 -489 1 -591 1 -592 1 -593 1 -594 1 -595 1 -596 1 -597 1 -598 1 -599 1 -59A 1 -59B 1 -59C 1 -59D 1 -59E 1 -59F 1 -5A0 1 -5A1 1 -5A3 1 -5A4 1 -5A5 1 -5A6 1 -5A7 1 -5A8 1 -5A9 1 -5AA 1 -5AB 1 -5AC 1 -5AD 1 -5AE 1 -5AF 1 -5B0 1 -5B1 1 -5B2 1 -5B3 1 -5B4 1 -5B5 1 -5B6 1 -5B7 1 -5B8 1 -5B9 1 -5BB 1 -5BC 1 -5BD 1 -5BF 1 -5C1 1 -5C2 1 -5C4 1 -600 1 -601 1 -602 1 -603 1 -610 1 -611 1 -612 1 -613 1 -614 1 -615 1 -64B 1 -64C 1 -64D 1 -64E 1 -64F 1 -650 1 -651 1 -652 1 -653 1 -654 1 -655 1 -656 1 -657 1 -658 1 -670 1 -6D6 1 -6D7 1 -6D8 1 -6D9 1 -6DA 1 -6DB 1 -6DC 1 -6DD 1 -6DE 1 -6DF 1 -6E0 1 -6E1 1 -6E2 1 -6E3 1 -6E4 1 -6E7 1 -6E8 1 -6EA 1 -6EB 1 -6EC 1 -6ED 1 -70F 1 -711 1 -730 1 -731 1 -732 1 -733 1 -734 1 -735 1 -736 1 -737 1 -738 1 -739 1 -73A 1 -73B 1 -73C 1 -73D 1 -73E 1 -73F 1 -740 1 -741 1 -742 1 -743 1 -744 1 -745 1 -746 1 -747 1 -748 1 -749 1 -74A 1 -640 1 -60 1 -B4 1 -384 1 -2DC 1 -5E 1 -AF 1 -2D8 1 -2D9 1 -A8 1 -385 1 -2DA 1 -2DD 1 -B8 1 -2DB 1 -5F 1 -AD 1 -2D 1 -58A 1 -2C 1 -55D 1 -60C 1 -60D 1 -66B 1 -66C 1 -3B 1 -37E 1 -61B 1 -3A 1 -589 1 -703 1 -704 1 -705 1 -706 1 -707 1 -708 1 -21 1 -A1 1 -55C 1 -3F 1 -BF 1 -55E 1 -61F 1 -709 1 -2E 1 -6D4 1 -701 1 -702 1 -B7 1 -387 1 -700 1 -27 1 -22 1 -AB 1 -BB 1 -28 1 -29 1 -5B 1 -7B 1 -7D 1 -A7 1 -B6 1 -A9 1 -AE 1 -40 1 -2A 1 -66D 1 -2F 1 -26 1 -23 1 -25 1 -66A 1 -55A 1 -55B 1 -55F 1 -5BE 1 -5C0 1 -5C3 1 -5F3 1 -5F4 1 -70A 1 -70B 1 -70C 1 -70D 1 -2B9 1 -374 1 -375 1 -2BA 1 -2C2 1 -2C3 1 -2C4 1 -2C5 1 -2C6 1 -2C7 1 -2C8 1 -2C9 1 -2CA 1 -2CB 1 -2CC 1 -2CD 1 -2CE 1 -2CF 1 -2D2 1 -2D3 1 -2D4 1 -2D5 1 -2D6 1 -2D7 1 -2DE 1 -2DF 1 -2E5 1 -2E6 1 -2E7 1 -2E8 1 -2E9 1 -2EA 1 -2EB 1 -2EC 1 -2ED 1 -2EF 1 -2F0 1 -2F1 1 -2F2 1 -2F3 1 -2F4 1 -2F5 1 -2F6 1 -2F7 1 -2F8 1 -2F9 1 -2FA 1 -2FB 1 -2FC 1 -2FD 1 -2FE 1 -2FF 1 -B0 1 -482 1 -60E 1 -60F 1 -6E9 1 -3F6 1 -2B 1 -B1 1 -F7 1 -D7 1 -3C 1 -3D 1 -3E 1 -AC 1 -7C 1 -A6 1 -7E 1 -2D0 1 -2D1 1 -A4 1 -A2 1 -24 1 -A3 1 -A5 1 -30 1 -660 1 -6F0 1 -31 1 -B9 1 -661 1 -6F1 1 -BD 1 -BC 1 -32 1 -B2 1 -662 1 -6F2 1 -33 1 -B3 1 -663 1 -6F3 1 -BE 1 -34 1 -664 1 -6F4 1 -35 1 -665 1 -6F5 1 -36 1 -666 1 -6F6 1 -37 1 -667 1 -6F7 1 -38 1 -668 1 -6F8 1 -39 1 -669 1 -6F9 1 -41 1 -61 1 -AA 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -100 1 -101 1 -102 1 -103 1 -104 1 -105 1 -1CD 1 -1CE 1 -1DE 1 -1DF 1 -1E0 1 -1E1 1 -1FA 1 -1FB 1 -200 1 -201 1 -202 1 -203 1 -226 1 -227 1 -363 1 -C6 1 -E6 1 -1E2 1 -1E3 1 -1FC 1 -1FD 1 -250 1 -251 1 -252 1 -42 1 -62 1 -299 1 -180 1 -181 1 -253 1 -182 1 -183 1 -43 1 -63 1 -C7 1 -E7 1 -106 1 -107 1 -108 1 -109 1 -10A 1 -10B 1 -10C 1 -10D 1 -368 1 -187 1 -188 1 -255 1 -44 1 -64 1 -10E 1 -10F 1 -369 1 -1C4 1 -1C5 1 -1C6 1 -1F1 1 -1F2 1 -1F3 1 -2A3 1 -2A5 1 -2A4 1 -110 1 -111 1 -189 1 -256 1 -18A 1 -257 1 -18B 1 -18C 1 -221 1 -D0 1 -F0 1 -45 1 -65 1 -C8 1 -C9 1 -CA 1 -CB 1 -E8 1 -E9 1 -EA 1 -EB 1 -112 1 -113 1 -114 1 -115 1 -116 1 -117 1 -118 1 -119 1 -11A 1 -11B 1 -204 1 -205 1 -206 1 -207 1 -228 1 -229 1 -364 1 -18E 1 -1DD 1 -18F 1 -259 1 -190 1 -25B 1 -258 1 -25A 1 -25C 1 -25D 1 -25E 1 -29A 1 -264 1 -46 1 -66 1 -2A9 1 -191 1 -192 1 -47 1 -67 1 -11C 1 -11D 1 -11E 1 -11F 1 -120 1 -121 1 -122 1 -123 1 -1E6 1 -1E7 1 -1F4 1 -1F5 1 -261 1 -262 1 -1E4 1 -1E5 1 -193 1 -260 1 -29B 1 -194 1 -263 1 -2E0 1 -1A2 1 -1A3 1 -48 1 -68 1 -124 1 -125 1 -21E 1 -21F 1 -2B0 1 -36A 1 -29C 1 -195 1 -1F6 1 -126 1 -127 1 -266 1 -2B1 1 -267 1 -2BB 1 -2BD 1 -49 1 -69 1 -CC 1 -CD 1 -CE 1 -CF 1 -EC 1 -ED 1 -EE 1 -EF 1 -128 1 -129 1 -12A 1 -12B 1 -12C 1 -12D 1 -12E 1 -12F 1 -130 1 -1CF 1 -1D0 1 -208 1 -209 1 -20A 1 -20B 1 -365 1 -132 1 -133 1 -131 1 -26A 1 -197 1 -268 1 -196 1 -269 1 -4A 1 -6A 1 -134 1 -135 1 -1F0 1 -2B2 1 -29D 1 -25F 1 -284 1 -4B 1 -6B 1 -136 1 -137 1 -1E8 1 -1E9 1 -198 1 -199 1 -29E 1 -4C 1 -6C 1 -139 1 -13A 1 -13B 1 -13C 1 -13D 1 -13E 1 -2E1 1 -13F 1 -140 1 -1C7 1 -1C8 1 -1C9 1 -2AA 1 -2AB 1 -29F 1 -141 1 -142 1 -19A 1 -26B 1 -26C 1 -26D 1 -234 1 -26E 1 -19B 1 -28E 1 -4D 1 -6D 1 -36B 1 -271 1 -4E 1 -6E 1 -D1 1 -F1 1 -143 1 -144 1 -145 1 -146 1 -147 1 -148 1 -1F8 1 -1F9 1 -1CA 1 -1CB 1 -1CC 1 -274 1 -19D 1 -272 1 -19E 1 -220 1 -273 1 -235 1 -14A 1 -14B 1 -4F 1 -6F 1 -BA 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -14C 1 -14D 1 -14E 1 -14F 1 -150 1 -151 1 -1A0 1 -1A1 1 -1D1 1 -1D2 1 -1EA 1 -1EB 1 -1EC 1 -1ED 1 -20C 1 -20D 1 -20E 1 -20F 1 -22A 1 -22B 1 -22C 1 -22D 1 -22E 1 -22F 1 -230 1 -231 1 -366 1 -152 1 -153 1 -276 1 -D8 1 -F8 1 -1FE 1 -1FF 1 -186 1 -254 1 -19F 1 -275 1 -277 1 -222 1 -223 1 -50 1 -70 1 -1A4 1 -1A5 1 -278 1 -51 1 -71 1 -2A0 1 -138 1 -52 1 -72 1 -154 1 -155 1 -156 1 -157 1 -158 1 -159 1 -210 1 -211 1 -212 1 -213 1 -2B3 1 -36C 1 -1A6 1 -280 1 -279 1 -2B4 1 -27A 1 -27B 1 -2B5 1 -27C 1 -27D 1 -27E 1 -27F 1 -281 1 -2B6 1 -53 1 -73 1 -15A 1 -15B 1 -15C 1 -15D 1 -15E 1 -15F 1 -160 1 -161 1 -17F 1 -218 1 -219 1 -2E2 1 -DF 1 -282 1 -1A9 1 -283 1 -1AA 1 -285 1 -286 1 -54 1 -74 1 -162 1 -163 1 -164 1 -165 1 -21A 1 -21B 1 -36D 1 -2A8 1 -1BE 1 -2A6 1 -2A7 1 -166 1 -167 1 -1AB 1 -1AC 1 -1AD 1 -1AE 1 -288 1 -236 1 -287 1 -55 1 -75 1 -D9 1 -DA 1 -DB 1 -DC 1 -F9 1 -FA 1 -FB 1 -FC 1 -168 1 -169 1 -16A 1 -16B 1 -16C 1 -16D 1 -16E 1 -16F 1 -170 1 -171 1 -172 1 -173 1 -1AF 1 -1B0 1 -1D3 1 -1D4 1 -1D5 1 -1D6 1 -1D7 1 -1D8 1 -1D9 1 -1DA 1 -1DB 1 -1DC 1 -214 1 -215 1 -216 1 -217 1 -367 1 -289 1 -265 1 -2AE 1 -2AF 1 -19C 1 -26F 1 -270 1 -1B1 1 -28A 1 -56 1 -76 1 -36E 1 -1B2 1 -28B 1 -28C 1 -57 1 -77 1 -174 1 -175 1 -2B7 1 -28D 1 -58 1 -78 1 -2E3 1 -36F 1 -59 1 -79 1 -DD 1 -FD 1 -FF 1 -176 1 -177 1 -178 1 -232 1 -233 1 -2B8 1 -28F 1 -1B3 1 -1B4 1 -5A 1 -7A 1 -179 1 -17A 1 -17B 1 -17C 1 -17D 1 -17E 1 -18D 1 -1B5 1 -1B6 1 -224 1 -225 1 -290 1 -291 1 -1B7 1 -1EE 1 -1EF 1 -292 1 -1B8 1 -1B9 1 -1BA 1 -293 1 -21C 1 -21D 1 -DE 1 -FE 1 -1BF 1 -1F7 1 -1BB 1 -1A7 1 -1A8 1 -1BC 1 -1BD 1 -184 1 -185 1 -294 1 -2C0 1 -2BC 1 -149 1 -2EE 1 -2BE 1 -295 1 -2E4 1 -2BF 1 -2C1 1 -2A1 1 -2A2 1 -296 1 -1C0 1 -1C1 1 -1C2 1 -1C3 1 -297 1 -298 1 -2AC 1 -2AD 1 -386 1 -391 1 -3AC 1 -3B1 1 -392 1 -3B2 1 -3D0 1 -393 1 -3B3 1 -394 1 -3B4 1 -388 1 -395 1 -3AD 1 -3B5 1 -3F5 1 -3DC 1 -3DD 1 -3DA 1 -3DB 1 -396 1 -3B6 1 -389 1 -397 1 -3AE 1 -3B7 1 -398 1 -3B8 1 -3D1 1 -3F4 1 -37A 1 -38A 1 -390 1 -399 1 -3AA 1 -3AF 1 -3B9 1 -3CA 1 -3F3 1 -39A 1 -3BA 1 -3F0 1 -3D7 1 -39B 1 -3BB 1 -B5 1 -39C 1 -3BC 1 -39D 1 -3BD 1 -39E 1 -3BE 1 -38C 1 -39F 1 -3BF 1 -3CC 1 -3A0 1 -3C0 1 -3D6 1 -3DE 1 -3DF 1 -3D8 1 -3D9 1 -3A1 1 -3C1 1 -3F1 1 -3A3 1 -3C2 1 -3C3 1 -3F2 1 -3F9 1 -3A4 1 -3C4 1 -38E 1 -3A5 1 -3AB 1 -3B0 1 -3C5 1 -3CB 1 -3CD 1 -3D2 1 -3D3 1 -3D4 1 -3A6 1 -3C6 1 -3D5 1 -3A7 1 -3C7 1 -3A8 1 -3C8 1 -38F 1 -3A9 1 -3C9 1 -3CE 1 -3E0 1 -3E1 1 -3F7 1 -3F8 1 -3FA 1 -3FB 1 -3E2 1 -3E3 1 -3E4 1 -3E5 1 -3E6 1 -3E7 1 -3E8 1 -3E9 1 -3EA 1 -3EB 1 -3EC 1 -3ED 1 -3EE 1 -3EF 1 -410 1 -430 1 -4D0 1 -4D1 1 -4D2 1 -4D3 1 -4D8 1 -4D9 1 -4DA 1 -4DB 1 -4D4 1 -4D5 1 -411 1 -431 1 -412 1 -432 1 -413 1 -433 1 -490 1 -491 1 -492 1 -493 1 -494 1 -495 1 -414 1 -434 1 -500 1 -501 1 -402 1 -452 1 -502 1 -503 1 -403 1 -453 1 -498 1 -499 1 -400 1 -401 1 -415 1 -435 1 -450 1 -451 1 -4D6 1 -4D7 1 -404 1 -454 1 -416 1 -436 1 -4C1 1 -4C2 1 -4DC 1 -4DD 1 -496 1 -497 1 -417 1 -437 1 -504 1 -505 1 -4DE 1 -4DF 1 -405 1 -455 1 -4E0 1 -4E1 1 -506 1 -507 1 -40D 1 -418 1 -438 1 -45D 1 -4E2 1 -4E3 1 -48A 1 -48B 1 -4E4 1 -4E5 1 -406 1 -456 1 -407 1 -457 1 -419 1 -439 1 -408 1 -458 1 -41A 1 -43A 1 -49A 1 -49B 1 -4C3 1 -4C4 1 -4A0 1 -4A1 1 -49E 1 -49F 1 -49C 1 -49D 1 -41B 1 -43B 1 -4C5 1 -4C6 1 -409 1 -459 1 -508 1 -509 1 -41C 1 -43C 1 -4CD 1 -4CE 1 -41D 1 -43D 1 -4C9 1 -4CA 1 -4A2 1 -4A3 1 -4C7 1 -4C8 1 -4A4 1 -4A5 1 -40A 1 -45A 1 -50A 1 -50B 1 -41E 1 -43E 1 -4E6 1 -4E7 1 -4E8 1 -4E9 1 -4EA 1 -4EB 1 -41F 1 -43F 1 -4A6 1 -4A7 1 -480 1 -481 1 -420 1 -440 1 -48E 1 -48F 1 -421 1 -441 1 -50C 1 -50D 1 -4AA 1 -4AB 1 -422 1 -442 1 -50E 1 -50F 1 -4AC 1 -4AD 1 -40B 1 -45B 1 -40C 1 -45C 1 -423 1 -443 1 -4EE 1 -4EF 1 -40E 1 -45E 1 -4F0 1 -4F1 1 -4F2 1 -4F3 1 -4AE 1 -4AF 1 -4B0 1 -4B1 1 -478 1 -479 1 -424 1 -444 1 -425 1 -445 1 -4B2 1 -4B3 1 -4BA 1 -4BB 1 -460 1 -461 1 -47E 1 -47F 1 -47C 1 -47D 1 -47A 1 -47B 1 -426 1 -446 1 -4B4 1 -4B5 1 -427 1 -447 1 -4F4 1 -4F5 1 -4B6 1 -4B7 1 -4CB 1 -4CC 1 -4B8 1 -4B9 1 -4BC 1 -4BD 1 -4BE 1 -4BF 1 -40F 1 -45F 1 -428 1 -448 1 -429 1 -449 1 -42A 1 -44A 1 -42B 1 -44B 1 -4F8 1 -4F9 1 -42C 1 -44C 1 -48C 1 -48D 1 -462 1 -463 1 -42D 1 -44D 1 -4EC 1 -4ED 1 -42E 1 -44E 1 -42F 1 -44F 1 -464 1 -465 1 -466 1 -467 1 -46A 1 -46B 1 -468 1 -469 1 -46C 1 -46D 1 -46E 1 -46F 1 -470 1 -471 1 -472 1 -473 1 -474 1 -475 1 -476 1 -477 1 -4A8 1 -4A9 1 -4C0 1 -531 1 -561 1 -532 1 -562 1 -533 1 -563 1 -534 1 -564 1 -535 1 -565 1 -587 1 -536 1 -566 1 -537 1 -567 1 -538 1 -568 1 -539 1 -569 1 -53A 1 -56A 1 -53B 1 -56B 1 -53C 1 -56C 1 -53D 1 -56D 1 -53E 1 -56E 1 -53F 1 -56F 1 -540 1 -570 1 -541 1 -571 1 -542 1 -572 1 -543 1 -573 1 -544 1 -574 1 -545 1 -575 1 -546 1 -576 1 -547 1 -577 1 -548 1 -578 1 -549 1 -579 1 -54A 1 -57A 1 -54B 1 -57B 1 -54C 1 -57C 1 -54D 1 -57D 1 -54E 1 -57E 1 -54F 1 -57F 1 -550 1 -580 1 -551 1 -581 1 -552 1 -582 1 -553 1 -583 1 -554 1 -584 1 -555 1 -585 1 -556 1 -586 1 -559 1 -5D0 1 -5D1 1 -5D2 1 -5D3 1 -5D4 1 -5D5 1 -5F0 1 -5F1 1 -5D6 1 -5D7 1 -5D8 1 -5D9 1 -5F2 1 -5DA 1 -5DB 1 -5DC 1 -5DD 1 -5DE 1 -5DF 1 -5E0 1 -5E1 1 -5E2 1 -5E3 1 -5E4 1 -5E5 1 -5E6 1 -5E7 1 -5E8 1 -5E9 1 -5EA 1 -621 1 -674 1 -6FD 1 -622 1 -623 1 -672 1 -671 1 -624 1 -625 1 -673 1 -626 1 -627 1 -675 1 -66E 1 -628 1 -67B 1 -67E 1 -680 1 -629 1 -62A 1 -62B 1 -679 1 -67A 1 -67C 1 -67D 1 -67F 1 -62C 1 -683 1 -684 1 -686 1 -6BF 1 -687 1 -62D 1 -62E 1 -681 1 -682 1 -685 1 -62F 1 -630 1 -688 1 -689 1 -68A 1 -68B 1 -68C 1 -68D 1 -68E 1 -68F 1 -690 1 -6EE 1 -631 1 -632 1 -691 1 -692 1 -693 1 -694 1 -695 1 -696 1 -697 1 -698 1 -699 1 -6EF 1 -633 1 -634 1 -69A 1 -69B 1 -69C 1 -6FA 1 -635 1 -636 1 -69D 1 -69E 1 -6FB 1 -637 1 -638 1 -69F 1 -639 1 -63A 1 -6A0 1 -6FC 1 -641 1 -6A1 1 -6A2 1 -6A3 1 -6A4 1 -6A5 1 -6A6 1 -66F 1 -642 1 -6A7 1 -6A8 1 -643 1 -6A9 1 -6AA 1 -6AB 1 -6AC 1 -6AD 1 -6AE 1 -6AF 1 -6B0 1 -6B1 1 -6B2 1 -6B3 1 -6B4 1 -644 1 -6B5 1 -6B6 1 -6B7 1 -6B8 1 -645 1 -6FE 1 -646 1 -6BA 1 -6BB 1 -6BC 1 -6BD 1 -6B9 1 -647 1 -6BE 1 -6C1 1 -6C2 1 -6C3 1 -6FF 1 -6C0 1 -6D5 1 -648 1 -6E5 1 -676 1 -6C4 1 -6C5 1 -6C6 1 -6C7 1 -677 1 -6C8 1 -6C9 1 -6CA 1 -6CB 1 -6CF 1 -649 1 -64A 1 -6E6 1 -678 1 -6CC 1 -6CD 1 -6CE 1 -6D0 1 -6D1 1 -6D2 1 -6D3 1 -710 1 -712 1 -72D 1 -713 1 -714 1 -72E 1 -716 1 -715 1 -72F 1 -717 1 -718 1 -719 1 -74D 1 -71A 1 -71B 1 -71C 1 -71D 1 -71E 1 -71F 1 -74E 1 -720 1 -721 1 -722 1 -723 1 -724 1 -725 1 -726 1 -727 1 -74F 1 -728 1 -729 1 -72A 1 -72B 1 -72C 1 -780 1 -799 1 -79A 1 -781 1 -782 1 -783 1 -79C 1 -784 1 -785 1 -786 1 -787 1 -7A2 1 -7A3 1 -788 1 -7A5 1 -789 1 -78A 1 -78B 1 -79B 1 -78C 1 -798 1 -7A0 1 -7A1 1 -78D 1 -78E 1 -7A4 1 -78F 1 -790 1 -79D 1 -79E 1 -79F 1 -791 1 -792 1 -793 1 -794 1 -795 1 -796 1 -797 1 -7B1 1 -7A6 1 -7A7 1 -7A8 1 -7A9 1 -7AA 1 -7AB 1 -7AC 1 -7AD 1 -7AE 1 -7AF 1 -7B0 1 -4E00 1 -4E01 1 -4E02 1 -4E03 1 -4E04 1 -4E05 1 -4E06 1 -4E07 1 -4E08 1 -4E09 1 -4E0A 1 -4E0B 1 -4E0C 1 -4E0D 1 -4E0E 1 -4E0F 1 -4E10 1 -4E11 1 -4E12 1 -4E13 1 -4E14 1 -4E15 1 -4E16 1 -4E17 1 -4E18 1 -4E19 1 -4E1A 1 -4E1B 1 -4E1C 1 -4E1D 1 -4E1E 1 -4E1F 1 -4E20 1 -4E21 1 -4E22 1 -4E23 1 -4E24 1 -4E25 1 -4E26 1 -4E27 1 -4E28 1 -4E29 1 -4E2A 1 -4E2B 1 -4E2C 1 -4E2D 1 -4E2E 1 -4E2F 1 -4E30 1 -4E31 1 -4E32 1 -4E33 1 -4E34 1 -4E35 1 -4E36 1 -4E37 1 -4E38 1 -4E39 1 -4E3A 1 -4E3B 1 -4E3C 1 -4E3D 1 -4E3E 1 -4E3F 1 -4E40 1 -4E41 1 -4E42 1 -4E43 1 -4E44 1 -4E45 1 -4E46 1 -4E47 1 -4E48 1 -4E49 1 -4E4A 1 -4E4B 1 -4E4C 1 -4E4D 1 -4E4E 1 -4E4F 1 -4E50 1 -4E51 1 -4E52 1 -4E53 1 -4E54 1 -4E55 1 -4E56 1 -4E57 1 -4E58 1 -4E59 1 -4E5A 1 -4E5B 1 -4E5C 1 -4E5D 1 -4E5E 1 -4E5F 1 -4E60 1 -4E61 1 -4E62 1 -4E63 1 -4E64 1 -4E65 1 -4E66 1 -4E67 1 -4E68 1 -4E69 1 -4E6A 1 -4E6B 1 -4E6C 1 -4E6D 1 -4E6E 1 -4E6F 1 -4E70 1 -4E71 1 -4E72 1 -4E73 1 -4E74 1 -4E75 1 -4E76 1 -4E77 1 -4E78 1 -4E79 1 -4E7A 1 -4E7B 1 -4E7C 1 -4E7D 1 -4E7E 1 -4E7F 1 -4E80 1 -4E81 1 -4E82 1 -4E83 1 -4E84 1 -4E85 1 -4E86 1 -4E87 1 -4E88 1 -4E89 1 -4E8A 1 -4E8B 1 -4E8C 1 -4E8D 1 -4E8E 1 -4E8F 1 -4E90 1 -4E91 1 -4E92 1 -4E93 1 -4E94 1 -4E95 1 -4E96 1 -4E97 1 -4E98 1 -4E99 1 -4E9A 1 -4E9B 1 -4E9C 1 -4E9D 1 -4E9E 1 -4E9F 1 -4EA0 1 -4EA1 1 -4EA2 1 -4EA3 1 -4EA4 1 -4EA5 1 -4EA6 1 -4EA7 1 -4EA8 1 -4EA9 1 -4EAA 1 -4EAB 1 -4EAC 1 -4EAD 1 -4EAE 1 -4EAF 1 -4EB0 1 -4EB1 1 -4EB2 1 -4EB3 1 -4EB4 1 -4EB5 1 -4EB6 1 -4EB7 1 -4EB8 1 -4EB9 1 -4EBA 1 -4EBB 1 -4EBC 1 -4EBD 1 -4EBE 1 -4EBF 1 -4EC0 1 -4EC1 1 -4EC2 1 -4EC3 1 -4EC4 1 -4EC5 1 -4EC6 1 -4EC7 1 -4EC8 1 -4EC9 1 -4ECA 1 -4ECB 1 -4ECC 1 -4ECD 1 -4ECE 1 -4ECF 1 -4ED0 1 -4ED1 1 -4ED2 1 -4ED3 1 -4ED4 1 -4ED5 1 -4ED6 1 -4ED7 1 -4ED8 1 -4ED9 1 -4EDA 1 -4EDB 1 -4EDC 1 -4EDD 1 -4EDE 1 -4EDF 1 -4EE0 1 -4EE1 1 -4EE2 1 -4EE3 1 -4EE4 1 -4EE5 1 -4EE6 1 -4EE7 1 -4EE8 1 -4EE9 1 -4EEA 1 -4EEB 1 -4EEC 1 -4EED 1 -4EEE 1 -4EEF 1 -4EF0 1 -4EF1 1 -4EF2 1 -4EF3 1 -4EF4 1 -4EF5 1 -4EF6 1 -4EF7 1 -4EF8 1 -4EF9 1 -4EFA 1 -4EFB 1 -4EFC 1 -4EFD 1 -4EFE 1 -4EFF 1 -4F00 1 -4F01 1 -4F02 1 -4F03 1 -4F04 1 -4F05 1 -4F06 1 -4F07 1 -4F08 1 -4F09 1 -4F0A 1 -4F0B 1 -4F0C 1 -4F0D 1 -4F0E 1 -4F0F 1 -4F10 1 -4F11 1 -4F12 1 -4F13 1 -4F14 1 -4F15 1 -4F16 1 -4F17 1 -4F18 1 -4F19 1 -4F1A 1 -4F1B 1 -4F1C 1 -4F1D 1 -4F1E 1 -4F1F 1 -4F20 1 -4F21 1 -4F22 1 -4F23 1 -4F24 1 -4F25 1 -4F26 1 -4F27 1 -4F28 1 -4F29 1 -4F2A 1 -4F2B 1 -4F2C 1 -4F2D 1 -4F2E 1 -4F2F 1 -4F30 1 -4F31 1 -4F32 1 -4F33 1 -4F34 1 -4F35 1 -4F36 1 -4F37 1 -4F38 1 -4F39 1 -4F3A 1 -4F3B 1 -4F3C 1 -4F3D 1 -4F3E 1 -4F3F 1 -4F40 1 -4F41 1 -4F42 1 -4F43 1 -4F44 1 -4F45 1 -4F46 1 -4F47 1 -4F48 1 -4F49 1 -4F4A 1 -4F4B 1 -4F4C 1 -4F4D 1 -4F4E 1 -4F4F 1 -4F50 1 -4F51 1 -4F52 1 -4F53 1 -4F54 1 -4F55 1 -4F56 1 -4F57 1 -4F58 1 -4F59 1 -4F5A 1 -4F5B 1 -4F5C 1 -4F5D 1 -4F5E 1 -4F5F 1 -4F60 1 -4F61 1 -4F62 1 -4F63 1 -4F64 1 -4F65 1 -4F66 1 -4F67 1 -4F68 1 -4F69 1 -4F6A 1 -4F6B 1 -4F6C 1 -4F6D 1 -4F6E 1 -4F6F 1 -4F70 1 -4F71 1 -4F72 1 -4F73 1 -4F74 1 -4F75 1 -4F76 1 -4F77 1 -4F78 1 -4F79 1 -4F7A 1 -4F7B 1 -4F7C 1 -4F7D 1 -4F7E 1 -4F7F 1 -4F80 1 -4F81 1 -4F82 1 -4F83 1 -4F84 1 -4F85 1 -4F86 1 -4F87 1 -4F88 1 -4F89 1 -4F8A 1 -4F8B 1 -4F8C 1 -4F8D 1 -4F8E 1 -4F8F 1 -4F90 1 -4F91 1 -4F92 1 -4F93 1 -4F94 1 -4F95 1 -4F96 1 -4F97 1 -4F98 1 -4F99 1 -4F9A 1 -4F9B 1 -4F9C 1 -4F9D 1 -4F9E 1 -4F9F 1 -4FA0 1 -4FA1 1 -4FA2 1 -4FA3 1 -4FA4 1 -4FA5 1 -4FA6 1 -4FA7 1 -4FA8 1 -4FA9 1 -4FAA 1 -4FAB 1 -4FAC 1 -4FAD 1 -4FAE 1 -4FAF 1 -4FB0 1 -4FB1 1 -4FB2 1 -4FB3 1 -4FB4 1 -4FB5 1 -4FB6 1 -4FB7 1 -4FB8 1 -4FB9 1 -4FBA 1 -4FBB 1 -4FBC 1 -4FBD 1 -4FBE 1 -4FBF 1 -4FC0 1 -4FC1 1 -4FC2 1 -4FC3 1 -4FC4 1 -4FC5 1 -4FC6 1 -4FC7 1 -4FC8 1 -4FC9 1 -4FCA 1 -4FCB 1 -4FCC 1 -4FCD 1 -4FCE 1 -4FCF 1 -4FD0 1 -4FD1 1 -4FD2 1 -4FD3 1 -4FD4 1 -4FD5 1 -4FD6 1 -4FD7 1 -4FD8 1 -4FD9 1 -4FDA 1 -4FDB 1 -4FDC 1 -4FDD 1 -4FDE 1 -4FDF 1 -4FE0 1 -4FE1 1 -4FE2 1 -4FE3 1 -4FE4 1 -4FE5 1 -4FE6 1 -4FE7 1 -4FE8 1 -4FE9 1 -4FEA 1 -4FEB 1 -4FEC 1 -4FED 1 -4FEE 1 -4FEF 1 -4FF0 1 -4FF1 1 -4FF2 1 -4FF3 1 -4FF4 1 -4FF5 1 -4FF6 1 -4FF7 1 -4FF8 1 -4FF9 1 -4FFA 1 -4FFB 1 -4FFC 1 -4FFD 1 -4FFE 1 -4FFF 1 -237 1 -238 1 -239 1 -23A 1 -23B 1 -23C 1 -23D 1 -23E 1 -23F 1 -240 1 -241 1 -242 1 -243 1 -244 1 -245 1 -246 1 -247 1 -248 1 -249 1 -24A 1 -24B 1 -24C 1 -24D 1 -24E 1 -24F 1 -358 1 -359 1 -35A 1 -35B 1 -35C 1 -370 1 -371 1 -372 1 -373 1 -376 1 -377 1 -378 1 -379 1 -37B 1 -37C 1 -37D 1 -37F 1 -380 1 -381 1 -382 1 -383 1 -38B 1 -38D 1 -3A2 1 -3CF 1 -3FC 1 -3FD 1 -3FE 1 -3FF 1 -487 1 -4CF 1 -4F6 1 -4F7 1 -4FA 1 -4FB 1 -4FC 1 -4FD 1 -4FE 1 -4FF 1 -510 1 -511 1 -512 1 -513 1 -514 1 -515 1 -516 1 -517 1 -518 1 -519 1 -51A 1 -51B 1 -51C 1 -51D 1 -51E 1 -51F 1 -520 1 -521 1 -522 1 -523 1 -524 1 -525 1 -526 1 -527 1 -528 1 -529 1 -52A 1 -52B 1 -52C 1 -52D 1 -52E 1 -52F 1 -530 1 -557 1 -558 1 -560 1 -588 1 -58B 1 -58C 1 -58D 1 -58E 1 -58F 1 -590 1 -5A2 1 -5BA 1 -5C5 1 -5C6 1 -5C7 1 -5C8 1 -5C9 1 -5CA 1 -5CB 1 -5CC 1 -5CD 1 -5CE 1 -5CF 1 -5EB 1 -5EC 1 -5ED 1 -5EE 1 -5EF 1 -5F5 1 -5F6 1 -5F7 1 -5F8 1 -5F9 1 -5FA 1 -5FB 1 -5FC 1 -5FD 1 -5FE 1 -5FF 1 -604 1 -605 1 -606 1 -607 1 -608 1 -609 1 -60A 1 -60B 1 -616 1 -617 1 -618 1 -619 1 -61A 1 -61C 1 -61D 1 -61E 1 -620 1 -63B 1 -63C 1 -63D 1 -63E 1 -63F 1 -659 1 -65A 1 -65B 1 -65C 1 -65D 1 -65E 1 -65F 1 -70E 1 -74B 1 -74C 1 -750 1 -751 1 -752 1 -753 1 -754 1 -755 1 -756 1 -757 1 -758 1 -759 1 -75A 1 -75B 1 -75C 1 -75D 1 -75E 1 -75F 1 -760 1 -761 1 -762 1 -763 1 -764 1 -765 1 -766 1 -767 1 -768 1 -769 1 -76A 1 -76B 1 -76C 1 -76D 1 -76E 1 -76F 1 -770 1 -771 1 -772 1 -773 1 -774 1 -775 1 -776 1 -777 1 -778 1 -779 1 -77A 1 -77B 1 -77C 1 -77D 1 -77E 1 -77F 1 -7B2 1 -7B3 1 -7B4 1 -7B5 1 -7B6 1 -7B7 1 -7B8 1 -7B9 1 -7BA 1 -7BB 1 -7BC 1 -7BD 1 -7BE 1 -7BF 1 -7C0 1 -7C1 1 -7C2 1 -7C3 1 -7C4 1 -7C5 1 -7C6 1 -7C7 1 -7C8 1 -7C9 1 -7CA 1 -7CB 1 -7CC 1 -7CD 1 -7CE 1 -7CF 1 -7D0 1 -7D1 1 -7D2 1 -7D3 1 -7D4 1 -7D5 1 -7D6 1 -7D7 1 -7D8 1 -7D9 1 -7DA 1 -7DB 1 -7DC 1 -7DD 1 -7DE 1 -7DF 1 -7E0 1 -7E1 1 -7E2 1 -7E3 1 -7E4 1 -7E5 1 -7E6 1 -7E7 1 -7E8 1 -7E9 1 -7EA 1 -7EB 1 -7EC 1 -7ED 1 -7EE 1 -7EF 1 -7F0 1 -7F1 1 -7F2 1 -7F3 1 -7F4 1 -7F5 1 -7F6 1 -7F7 1 -7F8 1 -7F9 1 -7FA 1 -7FB 1 -7FC 1 -7FD 1 -7FE 1 -7FF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_bin) ENGINE=NDB CHARACTER SET utf8 COLLATE utf8_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_bin # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -C280 1 -C281 1 -C282 1 -C283 1 -C284 1 -C285 1 -C286 1 -C287 1 -C288 1 -C289 1 -C28A 1 -C28B 1 -C28C 1 -C28D 1 -C28E 1 -C28F 1 -C290 1 -C291 1 -C292 1 -C293 1 -C294 1 -C295 1 -C296 1 -C297 1 -C298 1 -C299 1 -C29A 1 -C29B 1 -C29C 1 -C29D 1 -C29E 1 -C29F 1 -C2A0 1 -C2A1 1 -C2A2 1 -C2A3 1 -C2A4 1 -C2A5 1 -C2A6 1 -C2A7 1 -C2A8 1 -C2A9 1 -C2AA 1 -C2AB 1 -C2AC 1 -C2AD 1 -C2AE 1 -C2AF 1 -C2B0 1 -C2B1 1 -C2B2 1 -C2B3 1 -C2B4 1 -C2B5 1 -C2B6 1 -C2B7 1 -C2B8 1 -C2B9 1 -C2BA 1 -C2BB 1 -C2BC 1 -C2BD 1 -C2BE 1 -C2BF 1 -C380 1 -C381 1 -C382 1 -C383 1 -C384 1 -C385 1 -C386 1 -C387 1 -C388 1 -C389 1 -C38A 1 -C38B 1 -C38C 1 -C38D 1 -C38E 1 -C38F 1 -C390 1 -C391 1 -C392 1 -C393 1 -C394 1 -C395 1 -C396 1 -C397 1 -C398 1 -C399 1 -C39A 1 -C39B 1 -C39C 1 -C39D 1 -C39E 1 -C39F 1 -C3A0 1 -C3A1 1 -C3A2 1 -C3A3 1 -C3A4 1 -C3A5 1 -C3A6 1 -C3A7 1 -C3A8 1 -C3A9 1 -C3AA 1 -C3AB 1 -C3AC 1 -C3AD 1 -C3AE 1 -C3AF 1 -C3B0 1 -C3B1 1 -C3B2 1 -C3B3 1 -C3B4 1 -C3B5 1 -C3B6 1 -C3B7 1 -C3B8 1 -C3B9 1 -C3BA 1 -C3BB 1 -C3BC 1 -C3BD 1 -C3BE 1 -C3BF 1 -C480 1 -C481 1 -C482 1 -C483 1 -C484 1 -C485 1 -C486 1 -C487 1 -C488 1 -C489 1 -C48A 1 -C48B 1 -C48C 1 -C48D 1 -C48E 1 -C48F 1 -C490 1 -C491 1 -C492 1 -C493 1 -C494 1 -C495 1 -C496 1 -C497 1 -C498 1 -C499 1 -C49A 1 -C49B 1 -C49C 1 -C49D 1 -C49E 1 -C49F 1 -C4A0 1 -C4A1 1 -C4A2 1 -C4A3 1 -C4A4 1 -C4A5 1 -C4A6 1 -C4A7 1 -C4A8 1 -C4A9 1 -C4AA 1 -C4AB 1 -C4AC 1 -C4AD 1 -C4AE 1 -C4AF 1 -C4B0 1 -C4B1 1 -C4B2 1 -C4B3 1 -C4B4 1 -C4B5 1 -C4B6 1 -C4B7 1 -C4B8 1 -C4B9 1 -C4BA 1 -C4BB 1 -C4BC 1 -C4BD 1 -C4BE 1 -C4BF 1 -C580 1 -C581 1 -C582 1 -C583 1 -C584 1 -C585 1 -C586 1 -C587 1 -C588 1 -C589 1 -C58A 1 -C58B 1 -C58C 1 -C58D 1 -C58E 1 -C58F 1 -C590 1 -C591 1 -C592 1 -C593 1 -C594 1 -C595 1 -C596 1 -C597 1 -C598 1 -C599 1 -C59A 1 -C59B 1 -C59C 1 -C59D 1 -C59E 1 -C59F 1 -C5A0 1 -C5A1 1 -C5A2 1 -C5A3 1 -C5A4 1 -C5A5 1 -C5A6 1 -C5A7 1 -C5A8 1 -C5A9 1 -C5AA 1 -C5AB 1 -C5AC 1 -C5AD 1 -C5AE 1 -C5AF 1 -C5B0 1 -C5B1 1 -C5B2 1 -C5B3 1 -C5B4 1 -C5B5 1 -C5B6 1 -C5B7 1 -C5B8 1 -C5B9 1 -C5BA 1 -C5BB 1 -C5BC 1 -C5BD 1 -C5BE 1 -C5BF 1 -C680 1 -C681 1 -C682 1 -C683 1 -C684 1 -C685 1 -C686 1 -C687 1 -C688 1 -C689 1 -C68A 1 -C68B 1 -C68C 1 -C68D 1 -C68E 1 -C68F 1 -C690 1 -C691 1 -C692 1 -C693 1 -C694 1 -C695 1 -C696 1 -C697 1 -C698 1 -C699 1 -C69A 1 -C69B 1 -C69C 1 -C69D 1 -C69E 1 -C69F 1 -C6A0 1 -C6A1 1 -C6A2 1 -C6A3 1 -C6A4 1 -C6A5 1 -C6A6 1 -C6A7 1 -C6A8 1 -C6A9 1 -C6AA 1 -C6AB 1 -C6AC 1 -C6AD 1 -C6AE 1 -C6AF 1 -C6B0 1 -C6B1 1 -C6B2 1 -C6B3 1 -C6B4 1 -C6B5 1 -C6B6 1 -C6B7 1 -C6B8 1 -C6B9 1 -C6BA 1 -C6BB 1 -C6BC 1 -C6BD 1 -C6BE 1 -C6BF 1 -C780 1 -C781 1 -C782 1 -C783 1 -C784 1 -C785 1 -C786 1 -C787 1 -C788 1 -C789 1 -C78A 1 -C78B 1 -C78C 1 -C78D 1 -C78E 1 -C78F 1 -C790 1 -C791 1 -C792 1 -C793 1 -C794 1 -C795 1 -C796 1 -C797 1 -C798 1 -C799 1 -C79A 1 -C79B 1 -C79C 1 -C79D 1 -C79E 1 -C79F 1 -C7A0 1 -C7A1 1 -C7A2 1 -C7A3 1 -C7A4 1 -C7A5 1 -C7A6 1 -C7A7 1 -C7A8 1 -C7A9 1 -C7AA 1 -C7AB 1 -C7AC 1 -C7AD 1 -C7AE 1 -C7AF 1 -C7B0 1 -C7B1 1 -C7B2 1 -C7B3 1 -C7B4 1 -C7B5 1 -C7B6 1 -C7B7 1 -C7B8 1 -C7B9 1 -C7BA 1 -C7BB 1 -C7BC 1 -C7BD 1 -C7BE 1 -C7BF 1 -C880 1 -C881 1 -C882 1 -C883 1 -C884 1 -C885 1 -C886 1 -C887 1 -C888 1 -C889 1 -C88A 1 -C88B 1 -C88C 1 -C88D 1 -C88E 1 -C88F 1 -C890 1 -C891 1 -C892 1 -C893 1 -C894 1 -C895 1 -C896 1 -C897 1 -C898 1 -C899 1 -C89A 1 -C89B 1 -C89C 1 -C89D 1 -C89E 1 -C89F 1 -C8A0 1 -C8A1 1 -C8A2 1 -C8A3 1 -C8A4 1 -C8A5 1 -C8A6 1 -C8A7 1 -C8A8 1 -C8A9 1 -C8AA 1 -C8AB 1 -C8AC 1 -C8AD 1 -C8AE 1 -C8AF 1 -C8B0 1 -C8B1 1 -C8B2 1 -C8B3 1 -C8B4 1 -C8B5 1 -C8B6 1 -C8B7 1 -C8B8 1 -C8B9 1 -C8BA 1 -C8BB 1 -C8BC 1 -C8BD 1 -C8BE 1 -C8BF 1 -C980 1 -C981 1 -C982 1 -C983 1 -C984 1 -C985 1 -C986 1 -C987 1 -C988 1 -C989 1 -C98A 1 -C98B 1 -C98C 1 -C98D 1 -C98E 1 -C98F 1 -C990 1 -C991 1 -C992 1 -C993 1 -C994 1 -C995 1 -C996 1 -C997 1 -C998 1 -C999 1 -C99A 1 -C99B 1 -C99C 1 -C99D 1 -C99E 1 -C99F 1 -C9A0 1 -C9A1 1 -C9A2 1 -C9A3 1 -C9A4 1 -C9A5 1 -C9A6 1 -C9A7 1 -C9A8 1 -C9A9 1 -C9AA 1 -C9AB 1 -C9AC 1 -C9AD 1 -C9AE 1 -C9AF 1 -C9B0 1 -C9B1 1 -C9B2 1 -C9B3 1 -C9B4 1 -C9B5 1 -C9B6 1 -C9B7 1 -C9B8 1 -C9B9 1 -C9BA 1 -C9BB 1 -C9BC 1 -C9BD 1 -C9BE 1 -C9BF 1 -CA80 1 -CA81 1 -CA82 1 -CA83 1 -CA84 1 -CA85 1 -CA86 1 -CA87 1 -CA88 1 -CA89 1 -CA8A 1 -CA8B 1 -CA8C 1 -CA8D 1 -CA8E 1 -CA8F 1 -CA90 1 -CA91 1 -CA92 1 -CA93 1 -CA94 1 -CA95 1 -CA96 1 -CA97 1 -CA98 1 -CA99 1 -CA9A 1 -CA9B 1 -CA9C 1 -CA9D 1 -CA9E 1 -CA9F 1 -CAA0 1 -CAA1 1 -CAA2 1 -CAA3 1 -CAA4 1 -CAA5 1 -CAA6 1 -CAA7 1 -CAA8 1 -CAA9 1 -CAAA 1 -CAAB 1 -CAAC 1 -CAAD 1 -CAAE 1 -CAAF 1 -CAB0 1 -CAB1 1 -CAB2 1 -CAB3 1 -CAB4 1 -CAB5 1 -CAB6 1 -CAB7 1 -CAB8 1 -CAB9 1 -CABA 1 -CABB 1 -CABC 1 -CABD 1 -CABE 1 -CABF 1 -CB80 1 -CB81 1 -CB82 1 -CB83 1 -CB84 1 -CB85 1 -CB86 1 -CB87 1 -CB88 1 -CB89 1 -CB8A 1 -CB8B 1 -CB8C 1 -CB8D 1 -CB8E 1 -CB8F 1 -CB90 1 -CB91 1 -CB92 1 -CB93 1 -CB94 1 -CB95 1 -CB96 1 -CB97 1 -CB98 1 -CB99 1 -CB9A 1 -CB9B 1 -CB9C 1 -CB9D 1 -CB9E 1 -CB9F 1 -CBA0 1 -CBA1 1 -CBA2 1 -CBA3 1 -CBA4 1 -CBA5 1 -CBA6 1 -CBA7 1 -CBA8 1 -CBA9 1 -CBAA 1 -CBAB 1 -CBAC 1 -CBAD 1 -CBAE 1 -CBAF 1 -CBB0 1 -CBB1 1 -CBB2 1 -CBB3 1 -CBB4 1 -CBB5 1 -CBB6 1 -CBB7 1 -CBB8 1 -CBB9 1 -CBBA 1 -CBBB 1 -CBBC 1 -CBBD 1 -CBBE 1 -CBBF 1 -CC80 1 -CC81 1 -CC82 1 -CC83 1 -CC84 1 -CC85 1 -CC86 1 -CC87 1 -CC88 1 -CC89 1 -CC8A 1 -CC8B 1 -CC8C 1 -CC8D 1 -CC8E 1 -CC8F 1 -CC90 1 -CC91 1 -CC92 1 -CC93 1 -CC94 1 -CC95 1 -CC96 1 -CC97 1 -CC98 1 -CC99 1 -CC9A 1 -CC9B 1 -CC9C 1 -CC9D 1 -CC9E 1 -CC9F 1 -CCA0 1 -CCA1 1 -CCA2 1 -CCA3 1 -CCA4 1 -CCA5 1 -CCA6 1 -CCA7 1 -CCA8 1 -CCA9 1 -CCAA 1 -CCAB 1 -CCAC 1 -CCAD 1 -CCAE 1 -CCAF 1 -CCB0 1 -CCB1 1 -CCB2 1 -CCB3 1 -CCB4 1 -CCB5 1 -CCB6 1 -CCB7 1 -CCB8 1 -CCB9 1 -CCBA 1 -CCBB 1 -CCBC 1 -CCBD 1 -CCBE 1 -CCBF 1 -CD80 1 -CD81 1 -CD82 1 -CD83 1 -CD84 1 -CD85 1 -CD86 1 -CD87 1 -CD88 1 -CD89 1 -CD8A 1 -CD8B 1 -CD8C 1 -CD8D 1 -CD8E 1 -CD8F 1 -CD90 1 -CD91 1 -CD92 1 -CD93 1 -CD94 1 -CD95 1 -CD96 1 -CD97 1 -CD98 1 -CD99 1 -CD9A 1 -CD9B 1 -CD9C 1 -CD9D 1 -CD9E 1 -CD9F 1 -CDA0 1 -CDA1 1 -CDA2 1 -CDA3 1 -CDA4 1 -CDA5 1 -CDA6 1 -CDA7 1 -CDA8 1 -CDA9 1 -CDAA 1 -CDAB 1 -CDAC 1 -CDAD 1 -CDAE 1 -CDAF 1 -CDB0 1 -CDB1 1 -CDB2 1 -CDB3 1 -CDB4 1 -CDB5 1 -CDB6 1 -CDB7 1 -CDB8 1 -CDB9 1 -CDBA 1 -CDBB 1 -CDBC 1 -CDBD 1 -CDBE 1 -CDBF 1 -CE80 1 -CE81 1 -CE82 1 -CE83 1 -CE84 1 -CE85 1 -CE86 1 -CE87 1 -CE88 1 -CE89 1 -CE8A 1 -CE8B 1 -CE8C 1 -CE8D 1 -CE8E 1 -CE8F 1 -CE90 1 -CE91 1 -CE92 1 -CE93 1 -CE94 1 -CE95 1 -CE96 1 -CE97 1 -CE98 1 -CE99 1 -CE9A 1 -CE9B 1 -CE9C 1 -CE9D 1 -CE9E 1 -CE9F 1 -CEA0 1 -CEA1 1 -CEA2 1 -CEA3 1 -CEA4 1 -CEA5 1 -CEA6 1 -CEA7 1 -CEA8 1 -CEA9 1 -CEAA 1 -CEAB 1 -CEAC 1 -CEAD 1 -CEAE 1 -CEAF 1 -CEB0 1 -CEB1 1 -CEB2 1 -CEB3 1 -CEB4 1 -CEB5 1 -CEB6 1 -CEB7 1 -CEB8 1 -CEB9 1 -CEBA 1 -CEBB 1 -CEBC 1 -CEBD 1 -CEBE 1 -CEBF 1 -CF80 1 -CF81 1 -CF82 1 -CF83 1 -CF84 1 -CF85 1 -CF86 1 -CF87 1 -CF88 1 -CF89 1 -CF8A 1 -CF8B 1 -CF8C 1 -CF8D 1 -CF8E 1 -CF8F 1 -CF90 1 -CF91 1 -CF92 1 -CF93 1 -CF94 1 -CF95 1 -CF96 1 -CF97 1 -CF98 1 -CF99 1 -CF9A 1 -CF9B 1 -CF9C 1 -CF9D 1 -CF9E 1 -CF9F 1 -CFA0 1 -CFA1 1 -CFA2 1 -CFA3 1 -CFA4 1 -CFA5 1 -CFA6 1 -CFA7 1 -CFA8 1 -CFA9 1 -CFAA 1 -CFAB 1 -CFAC 1 -CFAD 1 -CFAE 1 -CFAF 1 -CFB0 1 -CFB1 1 -CFB2 1 -CFB3 1 -CFB4 1 -CFB5 1 -CFB6 1 -CFB7 1 -CFB8 1 -CFB9 1 -CFBA 1 -CFBB 1 -CFBC 1 -CFBD 1 -CFBE 1 -CFBF 1 -D080 1 -D081 1 -D082 1 -D083 1 -D084 1 -D085 1 -D086 1 -D087 1 -D088 1 -D089 1 -D08A 1 -D08B 1 -D08C 1 -D08D 1 -D08E 1 -D08F 1 -D090 1 -D091 1 -D092 1 -D093 1 -D094 1 -D095 1 -D096 1 -D097 1 -D098 1 -D099 1 -D09A 1 -D09B 1 -D09C 1 -D09D 1 -D09E 1 -D09F 1 -D0A0 1 -D0A1 1 -D0A2 1 -D0A3 1 -D0A4 1 -D0A5 1 -D0A6 1 -D0A7 1 -D0A8 1 -D0A9 1 -D0AA 1 -D0AB 1 -D0AC 1 -D0AD 1 -D0AE 1 -D0AF 1 -D0B0 1 -D0B1 1 -D0B2 1 -D0B3 1 -D0B4 1 -D0B5 1 -D0B6 1 -D0B7 1 -D0B8 1 -D0B9 1 -D0BA 1 -D0BB 1 -D0BC 1 -D0BD 1 -D0BE 1 -D0BF 1 -D180 1 -D181 1 -D182 1 -D183 1 -D184 1 -D185 1 -D186 1 -D187 1 -D188 1 -D189 1 -D18A 1 -D18B 1 -D18C 1 -D18D 1 -D18E 1 -D18F 1 -D190 1 -D191 1 -D192 1 -D193 1 -D194 1 -D195 1 -D196 1 -D197 1 -D198 1 -D199 1 -D19A 1 -D19B 1 -D19C 1 -D19D 1 -D19E 1 -D19F 1 -D1A0 1 -D1A1 1 -D1A2 1 -D1A3 1 -D1A4 1 -D1A5 1 -D1A6 1 -D1A7 1 -D1A8 1 -D1A9 1 -D1AA 1 -D1AB 1 -D1AC 1 -D1AD 1 -D1AE 1 -D1AF 1 -D1B0 1 -D1B1 1 -D1B2 1 -D1B3 1 -D1B4 1 -D1B5 1 -D1B6 1 -D1B7 1 -D1B8 1 -D1B9 1 -D1BA 1 -D1BB 1 -D1BC 1 -D1BD 1 -D1BE 1 -D1BF 1 -D280 1 -D281 1 -D282 1 -D283 1 -D284 1 -D285 1 -D286 1 -D287 1 -D288 1 -D289 1 -D28A 1 -D28B 1 -D28C 1 -D28D 1 -D28E 1 -D28F 1 -D290 1 -D291 1 -D292 1 -D293 1 -D294 1 -D295 1 -D296 1 -D297 1 -D298 1 -D299 1 -D29A 1 -D29B 1 -D29C 1 -D29D 1 -D29E 1 -D29F 1 -D2A0 1 -D2A1 1 -D2A2 1 -D2A3 1 -D2A4 1 -D2A5 1 -D2A6 1 -D2A7 1 -D2A8 1 -D2A9 1 -D2AA 1 -D2AB 1 -D2AC 1 -D2AD 1 -D2AE 1 -D2AF 1 -D2B0 1 -D2B1 1 -D2B2 1 -D2B3 1 -D2B4 1 -D2B5 1 -D2B6 1 -D2B7 1 -D2B8 1 -D2B9 1 -D2BA 1 -D2BB 1 -D2BC 1 -D2BD 1 -D2BE 1 -D2BF 1 -D380 1 -D381 1 -D382 1 -D383 1 -D384 1 -D385 1 -D386 1 -D387 1 -D388 1 -D389 1 -D38A 1 -D38B 1 -D38C 1 -D38D 1 -D38E 1 -D38F 1 -D390 1 -D391 1 -D392 1 -D393 1 -D394 1 -D395 1 -D396 1 -D397 1 -D398 1 -D399 1 -D39A 1 -D39B 1 -D39C 1 -D39D 1 -D39E 1 -D39F 1 -D3A0 1 -D3A1 1 -D3A2 1 -D3A3 1 -D3A4 1 -D3A5 1 -D3A6 1 -D3A7 1 -D3A8 1 -D3A9 1 -D3AA 1 -D3AB 1 -D3AC 1 -D3AD 1 -D3AE 1 -D3AF 1 -D3B0 1 -D3B1 1 -D3B2 1 -D3B3 1 -D3B4 1 -D3B5 1 -D3B6 1 -D3B7 1 -D3B8 1 -D3B9 1 -D3BA 1 -D3BB 1 -D3BC 1 -D3BD 1 -D3BE 1 -D3BF 1 -D480 1 -D481 1 -D482 1 -D483 1 -D484 1 -D485 1 -D486 1 -D487 1 -D488 1 -D489 1 -D48A 1 -D48B 1 -D48C 1 -D48D 1 -D48E 1 -D48F 1 -D490 1 -D491 1 -D492 1 -D493 1 -D494 1 -D495 1 -D496 1 -D497 1 -D498 1 -D499 1 -D49A 1 -D49B 1 -D49C 1 -D49D 1 -D49E 1 -D49F 1 -D4A0 1 -D4A1 1 -D4A2 1 -D4A3 1 -D4A4 1 -D4A5 1 -D4A6 1 -D4A7 1 -D4A8 1 -D4A9 1 -D4AA 1 -D4AB 1 -D4AC 1 -D4AD 1 -D4AE 1 -D4AF 1 -D4B0 1 -D4B1 1 -D4B2 1 -D4B3 1 -D4B4 1 -D4B5 1 -D4B6 1 -D4B7 1 -D4B8 1 -D4B9 1 -D4BA 1 -D4BB 1 -D4BC 1 -D4BD 1 -D4BE 1 -D4BF 1 -D580 1 -D581 1 -D582 1 -D583 1 -D584 1 -D585 1 -D586 1 -D587 1 -D588 1 -D589 1 -D58A 1 -D58B 1 -D58C 1 -D58D 1 -D58E 1 -D58F 1 -D590 1 -D591 1 -D592 1 -D593 1 -D594 1 -D595 1 -D596 1 -D597 1 -D598 1 -D599 1 -D59A 1 -D59B 1 -D59C 1 -D59D 1 -D59E 1 -D59F 1 -D5A0 1 -D5A1 1 -D5A2 1 -D5A3 1 -D5A4 1 -D5A5 1 -D5A6 1 -D5A7 1 -D5A8 1 -D5A9 1 -D5AA 1 -D5AB 1 -D5AC 1 -D5AD 1 -D5AE 1 -D5AF 1 -D5B0 1 -D5B1 1 -D5B2 1 -D5B3 1 -D5B4 1 -D5B5 1 -D5B6 1 -D5B7 1 -D5B8 1 -D5B9 1 -D5BA 1 -D5BB 1 -D5BC 1 -D5BD 1 -D5BE 1 -D5BF 1 -D680 1 -D681 1 -D682 1 -D683 1 -D684 1 -D685 1 -D686 1 -D687 1 -D688 1 -D689 1 -D68A 1 -D68B 1 -D68C 1 -D68D 1 -D68E 1 -D68F 1 -D690 1 -D691 1 -D692 1 -D693 1 -D694 1 -D695 1 -D696 1 -D697 1 -D698 1 -D699 1 -D69A 1 -D69B 1 -D69C 1 -D69D 1 -D69E 1 -D69F 1 -D6A0 1 -D6A1 1 -D6A2 1 -D6A3 1 -D6A4 1 -D6A5 1 -D6A6 1 -D6A7 1 -D6A8 1 -D6A9 1 -D6AA 1 -D6AB 1 -D6AC 1 -D6AD 1 -D6AE 1 -D6AF 1 -D6B0 1 -D6B1 1 -D6B2 1 -D6B3 1 -D6B4 1 -D6B5 1 -D6B6 1 -D6B7 1 -D6B8 1 -D6B9 1 -D6BA 1 -D6BB 1 -D6BC 1 -D6BD 1 -D6BE 1 -D6BF 1 -D780 1 -D781 1 -D782 1 -D783 1 -D784 1 -D785 1 -D786 1 -D787 1 -D788 1 -D789 1 -D78A 1 -D78B 1 -D78C 1 -D78D 1 -D78E 1 -D78F 1 -D790 1 -D791 1 -D792 1 -D793 1 -D794 1 -D795 1 -D796 1 -D797 1 -D798 1 -D799 1 -D79A 1 -D79B 1 -D79C 1 -D79D 1 -D79E 1 -D79F 1 -D7A0 1 -D7A1 1 -D7A2 1 -D7A3 1 -D7A4 1 -D7A5 1 -D7A6 1 -D7A7 1 -D7A8 1 -D7A9 1 -D7AA 1 -D7AB 1 -D7AC 1 -D7AD 1 -D7AE 1 -D7AF 1 -D7B0 1 -D7B1 1 -D7B2 1 -D7B3 1 -D7B4 1 -D7B5 1 -D7B6 1 -D7B7 1 -D7B8 1 -D7B9 1 -D7BA 1 -D7BB 1 -D7BC 1 -D7BD 1 -D7BE 1 -D7BF 1 -D880 1 -D881 1 -D882 1 -D883 1 -D884 1 -D885 1 -D886 1 -D887 1 -D888 1 -D889 1 -D88A 1 -D88B 1 -D88C 1 -D88D 1 -D88E 1 -D88F 1 -D890 1 -D891 1 -D892 1 -D893 1 -D894 1 -D895 1 -D896 1 -D897 1 -D898 1 -D899 1 -D89A 1 -D89B 1 -D89C 1 -D89D 1 -D89E 1 -D89F 1 -D8A0 1 -D8A1 1 -D8A2 1 -D8A3 1 -D8A4 1 -D8A5 1 -D8A6 1 -D8A7 1 -D8A8 1 -D8A9 1 -D8AA 1 -D8AB 1 -D8AC 1 -D8AD 1 -D8AE 1 -D8AF 1 -D8B0 1 -D8B1 1 -D8B2 1 -D8B3 1 -D8B4 1 -D8B5 1 -D8B6 1 -D8B7 1 -D8B8 1 -D8B9 1 -D8BA 1 -D8BB 1 -D8BC 1 -D8BD 1 -D8BE 1 -D8BF 1 -D980 1 -D981 1 -D982 1 -D983 1 -D984 1 -D985 1 -D986 1 -D987 1 -D988 1 -D989 1 -D98A 1 -D98B 1 -D98C 1 -D98D 1 -D98E 1 -D98F 1 -D990 1 -D991 1 -D992 1 -D993 1 -D994 1 -D995 1 -D996 1 -D997 1 -D998 1 -D999 1 -D99A 1 -D99B 1 -D99C 1 -D99D 1 -D99E 1 -D99F 1 -D9A0 1 -D9A1 1 -D9A2 1 -D9A3 1 -D9A4 1 -D9A5 1 -D9A6 1 -D9A7 1 -D9A8 1 -D9A9 1 -D9AA 1 -D9AB 1 -D9AC 1 -D9AD 1 -D9AE 1 -D9AF 1 -D9B0 1 -D9B1 1 -D9B2 1 -D9B3 1 -D9B4 1 -D9B5 1 -D9B6 1 -D9B7 1 -D9B8 1 -D9B9 1 -D9BA 1 -D9BB 1 -D9BC 1 -D9BD 1 -D9BE 1 -D9BF 1 -DA80 1 -DA81 1 -DA82 1 -DA83 1 -DA84 1 -DA85 1 -DA86 1 -DA87 1 -DA88 1 -DA89 1 -DA8A 1 -DA8B 1 -DA8C 1 -DA8D 1 -DA8E 1 -DA8F 1 -DA90 1 -DA91 1 -DA92 1 -DA93 1 -DA94 1 -DA95 1 -DA96 1 -DA97 1 -DA98 1 -DA99 1 -DA9A 1 -DA9B 1 -DA9C 1 -DA9D 1 -DA9E 1 -DA9F 1 -DAA0 1 -DAA1 1 -DAA2 1 -DAA3 1 -DAA4 1 -DAA5 1 -DAA6 1 -DAA7 1 -DAA8 1 -DAA9 1 -DAAA 1 -DAAB 1 -DAAC 1 -DAAD 1 -DAAE 1 -DAAF 1 -DAB0 1 -DAB1 1 -DAB2 1 -DAB3 1 -DAB4 1 -DAB5 1 -DAB6 1 -DAB7 1 -DAB8 1 -DAB9 1 -DABA 1 -DABB 1 -DABC 1 -DABD 1 -DABE 1 -DABF 1 -DB80 1 -DB81 1 -DB82 1 -DB83 1 -DB84 1 -DB85 1 -DB86 1 -DB87 1 -DB88 1 -DB89 1 -DB8A 1 -DB8B 1 -DB8C 1 -DB8D 1 -DB8E 1 -DB8F 1 -DB90 1 -DB91 1 -DB92 1 -DB93 1 -DB94 1 -DB95 1 -DB96 1 -DB97 1 -DB98 1 -DB99 1 -DB9A 1 -DB9B 1 -DB9C 1 -DB9D 1 -DB9E 1 -DB9F 1 -DBA0 1 -DBA1 1 -DBA2 1 -DBA3 1 -DBA4 1 -DBA5 1 -DBA6 1 -DBA7 1 -DBA8 1 -DBA9 1 -DBAA 1 -DBAB 1 -DBAC 1 -DBAD 1 -DBAE 1 -DBAF 1 -DBB0 1 -DBB1 1 -DBB2 1 -DBB3 1 -DBB4 1 -DBB5 1 -DBB6 1 -DBB7 1 -DBB8 1 -DBB9 1 -DBBA 1 -DBBB 1 -DBBC 1 -DBBD 1 -DBBE 1 -DBBF 1 -DC80 1 -DC81 1 -DC82 1 -DC83 1 -DC84 1 -DC85 1 -DC86 1 -DC87 1 -DC88 1 -DC89 1 -DC8A 1 -DC8B 1 -DC8C 1 -DC8D 1 -DC8E 1 -DC8F 1 -DC90 1 -DC91 1 -DC92 1 -DC93 1 -DC94 1 -DC95 1 -DC96 1 -DC97 1 -DC98 1 -DC99 1 -DC9A 1 -DC9B 1 -DC9C 1 -DC9D 1 -DC9E 1 -DC9F 1 -DCA0 1 -DCA1 1 -DCA2 1 -DCA3 1 -DCA4 1 -DCA5 1 -DCA6 1 -DCA7 1 -DCA8 1 -DCA9 1 -DCAA 1 -DCAB 1 -DCAC 1 -DCAD 1 -DCAE 1 -DCAF 1 -DCB0 1 -DCB1 1 -DCB2 1 -DCB3 1 -DCB4 1 -DCB5 1 -DCB6 1 -DCB7 1 -DCB8 1 -DCB9 1 -DCBA 1 -DCBB 1 -DCBC 1 -DCBD 1 -DCBE 1 -DCBF 1 -DD80 1 -DD81 1 -DD82 1 -DD83 1 -DD84 1 -DD85 1 -DD86 1 -DD87 1 -DD88 1 -DD89 1 -DD8A 1 -DD8B 1 -DD8C 1 -DD8D 1 -DD8E 1 -DD8F 1 -DD90 1 -DD91 1 -DD92 1 -DD93 1 -DD94 1 -DD95 1 -DD96 1 -DD97 1 -DD98 1 -DD99 1 -DD9A 1 -DD9B 1 -DD9C 1 -DD9D 1 -DD9E 1 -DD9F 1 -DDA0 1 -DDA1 1 -DDA2 1 -DDA3 1 -DDA4 1 -DDA5 1 -DDA6 1 -DDA7 1 -DDA8 1 -DDA9 1 -DDAA 1 -DDAB 1 -DDAC 1 -DDAD 1 -DDAE 1 -DDAF 1 -DDB0 1 -DDB1 1 -DDB2 1 -DDB3 1 -DDB4 1 -DDB5 1 -DDB6 1 -DDB7 1 -DDB8 1 -DDB9 1 -DDBA 1 -DDBB 1 -DDBC 1 -DDBD 1 -DDBE 1 -DDBF 1 -DE80 1 -DE81 1 -DE82 1 -DE83 1 -DE84 1 -DE85 1 -DE86 1 -DE87 1 -DE88 1 -DE89 1 -DE8A 1 -DE8B 1 -DE8C 1 -DE8D 1 -DE8E 1 -DE8F 1 -DE90 1 -DE91 1 -DE92 1 -DE93 1 -DE94 1 -DE95 1 -DE96 1 -DE97 1 -DE98 1 -DE99 1 -DE9A 1 -DE9B 1 -DE9C 1 -DE9D 1 -DE9E 1 -DE9F 1 -DEA0 1 -DEA1 1 -DEA2 1 -DEA3 1 -DEA4 1 -DEA5 1 -DEA6 1 -DEA7 1 -DEA8 1 -DEA9 1 -DEAA 1 -DEAB 1 -DEAC 1 -DEAD 1 -DEAE 1 -DEAF 1 -DEB0 1 -DEB1 1 -DEB2 1 -DEB3 1 -DEB4 1 -DEB5 1 -DEB6 1 -DEB7 1 -DEB8 1 -DEB9 1 -DEBA 1 -DEBB 1 -DEBC 1 -DEBD 1 -DEBE 1 -DEBF 1 -DF80 1 -DF81 1 -DF82 1 -DF83 1 -DF84 1 -DF85 1 -DF86 1 -DF87 1 -DF88 1 -DF89 1 -DF8A 1 -DF8B 1 -DF8C 1 -DF8D 1 -DF8E 1 -DF8F 1 -DF90 1 -DF91 1 -DF92 1 -DF93 1 -DF94 1 -DF95 1 -DF96 1 -DF97 1 -DF98 1 -DF99 1 -DF9A 1 -DF9B 1 -DF9C 1 -DF9D 1 -DF9E 1 -DF9F 1 -DFA0 1 -DFA1 1 -DFA2 1 -DFA3 1 -DFA4 1 -DFA5 1 -DFA6 1 -DFA7 1 -DFA8 1 -DFA9 1 -DFAA 1 -DFAB 1 -DFAC 1 -DFAD 1 -DFAE 1 -DFAF 1 -DFB0 1 -DFB1 1 -DFB2 1 -DFB3 1 -DFB4 1 -DFB5 1 -DFB6 1 -DFB7 1 -DFB8 1 -DFB9 1 -DFBA 1 -DFBB 1 -DFBC 1 -DFBD 1 -DFBE 1 -DFBF 1 -E4B880 1 -E4B881 1 -E4B882 1 -E4B883 1 -E4B884 1 -E4B885 1 -E4B886 1 -E4B887 1 -E4B888 1 -E4B889 1 -E4B88A 1 -E4B88B 1 -E4B88C 1 -E4B88D 1 -E4B88E 1 -E4B88F 1 -E4B890 1 -E4B891 1 -E4B892 1 -E4B893 1 -E4B894 1 -E4B895 1 -E4B896 1 -E4B897 1 -E4B898 1 -E4B899 1 -E4B89A 1 -E4B89B 1 -E4B89C 1 -E4B89D 1 -E4B89E 1 -E4B89F 1 -E4B8A0 1 -E4B8A1 1 -E4B8A2 1 -E4B8A3 1 -E4B8A4 1 -E4B8A5 1 -E4B8A6 1 -E4B8A7 1 -E4B8A8 1 -E4B8A9 1 -E4B8AA 1 -E4B8AB 1 -E4B8AC 1 -E4B8AD 1 -E4B8AE 1 -E4B8AF 1 -E4B8B0 1 -E4B8B1 1 -E4B8B2 1 -E4B8B3 1 -E4B8B4 1 -E4B8B5 1 -E4B8B6 1 -E4B8B7 1 -E4B8B8 1 -E4B8B9 1 -E4B8BA 1 -E4B8BB 1 -E4B8BC 1 -E4B8BD 1 -E4B8BE 1 -E4B8BF 1 -E4B980 1 -E4B981 1 -E4B982 1 -E4B983 1 -E4B984 1 -E4B985 1 -E4B986 1 -E4B987 1 -E4B988 1 -E4B989 1 -E4B98A 1 -E4B98B 1 -E4B98C 1 -E4B98D 1 -E4B98E 1 -E4B98F 1 -E4B990 1 -E4B991 1 -E4B992 1 -E4B993 1 -E4B994 1 -E4B995 1 -E4B996 1 -E4B997 1 -E4B998 1 -E4B999 1 -E4B99A 1 -E4B99B 1 -E4B99C 1 -E4B99D 1 -E4B99E 1 -E4B99F 1 -E4B9A0 1 -E4B9A1 1 -E4B9A2 1 -E4B9A3 1 -E4B9A4 1 -E4B9A5 1 -E4B9A6 1 -E4B9A7 1 -E4B9A8 1 -E4B9A9 1 -E4B9AA 1 -E4B9AB 1 -E4B9AC 1 -E4B9AD 1 -E4B9AE 1 -E4B9AF 1 -E4B9B0 1 -E4B9B1 1 -E4B9B2 1 -E4B9B3 1 -E4B9B4 1 -E4B9B5 1 -E4B9B6 1 -E4B9B7 1 -E4B9B8 1 -E4B9B9 1 -E4B9BA 1 -E4B9BB 1 -E4B9BC 1 -E4B9BD 1 -E4B9BE 1 -E4B9BF 1 -E4BA80 1 -E4BA81 1 -E4BA82 1 -E4BA83 1 -E4BA84 1 -E4BA85 1 -E4BA86 1 -E4BA87 1 -E4BA88 1 -E4BA89 1 -E4BA8A 1 -E4BA8B 1 -E4BA8C 1 -E4BA8D 1 -E4BA8E 1 -E4BA8F 1 -E4BA90 1 -E4BA91 1 -E4BA92 1 -E4BA93 1 -E4BA94 1 -E4BA95 1 -E4BA96 1 -E4BA97 1 -E4BA98 1 -E4BA99 1 -E4BA9A 1 -E4BA9B 1 -E4BA9C 1 -E4BA9D 1 -E4BA9E 1 -E4BA9F 1 -E4BAA0 1 -E4BAA1 1 -E4BAA2 1 -E4BAA3 1 -E4BAA4 1 -E4BAA5 1 -E4BAA6 1 -E4BAA7 1 -E4BAA8 1 -E4BAA9 1 -E4BAAA 1 -E4BAAB 1 -E4BAAC 1 -E4BAAD 1 -E4BAAE 1 -E4BAAF 1 -E4BAB0 1 -E4BAB1 1 -E4BAB2 1 -E4BAB3 1 -E4BAB4 1 -E4BAB5 1 -E4BAB6 1 -E4BAB7 1 -E4BAB8 1 -E4BAB9 1 -E4BABA 1 -E4BABB 1 -E4BABC 1 -E4BABD 1 -E4BABE 1 -E4BABF 1 -E4BB80 1 -E4BB81 1 -E4BB82 1 -E4BB83 1 -E4BB84 1 -E4BB85 1 -E4BB86 1 -E4BB87 1 -E4BB88 1 -E4BB89 1 -E4BB8A 1 -E4BB8B 1 -E4BB8C 1 -E4BB8D 1 -E4BB8E 1 -E4BB8F 1 -E4BB90 1 -E4BB91 1 -E4BB92 1 -E4BB93 1 -E4BB94 1 -E4BB95 1 -E4BB96 1 -E4BB97 1 -E4BB98 1 -E4BB99 1 -E4BB9A 1 -E4BB9B 1 -E4BB9C 1 -E4BB9D 1 -E4BB9E 1 -E4BB9F 1 -E4BBA0 1 -E4BBA1 1 -E4BBA2 1 -E4BBA3 1 -E4BBA4 1 -E4BBA5 1 -E4BBA6 1 -E4BBA7 1 -E4BBA8 1 -E4BBA9 1 -E4BBAA 1 -E4BBAB 1 -E4BBAC 1 -E4BBAD 1 -E4BBAE 1 -E4BBAF 1 -E4BBB0 1 -E4BBB1 1 -E4BBB2 1 -E4BBB3 1 -E4BBB4 1 -E4BBB5 1 -E4BBB6 1 -E4BBB7 1 -E4BBB8 1 -E4BBB9 1 -E4BBBA 1 -E4BBBB 1 -E4BBBC 1 -E4BBBD 1 -E4BBBE 1 -E4BBBF 1 -E4BC80 1 -E4BC81 1 -E4BC82 1 -E4BC83 1 -E4BC84 1 -E4BC85 1 -E4BC86 1 -E4BC87 1 -E4BC88 1 -E4BC89 1 -E4BC8A 1 -E4BC8B 1 -E4BC8C 1 -E4BC8D 1 -E4BC8E 1 -E4BC8F 1 -E4BC90 1 -E4BC91 1 -E4BC92 1 -E4BC93 1 -E4BC94 1 -E4BC95 1 -E4BC96 1 -E4BC97 1 -E4BC98 1 -E4BC99 1 -E4BC9A 1 -E4BC9B 1 -E4BC9C 1 -E4BC9D 1 -E4BC9E 1 -E4BC9F 1 -E4BCA0 1 -E4BCA1 1 -E4BCA2 1 -E4BCA3 1 -E4BCA4 1 -E4BCA5 1 -E4BCA6 1 -E4BCA7 1 -E4BCA8 1 -E4BCA9 1 -E4BCAA 1 -E4BCAB 1 -E4BCAC 1 -E4BCAD 1 -E4BCAE 1 -E4BCAF 1 -E4BCB0 1 -E4BCB1 1 -E4BCB2 1 -E4BCB3 1 -E4BCB4 1 -E4BCB5 1 -E4BCB6 1 -E4BCB7 1 -E4BCB8 1 -E4BCB9 1 -E4BCBA 1 -E4BCBB 1 -E4BCBC 1 -E4BCBD 1 -E4BCBE 1 -E4BCBF 1 -E4BD80 1 -E4BD81 1 -E4BD82 1 -E4BD83 1 -E4BD84 1 -E4BD85 1 -E4BD86 1 -E4BD87 1 -E4BD88 1 -E4BD89 1 -E4BD8A 1 -E4BD8B 1 -E4BD8C 1 -E4BD8D 1 -E4BD8E 1 -E4BD8F 1 -E4BD90 1 -E4BD91 1 -E4BD92 1 -E4BD93 1 -E4BD94 1 -E4BD95 1 -E4BD96 1 -E4BD97 1 -E4BD98 1 -E4BD99 1 -E4BD9A 1 -E4BD9B 1 -E4BD9C 1 -E4BD9D 1 -E4BD9E 1 -E4BD9F 1 -E4BDA0 1 -E4BDA1 1 -E4BDA2 1 -E4BDA3 1 -E4BDA4 1 -E4BDA5 1 -E4BDA6 1 -E4BDA7 1 -E4BDA8 1 -E4BDA9 1 -E4BDAA 1 -E4BDAB 1 -E4BDAC 1 -E4BDAD 1 -E4BDAE 1 -E4BDAF 1 -E4BDB0 1 -E4BDB1 1 -E4BDB2 1 -E4BDB3 1 -E4BDB4 1 -E4BDB5 1 -E4BDB6 1 -E4BDB7 1 -E4BDB8 1 -E4BDB9 1 -E4BDBA 1 -E4BDBB 1 -E4BDBC 1 -E4BDBD 1 -E4BDBE 1 -E4BDBF 1 -E4BE80 1 -E4BE81 1 -E4BE82 1 -E4BE83 1 -E4BE84 1 -E4BE85 1 -E4BE86 1 -E4BE87 1 -E4BE88 1 -E4BE89 1 -E4BE8A 1 -E4BE8B 1 -E4BE8C 1 -E4BE8D 1 -E4BE8E 1 -E4BE8F 1 -E4BE90 1 -E4BE91 1 -E4BE92 1 -E4BE93 1 -E4BE94 1 -E4BE95 1 -E4BE96 1 -E4BE97 1 -E4BE98 1 -E4BE99 1 -E4BE9A 1 -E4BE9B 1 -E4BE9C 1 -E4BE9D 1 -E4BE9E 1 -E4BE9F 1 -E4BEA0 1 -E4BEA1 1 -E4BEA2 1 -E4BEA3 1 -E4BEA4 1 -E4BEA5 1 -E4BEA6 1 -E4BEA7 1 -E4BEA8 1 -E4BEA9 1 -E4BEAA 1 -E4BEAB 1 -E4BEAC 1 -E4BEAD 1 -E4BEAE 1 -E4BEAF 1 -E4BEB0 1 -E4BEB1 1 -E4BEB2 1 -E4BEB3 1 -E4BEB4 1 -E4BEB5 1 -E4BEB6 1 -E4BEB7 1 -E4BEB8 1 -E4BEB9 1 -E4BEBA 1 -E4BEBB 1 -E4BEBC 1 -E4BEBD 1 -E4BEBE 1 -E4BEBF 1 -E4BF80 1 -E4BF81 1 -E4BF82 1 -E4BF83 1 -E4BF84 1 -E4BF85 1 -E4BF86 1 -E4BF87 1 -E4BF88 1 -E4BF89 1 -E4BF8A 1 -E4BF8B 1 -E4BF8C 1 -E4BF8D 1 -E4BF8E 1 -E4BF8F 1 -E4BF90 1 -E4BF91 1 -E4BF92 1 -E4BF93 1 -E4BF94 1 -E4BF95 1 -E4BF96 1 -E4BF97 1 -E4BF98 1 -E4BF99 1 -E4BF9A 1 -E4BF9B 1 -E4BF9C 1 -E4BF9D 1 -E4BF9E 1 -E4BF9F 1 -E4BFA0 1 -E4BFA1 1 -E4BFA2 1 -E4BFA3 1 -E4BFA4 1 -E4BFA5 1 -E4BFA6 1 -E4BFA7 1 -E4BFA8 1 -E4BFA9 1 -E4BFAA 1 -E4BFAB 1 -E4BFAC 1 -E4BFAD 1 -E4BFAE 1 -E4BFAF 1 -E4BFB0 1 -E4BFB1 1 -E4BFB2 1 -E4BFB3 1 -E4BFB4 1 -E4BFB5 1 -E4BFB6 1 -E4BFB7 1 -E4BFB8 1 -E4BFB9 1 -E4BFBA 1 -E4BFBB 1 -E4BFBC 1 -E4BFBD 1 -E4BFBE 1 -E4BFBF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_czech_ci) ENGINE=NDB CHARACTER SET utf8 COLLATE utf8_czech_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_czech_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -C285 1 -7F 1 -C280 1 -C281 1 -C282 1 -C283 1 -C284 1 -C286 1 -C287 1 -C288 1 -C289 1 -C28A 1 -C28B 1 -C28C 1 -C28D 1 -C28E 1 -C28F 1 -C290 1 -C291 1 -C292 1 -C293 1 -C294 1 -C295 1 -C296 1 -C297 1 -C298 1 -C299 1 -C29A 1 -C29B 1 -C29C 1 -C29D 1 -C29E 1 -C29F 1 -C2A0 1 -CC80 1 -CC81 1 -CC82 1 -CC83 1 -CC84 1 -CC85 1 -CC86 1 -CC87 1 -CC88 1 -CC89 1 -CC8A 1 -CC8B 1 -CC8C 1 -CC8D 1 -CC8E 1 -CC8F 1 -CC90 1 -CC91 1 -CC92 1 -CC93 1 -CC94 1 -CC95 1 -CC96 1 -CC97 1 -CC98 1 -CC99 1 -CC9A 1 -CC9B 1 -CC9C 1 -CC9D 1 -CC9E 1 -CC9F 1 -CCA0 1 -CCA1 1 -CCA2 1 -CCA3 1 -CCA4 1 -CCA5 1 -CCA6 1 -CCA7 1 -CCA8 1 -CCA9 1 -CCAA 1 -CCAB 1 -CCAC 1 -CCAD 1 -CCAE 1 -CCAF 1 -CCB0 1 -CCB1 1 -CCB2 1 -CCB3 1 -CCB4 1 -CCB5 1 -CCB6 1 -CCB7 1 -CCB8 1 -CCB9 1 -CCBA 1 -CCBB 1 -CCBC 1 -CCBD 1 -CCBE 1 -CCBF 1 -CD80 1 -CD81 1 -CD82 1 -CD83 1 -CD84 1 -CD85 1 -CD86 1 -CD87 1 -CD88 1 -CD89 1 -CD8A 1 -CD8B 1 -CD8C 1 -CD8D 1 -CD8E 1 -CD8F 1 -CD90 1 -CD91 1 -CD92 1 -CD93 1 -CD94 1 -CD95 1 -CD96 1 -CD97 1 -CD9D 1 -CD9E 1 -CD9F 1 -CDA0 1 -CDA1 1 -CDA2 1 -D283 1 -D284 1 -D285 1 -D286 1 -D288 1 -D289 1 -D691 1 -D692 1 -D693 1 -D694 1 -D695 1 -D696 1 -D697 1 -D698 1 -D699 1 -D69A 1 -D69B 1 -D69C 1 -D69D 1 -D69E 1 -D69F 1 -D6A0 1 -D6A1 1 -D6A3 1 -D6A4 1 -D6A5 1 -D6A6 1 -D6A7 1 -D6A8 1 -D6A9 1 -D6AA 1 -D6AB 1 -D6AC 1 -D6AD 1 -D6AE 1 -D6AF 1 -D6B0 1 -D6B1 1 -D6B2 1 -D6B3 1 -D6B4 1 -D6B5 1 -D6B6 1 -D6B7 1 -D6B8 1 -D6B9 1 -D6BB 1 -D6BC 1 -D6BD 1 -D6BF 1 -D781 1 -D782 1 -D784 1 -D880 1 -D881 1 -D882 1 -D883 1 -D890 1 -D891 1 -D892 1 -D893 1 -D894 1 -D895 1 -D98B 1 -D98C 1 -D98D 1 -D98E 1 -D98F 1 -D990 1 -D991 1 -D992 1 -D993 1 -D994 1 -D995 1 -D996 1 -D997 1 -D998 1 -D9B0 1 -DB96 1 -DB97 1 -DB98 1 -DB99 1 -DB9A 1 -DB9B 1 -DB9C 1 -DB9D 1 -DB9E 1 -DB9F 1 -DBA0 1 -DBA1 1 -DBA2 1 -DBA3 1 -DBA4 1 -DBA7 1 -DBA8 1 -DBAA 1 -DBAB 1 -DBAC 1 -DBAD 1 -DC8F 1 -DC91 1 -DCB0 1 -DCB1 1 -DCB2 1 -DCB3 1 -DCB4 1 -DCB5 1 -DCB6 1 -DCB7 1 -DCB8 1 -DCB9 1 -DCBA 1 -DCBB 1 -DCBC 1 -DCBD 1 -DCBE 1 -DCBF 1 -DD80 1 -DD81 1 -DD82 1 -DD83 1 -DD84 1 -DD85 1 -DD86 1 -DD87 1 -DD88 1 -DD89 1 -DD8A 1 -D980 1 -60 1 -C2B4 1 -CE84 1 -CB9C 1 -5E 1 -C2AF 1 -CB98 1 -CB99 1 -C2A8 1 -CE85 1 -CB9A 1 -CB9D 1 -C2B8 1 -CB9B 1 -5F 1 -C2AD 1 -2D 1 -D68A 1 -2C 1 -D59D 1 -D88C 1 -D88D 1 -D9AB 1 -D9AC 1 -3B 1 -CDBE 1 -D89B 1 -3A 1 -D689 1 -DC83 1 -DC84 1 -DC85 1 -DC86 1 -DC87 1 -DC88 1 -21 1 -C2A1 1 -D59C 1 -3F 1 -C2BF 1 -D59E 1 -D89F 1 -DC89 1 -2E 1 -DB94 1 -DC81 1 -DC82 1 -C2B7 1 -CE87 1 -DC80 1 -27 1 -22 1 -C2AB 1 -C2BB 1 -28 1 -29 1 -5B 1 -7B 1 -7D 1 -C2A7 1 -C2B6 1 -C2A9 1 -C2AE 1 -40 1 -2A 1 -D9AD 1 -2F 1 -26 1 -23 1 -25 1 -D9AA 1 -D59A 1 -D59B 1 -D59F 1 -D6BE 1 -D780 1 -D783 1 -D7B3 1 -D7B4 1 -DC8A 1 -DC8B 1 -DC8C 1 -DC8D 1 -CAB9 1 -CDB4 1 -CDB5 1 -CABA 1 -CB82 1 -CB83 1 -CB84 1 -CB85 1 -CB86 1 -CB87 1 -CB88 1 -CB89 1 -CB8A 1 -CB8B 1 -CB8C 1 -CB8D 1 -CB8E 1 -CB8F 1 -CB92 1 -CB93 1 -CB94 1 -CB95 1 -CB96 1 -CB97 1 -CB9E 1 -CB9F 1 -CBA5 1 -CBA6 1 -CBA7 1 -CBA8 1 -CBA9 1 -CBAA 1 -CBAB 1 -CBAC 1 -CBAD 1 -CBAF 1 -CBB0 1 -CBB1 1 -CBB2 1 -CBB3 1 -CBB4 1 -CBB5 1 -CBB6 1 -CBB7 1 -CBB8 1 -CBB9 1 -CBBA 1 -CBBB 1 -CBBC 1 -CBBD 1 -CBBE 1 -CBBF 1 -C2B0 1 -D282 1 -D88E 1 -D88F 1 -DBA9 1 -CFB6 1 -2B 1 -C2B1 1 -C3B7 1 -C397 1 -3C 1 -3D 1 -3E 1 -C2AC 1 -7C 1 -C2A6 1 -7E 1 -CB90 1 -CB91 1 -C2A4 1 -C2A2 1 -24 1 -C2A3 1 -C2A5 1 -30 1 -D9A0 1 -DBB0 1 -31 1 -C2B9 1 -D9A1 1 -DBB1 1 -C2BD 1 -C2BC 1 -32 1 -C2B2 1 -D9A2 1 -DBB2 1 -33 1 -C2B3 1 -D9A3 1 -DBB3 1 -C2BE 1 -34 1 -D9A4 1 -DBB4 1 -35 1 -D9A5 1 -DBB5 1 -36 1 -D9A6 1 -DBB6 1 -37 1 -D9A7 1 -DBB7 1 -38 1 -D9A8 1 -DBB8 1 -39 1 -D9A9 1 -DBB9 1 -41 1 -61 1 -C2AA 1 -C380 1 -C381 1 -C382 1 -C383 1 -C384 1 -C385 1 -C3A0 1 -C3A1 1 -C3A2 1 -C3A3 1 -C3A4 1 -C3A5 1 -C480 1 -C481 1 -C482 1 -C483 1 -C484 1 -C485 1 -C78D 1 -C78E 1 -C79E 1 -C79F 1 -C7A0 1 -C7A1 1 -C7BA 1 -C7BB 1 -C880 1 -C881 1 -C882 1 -C883 1 -C8A6 1 -C8A7 1 -CDA3 1 -C386 1 -C3A6 1 -C7A2 1 -C7A3 1 -C7BC 1 -C7BD 1 -C990 1 -C991 1 -C992 1 -42 1 -62 1 -CA99 1 -C680 1 -C681 1 -C993 1 -C682 1 -C683 1 -43 1 -63 1 -C387 1 -C3A7 1 -C486 1 -C487 1 -C488 1 -C489 1 -C48A 1 -C48B 1 -CDA8 1 -C48C 1 -C48D 1 -C687 1 -C688 1 -C995 1 -44 1 -64 1 -C48E 1 -C48F 1 -CDA9 1 -C784 1 -C785 1 -C786 1 -C7B1 1 -C7B2 1 -C7B3 1 -CAA3 1 -CAA5 1 -CAA4 1 -C490 1 -C491 1 -C689 1 -C996 1 -C68A 1 -C997 1 -C68B 1 -C68C 1 -C8A1 1 -C390 1 -C3B0 1 -45 1 -65 1 -C388 1 -C389 1 -C38A 1 -C38B 1 -C3A8 1 -C3A9 1 -C3AA 1 -C3AB 1 -C492 1 -C493 1 -C494 1 -C495 1 -C496 1 -C497 1 -C498 1 -C499 1 -C49A 1 -C49B 1 -C884 1 -C885 1 -C886 1 -C887 1 -C8A8 1 -C8A9 1 -CDA4 1 -C68E 1 -C79D 1 -C68F 1 -C999 1 -C690 1 -C99B 1 -C998 1 -C99A 1 -C99C 1 -C99D 1 -C99E 1 -CA9A 1 -C9A4 1 -46 1 -66 1 -CAA9 1 -C691 1 -C692 1 -47 1 -67 1 -C49C 1 -C49D 1 -C49E 1 -C49F 1 -C4A0 1 -C4A1 1 -C4A2 1 -C4A3 1 -C7A6 1 -C7A7 1 -C7B4 1 -C7B5 1 -C9A1 1 -C9A2 1 -C7A4 1 -C7A5 1 -C693 1 -C9A0 1 -CA9B 1 -C694 1 -C9A3 1 -CBA0 1 -C6A2 1 -C6A3 1 -48 1 -68 1 -C4A4 1 -C4A5 1 -C89E 1 -C89F 1 -CAB0 1 -CDAA 1 -CA9C 1 -C695 1 -C7B6 1 -C4A6 1 -C4A7 1 -C9A6 1 -CAB1 1 -C9A7 1 -CABB 1 -CABD 1 -49 1 -69 1 -C38C 1 -C38D 1 -C38E 1 -C38F 1 -C3AC 1 -C3AD 1 -C3AE 1 -C3AF 1 -C4A8 1 -C4A9 1 -C4AA 1 -C4AB 1 -C4AC 1 -C4AD 1 -C4AE 1 -C4AF 1 -C4B0 1 -C78F 1 -C790 1 -C888 1 -C889 1 -C88A 1 -C88B 1 -CDA5 1 -C4B2 1 -C4B3 1 -C4B1 1 -C9AA 1 -C697 1 -C9A8 1 -C696 1 -C9A9 1 -4A 1 -6A 1 -C4B4 1 -C4B5 1 -C7B0 1 -CAB2 1 -CA9D 1 -C99F 1 -CA84 1 -4B 1 -6B 1 -C4B6 1 -C4B7 1 -C7A8 1 -C7A9 1 -C698 1 -C699 1 -CA9E 1 -4C 1 -6C 1 -C4B9 1 -C4BA 1 -C4BB 1 -C4BC 1 -C4BD 1 -C4BE 1 -CBA1 1 -C4BF 1 -C580 1 -C787 1 -C788 1 -C789 1 -CAAA 1 -CAAB 1 -CA9F 1 -C581 1 -C582 1 -C69A 1 -C9AB 1 -C9AC 1 -C9AD 1 -C8B4 1 -C9AE 1 -C69B 1 -CA8E 1 -4D 1 -6D 1 -CDAB 1 -C9B1 1 -4E 1 -6E 1 -C391 1 -C3B1 1 -C583 1 -C584 1 -C585 1 -C586 1 -C587 1 -C588 1 -C7B8 1 -C7B9 1 -C78A 1 -C78B 1 -C78C 1 -C9B4 1 -C69D 1 -C9B2 1 -C69E 1 -C8A0 1 -C9B3 1 -C8B5 1 -C58A 1 -C58B 1 -4F 1 -6F 1 -C2BA 1 -C392 1 -C393 1 -C394 1 -C395 1 -C396 1 -C3B2 1 -C3B3 1 -C3B4 1 -C3B5 1 -C3B6 1 -C58C 1 -C58D 1 -C58E 1 -C58F 1 -C590 1 -C591 1 -C6A0 1 -C6A1 1 -C791 1 -C792 1 -C7AA 1 -C7AB 1 -C7AC 1 -C7AD 1 -C88C 1 -C88D 1 -C88E 1 -C88F 1 -C8AA 1 -C8AB 1 -C8AC 1 -C8AD 1 -C8AE 1 -C8AF 1 -C8B0 1 -C8B1 1 -CDA6 1 -C592 1 -C593 1 -C9B6 1 -C398 1 -C3B8 1 -C7BE 1 -C7BF 1 -C686 1 -C994 1 -C69F 1 -C9B5 1 -C9B7 1 -C8A2 1 -C8A3 1 -50 1 -70 1 -C6A4 1 -C6A5 1 -C9B8 1 -51 1 -71 1 -CAA0 1 -C4B8 1 -52 1 -72 1 -C594 1 -C595 1 -C596 1 -C597 1 -C890 1 -C891 1 -C892 1 -C893 1 -CAB3 1 -CDAC 1 -C598 1 -C599 1 -C6A6 1 -CA80 1 -C9B9 1 -CAB4 1 -C9BA 1 -C9BB 1 -CAB5 1 -C9BC 1 -C9BD 1 -C9BE 1 -C9BF 1 -CA81 1 -CAB6 1 -53 1 -73 1 -C59A 1 -C59B 1 -C59C 1 -C59D 1 -C59E 1 -C59F 1 -C5BF 1 -C898 1 -C899 1 -CBA2 1 -C39F 1 -C5A0 1 -C5A1 1 -CA82 1 -C6A9 1 -CA83 1 -C6AA 1 -CA85 1 -CA86 1 -54 1 -74 1 -C5A2 1 -C5A3 1 -C5A4 1 -C5A5 1 -C89A 1 -C89B 1 -CDAD 1 -CAA8 1 -C6BE 1 -CAA6 1 -CAA7 1 -C5A6 1 -C5A7 1 -C6AB 1 -C6AC 1 -C6AD 1 -C6AE 1 -CA88 1 -C8B6 1 -CA87 1 -55 1 -75 1 -C399 1 -C39A 1 -C39B 1 -C39C 1 -C3B9 1 -C3BA 1 -C3BB 1 -C3BC 1 -C5A8 1 -C5A9 1 -C5AA 1 -C5AB 1 -C5AC 1 -C5AD 1 -C5AE 1 -C5AF 1 -C5B0 1 -C5B1 1 -C5B2 1 -C5B3 1 -C6AF 1 -C6B0 1 -C793 1 -C794 1 -C795 1 -C796 1 -C797 1 -C798 1 -C799 1 -C79A 1 -C79B 1 -C79C 1 -C894 1 -C895 1 -C896 1 -C897 1 -CDA7 1 -CA89 1 -C9A5 1 -CAAE 1 -CAAF 1 -C69C 1 -C9AF 1 -C9B0 1 -C6B1 1 -CA8A 1 -56 1 -76 1 -CDAE 1 -C6B2 1 -CA8B 1 -CA8C 1 -57 1 -77 1 -C5B4 1 -C5B5 1 -CAB7 1 -CA8D 1 -58 1 -78 1 -CBA3 1 -CDAF 1 -59 1 -79 1 -C39D 1 -C3BD 1 -C3BF 1 -C5B6 1 -C5B7 1 -C5B8 1 -C8B2 1 -C8B3 1 -CAB8 1 -CA8F 1 -C6B3 1 -C6B4 1 -5A 1 -7A 1 -C5B9 1 -C5BA 1 -C5BB 1 -C5BC 1 -C68D 1 -C5BD 1 -C5BE 1 -C6B5 1 -C6B6 1 -C8A4 1 -C8A5 1 -CA90 1 -CA91 1 -C6B7 1 -C7AE 1 -C7AF 1 -CA92 1 -C6B8 1 -C6B9 1 -C6BA 1 -CA93 1 -C89C 1 -C89D 1 -C39E 1 -C3BE 1 -C6BF 1 -C7B7 1 -C6BB 1 -C6A7 1 -C6A8 1 -C6BC 1 -C6BD 1 -C684 1 -C685 1 -CA94 1 -CB80 1 -CABC 1 -C589 1 -CBAE 1 -CABE 1 -CA95 1 -CBA4 1 -CABF 1 -CB81 1 -CAA1 1 -CAA2 1 -CA96 1 -C780 1 -C781 1 -C782 1 -C783 1 -CA97 1 -CA98 1 -CAAC 1 -CAAD 1 -CE86 1 -CE91 1 -CEAC 1 -CEB1 1 -CE92 1 -CEB2 1 -CF90 1 -CE93 1 -CEB3 1 -CE94 1 -CEB4 1 -CE88 1 -CE95 1 -CEAD 1 -CEB5 1 -CFB5 1 -CF9C 1 -CF9D 1 -CF9A 1 -CF9B 1 -CE96 1 -CEB6 1 -CE89 1 -CE97 1 -CEAE 1 -CEB7 1 -CE98 1 -CEB8 1 -CF91 1 -CFB4 1 -CDBA 1 -CE8A 1 -CE90 1 -CE99 1 -CEAA 1 -CEAF 1 -CEB9 1 -CF8A 1 -CFB3 1 -CE9A 1 -CEBA 1 -CFB0 1 -CF97 1 -CE9B 1 -CEBB 1 -C2B5 1 -CE9C 1 -CEBC 1 -CE9D 1 -CEBD 1 -CE9E 1 -CEBE 1 -CE8C 1 -CE9F 1 -CEBF 1 -CF8C 1 -CEA0 1 -CF80 1 -CF96 1 -CF9E 1 -CF9F 1 -CF98 1 -CF99 1 -CEA1 1 -CF81 1 -CFB1 1 -CEA3 1 -CF82 1 -CF83 1 -CFB2 1 -CFB9 1 -CEA4 1 -CF84 1 -CE8E 1 -CEA5 1 -CEAB 1 -CEB0 1 -CF85 1 -CF8B 1 -CF8D 1 -CF92 1 -CF93 1 -CF94 1 -CEA6 1 -CF86 1 -CF95 1 -CEA7 1 -CF87 1 -CEA8 1 -CF88 1 -CE8F 1 -CEA9 1 -CF89 1 -CF8E 1 -CFA0 1 -CFA1 1 -CFB7 1 -CFB8 1 -CFBA 1 -CFBB 1 -CFA2 1 -CFA3 1 -CFA4 1 -CFA5 1 -CFA6 1 -CFA7 1 -CFA8 1 -CFA9 1 -CFAA 1 -CFAB 1 -CFAC 1 -CFAD 1 -CFAE 1 -CFAF 1 -D090 1 -D0B0 1 -D390 1 -D391 1 -D392 1 -D393 1 -D398 1 -D399 1 -D39A 1 -D39B 1 -D394 1 -D395 1 -D091 1 -D0B1 1 -D092 1 -D0B2 1 -D093 1 -D0B3 1 -D290 1 -D291 1 -D292 1 -D293 1 -D294 1 -D295 1 -D094 1 -D0B4 1 -D480 1 -D481 1 -D082 1 -D192 1 -D482 1 -D483 1 -D083 1 -D193 1 -D298 1 -D299 1 -D080 1 -D081 1 -D095 1 -D0B5 1 -D190 1 -D191 1 -D396 1 -D397 1 -D084 1 -D194 1 -D096 1 -D0B6 1 -D381 1 -D382 1 -D39C 1 -D39D 1 -D296 1 -D297 1 -D097 1 -D0B7 1 -D484 1 -D485 1 -D39E 1 -D39F 1 -D085 1 -D195 1 -D3A0 1 -D3A1 1 -D486 1 -D487 1 -D08D 1 -D098 1 -D0B8 1 -D19D 1 -D3A2 1 -D3A3 1 -D28A 1 -D28B 1 -D3A4 1 -D3A5 1 -D086 1 -D196 1 -D087 1 -D197 1 -D099 1 -D0B9 1 -D088 1 -D198 1 -D09A 1 -D0BA 1 -D29A 1 -D29B 1 -D383 1 -D384 1 -D2A0 1 -D2A1 1 -D29E 1 -D29F 1 -D29C 1 -D29D 1 -D09B 1 -D0BB 1 -D385 1 -D386 1 -D089 1 -D199 1 -D488 1 -D489 1 -D09C 1 -D0BC 1 -D38D 1 -D38E 1 -D09D 1 -D0BD 1 -D389 1 -D38A 1 -D2A2 1 -D2A3 1 -D387 1 -D388 1 -D2A4 1 -D2A5 1 -D08A 1 -D19A 1 -D48A 1 -D48B 1 -D09E 1 -D0BE 1 -D3A6 1 -D3A7 1 -D3A8 1 -D3A9 1 -D3AA 1 -D3AB 1 -D09F 1 -D0BF 1 -D2A6 1 -D2A7 1 -D280 1 -D281 1 -D0A0 1 -D180 1 -D28E 1 -D28F 1 -D0A1 1 -D181 1 -D48C 1 -D48D 1 -D2AA 1 -D2AB 1 -D0A2 1 -D182 1 -D48E 1 -D48F 1 -D2AC 1 -D2AD 1 -D08B 1 -D19B 1 -D08C 1 -D19C 1 -D0A3 1 -D183 1 -D3AE 1 -D3AF 1 -D08E 1 -D19E 1 -D3B0 1 -D3B1 1 -D3B2 1 -D3B3 1 -D2AE 1 -D2AF 1 -D2B0 1 -D2B1 1 -D1B8 1 -D1B9 1 -D0A4 1 -D184 1 -D0A5 1 -D185 1 -D2B2 1 -D2B3 1 -D2BA 1 -D2BB 1 -D1A0 1 -D1A1 1 -D1BE 1 -D1BF 1 -D1BC 1 -D1BD 1 -D1BA 1 -D1BB 1 -D0A6 1 -D186 1 -D2B4 1 -D2B5 1 -D0A7 1 -D187 1 -D3B4 1 -D3B5 1 -D2B6 1 -D2B7 1 -D38B 1 -D38C 1 -D2B8 1 -D2B9 1 -D2BC 1 -D2BD 1 -D2BE 1 -D2BF 1 -D08F 1 -D19F 1 -D0A8 1 -D188 1 -D0A9 1 -D189 1 -D0AA 1 -D18A 1 -D0AB 1 -D18B 1 -D3B8 1 -D3B9 1 -D0AC 1 -D18C 1 -D28C 1 -D28D 1 -D1A2 1 -D1A3 1 -D0AD 1 -D18D 1 -D3AC 1 -D3AD 1 -D0AE 1 -D18E 1 -D0AF 1 -D18F 1 -D1A4 1 -D1A5 1 -D1A6 1 -D1A7 1 -D1AA 1 -D1AB 1 -D1A8 1 -D1A9 1 -D1AC 1 -D1AD 1 -D1AE 1 -D1AF 1 -D1B0 1 -D1B1 1 -D1B2 1 -D1B3 1 -D1B4 1 -D1B5 1 -D1B6 1 -D1B7 1 -D2A8 1 -D2A9 1 -D380 1 -D4B1 1 -D5A1 1 -D4B2 1 -D5A2 1 -D4B3 1 -D5A3 1 -D4B4 1 -D5A4 1 -D4B5 1 -D5A5 1 -D687 1 -D4B6 1 -D5A6 1 -D4B7 1 -D5A7 1 -D4B8 1 -D5A8 1 -D4B9 1 -D5A9 1 -D4BA 1 -D5AA 1 -D4BB 1 -D5AB 1 -D4BC 1 -D5AC 1 -D4BD 1 -D5AD 1 -D4BE 1 -D5AE 1 -D4BF 1 -D5AF 1 -D580 1 -D5B0 1 -D581 1 -D5B1 1 -D582 1 -D5B2 1 -D583 1 -D5B3 1 -D584 1 -D5B4 1 -D585 1 -D5B5 1 -D586 1 -D5B6 1 -D587 1 -D5B7 1 -D588 1 -D5B8 1 -D589 1 -D5B9 1 -D58A 1 -D5BA 1 -D58B 1 -D5BB 1 -D58C 1 -D5BC 1 -D58D 1 -D5BD 1 -D58E 1 -D5BE 1 -D58F 1 -D5BF 1 -D590 1 -D680 1 -D591 1 -D681 1 -D592 1 -D682 1 -D593 1 -D683 1 -D594 1 -D684 1 -D595 1 -D685 1 -D596 1 -D686 1 -D599 1 -D790 1 -D791 1 -D792 1 -D793 1 -D794 1 -D795 1 -D7B0 1 -D7B1 1 -D796 1 -D797 1 -D798 1 -D799 1 -D7B2 1 -D79A 1 -D79B 1 -D79C 1 -D79D 1 -D79E 1 -D79F 1 -D7A0 1 -D7A1 1 -D7A2 1 -D7A3 1 -D7A4 1 -D7A5 1 -D7A6 1 -D7A7 1 -D7A8 1 -D7A9 1 -D7AA 1 -D8A1 1 -D9B4 1 -DBBD 1 -D8A2 1 -D8A3 1 -D9B2 1 -D9B1 1 -D8A4 1 -D8A5 1 -D9B3 1 -D8A6 1 -D8A7 1 -D9B5 1 -D9AE 1 -D8A8 1 -D9BB 1 -D9BE 1 -DA80 1 -D8A9 1 -D8AA 1 -D8AB 1 -D9B9 1 -D9BA 1 -D9BC 1 -D9BD 1 -D9BF 1 -D8AC 1 -DA83 1 -DA84 1 -DA86 1 -DABF 1 -DA87 1 -D8AD 1 -D8AE 1 -DA81 1 -DA82 1 -DA85 1 -D8AF 1 -D8B0 1 -DA88 1 -DA89 1 -DA8A 1 -DA8B 1 -DA8C 1 -DA8D 1 -DA8E 1 -DA8F 1 -DA90 1 -DBAE 1 -D8B1 1 -D8B2 1 -DA91 1 -DA92 1 -DA93 1 -DA94 1 -DA95 1 -DA96 1 -DA97 1 -DA98 1 -DA99 1 -DBAF 1 -D8B3 1 -D8B4 1 -DA9A 1 -DA9B 1 -DA9C 1 -DBBA 1 -D8B5 1 -D8B6 1 -DA9D 1 -DA9E 1 -DBBB 1 -D8B7 1 -D8B8 1 -DA9F 1 -D8B9 1 -D8BA 1 -DAA0 1 -DBBC 1 -D981 1 -DAA1 1 -DAA2 1 -DAA3 1 -DAA4 1 -DAA5 1 -DAA6 1 -D9AF 1 -D982 1 -DAA7 1 -DAA8 1 -D983 1 -DAA9 1 -DAAA 1 -DAAB 1 -DAAC 1 -DAAD 1 -DAAE 1 -DAAF 1 -DAB0 1 -DAB1 1 -DAB2 1 -DAB3 1 -DAB4 1 -D984 1 -DAB5 1 -DAB6 1 -DAB7 1 -DAB8 1 -D985 1 -DBBE 1 -D986 1 -DABA 1 -DABB 1 -DABC 1 -DABD 1 -DAB9 1 -D987 1 -DABE 1 -DB81 1 -DB82 1 -DB83 1 -DBBF 1 -DB80 1 -DB95 1 -D988 1 -DBA5 1 -D9B6 1 -DB84 1 -DB85 1 -DB86 1 -DB87 1 -D9B7 1 -DB88 1 -DB89 1 -DB8A 1 -DB8B 1 -DB8F 1 -D989 1 -D98A 1 -DBA6 1 -D9B8 1 -DB8C 1 -DB8D 1 -DB8E 1 -DB90 1 -DB91 1 -DB92 1 -DB93 1 -DC90 1 -DC92 1 -DCAD 1 -DC93 1 -DC94 1 -DCAE 1 -DC96 1 -DC95 1 -DCAF 1 -DC97 1 -DC98 1 -DC99 1 -DD8D 1 -DC9A 1 -DC9B 1 -DC9C 1 -DC9D 1 -DC9E 1 -DC9F 1 -DD8E 1 -DCA0 1 -DCA1 1 -DCA2 1 -DCA3 1 -DCA4 1 -DCA5 1 -DCA6 1 -DCA7 1 -DD8F 1 -DCA8 1 -DCA9 1 -DCAA 1 -DCAB 1 -DCAC 1 -DE80 1 -DE99 1 -DE9A 1 -DE81 1 -DE82 1 -DE83 1 -DE9C 1 -DE84 1 -DE85 1 -DE86 1 -DE87 1 -DEA2 1 -DEA3 1 -DE88 1 -DEA5 1 -DE89 1 -DE8A 1 -DE8B 1 -DE9B 1 -DE8C 1 -DE98 1 -DEA0 1 -DEA1 1 -DE8D 1 -DE8E 1 -DEA4 1 -DE8F 1 -DE90 1 -DE9D 1 -DE9E 1 -DE9F 1 -DE91 1 -DE92 1 -DE93 1 -DE94 1 -DE95 1 -DE96 1 -DE97 1 -DEB1 1 -DEA6 1 -DEA7 1 -DEA8 1 -DEA9 1 -DEAA 1 -DEAB 1 -DEAC 1 -DEAD 1 -DEAE 1 -DEAF 1 -DEB0 1 -E4B880 1 -E4B881 1 -E4B882 1 -E4B883 1 -E4B884 1 -E4B885 1 -E4B886 1 -E4B887 1 -E4B888 1 -E4B889 1 -E4B88A 1 -E4B88B 1 -E4B88C 1 -E4B88D 1 -E4B88E 1 -E4B88F 1 -E4B890 1 -E4B891 1 -E4B892 1 -E4B893 1 -E4B894 1 -E4B895 1 -E4B896 1 -E4B897 1 -E4B898 1 -E4B899 1 -E4B89A 1 -E4B89B 1 -E4B89C 1 -E4B89D 1 -E4B89E 1 -E4B89F 1 -E4B8A0 1 -E4B8A1 1 -E4B8A2 1 -E4B8A3 1 -E4B8A4 1 -E4B8A5 1 -E4B8A6 1 -E4B8A7 1 -E4B8A8 1 -E4B8A9 1 -E4B8AA 1 -E4B8AB 1 -E4B8AC 1 -E4B8AD 1 -E4B8AE 1 -E4B8AF 1 -E4B8B0 1 -E4B8B1 1 -E4B8B2 1 -E4B8B3 1 -E4B8B4 1 -E4B8B5 1 -E4B8B6 1 -E4B8B7 1 -E4B8B8 1 -E4B8B9 1 -E4B8BA 1 -E4B8BB 1 -E4B8BC 1 -E4B8BD 1 -E4B8BE 1 -E4B8BF 1 -E4B980 1 -E4B981 1 -E4B982 1 -E4B983 1 -E4B984 1 -E4B985 1 -E4B986 1 -E4B987 1 -E4B988 1 -E4B989 1 -E4B98A 1 -E4B98B 1 -E4B98C 1 -E4B98D 1 -E4B98E 1 -E4B98F 1 -E4B990 1 -E4B991 1 -E4B992 1 -E4B993 1 -E4B994 1 -E4B995 1 -E4B996 1 -E4B997 1 -E4B998 1 -E4B999 1 -E4B99A 1 -E4B99B 1 -E4B99C 1 -E4B99D 1 -E4B99E 1 -E4B99F 1 -E4B9A0 1 -E4B9A1 1 -E4B9A2 1 -E4B9A3 1 -E4B9A4 1 -E4B9A5 1 -E4B9A6 1 -E4B9A7 1 -E4B9A8 1 -E4B9A9 1 -E4B9AA 1 -E4B9AB 1 -E4B9AC 1 -E4B9AD 1 -E4B9AE 1 -E4B9AF 1 -E4B9B0 1 -E4B9B1 1 -E4B9B2 1 -E4B9B3 1 -E4B9B4 1 -E4B9B5 1 -E4B9B6 1 -E4B9B7 1 -E4B9B8 1 -E4B9B9 1 -E4B9BA 1 -E4B9BB 1 -E4B9BC 1 -E4B9BD 1 -E4B9BE 1 -E4B9BF 1 -E4BA80 1 -E4BA81 1 -E4BA82 1 -E4BA83 1 -E4BA84 1 -E4BA85 1 -E4BA86 1 -E4BA87 1 -E4BA88 1 -E4BA89 1 -E4BA8A 1 -E4BA8B 1 -E4BA8C 1 -E4BA8D 1 -E4BA8E 1 -E4BA8F 1 -E4BA90 1 -E4BA91 1 -E4BA92 1 -E4BA93 1 -E4BA94 1 -E4BA95 1 -E4BA96 1 -E4BA97 1 -E4BA98 1 -E4BA99 1 -E4BA9A 1 -E4BA9B 1 -E4BA9C 1 -E4BA9D 1 -E4BA9E 1 -E4BA9F 1 -E4BAA0 1 -E4BAA1 1 -E4BAA2 1 -E4BAA3 1 -E4BAA4 1 -E4BAA5 1 -E4BAA6 1 -E4BAA7 1 -E4BAA8 1 -E4BAA9 1 -E4BAAA 1 -E4BAAB 1 -E4BAAC 1 -E4BAAD 1 -E4BAAE 1 -E4BAAF 1 -E4BAB0 1 -E4BAB1 1 -E4BAB2 1 -E4BAB3 1 -E4BAB4 1 -E4BAB5 1 -E4BAB6 1 -E4BAB7 1 -E4BAB8 1 -E4BAB9 1 -E4BABA 1 -E4BABB 1 -E4BABC 1 -E4BABD 1 -E4BABE 1 -E4BABF 1 -E4BB80 1 -E4BB81 1 -E4BB82 1 -E4BB83 1 -E4BB84 1 -E4BB85 1 -E4BB86 1 -E4BB87 1 -E4BB88 1 -E4BB89 1 -E4BB8A 1 -E4BB8B 1 -E4BB8C 1 -E4BB8D 1 -E4BB8E 1 -E4BB8F 1 -E4BB90 1 -E4BB91 1 -E4BB92 1 -E4BB93 1 -E4BB94 1 -E4BB95 1 -E4BB96 1 -E4BB97 1 -E4BB98 1 -E4BB99 1 -E4BB9A 1 -E4BB9B 1 -E4BB9C 1 -E4BB9D 1 -E4BB9E 1 -E4BB9F 1 -E4BBA0 1 -E4BBA1 1 -E4BBA2 1 -E4BBA3 1 -E4BBA4 1 -E4BBA5 1 -E4BBA6 1 -E4BBA7 1 -E4BBA8 1 -E4BBA9 1 -E4BBAA 1 -E4BBAB 1 -E4BBAC 1 -E4BBAD 1 -E4BBAE 1 -E4BBAF 1 -E4BBB0 1 -E4BBB1 1 -E4BBB2 1 -E4BBB3 1 -E4BBB4 1 -E4BBB5 1 -E4BBB6 1 -E4BBB7 1 -E4BBB8 1 -E4BBB9 1 -E4BBBA 1 -E4BBBB 1 -E4BBBC 1 -E4BBBD 1 -E4BBBE 1 -E4BBBF 1 -E4BC80 1 -E4BC81 1 -E4BC82 1 -E4BC83 1 -E4BC84 1 -E4BC85 1 -E4BC86 1 -E4BC87 1 -E4BC88 1 -E4BC89 1 -E4BC8A 1 -E4BC8B 1 -E4BC8C 1 -E4BC8D 1 -E4BC8E 1 -E4BC8F 1 -E4BC90 1 -E4BC91 1 -E4BC92 1 -E4BC93 1 -E4BC94 1 -E4BC95 1 -E4BC96 1 -E4BC97 1 -E4BC98 1 -E4BC99 1 -E4BC9A 1 -E4BC9B 1 -E4BC9C 1 -E4BC9D 1 -E4BC9E 1 -E4BC9F 1 -E4BCA0 1 -E4BCA1 1 -E4BCA2 1 -E4BCA3 1 -E4BCA4 1 -E4BCA5 1 -E4BCA6 1 -E4BCA7 1 -E4BCA8 1 -E4BCA9 1 -E4BCAA 1 -E4BCAB 1 -E4BCAC 1 -E4BCAD 1 -E4BCAE 1 -E4BCAF 1 -E4BCB0 1 -E4BCB1 1 -E4BCB2 1 -E4BCB3 1 -E4BCB4 1 -E4BCB5 1 -E4BCB6 1 -E4BCB7 1 -E4BCB8 1 -E4BCB9 1 -E4BCBA 1 -E4BCBB 1 -E4BCBC 1 -E4BCBD 1 -E4BCBE 1 -E4BCBF 1 -E4BD80 1 -E4BD81 1 -E4BD82 1 -E4BD83 1 -E4BD84 1 -E4BD85 1 -E4BD86 1 -E4BD87 1 -E4BD88 1 -E4BD89 1 -E4BD8A 1 -E4BD8B 1 -E4BD8C 1 -E4BD8D 1 -E4BD8E 1 -E4BD8F 1 -E4BD90 1 -E4BD91 1 -E4BD92 1 -E4BD93 1 -E4BD94 1 -E4BD95 1 -E4BD96 1 -E4BD97 1 -E4BD98 1 -E4BD99 1 -E4BD9A 1 -E4BD9B 1 -E4BD9C 1 -E4BD9D 1 -E4BD9E 1 -E4BD9F 1 -E4BDA0 1 -E4BDA1 1 -E4BDA2 1 -E4BDA3 1 -E4BDA4 1 -E4BDA5 1 -E4BDA6 1 -E4BDA7 1 -E4BDA8 1 -E4BDA9 1 -E4BDAA 1 -E4BDAB 1 -E4BDAC 1 -E4BDAD 1 -E4BDAE 1 -E4BDAF 1 -E4BDB0 1 -E4BDB1 1 -E4BDB2 1 -E4BDB3 1 -E4BDB4 1 -E4BDB5 1 -E4BDB6 1 -E4BDB7 1 -E4BDB8 1 -E4BDB9 1 -E4BDBA 1 -E4BDBB 1 -E4BDBC 1 -E4BDBD 1 -E4BDBE 1 -E4BDBF 1 -E4BE80 1 -E4BE81 1 -E4BE82 1 -E4BE83 1 -E4BE84 1 -E4BE85 1 -E4BE86 1 -E4BE87 1 -E4BE88 1 -E4BE89 1 -E4BE8A 1 -E4BE8B 1 -E4BE8C 1 -E4BE8D 1 -E4BE8E 1 -E4BE8F 1 -E4BE90 1 -E4BE91 1 -E4BE92 1 -E4BE93 1 -E4BE94 1 -E4BE95 1 -E4BE96 1 -E4BE97 1 -E4BE98 1 -E4BE99 1 -E4BE9A 1 -E4BE9B 1 -E4BE9C 1 -E4BE9D 1 -E4BE9E 1 -E4BE9F 1 -E4BEA0 1 -E4BEA1 1 -E4BEA2 1 -E4BEA3 1 -E4BEA4 1 -E4BEA5 1 -E4BEA6 1 -E4BEA7 1 -E4BEA8 1 -E4BEA9 1 -E4BEAA 1 -E4BEAB 1 -E4BEAC 1 -E4BEAD 1 -E4BEAE 1 -E4BEAF 1 -E4BEB0 1 -E4BEB1 1 -E4BEB2 1 -E4BEB3 1 -E4BEB4 1 -E4BEB5 1 -E4BEB6 1 -E4BEB7 1 -E4BEB8 1 -E4BEB9 1 -E4BEBA 1 -E4BEBB 1 -E4BEBC 1 -E4BEBD 1 -E4BEBE 1 -E4BEBF 1 -E4BF80 1 -E4BF81 1 -E4BF82 1 -E4BF83 1 -E4BF84 1 -E4BF85 1 -E4BF86 1 -E4BF87 1 -E4BF88 1 -E4BF89 1 -E4BF8A 1 -E4BF8B 1 -E4BF8C 1 -E4BF8D 1 -E4BF8E 1 -E4BF8F 1 -E4BF90 1 -E4BF91 1 -E4BF92 1 -E4BF93 1 -E4BF94 1 -E4BF95 1 -E4BF96 1 -E4BF97 1 -E4BF98 1 -E4BF99 1 -E4BF9A 1 -E4BF9B 1 -E4BF9C 1 -E4BF9D 1 -E4BF9E 1 -E4BF9F 1 -E4BFA0 1 -E4BFA1 1 -E4BFA2 1 -E4BFA3 1 -E4BFA4 1 -E4BFA5 1 -E4BFA6 1 -E4BFA7 1 -E4BFA8 1 -E4BFA9 1 -E4BFAA 1 -E4BFAB 1 -E4BFAC 1 -E4BFAD 1 -E4BFAE 1 -E4BFAF 1 -E4BFB0 1 -E4BFB1 1 -E4BFB2 1 -E4BFB3 1 -E4BFB4 1 -E4BFB5 1 -E4BFB6 1 -E4BFB7 1 -E4BFB8 1 -E4BFB9 1 -E4BFBA 1 -E4BFBB 1 -E4BFBC 1 -E4BFBD 1 -E4BFBE 1 -E4BFBF 1 -C8B7 1 -C8B8 1 -C8B9 1 -C8BA 1 -C8BB 1 -C8BC 1 -C8BD 1 -C8BE 1 -C8BF 1 -C980 1 -C981 1 -C982 1 -C983 1 -C984 1 -C985 1 -C986 1 -C987 1 -C988 1 -C989 1 -C98A 1 -C98B 1 -C98C 1 -C98D 1 -C98E 1 -C98F 1 -CD98 1 -CD99 1 -CD9A 1 -CD9B 1 -CD9C 1 -CDB0 1 -CDB1 1 -CDB2 1 -CDB3 1 -CDB6 1 -CDB7 1 -CDB8 1 -CDB9 1 -CDBB 1 -CDBC 1 -CDBD 1 -CDBF 1 -CE80 1 -CE81 1 -CE82 1 -CE83 1 -CE8B 1 -CE8D 1 -CEA2 1 -CF8F 1 -CFBC 1 -CFBD 1 -CFBE 1 -CFBF 1 -D287 1 -D38F 1 -D3B6 1 -D3B7 1 -D3BA 1 -D3BB 1 -D3BC 1 -D3BD 1 -D3BE 1 -D3BF 1 -D490 1 -D491 1 -D492 1 -D493 1 -D494 1 -D495 1 -D496 1 -D497 1 -D498 1 -D499 1 -D49A 1 -D49B 1 -D49C 1 -D49D 1 -D49E 1 -D49F 1 -D4A0 1 -D4A1 1 -D4A2 1 -D4A3 1 -D4A4 1 -D4A5 1 -D4A6 1 -D4A7 1 -D4A8 1 -D4A9 1 -D4AA 1 -D4AB 1 -D4AC 1 -D4AD 1 -D4AE 1 -D4AF 1 -D4B0 1 -D597 1 -D598 1 -D5A0 1 -D688 1 -D68B 1 -D68C 1 -D68D 1 -D68E 1 -D68F 1 -D690 1 -D6A2 1 -D6BA 1 -D785 1 -D786 1 -D787 1 -D788 1 -D789 1 -D78A 1 -D78B 1 -D78C 1 -D78D 1 -D78E 1 -D78F 1 -D7AB 1 -D7AC 1 -D7AD 1 -D7AE 1 -D7AF 1 -D7B5 1 -D7B6 1 -D7B7 1 -D7B8 1 -D7B9 1 -D7BA 1 -D7BB 1 -D7BC 1 -D7BD 1 -D7BE 1 -D7BF 1 -D884 1 -D885 1 -D886 1 -D887 1 -D888 1 -D889 1 -D88A 1 -D88B 1 -D896 1 -D897 1 -D898 1 -D899 1 -D89A 1 -D89C 1 -D89D 1 -D89E 1 -D8A0 1 -D8BB 1 -D8BC 1 -D8BD 1 -D8BE 1 -D8BF 1 -D999 1 -D99A 1 -D99B 1 -D99C 1 -D99D 1 -D99E 1 -D99F 1 -DC8E 1 -DD8B 1 -DD8C 1 -DD90 1 -DD91 1 -DD92 1 -DD93 1 -DD94 1 -DD95 1 -DD96 1 -DD97 1 -DD98 1 -DD99 1 -DD9A 1 -DD9B 1 -DD9C 1 -DD9D 1 -DD9E 1 -DD9F 1 -DDA0 1 -DDA1 1 -DDA2 1 -DDA3 1 -DDA4 1 -DDA5 1 -DDA6 1 -DDA7 1 -DDA8 1 -DDA9 1 -DDAA 1 -DDAB 1 -DDAC 1 -DDAD 1 -DDAE 1 -DDAF 1 -DDB0 1 -DDB1 1 -DDB2 1 -DDB3 1 -DDB4 1 -DDB5 1 -DDB6 1 -DDB7 1 -DDB8 1 -DDB9 1 -DDBA 1 -DDBB 1 -DDBC 1 -DDBD 1 -DDBE 1 -DDBF 1 -DEB2 1 -DEB3 1 -DEB4 1 -DEB5 1 -DEB6 1 -DEB7 1 -DEB8 1 -DEB9 1 -DEBA 1 -DEBB 1 -DEBC 1 -DEBD 1 -DEBE 1 -DEBF 1 -DF80 1 -DF81 1 -DF82 1 -DF83 1 -DF84 1 -DF85 1 -DF86 1 -DF87 1 -DF88 1 -DF89 1 -DF8A 1 -DF8B 1 -DF8C 1 -DF8D 1 -DF8E 1 -DF8F 1 -DF90 1 -DF91 1 -DF92 1 -DF93 1 -DF94 1 -DF95 1 -DF96 1 -DF97 1 -DF98 1 -DF99 1 -DF9A 1 -DF9B 1 -DF9C 1 -DF9D 1 -DF9E 1 -DF9F 1 -DFA0 1 -DFA1 1 -DFA2 1 -DFA3 1 -DFA4 1 -DFA5 1 -DFA6 1 -DFA7 1 -DFA8 1 -DFA9 1 -DFAA 1 -DFAB 1 -DFAC 1 -DFAD 1 -DFAE 1 -DFAF 1 -DFB0 1 -DFB1 1 -DFB2 1 -DFB3 1 -DFB4 1 -DFB5 1 -DFB6 1 -DFB7 1 -DFB8 1 -DFB9 1 -DFBA 1 -DFBB 1 -DFBC 1 -DFBD 1 -DFBE 1 -DFBF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_danish_ci) ENGINE=NDB CHARACTER SET utf8 COLLATE utf8_danish_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_danish_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -C285 1 -7F 1 -C280 1 -C281 1 -C282 1 -C283 1 -C284 1 -C286 1 -C287 1 -C288 1 -C289 1 -C28A 1 -C28B 1 -C28C 1 -C28D 1 -C28E 1 -C28F 1 -C290 1 -C291 1 -C292 1 -C293 1 -C294 1 -C295 1 -C296 1 -C297 1 -C298 1 -C299 1 -C29A 1 -C29B 1 -C29C 1 -C29D 1 -C29E 1 -C29F 1 -C2A0 1 -CC80 1 -CC81 1 -CC82 1 -CC83 1 -CC84 1 -CC85 1 -CC86 1 -CC87 1 -CC88 1 -CC89 1 -CC8A 1 -CC8B 1 -CC8C 1 -CC8D 1 -CC8E 1 -CC8F 1 -CC90 1 -CC91 1 -CC92 1 -CC93 1 -CC94 1 -CC95 1 -CC96 1 -CC97 1 -CC98 1 -CC99 1 -CC9A 1 -CC9B 1 -CC9C 1 -CC9D 1 -CC9E 1 -CC9F 1 -CCA0 1 -CCA1 1 -CCA2 1 -CCA3 1 -CCA4 1 -CCA5 1 -CCA6 1 -CCA7 1 -CCA8 1 -CCA9 1 -CCAA 1 -CCAB 1 -CCAC 1 -CCAD 1 -CCAE 1 -CCAF 1 -CCB0 1 -CCB1 1 -CCB2 1 -CCB3 1 -CCB4 1 -CCB5 1 -CCB6 1 -CCB7 1 -CCB8 1 -CCB9 1 -CCBA 1 -CCBB 1 -CCBC 1 -CCBD 1 -CCBE 1 -CCBF 1 -CD80 1 -CD81 1 -CD82 1 -CD83 1 -CD84 1 -CD85 1 -CD86 1 -CD87 1 -CD88 1 -CD89 1 -CD8A 1 -CD8B 1 -CD8C 1 -CD8D 1 -CD8E 1 -CD8F 1 -CD90 1 -CD91 1 -CD92 1 -CD93 1 -CD94 1 -CD95 1 -CD96 1 -CD97 1 -CD9D 1 -CD9E 1 -CD9F 1 -CDA0 1 -CDA1 1 -CDA2 1 -D283 1 -D284 1 -D285 1 -D286 1 -D288 1 -D289 1 -D691 1 -D692 1 -D693 1 -D694 1 -D695 1 -D696 1 -D697 1 -D698 1 -D699 1 -D69A 1 -D69B 1 -D69C 1 -D69D 1 -D69E 1 -D69F 1 -D6A0 1 -D6A1 1 -D6A3 1 -D6A4 1 -D6A5 1 -D6A6 1 -D6A7 1 -D6A8 1 -D6A9 1 -D6AA 1 -D6AB 1 -D6AC 1 -D6AD 1 -D6AE 1 -D6AF 1 -D6B0 1 -D6B1 1 -D6B2 1 -D6B3 1 -D6B4 1 -D6B5 1 -D6B6 1 -D6B7 1 -D6B8 1 -D6B9 1 -D6BB 1 -D6BC 1 -D6BD 1 -D6BF 1 -D781 1 -D782 1 -D784 1 -D880 1 -D881 1 -D882 1 -D883 1 -D890 1 -D891 1 -D892 1 -D893 1 -D894 1 -D895 1 -D98B 1 -D98C 1 -D98D 1 -D98E 1 -D98F 1 -D990 1 -D991 1 -D992 1 -D993 1 -D994 1 -D995 1 -D996 1 -D997 1 -D998 1 -D9B0 1 -DB96 1 -DB97 1 -DB98 1 -DB99 1 -DB9A 1 -DB9B 1 -DB9C 1 -DB9D 1 -DB9E 1 -DB9F 1 -DBA0 1 -DBA1 1 -DBA2 1 -DBA3 1 -DBA4 1 -DBA7 1 -DBA8 1 -DBAA 1 -DBAB 1 -DBAC 1 -DBAD 1 -DC8F 1 -DC91 1 -DCB0 1 -DCB1 1 -DCB2 1 -DCB3 1 -DCB4 1 -DCB5 1 -DCB6 1 -DCB7 1 -DCB8 1 -DCB9 1 -DCBA 1 -DCBB 1 -DCBC 1 -DCBD 1 -DCBE 1 -DCBF 1 -DD80 1 -DD81 1 -DD82 1 -DD83 1 -DD84 1 -DD85 1 -DD86 1 -DD87 1 -DD88 1 -DD89 1 -DD8A 1 -D980 1 -60 1 -C2B4 1 -CE84 1 -CB9C 1 -5E 1 -C2AF 1 -CB98 1 -CB99 1 -C2A8 1 -CE85 1 -CB9A 1 -CB9D 1 -C2B8 1 -CB9B 1 -5F 1 -C2AD 1 -2D 1 -D68A 1 -2C 1 -D59D 1 -D88C 1 -D88D 1 -D9AB 1 -D9AC 1 -3B 1 -CDBE 1 -D89B 1 -3A 1 -D689 1 -DC83 1 -DC84 1 -DC85 1 -DC86 1 -DC87 1 -DC88 1 -21 1 -C2A1 1 -D59C 1 -3F 1 -C2BF 1 -D59E 1 -D89F 1 -DC89 1 -2E 1 -DB94 1 -DC81 1 -DC82 1 -C2B7 1 -CE87 1 -DC80 1 -27 1 -22 1 -C2AB 1 -C2BB 1 -28 1 -29 1 -5B 1 -7B 1 -7D 1 -C2A7 1 -C2B6 1 -C2A9 1 -C2AE 1 -40 1 -2A 1 -D9AD 1 -2F 1 -26 1 -23 1 -25 1 -D9AA 1 -D59A 1 -D59B 1 -D59F 1 -D6BE 1 -D780 1 -D783 1 -D7B3 1 -D7B4 1 -DC8A 1 -DC8B 1 -DC8C 1 -DC8D 1 -CAB9 1 -CDB4 1 -CDB5 1 -CABA 1 -CB82 1 -CB83 1 -CB84 1 -CB85 1 -CB86 1 -CB87 1 -CB88 1 -CB89 1 -CB8A 1 -CB8B 1 -CB8C 1 -CB8D 1 -CB8E 1 -CB8F 1 -CB92 1 -CB93 1 -CB94 1 -CB95 1 -CB96 1 -CB97 1 -CB9E 1 -CB9F 1 -CBA5 1 -CBA6 1 -CBA7 1 -CBA8 1 -CBA9 1 -CBAA 1 -CBAB 1 -CBAC 1 -CBAD 1 -CBAF 1 -CBB0 1 -CBB1 1 -CBB2 1 -CBB3 1 -CBB4 1 -CBB5 1 -CBB6 1 -CBB7 1 -CBB8 1 -CBB9 1 -CBBA 1 -CBBB 1 -CBBC 1 -CBBD 1 -CBBE 1 -CBBF 1 -C2B0 1 -D282 1 -D88E 1 -D88F 1 -DBA9 1 -CFB6 1 -2B 1 -C2B1 1 -C3B7 1 -C397 1 -3C 1 -3D 1 -3E 1 -C2AC 1 -7C 1 -C2A6 1 -7E 1 -CB90 1 -CB91 1 -C2A4 1 -C2A2 1 -24 1 -C2A3 1 -C2A5 1 -30 1 -D9A0 1 -DBB0 1 -31 1 -C2B9 1 -D9A1 1 -DBB1 1 -C2BD 1 -C2BC 1 -32 1 -C2B2 1 -D9A2 1 -DBB2 1 -33 1 -C2B3 1 -D9A3 1 -DBB3 1 -C2BE 1 -34 1 -D9A4 1 -DBB4 1 -35 1 -D9A5 1 -DBB5 1 -36 1 -D9A6 1 -DBB6 1 -37 1 -D9A7 1 -DBB7 1 -38 1 -D9A8 1 -DBB8 1 -39 1 -D9A9 1 -DBB9 1 -41 1 -61 1 -C2AA 1 -C380 1 -C381 1 -C382 1 -C383 1 -C3A0 1 -C3A1 1 -C3A2 1 -C3A3 1 -C480 1 -C481 1 -C482 1 -C483 1 -C484 1 -C485 1 -C78D 1 -C78E 1 -C79E 1 -C79F 1 -C7A0 1 -C7A1 1 -C7BA 1 -C7BB 1 -C880 1 -C881 1 -C882 1 -C883 1 -C8A6 1 -C8A7 1 -CDA3 1 -C7A2 1 -C7A3 1 -C7BC 1 -C7BD 1 -C990 1 -C991 1 -C992 1 -42 1 -62 1 -CA99 1 -C680 1 -C681 1 -C993 1 -C682 1 -C683 1 -43 1 -63 1 -C387 1 -C3A7 1 -C486 1 -C487 1 -C488 1 -C489 1 -C48A 1 -C48B 1 -C48C 1 -C48D 1 -CDA8 1 -C687 1 -C688 1 -C995 1 -44 1 -64 1 -C48E 1 -C48F 1 -CDA9 1 -C784 1 -C785 1 -C786 1 -C7B1 1 -C7B2 1 -C7B3 1 -CAA3 1 -CAA5 1 -CAA4 1 -C490 1 -C491 1 -C689 1 -C996 1 -C68A 1 -C997 1 -C68B 1 -C68C 1 -C8A1 1 -C390 1 -C3B0 1 -45 1 -65 1 -C388 1 -C389 1 -C38A 1 -C38B 1 -C3A8 1 -C3A9 1 -C3AA 1 -C3AB 1 -C492 1 -C493 1 -C494 1 -C495 1 -C496 1 -C497 1 -C498 1 -C499 1 -C49A 1 -C49B 1 -C884 1 -C885 1 -C886 1 -C887 1 -C8A8 1 -C8A9 1 -CDA4 1 -C68E 1 -C79D 1 -C68F 1 -C999 1 -C690 1 -C99B 1 -C998 1 -C99A 1 -C99C 1 -C99D 1 -C99E 1 -CA9A 1 -C9A4 1 -46 1 -66 1 -CAA9 1 -C691 1 -C692 1 -47 1 -67 1 -C49C 1 -C49D 1 -C49E 1 -C49F 1 -C4A0 1 -C4A1 1 -C4A2 1 -C4A3 1 -C7A6 1 -C7A7 1 -C7B4 1 -C7B5 1 -C9A1 1 -C9A2 1 -C7A4 1 -C7A5 1 -C693 1 -C9A0 1 -CA9B 1 -C694 1 -C9A3 1 -CBA0 1 -C6A2 1 -C6A3 1 -48 1 -68 1 -C4A4 1 -C4A5 1 -C89E 1 -C89F 1 -CAB0 1 -CDAA 1 -CA9C 1 -C695 1 -C7B6 1 -C4A6 1 -C4A7 1 -C9A6 1 -CAB1 1 -C9A7 1 -CABB 1 -CABD 1 -49 1 -69 1 -C38C 1 -C38D 1 -C38E 1 -C38F 1 -C3AC 1 -C3AD 1 -C3AE 1 -C3AF 1 -C4A8 1 -C4A9 1 -C4AA 1 -C4AB 1 -C4AC 1 -C4AD 1 -C4AE 1 -C4AF 1 -C4B0 1 -C78F 1 -C790 1 -C888 1 -C889 1 -C88A 1 -C88B 1 -CDA5 1 -C4B2 1 -C4B3 1 -C4B1 1 -C9AA 1 -C697 1 -C9A8 1 -C696 1 -C9A9 1 -4A 1 -6A 1 -C4B4 1 -C4B5 1 -C7B0 1 -CAB2 1 -CA9D 1 -C99F 1 -CA84 1 -4B 1 -6B 1 -C4B6 1 -C4B7 1 -C7A8 1 -C7A9 1 -C698 1 -C699 1 -CA9E 1 -4C 1 -6C 1 -C4B9 1 -C4BA 1 -C4BB 1 -C4BC 1 -C4BD 1 -C4BE 1 -CBA1 1 -C4BF 1 -C580 1 -C787 1 -C788 1 -C789 1 -CAAA 1 -CAAB 1 -CA9F 1 -C581 1 -C582 1 -C69A 1 -C9AB 1 -C9AC 1 -C9AD 1 -C8B4 1 -C9AE 1 -C69B 1 -CA8E 1 -4D 1 -6D 1 -CDAB 1 -C9B1 1 -4E 1 -6E 1 -C391 1 -C3B1 1 -C583 1 -C584 1 -C585 1 -C586 1 -C587 1 -C588 1 -C7B8 1 -C7B9 1 -C78A 1 -C78B 1 -C78C 1 -C9B4 1 -C69D 1 -C9B2 1 -C69E 1 -C8A0 1 -C9B3 1 -C8B5 1 -C58A 1 -C58B 1 -4F 1 -6F 1 -C2BA 1 -C392 1 -C393 1 -C394 1 -C395 1 -C3B2 1 -C3B3 1 -C3B4 1 -C3B5 1 -C58C 1 -C58D 1 -C58E 1 -C58F 1 -C6A0 1 -C6A1 1 -C791 1 -C792 1 -C7AA 1 -C7AB 1 -C7AC 1 -C7AD 1 -C88C 1 -C88D 1 -C88E 1 -C88F 1 -C8AA 1 -C8AB 1 -C8AC 1 -C8AD 1 -C8AE 1 -C8AF 1 -C8B0 1 -C8B1 1 -CDA6 1 -C592 1 -C593 1 -C9B6 1 -C7BE 1 -C7BF 1 -C686 1 -C994 1 -C69F 1 -C9B5 1 -C9B7 1 -C8A2 1 -C8A3 1 -50 1 -70 1 -C6A4 1 -C6A5 1 -C9B8 1 -51 1 -71 1 -CAA0 1 -C4B8 1 -52 1 -72 1 -C594 1 -C595 1 -C596 1 -C597 1 -C598 1 -C599 1 -C890 1 -C891 1 -C892 1 -C893 1 -CAB3 1 -CDAC 1 -C6A6 1 -CA80 1 -C9B9 1 -CAB4 1 -C9BA 1 -C9BB 1 -CAB5 1 -C9BC 1 -C9BD 1 -C9BE 1 -C9BF 1 -CA81 1 -CAB6 1 -53 1 -73 1 -C59A 1 -C59B 1 -C59C 1 -C59D 1 -C59E 1 -C59F 1 -C5A0 1 -C5A1 1 -C5BF 1 -C898 1 -C899 1 -CBA2 1 -C39F 1 -CA82 1 -C6A9 1 -CA83 1 -C6AA 1 -CA85 1 -CA86 1 -54 1 -74 1 -C5A2 1 -C5A3 1 -C5A4 1 -C5A5 1 -C89A 1 -C89B 1 -CDAD 1 -CAA8 1 -C6BE 1 -CAA6 1 -CAA7 1 -C5A6 1 -C5A7 1 -C6AB 1 -C6AC 1 -C6AD 1 -C6AE 1 -CA88 1 -C8B6 1 -CA87 1 -55 1 -75 1 -C399 1 -C39A 1 -C39B 1 -C3B9 1 -C3BA 1 -C3BB 1 -C5A8 1 -C5A9 1 -C5AA 1 -C5AB 1 -C5AC 1 -C5AD 1 -C5AE 1 -C5AF 1 -C5B2 1 -C5B3 1 -C6AF 1 -C6B0 1 -C793 1 -C794 1 -C795 1 -C796 1 -C797 1 -C798 1 -C799 1 -C79A 1 -C79B 1 -C79C 1 -C894 1 -C895 1 -C896 1 -C897 1 -CDA7 1 -CA89 1 -C9A5 1 -CAAE 1 -CAAF 1 -C69C 1 -C9AF 1 -C9B0 1 -C6B1 1 -CA8A 1 -56 1 -76 1 -CDAE 1 -C6B2 1 -CA8B 1 -CA8C 1 -57 1 -77 1 -C5B4 1 -C5B5 1 -CAB7 1 -CA8D 1 -58 1 -78 1 -CBA3 1 -CDAF 1 -59 1 -79 1 -C39C 1 -C39D 1 -C3BC 1 -C3BD 1 -C3BF 1 -C5B0 1 -C5B1 1 -C5B6 1 -C5B7 1 -C5B8 1 -C8B2 1 -C8B3 1 -CAB8 1 -CA8F 1 -C6B3 1 -C6B4 1 -5A 1 -7A 1 -C5B9 1 -C5BA 1 -C5BB 1 -C5BC 1 -C5BD 1 -C5BE 1 -C68D 1 -C384 1 -C386 1 -C3A4 1 -C3A6 1 -C396 1 -C398 1 -C3B6 1 -C3B8 1 -C590 1 -C591 1 -C385 1 -C3A5 1 -C6B5 1 -C6B6 1 -C8A4 1 -C8A5 1 -CA90 1 -CA91 1 -C6B7 1 -C7AE 1 -C7AF 1 -CA92 1 -C6B8 1 -C6B9 1 -C6BA 1 -CA93 1 -C89C 1 -C89D 1 -C39E 1 -C3BE 1 -C6BF 1 -C7B7 1 -C6BB 1 -C6A7 1 -C6A8 1 -C6BC 1 -C6BD 1 -C684 1 -C685 1 -CA94 1 -CB80 1 -CABC 1 -C589 1 -CBAE 1 -CABE 1 -CA95 1 -CBA4 1 -CABF 1 -CB81 1 -CAA1 1 -CAA2 1 -CA96 1 -C780 1 -C781 1 -C782 1 -C783 1 -CA97 1 -CA98 1 -CAAC 1 -CAAD 1 -CE86 1 -CE91 1 -CEAC 1 -CEB1 1 -CE92 1 -CEB2 1 -CF90 1 -CE93 1 -CEB3 1 -CE94 1 -CEB4 1 -CE88 1 -CE95 1 -CEAD 1 -CEB5 1 -CFB5 1 -CF9C 1 -CF9D 1 -CF9A 1 -CF9B 1 -CE96 1 -CEB6 1 -CE89 1 -CE97 1 -CEAE 1 -CEB7 1 -CE98 1 -CEB8 1 -CF91 1 -CFB4 1 -CDBA 1 -CE8A 1 -CE90 1 -CE99 1 -CEAA 1 -CEAF 1 -CEB9 1 -CF8A 1 -CFB3 1 -CE9A 1 -CEBA 1 -CFB0 1 -CF97 1 -CE9B 1 -CEBB 1 -C2B5 1 -CE9C 1 -CEBC 1 -CE9D 1 -CEBD 1 -CE9E 1 -CEBE 1 -CE8C 1 -CE9F 1 -CEBF 1 -CF8C 1 -CEA0 1 -CF80 1 -CF96 1 -CF9E 1 -CF9F 1 -CF98 1 -CF99 1 -CEA1 1 -CF81 1 -CFB1 1 -CEA3 1 -CF82 1 -CF83 1 -CFB2 1 -CFB9 1 -CEA4 1 -CF84 1 -CE8E 1 -CEA5 1 -CEAB 1 -CEB0 1 -CF85 1 -CF8B 1 -CF8D 1 -CF92 1 -CF93 1 -CF94 1 -CEA6 1 -CF86 1 -CF95 1 -CEA7 1 -CF87 1 -CEA8 1 -CF88 1 -CE8F 1 -CEA9 1 -CF89 1 -CF8E 1 -CFA0 1 -CFA1 1 -CFB7 1 -CFB8 1 -CFBA 1 -CFBB 1 -CFA2 1 -CFA3 1 -CFA4 1 -CFA5 1 -CFA6 1 -CFA7 1 -CFA8 1 -CFA9 1 -CFAA 1 -CFAB 1 -CFAC 1 -CFAD 1 -CFAE 1 -CFAF 1 -D090 1 -D0B0 1 -D390 1 -D391 1 -D392 1 -D393 1 -D398 1 -D399 1 -D39A 1 -D39B 1 -D394 1 -D395 1 -D091 1 -D0B1 1 -D092 1 -D0B2 1 -D093 1 -D0B3 1 -D290 1 -D291 1 -D292 1 -D293 1 -D294 1 -D295 1 -D094 1 -D0B4 1 -D480 1 -D481 1 -D082 1 -D192 1 -D482 1 -D483 1 -D083 1 -D193 1 -D298 1 -D299 1 -D080 1 -D081 1 -D095 1 -D0B5 1 -D190 1 -D191 1 -D396 1 -D397 1 -D084 1 -D194 1 -D096 1 -D0B6 1 -D381 1 -D382 1 -D39C 1 -D39D 1 -D296 1 -D297 1 -D097 1 -D0B7 1 -D484 1 -D485 1 -D39E 1 -D39F 1 -D085 1 -D195 1 -D3A0 1 -D3A1 1 -D486 1 -D487 1 -D08D 1 -D098 1 -D0B8 1 -D19D 1 -D3A2 1 -D3A3 1 -D28A 1 -D28B 1 -D3A4 1 -D3A5 1 -D086 1 -D196 1 -D087 1 -D197 1 -D099 1 -D0B9 1 -D088 1 -D198 1 -D09A 1 -D0BA 1 -D29A 1 -D29B 1 -D383 1 -D384 1 -D2A0 1 -D2A1 1 -D29E 1 -D29F 1 -D29C 1 -D29D 1 -D09B 1 -D0BB 1 -D385 1 -D386 1 -D089 1 -D199 1 -D488 1 -D489 1 -D09C 1 -D0BC 1 -D38D 1 -D38E 1 -D09D 1 -D0BD 1 -D389 1 -D38A 1 -D2A2 1 -D2A3 1 -D387 1 -D388 1 -D2A4 1 -D2A5 1 -D08A 1 -D19A 1 -D48A 1 -D48B 1 -D09E 1 -D0BE 1 -D3A6 1 -D3A7 1 -D3A8 1 -D3A9 1 -D3AA 1 -D3AB 1 -D09F 1 -D0BF 1 -D2A6 1 -D2A7 1 -D280 1 -D281 1 -D0A0 1 -D180 1 -D28E 1 -D28F 1 -D0A1 1 -D181 1 -D48C 1 -D48D 1 -D2AA 1 -D2AB 1 -D0A2 1 -D182 1 -D48E 1 -D48F 1 -D2AC 1 -D2AD 1 -D08B 1 -D19B 1 -D08C 1 -D19C 1 -D0A3 1 -D183 1 -D3AE 1 -D3AF 1 -D08E 1 -D19E 1 -D3B0 1 -D3B1 1 -D3B2 1 -D3B3 1 -D2AE 1 -D2AF 1 -D2B0 1 -D2B1 1 -D1B8 1 -D1B9 1 -D0A4 1 -D184 1 -D0A5 1 -D185 1 -D2B2 1 -D2B3 1 -D2BA 1 -D2BB 1 -D1A0 1 -D1A1 1 -D1BE 1 -D1BF 1 -D1BC 1 -D1BD 1 -D1BA 1 -D1BB 1 -D0A6 1 -D186 1 -D2B4 1 -D2B5 1 -D0A7 1 -D187 1 -D3B4 1 -D3B5 1 -D2B6 1 -D2B7 1 -D38B 1 -D38C 1 -D2B8 1 -D2B9 1 -D2BC 1 -D2BD 1 -D2BE 1 -D2BF 1 -D08F 1 -D19F 1 -D0A8 1 -D188 1 -D0A9 1 -D189 1 -D0AA 1 -D18A 1 -D0AB 1 -D18B 1 -D3B8 1 -D3B9 1 -D0AC 1 -D18C 1 -D28C 1 -D28D 1 -D1A2 1 -D1A3 1 -D0AD 1 -D18D 1 -D3AC 1 -D3AD 1 -D0AE 1 -D18E 1 -D0AF 1 -D18F 1 -D1A4 1 -D1A5 1 -D1A6 1 -D1A7 1 -D1AA 1 -D1AB 1 -D1A8 1 -D1A9 1 -D1AC 1 -D1AD 1 -D1AE 1 -D1AF 1 -D1B0 1 -D1B1 1 -D1B2 1 -D1B3 1 -D1B4 1 -D1B5 1 -D1B6 1 -D1B7 1 -D2A8 1 -D2A9 1 -D380 1 -D4B1 1 -D5A1 1 -D4B2 1 -D5A2 1 -D4B3 1 -D5A3 1 -D4B4 1 -D5A4 1 -D4B5 1 -D5A5 1 -D687 1 -D4B6 1 -D5A6 1 -D4B7 1 -D5A7 1 -D4B8 1 -D5A8 1 -D4B9 1 -D5A9 1 -D4BA 1 -D5AA 1 -D4BB 1 -D5AB 1 -D4BC 1 -D5AC 1 -D4BD 1 -D5AD 1 -D4BE 1 -D5AE 1 -D4BF 1 -D5AF 1 -D580 1 -D5B0 1 -D581 1 -D5B1 1 -D582 1 -D5B2 1 -D583 1 -D5B3 1 -D584 1 -D5B4 1 -D585 1 -D5B5 1 -D586 1 -D5B6 1 -D587 1 -D5B7 1 -D588 1 -D5B8 1 -D589 1 -D5B9 1 -D58A 1 -D5BA 1 -D58B 1 -D5BB 1 -D58C 1 -D5BC 1 -D58D 1 -D5BD 1 -D58E 1 -D5BE 1 -D58F 1 -D5BF 1 -D590 1 -D680 1 -D591 1 -D681 1 -D592 1 -D682 1 -D593 1 -D683 1 -D594 1 -D684 1 -D595 1 -D685 1 -D596 1 -D686 1 -D599 1 -D790 1 -D791 1 -D792 1 -D793 1 -D794 1 -D795 1 -D7B0 1 -D7B1 1 -D796 1 -D797 1 -D798 1 -D799 1 -D7B2 1 -D79A 1 -D79B 1 -D79C 1 -D79D 1 -D79E 1 -D79F 1 -D7A0 1 -D7A1 1 -D7A2 1 -D7A3 1 -D7A4 1 -D7A5 1 -D7A6 1 -D7A7 1 -D7A8 1 -D7A9 1 -D7AA 1 -D8A1 1 -D9B4 1 -DBBD 1 -D8A2 1 -D8A3 1 -D9B2 1 -D9B1 1 -D8A4 1 -D8A5 1 -D9B3 1 -D8A6 1 -D8A7 1 -D9B5 1 -D9AE 1 -D8A8 1 -D9BB 1 -D9BE 1 -DA80 1 -D8A9 1 -D8AA 1 -D8AB 1 -D9B9 1 -D9BA 1 -D9BC 1 -D9BD 1 -D9BF 1 -D8AC 1 -DA83 1 -DA84 1 -DA86 1 -DABF 1 -DA87 1 -D8AD 1 -D8AE 1 -DA81 1 -DA82 1 -DA85 1 -D8AF 1 -D8B0 1 -DA88 1 -DA89 1 -DA8A 1 -DA8B 1 -DA8C 1 -DA8D 1 -DA8E 1 -DA8F 1 -DA90 1 -DBAE 1 -D8B1 1 -D8B2 1 -DA91 1 -DA92 1 -DA93 1 -DA94 1 -DA95 1 -DA96 1 -DA97 1 -DA98 1 -DA99 1 -DBAF 1 -D8B3 1 -D8B4 1 -DA9A 1 -DA9B 1 -DA9C 1 -DBBA 1 -D8B5 1 -D8B6 1 -DA9D 1 -DA9E 1 -DBBB 1 -D8B7 1 -D8B8 1 -DA9F 1 -D8B9 1 -D8BA 1 -DAA0 1 -DBBC 1 -D981 1 -DAA1 1 -DAA2 1 -DAA3 1 -DAA4 1 -DAA5 1 -DAA6 1 -D9AF 1 -D982 1 -DAA7 1 -DAA8 1 -D983 1 -DAA9 1 -DAAA 1 -DAAB 1 -DAAC 1 -DAAD 1 -DAAE 1 -DAAF 1 -DAB0 1 -DAB1 1 -DAB2 1 -DAB3 1 -DAB4 1 -D984 1 -DAB5 1 -DAB6 1 -DAB7 1 -DAB8 1 -D985 1 -DBBE 1 -D986 1 -DABA 1 -DABB 1 -DABC 1 -DABD 1 -DAB9 1 -D987 1 -DABE 1 -DB81 1 -DB82 1 -DB83 1 -DBBF 1 -DB80 1 -DB95 1 -D988 1 -DBA5 1 -D9B6 1 -DB84 1 -DB85 1 -DB86 1 -DB87 1 -D9B7 1 -DB88 1 -DB89 1 -DB8A 1 -DB8B 1 -DB8F 1 -D989 1 -D98A 1 -DBA6 1 -D9B8 1 -DB8C 1 -DB8D 1 -DB8E 1 -DB90 1 -DB91 1 -DB92 1 -DB93 1 -DC90 1 -DC92 1 -DCAD 1 -DC93 1 -DC94 1 -DCAE 1 -DC96 1 -DC95 1 -DCAF 1 -DC97 1 -DC98 1 -DC99 1 -DD8D 1 -DC9A 1 -DC9B 1 -DC9C 1 -DC9D 1 -DC9E 1 -DC9F 1 -DD8E 1 -DCA0 1 -DCA1 1 -DCA2 1 -DCA3 1 -DCA4 1 -DCA5 1 -DCA6 1 -DCA7 1 -DD8F 1 -DCA8 1 -DCA9 1 -DCAA 1 -DCAB 1 -DCAC 1 -DE80 1 -DE99 1 -DE9A 1 -DE81 1 -DE82 1 -DE83 1 -DE9C 1 -DE84 1 -DE85 1 -DE86 1 -DE87 1 -DEA2 1 -DEA3 1 -DE88 1 -DEA5 1 -DE89 1 -DE8A 1 -DE8B 1 -DE9B 1 -DE8C 1 -DE98 1 -DEA0 1 -DEA1 1 -DE8D 1 -DE8E 1 -DEA4 1 -DE8F 1 -DE90 1 -DE9D 1 -DE9E 1 -DE9F 1 -DE91 1 -DE92 1 -DE93 1 -DE94 1 -DE95 1 -DE96 1 -DE97 1 -DEB1 1 -DEA6 1 -DEA7 1 -DEA8 1 -DEA9 1 -DEAA 1 -DEAB 1 -DEAC 1 -DEAD 1 -DEAE 1 -DEAF 1 -DEB0 1 -E4B880 1 -E4B881 1 -E4B882 1 -E4B883 1 -E4B884 1 -E4B885 1 -E4B886 1 -E4B887 1 -E4B888 1 -E4B889 1 -E4B88A 1 -E4B88B 1 -E4B88C 1 -E4B88D 1 -E4B88E 1 -E4B88F 1 -E4B890 1 -E4B891 1 -E4B892 1 -E4B893 1 -E4B894 1 -E4B895 1 -E4B896 1 -E4B897 1 -E4B898 1 -E4B899 1 -E4B89A 1 -E4B89B 1 -E4B89C 1 -E4B89D 1 -E4B89E 1 -E4B89F 1 -E4B8A0 1 -E4B8A1 1 -E4B8A2 1 -E4B8A3 1 -E4B8A4 1 -E4B8A5 1 -E4B8A6 1 -E4B8A7 1 -E4B8A8 1 -E4B8A9 1 -E4B8AA 1 -E4B8AB 1 -E4B8AC 1 -E4B8AD 1 -E4B8AE 1 -E4B8AF 1 -E4B8B0 1 -E4B8B1 1 -E4B8B2 1 -E4B8B3 1 -E4B8B4 1 -E4B8B5 1 -E4B8B6 1 -E4B8B7 1 -E4B8B8 1 -E4B8B9 1 -E4B8BA 1 -E4B8BB 1 -E4B8BC 1 -E4B8BD 1 -E4B8BE 1 -E4B8BF 1 -E4B980 1 -E4B981 1 -E4B982 1 -E4B983 1 -E4B984 1 -E4B985 1 -E4B986 1 -E4B987 1 -E4B988 1 -E4B989 1 -E4B98A 1 -E4B98B 1 -E4B98C 1 -E4B98D 1 -E4B98E 1 -E4B98F 1 -E4B990 1 -E4B991 1 -E4B992 1 -E4B993 1 -E4B994 1 -E4B995 1 -E4B996 1 -E4B997 1 -E4B998 1 -E4B999 1 -E4B99A 1 -E4B99B 1 -E4B99C 1 -E4B99D 1 -E4B99E 1 -E4B99F 1 -E4B9A0 1 -E4B9A1 1 -E4B9A2 1 -E4B9A3 1 -E4B9A4 1 -E4B9A5 1 -E4B9A6 1 -E4B9A7 1 -E4B9A8 1 -E4B9A9 1 -E4B9AA 1 -E4B9AB 1 -E4B9AC 1 -E4B9AD 1 -E4B9AE 1 -E4B9AF 1 -E4B9B0 1 -E4B9B1 1 -E4B9B2 1 -E4B9B3 1 -E4B9B4 1 -E4B9B5 1 -E4B9B6 1 -E4B9B7 1 -E4B9B8 1 -E4B9B9 1 -E4B9BA 1 -E4B9BB 1 -E4B9BC 1 -E4B9BD 1 -E4B9BE 1 -E4B9BF 1 -E4BA80 1 -E4BA81 1 -E4BA82 1 -E4BA83 1 -E4BA84 1 -E4BA85 1 -E4BA86 1 -E4BA87 1 -E4BA88 1 -E4BA89 1 -E4BA8A 1 -E4BA8B 1 -E4BA8C 1 -E4BA8D 1 -E4BA8E 1 -E4BA8F 1 -E4BA90 1 -E4BA91 1 -E4BA92 1 -E4BA93 1 -E4BA94 1 -E4BA95 1 -E4BA96 1 -E4BA97 1 -E4BA98 1 -E4BA99 1 -E4BA9A 1 -E4BA9B 1 -E4BA9C 1 -E4BA9D 1 -E4BA9E 1 -E4BA9F 1 -E4BAA0 1 -E4BAA1 1 -E4BAA2 1 -E4BAA3 1 -E4BAA4 1 -E4BAA5 1 -E4BAA6 1 -E4BAA7 1 -E4BAA8 1 -E4BAA9 1 -E4BAAA 1 -E4BAAB 1 -E4BAAC 1 -E4BAAD 1 -E4BAAE 1 -E4BAAF 1 -E4BAB0 1 -E4BAB1 1 -E4BAB2 1 -E4BAB3 1 -E4BAB4 1 -E4BAB5 1 -E4BAB6 1 -E4BAB7 1 -E4BAB8 1 -E4BAB9 1 -E4BABA 1 -E4BABB 1 -E4BABC 1 -E4BABD 1 -E4BABE 1 -E4BABF 1 -E4BB80 1 -E4BB81 1 -E4BB82 1 -E4BB83 1 -E4BB84 1 -E4BB85 1 -E4BB86 1 -E4BB87 1 -E4BB88 1 -E4BB89 1 -E4BB8A 1 -E4BB8B 1 -E4BB8C 1 -E4BB8D 1 -E4BB8E 1 -E4BB8F 1 -E4BB90 1 -E4BB91 1 -E4BB92 1 -E4BB93 1 -E4BB94 1 -E4BB95 1 -E4BB96 1 -E4BB97 1 -E4BB98 1 -E4BB99 1 -E4BB9A 1 -E4BB9B 1 -E4BB9C 1 -E4BB9D 1 -E4BB9E 1 -E4BB9F 1 -E4BBA0 1 -E4BBA1 1 -E4BBA2 1 -E4BBA3 1 -E4BBA4 1 -E4BBA5 1 -E4BBA6 1 -E4BBA7 1 -E4BBA8 1 -E4BBA9 1 -E4BBAA 1 -E4BBAB 1 -E4BBAC 1 -E4BBAD 1 -E4BBAE 1 -E4BBAF 1 -E4BBB0 1 -E4BBB1 1 -E4BBB2 1 -E4BBB3 1 -E4BBB4 1 -E4BBB5 1 -E4BBB6 1 -E4BBB7 1 -E4BBB8 1 -E4BBB9 1 -E4BBBA 1 -E4BBBB 1 -E4BBBC 1 -E4BBBD 1 -E4BBBE 1 -E4BBBF 1 -E4BC80 1 -E4BC81 1 -E4BC82 1 -E4BC83 1 -E4BC84 1 -E4BC85 1 -E4BC86 1 -E4BC87 1 -E4BC88 1 -E4BC89 1 -E4BC8A 1 -E4BC8B 1 -E4BC8C 1 -E4BC8D 1 -E4BC8E 1 -E4BC8F 1 -E4BC90 1 -E4BC91 1 -E4BC92 1 -E4BC93 1 -E4BC94 1 -E4BC95 1 -E4BC96 1 -E4BC97 1 -E4BC98 1 -E4BC99 1 -E4BC9A 1 -E4BC9B 1 -E4BC9C 1 -E4BC9D 1 -E4BC9E 1 -E4BC9F 1 -E4BCA0 1 -E4BCA1 1 -E4BCA2 1 -E4BCA3 1 -E4BCA4 1 -E4BCA5 1 -E4BCA6 1 -E4BCA7 1 -E4BCA8 1 -E4BCA9 1 -E4BCAA 1 -E4BCAB 1 -E4BCAC 1 -E4BCAD 1 -E4BCAE 1 -E4BCAF 1 -E4BCB0 1 -E4BCB1 1 -E4BCB2 1 -E4BCB3 1 -E4BCB4 1 -E4BCB5 1 -E4BCB6 1 -E4BCB7 1 -E4BCB8 1 -E4BCB9 1 -E4BCBA 1 -E4BCBB 1 -E4BCBC 1 -E4BCBD 1 -E4BCBE 1 -E4BCBF 1 -E4BD80 1 -E4BD81 1 -E4BD82 1 -E4BD83 1 -E4BD84 1 -E4BD85 1 -E4BD86 1 -E4BD87 1 -E4BD88 1 -E4BD89 1 -E4BD8A 1 -E4BD8B 1 -E4BD8C 1 -E4BD8D 1 -E4BD8E 1 -E4BD8F 1 -E4BD90 1 -E4BD91 1 -E4BD92 1 -E4BD93 1 -E4BD94 1 -E4BD95 1 -E4BD96 1 -E4BD97 1 -E4BD98 1 -E4BD99 1 -E4BD9A 1 -E4BD9B 1 -E4BD9C 1 -E4BD9D 1 -E4BD9E 1 -E4BD9F 1 -E4BDA0 1 -E4BDA1 1 -E4BDA2 1 -E4BDA3 1 -E4BDA4 1 -E4BDA5 1 -E4BDA6 1 -E4BDA7 1 -E4BDA8 1 -E4BDA9 1 -E4BDAA 1 -E4BDAB 1 -E4BDAC 1 -E4BDAD 1 -E4BDAE 1 -E4BDAF 1 -E4BDB0 1 -E4BDB1 1 -E4BDB2 1 -E4BDB3 1 -E4BDB4 1 -E4BDB5 1 -E4BDB6 1 -E4BDB7 1 -E4BDB8 1 -E4BDB9 1 -E4BDBA 1 -E4BDBB 1 -E4BDBC 1 -E4BDBD 1 -E4BDBE 1 -E4BDBF 1 -E4BE80 1 -E4BE81 1 -E4BE82 1 -E4BE83 1 -E4BE84 1 -E4BE85 1 -E4BE86 1 -E4BE87 1 -E4BE88 1 -E4BE89 1 -E4BE8A 1 -E4BE8B 1 -E4BE8C 1 -E4BE8D 1 -E4BE8E 1 -E4BE8F 1 -E4BE90 1 -E4BE91 1 -E4BE92 1 -E4BE93 1 -E4BE94 1 -E4BE95 1 -E4BE96 1 -E4BE97 1 -E4BE98 1 -E4BE99 1 -E4BE9A 1 -E4BE9B 1 -E4BE9C 1 -E4BE9D 1 -E4BE9E 1 -E4BE9F 1 -E4BEA0 1 -E4BEA1 1 -E4BEA2 1 -E4BEA3 1 -E4BEA4 1 -E4BEA5 1 -E4BEA6 1 -E4BEA7 1 -E4BEA8 1 -E4BEA9 1 -E4BEAA 1 -E4BEAB 1 -E4BEAC 1 -E4BEAD 1 -E4BEAE 1 -E4BEAF 1 -E4BEB0 1 -E4BEB1 1 -E4BEB2 1 -E4BEB3 1 -E4BEB4 1 -E4BEB5 1 -E4BEB6 1 -E4BEB7 1 -E4BEB8 1 -E4BEB9 1 -E4BEBA 1 -E4BEBB 1 -E4BEBC 1 -E4BEBD 1 -E4BEBE 1 -E4BEBF 1 -E4BF80 1 -E4BF81 1 -E4BF82 1 -E4BF83 1 -E4BF84 1 -E4BF85 1 -E4BF86 1 -E4BF87 1 -E4BF88 1 -E4BF89 1 -E4BF8A 1 -E4BF8B 1 -E4BF8C 1 -E4BF8D 1 -E4BF8E 1 -E4BF8F 1 -E4BF90 1 -E4BF91 1 -E4BF92 1 -E4BF93 1 -E4BF94 1 -E4BF95 1 -E4BF96 1 -E4BF97 1 -E4BF98 1 -E4BF99 1 -E4BF9A 1 -E4BF9B 1 -E4BF9C 1 -E4BF9D 1 -E4BF9E 1 -E4BF9F 1 -E4BFA0 1 -E4BFA1 1 -E4BFA2 1 -E4BFA3 1 -E4BFA4 1 -E4BFA5 1 -E4BFA6 1 -E4BFA7 1 -E4BFA8 1 -E4BFA9 1 -E4BFAA 1 -E4BFAB 1 -E4BFAC 1 -E4BFAD 1 -E4BFAE 1 -E4BFAF 1 -E4BFB0 1 -E4BFB1 1 -E4BFB2 1 -E4BFB3 1 -E4BFB4 1 -E4BFB5 1 -E4BFB6 1 -E4BFB7 1 -E4BFB8 1 -E4BFB9 1 -E4BFBA 1 -E4BFBB 1 -E4BFBC 1 -E4BFBD 1 -E4BFBE 1 -E4BFBF 1 -C8B7 1 -C8B8 1 -C8B9 1 -C8BA 1 -C8BB 1 -C8BC 1 -C8BD 1 -C8BE 1 -C8BF 1 -C980 1 -C981 1 -C982 1 -C983 1 -C984 1 -C985 1 -C986 1 -C987 1 -C988 1 -C989 1 -C98A 1 -C98B 1 -C98C 1 -C98D 1 -C98E 1 -C98F 1 -CD98 1 -CD99 1 -CD9A 1 -CD9B 1 -CD9C 1 -CDB0 1 -CDB1 1 -CDB2 1 -CDB3 1 -CDB6 1 -CDB7 1 -CDB8 1 -CDB9 1 -CDBB 1 -CDBC 1 -CDBD 1 -CDBF 1 -CE80 1 -CE81 1 -CE82 1 -CE83 1 -CE8B 1 -CE8D 1 -CEA2 1 -CF8F 1 -CFBC 1 -CFBD 1 -CFBE 1 -CFBF 1 -D287 1 -D38F 1 -D3B6 1 -D3B7 1 -D3BA 1 -D3BB 1 -D3BC 1 -D3BD 1 -D3BE 1 -D3BF 1 -D490 1 -D491 1 -D492 1 -D493 1 -D494 1 -D495 1 -D496 1 -D497 1 -D498 1 -D499 1 -D49A 1 -D49B 1 -D49C 1 -D49D 1 -D49E 1 -D49F 1 -D4A0 1 -D4A1 1 -D4A2 1 -D4A3 1 -D4A4 1 -D4A5 1 -D4A6 1 -D4A7 1 -D4A8 1 -D4A9 1 -D4AA 1 -D4AB 1 -D4AC 1 -D4AD 1 -D4AE 1 -D4AF 1 -D4B0 1 -D597 1 -D598 1 -D5A0 1 -D688 1 -D68B 1 -D68C 1 -D68D 1 -D68E 1 -D68F 1 -D690 1 -D6A2 1 -D6BA 1 -D785 1 -D786 1 -D787 1 -D788 1 -D789 1 -D78A 1 -D78B 1 -D78C 1 -D78D 1 -D78E 1 -D78F 1 -D7AB 1 -D7AC 1 -D7AD 1 -D7AE 1 -D7AF 1 -D7B5 1 -D7B6 1 -D7B7 1 -D7B8 1 -D7B9 1 -D7BA 1 -D7BB 1 -D7BC 1 -D7BD 1 -D7BE 1 -D7BF 1 -D884 1 -D885 1 -D886 1 -D887 1 -D888 1 -D889 1 -D88A 1 -D88B 1 -D896 1 -D897 1 -D898 1 -D899 1 -D89A 1 -D89C 1 -D89D 1 -D89E 1 -D8A0 1 -D8BB 1 -D8BC 1 -D8BD 1 -D8BE 1 -D8BF 1 -D999 1 -D99A 1 -D99B 1 -D99C 1 -D99D 1 -D99E 1 -D99F 1 -DC8E 1 -DD8B 1 -DD8C 1 -DD90 1 -DD91 1 -DD92 1 -DD93 1 -DD94 1 -DD95 1 -DD96 1 -DD97 1 -DD98 1 -DD99 1 -DD9A 1 -DD9B 1 -DD9C 1 -DD9D 1 -DD9E 1 -DD9F 1 -DDA0 1 -DDA1 1 -DDA2 1 -DDA3 1 -DDA4 1 -DDA5 1 -DDA6 1 -DDA7 1 -DDA8 1 -DDA9 1 -DDAA 1 -DDAB 1 -DDAC 1 -DDAD 1 -DDAE 1 -DDAF 1 -DDB0 1 -DDB1 1 -DDB2 1 -DDB3 1 -DDB4 1 -DDB5 1 -DDB6 1 -DDB7 1 -DDB8 1 -DDB9 1 -DDBA 1 -DDBB 1 -DDBC 1 -DDBD 1 -DDBE 1 -DDBF 1 -DEB2 1 -DEB3 1 -DEB4 1 -DEB5 1 -DEB6 1 -DEB7 1 -DEB8 1 -DEB9 1 -DEBA 1 -DEBB 1 -DEBC 1 -DEBD 1 -DEBE 1 -DEBF 1 -DF80 1 -DF81 1 -DF82 1 -DF83 1 -DF84 1 -DF85 1 -DF86 1 -DF87 1 -DF88 1 -DF89 1 -DF8A 1 -DF8B 1 -DF8C 1 -DF8D 1 -DF8E 1 -DF8F 1 -DF90 1 -DF91 1 -DF92 1 -DF93 1 -DF94 1 -DF95 1 -DF96 1 -DF97 1 -DF98 1 -DF99 1 -DF9A 1 -DF9B 1 -DF9C 1 -DF9D 1 -DF9E 1 -DF9F 1 -DFA0 1 -DFA1 1 -DFA2 1 -DFA3 1 -DFA4 1 -DFA5 1 -DFA6 1 -DFA7 1 -DFA8 1 -DFA9 1 -DFAA 1 -DFAB 1 -DFAC 1 -DFAD 1 -DFAE 1 -DFAF 1 -DFB0 1 -DFB1 1 -DFB2 1 -DFB3 1 -DFB4 1 -DFB5 1 -DFB6 1 -DFB7 1 -DFB8 1 -DFB9 1 -DFBA 1 -DFBB 1 -DFBC 1 -DFBD 1 -DFBE 1 -DFBF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_estonian_ci) ENGINE=NDB CHARACTER SET utf8 COLLATE utf8_estonian_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_estonian_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -C285 1 -7F 1 -C280 1 -C281 1 -C282 1 -C283 1 -C284 1 -C286 1 -C287 1 -C288 1 -C289 1 -C28A 1 -C28B 1 -C28C 1 -C28D 1 -C28E 1 -C28F 1 -C290 1 -C291 1 -C292 1 -C293 1 -C294 1 -C295 1 -C296 1 -C297 1 -C298 1 -C299 1 -C29A 1 -C29B 1 -C29C 1 -C29D 1 -C29E 1 -C29F 1 -C2A0 1 -CC80 1 -CC81 1 -CC82 1 -CC83 1 -CC84 1 -CC85 1 -CC86 1 -CC87 1 -CC88 1 -CC89 1 -CC8A 1 -CC8B 1 -CC8C 1 -CC8D 1 -CC8E 1 -CC8F 1 -CC90 1 -CC91 1 -CC92 1 -CC93 1 -CC94 1 -CC95 1 -CC96 1 -CC97 1 -CC98 1 -CC99 1 -CC9A 1 -CC9B 1 -CC9C 1 -CC9D 1 -CC9E 1 -CC9F 1 -CCA0 1 -CCA1 1 -CCA2 1 -CCA3 1 -CCA4 1 -CCA5 1 -CCA6 1 -CCA7 1 -CCA8 1 -CCA9 1 -CCAA 1 -CCAB 1 -CCAC 1 -CCAD 1 -CCAE 1 -CCAF 1 -CCB0 1 -CCB1 1 -CCB2 1 -CCB3 1 -CCB4 1 -CCB5 1 -CCB6 1 -CCB7 1 -CCB8 1 -CCB9 1 -CCBA 1 -CCBB 1 -CCBC 1 -CCBD 1 -CCBE 1 -CCBF 1 -CD80 1 -CD81 1 -CD82 1 -CD83 1 -CD84 1 -CD85 1 -CD86 1 -CD87 1 -CD88 1 -CD89 1 -CD8A 1 -CD8B 1 -CD8C 1 -CD8D 1 -CD8E 1 -CD8F 1 -CD90 1 -CD91 1 -CD92 1 -CD93 1 -CD94 1 -CD95 1 -CD96 1 -CD97 1 -CD9D 1 -CD9E 1 -CD9F 1 -CDA0 1 -CDA1 1 -CDA2 1 -D283 1 -D284 1 -D285 1 -D286 1 -D288 1 -D289 1 -D691 1 -D692 1 -D693 1 -D694 1 -D695 1 -D696 1 -D697 1 -D698 1 -D699 1 -D69A 1 -D69B 1 -D69C 1 -D69D 1 -D69E 1 -D69F 1 -D6A0 1 -D6A1 1 -D6A3 1 -D6A4 1 -D6A5 1 -D6A6 1 -D6A7 1 -D6A8 1 -D6A9 1 -D6AA 1 -D6AB 1 -D6AC 1 -D6AD 1 -D6AE 1 -D6AF 1 -D6B0 1 -D6B1 1 -D6B2 1 -D6B3 1 -D6B4 1 -D6B5 1 -D6B6 1 -D6B7 1 -D6B8 1 -D6B9 1 -D6BB 1 -D6BC 1 -D6BD 1 -D6BF 1 -D781 1 -D782 1 -D784 1 -D880 1 -D881 1 -D882 1 -D883 1 -D890 1 -D891 1 -D892 1 -D893 1 -D894 1 -D895 1 -D98B 1 -D98C 1 -D98D 1 -D98E 1 -D98F 1 -D990 1 -D991 1 -D992 1 -D993 1 -D994 1 -D995 1 -D996 1 -D997 1 -D998 1 -D9B0 1 -DB96 1 -DB97 1 -DB98 1 -DB99 1 -DB9A 1 -DB9B 1 -DB9C 1 -DB9D 1 -DB9E 1 -DB9F 1 -DBA0 1 -DBA1 1 -DBA2 1 -DBA3 1 -DBA4 1 -DBA7 1 -DBA8 1 -DBAA 1 -DBAB 1 -DBAC 1 -DBAD 1 -DC8F 1 -DC91 1 -DCB0 1 -DCB1 1 -DCB2 1 -DCB3 1 -DCB4 1 -DCB5 1 -DCB6 1 -DCB7 1 -DCB8 1 -DCB9 1 -DCBA 1 -DCBB 1 -DCBC 1 -DCBD 1 -DCBE 1 -DCBF 1 -DD80 1 -DD81 1 -DD82 1 -DD83 1 -DD84 1 -DD85 1 -DD86 1 -DD87 1 -DD88 1 -DD89 1 -DD8A 1 -D980 1 -60 1 -C2B4 1 -CE84 1 -CB9C 1 -5E 1 -C2AF 1 -CB98 1 -CB99 1 -C2A8 1 -CE85 1 -CB9A 1 -CB9D 1 -C2B8 1 -CB9B 1 -5F 1 -C2AD 1 -2D 1 -D68A 1 -2C 1 -D59D 1 -D88C 1 -D88D 1 -D9AB 1 -D9AC 1 -3B 1 -CDBE 1 -D89B 1 -3A 1 -D689 1 -DC83 1 -DC84 1 -DC85 1 -DC86 1 -DC87 1 -DC88 1 -21 1 -C2A1 1 -D59C 1 -3F 1 -C2BF 1 -D59E 1 -D89F 1 -DC89 1 -2E 1 -DB94 1 -DC81 1 -DC82 1 -C2B7 1 -CE87 1 -DC80 1 -27 1 -22 1 -C2AB 1 -C2BB 1 -28 1 -29 1 -5B 1 -7B 1 -7D 1 -C2A7 1 -C2B6 1 -C2A9 1 -C2AE 1 -40 1 -2A 1 -D9AD 1 -2F 1 -26 1 -23 1 -25 1 -D9AA 1 -D59A 1 -D59B 1 -D59F 1 -D6BE 1 -D780 1 -D783 1 -D7B3 1 -D7B4 1 -DC8A 1 -DC8B 1 -DC8C 1 -DC8D 1 -CAB9 1 -CDB4 1 -CDB5 1 -CABA 1 -CB82 1 -CB83 1 -CB84 1 -CB85 1 -CB86 1 -CB87 1 -CB88 1 -CB89 1 -CB8A 1 -CB8B 1 -CB8C 1 -CB8D 1 -CB8E 1 -CB8F 1 -CB92 1 -CB93 1 -CB94 1 -CB95 1 -CB96 1 -CB97 1 -CB9E 1 -CB9F 1 -CBA5 1 -CBA6 1 -CBA7 1 -CBA8 1 -CBA9 1 -CBAA 1 -CBAB 1 -CBAC 1 -CBAD 1 -CBAF 1 -CBB0 1 -CBB1 1 -CBB2 1 -CBB3 1 -CBB4 1 -CBB5 1 -CBB6 1 -CBB7 1 -CBB8 1 -CBB9 1 -CBBA 1 -CBBB 1 -CBBC 1 -CBBD 1 -CBBE 1 -CBBF 1 -C2B0 1 -D282 1 -D88E 1 -D88F 1 -DBA9 1 -CFB6 1 -2B 1 -C2B1 1 -C3B7 1 -C397 1 -3C 1 -3D 1 -3E 1 -C2AC 1 -7C 1 -C2A6 1 -7E 1 -CB90 1 -CB91 1 -C2A4 1 -C2A2 1 -24 1 -C2A3 1 -C2A5 1 -30 1 -D9A0 1 -DBB0 1 -31 1 -C2B9 1 -D9A1 1 -DBB1 1 -C2BD 1 -C2BC 1 -32 1 -C2B2 1 -D9A2 1 -DBB2 1 -33 1 -C2B3 1 -D9A3 1 -DBB3 1 -C2BE 1 -34 1 -D9A4 1 -DBB4 1 -35 1 -D9A5 1 -DBB5 1 -36 1 -D9A6 1 -DBB6 1 -37 1 -D9A7 1 -DBB7 1 -38 1 -D9A8 1 -DBB8 1 -39 1 -D9A9 1 -DBB9 1 -41 1 -61 1 -C2AA 1 -C380 1 -C381 1 -C382 1 -C383 1 -C385 1 -C3A0 1 -C3A1 1 -C3A2 1 -C3A3 1 -C3A5 1 -C480 1 -C481 1 -C482 1 -C483 1 -C484 1 -C485 1 -C78D 1 -C78E 1 -C79E 1 -C79F 1 -C7A0 1 -C7A1 1 -C7BA 1 -C7BB 1 -C880 1 -C881 1 -C882 1 -C883 1 -C8A6 1 -C8A7 1 -CDA3 1 -C386 1 -C3A6 1 -C7A2 1 -C7A3 1 -C7BC 1 -C7BD 1 -C990 1 -C991 1 -C992 1 -42 1 -62 1 -CA99 1 -C680 1 -C681 1 -C993 1 -C682 1 -C683 1 -43 1 -63 1 -C387 1 -C3A7 1 -C486 1 -C487 1 -C488 1 -C489 1 -C48A 1 -C48B 1 -C48C 1 -C48D 1 -CDA8 1 -C687 1 -C688 1 -C995 1 -44 1 -64 1 -C48E 1 -C48F 1 -CDA9 1 -C784 1 -C785 1 -C786 1 -C7B1 1 -C7B2 1 -C7B3 1 -CAA3 1 -CAA5 1 -CAA4 1 -C490 1 -C491 1 -C689 1 -C996 1 -C68A 1 -C997 1 -C68B 1 -C68C 1 -C8A1 1 -C390 1 -C3B0 1 -45 1 -65 1 -C388 1 -C389 1 -C38A 1 -C38B 1 -C3A8 1 -C3A9 1 -C3AA 1 -C3AB 1 -C492 1 -C493 1 -C494 1 -C495 1 -C496 1 -C497 1 -C498 1 -C499 1 -C49A 1 -C49B 1 -C884 1 -C885 1 -C886 1 -C887 1 -C8A8 1 -C8A9 1 -CDA4 1 -C68E 1 -C79D 1 -C68F 1 -C999 1 -C690 1 -C99B 1 -C998 1 -C99A 1 -C99C 1 -C99D 1 -C99E 1 -CA9A 1 -C9A4 1 -46 1 -66 1 -CAA9 1 -C691 1 -C692 1 -47 1 -67 1 -C49C 1 -C49D 1 -C49E 1 -C49F 1 -C4A0 1 -C4A1 1 -C4A2 1 -C4A3 1 -C7A6 1 -C7A7 1 -C7B4 1 -C7B5 1 -C9A1 1 -C9A2 1 -C7A4 1 -C7A5 1 -C693 1 -C9A0 1 -CA9B 1 -C694 1 -C9A3 1 -CBA0 1 -C6A2 1 -C6A3 1 -48 1 -68 1 -C4A4 1 -C4A5 1 -C89E 1 -C89F 1 -CAB0 1 -CDAA 1 -CA9C 1 -C695 1 -C7B6 1 -C4A6 1 -C4A7 1 -C9A6 1 -CAB1 1 -C9A7 1 -CABB 1 -CABD 1 -49 1 -69 1 -C38C 1 -C38D 1 -C38E 1 -C38F 1 -C3AC 1 -C3AD 1 -C3AE 1 -C3AF 1 -C4A8 1 -C4A9 1 -C4AA 1 -C4AB 1 -C4AC 1 -C4AD 1 -C4AE 1 -C4AF 1 -C4B0 1 -C78F 1 -C790 1 -C888 1 -C889 1 -C88A 1 -C88B 1 -CDA5 1 -C4B2 1 -C4B3 1 -C4B1 1 -C9AA 1 -C697 1 -C9A8 1 -C696 1 -C9A9 1 -4A 1 -6A 1 -C4B4 1 -C4B5 1 -C7B0 1 -CAB2 1 -CA9D 1 -C99F 1 -CA84 1 -4B 1 -6B 1 -C4B6 1 -C4B7 1 -C7A8 1 -C7A9 1 -C698 1 -C699 1 -CA9E 1 -4C 1 -6C 1 -C4B9 1 -C4BA 1 -C4BB 1 -C4BC 1 -C4BD 1 -C4BE 1 -CBA1 1 -C4BF 1 -C580 1 -C787 1 -C788 1 -C789 1 -CAAA 1 -CAAB 1 -CA9F 1 -C581 1 -C582 1 -C69A 1 -C9AB 1 -C9AC 1 -C9AD 1 -C8B4 1 -C9AE 1 -C69B 1 -CA8E 1 -4D 1 -6D 1 -CDAB 1 -C9B1 1 -4E 1 -6E 1 -C391 1 -C3B1 1 -C583 1 -C584 1 -C585 1 -C586 1 -C587 1 -C588 1 -C7B8 1 -C7B9 1 -C78A 1 -C78B 1 -C78C 1 -C9B4 1 -C69D 1 -C9B2 1 -C69E 1 -C8A0 1 -C9B3 1 -C8B5 1 -C58A 1 -C58B 1 -4F 1 -6F 1 -C2BA 1 -C392 1 -C393 1 -C394 1 -C3B2 1 -C3B3 1 -C3B4 1 -C58C 1 -C58D 1 -C58E 1 -C58F 1 -C590 1 -C591 1 -C6A0 1 -C6A1 1 -C791 1 -C792 1 -C7AA 1 -C7AB 1 -C7AC 1 -C7AD 1 -C88C 1 -C88D 1 -C88E 1 -C88F 1 -C8AA 1 -C8AB 1 -C8AC 1 -C8AD 1 -C8AE 1 -C8AF 1 -C8B0 1 -C8B1 1 -CDA6 1 -C592 1 -C593 1 -C9B6 1 -C398 1 -C3B8 1 -C7BE 1 -C7BF 1 -C686 1 -C994 1 -C69F 1 -C9B5 1 -C9B7 1 -C8A2 1 -C8A3 1 -50 1 -70 1 -C6A4 1 -C6A5 1 -C9B8 1 -51 1 -71 1 -CAA0 1 -C4B8 1 -52 1 -72 1 -C594 1 -C595 1 -C596 1 -C597 1 -C598 1 -C599 1 -C890 1 -C891 1 -C892 1 -C893 1 -CAB3 1 -CDAC 1 -C6A6 1 -CA80 1 -C9B9 1 -CAB4 1 -C9BA 1 -C9BB 1 -CAB5 1 -C9BC 1 -C9BD 1 -C9BE 1 -C9BF 1 -CA81 1 -CAB6 1 -53 1 -73 1 -C59A 1 -C59B 1 -C59C 1 -C59D 1 -C59E 1 -C59F 1 -C5BF 1 -C898 1 -C899 1 -CBA2 1 -C39F 1 -C5A0 1 -C5A1 1 -5A 1 -7A 1 -C5BD 1 -C5BE 1 -CA82 1 -C6A9 1 -CA83 1 -C6AA 1 -CA85 1 -CA86 1 -54 1 -74 1 -C5A2 1 -C5A3 1 -C5A4 1 -C5A5 1 -C89A 1 -C89B 1 -CDAD 1 -CAA8 1 -C6BE 1 -CAA6 1 -CAA7 1 -C5A6 1 -C5A7 1 -C6AB 1 -C6AC 1 -C6AD 1 -C6AE 1 -CA88 1 -C8B6 1 -CA87 1 -55 1 -75 1 -C399 1 -C39A 1 -C39B 1 -C3B9 1 -C3BA 1 -C3BB 1 -C5A8 1 -C5A9 1 -C5AA 1 -C5AB 1 -C5AC 1 -C5AD 1 -C5AE 1 -C5AF 1 -C5B0 1 -C5B1 1 -C5B2 1 -C5B3 1 -C6AF 1 -C6B0 1 -C793 1 -C794 1 -C795 1 -C796 1 -C797 1 -C798 1 -C799 1 -C79A 1 -C79B 1 -C79C 1 -C894 1 -C895 1 -C896 1 -C897 1 -CDA7 1 -CA89 1 -C9A5 1 -CAAE 1 -CAAF 1 -C69C 1 -C9AF 1 -C9B0 1 -C6B1 1 -CA8A 1 -56 1 -76 1 -CDAE 1 -C6B2 1 -CA8B 1 -CA8C 1 -57 1 -77 1 -C5B4 1 -C5B5 1 -CAB7 1 -C395 1 -C3B5 1 -C384 1 -C3A4 1 -C396 1 -C3B6 1 -C39C 1 -C3BC 1 -CA8D 1 -58 1 -78 1 -CBA3 1 -CDAF 1 -59 1 -79 1 -C39D 1 -C3BD 1 -C3BF 1 -C5B6 1 -C5B7 1 -C5B8 1 -C8B2 1 -C8B3 1 -CAB8 1 -CA8F 1 -C6B3 1 -C6B4 1 -C5B9 1 -C5BA 1 -C5BB 1 -C5BC 1 -C68D 1 -C6B5 1 -C6B6 1 -C8A4 1 -C8A5 1 -CA90 1 -CA91 1 -C6B7 1 -C7AE 1 -C7AF 1 -CA92 1 -C6B8 1 -C6B9 1 -C6BA 1 -CA93 1 -C89C 1 -C89D 1 -C39E 1 -C3BE 1 -C6BF 1 -C7B7 1 -C6BB 1 -C6A7 1 -C6A8 1 -C6BC 1 -C6BD 1 -C684 1 -C685 1 -CA94 1 -CB80 1 -CABC 1 -C589 1 -CBAE 1 -CABE 1 -CA95 1 -CBA4 1 -CABF 1 -CB81 1 -CAA1 1 -CAA2 1 -CA96 1 -C780 1 -C781 1 -C782 1 -C783 1 -CA97 1 -CA98 1 -CAAC 1 -CAAD 1 -CE86 1 -CE91 1 -CEAC 1 -CEB1 1 -CE92 1 -CEB2 1 -CF90 1 -CE93 1 -CEB3 1 -CE94 1 -CEB4 1 -CE88 1 -CE95 1 -CEAD 1 -CEB5 1 -CFB5 1 -CF9C 1 -CF9D 1 -CF9A 1 -CF9B 1 -CE96 1 -CEB6 1 -CE89 1 -CE97 1 -CEAE 1 -CEB7 1 -CE98 1 -CEB8 1 -CF91 1 -CFB4 1 -CDBA 1 -CE8A 1 -CE90 1 -CE99 1 -CEAA 1 -CEAF 1 -CEB9 1 -CF8A 1 -CFB3 1 -CE9A 1 -CEBA 1 -CFB0 1 -CF97 1 -CE9B 1 -CEBB 1 -C2B5 1 -CE9C 1 -CEBC 1 -CE9D 1 -CEBD 1 -CE9E 1 -CEBE 1 -CE8C 1 -CE9F 1 -CEBF 1 -CF8C 1 -CEA0 1 -CF80 1 -CF96 1 -CF9E 1 -CF9F 1 -CF98 1 -CF99 1 -CEA1 1 -CF81 1 -CFB1 1 -CEA3 1 -CF82 1 -CF83 1 -CFB2 1 -CFB9 1 -CEA4 1 -CF84 1 -CE8E 1 -CEA5 1 -CEAB 1 -CEB0 1 -CF85 1 -CF8B 1 -CF8D 1 -CF92 1 -CF93 1 -CF94 1 -CEA6 1 -CF86 1 -CF95 1 -CEA7 1 -CF87 1 -CEA8 1 -CF88 1 -CE8F 1 -CEA9 1 -CF89 1 -CF8E 1 -CFA0 1 -CFA1 1 -CFB7 1 -CFB8 1 -CFBA 1 -CFBB 1 -CFA2 1 -CFA3 1 -CFA4 1 -CFA5 1 -CFA6 1 -CFA7 1 -CFA8 1 -CFA9 1 -CFAA 1 -CFAB 1 -CFAC 1 -CFAD 1 -CFAE 1 -CFAF 1 -D090 1 -D0B0 1 -D390 1 -D391 1 -D392 1 -D393 1 -D398 1 -D399 1 -D39A 1 -D39B 1 -D394 1 -D395 1 -D091 1 -D0B1 1 -D092 1 -D0B2 1 -D093 1 -D0B3 1 -D290 1 -D291 1 -D292 1 -D293 1 -D294 1 -D295 1 -D094 1 -D0B4 1 -D480 1 -D481 1 -D082 1 -D192 1 -D482 1 -D483 1 -D083 1 -D193 1 -D298 1 -D299 1 -D080 1 -D081 1 -D095 1 -D0B5 1 -D190 1 -D191 1 -D396 1 -D397 1 -D084 1 -D194 1 -D096 1 -D0B6 1 -D381 1 -D382 1 -D39C 1 -D39D 1 -D296 1 -D297 1 -D097 1 -D0B7 1 -D484 1 -D485 1 -D39E 1 -D39F 1 -D085 1 -D195 1 -D3A0 1 -D3A1 1 -D486 1 -D487 1 -D08D 1 -D098 1 -D0B8 1 -D19D 1 -D3A2 1 -D3A3 1 -D28A 1 -D28B 1 -D3A4 1 -D3A5 1 -D086 1 -D196 1 -D087 1 -D197 1 -D099 1 -D0B9 1 -D088 1 -D198 1 -D09A 1 -D0BA 1 -D29A 1 -D29B 1 -D383 1 -D384 1 -D2A0 1 -D2A1 1 -D29E 1 -D29F 1 -D29C 1 -D29D 1 -D09B 1 -D0BB 1 -D385 1 -D386 1 -D089 1 -D199 1 -D488 1 -D489 1 -D09C 1 -D0BC 1 -D38D 1 -D38E 1 -D09D 1 -D0BD 1 -D389 1 -D38A 1 -D2A2 1 -D2A3 1 -D387 1 -D388 1 -D2A4 1 -D2A5 1 -D08A 1 -D19A 1 -D48A 1 -D48B 1 -D09E 1 -D0BE 1 -D3A6 1 -D3A7 1 -D3A8 1 -D3A9 1 -D3AA 1 -D3AB 1 -D09F 1 -D0BF 1 -D2A6 1 -D2A7 1 -D280 1 -D281 1 -D0A0 1 -D180 1 -D28E 1 -D28F 1 -D0A1 1 -D181 1 -D48C 1 -D48D 1 -D2AA 1 -D2AB 1 -D0A2 1 -D182 1 -D48E 1 -D48F 1 -D2AC 1 -D2AD 1 -D08B 1 -D19B 1 -D08C 1 -D19C 1 -D0A3 1 -D183 1 -D3AE 1 -D3AF 1 -D08E 1 -D19E 1 -D3B0 1 -D3B1 1 -D3B2 1 -D3B3 1 -D2AE 1 -D2AF 1 -D2B0 1 -D2B1 1 -D1B8 1 -D1B9 1 -D0A4 1 -D184 1 -D0A5 1 -D185 1 -D2B2 1 -D2B3 1 -D2BA 1 -D2BB 1 -D1A0 1 -D1A1 1 -D1BE 1 -D1BF 1 -D1BC 1 -D1BD 1 -D1BA 1 -D1BB 1 -D0A6 1 -D186 1 -D2B4 1 -D2B5 1 -D0A7 1 -D187 1 -D3B4 1 -D3B5 1 -D2B6 1 -D2B7 1 -D38B 1 -D38C 1 -D2B8 1 -D2B9 1 -D2BC 1 -D2BD 1 -D2BE 1 -D2BF 1 -D08F 1 -D19F 1 -D0A8 1 -D188 1 -D0A9 1 -D189 1 -D0AA 1 -D18A 1 -D0AB 1 -D18B 1 -D3B8 1 -D3B9 1 -D0AC 1 -D18C 1 -D28C 1 -D28D 1 -D1A2 1 -D1A3 1 -D0AD 1 -D18D 1 -D3AC 1 -D3AD 1 -D0AE 1 -D18E 1 -D0AF 1 -D18F 1 -D1A4 1 -D1A5 1 -D1A6 1 -D1A7 1 -D1AA 1 -D1AB 1 -D1A8 1 -D1A9 1 -D1AC 1 -D1AD 1 -D1AE 1 -D1AF 1 -D1B0 1 -D1B1 1 -D1B2 1 -D1B3 1 -D1B4 1 -D1B5 1 -D1B6 1 -D1B7 1 -D2A8 1 -D2A9 1 -D380 1 -D4B1 1 -D5A1 1 -D4B2 1 -D5A2 1 -D4B3 1 -D5A3 1 -D4B4 1 -D5A4 1 -D4B5 1 -D5A5 1 -D687 1 -D4B6 1 -D5A6 1 -D4B7 1 -D5A7 1 -D4B8 1 -D5A8 1 -D4B9 1 -D5A9 1 -D4BA 1 -D5AA 1 -D4BB 1 -D5AB 1 -D4BC 1 -D5AC 1 -D4BD 1 -D5AD 1 -D4BE 1 -D5AE 1 -D4BF 1 -D5AF 1 -D580 1 -D5B0 1 -D581 1 -D5B1 1 -D582 1 -D5B2 1 -D583 1 -D5B3 1 -D584 1 -D5B4 1 -D585 1 -D5B5 1 -D586 1 -D5B6 1 -D587 1 -D5B7 1 -D588 1 -D5B8 1 -D589 1 -D5B9 1 -D58A 1 -D5BA 1 -D58B 1 -D5BB 1 -D58C 1 -D5BC 1 -D58D 1 -D5BD 1 -D58E 1 -D5BE 1 -D58F 1 -D5BF 1 -D590 1 -D680 1 -D591 1 -D681 1 -D592 1 -D682 1 -D593 1 -D683 1 -D594 1 -D684 1 -D595 1 -D685 1 -D596 1 -D686 1 -D599 1 -D790 1 -D791 1 -D792 1 -D793 1 -D794 1 -D795 1 -D7B0 1 -D7B1 1 -D796 1 -D797 1 -D798 1 -D799 1 -D7B2 1 -D79A 1 -D79B 1 -D79C 1 -D79D 1 -D79E 1 -D79F 1 -D7A0 1 -D7A1 1 -D7A2 1 -D7A3 1 -D7A4 1 -D7A5 1 -D7A6 1 -D7A7 1 -D7A8 1 -D7A9 1 -D7AA 1 -D8A1 1 -D9B4 1 -DBBD 1 -D8A2 1 -D8A3 1 -D9B2 1 -D9B1 1 -D8A4 1 -D8A5 1 -D9B3 1 -D8A6 1 -D8A7 1 -D9B5 1 -D9AE 1 -D8A8 1 -D9BB 1 -D9BE 1 -DA80 1 -D8A9 1 -D8AA 1 -D8AB 1 -D9B9 1 -D9BA 1 -D9BC 1 -D9BD 1 -D9BF 1 -D8AC 1 -DA83 1 -DA84 1 -DA86 1 -DABF 1 -DA87 1 -D8AD 1 -D8AE 1 -DA81 1 -DA82 1 -DA85 1 -D8AF 1 -D8B0 1 -DA88 1 -DA89 1 -DA8A 1 -DA8B 1 -DA8C 1 -DA8D 1 -DA8E 1 -DA8F 1 -DA90 1 -DBAE 1 -D8B1 1 -D8B2 1 -DA91 1 -DA92 1 -DA93 1 -DA94 1 -DA95 1 -DA96 1 -DA97 1 -DA98 1 -DA99 1 -DBAF 1 -D8B3 1 -D8B4 1 -DA9A 1 -DA9B 1 -DA9C 1 -DBBA 1 -D8B5 1 -D8B6 1 -DA9D 1 -DA9E 1 -DBBB 1 -D8B7 1 -D8B8 1 -DA9F 1 -D8B9 1 -D8BA 1 -DAA0 1 -DBBC 1 -D981 1 -DAA1 1 -DAA2 1 -DAA3 1 -DAA4 1 -DAA5 1 -DAA6 1 -D9AF 1 -D982 1 -DAA7 1 -DAA8 1 -D983 1 -DAA9 1 -DAAA 1 -DAAB 1 -DAAC 1 -DAAD 1 -DAAE 1 -DAAF 1 -DAB0 1 -DAB1 1 -DAB2 1 -DAB3 1 -DAB4 1 -D984 1 -DAB5 1 -DAB6 1 -DAB7 1 -DAB8 1 -D985 1 -DBBE 1 -D986 1 -DABA 1 -DABB 1 -DABC 1 -DABD 1 -DAB9 1 -D987 1 -DABE 1 -DB81 1 -DB82 1 -DB83 1 -DBBF 1 -DB80 1 -DB95 1 -D988 1 -DBA5 1 -D9B6 1 -DB84 1 -DB85 1 -DB86 1 -DB87 1 -D9B7 1 -DB88 1 -DB89 1 -DB8A 1 -DB8B 1 -DB8F 1 -D989 1 -D98A 1 -DBA6 1 -D9B8 1 -DB8C 1 -DB8D 1 -DB8E 1 -DB90 1 -DB91 1 -DB92 1 -DB93 1 -DC90 1 -DC92 1 -DCAD 1 -DC93 1 -DC94 1 -DCAE 1 -DC96 1 -DC95 1 -DCAF 1 -DC97 1 -DC98 1 -DC99 1 -DD8D 1 -DC9A 1 -DC9B 1 -DC9C 1 -DC9D 1 -DC9E 1 -DC9F 1 -DD8E 1 -DCA0 1 -DCA1 1 -DCA2 1 -DCA3 1 -DCA4 1 -DCA5 1 -DCA6 1 -DCA7 1 -DD8F 1 -DCA8 1 -DCA9 1 -DCAA 1 -DCAB 1 -DCAC 1 -DE80 1 -DE99 1 -DE9A 1 -DE81 1 -DE82 1 -DE83 1 -DE9C 1 -DE84 1 -DE85 1 -DE86 1 -DE87 1 -DEA2 1 -DEA3 1 -DE88 1 -DEA5 1 -DE89 1 -DE8A 1 -DE8B 1 -DE9B 1 -DE8C 1 -DE98 1 -DEA0 1 -DEA1 1 -DE8D 1 -DE8E 1 -DEA4 1 -DE8F 1 -DE90 1 -DE9D 1 -DE9E 1 -DE9F 1 -DE91 1 -DE92 1 -DE93 1 -DE94 1 -DE95 1 -DE96 1 -DE97 1 -DEB1 1 -DEA6 1 -DEA7 1 -DEA8 1 -DEA9 1 -DEAA 1 -DEAB 1 -DEAC 1 -DEAD 1 -DEAE 1 -DEAF 1 -DEB0 1 -E4B880 1 -E4B881 1 -E4B882 1 -E4B883 1 -E4B884 1 -E4B885 1 -E4B886 1 -E4B887 1 -E4B888 1 -E4B889 1 -E4B88A 1 -E4B88B 1 -E4B88C 1 -E4B88D 1 -E4B88E 1 -E4B88F 1 -E4B890 1 -E4B891 1 -E4B892 1 -E4B893 1 -E4B894 1 -E4B895 1 -E4B896 1 -E4B897 1 -E4B898 1 -E4B899 1 -E4B89A 1 -E4B89B 1 -E4B89C 1 -E4B89D 1 -E4B89E 1 -E4B89F 1 -E4B8A0 1 -E4B8A1 1 -E4B8A2 1 -E4B8A3 1 -E4B8A4 1 -E4B8A5 1 -E4B8A6 1 -E4B8A7 1 -E4B8A8 1 -E4B8A9 1 -E4B8AA 1 -E4B8AB 1 -E4B8AC 1 -E4B8AD 1 -E4B8AE 1 -E4B8AF 1 -E4B8B0 1 -E4B8B1 1 -E4B8B2 1 -E4B8B3 1 -E4B8B4 1 -E4B8B5 1 -E4B8B6 1 -E4B8B7 1 -E4B8B8 1 -E4B8B9 1 -E4B8BA 1 -E4B8BB 1 -E4B8BC 1 -E4B8BD 1 -E4B8BE 1 -E4B8BF 1 -E4B980 1 -E4B981 1 -E4B982 1 -E4B983 1 -E4B984 1 -E4B985 1 -E4B986 1 -E4B987 1 -E4B988 1 -E4B989 1 -E4B98A 1 -E4B98B 1 -E4B98C 1 -E4B98D 1 -E4B98E 1 -E4B98F 1 -E4B990 1 -E4B991 1 -E4B992 1 -E4B993 1 -E4B994 1 -E4B995 1 -E4B996 1 -E4B997 1 -E4B998 1 -E4B999 1 -E4B99A 1 -E4B99B 1 -E4B99C 1 -E4B99D 1 -E4B99E 1 -E4B99F 1 -E4B9A0 1 -E4B9A1 1 -E4B9A2 1 -E4B9A3 1 -E4B9A4 1 -E4B9A5 1 -E4B9A6 1 -E4B9A7 1 -E4B9A8 1 -E4B9A9 1 -E4B9AA 1 -E4B9AB 1 -E4B9AC 1 -E4B9AD 1 -E4B9AE 1 -E4B9AF 1 -E4B9B0 1 -E4B9B1 1 -E4B9B2 1 -E4B9B3 1 -E4B9B4 1 -E4B9B5 1 -E4B9B6 1 -E4B9B7 1 -E4B9B8 1 -E4B9B9 1 -E4B9BA 1 -E4B9BB 1 -E4B9BC 1 -E4B9BD 1 -E4B9BE 1 -E4B9BF 1 -E4BA80 1 -E4BA81 1 -E4BA82 1 -E4BA83 1 -E4BA84 1 -E4BA85 1 -E4BA86 1 -E4BA87 1 -E4BA88 1 -E4BA89 1 -E4BA8A 1 -E4BA8B 1 -E4BA8C 1 -E4BA8D 1 -E4BA8E 1 -E4BA8F 1 -E4BA90 1 -E4BA91 1 -E4BA92 1 -E4BA93 1 -E4BA94 1 -E4BA95 1 -E4BA96 1 -E4BA97 1 -E4BA98 1 -E4BA99 1 -E4BA9A 1 -E4BA9B 1 -E4BA9C 1 -E4BA9D 1 -E4BA9E 1 -E4BA9F 1 -E4BAA0 1 -E4BAA1 1 -E4BAA2 1 -E4BAA3 1 -E4BAA4 1 -E4BAA5 1 -E4BAA6 1 -E4BAA7 1 -E4BAA8 1 -E4BAA9 1 -E4BAAA 1 -E4BAAB 1 -E4BAAC 1 -E4BAAD 1 -E4BAAE 1 -E4BAAF 1 -E4BAB0 1 -E4BAB1 1 -E4BAB2 1 -E4BAB3 1 -E4BAB4 1 -E4BAB5 1 -E4BAB6 1 -E4BAB7 1 -E4BAB8 1 -E4BAB9 1 -E4BABA 1 -E4BABB 1 -E4BABC 1 -E4BABD 1 -E4BABE 1 -E4BABF 1 -E4BB80 1 -E4BB81 1 -E4BB82 1 -E4BB83 1 -E4BB84 1 -E4BB85 1 -E4BB86 1 -E4BB87 1 -E4BB88 1 -E4BB89 1 -E4BB8A 1 -E4BB8B 1 -E4BB8C 1 -E4BB8D 1 -E4BB8E 1 -E4BB8F 1 -E4BB90 1 -E4BB91 1 -E4BB92 1 -E4BB93 1 -E4BB94 1 -E4BB95 1 -E4BB96 1 -E4BB97 1 -E4BB98 1 -E4BB99 1 -E4BB9A 1 -E4BB9B 1 -E4BB9C 1 -E4BB9D 1 -E4BB9E 1 -E4BB9F 1 -E4BBA0 1 -E4BBA1 1 -E4BBA2 1 -E4BBA3 1 -E4BBA4 1 -E4BBA5 1 -E4BBA6 1 -E4BBA7 1 -E4BBA8 1 -E4BBA9 1 -E4BBAA 1 -E4BBAB 1 -E4BBAC 1 -E4BBAD 1 -E4BBAE 1 -E4BBAF 1 -E4BBB0 1 -E4BBB1 1 -E4BBB2 1 -E4BBB3 1 -E4BBB4 1 -E4BBB5 1 -E4BBB6 1 -E4BBB7 1 -E4BBB8 1 -E4BBB9 1 -E4BBBA 1 -E4BBBB 1 -E4BBBC 1 -E4BBBD 1 -E4BBBE 1 -E4BBBF 1 -E4BC80 1 -E4BC81 1 -E4BC82 1 -E4BC83 1 -E4BC84 1 -E4BC85 1 -E4BC86 1 -E4BC87 1 -E4BC88 1 -E4BC89 1 -E4BC8A 1 -E4BC8B 1 -E4BC8C 1 -E4BC8D 1 -E4BC8E 1 -E4BC8F 1 -E4BC90 1 -E4BC91 1 -E4BC92 1 -E4BC93 1 -E4BC94 1 -E4BC95 1 -E4BC96 1 -E4BC97 1 -E4BC98 1 -E4BC99 1 -E4BC9A 1 -E4BC9B 1 -E4BC9C 1 -E4BC9D 1 -E4BC9E 1 -E4BC9F 1 -E4BCA0 1 -E4BCA1 1 -E4BCA2 1 -E4BCA3 1 -E4BCA4 1 -E4BCA5 1 -E4BCA6 1 -E4BCA7 1 -E4BCA8 1 -E4BCA9 1 -E4BCAA 1 -E4BCAB 1 -E4BCAC 1 -E4BCAD 1 -E4BCAE 1 -E4BCAF 1 -E4BCB0 1 -E4BCB1 1 -E4BCB2 1 -E4BCB3 1 -E4BCB4 1 -E4BCB5 1 -E4BCB6 1 -E4BCB7 1 -E4BCB8 1 -E4BCB9 1 -E4BCBA 1 -E4BCBB 1 -E4BCBC 1 -E4BCBD 1 -E4BCBE 1 -E4BCBF 1 -E4BD80 1 -E4BD81 1 -E4BD82 1 -E4BD83 1 -E4BD84 1 -E4BD85 1 -E4BD86 1 -E4BD87 1 -E4BD88 1 -E4BD89 1 -E4BD8A 1 -E4BD8B 1 -E4BD8C 1 -E4BD8D 1 -E4BD8E 1 -E4BD8F 1 -E4BD90 1 -E4BD91 1 -E4BD92 1 -E4BD93 1 -E4BD94 1 -E4BD95 1 -E4BD96 1 -E4BD97 1 -E4BD98 1 -E4BD99 1 -E4BD9A 1 -E4BD9B 1 -E4BD9C 1 -E4BD9D 1 -E4BD9E 1 -E4BD9F 1 -E4BDA0 1 -E4BDA1 1 -E4BDA2 1 -E4BDA3 1 -E4BDA4 1 -E4BDA5 1 -E4BDA6 1 -E4BDA7 1 -E4BDA8 1 -E4BDA9 1 -E4BDAA 1 -E4BDAB 1 -E4BDAC 1 -E4BDAD 1 -E4BDAE 1 -E4BDAF 1 -E4BDB0 1 -E4BDB1 1 -E4BDB2 1 -E4BDB3 1 -E4BDB4 1 -E4BDB5 1 -E4BDB6 1 -E4BDB7 1 -E4BDB8 1 -E4BDB9 1 -E4BDBA 1 -E4BDBB 1 -E4BDBC 1 -E4BDBD 1 -E4BDBE 1 -E4BDBF 1 -E4BE80 1 -E4BE81 1 -E4BE82 1 -E4BE83 1 -E4BE84 1 -E4BE85 1 -E4BE86 1 -E4BE87 1 -E4BE88 1 -E4BE89 1 -E4BE8A 1 -E4BE8B 1 -E4BE8C 1 -E4BE8D 1 -E4BE8E 1 -E4BE8F 1 -E4BE90 1 -E4BE91 1 -E4BE92 1 -E4BE93 1 -E4BE94 1 -E4BE95 1 -E4BE96 1 -E4BE97 1 -E4BE98 1 -E4BE99 1 -E4BE9A 1 -E4BE9B 1 -E4BE9C 1 -E4BE9D 1 -E4BE9E 1 -E4BE9F 1 -E4BEA0 1 -E4BEA1 1 -E4BEA2 1 -E4BEA3 1 -E4BEA4 1 -E4BEA5 1 -E4BEA6 1 -E4BEA7 1 -E4BEA8 1 -E4BEA9 1 -E4BEAA 1 -E4BEAB 1 -E4BEAC 1 -E4BEAD 1 -E4BEAE 1 -E4BEAF 1 -E4BEB0 1 -E4BEB1 1 -E4BEB2 1 -E4BEB3 1 -E4BEB4 1 -E4BEB5 1 -E4BEB6 1 -E4BEB7 1 -E4BEB8 1 -E4BEB9 1 -E4BEBA 1 -E4BEBB 1 -E4BEBC 1 -E4BEBD 1 -E4BEBE 1 -E4BEBF 1 -E4BF80 1 -E4BF81 1 -E4BF82 1 -E4BF83 1 -E4BF84 1 -E4BF85 1 -E4BF86 1 -E4BF87 1 -E4BF88 1 -E4BF89 1 -E4BF8A 1 -E4BF8B 1 -E4BF8C 1 -E4BF8D 1 -E4BF8E 1 -E4BF8F 1 -E4BF90 1 -E4BF91 1 -E4BF92 1 -E4BF93 1 -E4BF94 1 -E4BF95 1 -E4BF96 1 -E4BF97 1 -E4BF98 1 -E4BF99 1 -E4BF9A 1 -E4BF9B 1 -E4BF9C 1 -E4BF9D 1 -E4BF9E 1 -E4BF9F 1 -E4BFA0 1 -E4BFA1 1 -E4BFA2 1 -E4BFA3 1 -E4BFA4 1 -E4BFA5 1 -E4BFA6 1 -E4BFA7 1 -E4BFA8 1 -E4BFA9 1 -E4BFAA 1 -E4BFAB 1 -E4BFAC 1 -E4BFAD 1 -E4BFAE 1 -E4BFAF 1 -E4BFB0 1 -E4BFB1 1 -E4BFB2 1 -E4BFB3 1 -E4BFB4 1 -E4BFB5 1 -E4BFB6 1 -E4BFB7 1 -E4BFB8 1 -E4BFB9 1 -E4BFBA 1 -E4BFBB 1 -E4BFBC 1 -E4BFBD 1 -E4BFBE 1 -E4BFBF 1 -C8B7 1 -C8B8 1 -C8B9 1 -C8BA 1 -C8BB 1 -C8BC 1 -C8BD 1 -C8BE 1 -C8BF 1 -C980 1 -C981 1 -C982 1 -C983 1 -C984 1 -C985 1 -C986 1 -C987 1 -C988 1 -C989 1 -C98A 1 -C98B 1 -C98C 1 -C98D 1 -C98E 1 -C98F 1 -CD98 1 -CD99 1 -CD9A 1 -CD9B 1 -CD9C 1 -CDB0 1 -CDB1 1 -CDB2 1 -CDB3 1 -CDB6 1 -CDB7 1 -CDB8 1 -CDB9 1 -CDBB 1 -CDBC 1 -CDBD 1 -CDBF 1 -CE80 1 -CE81 1 -CE82 1 -CE83 1 -CE8B 1 -CE8D 1 -CEA2 1 -CF8F 1 -CFBC 1 -CFBD 1 -CFBE 1 -CFBF 1 -D287 1 -D38F 1 -D3B6 1 -D3B7 1 -D3BA 1 -D3BB 1 -D3BC 1 -D3BD 1 -D3BE 1 -D3BF 1 -D490 1 -D491 1 -D492 1 -D493 1 -D494 1 -D495 1 -D496 1 -D497 1 -D498 1 -D499 1 -D49A 1 -D49B 1 -D49C 1 -D49D 1 -D49E 1 -D49F 1 -D4A0 1 -D4A1 1 -D4A2 1 -D4A3 1 -D4A4 1 -D4A5 1 -D4A6 1 -D4A7 1 -D4A8 1 -D4A9 1 -D4AA 1 -D4AB 1 -D4AC 1 -D4AD 1 -D4AE 1 -D4AF 1 -D4B0 1 -D597 1 -D598 1 -D5A0 1 -D688 1 -D68B 1 -D68C 1 -D68D 1 -D68E 1 -D68F 1 -D690 1 -D6A2 1 -D6BA 1 -D785 1 -D786 1 -D787 1 -D788 1 -D789 1 -D78A 1 -D78B 1 -D78C 1 -D78D 1 -D78E 1 -D78F 1 -D7AB 1 -D7AC 1 -D7AD 1 -D7AE 1 -D7AF 1 -D7B5 1 -D7B6 1 -D7B7 1 -D7B8 1 -D7B9 1 -D7BA 1 -D7BB 1 -D7BC 1 -D7BD 1 -D7BE 1 -D7BF 1 -D884 1 -D885 1 -D886 1 -D887 1 -D888 1 -D889 1 -D88A 1 -D88B 1 -D896 1 -D897 1 -D898 1 -D899 1 -D89A 1 -D89C 1 -D89D 1 -D89E 1 -D8A0 1 -D8BB 1 -D8BC 1 -D8BD 1 -D8BE 1 -D8BF 1 -D999 1 -D99A 1 -D99B 1 -D99C 1 -D99D 1 -D99E 1 -D99F 1 -DC8E 1 -DD8B 1 -DD8C 1 -DD90 1 -DD91 1 -DD92 1 -DD93 1 -DD94 1 -DD95 1 -DD96 1 -DD97 1 -DD98 1 -DD99 1 -DD9A 1 -DD9B 1 -DD9C 1 -DD9D 1 -DD9E 1 -DD9F 1 -DDA0 1 -DDA1 1 -DDA2 1 -DDA3 1 -DDA4 1 -DDA5 1 -DDA6 1 -DDA7 1 -DDA8 1 -DDA9 1 -DDAA 1 -DDAB 1 -DDAC 1 -DDAD 1 -DDAE 1 -DDAF 1 -DDB0 1 -DDB1 1 -DDB2 1 -DDB3 1 -DDB4 1 -DDB5 1 -DDB6 1 -DDB7 1 -DDB8 1 -DDB9 1 -DDBA 1 -DDBB 1 -DDBC 1 -DDBD 1 -DDBE 1 -DDBF 1 -DEB2 1 -DEB3 1 -DEB4 1 -DEB5 1 -DEB6 1 -DEB7 1 -DEB8 1 -DEB9 1 -DEBA 1 -DEBB 1 -DEBC 1 -DEBD 1 -DEBE 1 -DEBF 1 -DF80 1 -DF81 1 -DF82 1 -DF83 1 -DF84 1 -DF85 1 -DF86 1 -DF87 1 -DF88 1 -DF89 1 -DF8A 1 -DF8B 1 -DF8C 1 -DF8D 1 -DF8E 1 -DF8F 1 -DF90 1 -DF91 1 -DF92 1 -DF93 1 -DF94 1 -DF95 1 -DF96 1 -DF97 1 -DF98 1 -DF99 1 -DF9A 1 -DF9B 1 -DF9C 1 -DF9D 1 -DF9E 1 -DF9F 1 -DFA0 1 -DFA1 1 -DFA2 1 -DFA3 1 -DFA4 1 -DFA5 1 -DFA6 1 -DFA7 1 -DFA8 1 -DFA9 1 -DFAA 1 -DFAB 1 -DFAC 1 -DFAD 1 -DFAE 1 -DFAF 1 -DFB0 1 -DFB1 1 -DFB2 1 -DFB3 1 -DFB4 1 -DFB5 1 -DFB6 1 -DFB7 1 -DFB8 1 -DFB9 1 -DFBA 1 -DFBB 1 -DFBC 1 -DFBD 1 -DFBE 1 -DFBF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_general_ci) ENGINE=NDB CHARACTER SET utf8 COLLATE utf8_general_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_general_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -C380 1 -C381 1 -C382 1 -C383 1 -C384 1 -C385 1 -C3A0 1 -C3A1 1 -C3A2 1 -C3A3 1 -C3A4 1 -C3A5 1 -C480 1 -C481 1 -C482 1 -C483 1 -C484 1 -C485 1 -C78D 1 -C78E 1 -C79E 1 -C79F 1 -C7A0 1 -C7A1 1 -C7BA 1 -C7BB 1 -C880 1 -C881 1 -C882 1 -C883 1 -C8A6 1 -C8A7 1 -42 1 -62 1 -43 1 -63 1 -C387 1 -C3A7 1 -C486 1 -C487 1 -C488 1 -C489 1 -C48A 1 -C48B 1 -C48C 1 -C48D 1 -44 1 -64 1 -C48E 1 -C48F 1 -45 1 -65 1 -C388 1 -C389 1 -C38A 1 -C38B 1 -C3A8 1 -C3A9 1 -C3AA 1 -C3AB 1 -C492 1 -C493 1 -C494 1 -C495 1 -C496 1 -C497 1 -C498 1 -C499 1 -C49A 1 -C49B 1 -C884 1 -C885 1 -C886 1 -C887 1 -C8A8 1 -C8A9 1 -46 1 -66 1 -47 1 -67 1 -C49C 1 -C49D 1 -C49E 1 -C49F 1 -C4A0 1 -C4A1 1 -C4A2 1 -C4A3 1 -C7A6 1 -C7A7 1 -C7B4 1 -C7B5 1 -48 1 -68 1 -C4A4 1 -C4A5 1 -C89E 1 -C89F 1 -49 1 -69 1 -C38C 1 -C38D 1 -C38E 1 -C38F 1 -C3AC 1 -C3AD 1 -C3AE 1 -C3AF 1 -C4A8 1 -C4A9 1 -C4AA 1 -C4AB 1 -C4AC 1 -C4AD 1 -C4AE 1 -C4AF 1 -C4B0 1 -C4B1 1 -C78F 1 -C790 1 -C888 1 -C889 1 -C88A 1 -C88B 1 -4A 1 -6A 1 -C4B4 1 -C4B5 1 -C7B0 1 -4B 1 -6B 1 -C4B6 1 -C4B7 1 -C7A8 1 -C7A9 1 -4C 1 -6C 1 -C4B9 1 -C4BA 1 -C4BB 1 -C4BC 1 -C4BD 1 -C4BE 1 -4D 1 -6D 1 -4E 1 -6E 1 -C391 1 -C3B1 1 -C583 1 -C584 1 -C585 1 -C586 1 -C587 1 -C588 1 -C7B8 1 -C7B9 1 -4F 1 -6F 1 -C392 1 -C393 1 -C394 1 -C395 1 -C396 1 -C3B2 1 -C3B3 1 -C3B4 1 -C3B5 1 -C3B6 1 -C58C 1 -C58D 1 -C58E 1 -C58F 1 -C590 1 -C591 1 -C6A0 1 -C6A1 1 -C791 1 -C792 1 -C7AA 1 -C7AB 1 -C7AC 1 -C7AD 1 -C88C 1 -C88D 1 -C88E 1 -C88F 1 -C8AA 1 -C8AB 1 -C8AC 1 -C8AD 1 -C8AE 1 -C8AF 1 -C8B0 1 -C8B1 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -C594 1 -C595 1 -C596 1 -C597 1 -C598 1 -C599 1 -C890 1 -C891 1 -C892 1 -C893 1 -53 1 -73 1 -C59A 1 -C59B 1 -C59C 1 -C59D 1 -C59E 1 -C59F 1 -C5A0 1 -C5A1 1 -C5BF 1 -C898 1 -C899 1 -54 1 -74 1 -C5A2 1 -C5A3 1 -C5A4 1 -C5A5 1 -C89A 1 -C89B 1 -55 1 -75 1 -C399 1 -C39A 1 -C39B 1 -C39C 1 -C3B9 1 -C3BA 1 -C3BB 1 -C3BC 1 -C5A8 1 -C5A9 1 -C5AA 1 -C5AB 1 -C5AC 1 -C5AD 1 -C5AE 1 -C5AF 1 -C5B0 1 -C5B1 1 -C5B2 1 -C5B3 1 -C6AF 1 -C6B0 1 -C793 1 -C794 1 -C795 1 -C796 1 -C797 1 -C798 1 -C799 1 -C79A 1 -C79B 1 -C79C 1 -C894 1 -C895 1 -C896 1 -C897 1 -56 1 -76 1 -57 1 -77 1 -C5B4 1 -C5B5 1 -58 1 -78 1 -59 1 -79 1 -C39D 1 -C3BD 1 -C3BF 1 -C5B6 1 -C5B7 1 -C5B8 1 -C8B2 1 -C8B3 1 -5A 1 -7A 1 -C5B9 1 -C5BA 1 -C5BB 1 -C5BC 1 -C5BD 1 -C5BE 1 -5B 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -C280 1 -C281 1 -C282 1 -C283 1 -C284 1 -C285 1 -C286 1 -C287 1 -C288 1 -C289 1 -C28A 1 -C28B 1 -C28C 1 -C28D 1 -C28E 1 -C28F 1 -C290 1 -C291 1 -C292 1 -C293 1 -C294 1 -C295 1 -C296 1 -C297 1 -C298 1 -C299 1 -C29A 1 -C29B 1 -C29C 1 -C29D 1 -C29E 1 -C29F 1 -C2A0 1 -C2A1 1 -C2A2 1 -C2A3 1 -C2A4 1 -C2A5 1 -C2A6 1 -C2A7 1 -C2A8 1 -C2A9 1 -C2AA 1 -C2AB 1 -C2AC 1 -C2AD 1 -C2AE 1 -C2AF 1 -C2B0 1 -C2B1 1 -C2B2 1 -C2B3 1 -C2B4 1 -C2B6 1 -C2B7 1 -C2B8 1 -C2B9 1 -C2BA 1 -C2BB 1 -C2BC 1 -C2BD 1 -C2BE 1 -C2BF 1 -C386 1 -C3A6 1 -C7A2 1 -C7A3 1 -C7BC 1 -C7BD 1 -C390 1 -C3B0 1 -C397 1 -C398 1 -C3B8 1 -C7BE 1 -C7BF 1 -C39E 1 -C3BE 1 -C39F 1 -C3B7 1 -C490 1 -C491 1 -C4A6 1 -C4A7 1 -C4B2 1 -C4B3 1 -C4B8 1 -C4BF 1 -C580 1 -C581 1 -C582 1 -C589 1 -C58A 1 -C58B 1 -C592 1 -C593 1 -C5A6 1 -C5A7 1 -C680 1 -C681 1 -C993 1 -C682 1 -C683 1 -C684 1 -C685 1 -C686 1 -C994 1 -C687 1 -C688 1 -C689 1 -C996 1 -C68A 1 -C997 1 -C68B 1 -C68C 1 -C68D 1 -C68E 1 -C79D 1 -C68F 1 -C999 1 -C690 1 -C99B 1 -C691 1 -C692 1 -C693 1 -C9A0 1 -C694 1 -C9A3 1 -C696 1 -C9A9 1 -C697 1 -C9A8 1 -C698 1 -C699 1 -C69A 1 -C69B 1 -C69C 1 -C9AF 1 -C69D 1 -C9B2 1 -C69E 1 -C69F 1 -C9B5 1 -C6A2 1 -C6A3 1 -C6A4 1 -C6A5 1 -C6A6 1 -CA80 1 -C6A7 1 -C6A8 1 -C6A9 1 -CA83 1 -C6AA 1 -C6AB 1 -C6AC 1 -C6AD 1 -C6AE 1 -CA88 1 -C6B1 1 -CA8A 1 -C6B2 1 -CA8B 1 -C6B3 1 -C6B4 1 -C6B5 1 -C6B6 1 -C6B7 1 -C7AE 1 -C7AF 1 -CA92 1 -C6B8 1 -C6B9 1 -C6BA 1 -C6BB 1 -C6BC 1 -C6BD 1 -C6BE 1 -C780 1 -C781 1 -C782 1 -C783 1 -C784 1 -C785 1 -C786 1 -C787 1 -C788 1 -C789 1 -C78A 1 -C78B 1 -C78C 1 -C7A4 1 -C7A5 1 -C7B1 1 -C7B2 1 -C7B3 1 -C695 1 -C7B6 1 -C6BF 1 -C7B7 1 -C89C 1 -C89D 1 -C8A0 1 -C8A1 1 -C8A2 1 -C8A3 1 -C8A4 1 -C8A5 1 -C8B4 1 -C8B5 1 -C8B6 1 -C8B7 1 -C8B8 1 -C8B9 1 -C8BA 1 -C8BB 1 -C8BC 1 -C8BD 1 -C8BE 1 -C8BF 1 -C980 1 -C981 1 -C982 1 -C983 1 -C984 1 -C985 1 -C986 1 -C987 1 -C988 1 -C989 1 -C98A 1 -C98B 1 -C98C 1 -C98D 1 -C98E 1 -C98F 1 -C990 1 -C991 1 -C992 1 -C995 1 -C998 1 -C99A 1 -C99C 1 -C99D 1 -C99E 1 -C99F 1 -C9A1 1 -C9A2 1 -C9A4 1 -C9A5 1 -C9A6 1 -C9A7 1 -C9AA 1 -C9AB 1 -C9AC 1 -C9AD 1 -C9AE 1 -C9B0 1 -C9B1 1 -C9B3 1 -C9B4 1 -C9B6 1 -C9B7 1 -C9B8 1 -C9B9 1 -C9BA 1 -C9BB 1 -C9BC 1 -C9BD 1 -C9BE 1 -C9BF 1 -CA81 1 -CA82 1 -CA84 1 -CA85 1 -CA86 1 -CA87 1 -CA89 1 -CA8C 1 -CA8D 1 -CA8E 1 -CA8F 1 -CA90 1 -CA91 1 -CA93 1 -CA94 1 -CA95 1 -CA96 1 -CA97 1 -CA98 1 -CA99 1 -CA9A 1 -CA9B 1 -CA9C 1 -CA9D 1 -CA9E 1 -CA9F 1 -CAA0 1 -CAA1 1 -CAA2 1 -CAA3 1 -CAA4 1 -CAA5 1 -CAA6 1 -CAA7 1 -CAA8 1 -CAA9 1 -CAAA 1 -CAAB 1 -CAAC 1 -CAAD 1 -CAAE 1 -CAAF 1 -CAB0 1 -CAB1 1 -CAB2 1 -CAB3 1 -CAB4 1 -CAB5 1 -CAB6 1 -CAB7 1 -CAB8 1 -CAB9 1 -CABA 1 -CABB 1 -CABC 1 -CABD 1 -CABE 1 -CABF 1 -CB80 1 -CB81 1 -CB82 1 -CB83 1 -CB84 1 -CB85 1 -CB86 1 -CB87 1 -CB88 1 -CB89 1 -CB8A 1 -CB8B 1 -CB8C 1 -CB8D 1 -CB8E 1 -CB8F 1 -CB90 1 -CB91 1 -CB92 1 -CB93 1 -CB94 1 -CB95 1 -CB96 1 -CB97 1 -CB98 1 -CB99 1 -CB9A 1 -CB9B 1 -CB9C 1 -CB9D 1 -CB9E 1 -CB9F 1 -CBA0 1 -CBA1 1 -CBA2 1 -CBA3 1 -CBA4 1 -CBA5 1 -CBA6 1 -CBA7 1 -CBA8 1 -CBA9 1 -CBAA 1 -CBAB 1 -CBAC 1 -CBAD 1 -CBAE 1 -CBAF 1 -CBB0 1 -CBB1 1 -CBB2 1 -CBB3 1 -CBB4 1 -CBB5 1 -CBB6 1 -CBB7 1 -CBB8 1 -CBB9 1 -CBBA 1 -CBBB 1 -CBBC 1 -CBBD 1 -CBBE 1 -CBBF 1 -CC80 1 -CC81 1 -CC82 1 -CC83 1 -CC84 1 -CC85 1 -CC86 1 -CC87 1 -CC88 1 -CC89 1 -CC8A 1 -CC8B 1 -CC8C 1 -CC8D 1 -CC8E 1 -CC8F 1 -CC90 1 -CC91 1 -CC92 1 -CC93 1 -CC94 1 -CC95 1 -CC96 1 -CC97 1 -CC98 1 -CC99 1 -CC9A 1 -CC9B 1 -CC9C 1 -CC9D 1 -CC9E 1 -CC9F 1 -CCA0 1 -CCA1 1 -CCA2 1 -CCA3 1 -CCA4 1 -CCA5 1 -CCA6 1 -CCA7 1 -CCA8 1 -CCA9 1 -CCAA 1 -CCAB 1 -CCAC 1 -CCAD 1 -CCAE 1 -CCAF 1 -CCB0 1 -CCB1 1 -CCB2 1 -CCB3 1 -CCB4 1 -CCB5 1 -CCB6 1 -CCB7 1 -CCB8 1 -CCB9 1 -CCBA 1 -CCBB 1 -CCBC 1 -CCBD 1 -CCBE 1 -CCBF 1 -CD80 1 -CD81 1 -CD82 1 -CD83 1 -CD84 1 -CD86 1 -CD87 1 -CD88 1 -CD89 1 -CD8A 1 -CD8B 1 -CD8C 1 -CD8D 1 -CD8E 1 -CD8F 1 -CD90 1 -CD91 1 -CD92 1 -CD93 1 -CD94 1 -CD95 1 -CD96 1 -CD97 1 -CD98 1 -CD99 1 -CD9A 1 -CD9B 1 -CD9C 1 -CD9D 1 -CD9E 1 -CD9F 1 -CDA0 1 -CDA1 1 -CDA2 1 -CDA3 1 -CDA4 1 -CDA5 1 -CDA6 1 -CDA7 1 -CDA8 1 -CDA9 1 -CDAA 1 -CDAB 1 -CDAC 1 -CDAD 1 -CDAE 1 -CDAF 1 -CDB0 1 -CDB1 1 -CDB2 1 -CDB3 1 -CDB4 1 -CDB5 1 -CDB6 1 -CDB7 1 -CDB8 1 -CDB9 1 -CDBA 1 -CDBB 1 -CDBC 1 -CDBD 1 -CDBE 1 -CDBF 1 -CE80 1 -CE81 1 -CE82 1 -CE83 1 -CE84 1 -CE85 1 -CE87 1 -CE8B 1 -CE8D 1 -CE86 1 -CE91 1 -CEAC 1 -CEB1 1 -CE92 1 -CEB2 1 -CF90 1 -CE93 1 -CEB3 1 -CE94 1 -CEB4 1 -CE88 1 -CE95 1 -CEAD 1 -CEB5 1 -CE96 1 -CEB6 1 -CE89 1 -CE97 1 -CEAE 1 -CEB7 1 -CE98 1 -CEB8 1 -CF91 1 -CD85 1 -CE8A 1 -CE90 1 -CE99 1 -CEAA 1 -CEAF 1 -CEB9 1 -CF8A 1 -CE9A 1 -CEBA 1 -CFB0 1 -CE9B 1 -CEBB 1 -C2B5 1 -CE9C 1 -CEBC 1 -CE9D 1 -CEBD 1 -CE9E 1 -CEBE 1 -CE8C 1 -CE9F 1 -CEBF 1 -CF8C 1 -CEA0 1 -CF80 1 -CF96 1 -CEA1 1 -CF81 1 -CFB1 1 -CEA2 1 -CEA3 1 -CF82 1 -CF83 1 -CFB2 1 -CEA4 1 -CF84 1 -CE8E 1 -CEA5 1 -CEAB 1 -CEB0 1 -CF85 1 -CF8B 1 -CF8D 1 -CEA6 1 -CF86 1 -CF95 1 -CEA7 1 -CF87 1 -CEA8 1 -CF88 1 -CE8F 1 -CEA9 1 -CF89 1 -CF8E 1 -CF8F 1 -CF92 1 -CF93 1 -CF94 1 -CF97 1 -CF98 1 -CF99 1 -CF9A 1 -CF9B 1 -CF9C 1 -CF9D 1 -CF9E 1 -CF9F 1 -CFA0 1 -CFA1 1 -CFA2 1 -CFA3 1 -CFA4 1 -CFA5 1 -CFA6 1 -CFA7 1 -CFA8 1 -CFA9 1 -CFAA 1 -CFAB 1 -CFAC 1 -CFAD 1 -CFAE 1 -CFAF 1 -CFB3 1 -CFB4 1 -CFB5 1 -CFB6 1 -CFB7 1 -CFB8 1 -CFB9 1 -CFBA 1 -CFBB 1 -CFBC 1 -CFBD 1 -CFBE 1 -CFBF 1 -D082 1 -D192 1 -D084 1 -D194 1 -D085 1 -D195 1 -D086 1 -D087 1 -D196 1 -D197 1 -D088 1 -D198 1 -D089 1 -D199 1 -D08A 1 -D19A 1 -D08B 1 -D19B 1 -D08F 1 -D19F 1 -D090 1 -D0B0 1 -D390 1 -D391 1 -D392 1 -D393 1 -D091 1 -D0B1 1 -D092 1 -D0B2 1 -D083 1 -D093 1 -D0B3 1 -D193 1 -D094 1 -D0B4 1 -D080 1 -D081 1 -D095 1 -D0B5 1 -D190 1 -D191 1 -D396 1 -D397 1 -D096 1 -D0B6 1 -D381 1 -D382 1 -D39C 1 -D39D 1 -D097 1 -D0B7 1 -D39E 1 -D39F 1 -D08D 1 -D098 1 -D0B8 1 -D19D 1 -D3A2 1 -D3A3 1 -D3A4 1 -D3A5 1 -D099 1 -D0B9 1 -D08C 1 -D09A 1 -D0BA 1 -D19C 1 -D09B 1 -D0BB 1 -D09C 1 -D0BC 1 -D09D 1 -D0BD 1 -D09E 1 -D0BE 1 -D3A6 1 -D3A7 1 -D09F 1 -D0BF 1 -D0A0 1 -D180 1 -D0A1 1 -D181 1 -D0A2 1 -D182 1 -D08E 1 -D0A3 1 -D183 1 -D19E 1 -D3AE 1 -D3AF 1 -D3B0 1 -D3B1 1 -D3B2 1 -D3B3 1 -D0A4 1 -D184 1 -D0A5 1 -D185 1 -D0A6 1 -D186 1 -D0A7 1 -D187 1 -D3B4 1 -D3B5 1 -D0A8 1 -D188 1 -D0A9 1 -D189 1 -D0AA 1 -D18A 1 -D0AB 1 -D18B 1 -D3B8 1 -D3B9 1 -D0AC 1 -D18C 1 -D0AD 1 -D18D 1 -D3AC 1 -D3AD 1 -D0AE 1 -D18E 1 -D0AF 1 -D18F 1 -D1A0 1 -D1A1 1 -D1A2 1 -D1A3 1 -D1A4 1 -D1A5 1 -D1A6 1 -D1A7 1 -D1A8 1 -D1A9 1 -D1AA 1 -D1AB 1 -D1AC 1 -D1AD 1 -D1AE 1 -D1AF 1 -D1B0 1 -D1B1 1 -D1B2 1 -D1B3 1 -D1B4 1 -D1B5 1 -D1B6 1 -D1B7 1 -D1B8 1 -D1B9 1 -D1BA 1 -D1BB 1 -D1BC 1 -D1BD 1 -D1BE 1 -D1BF 1 -D280 1 -D281 1 -D282 1 -D283 1 -D284 1 -D285 1 -D286 1 -D287 1 -D288 1 -D289 1 -D28A 1 -D28B 1 -D28C 1 -D28D 1 -D28E 1 -D28F 1 -D290 1 -D291 1 -D292 1 -D293 1 -D294 1 -D295 1 -D296 1 -D297 1 -D298 1 -D299 1 -D29A 1 -D29B 1 -D29C 1 -D29D 1 -D29E 1 -D29F 1 -D2A0 1 -D2A1 1 -D2A2 1 -D2A3 1 -D2A4 1 -D2A5 1 -D2A6 1 -D2A7 1 -D2A8 1 -D2A9 1 -D2AA 1 -D2AB 1 -D2AC 1 -D2AD 1 -D2AE 1 -D2AF 1 -D2B0 1 -D2B1 1 -D2B2 1 -D2B3 1 -D2B4 1 -D2B5 1 -D2B6 1 -D2B7 1 -D2B8 1 -D2B9 1 -D2BA 1 -D2BB 1 -D2BC 1 -D2BD 1 -D2BE 1 -D2BF 1 -D380 1 -D383 1 -D384 1 -D385 1 -D386 1 -D387 1 -D388 1 -D389 1 -D38A 1 -D38B 1 -D38C 1 -D38D 1 -D38E 1 -D38F 1 -D394 1 -D395 1 -D398 1 -D399 1 -D39A 1 -D39B 1 -D3A0 1 -D3A1 1 -D3A8 1 -D3A9 1 -D3AA 1 -D3AB 1 -D3B6 1 -D3B7 1 -D3BA 1 -D3BB 1 -D3BC 1 -D3BD 1 -D3BE 1 -D3BF 1 -D480 1 -D481 1 -D482 1 -D483 1 -D484 1 -D485 1 -D486 1 -D487 1 -D488 1 -D489 1 -D48A 1 -D48B 1 -D48C 1 -D48D 1 -D48E 1 -D48F 1 -D490 1 -D491 1 -D492 1 -D493 1 -D494 1 -D495 1 -D496 1 -D497 1 -D498 1 -D499 1 -D49A 1 -D49B 1 -D49C 1 -D49D 1 -D49E 1 -D49F 1 -D4A0 1 -D4A1 1 -D4A2 1 -D4A3 1 -D4A4 1 -D4A5 1 -D4A6 1 -D4A7 1 -D4A8 1 -D4A9 1 -D4AA 1 -D4AB 1 -D4AC 1 -D4AD 1 -D4AE 1 -D4AF 1 -D4B0 1 -D4B1 1 -D5A1 1 -D4B2 1 -D5A2 1 -D4B3 1 -D5A3 1 -D4B4 1 -D5A4 1 -D4B5 1 -D5A5 1 -D4B6 1 -D5A6 1 -D4B7 1 -D5A7 1 -D4B8 1 -D5A8 1 -D4B9 1 -D5A9 1 -D4BA 1 -D5AA 1 -D4BB 1 -D5AB 1 -D4BC 1 -D5AC 1 -D4BD 1 -D5AD 1 -D4BE 1 -D5AE 1 -D4BF 1 -D5AF 1 -D580 1 -D5B0 1 -D581 1 -D5B1 1 -D582 1 -D5B2 1 -D583 1 -D5B3 1 -D584 1 -D5B4 1 -D585 1 -D5B5 1 -D586 1 -D5B6 1 -D587 1 -D5B7 1 -D588 1 -D5B8 1 -D589 1 -D5B9 1 -D58A 1 -D5BA 1 -D58B 1 -D5BB 1 -D58C 1 -D5BC 1 -D58D 1 -D5BD 1 -D58E 1 -D5BE 1 -D58F 1 -D5BF 1 -D590 1 -D680 1 -D591 1 -D681 1 -D592 1 -D682 1 -D593 1 -D683 1 -D594 1 -D684 1 -D595 1 -D685 1 -D596 1 -D686 1 -D597 1 -D598 1 -D599 1 -D59A 1 -D59B 1 -D59C 1 -D59D 1 -D59E 1 -D59F 1 -D5A0 1 -D687 1 -D688 1 -D689 1 -D68A 1 -D68B 1 -D68C 1 -D68D 1 -D68E 1 -D68F 1 -D690 1 -D691 1 -D692 1 -D693 1 -D694 1 -D695 1 -D696 1 -D697 1 -D698 1 -D699 1 -D69A 1 -D69B 1 -D69C 1 -D69D 1 -D69E 1 -D69F 1 -D6A0 1 -D6A1 1 -D6A2 1 -D6A3 1 -D6A4 1 -D6A5 1 -D6A6 1 -D6A7 1 -D6A8 1 -D6A9 1 -D6AA 1 -D6AB 1 -D6AC 1 -D6AD 1 -D6AE 1 -D6AF 1 -D6B0 1 -D6B1 1 -D6B2 1 -D6B3 1 -D6B4 1 -D6B5 1 -D6B6 1 -D6B7 1 -D6B8 1 -D6B9 1 -D6BA 1 -D6BB 1 -D6BC 1 -D6BD 1 -D6BE 1 -D6BF 1 -D780 1 -D781 1 -D782 1 -D783 1 -D784 1 -D785 1 -D786 1 -D787 1 -D788 1 -D789 1 -D78A 1 -D78B 1 -D78C 1 -D78D 1 -D78E 1 -D78F 1 -D790 1 -D791 1 -D792 1 -D793 1 -D794 1 -D795 1 -D796 1 -D797 1 -D798 1 -D799 1 -D79A 1 -D79B 1 -D79C 1 -D79D 1 -D79E 1 -D79F 1 -D7A0 1 -D7A1 1 -D7A2 1 -D7A3 1 -D7A4 1 -D7A5 1 -D7A6 1 -D7A7 1 -D7A8 1 -D7A9 1 -D7AA 1 -D7AB 1 -D7AC 1 -D7AD 1 -D7AE 1 -D7AF 1 -D7B0 1 -D7B1 1 -D7B2 1 -D7B3 1 -D7B4 1 -D7B5 1 -D7B6 1 -D7B7 1 -D7B8 1 -D7B9 1 -D7BA 1 -D7BB 1 -D7BC 1 -D7BD 1 -D7BE 1 -D7BF 1 -D880 1 -D881 1 -D882 1 -D883 1 -D884 1 -D885 1 -D886 1 -D887 1 -D888 1 -D889 1 -D88A 1 -D88B 1 -D88C 1 -D88D 1 -D88E 1 -D88F 1 -D890 1 -D891 1 -D892 1 -D893 1 -D894 1 -D895 1 -D896 1 -D897 1 -D898 1 -D899 1 -D89A 1 -D89B 1 -D89C 1 -D89D 1 -D89E 1 -D89F 1 -D8A0 1 -D8A1 1 -D8A2 1 -D8A3 1 -D8A4 1 -D8A5 1 -D8A6 1 -D8A7 1 -D8A8 1 -D8A9 1 -D8AA 1 -D8AB 1 -D8AC 1 -D8AD 1 -D8AE 1 -D8AF 1 -D8B0 1 -D8B1 1 -D8B2 1 -D8B3 1 -D8B4 1 -D8B5 1 -D8B6 1 -D8B7 1 -D8B8 1 -D8B9 1 -D8BA 1 -D8BB 1 -D8BC 1 -D8BD 1 -D8BE 1 -D8BF 1 -D980 1 -D981 1 -D982 1 -D983 1 -D984 1 -D985 1 -D986 1 -D987 1 -D988 1 -D989 1 -D98A 1 -D98B 1 -D98C 1 -D98D 1 -D98E 1 -D98F 1 -D990 1 -D991 1 -D992 1 -D993 1 -D994 1 -D995 1 -D996 1 -D997 1 -D998 1 -D999 1 -D99A 1 -D99B 1 -D99C 1 -D99D 1 -D99E 1 -D99F 1 -D9A0 1 -D9A1 1 -D9A2 1 -D9A3 1 -D9A4 1 -D9A5 1 -D9A6 1 -D9A7 1 -D9A8 1 -D9A9 1 -D9AA 1 -D9AB 1 -D9AC 1 -D9AD 1 -D9AE 1 -D9AF 1 -D9B0 1 -D9B1 1 -D9B2 1 -D9B3 1 -D9B4 1 -D9B5 1 -D9B6 1 -D9B7 1 -D9B8 1 -D9B9 1 -D9BA 1 -D9BB 1 -D9BC 1 -D9BD 1 -D9BE 1 -D9BF 1 -DA80 1 -DA81 1 -DA82 1 -DA83 1 -DA84 1 -DA85 1 -DA86 1 -DA87 1 -DA88 1 -DA89 1 -DA8A 1 -DA8B 1 -DA8C 1 -DA8D 1 -DA8E 1 -DA8F 1 -DA90 1 -DA91 1 -DA92 1 -DA93 1 -DA94 1 -DA95 1 -DA96 1 -DA97 1 -DA98 1 -DA99 1 -DA9A 1 -DA9B 1 -DA9C 1 -DA9D 1 -DA9E 1 -DA9F 1 -DAA0 1 -DAA1 1 -DAA2 1 -DAA3 1 -DAA4 1 -DAA5 1 -DAA6 1 -DAA7 1 -DAA8 1 -DAA9 1 -DAAA 1 -DAAB 1 -DAAC 1 -DAAD 1 -DAAE 1 -DAAF 1 -DAB0 1 -DAB1 1 -DAB2 1 -DAB3 1 -DAB4 1 -DAB5 1 -DAB6 1 -DAB7 1 -DAB8 1 -DAB9 1 -DABA 1 -DABB 1 -DABC 1 -DABD 1 -DABE 1 -DABF 1 -DB80 1 -DB81 1 -DB82 1 -DB83 1 -DB84 1 -DB85 1 -DB86 1 -DB87 1 -DB88 1 -DB89 1 -DB8A 1 -DB8B 1 -DB8C 1 -DB8D 1 -DB8E 1 -DB8F 1 -DB90 1 -DB91 1 -DB92 1 -DB93 1 -DB94 1 -DB95 1 -DB96 1 -DB97 1 -DB98 1 -DB99 1 -DB9A 1 -DB9B 1 -DB9C 1 -DB9D 1 -DB9E 1 -DB9F 1 -DBA0 1 -DBA1 1 -DBA2 1 -DBA3 1 -DBA4 1 -DBA5 1 -DBA6 1 -DBA7 1 -DBA8 1 -DBA9 1 -DBAA 1 -DBAB 1 -DBAC 1 -DBAD 1 -DBAE 1 -DBAF 1 -DBB0 1 -DBB1 1 -DBB2 1 -DBB3 1 -DBB4 1 -DBB5 1 -DBB6 1 -DBB7 1 -DBB8 1 -DBB9 1 -DBBA 1 -DBBB 1 -DBBC 1 -DBBD 1 -DBBE 1 -DBBF 1 -DC80 1 -DC81 1 -DC82 1 -DC83 1 -DC84 1 -DC85 1 -DC86 1 -DC87 1 -DC88 1 -DC89 1 -DC8A 1 -DC8B 1 -DC8C 1 -DC8D 1 -DC8E 1 -DC8F 1 -DC90 1 -DC91 1 -DC92 1 -DC93 1 -DC94 1 -DC95 1 -DC96 1 -DC97 1 -DC98 1 -DC99 1 -DC9A 1 -DC9B 1 -DC9C 1 -DC9D 1 -DC9E 1 -DC9F 1 -DCA0 1 -DCA1 1 -DCA2 1 -DCA3 1 -DCA4 1 -DCA5 1 -DCA6 1 -DCA7 1 -DCA8 1 -DCA9 1 -DCAA 1 -DCAB 1 -DCAC 1 -DCAD 1 -DCAE 1 -DCAF 1 -DCB0 1 -DCB1 1 -DCB2 1 -DCB3 1 -DCB4 1 -DCB5 1 -DCB6 1 -DCB7 1 -DCB8 1 -DCB9 1 -DCBA 1 -DCBB 1 -DCBC 1 -DCBD 1 -DCBE 1 -DCBF 1 -DD80 1 -DD81 1 -DD82 1 -DD83 1 -DD84 1 -DD85 1 -DD86 1 -DD87 1 -DD88 1 -DD89 1 -DD8A 1 -DD8B 1 -DD8C 1 -DD8D 1 -DD8E 1 -DD8F 1 -DD90 1 -DD91 1 -DD92 1 -DD93 1 -DD94 1 -DD95 1 -DD96 1 -DD97 1 -DD98 1 -DD99 1 -DD9A 1 -DD9B 1 -DD9C 1 -DD9D 1 -DD9E 1 -DD9F 1 -DDA0 1 -DDA1 1 -DDA2 1 -DDA3 1 -DDA4 1 -DDA5 1 -DDA6 1 -DDA7 1 -DDA8 1 -DDA9 1 -DDAA 1 -DDAB 1 -DDAC 1 -DDAD 1 -DDAE 1 -DDAF 1 -DDB0 1 -DDB1 1 -DDB2 1 -DDB3 1 -DDB4 1 -DDB5 1 -DDB6 1 -DDB7 1 -DDB8 1 -DDB9 1 -DDBA 1 -DDBB 1 -DDBC 1 -DDBD 1 -DDBE 1 -DDBF 1 -DE80 1 -DE81 1 -DE82 1 -DE83 1 -DE84 1 -DE85 1 -DE86 1 -DE87 1 -DE88 1 -DE89 1 -DE8A 1 -DE8B 1 -DE8C 1 -DE8D 1 -DE8E 1 -DE8F 1 -DE90 1 -DE91 1 -DE92 1 -DE93 1 -DE94 1 -DE95 1 -DE96 1 -DE97 1 -DE98 1 -DE99 1 -DE9A 1 -DE9B 1 -DE9C 1 -DE9D 1 -DE9E 1 -DE9F 1 -DEA0 1 -DEA1 1 -DEA2 1 -DEA3 1 -DEA4 1 -DEA5 1 -DEA6 1 -DEA7 1 -DEA8 1 -DEA9 1 -DEAA 1 -DEAB 1 -DEAC 1 -DEAD 1 -DEAE 1 -DEAF 1 -DEB0 1 -DEB1 1 -DEB2 1 -DEB3 1 -DEB4 1 -DEB5 1 -DEB6 1 -DEB7 1 -DEB8 1 -DEB9 1 -DEBA 1 -DEBB 1 -DEBC 1 -DEBD 1 -DEBE 1 -DEBF 1 -DF80 1 -DF81 1 -DF82 1 -DF83 1 -DF84 1 -DF85 1 -DF86 1 -DF87 1 -DF88 1 -DF89 1 -DF8A 1 -DF8B 1 -DF8C 1 -DF8D 1 -DF8E 1 -DF8F 1 -DF90 1 -DF91 1 -DF92 1 -DF93 1 -DF94 1 -DF95 1 -DF96 1 -DF97 1 -DF98 1 -DF99 1 -DF9A 1 -DF9B 1 -DF9C 1 -DF9D 1 -DF9E 1 -DF9F 1 -DFA0 1 -DFA1 1 -DFA2 1 -DFA3 1 -DFA4 1 -DFA5 1 -DFA6 1 -DFA7 1 -DFA8 1 -DFA9 1 -DFAA 1 -DFAB 1 -DFAC 1 -DFAD 1 -DFAE 1 -DFAF 1 -DFB0 1 -DFB1 1 -DFB2 1 -DFB3 1 -DFB4 1 -DFB5 1 -DFB6 1 -DFB7 1 -DFB8 1 -DFB9 1 -DFBA 1 -DFBB 1 -DFBC 1 -DFBD 1 -DFBE 1 -DFBF 1 -E4B880 1 -E4B881 1 -E4B882 1 -E4B883 1 -E4B884 1 -E4B885 1 -E4B886 1 -E4B887 1 -E4B888 1 -E4B889 1 -E4B88A 1 -E4B88B 1 -E4B88C 1 -E4B88D 1 -E4B88E 1 -E4B88F 1 -E4B890 1 -E4B891 1 -E4B892 1 -E4B893 1 -E4B894 1 -E4B895 1 -E4B896 1 -E4B897 1 -E4B898 1 -E4B899 1 -E4B89A 1 -E4B89B 1 -E4B89C 1 -E4B89D 1 -E4B89E 1 -E4B89F 1 -E4B8A0 1 -E4B8A1 1 -E4B8A2 1 -E4B8A3 1 -E4B8A4 1 -E4B8A5 1 -E4B8A6 1 -E4B8A7 1 -E4B8A8 1 -E4B8A9 1 -E4B8AA 1 -E4B8AB 1 -E4B8AC 1 -E4B8AD 1 -E4B8AE 1 -E4B8AF 1 -E4B8B0 1 -E4B8B1 1 -E4B8B2 1 -E4B8B3 1 -E4B8B4 1 -E4B8B5 1 -E4B8B6 1 -E4B8B7 1 -E4B8B8 1 -E4B8B9 1 -E4B8BA 1 -E4B8BB 1 -E4B8BC 1 -E4B8BD 1 -E4B8BE 1 -E4B8BF 1 -E4B980 1 -E4B981 1 -E4B982 1 -E4B983 1 -E4B984 1 -E4B985 1 -E4B986 1 -E4B987 1 -E4B988 1 -E4B989 1 -E4B98A 1 -E4B98B 1 -E4B98C 1 -E4B98D 1 -E4B98E 1 -E4B98F 1 -E4B990 1 -E4B991 1 -E4B992 1 -E4B993 1 -E4B994 1 -E4B995 1 -E4B996 1 -E4B997 1 -E4B998 1 -E4B999 1 -E4B99A 1 -E4B99B 1 -E4B99C 1 -E4B99D 1 -E4B99E 1 -E4B99F 1 -E4B9A0 1 -E4B9A1 1 -E4B9A2 1 -E4B9A3 1 -E4B9A4 1 -E4B9A5 1 -E4B9A6 1 -E4B9A7 1 -E4B9A8 1 -E4B9A9 1 -E4B9AA 1 -E4B9AB 1 -E4B9AC 1 -E4B9AD 1 -E4B9AE 1 -E4B9AF 1 -E4B9B0 1 -E4B9B1 1 -E4B9B2 1 -E4B9B3 1 -E4B9B4 1 -E4B9B5 1 -E4B9B6 1 -E4B9B7 1 -E4B9B8 1 -E4B9B9 1 -E4B9BA 1 -E4B9BB 1 -E4B9BC 1 -E4B9BD 1 -E4B9BE 1 -E4B9BF 1 -E4BA80 1 -E4BA81 1 -E4BA82 1 -E4BA83 1 -E4BA84 1 -E4BA85 1 -E4BA86 1 -E4BA87 1 -E4BA88 1 -E4BA89 1 -E4BA8A 1 -E4BA8B 1 -E4BA8C 1 -E4BA8D 1 -E4BA8E 1 -E4BA8F 1 -E4BA90 1 -E4BA91 1 -E4BA92 1 -E4BA93 1 -E4BA94 1 -E4BA95 1 -E4BA96 1 -E4BA97 1 -E4BA98 1 -E4BA99 1 -E4BA9A 1 -E4BA9B 1 -E4BA9C 1 -E4BA9D 1 -E4BA9E 1 -E4BA9F 1 -E4BAA0 1 -E4BAA1 1 -E4BAA2 1 -E4BAA3 1 -E4BAA4 1 -E4BAA5 1 -E4BAA6 1 -E4BAA7 1 -E4BAA8 1 -E4BAA9 1 -E4BAAA 1 -E4BAAB 1 -E4BAAC 1 -E4BAAD 1 -E4BAAE 1 -E4BAAF 1 -E4BAB0 1 -E4BAB1 1 -E4BAB2 1 -E4BAB3 1 -E4BAB4 1 -E4BAB5 1 -E4BAB6 1 -E4BAB7 1 -E4BAB8 1 -E4BAB9 1 -E4BABA 1 -E4BABB 1 -E4BABC 1 -E4BABD 1 -E4BABE 1 -E4BABF 1 -E4BB80 1 -E4BB81 1 -E4BB82 1 -E4BB83 1 -E4BB84 1 -E4BB85 1 -E4BB86 1 -E4BB87 1 -E4BB88 1 -E4BB89 1 -E4BB8A 1 -E4BB8B 1 -E4BB8C 1 -E4BB8D 1 -E4BB8E 1 -E4BB8F 1 -E4BB90 1 -E4BB91 1 -E4BB92 1 -E4BB93 1 -E4BB94 1 -E4BB95 1 -E4BB96 1 -E4BB97 1 -E4BB98 1 -E4BB99 1 -E4BB9A 1 -E4BB9B 1 -E4BB9C 1 -E4BB9D 1 -E4BB9E 1 -E4BB9F 1 -E4BBA0 1 -E4BBA1 1 -E4BBA2 1 -E4BBA3 1 -E4BBA4 1 -E4BBA5 1 -E4BBA6 1 -E4BBA7 1 -E4BBA8 1 -E4BBA9 1 -E4BBAA 1 -E4BBAB 1 -E4BBAC 1 -E4BBAD 1 -E4BBAE 1 -E4BBAF 1 -E4BBB0 1 -E4BBB1 1 -E4BBB2 1 -E4BBB3 1 -E4BBB4 1 -E4BBB5 1 -E4BBB6 1 -E4BBB7 1 -E4BBB8 1 -E4BBB9 1 -E4BBBA 1 -E4BBBB 1 -E4BBBC 1 -E4BBBD 1 -E4BBBE 1 -E4BBBF 1 -E4BC80 1 -E4BC81 1 -E4BC82 1 -E4BC83 1 -E4BC84 1 -E4BC85 1 -E4BC86 1 -E4BC87 1 -E4BC88 1 -E4BC89 1 -E4BC8A 1 -E4BC8B 1 -E4BC8C 1 -E4BC8D 1 -E4BC8E 1 -E4BC8F 1 -E4BC90 1 -E4BC91 1 -E4BC92 1 -E4BC93 1 -E4BC94 1 -E4BC95 1 -E4BC96 1 -E4BC97 1 -E4BC98 1 -E4BC99 1 -E4BC9A 1 -E4BC9B 1 -E4BC9C 1 -E4BC9D 1 -E4BC9E 1 -E4BC9F 1 -E4BCA0 1 -E4BCA1 1 -E4BCA2 1 -E4BCA3 1 -E4BCA4 1 -E4BCA5 1 -E4BCA6 1 -E4BCA7 1 -E4BCA8 1 -E4BCA9 1 -E4BCAA 1 -E4BCAB 1 -E4BCAC 1 -E4BCAD 1 -E4BCAE 1 -E4BCAF 1 -E4BCB0 1 -E4BCB1 1 -E4BCB2 1 -E4BCB3 1 -E4BCB4 1 -E4BCB5 1 -E4BCB6 1 -E4BCB7 1 -E4BCB8 1 -E4BCB9 1 -E4BCBA 1 -E4BCBB 1 -E4BCBC 1 -E4BCBD 1 -E4BCBE 1 -E4BCBF 1 -E4BD80 1 -E4BD81 1 -E4BD82 1 -E4BD83 1 -E4BD84 1 -E4BD85 1 -E4BD86 1 -E4BD87 1 -E4BD88 1 -E4BD89 1 -E4BD8A 1 -E4BD8B 1 -E4BD8C 1 -E4BD8D 1 -E4BD8E 1 -E4BD8F 1 -E4BD90 1 -E4BD91 1 -E4BD92 1 -E4BD93 1 -E4BD94 1 -E4BD95 1 -E4BD96 1 -E4BD97 1 -E4BD98 1 -E4BD99 1 -E4BD9A 1 -E4BD9B 1 -E4BD9C 1 -E4BD9D 1 -E4BD9E 1 -E4BD9F 1 -E4BDA0 1 -E4BDA1 1 -E4BDA2 1 -E4BDA3 1 -E4BDA4 1 -E4BDA5 1 -E4BDA6 1 -E4BDA7 1 -E4BDA8 1 -E4BDA9 1 -E4BDAA 1 -E4BDAB 1 -E4BDAC 1 -E4BDAD 1 -E4BDAE 1 -E4BDAF 1 -E4BDB0 1 -E4BDB1 1 -E4BDB2 1 -E4BDB3 1 -E4BDB4 1 -E4BDB5 1 -E4BDB6 1 -E4BDB7 1 -E4BDB8 1 -E4BDB9 1 -E4BDBA 1 -E4BDBB 1 -E4BDBC 1 -E4BDBD 1 -E4BDBE 1 -E4BDBF 1 -E4BE80 1 -E4BE81 1 -E4BE82 1 -E4BE83 1 -E4BE84 1 -E4BE85 1 -E4BE86 1 -E4BE87 1 -E4BE88 1 -E4BE89 1 -E4BE8A 1 -E4BE8B 1 -E4BE8C 1 -E4BE8D 1 -E4BE8E 1 -E4BE8F 1 -E4BE90 1 -E4BE91 1 -E4BE92 1 -E4BE93 1 -E4BE94 1 -E4BE95 1 -E4BE96 1 -E4BE97 1 -E4BE98 1 -E4BE99 1 -E4BE9A 1 -E4BE9B 1 -E4BE9C 1 -E4BE9D 1 -E4BE9E 1 -E4BE9F 1 -E4BEA0 1 -E4BEA1 1 -E4BEA2 1 -E4BEA3 1 -E4BEA4 1 -E4BEA5 1 -E4BEA6 1 -E4BEA7 1 -E4BEA8 1 -E4BEA9 1 -E4BEAA 1 -E4BEAB 1 -E4BEAC 1 -E4BEAD 1 -E4BEAE 1 -E4BEAF 1 -E4BEB0 1 -E4BEB1 1 -E4BEB2 1 -E4BEB3 1 -E4BEB4 1 -E4BEB5 1 -E4BEB6 1 -E4BEB7 1 -E4BEB8 1 -E4BEB9 1 -E4BEBA 1 -E4BEBB 1 -E4BEBC 1 -E4BEBD 1 -E4BEBE 1 -E4BEBF 1 -E4BF80 1 -E4BF81 1 -E4BF82 1 -E4BF83 1 -E4BF84 1 -E4BF85 1 -E4BF86 1 -E4BF87 1 -E4BF88 1 -E4BF89 1 -E4BF8A 1 -E4BF8B 1 -E4BF8C 1 -E4BF8D 1 -E4BF8E 1 -E4BF8F 1 -E4BF90 1 -E4BF91 1 -E4BF92 1 -E4BF93 1 -E4BF94 1 -E4BF95 1 -E4BF96 1 -E4BF97 1 -E4BF98 1 -E4BF99 1 -E4BF9A 1 -E4BF9B 1 -E4BF9C 1 -E4BF9D 1 -E4BF9E 1 -E4BF9F 1 -E4BFA0 1 -E4BFA1 1 -E4BFA2 1 -E4BFA3 1 -E4BFA4 1 -E4BFA5 1 -E4BFA6 1 -E4BFA7 1 -E4BFA8 1 -E4BFA9 1 -E4BFAA 1 -E4BFAB 1 -E4BFAC 1 -E4BFAD 1 -E4BFAE 1 -E4BFAF 1 -E4BFB0 1 -E4BFB1 1 -E4BFB2 1 -E4BFB3 1 -E4BFB4 1 -E4BFB5 1 -E4BFB6 1 -E4BFB7 1 -E4BFB8 1 -E4BFB9 1 -E4BFBA 1 -E4BFBB 1 -E4BFBC 1 -E4BFBD 1 -E4BFBE 1 -E4BFBF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_hungarian_ci) ENGINE=NDB CHARACTER SET utf8 COLLATE utf8_hungarian_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_hungarian_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -C285 1 -7F 1 -C280 1 -C281 1 -C282 1 -C283 1 -C284 1 -C286 1 -C287 1 -C288 1 -C289 1 -C28A 1 -C28B 1 -C28C 1 -C28D 1 -C28E 1 -C28F 1 -C290 1 -C291 1 -C292 1 -C293 1 -C294 1 -C295 1 -C296 1 -C297 1 -C298 1 -C299 1 -C29A 1 -C29B 1 -C29C 1 -C29D 1 -C29E 1 -C29F 1 -C2A0 1 -CC80 1 -CC81 1 -CC82 1 -CC83 1 -CC84 1 -CC85 1 -CC86 1 -CC87 1 -CC88 1 -CC89 1 -CC8A 1 -CC8B 1 -CC8C 1 -CC8D 1 -CC8E 1 -CC8F 1 -CC90 1 -CC91 1 -CC92 1 -CC93 1 -CC94 1 -CC95 1 -CC96 1 -CC97 1 -CC98 1 -CC99 1 -CC9A 1 -CC9B 1 -CC9C 1 -CC9D 1 -CC9E 1 -CC9F 1 -CCA0 1 -CCA1 1 -CCA2 1 -CCA3 1 -CCA4 1 -CCA5 1 -CCA6 1 -CCA7 1 -CCA8 1 -CCA9 1 -CCAA 1 -CCAB 1 -CCAC 1 -CCAD 1 -CCAE 1 -CCAF 1 -CCB0 1 -CCB1 1 -CCB2 1 -CCB3 1 -CCB4 1 -CCB5 1 -CCB6 1 -CCB7 1 -CCB8 1 -CCB9 1 -CCBA 1 -CCBB 1 -CCBC 1 -CCBD 1 -CCBE 1 -CCBF 1 -CD80 1 -CD81 1 -CD82 1 -CD83 1 -CD84 1 -CD85 1 -CD86 1 -CD87 1 -CD88 1 -CD89 1 -CD8A 1 -CD8B 1 -CD8C 1 -CD8D 1 -CD8E 1 -CD8F 1 -CD90 1 -CD91 1 -CD92 1 -CD93 1 -CD94 1 -CD95 1 -CD96 1 -CD97 1 -CD9D 1 -CD9E 1 -CD9F 1 -CDA0 1 -CDA1 1 -CDA2 1 -D283 1 -D284 1 -D285 1 -D286 1 -D288 1 -D289 1 -D691 1 -D692 1 -D693 1 -D694 1 -D695 1 -D696 1 -D697 1 -D698 1 -D699 1 -D69A 1 -D69B 1 -D69C 1 -D69D 1 -D69E 1 -D69F 1 -D6A0 1 -D6A1 1 -D6A3 1 -D6A4 1 -D6A5 1 -D6A6 1 -D6A7 1 -D6A8 1 -D6A9 1 -D6AA 1 -D6AB 1 -D6AC 1 -D6AD 1 -D6AE 1 -D6AF 1 -D6B0 1 -D6B1 1 -D6B2 1 -D6B3 1 -D6B4 1 -D6B5 1 -D6B6 1 -D6B7 1 -D6B8 1 -D6B9 1 -D6BB 1 -D6BC 1 -D6BD 1 -D6BF 1 -D781 1 -D782 1 -D784 1 -D880 1 -D881 1 -D882 1 -D883 1 -D890 1 -D891 1 -D892 1 -D893 1 -D894 1 -D895 1 -D98B 1 -D98C 1 -D98D 1 -D98E 1 -D98F 1 -D990 1 -D991 1 -D992 1 -D993 1 -D994 1 -D995 1 -D996 1 -D997 1 -D998 1 -D9B0 1 -DB96 1 -DB97 1 -DB98 1 -DB99 1 -DB9A 1 -DB9B 1 -DB9C 1 -DB9D 1 -DB9E 1 -DB9F 1 -DBA0 1 -DBA1 1 -DBA2 1 -DBA3 1 -DBA4 1 -DBA7 1 -DBA8 1 -DBAA 1 -DBAB 1 -DBAC 1 -DBAD 1 -DC8F 1 -DC91 1 -DCB0 1 -DCB1 1 -DCB2 1 -DCB3 1 -DCB4 1 -DCB5 1 -DCB6 1 -DCB7 1 -DCB8 1 -DCB9 1 -DCBA 1 -DCBB 1 -DCBC 1 -DCBD 1 -DCBE 1 -DCBF 1 -DD80 1 -DD81 1 -DD82 1 -DD83 1 -DD84 1 -DD85 1 -DD86 1 -DD87 1 -DD88 1 -DD89 1 -DD8A 1 -D980 1 -60 1 -C2B4 1 -CE84 1 -CB9C 1 -5E 1 -C2AF 1 -CB98 1 -CB99 1 -C2A8 1 -CE85 1 -CB9A 1 -CB9D 1 -C2B8 1 -CB9B 1 -5F 1 -C2AD 1 -2D 1 -D68A 1 -2C 1 -D59D 1 -D88C 1 -D88D 1 -D9AB 1 -D9AC 1 -3B 1 -CDBE 1 -D89B 1 -3A 1 -D689 1 -DC83 1 -DC84 1 -DC85 1 -DC86 1 -DC87 1 -DC88 1 -21 1 -C2A1 1 -D59C 1 -3F 1 -C2BF 1 -D59E 1 -D89F 1 -DC89 1 -2E 1 -DB94 1 -DC81 1 -DC82 1 -C2B7 1 -CE87 1 -DC80 1 -27 1 -22 1 -C2AB 1 -C2BB 1 -28 1 -29 1 -5B 1 -7B 1 -7D 1 -C2A7 1 -C2B6 1 -C2A9 1 -C2AE 1 -40 1 -2A 1 -D9AD 1 -2F 1 -26 1 -23 1 -25 1 -D9AA 1 -D59A 1 -D59B 1 -D59F 1 -D6BE 1 -D780 1 -D783 1 -D7B3 1 -D7B4 1 -DC8A 1 -DC8B 1 -DC8C 1 -DC8D 1 -CAB9 1 -CDB4 1 -CDB5 1 -CABA 1 -CB82 1 -CB83 1 -CB84 1 -CB85 1 -CB86 1 -CB87 1 -CB88 1 -CB89 1 -CB8A 1 -CB8B 1 -CB8C 1 -CB8D 1 -CB8E 1 -CB8F 1 -CB92 1 -CB93 1 -CB94 1 -CB95 1 -CB96 1 -CB97 1 -CB9E 1 -CB9F 1 -CBA5 1 -CBA6 1 -CBA7 1 -CBA8 1 -CBA9 1 -CBAA 1 -CBAB 1 -CBAC 1 -CBAD 1 -CBAF 1 -CBB0 1 -CBB1 1 -CBB2 1 -CBB3 1 -CBB4 1 -CBB5 1 -CBB6 1 -CBB7 1 -CBB8 1 -CBB9 1 -CBBA 1 -CBBB 1 -CBBC 1 -CBBD 1 -CBBE 1 -CBBF 1 -C2B0 1 -D282 1 -D88E 1 -D88F 1 -DBA9 1 -CFB6 1 -2B 1 -C2B1 1 -C3B7 1 -C397 1 -3C 1 -3D 1 -3E 1 -C2AC 1 -7C 1 -C2A6 1 -7E 1 -CB90 1 -CB91 1 -C2A4 1 -C2A2 1 -24 1 -C2A3 1 -C2A5 1 -30 1 -D9A0 1 -DBB0 1 -31 1 -C2B9 1 -D9A1 1 -DBB1 1 -C2BD 1 -C2BC 1 -32 1 -C2B2 1 -D9A2 1 -DBB2 1 -33 1 -C2B3 1 -D9A3 1 -DBB3 1 -C2BE 1 -34 1 -D9A4 1 -DBB4 1 -35 1 -D9A5 1 -DBB5 1 -36 1 -D9A6 1 -DBB6 1 -37 1 -D9A7 1 -DBB7 1 -38 1 -D9A8 1 -DBB8 1 -39 1 -D9A9 1 -DBB9 1 -41 1 -61 1 -C2AA 1 -C380 1 -C381 1 -C382 1 -C383 1 -C384 1 -C385 1 -C3A0 1 -C3A1 1 -C3A2 1 -C3A3 1 -C3A4 1 -C3A5 1 -C480 1 -C481 1 -C482 1 -C483 1 -C484 1 -C485 1 -C78D 1 -C78E 1 -C79E 1 -C79F 1 -C7A0 1 -C7A1 1 -C7BA 1 -C7BB 1 -C880 1 -C881 1 -C882 1 -C883 1 -C8A6 1 -C8A7 1 -CDA3 1 -C386 1 -C3A6 1 -C7A2 1 -C7A3 1 -C7BC 1 -C7BD 1 -C990 1 -C991 1 -C992 1 -42 1 -62 1 -CA99 1 -C680 1 -C681 1 -C993 1 -C682 1 -C683 1 -43 1 -63 1 -C387 1 -C3A7 1 -C486 1 -C487 1 -C488 1 -C489 1 -C48A 1 -C48B 1 -C48C 1 -C48D 1 -CDA8 1 -C687 1 -C688 1 -C995 1 -44 1 -64 1 -C48E 1 -C48F 1 -CDA9 1 -C784 1 -C785 1 -C786 1 -C7B1 1 -C7B2 1 -C7B3 1 -CAA3 1 -CAA5 1 -CAA4 1 -C490 1 -C491 1 -C689 1 -C996 1 -C68A 1 -C997 1 -C68B 1 -C68C 1 -C8A1 1 -C390 1 -C3B0 1 -45 1 -65 1 -C388 1 -C389 1 -C38A 1 -C38B 1 -C3A8 1 -C3A9 1 -C3AA 1 -C3AB 1 -C492 1 -C493 1 -C494 1 -C495 1 -C496 1 -C497 1 -C498 1 -C499 1 -C49A 1 -C49B 1 -C884 1 -C885 1 -C886 1 -C887 1 -C8A8 1 -C8A9 1 -CDA4 1 -C68E 1 -C79D 1 -C68F 1 -C999 1 -C690 1 -C99B 1 -C998 1 -C99A 1 -C99C 1 -C99D 1 -C99E 1 -CA9A 1 -C9A4 1 -46 1 -66 1 -CAA9 1 -C691 1 -C692 1 -47 1 -67 1 -C49C 1 -C49D 1 -C49E 1 -C49F 1 -C4A0 1 -C4A1 1 -C4A2 1 -C4A3 1 -C7A6 1 -C7A7 1 -C7B4 1 -C7B5 1 -C9A1 1 -C9A2 1 -C7A4 1 -C7A5 1 -C693 1 -C9A0 1 -CA9B 1 -C694 1 -C9A3 1 -CBA0 1 -C6A2 1 -C6A3 1 -48 1 -68 1 -C4A4 1 -C4A5 1 -C89E 1 -C89F 1 -CAB0 1 -CDAA 1 -CA9C 1 -C695 1 -C7B6 1 -C4A6 1 -C4A7 1 -C9A6 1 -CAB1 1 -C9A7 1 -CABB 1 -CABD 1 -49 1 -69 1 -C38C 1 -C38D 1 -C38E 1 -C38F 1 -C3AC 1 -C3AD 1 -C3AE 1 -C3AF 1 -C4A8 1 -C4A9 1 -C4AA 1 -C4AB 1 -C4AC 1 -C4AD 1 -C4AE 1 -C4AF 1 -C4B0 1 -C78F 1 -C790 1 -C888 1 -C889 1 -C88A 1 -C88B 1 -CDA5 1 -C4B2 1 -C4B3 1 -C4B1 1 -C9AA 1 -C697 1 -C9A8 1 -C696 1 -C9A9 1 -4A 1 -6A 1 -C4B4 1 -C4B5 1 -C7B0 1 -CAB2 1 -CA9D 1 -C99F 1 -CA84 1 -4B 1 -6B 1 -C4B6 1 -C4B7 1 -C7A8 1 -C7A9 1 -C698 1 -C699 1 -CA9E 1 -4C 1 -6C 1 -C4B9 1 -C4BA 1 -C4BB 1 -C4BC 1 -C4BD 1 -C4BE 1 -CBA1 1 -C4BF 1 -C580 1 -C787 1 -C788 1 -C789 1 -CAAA 1 -CAAB 1 -CA9F 1 -C581 1 -C582 1 -C69A 1 -C9AB 1 -C9AC 1 -C9AD 1 -C8B4 1 -C9AE 1 -C69B 1 -CA8E 1 -4D 1 -6D 1 -CDAB 1 -C9B1 1 -4E 1 -6E 1 -C391 1 -C3B1 1 -C583 1 -C584 1 -C585 1 -C586 1 -C587 1 -C588 1 -C7B8 1 -C7B9 1 -C78A 1 -C78B 1 -C78C 1 -C9B4 1 -C69D 1 -C9B2 1 -C69E 1 -C8A0 1 -C9B3 1 -C8B5 1 -C58A 1 -C58B 1 -4F 1 -6F 1 -C2BA 1 -C392 1 -C393 1 -C394 1 -C395 1 -C3B2 1 -C3B3 1 -C3B4 1 -C3B5 1 -C58C 1 -C58D 1 -C58E 1 -C58F 1 -C6A0 1 -C6A1 1 -C791 1 -C792 1 -C7AA 1 -C7AB 1 -C7AC 1 -C7AD 1 -C88C 1 -C88D 1 -C88E 1 -C88F 1 -C8AA 1 -C8AB 1 -C8AC 1 -C8AD 1 -C8AE 1 -C8AF 1 -C8B0 1 -C8B1 1 -CDA6 1 -C592 1 -C593 1 -C396 1 -C3B6 1 -C590 1 -C591 1 -C9B6 1 -C398 1 -C3B8 1 -C7BE 1 -C7BF 1 -C686 1 -C994 1 -C69F 1 -C9B5 1 -C9B7 1 -C8A2 1 -C8A3 1 -50 1 -70 1 -C6A4 1 -C6A5 1 -C9B8 1 -51 1 -71 1 -CAA0 1 -C4B8 1 -52 1 -72 1 -C594 1 -C595 1 -C596 1 -C597 1 -C598 1 -C599 1 -C890 1 -C891 1 -C892 1 -C893 1 -CAB3 1 -CDAC 1 -C6A6 1 -CA80 1 -C9B9 1 -CAB4 1 -C9BA 1 -C9BB 1 -CAB5 1 -C9BC 1 -C9BD 1 -C9BE 1 -C9BF 1 -CA81 1 -CAB6 1 -53 1 -73 1 -C59A 1 -C59B 1 -C59C 1 -C59D 1 -C59E 1 -C59F 1 -C5A0 1 -C5A1 1 -C5BF 1 -C898 1 -C899 1 -CBA2 1 -C39F 1 -CA82 1 -C6A9 1 -CA83 1 -C6AA 1 -CA85 1 -CA86 1 -54 1 -74 1 -C5A2 1 -C5A3 1 -C5A4 1 -C5A5 1 -C89A 1 -C89B 1 -CDAD 1 -CAA8 1 -C6BE 1 -CAA6 1 -CAA7 1 -C5A6 1 -C5A7 1 -C6AB 1 -C6AC 1 -C6AD 1 -C6AE 1 -CA88 1 -C8B6 1 -CA87 1 -55 1 -75 1 -C399 1 -C39A 1 -C39B 1 -C3B9 1 -C3BA 1 -C3BB 1 -C5A8 1 -C5A9 1 -C5AA 1 -C5AB 1 -C5AC 1 -C5AD 1 -C5AE 1 -C5AF 1 -C5B2 1 -C5B3 1 -C6AF 1 -C6B0 1 -C793 1 -C794 1 -C795 1 -C796 1 -C797 1 -C798 1 -C799 1 -C79A 1 -C79B 1 -C79C 1 -C894 1 -C895 1 -C896 1 -C897 1 -CDA7 1 -C39C 1 -C3BC 1 -C5B0 1 -C5B1 1 -CA89 1 -C9A5 1 -CAAE 1 -CAAF 1 -C69C 1 -C9AF 1 -C9B0 1 -C6B1 1 -CA8A 1 -56 1 -76 1 -CDAE 1 -C6B2 1 -CA8B 1 -CA8C 1 -57 1 -77 1 -C5B4 1 -C5B5 1 -CAB7 1 -CA8D 1 -58 1 -78 1 -CBA3 1 -CDAF 1 -59 1 -79 1 -C39D 1 -C3BD 1 -C3BF 1 -C5B6 1 -C5B7 1 -C5B8 1 -C8B2 1 -C8B3 1 -CAB8 1 -CA8F 1 -C6B3 1 -C6B4 1 -5A 1 -7A 1 -C5B9 1 -C5BA 1 -C5BB 1 -C5BC 1 -C5BD 1 -C5BE 1 -C68D 1 -C6B5 1 -C6B6 1 -C8A4 1 -C8A5 1 -CA90 1 -CA91 1 -C6B7 1 -C7AE 1 -C7AF 1 -CA92 1 -C6B8 1 -C6B9 1 -C6BA 1 -CA93 1 -C89C 1 -C89D 1 -C39E 1 -C3BE 1 -C6BF 1 -C7B7 1 -C6BB 1 -C6A7 1 -C6A8 1 -C6BC 1 -C6BD 1 -C684 1 -C685 1 -CA94 1 -CB80 1 -CABC 1 -C589 1 -CBAE 1 -CABE 1 -CA95 1 -CBA4 1 -CABF 1 -CB81 1 -CAA1 1 -CAA2 1 -CA96 1 -C780 1 -C781 1 -C782 1 -C783 1 -CA97 1 -CA98 1 -CAAC 1 -CAAD 1 -CE86 1 -CE91 1 -CEAC 1 -CEB1 1 -CE92 1 -CEB2 1 -CF90 1 -CE93 1 -CEB3 1 -CE94 1 -CEB4 1 -CE88 1 -CE95 1 -CEAD 1 -CEB5 1 -CFB5 1 -CF9C 1 -CF9D 1 -CF9A 1 -CF9B 1 -CE96 1 -CEB6 1 -CE89 1 -CE97 1 -CEAE 1 -CEB7 1 -CE98 1 -CEB8 1 -CF91 1 -CFB4 1 -CDBA 1 -CE8A 1 -CE90 1 -CE99 1 -CEAA 1 -CEAF 1 -CEB9 1 -CF8A 1 -CFB3 1 -CE9A 1 -CEBA 1 -CFB0 1 -CF97 1 -CE9B 1 -CEBB 1 -C2B5 1 -CE9C 1 -CEBC 1 -CE9D 1 -CEBD 1 -CE9E 1 -CEBE 1 -CE8C 1 -CE9F 1 -CEBF 1 -CF8C 1 -CEA0 1 -CF80 1 -CF96 1 -CF9E 1 -CF9F 1 -CF98 1 -CF99 1 -CEA1 1 -CF81 1 -CFB1 1 -CEA3 1 -CF82 1 -CF83 1 -CFB2 1 -CFB9 1 -CEA4 1 -CF84 1 -CE8E 1 -CEA5 1 -CEAB 1 -CEB0 1 -CF85 1 -CF8B 1 -CF8D 1 -CF92 1 -CF93 1 -CF94 1 -CEA6 1 -CF86 1 -CF95 1 -CEA7 1 -CF87 1 -CEA8 1 -CF88 1 -CE8F 1 -CEA9 1 -CF89 1 -CF8E 1 -CFA0 1 -CFA1 1 -CFB7 1 -CFB8 1 -CFBA 1 -CFBB 1 -CFA2 1 -CFA3 1 -CFA4 1 -CFA5 1 -CFA6 1 -CFA7 1 -CFA8 1 -CFA9 1 -CFAA 1 -CFAB 1 -CFAC 1 -CFAD 1 -CFAE 1 -CFAF 1 -D090 1 -D0B0 1 -D390 1 -D391 1 -D392 1 -D393 1 -D398 1 -D399 1 -D39A 1 -D39B 1 -D394 1 -D395 1 -D091 1 -D0B1 1 -D092 1 -D0B2 1 -D093 1 -D0B3 1 -D290 1 -D291 1 -D292 1 -D293 1 -D294 1 -D295 1 -D094 1 -D0B4 1 -D480 1 -D481 1 -D082 1 -D192 1 -D482 1 -D483 1 -D083 1 -D193 1 -D298 1 -D299 1 -D080 1 -D081 1 -D095 1 -D0B5 1 -D190 1 -D191 1 -D396 1 -D397 1 -D084 1 -D194 1 -D096 1 -D0B6 1 -D381 1 -D382 1 -D39C 1 -D39D 1 -D296 1 -D297 1 -D097 1 -D0B7 1 -D484 1 -D485 1 -D39E 1 -D39F 1 -D085 1 -D195 1 -D3A0 1 -D3A1 1 -D486 1 -D487 1 -D08D 1 -D098 1 -D0B8 1 -D19D 1 -D3A2 1 -D3A3 1 -D28A 1 -D28B 1 -D3A4 1 -D3A5 1 -D086 1 -D196 1 -D087 1 -D197 1 -D099 1 -D0B9 1 -D088 1 -D198 1 -D09A 1 -D0BA 1 -D29A 1 -D29B 1 -D383 1 -D384 1 -D2A0 1 -D2A1 1 -D29E 1 -D29F 1 -D29C 1 -D29D 1 -D09B 1 -D0BB 1 -D385 1 -D386 1 -D089 1 -D199 1 -D488 1 -D489 1 -D09C 1 -D0BC 1 -D38D 1 -D38E 1 -D09D 1 -D0BD 1 -D389 1 -D38A 1 -D2A2 1 -D2A3 1 -D387 1 -D388 1 -D2A4 1 -D2A5 1 -D08A 1 -D19A 1 -D48A 1 -D48B 1 -D09E 1 -D0BE 1 -D3A6 1 -D3A7 1 -D3A8 1 -D3A9 1 -D3AA 1 -D3AB 1 -D09F 1 -D0BF 1 -D2A6 1 -D2A7 1 -D280 1 -D281 1 -D0A0 1 -D180 1 -D28E 1 -D28F 1 -D0A1 1 -D181 1 -D48C 1 -D48D 1 -D2AA 1 -D2AB 1 -D0A2 1 -D182 1 -D48E 1 -D48F 1 -D2AC 1 -D2AD 1 -D08B 1 -D19B 1 -D08C 1 -D19C 1 -D0A3 1 -D183 1 -D3AE 1 -D3AF 1 -D08E 1 -D19E 1 -D3B0 1 -D3B1 1 -D3B2 1 -D3B3 1 -D2AE 1 -D2AF 1 -D2B0 1 -D2B1 1 -D1B8 1 -D1B9 1 -D0A4 1 -D184 1 -D0A5 1 -D185 1 -D2B2 1 -D2B3 1 -D2BA 1 -D2BB 1 -D1A0 1 -D1A1 1 -D1BE 1 -D1BF 1 -D1BC 1 -D1BD 1 -D1BA 1 -D1BB 1 -D0A6 1 -D186 1 -D2B4 1 -D2B5 1 -D0A7 1 -D187 1 -D3B4 1 -D3B5 1 -D2B6 1 -D2B7 1 -D38B 1 -D38C 1 -D2B8 1 -D2B9 1 -D2BC 1 -D2BD 1 -D2BE 1 -D2BF 1 -D08F 1 -D19F 1 -D0A8 1 -D188 1 -D0A9 1 -D189 1 -D0AA 1 -D18A 1 -D0AB 1 -D18B 1 -D3B8 1 -D3B9 1 -D0AC 1 -D18C 1 -D28C 1 -D28D 1 -D1A2 1 -D1A3 1 -D0AD 1 -D18D 1 -D3AC 1 -D3AD 1 -D0AE 1 -D18E 1 -D0AF 1 -D18F 1 -D1A4 1 -D1A5 1 -D1A6 1 -D1A7 1 -D1AA 1 -D1AB 1 -D1A8 1 -D1A9 1 -D1AC 1 -D1AD 1 -D1AE 1 -D1AF 1 -D1B0 1 -D1B1 1 -D1B2 1 -D1B3 1 -D1B4 1 -D1B5 1 -D1B6 1 -D1B7 1 -D2A8 1 -D2A9 1 -D380 1 -D4B1 1 -D5A1 1 -D4B2 1 -D5A2 1 -D4B3 1 -D5A3 1 -D4B4 1 -D5A4 1 -D4B5 1 -D5A5 1 -D687 1 -D4B6 1 -D5A6 1 -D4B7 1 -D5A7 1 -D4B8 1 -D5A8 1 -D4B9 1 -D5A9 1 -D4BA 1 -D5AA 1 -D4BB 1 -D5AB 1 -D4BC 1 -D5AC 1 -D4BD 1 -D5AD 1 -D4BE 1 -D5AE 1 -D4BF 1 -D5AF 1 -D580 1 -D5B0 1 -D581 1 -D5B1 1 -D582 1 -D5B2 1 -D583 1 -D5B3 1 -D584 1 -D5B4 1 -D585 1 -D5B5 1 -D586 1 -D5B6 1 -D587 1 -D5B7 1 -D588 1 -D5B8 1 -D589 1 -D5B9 1 -D58A 1 -D5BA 1 -D58B 1 -D5BB 1 -D58C 1 -D5BC 1 -D58D 1 -D5BD 1 -D58E 1 -D5BE 1 -D58F 1 -D5BF 1 -D590 1 -D680 1 -D591 1 -D681 1 -D592 1 -D682 1 -D593 1 -D683 1 -D594 1 -D684 1 -D595 1 -D685 1 -D596 1 -D686 1 -D599 1 -D790 1 -D791 1 -D792 1 -D793 1 -D794 1 -D795 1 -D7B0 1 -D7B1 1 -D796 1 -D797 1 -D798 1 -D799 1 -D7B2 1 -D79A 1 -D79B 1 -D79C 1 -D79D 1 -D79E 1 -D79F 1 -D7A0 1 -D7A1 1 -D7A2 1 -D7A3 1 -D7A4 1 -D7A5 1 -D7A6 1 -D7A7 1 -D7A8 1 -D7A9 1 -D7AA 1 -D8A1 1 -D9B4 1 -DBBD 1 -D8A2 1 -D8A3 1 -D9B2 1 -D9B1 1 -D8A4 1 -D8A5 1 -D9B3 1 -D8A6 1 -D8A7 1 -D9B5 1 -D9AE 1 -D8A8 1 -D9BB 1 -D9BE 1 -DA80 1 -D8A9 1 -D8AA 1 -D8AB 1 -D9B9 1 -D9BA 1 -D9BC 1 -D9BD 1 -D9BF 1 -D8AC 1 -DA83 1 -DA84 1 -DA86 1 -DABF 1 -DA87 1 -D8AD 1 -D8AE 1 -DA81 1 -DA82 1 -DA85 1 -D8AF 1 -D8B0 1 -DA88 1 -DA89 1 -DA8A 1 -DA8B 1 -DA8C 1 -DA8D 1 -DA8E 1 -DA8F 1 -DA90 1 -DBAE 1 -D8B1 1 -D8B2 1 -DA91 1 -DA92 1 -DA93 1 -DA94 1 -DA95 1 -DA96 1 -DA97 1 -DA98 1 -DA99 1 -DBAF 1 -D8B3 1 -D8B4 1 -DA9A 1 -DA9B 1 -DA9C 1 -DBBA 1 -D8B5 1 -D8B6 1 -DA9D 1 -DA9E 1 -DBBB 1 -D8B7 1 -D8B8 1 -DA9F 1 -D8B9 1 -D8BA 1 -DAA0 1 -DBBC 1 -D981 1 -DAA1 1 -DAA2 1 -DAA3 1 -DAA4 1 -DAA5 1 -DAA6 1 -D9AF 1 -D982 1 -DAA7 1 -DAA8 1 -D983 1 -DAA9 1 -DAAA 1 -DAAB 1 -DAAC 1 -DAAD 1 -DAAE 1 -DAAF 1 -DAB0 1 -DAB1 1 -DAB2 1 -DAB3 1 -DAB4 1 -D984 1 -DAB5 1 -DAB6 1 -DAB7 1 -DAB8 1 -D985 1 -DBBE 1 -D986 1 -DABA 1 -DABB 1 -DABC 1 -DABD 1 -DAB9 1 -D987 1 -DABE 1 -DB81 1 -DB82 1 -DB83 1 -DBBF 1 -DB80 1 -DB95 1 -D988 1 -DBA5 1 -D9B6 1 -DB84 1 -DB85 1 -DB86 1 -DB87 1 -D9B7 1 -DB88 1 -DB89 1 -DB8A 1 -DB8B 1 -DB8F 1 -D989 1 -D98A 1 -DBA6 1 -D9B8 1 -DB8C 1 -DB8D 1 -DB8E 1 -DB90 1 -DB91 1 -DB92 1 -DB93 1 -DC90 1 -DC92 1 -DCAD 1 -DC93 1 -DC94 1 -DCAE 1 -DC96 1 -DC95 1 -DCAF 1 -DC97 1 -DC98 1 -DC99 1 -DD8D 1 -DC9A 1 -DC9B 1 -DC9C 1 -DC9D 1 -DC9E 1 -DC9F 1 -DD8E 1 -DCA0 1 -DCA1 1 -DCA2 1 -DCA3 1 -DCA4 1 -DCA5 1 -DCA6 1 -DCA7 1 -DD8F 1 -DCA8 1 -DCA9 1 -DCAA 1 -DCAB 1 -DCAC 1 -DE80 1 -DE99 1 -DE9A 1 -DE81 1 -DE82 1 -DE83 1 -DE9C 1 -DE84 1 -DE85 1 -DE86 1 -DE87 1 -DEA2 1 -DEA3 1 -DE88 1 -DEA5 1 -DE89 1 -DE8A 1 -DE8B 1 -DE9B 1 -DE8C 1 -DE98 1 -DEA0 1 -DEA1 1 -DE8D 1 -DE8E 1 -DEA4 1 -DE8F 1 -DE90 1 -DE9D 1 -DE9E 1 -DE9F 1 -DE91 1 -DE92 1 -DE93 1 -DE94 1 -DE95 1 -DE96 1 -DE97 1 -DEB1 1 -DEA6 1 -DEA7 1 -DEA8 1 -DEA9 1 -DEAA 1 -DEAB 1 -DEAC 1 -DEAD 1 -DEAE 1 -DEAF 1 -DEB0 1 -E4B880 1 -E4B881 1 -E4B882 1 -E4B883 1 -E4B884 1 -E4B885 1 -E4B886 1 -E4B887 1 -E4B888 1 -E4B889 1 -E4B88A 1 -E4B88B 1 -E4B88C 1 -E4B88D 1 -E4B88E 1 -E4B88F 1 -E4B890 1 -E4B891 1 -E4B892 1 -E4B893 1 -E4B894 1 -E4B895 1 -E4B896 1 -E4B897 1 -E4B898 1 -E4B899 1 -E4B89A 1 -E4B89B 1 -E4B89C 1 -E4B89D 1 -E4B89E 1 -E4B89F 1 -E4B8A0 1 -E4B8A1 1 -E4B8A2 1 -E4B8A3 1 -E4B8A4 1 -E4B8A5 1 -E4B8A6 1 -E4B8A7 1 -E4B8A8 1 -E4B8A9 1 -E4B8AA 1 -E4B8AB 1 -E4B8AC 1 -E4B8AD 1 -E4B8AE 1 -E4B8AF 1 -E4B8B0 1 -E4B8B1 1 -E4B8B2 1 -E4B8B3 1 -E4B8B4 1 -E4B8B5 1 -E4B8B6 1 -E4B8B7 1 -E4B8B8 1 -E4B8B9 1 -E4B8BA 1 -E4B8BB 1 -E4B8BC 1 -E4B8BD 1 -E4B8BE 1 -E4B8BF 1 -E4B980 1 -E4B981 1 -E4B982 1 -E4B983 1 -E4B984 1 -E4B985 1 -E4B986 1 -E4B987 1 -E4B988 1 -E4B989 1 -E4B98A 1 -E4B98B 1 -E4B98C 1 -E4B98D 1 -E4B98E 1 -E4B98F 1 -E4B990 1 -E4B991 1 -E4B992 1 -E4B993 1 -E4B994 1 -E4B995 1 -E4B996 1 -E4B997 1 -E4B998 1 -E4B999 1 -E4B99A 1 -E4B99B 1 -E4B99C 1 -E4B99D 1 -E4B99E 1 -E4B99F 1 -E4B9A0 1 -E4B9A1 1 -E4B9A2 1 -E4B9A3 1 -E4B9A4 1 -E4B9A5 1 -E4B9A6 1 -E4B9A7 1 -E4B9A8 1 -E4B9A9 1 -E4B9AA 1 -E4B9AB 1 -E4B9AC 1 -E4B9AD 1 -E4B9AE 1 -E4B9AF 1 -E4B9B0 1 -E4B9B1 1 -E4B9B2 1 -E4B9B3 1 -E4B9B4 1 -E4B9B5 1 -E4B9B6 1 -E4B9B7 1 -E4B9B8 1 -E4B9B9 1 -E4B9BA 1 -E4B9BB 1 -E4B9BC 1 -E4B9BD 1 -E4B9BE 1 -E4B9BF 1 -E4BA80 1 -E4BA81 1 -E4BA82 1 -E4BA83 1 -E4BA84 1 -E4BA85 1 -E4BA86 1 -E4BA87 1 -E4BA88 1 -E4BA89 1 -E4BA8A 1 -E4BA8B 1 -E4BA8C 1 -E4BA8D 1 -E4BA8E 1 -E4BA8F 1 -E4BA90 1 -E4BA91 1 -E4BA92 1 -E4BA93 1 -E4BA94 1 -E4BA95 1 -E4BA96 1 -E4BA97 1 -E4BA98 1 -E4BA99 1 -E4BA9A 1 -E4BA9B 1 -E4BA9C 1 -E4BA9D 1 -E4BA9E 1 -E4BA9F 1 -E4BAA0 1 -E4BAA1 1 -E4BAA2 1 -E4BAA3 1 -E4BAA4 1 -E4BAA5 1 -E4BAA6 1 -E4BAA7 1 -E4BAA8 1 -E4BAA9 1 -E4BAAA 1 -E4BAAB 1 -E4BAAC 1 -E4BAAD 1 -E4BAAE 1 -E4BAAF 1 -E4BAB0 1 -E4BAB1 1 -E4BAB2 1 -E4BAB3 1 -E4BAB4 1 -E4BAB5 1 -E4BAB6 1 -E4BAB7 1 -E4BAB8 1 -E4BAB9 1 -E4BABA 1 -E4BABB 1 -E4BABC 1 -E4BABD 1 -E4BABE 1 -E4BABF 1 -E4BB80 1 -E4BB81 1 -E4BB82 1 -E4BB83 1 -E4BB84 1 -E4BB85 1 -E4BB86 1 -E4BB87 1 -E4BB88 1 -E4BB89 1 -E4BB8A 1 -E4BB8B 1 -E4BB8C 1 -E4BB8D 1 -E4BB8E 1 -E4BB8F 1 -E4BB90 1 -E4BB91 1 -E4BB92 1 -E4BB93 1 -E4BB94 1 -E4BB95 1 -E4BB96 1 -E4BB97 1 -E4BB98 1 -E4BB99 1 -E4BB9A 1 -E4BB9B 1 -E4BB9C 1 -E4BB9D 1 -E4BB9E 1 -E4BB9F 1 -E4BBA0 1 -E4BBA1 1 -E4BBA2 1 -E4BBA3 1 -E4BBA4 1 -E4BBA5 1 -E4BBA6 1 -E4BBA7 1 -E4BBA8 1 -E4BBA9 1 -E4BBAA 1 -E4BBAB 1 -E4BBAC 1 -E4BBAD 1 -E4BBAE 1 -E4BBAF 1 -E4BBB0 1 -E4BBB1 1 -E4BBB2 1 -E4BBB3 1 -E4BBB4 1 -E4BBB5 1 -E4BBB6 1 -E4BBB7 1 -E4BBB8 1 -E4BBB9 1 -E4BBBA 1 -E4BBBB 1 -E4BBBC 1 -E4BBBD 1 -E4BBBE 1 -E4BBBF 1 -E4BC80 1 -E4BC81 1 -E4BC82 1 -E4BC83 1 -E4BC84 1 -E4BC85 1 -E4BC86 1 -E4BC87 1 -E4BC88 1 -E4BC89 1 -E4BC8A 1 -E4BC8B 1 -E4BC8C 1 -E4BC8D 1 -E4BC8E 1 -E4BC8F 1 -E4BC90 1 -E4BC91 1 -E4BC92 1 -E4BC93 1 -E4BC94 1 -E4BC95 1 -E4BC96 1 -E4BC97 1 -E4BC98 1 -E4BC99 1 -E4BC9A 1 -E4BC9B 1 -E4BC9C 1 -E4BC9D 1 -E4BC9E 1 -E4BC9F 1 -E4BCA0 1 -E4BCA1 1 -E4BCA2 1 -E4BCA3 1 -E4BCA4 1 -E4BCA5 1 -E4BCA6 1 -E4BCA7 1 -E4BCA8 1 -E4BCA9 1 -E4BCAA 1 -E4BCAB 1 -E4BCAC 1 -E4BCAD 1 -E4BCAE 1 -E4BCAF 1 -E4BCB0 1 -E4BCB1 1 -E4BCB2 1 -E4BCB3 1 -E4BCB4 1 -E4BCB5 1 -E4BCB6 1 -E4BCB7 1 -E4BCB8 1 -E4BCB9 1 -E4BCBA 1 -E4BCBB 1 -E4BCBC 1 -E4BCBD 1 -E4BCBE 1 -E4BCBF 1 -E4BD80 1 -E4BD81 1 -E4BD82 1 -E4BD83 1 -E4BD84 1 -E4BD85 1 -E4BD86 1 -E4BD87 1 -E4BD88 1 -E4BD89 1 -E4BD8A 1 -E4BD8B 1 -E4BD8C 1 -E4BD8D 1 -E4BD8E 1 -E4BD8F 1 -E4BD90 1 -E4BD91 1 -E4BD92 1 -E4BD93 1 -E4BD94 1 -E4BD95 1 -E4BD96 1 -E4BD97 1 -E4BD98 1 -E4BD99 1 -E4BD9A 1 -E4BD9B 1 -E4BD9C 1 -E4BD9D 1 -E4BD9E 1 -E4BD9F 1 -E4BDA0 1 -E4BDA1 1 -E4BDA2 1 -E4BDA3 1 -E4BDA4 1 -E4BDA5 1 -E4BDA6 1 -E4BDA7 1 -E4BDA8 1 -E4BDA9 1 -E4BDAA 1 -E4BDAB 1 -E4BDAC 1 -E4BDAD 1 -E4BDAE 1 -E4BDAF 1 -E4BDB0 1 -E4BDB1 1 -E4BDB2 1 -E4BDB3 1 -E4BDB4 1 -E4BDB5 1 -E4BDB6 1 -E4BDB7 1 -E4BDB8 1 -E4BDB9 1 -E4BDBA 1 -E4BDBB 1 -E4BDBC 1 -E4BDBD 1 -E4BDBE 1 -E4BDBF 1 -E4BE80 1 -E4BE81 1 -E4BE82 1 -E4BE83 1 -E4BE84 1 -E4BE85 1 -E4BE86 1 -E4BE87 1 -E4BE88 1 -E4BE89 1 -E4BE8A 1 -E4BE8B 1 -E4BE8C 1 -E4BE8D 1 -E4BE8E 1 -E4BE8F 1 -E4BE90 1 -E4BE91 1 -E4BE92 1 -E4BE93 1 -E4BE94 1 -E4BE95 1 -E4BE96 1 -E4BE97 1 -E4BE98 1 -E4BE99 1 -E4BE9A 1 -E4BE9B 1 -E4BE9C 1 -E4BE9D 1 -E4BE9E 1 -E4BE9F 1 -E4BEA0 1 -E4BEA1 1 -E4BEA2 1 -E4BEA3 1 -E4BEA4 1 -E4BEA5 1 -E4BEA6 1 -E4BEA7 1 -E4BEA8 1 -E4BEA9 1 -E4BEAA 1 -E4BEAB 1 -E4BEAC 1 -E4BEAD 1 -E4BEAE 1 -E4BEAF 1 -E4BEB0 1 -E4BEB1 1 -E4BEB2 1 -E4BEB3 1 -E4BEB4 1 -E4BEB5 1 -E4BEB6 1 -E4BEB7 1 -E4BEB8 1 -E4BEB9 1 -E4BEBA 1 -E4BEBB 1 -E4BEBC 1 -E4BEBD 1 -E4BEBE 1 -E4BEBF 1 -E4BF80 1 -E4BF81 1 -E4BF82 1 -E4BF83 1 -E4BF84 1 -E4BF85 1 -E4BF86 1 -E4BF87 1 -E4BF88 1 -E4BF89 1 -E4BF8A 1 -E4BF8B 1 -E4BF8C 1 -E4BF8D 1 -E4BF8E 1 -E4BF8F 1 -E4BF90 1 -E4BF91 1 -E4BF92 1 -E4BF93 1 -E4BF94 1 -E4BF95 1 -E4BF96 1 -E4BF97 1 -E4BF98 1 -E4BF99 1 -E4BF9A 1 -E4BF9B 1 -E4BF9C 1 -E4BF9D 1 -E4BF9E 1 -E4BF9F 1 -E4BFA0 1 -E4BFA1 1 -E4BFA2 1 -E4BFA3 1 -E4BFA4 1 -E4BFA5 1 -E4BFA6 1 -E4BFA7 1 -E4BFA8 1 -E4BFA9 1 -E4BFAA 1 -E4BFAB 1 -E4BFAC 1 -E4BFAD 1 -E4BFAE 1 -E4BFAF 1 -E4BFB0 1 -E4BFB1 1 -E4BFB2 1 -E4BFB3 1 -E4BFB4 1 -E4BFB5 1 -E4BFB6 1 -E4BFB7 1 -E4BFB8 1 -E4BFB9 1 -E4BFBA 1 -E4BFBB 1 -E4BFBC 1 -E4BFBD 1 -E4BFBE 1 -E4BFBF 1 -C8B7 1 -C8B8 1 -C8B9 1 -C8BA 1 -C8BB 1 -C8BC 1 -C8BD 1 -C8BE 1 -C8BF 1 -C980 1 -C981 1 -C982 1 -C983 1 -C984 1 -C985 1 -C986 1 -C987 1 -C988 1 -C989 1 -C98A 1 -C98B 1 -C98C 1 -C98D 1 -C98E 1 -C98F 1 -CD98 1 -CD99 1 -CD9A 1 -CD9B 1 -CD9C 1 -CDB0 1 -CDB1 1 -CDB2 1 -CDB3 1 -CDB6 1 -CDB7 1 -CDB8 1 -CDB9 1 -CDBB 1 -CDBC 1 -CDBD 1 -CDBF 1 -CE80 1 -CE81 1 -CE82 1 -CE83 1 -CE8B 1 -CE8D 1 -CEA2 1 -CF8F 1 -CFBC 1 -CFBD 1 -CFBE 1 -CFBF 1 -D287 1 -D38F 1 -D3B6 1 -D3B7 1 -D3BA 1 -D3BB 1 -D3BC 1 -D3BD 1 -D3BE 1 -D3BF 1 -D490 1 -D491 1 -D492 1 -D493 1 -D494 1 -D495 1 -D496 1 -D497 1 -D498 1 -D499 1 -D49A 1 -D49B 1 -D49C 1 -D49D 1 -D49E 1 -D49F 1 -D4A0 1 -D4A1 1 -D4A2 1 -D4A3 1 -D4A4 1 -D4A5 1 -D4A6 1 -D4A7 1 -D4A8 1 -D4A9 1 -D4AA 1 -D4AB 1 -D4AC 1 -D4AD 1 -D4AE 1 -D4AF 1 -D4B0 1 -D597 1 -D598 1 -D5A0 1 -D688 1 -D68B 1 -D68C 1 -D68D 1 -D68E 1 -D68F 1 -D690 1 -D6A2 1 -D6BA 1 -D785 1 -D786 1 -D787 1 -D788 1 -D789 1 -D78A 1 -D78B 1 -D78C 1 -D78D 1 -D78E 1 -D78F 1 -D7AB 1 -D7AC 1 -D7AD 1 -D7AE 1 -D7AF 1 -D7B5 1 -D7B6 1 -D7B7 1 -D7B8 1 -D7B9 1 -D7BA 1 -D7BB 1 -D7BC 1 -D7BD 1 -D7BE 1 -D7BF 1 -D884 1 -D885 1 -D886 1 -D887 1 -D888 1 -D889 1 -D88A 1 -D88B 1 -D896 1 -D897 1 -D898 1 -D899 1 -D89A 1 -D89C 1 -D89D 1 -D89E 1 -D8A0 1 -D8BB 1 -D8BC 1 -D8BD 1 -D8BE 1 -D8BF 1 -D999 1 -D99A 1 -D99B 1 -D99C 1 -D99D 1 -D99E 1 -D99F 1 -DC8E 1 -DD8B 1 -DD8C 1 -DD90 1 -DD91 1 -DD92 1 -DD93 1 -DD94 1 -DD95 1 -DD96 1 -DD97 1 -DD98 1 -DD99 1 -DD9A 1 -DD9B 1 -DD9C 1 -DD9D 1 -DD9E 1 -DD9F 1 -DDA0 1 -DDA1 1 -DDA2 1 -DDA3 1 -DDA4 1 -DDA5 1 -DDA6 1 -DDA7 1 -DDA8 1 -DDA9 1 -DDAA 1 -DDAB 1 -DDAC 1 -DDAD 1 -DDAE 1 -DDAF 1 -DDB0 1 -DDB1 1 -DDB2 1 -DDB3 1 -DDB4 1 -DDB5 1 -DDB6 1 -DDB7 1 -DDB8 1 -DDB9 1 -DDBA 1 -DDBB 1 -DDBC 1 -DDBD 1 -DDBE 1 -DDBF 1 -DEB2 1 -DEB3 1 -DEB4 1 -DEB5 1 -DEB6 1 -DEB7 1 -DEB8 1 -DEB9 1 -DEBA 1 -DEBB 1 -DEBC 1 -DEBD 1 -DEBE 1 -DEBF 1 -DF80 1 -DF81 1 -DF82 1 -DF83 1 -DF84 1 -DF85 1 -DF86 1 -DF87 1 -DF88 1 -DF89 1 -DF8A 1 -DF8B 1 -DF8C 1 -DF8D 1 -DF8E 1 -DF8F 1 -DF90 1 -DF91 1 -DF92 1 -DF93 1 -DF94 1 -DF95 1 -DF96 1 -DF97 1 -DF98 1 -DF99 1 -DF9A 1 -DF9B 1 -DF9C 1 -DF9D 1 -DF9E 1 -DF9F 1 -DFA0 1 -DFA1 1 -DFA2 1 -DFA3 1 -DFA4 1 -DFA5 1 -DFA6 1 -DFA7 1 -DFA8 1 -DFA9 1 -DFAA 1 -DFAB 1 -DFAC 1 -DFAD 1 -DFAE 1 -DFAF 1 -DFB0 1 -DFB1 1 -DFB2 1 -DFB3 1 -DFB4 1 -DFB5 1 -DFB6 1 -DFB7 1 -DFB8 1 -DFB9 1 -DFBA 1 -DFBB 1 -DFBC 1 -DFBD 1 -DFBE 1 -DFBF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_icelandic_ci) ENGINE=NDB CHARACTER SET utf8 COLLATE utf8_icelandic_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_icelandic_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -C285 1 -7F 1 -C280 1 -C281 1 -C282 1 -C283 1 -C284 1 -C286 1 -C287 1 -C288 1 -C289 1 -C28A 1 -C28B 1 -C28C 1 -C28D 1 -C28E 1 -C28F 1 -C290 1 -C291 1 -C292 1 -C293 1 -C294 1 -C295 1 -C296 1 -C297 1 -C298 1 -C299 1 -C29A 1 -C29B 1 -C29C 1 -C29D 1 -C29E 1 -C29F 1 -C2A0 1 -CC80 1 -CC81 1 -CC82 1 -CC83 1 -CC84 1 -CC85 1 -CC86 1 -CC87 1 -CC88 1 -CC89 1 -CC8A 1 -CC8B 1 -CC8C 1 -CC8D 1 -CC8E 1 -CC8F 1 -CC90 1 -CC91 1 -CC92 1 -CC93 1 -CC94 1 -CC95 1 -CC96 1 -CC97 1 -CC98 1 -CC99 1 -CC9A 1 -CC9B 1 -CC9C 1 -CC9D 1 -CC9E 1 -CC9F 1 -CCA0 1 -CCA1 1 -CCA2 1 -CCA3 1 -CCA4 1 -CCA5 1 -CCA6 1 -CCA7 1 -CCA8 1 -CCA9 1 -CCAA 1 -CCAB 1 -CCAC 1 -CCAD 1 -CCAE 1 -CCAF 1 -CCB0 1 -CCB1 1 -CCB2 1 -CCB3 1 -CCB4 1 -CCB5 1 -CCB6 1 -CCB7 1 -CCB8 1 -CCB9 1 -CCBA 1 -CCBB 1 -CCBC 1 -CCBD 1 -CCBE 1 -CCBF 1 -CD80 1 -CD81 1 -CD82 1 -CD83 1 -CD84 1 -CD85 1 -CD86 1 -CD87 1 -CD88 1 -CD89 1 -CD8A 1 -CD8B 1 -CD8C 1 -CD8D 1 -CD8E 1 -CD8F 1 -CD90 1 -CD91 1 -CD92 1 -CD93 1 -CD94 1 -CD95 1 -CD96 1 -CD97 1 -CD9D 1 -CD9E 1 -CD9F 1 -CDA0 1 -CDA1 1 -CDA2 1 -D283 1 -D284 1 -D285 1 -D286 1 -D288 1 -D289 1 -D691 1 -D692 1 -D693 1 -D694 1 -D695 1 -D696 1 -D697 1 -D698 1 -D699 1 -D69A 1 -D69B 1 -D69C 1 -D69D 1 -D69E 1 -D69F 1 -D6A0 1 -D6A1 1 -D6A3 1 -D6A4 1 -D6A5 1 -D6A6 1 -D6A7 1 -D6A8 1 -D6A9 1 -D6AA 1 -D6AB 1 -D6AC 1 -D6AD 1 -D6AE 1 -D6AF 1 -D6B0 1 -D6B1 1 -D6B2 1 -D6B3 1 -D6B4 1 -D6B5 1 -D6B6 1 -D6B7 1 -D6B8 1 -D6B9 1 -D6BB 1 -D6BC 1 -D6BD 1 -D6BF 1 -D781 1 -D782 1 -D784 1 -D880 1 -D881 1 -D882 1 -D883 1 -D890 1 -D891 1 -D892 1 -D893 1 -D894 1 -D895 1 -D98B 1 -D98C 1 -D98D 1 -D98E 1 -D98F 1 -D990 1 -D991 1 -D992 1 -D993 1 -D994 1 -D995 1 -D996 1 -D997 1 -D998 1 -D9B0 1 -DB96 1 -DB97 1 -DB98 1 -DB99 1 -DB9A 1 -DB9B 1 -DB9C 1 -DB9D 1 -DB9E 1 -DB9F 1 -DBA0 1 -DBA1 1 -DBA2 1 -DBA3 1 -DBA4 1 -DBA7 1 -DBA8 1 -DBAA 1 -DBAB 1 -DBAC 1 -DBAD 1 -DC8F 1 -DC91 1 -DCB0 1 -DCB1 1 -DCB2 1 -DCB3 1 -DCB4 1 -DCB5 1 -DCB6 1 -DCB7 1 -DCB8 1 -DCB9 1 -DCBA 1 -DCBB 1 -DCBC 1 -DCBD 1 -DCBE 1 -DCBF 1 -DD80 1 -DD81 1 -DD82 1 -DD83 1 -DD84 1 -DD85 1 -DD86 1 -DD87 1 -DD88 1 -DD89 1 -DD8A 1 -D980 1 -60 1 -C2B4 1 -CE84 1 -CB9C 1 -5E 1 -C2AF 1 -CB98 1 -CB99 1 -C2A8 1 -CE85 1 -CB9A 1 -CB9D 1 -C2B8 1 -CB9B 1 -5F 1 -C2AD 1 -2D 1 -D68A 1 -2C 1 -D59D 1 -D88C 1 -D88D 1 -D9AB 1 -D9AC 1 -3B 1 -CDBE 1 -D89B 1 -3A 1 -D689 1 -DC83 1 -DC84 1 -DC85 1 -DC86 1 -DC87 1 -DC88 1 -21 1 -C2A1 1 -D59C 1 -3F 1 -C2BF 1 -D59E 1 -D89F 1 -DC89 1 -2E 1 -DB94 1 -DC81 1 -DC82 1 -C2B7 1 -CE87 1 -DC80 1 -27 1 -22 1 -C2AB 1 -C2BB 1 -28 1 -29 1 -5B 1 -7B 1 -7D 1 -C2A7 1 -C2B6 1 -C2A9 1 -C2AE 1 -40 1 -2A 1 -D9AD 1 -2F 1 -26 1 -23 1 -25 1 -D9AA 1 -D59A 1 -D59B 1 -D59F 1 -D6BE 1 -D780 1 -D783 1 -D7B3 1 -D7B4 1 -DC8A 1 -DC8B 1 -DC8C 1 -DC8D 1 -CAB9 1 -CDB4 1 -CDB5 1 -CABA 1 -CB82 1 -CB83 1 -CB84 1 -CB85 1 -CB86 1 -CB87 1 -CB88 1 -CB89 1 -CB8A 1 -CB8B 1 -CB8C 1 -CB8D 1 -CB8E 1 -CB8F 1 -CB92 1 -CB93 1 -CB94 1 -CB95 1 -CB96 1 -CB97 1 -CB9E 1 -CB9F 1 -CBA5 1 -CBA6 1 -CBA7 1 -CBA8 1 -CBA9 1 -CBAA 1 -CBAB 1 -CBAC 1 -CBAD 1 -CBAF 1 -CBB0 1 -CBB1 1 -CBB2 1 -CBB3 1 -CBB4 1 -CBB5 1 -CBB6 1 -CBB7 1 -CBB8 1 -CBB9 1 -CBBA 1 -CBBB 1 -CBBC 1 -CBBD 1 -CBBE 1 -CBBF 1 -C2B0 1 -D282 1 -D88E 1 -D88F 1 -DBA9 1 -CFB6 1 -2B 1 -C2B1 1 -C3B7 1 -C397 1 -3C 1 -3D 1 -3E 1 -C2AC 1 -7C 1 -C2A6 1 -7E 1 -CB90 1 -CB91 1 -C2A4 1 -C2A2 1 -24 1 -C2A3 1 -C2A5 1 -30 1 -D9A0 1 -DBB0 1 -31 1 -C2B9 1 -D9A1 1 -DBB1 1 -C2BD 1 -C2BC 1 -32 1 -C2B2 1 -D9A2 1 -DBB2 1 -33 1 -C2B3 1 -D9A3 1 -DBB3 1 -C2BE 1 -34 1 -D9A4 1 -DBB4 1 -35 1 -D9A5 1 -DBB5 1 -36 1 -D9A6 1 -DBB6 1 -37 1 -D9A7 1 -DBB7 1 -38 1 -D9A8 1 -DBB8 1 -39 1 -D9A9 1 -DBB9 1 -41 1 -61 1 -C2AA 1 -C380 1 -C382 1 -C383 1 -C3A0 1 -C3A2 1 -C3A3 1 -C480 1 -C481 1 -C482 1 -C483 1 -C484 1 -C485 1 -C78D 1 -C78E 1 -C79E 1 -C79F 1 -C7A0 1 -C7A1 1 -C7BA 1 -C7BB 1 -C880 1 -C881 1 -C882 1 -C883 1 -C8A6 1 -C8A7 1 -CDA3 1 -C381 1 -C3A1 1 -C7A2 1 -C7A3 1 -C7BC 1 -C7BD 1 -C990 1 -C991 1 -C992 1 -42 1 -62 1 -CA99 1 -C680 1 -C681 1 -C993 1 -C682 1 -C683 1 -43 1 -63 1 -C387 1 -C3A7 1 -C486 1 -C487 1 -C488 1 -C489 1 -C48A 1 -C48B 1 -C48C 1 -C48D 1 -CDA8 1 -C687 1 -C688 1 -C995 1 -44 1 -64 1 -C48E 1 -C48F 1 -CDA9 1 -C784 1 -C785 1 -C786 1 -C7B1 1 -C7B2 1 -C7B3 1 -CAA3 1 -CAA5 1 -CAA4 1 -C390 1 -C3B0 1 -C490 1 -C491 1 -C689 1 -C996 1 -C68A 1 -C997 1 -C68B 1 -C68C 1 -C8A1 1 -45 1 -65 1 -C388 1 -C38A 1 -C38B 1 -C3A8 1 -C3AA 1 -C3AB 1 -C492 1 -C493 1 -C494 1 -C495 1 -C496 1 -C497 1 -C498 1 -C499 1 -C49A 1 -C49B 1 -C884 1 -C885 1 -C886 1 -C887 1 -C8A8 1 -C8A9 1 -CDA4 1 -C389 1 -C3A9 1 -C68E 1 -C79D 1 -C68F 1 -C999 1 -C690 1 -C99B 1 -C998 1 -C99A 1 -C99C 1 -C99D 1 -C99E 1 -CA9A 1 -C9A4 1 -46 1 -66 1 -CAA9 1 -C691 1 -C692 1 -47 1 -67 1 -C49C 1 -C49D 1 -C49E 1 -C49F 1 -C4A0 1 -C4A1 1 -C4A2 1 -C4A3 1 -C7A6 1 -C7A7 1 -C7B4 1 -C7B5 1 -C9A1 1 -C9A2 1 -C7A4 1 -C7A5 1 -C693 1 -C9A0 1 -CA9B 1 -C694 1 -C9A3 1 -CBA0 1 -C6A2 1 -C6A3 1 -48 1 -68 1 -C4A4 1 -C4A5 1 -C89E 1 -C89F 1 -CAB0 1 -CDAA 1 -CA9C 1 -C695 1 -C7B6 1 -C4A6 1 -C4A7 1 -C9A6 1 -CAB1 1 -C9A7 1 -CABB 1 -CABD 1 -49 1 -69 1 -C38C 1 -C38E 1 -C38F 1 -C3AC 1 -C3AE 1 -C3AF 1 -C4A8 1 -C4A9 1 -C4AA 1 -C4AB 1 -C4AC 1 -C4AD 1 -C4AE 1 -C4AF 1 -C4B0 1 -C78F 1 -C790 1 -C888 1 -C889 1 -C88A 1 -C88B 1 -CDA5 1 -C4B2 1 -C4B3 1 -C38D 1 -C3AD 1 -C4B1 1 -C9AA 1 -C697 1 -C9A8 1 -C696 1 -C9A9 1 -4A 1 -6A 1 -C4B4 1 -C4B5 1 -C7B0 1 -CAB2 1 -CA9D 1 -C99F 1 -CA84 1 -4B 1 -6B 1 -C4B6 1 -C4B7 1 -C7A8 1 -C7A9 1 -C698 1 -C699 1 -CA9E 1 -4C 1 -6C 1 -C4B9 1 -C4BA 1 -C4BB 1 -C4BC 1 -C4BD 1 -C4BE 1 -CBA1 1 -C4BF 1 -C580 1 -C787 1 -C788 1 -C789 1 -CAAA 1 -CAAB 1 -CA9F 1 -C581 1 -C582 1 -C69A 1 -C9AB 1 -C9AC 1 -C9AD 1 -C8B4 1 -C9AE 1 -C69B 1 -CA8E 1 -4D 1 -6D 1 -CDAB 1 -C9B1 1 -4E 1 -6E 1 -C391 1 -C3B1 1 -C583 1 -C584 1 -C585 1 -C586 1 -C587 1 -C588 1 -C7B8 1 -C7B9 1 -C78A 1 -C78B 1 -C78C 1 -C9B4 1 -C69D 1 -C9B2 1 -C69E 1 -C8A0 1 -C9B3 1 -C8B5 1 -C58A 1 -C58B 1 -4F 1 -6F 1 -C2BA 1 -C392 1 -C394 1 -C395 1 -C3B2 1 -C3B4 1 -C3B5 1 -C58C 1 -C58D 1 -C58E 1 -C58F 1 -C590 1 -C591 1 -C6A0 1 -C6A1 1 -C791 1 -C792 1 -C7AA 1 -C7AB 1 -C7AC 1 -C7AD 1 -C88C 1 -C88D 1 -C88E 1 -C88F 1 -C8AA 1 -C8AB 1 -C8AC 1 -C8AD 1 -C8AE 1 -C8AF 1 -C8B0 1 -C8B1 1 -CDA6 1 -C592 1 -C593 1 -C393 1 -C3B3 1 -C9B6 1 -C7BE 1 -C7BF 1 -C686 1 -C994 1 -C69F 1 -C9B5 1 -C9B7 1 -C8A2 1 -C8A3 1 -50 1 -70 1 -C6A4 1 -C6A5 1 -C9B8 1 -51 1 -71 1 -CAA0 1 -C4B8 1 -52 1 -72 1 -C594 1 -C595 1 -C596 1 -C597 1 -C598 1 -C599 1 -C890 1 -C891 1 -C892 1 -C893 1 -CAB3 1 -CDAC 1 -C6A6 1 -CA80 1 -C9B9 1 -CAB4 1 -C9BA 1 -C9BB 1 -CAB5 1 -C9BC 1 -C9BD 1 -C9BE 1 -C9BF 1 -CA81 1 -CAB6 1 -53 1 -73 1 -C59A 1 -C59B 1 -C59C 1 -C59D 1 -C59E 1 -C59F 1 -C5A0 1 -C5A1 1 -C5BF 1 -C898 1 -C899 1 -CBA2 1 -C39F 1 -CA82 1 -C6A9 1 -CA83 1 -C6AA 1 -CA85 1 -CA86 1 -54 1 -74 1 -C5A2 1 -C5A3 1 -C5A4 1 -C5A5 1 -C89A 1 -C89B 1 -CDAD 1 -CAA8 1 -C6BE 1 -CAA6 1 -CAA7 1 -C5A6 1 -C5A7 1 -C6AB 1 -C6AC 1 -C6AD 1 -C6AE 1 -CA88 1 -C8B6 1 -CA87 1 -55 1 -75 1 -C399 1 -C39B 1 -C39C 1 -C3B9 1 -C3BB 1 -C3BC 1 -C5A8 1 -C5A9 1 -C5AA 1 -C5AB 1 -C5AC 1 -C5AD 1 -C5AE 1 -C5AF 1 -C5B0 1 -C5B1 1 -C5B2 1 -C5B3 1 -C6AF 1 -C6B0 1 -C793 1 -C794 1 -C795 1 -C796 1 -C797 1 -C798 1 -C799 1 -C79A 1 -C79B 1 -C79C 1 -C894 1 -C895 1 -C896 1 -C897 1 -CDA7 1 -C39A 1 -C3BA 1 -CA89 1 -C9A5 1 -CAAE 1 -CAAF 1 -C69C 1 -C9AF 1 -C9B0 1 -C6B1 1 -CA8A 1 -56 1 -76 1 -CDAE 1 -C6B2 1 -CA8B 1 -CA8C 1 -57 1 -77 1 -C5B4 1 -C5B5 1 -CAB7 1 -CA8D 1 -58 1 -78 1 -CBA3 1 -CDAF 1 -59 1 -79 1 -C3BF 1 -C5B6 1 -C5B7 1 -C5B8 1 -C8B2 1 -C8B3 1 -CAB8 1 -C39D 1 -C3BD 1 -CA8F 1 -C6B3 1 -C6B4 1 -5A 1 -7A 1 -C5B9 1 -C5BA 1 -C5BB 1 -C5BC 1 -C5BD 1 -C5BE 1 -C68D 1 -C39E 1 -C3BE 1 -C384 1 -C386 1 -C3A4 1 -C3A6 1 -C396 1 -C398 1 -C3B6 1 -C3B8 1 -C385 1 -C3A5 1 -C6B5 1 -C6B6 1 -C8A4 1 -C8A5 1 -CA90 1 -CA91 1 -C6B7 1 -C7AE 1 -C7AF 1 -CA92 1 -C6B8 1 -C6B9 1 -C6BA 1 -CA93 1 -C89C 1 -C89D 1 -C6BF 1 -C7B7 1 -C6BB 1 -C6A7 1 -C6A8 1 -C6BC 1 -C6BD 1 -C684 1 -C685 1 -CA94 1 -CB80 1 -CABC 1 -C589 1 -CBAE 1 -CABE 1 -CA95 1 -CBA4 1 -CABF 1 -CB81 1 -CAA1 1 -CAA2 1 -CA96 1 -C780 1 -C781 1 -C782 1 -C783 1 -CA97 1 -CA98 1 -CAAC 1 -CAAD 1 -CE86 1 -CE91 1 -CEAC 1 -CEB1 1 -CE92 1 -CEB2 1 -CF90 1 -CE93 1 -CEB3 1 -CE94 1 -CEB4 1 -CE88 1 -CE95 1 -CEAD 1 -CEB5 1 -CFB5 1 -CF9C 1 -CF9D 1 -CF9A 1 -CF9B 1 -CE96 1 -CEB6 1 -CE89 1 -CE97 1 -CEAE 1 -CEB7 1 -CE98 1 -CEB8 1 -CF91 1 -CFB4 1 -CDBA 1 -CE8A 1 -CE90 1 -CE99 1 -CEAA 1 -CEAF 1 -CEB9 1 -CF8A 1 -CFB3 1 -CE9A 1 -CEBA 1 -CFB0 1 -CF97 1 -CE9B 1 -CEBB 1 -C2B5 1 -CE9C 1 -CEBC 1 -CE9D 1 -CEBD 1 -CE9E 1 -CEBE 1 -CE8C 1 -CE9F 1 -CEBF 1 -CF8C 1 -CEA0 1 -CF80 1 -CF96 1 -CF9E 1 -CF9F 1 -CF98 1 -CF99 1 -CEA1 1 -CF81 1 -CFB1 1 -CEA3 1 -CF82 1 -CF83 1 -CFB2 1 -CFB9 1 -CEA4 1 -CF84 1 -CE8E 1 -CEA5 1 -CEAB 1 -CEB0 1 -CF85 1 -CF8B 1 -CF8D 1 -CF92 1 -CF93 1 -CF94 1 -CEA6 1 -CF86 1 -CF95 1 -CEA7 1 -CF87 1 -CEA8 1 -CF88 1 -CE8F 1 -CEA9 1 -CF89 1 -CF8E 1 -CFA0 1 -CFA1 1 -CFB7 1 -CFB8 1 -CFBA 1 -CFBB 1 -CFA2 1 -CFA3 1 -CFA4 1 -CFA5 1 -CFA6 1 -CFA7 1 -CFA8 1 -CFA9 1 -CFAA 1 -CFAB 1 -CFAC 1 -CFAD 1 -CFAE 1 -CFAF 1 -D090 1 -D0B0 1 -D390 1 -D391 1 -D392 1 -D393 1 -D398 1 -D399 1 -D39A 1 -D39B 1 -D394 1 -D395 1 -D091 1 -D0B1 1 -D092 1 -D0B2 1 -D093 1 -D0B3 1 -D290 1 -D291 1 -D292 1 -D293 1 -D294 1 -D295 1 -D094 1 -D0B4 1 -D480 1 -D481 1 -D082 1 -D192 1 -D482 1 -D483 1 -D083 1 -D193 1 -D298 1 -D299 1 -D080 1 -D081 1 -D095 1 -D0B5 1 -D190 1 -D191 1 -D396 1 -D397 1 -D084 1 -D194 1 -D096 1 -D0B6 1 -D381 1 -D382 1 -D39C 1 -D39D 1 -D296 1 -D297 1 -D097 1 -D0B7 1 -D484 1 -D485 1 -D39E 1 -D39F 1 -D085 1 -D195 1 -D3A0 1 -D3A1 1 -D486 1 -D487 1 -D08D 1 -D098 1 -D0B8 1 -D19D 1 -D3A2 1 -D3A3 1 -D28A 1 -D28B 1 -D3A4 1 -D3A5 1 -D086 1 -D196 1 -D087 1 -D197 1 -D099 1 -D0B9 1 -D088 1 -D198 1 -D09A 1 -D0BA 1 -D29A 1 -D29B 1 -D383 1 -D384 1 -D2A0 1 -D2A1 1 -D29E 1 -D29F 1 -D29C 1 -D29D 1 -D09B 1 -D0BB 1 -D385 1 -D386 1 -D089 1 -D199 1 -D488 1 -D489 1 -D09C 1 -D0BC 1 -D38D 1 -D38E 1 -D09D 1 -D0BD 1 -D389 1 -D38A 1 -D2A2 1 -D2A3 1 -D387 1 -D388 1 -D2A4 1 -D2A5 1 -D08A 1 -D19A 1 -D48A 1 -D48B 1 -D09E 1 -D0BE 1 -D3A6 1 -D3A7 1 -D3A8 1 -D3A9 1 -D3AA 1 -D3AB 1 -D09F 1 -D0BF 1 -D2A6 1 -D2A7 1 -D280 1 -D281 1 -D0A0 1 -D180 1 -D28E 1 -D28F 1 -D0A1 1 -D181 1 -D48C 1 -D48D 1 -D2AA 1 -D2AB 1 -D0A2 1 -D182 1 -D48E 1 -D48F 1 -D2AC 1 -D2AD 1 -D08B 1 -D19B 1 -D08C 1 -D19C 1 -D0A3 1 -D183 1 -D3AE 1 -D3AF 1 -D08E 1 -D19E 1 -D3B0 1 -D3B1 1 -D3B2 1 -D3B3 1 -D2AE 1 -D2AF 1 -D2B0 1 -D2B1 1 -D1B8 1 -D1B9 1 -D0A4 1 -D184 1 -D0A5 1 -D185 1 -D2B2 1 -D2B3 1 -D2BA 1 -D2BB 1 -D1A0 1 -D1A1 1 -D1BE 1 -D1BF 1 -D1BC 1 -D1BD 1 -D1BA 1 -D1BB 1 -D0A6 1 -D186 1 -D2B4 1 -D2B5 1 -D0A7 1 -D187 1 -D3B4 1 -D3B5 1 -D2B6 1 -D2B7 1 -D38B 1 -D38C 1 -D2B8 1 -D2B9 1 -D2BC 1 -D2BD 1 -D2BE 1 -D2BF 1 -D08F 1 -D19F 1 -D0A8 1 -D188 1 -D0A9 1 -D189 1 -D0AA 1 -D18A 1 -D0AB 1 -D18B 1 -D3B8 1 -D3B9 1 -D0AC 1 -D18C 1 -D28C 1 -D28D 1 -D1A2 1 -D1A3 1 -D0AD 1 -D18D 1 -D3AC 1 -D3AD 1 -D0AE 1 -D18E 1 -D0AF 1 -D18F 1 -D1A4 1 -D1A5 1 -D1A6 1 -D1A7 1 -D1AA 1 -D1AB 1 -D1A8 1 -D1A9 1 -D1AC 1 -D1AD 1 -D1AE 1 -D1AF 1 -D1B0 1 -D1B1 1 -D1B2 1 -D1B3 1 -D1B4 1 -D1B5 1 -D1B6 1 -D1B7 1 -D2A8 1 -D2A9 1 -D380 1 -D4B1 1 -D5A1 1 -D4B2 1 -D5A2 1 -D4B3 1 -D5A3 1 -D4B4 1 -D5A4 1 -D4B5 1 -D5A5 1 -D687 1 -D4B6 1 -D5A6 1 -D4B7 1 -D5A7 1 -D4B8 1 -D5A8 1 -D4B9 1 -D5A9 1 -D4BA 1 -D5AA 1 -D4BB 1 -D5AB 1 -D4BC 1 -D5AC 1 -D4BD 1 -D5AD 1 -D4BE 1 -D5AE 1 -D4BF 1 -D5AF 1 -D580 1 -D5B0 1 -D581 1 -D5B1 1 -D582 1 -D5B2 1 -D583 1 -D5B3 1 -D584 1 -D5B4 1 -D585 1 -D5B5 1 -D586 1 -D5B6 1 -D587 1 -D5B7 1 -D588 1 -D5B8 1 -D589 1 -D5B9 1 -D58A 1 -D5BA 1 -D58B 1 -D5BB 1 -D58C 1 -D5BC 1 -D58D 1 -D5BD 1 -D58E 1 -D5BE 1 -D58F 1 -D5BF 1 -D590 1 -D680 1 -D591 1 -D681 1 -D592 1 -D682 1 -D593 1 -D683 1 -D594 1 -D684 1 -D595 1 -D685 1 -D596 1 -D686 1 -D599 1 -D790 1 -D791 1 -D792 1 -D793 1 -D794 1 -D795 1 -D7B0 1 -D7B1 1 -D796 1 -D797 1 -D798 1 -D799 1 -D7B2 1 -D79A 1 -D79B 1 -D79C 1 -D79D 1 -D79E 1 -D79F 1 -D7A0 1 -D7A1 1 -D7A2 1 -D7A3 1 -D7A4 1 -D7A5 1 -D7A6 1 -D7A7 1 -D7A8 1 -D7A9 1 -D7AA 1 -D8A1 1 -D9B4 1 -DBBD 1 -D8A2 1 -D8A3 1 -D9B2 1 -D9B1 1 -D8A4 1 -D8A5 1 -D9B3 1 -D8A6 1 -D8A7 1 -D9B5 1 -D9AE 1 -D8A8 1 -D9BB 1 -D9BE 1 -DA80 1 -D8A9 1 -D8AA 1 -D8AB 1 -D9B9 1 -D9BA 1 -D9BC 1 -D9BD 1 -D9BF 1 -D8AC 1 -DA83 1 -DA84 1 -DA86 1 -DABF 1 -DA87 1 -D8AD 1 -D8AE 1 -DA81 1 -DA82 1 -DA85 1 -D8AF 1 -D8B0 1 -DA88 1 -DA89 1 -DA8A 1 -DA8B 1 -DA8C 1 -DA8D 1 -DA8E 1 -DA8F 1 -DA90 1 -DBAE 1 -D8B1 1 -D8B2 1 -DA91 1 -DA92 1 -DA93 1 -DA94 1 -DA95 1 -DA96 1 -DA97 1 -DA98 1 -DA99 1 -DBAF 1 -D8B3 1 -D8B4 1 -DA9A 1 -DA9B 1 -DA9C 1 -DBBA 1 -D8B5 1 -D8B6 1 -DA9D 1 -DA9E 1 -DBBB 1 -D8B7 1 -D8B8 1 -DA9F 1 -D8B9 1 -D8BA 1 -DAA0 1 -DBBC 1 -D981 1 -DAA1 1 -DAA2 1 -DAA3 1 -DAA4 1 -DAA5 1 -DAA6 1 -D9AF 1 -D982 1 -DAA7 1 -DAA8 1 -D983 1 -DAA9 1 -DAAA 1 -DAAB 1 -DAAC 1 -DAAD 1 -DAAE 1 -DAAF 1 -DAB0 1 -DAB1 1 -DAB2 1 -DAB3 1 -DAB4 1 -D984 1 -DAB5 1 -DAB6 1 -DAB7 1 -DAB8 1 -D985 1 -DBBE 1 -D986 1 -DABA 1 -DABB 1 -DABC 1 -DABD 1 -DAB9 1 -D987 1 -DABE 1 -DB81 1 -DB82 1 -DB83 1 -DBBF 1 -DB80 1 -DB95 1 -D988 1 -DBA5 1 -D9B6 1 -DB84 1 -DB85 1 -DB86 1 -DB87 1 -D9B7 1 -DB88 1 -DB89 1 -DB8A 1 -DB8B 1 -DB8F 1 -D989 1 -D98A 1 -DBA6 1 -D9B8 1 -DB8C 1 -DB8D 1 -DB8E 1 -DB90 1 -DB91 1 -DB92 1 -DB93 1 -DC90 1 -DC92 1 -DCAD 1 -DC93 1 -DC94 1 -DCAE 1 -DC96 1 -DC95 1 -DCAF 1 -DC97 1 -DC98 1 -DC99 1 -DD8D 1 -DC9A 1 -DC9B 1 -DC9C 1 -DC9D 1 -DC9E 1 -DC9F 1 -DD8E 1 -DCA0 1 -DCA1 1 -DCA2 1 -DCA3 1 -DCA4 1 -DCA5 1 -DCA6 1 -DCA7 1 -DD8F 1 -DCA8 1 -DCA9 1 -DCAA 1 -DCAB 1 -DCAC 1 -DE80 1 -DE99 1 -DE9A 1 -DE81 1 -DE82 1 -DE83 1 -DE9C 1 -DE84 1 -DE85 1 -DE86 1 -DE87 1 -DEA2 1 -DEA3 1 -DE88 1 -DEA5 1 -DE89 1 -DE8A 1 -DE8B 1 -DE9B 1 -DE8C 1 -DE98 1 -DEA0 1 -DEA1 1 -DE8D 1 -DE8E 1 -DEA4 1 -DE8F 1 -DE90 1 -DE9D 1 -DE9E 1 -DE9F 1 -DE91 1 -DE92 1 -DE93 1 -DE94 1 -DE95 1 -DE96 1 -DE97 1 -DEB1 1 -DEA6 1 -DEA7 1 -DEA8 1 -DEA9 1 -DEAA 1 -DEAB 1 -DEAC 1 -DEAD 1 -DEAE 1 -DEAF 1 -DEB0 1 -E4B880 1 -E4B881 1 -E4B882 1 -E4B883 1 -E4B884 1 -E4B885 1 -E4B886 1 -E4B887 1 -E4B888 1 -E4B889 1 -E4B88A 1 -E4B88B 1 -E4B88C 1 -E4B88D 1 -E4B88E 1 -E4B88F 1 -E4B890 1 -E4B891 1 -E4B892 1 -E4B893 1 -E4B894 1 -E4B895 1 -E4B896 1 -E4B897 1 -E4B898 1 -E4B899 1 -E4B89A 1 -E4B89B 1 -E4B89C 1 -E4B89D 1 -E4B89E 1 -E4B89F 1 -E4B8A0 1 -E4B8A1 1 -E4B8A2 1 -E4B8A3 1 -E4B8A4 1 -E4B8A5 1 -E4B8A6 1 -E4B8A7 1 -E4B8A8 1 -E4B8A9 1 -E4B8AA 1 -E4B8AB 1 -E4B8AC 1 -E4B8AD 1 -E4B8AE 1 -E4B8AF 1 -E4B8B0 1 -E4B8B1 1 -E4B8B2 1 -E4B8B3 1 -E4B8B4 1 -E4B8B5 1 -E4B8B6 1 -E4B8B7 1 -E4B8B8 1 -E4B8B9 1 -E4B8BA 1 -E4B8BB 1 -E4B8BC 1 -E4B8BD 1 -E4B8BE 1 -E4B8BF 1 -E4B980 1 -E4B981 1 -E4B982 1 -E4B983 1 -E4B984 1 -E4B985 1 -E4B986 1 -E4B987 1 -E4B988 1 -E4B989 1 -E4B98A 1 -E4B98B 1 -E4B98C 1 -E4B98D 1 -E4B98E 1 -E4B98F 1 -E4B990 1 -E4B991 1 -E4B992 1 -E4B993 1 -E4B994 1 -E4B995 1 -E4B996 1 -E4B997 1 -E4B998 1 -E4B999 1 -E4B99A 1 -E4B99B 1 -E4B99C 1 -E4B99D 1 -E4B99E 1 -E4B99F 1 -E4B9A0 1 -E4B9A1 1 -E4B9A2 1 -E4B9A3 1 -E4B9A4 1 -E4B9A5 1 -E4B9A6 1 -E4B9A7 1 -E4B9A8 1 -E4B9A9 1 -E4B9AA 1 -E4B9AB 1 -E4B9AC 1 -E4B9AD 1 -E4B9AE 1 -E4B9AF 1 -E4B9B0 1 -E4B9B1 1 -E4B9B2 1 -E4B9B3 1 -E4B9B4 1 -E4B9B5 1 -E4B9B6 1 -E4B9B7 1 -E4B9B8 1 -E4B9B9 1 -E4B9BA 1 -E4B9BB 1 -E4B9BC 1 -E4B9BD 1 -E4B9BE 1 -E4B9BF 1 -E4BA80 1 -E4BA81 1 -E4BA82 1 -E4BA83 1 -E4BA84 1 -E4BA85 1 -E4BA86 1 -E4BA87 1 -E4BA88 1 -E4BA89 1 -E4BA8A 1 -E4BA8B 1 -E4BA8C 1 -E4BA8D 1 -E4BA8E 1 -E4BA8F 1 -E4BA90 1 -E4BA91 1 -E4BA92 1 -E4BA93 1 -E4BA94 1 -E4BA95 1 -E4BA96 1 -E4BA97 1 -E4BA98 1 -E4BA99 1 -E4BA9A 1 -E4BA9B 1 -E4BA9C 1 -E4BA9D 1 -E4BA9E 1 -E4BA9F 1 -E4BAA0 1 -E4BAA1 1 -E4BAA2 1 -E4BAA3 1 -E4BAA4 1 -E4BAA5 1 -E4BAA6 1 -E4BAA7 1 -E4BAA8 1 -E4BAA9 1 -E4BAAA 1 -E4BAAB 1 -E4BAAC 1 -E4BAAD 1 -E4BAAE 1 -E4BAAF 1 -E4BAB0 1 -E4BAB1 1 -E4BAB2 1 -E4BAB3 1 -E4BAB4 1 -E4BAB5 1 -E4BAB6 1 -E4BAB7 1 -E4BAB8 1 -E4BAB9 1 -E4BABA 1 -E4BABB 1 -E4BABC 1 -E4BABD 1 -E4BABE 1 -E4BABF 1 -E4BB80 1 -E4BB81 1 -E4BB82 1 -E4BB83 1 -E4BB84 1 -E4BB85 1 -E4BB86 1 -E4BB87 1 -E4BB88 1 -E4BB89 1 -E4BB8A 1 -E4BB8B 1 -E4BB8C 1 -E4BB8D 1 -E4BB8E 1 -E4BB8F 1 -E4BB90 1 -E4BB91 1 -E4BB92 1 -E4BB93 1 -E4BB94 1 -E4BB95 1 -E4BB96 1 -E4BB97 1 -E4BB98 1 -E4BB99 1 -E4BB9A 1 -E4BB9B 1 -E4BB9C 1 -E4BB9D 1 -E4BB9E 1 -E4BB9F 1 -E4BBA0 1 -E4BBA1 1 -E4BBA2 1 -E4BBA3 1 -E4BBA4 1 -E4BBA5 1 -E4BBA6 1 -E4BBA7 1 -E4BBA8 1 -E4BBA9 1 -E4BBAA 1 -E4BBAB 1 -E4BBAC 1 -E4BBAD 1 -E4BBAE 1 -E4BBAF 1 -E4BBB0 1 -E4BBB1 1 -E4BBB2 1 -E4BBB3 1 -E4BBB4 1 -E4BBB5 1 -E4BBB6 1 -E4BBB7 1 -E4BBB8 1 -E4BBB9 1 -E4BBBA 1 -E4BBBB 1 -E4BBBC 1 -E4BBBD 1 -E4BBBE 1 -E4BBBF 1 -E4BC80 1 -E4BC81 1 -E4BC82 1 -E4BC83 1 -E4BC84 1 -E4BC85 1 -E4BC86 1 -E4BC87 1 -E4BC88 1 -E4BC89 1 -E4BC8A 1 -E4BC8B 1 -E4BC8C 1 -E4BC8D 1 -E4BC8E 1 -E4BC8F 1 -E4BC90 1 -E4BC91 1 -E4BC92 1 -E4BC93 1 -E4BC94 1 -E4BC95 1 -E4BC96 1 -E4BC97 1 -E4BC98 1 -E4BC99 1 -E4BC9A 1 -E4BC9B 1 -E4BC9C 1 -E4BC9D 1 -E4BC9E 1 -E4BC9F 1 -E4BCA0 1 -E4BCA1 1 -E4BCA2 1 -E4BCA3 1 -E4BCA4 1 -E4BCA5 1 -E4BCA6 1 -E4BCA7 1 -E4BCA8 1 -E4BCA9 1 -E4BCAA 1 -E4BCAB 1 -E4BCAC 1 -E4BCAD 1 -E4BCAE 1 -E4BCAF 1 -E4BCB0 1 -E4BCB1 1 -E4BCB2 1 -E4BCB3 1 -E4BCB4 1 -E4BCB5 1 -E4BCB6 1 -E4BCB7 1 -E4BCB8 1 -E4BCB9 1 -E4BCBA 1 -E4BCBB 1 -E4BCBC 1 -E4BCBD 1 -E4BCBE 1 -E4BCBF 1 -E4BD80 1 -E4BD81 1 -E4BD82 1 -E4BD83 1 -E4BD84 1 -E4BD85 1 -E4BD86 1 -E4BD87 1 -E4BD88 1 -E4BD89 1 -E4BD8A 1 -E4BD8B 1 -E4BD8C 1 -E4BD8D 1 -E4BD8E 1 -E4BD8F 1 -E4BD90 1 -E4BD91 1 -E4BD92 1 -E4BD93 1 -E4BD94 1 -E4BD95 1 -E4BD96 1 -E4BD97 1 -E4BD98 1 -E4BD99 1 -E4BD9A 1 -E4BD9B 1 -E4BD9C 1 -E4BD9D 1 -E4BD9E 1 -E4BD9F 1 -E4BDA0 1 -E4BDA1 1 -E4BDA2 1 -E4BDA3 1 -E4BDA4 1 -E4BDA5 1 -E4BDA6 1 -E4BDA7 1 -E4BDA8 1 -E4BDA9 1 -E4BDAA 1 -E4BDAB 1 -E4BDAC 1 -E4BDAD 1 -E4BDAE 1 -E4BDAF 1 -E4BDB0 1 -E4BDB1 1 -E4BDB2 1 -E4BDB3 1 -E4BDB4 1 -E4BDB5 1 -E4BDB6 1 -E4BDB7 1 -E4BDB8 1 -E4BDB9 1 -E4BDBA 1 -E4BDBB 1 -E4BDBC 1 -E4BDBD 1 -E4BDBE 1 -E4BDBF 1 -E4BE80 1 -E4BE81 1 -E4BE82 1 -E4BE83 1 -E4BE84 1 -E4BE85 1 -E4BE86 1 -E4BE87 1 -E4BE88 1 -E4BE89 1 -E4BE8A 1 -E4BE8B 1 -E4BE8C 1 -E4BE8D 1 -E4BE8E 1 -E4BE8F 1 -E4BE90 1 -E4BE91 1 -E4BE92 1 -E4BE93 1 -E4BE94 1 -E4BE95 1 -E4BE96 1 -E4BE97 1 -E4BE98 1 -E4BE99 1 -E4BE9A 1 -E4BE9B 1 -E4BE9C 1 -E4BE9D 1 -E4BE9E 1 -E4BE9F 1 -E4BEA0 1 -E4BEA1 1 -E4BEA2 1 -E4BEA3 1 -E4BEA4 1 -E4BEA5 1 -E4BEA6 1 -E4BEA7 1 -E4BEA8 1 -E4BEA9 1 -E4BEAA 1 -E4BEAB 1 -E4BEAC 1 -E4BEAD 1 -E4BEAE 1 -E4BEAF 1 -E4BEB0 1 -E4BEB1 1 -E4BEB2 1 -E4BEB3 1 -E4BEB4 1 -E4BEB5 1 -E4BEB6 1 -E4BEB7 1 -E4BEB8 1 -E4BEB9 1 -E4BEBA 1 -E4BEBB 1 -E4BEBC 1 -E4BEBD 1 -E4BEBE 1 -E4BEBF 1 -E4BF80 1 -E4BF81 1 -E4BF82 1 -E4BF83 1 -E4BF84 1 -E4BF85 1 -E4BF86 1 -E4BF87 1 -E4BF88 1 -E4BF89 1 -E4BF8A 1 -E4BF8B 1 -E4BF8C 1 -E4BF8D 1 -E4BF8E 1 -E4BF8F 1 -E4BF90 1 -E4BF91 1 -E4BF92 1 -E4BF93 1 -E4BF94 1 -E4BF95 1 -E4BF96 1 -E4BF97 1 -E4BF98 1 -E4BF99 1 -E4BF9A 1 -E4BF9B 1 -E4BF9C 1 -E4BF9D 1 -E4BF9E 1 -E4BF9F 1 -E4BFA0 1 -E4BFA1 1 -E4BFA2 1 -E4BFA3 1 -E4BFA4 1 -E4BFA5 1 -E4BFA6 1 -E4BFA7 1 -E4BFA8 1 -E4BFA9 1 -E4BFAA 1 -E4BFAB 1 -E4BFAC 1 -E4BFAD 1 -E4BFAE 1 -E4BFAF 1 -E4BFB0 1 -E4BFB1 1 -E4BFB2 1 -E4BFB3 1 -E4BFB4 1 -E4BFB5 1 -E4BFB6 1 -E4BFB7 1 -E4BFB8 1 -E4BFB9 1 -E4BFBA 1 -E4BFBB 1 -E4BFBC 1 -E4BFBD 1 -E4BFBE 1 -E4BFBF 1 -C8B7 1 -C8B8 1 -C8B9 1 -C8BA 1 -C8BB 1 -C8BC 1 -C8BD 1 -C8BE 1 -C8BF 1 -C980 1 -C981 1 -C982 1 -C983 1 -C984 1 -C985 1 -C986 1 -C987 1 -C988 1 -C989 1 -C98A 1 -C98B 1 -C98C 1 -C98D 1 -C98E 1 -C98F 1 -CD98 1 -CD99 1 -CD9A 1 -CD9B 1 -CD9C 1 -CDB0 1 -CDB1 1 -CDB2 1 -CDB3 1 -CDB6 1 -CDB7 1 -CDB8 1 -CDB9 1 -CDBB 1 -CDBC 1 -CDBD 1 -CDBF 1 -CE80 1 -CE81 1 -CE82 1 -CE83 1 -CE8B 1 -CE8D 1 -CEA2 1 -CF8F 1 -CFBC 1 -CFBD 1 -CFBE 1 -CFBF 1 -D287 1 -D38F 1 -D3B6 1 -D3B7 1 -D3BA 1 -D3BB 1 -D3BC 1 -D3BD 1 -D3BE 1 -D3BF 1 -D490 1 -D491 1 -D492 1 -D493 1 -D494 1 -D495 1 -D496 1 -D497 1 -D498 1 -D499 1 -D49A 1 -D49B 1 -D49C 1 -D49D 1 -D49E 1 -D49F 1 -D4A0 1 -D4A1 1 -D4A2 1 -D4A3 1 -D4A4 1 -D4A5 1 -D4A6 1 -D4A7 1 -D4A8 1 -D4A9 1 -D4AA 1 -D4AB 1 -D4AC 1 -D4AD 1 -D4AE 1 -D4AF 1 -D4B0 1 -D597 1 -D598 1 -D5A0 1 -D688 1 -D68B 1 -D68C 1 -D68D 1 -D68E 1 -D68F 1 -D690 1 -D6A2 1 -D6BA 1 -D785 1 -D786 1 -D787 1 -D788 1 -D789 1 -D78A 1 -D78B 1 -D78C 1 -D78D 1 -D78E 1 -D78F 1 -D7AB 1 -D7AC 1 -D7AD 1 -D7AE 1 -D7AF 1 -D7B5 1 -D7B6 1 -D7B7 1 -D7B8 1 -D7B9 1 -D7BA 1 -D7BB 1 -D7BC 1 -D7BD 1 -D7BE 1 -D7BF 1 -D884 1 -D885 1 -D886 1 -D887 1 -D888 1 -D889 1 -D88A 1 -D88B 1 -D896 1 -D897 1 -D898 1 -D899 1 -D89A 1 -D89C 1 -D89D 1 -D89E 1 -D8A0 1 -D8BB 1 -D8BC 1 -D8BD 1 -D8BE 1 -D8BF 1 -D999 1 -D99A 1 -D99B 1 -D99C 1 -D99D 1 -D99E 1 -D99F 1 -DC8E 1 -DD8B 1 -DD8C 1 -DD90 1 -DD91 1 -DD92 1 -DD93 1 -DD94 1 -DD95 1 -DD96 1 -DD97 1 -DD98 1 -DD99 1 -DD9A 1 -DD9B 1 -DD9C 1 -DD9D 1 -DD9E 1 -DD9F 1 -DDA0 1 -DDA1 1 -DDA2 1 -DDA3 1 -DDA4 1 -DDA5 1 -DDA6 1 -DDA7 1 -DDA8 1 -DDA9 1 -DDAA 1 -DDAB 1 -DDAC 1 -DDAD 1 -DDAE 1 -DDAF 1 -DDB0 1 -DDB1 1 -DDB2 1 -DDB3 1 -DDB4 1 -DDB5 1 -DDB6 1 -DDB7 1 -DDB8 1 -DDB9 1 -DDBA 1 -DDBB 1 -DDBC 1 -DDBD 1 -DDBE 1 -DDBF 1 -DEB2 1 -DEB3 1 -DEB4 1 -DEB5 1 -DEB6 1 -DEB7 1 -DEB8 1 -DEB9 1 -DEBA 1 -DEBB 1 -DEBC 1 -DEBD 1 -DEBE 1 -DEBF 1 -DF80 1 -DF81 1 -DF82 1 -DF83 1 -DF84 1 -DF85 1 -DF86 1 -DF87 1 -DF88 1 -DF89 1 -DF8A 1 -DF8B 1 -DF8C 1 -DF8D 1 -DF8E 1 -DF8F 1 -DF90 1 -DF91 1 -DF92 1 -DF93 1 -DF94 1 -DF95 1 -DF96 1 -DF97 1 -DF98 1 -DF99 1 -DF9A 1 -DF9B 1 -DF9C 1 -DF9D 1 -DF9E 1 -DF9F 1 -DFA0 1 -DFA1 1 -DFA2 1 -DFA3 1 -DFA4 1 -DFA5 1 -DFA6 1 -DFA7 1 -DFA8 1 -DFA9 1 -DFAA 1 -DFAB 1 -DFAC 1 -DFAD 1 -DFAE 1 -DFAF 1 -DFB0 1 -DFB1 1 -DFB2 1 -DFB3 1 -DFB4 1 -DFB5 1 -DFB6 1 -DFB7 1 -DFB8 1 -DFB9 1 -DFBA 1 -DFBB 1 -DFBC 1 -DFBD 1 -DFBE 1 -DFBF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_latvian_ci) ENGINE=NDB CHARACTER SET utf8 COLLATE utf8_latvian_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_latvian_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -C285 1 -7F 1 -C280 1 -C281 1 -C282 1 -C283 1 -C284 1 -C286 1 -C287 1 -C288 1 -C289 1 -C28A 1 -C28B 1 -C28C 1 -C28D 1 -C28E 1 -C28F 1 -C290 1 -C291 1 -C292 1 -C293 1 -C294 1 -C295 1 -C296 1 -C297 1 -C298 1 -C299 1 -C29A 1 -C29B 1 -C29C 1 -C29D 1 -C29E 1 -C29F 1 -C2A0 1 -CC80 1 -CC81 1 -CC82 1 -CC83 1 -CC84 1 -CC85 1 -CC86 1 -CC87 1 -CC88 1 -CC89 1 -CC8A 1 -CC8B 1 -CC8C 1 -CC8D 1 -CC8E 1 -CC8F 1 -CC90 1 -CC91 1 -CC92 1 -CC93 1 -CC94 1 -CC95 1 -CC96 1 -CC97 1 -CC98 1 -CC99 1 -CC9A 1 -CC9B 1 -CC9C 1 -CC9D 1 -CC9E 1 -CC9F 1 -CCA0 1 -CCA1 1 -CCA2 1 -CCA3 1 -CCA4 1 -CCA5 1 -CCA6 1 -CCA7 1 -CCA8 1 -CCA9 1 -CCAA 1 -CCAB 1 -CCAC 1 -CCAD 1 -CCAE 1 -CCAF 1 -CCB0 1 -CCB1 1 -CCB2 1 -CCB3 1 -CCB4 1 -CCB5 1 -CCB6 1 -CCB7 1 -CCB8 1 -CCB9 1 -CCBA 1 -CCBB 1 -CCBC 1 -CCBD 1 -CCBE 1 -CCBF 1 -CD80 1 -CD81 1 -CD82 1 -CD83 1 -CD84 1 -CD85 1 -CD86 1 -CD87 1 -CD88 1 -CD89 1 -CD8A 1 -CD8B 1 -CD8C 1 -CD8D 1 -CD8E 1 -CD8F 1 -CD90 1 -CD91 1 -CD92 1 -CD93 1 -CD94 1 -CD95 1 -CD96 1 -CD97 1 -CD9D 1 -CD9E 1 -CD9F 1 -CDA0 1 -CDA1 1 -CDA2 1 -D283 1 -D284 1 -D285 1 -D286 1 -D288 1 -D289 1 -D691 1 -D692 1 -D693 1 -D694 1 -D695 1 -D696 1 -D697 1 -D698 1 -D699 1 -D69A 1 -D69B 1 -D69C 1 -D69D 1 -D69E 1 -D69F 1 -D6A0 1 -D6A1 1 -D6A3 1 -D6A4 1 -D6A5 1 -D6A6 1 -D6A7 1 -D6A8 1 -D6A9 1 -D6AA 1 -D6AB 1 -D6AC 1 -D6AD 1 -D6AE 1 -D6AF 1 -D6B0 1 -D6B1 1 -D6B2 1 -D6B3 1 -D6B4 1 -D6B5 1 -D6B6 1 -D6B7 1 -D6B8 1 -D6B9 1 -D6BB 1 -D6BC 1 -D6BD 1 -D6BF 1 -D781 1 -D782 1 -D784 1 -D880 1 -D881 1 -D882 1 -D883 1 -D890 1 -D891 1 -D892 1 -D893 1 -D894 1 -D895 1 -D98B 1 -D98C 1 -D98D 1 -D98E 1 -D98F 1 -D990 1 -D991 1 -D992 1 -D993 1 -D994 1 -D995 1 -D996 1 -D997 1 -D998 1 -D9B0 1 -DB96 1 -DB97 1 -DB98 1 -DB99 1 -DB9A 1 -DB9B 1 -DB9C 1 -DB9D 1 -DB9E 1 -DB9F 1 -DBA0 1 -DBA1 1 -DBA2 1 -DBA3 1 -DBA4 1 -DBA7 1 -DBA8 1 -DBAA 1 -DBAB 1 -DBAC 1 -DBAD 1 -DC8F 1 -DC91 1 -DCB0 1 -DCB1 1 -DCB2 1 -DCB3 1 -DCB4 1 -DCB5 1 -DCB6 1 -DCB7 1 -DCB8 1 -DCB9 1 -DCBA 1 -DCBB 1 -DCBC 1 -DCBD 1 -DCBE 1 -DCBF 1 -DD80 1 -DD81 1 -DD82 1 -DD83 1 -DD84 1 -DD85 1 -DD86 1 -DD87 1 -DD88 1 -DD89 1 -DD8A 1 -D980 1 -60 1 -C2B4 1 -CE84 1 -CB9C 1 -5E 1 -C2AF 1 -CB98 1 -CB99 1 -C2A8 1 -CE85 1 -CB9A 1 -CB9D 1 -C2B8 1 -CB9B 1 -5F 1 -C2AD 1 -2D 1 -D68A 1 -2C 1 -D59D 1 -D88C 1 -D88D 1 -D9AB 1 -D9AC 1 -3B 1 -CDBE 1 -D89B 1 -3A 1 -D689 1 -DC83 1 -DC84 1 -DC85 1 -DC86 1 -DC87 1 -DC88 1 -21 1 -C2A1 1 -D59C 1 -3F 1 -C2BF 1 -D59E 1 -D89F 1 -DC89 1 -2E 1 -DB94 1 -DC81 1 -DC82 1 -C2B7 1 -CE87 1 -DC80 1 -27 1 -22 1 -C2AB 1 -C2BB 1 -28 1 -29 1 -5B 1 -7B 1 -7D 1 -C2A7 1 -C2B6 1 -C2A9 1 -C2AE 1 -40 1 -2A 1 -D9AD 1 -2F 1 -26 1 -23 1 -25 1 -D9AA 1 -D59A 1 -D59B 1 -D59F 1 -D6BE 1 -D780 1 -D783 1 -D7B3 1 -D7B4 1 -DC8A 1 -DC8B 1 -DC8C 1 -DC8D 1 -CAB9 1 -CDB4 1 -CDB5 1 -CABA 1 -CB82 1 -CB83 1 -CB84 1 -CB85 1 -CB86 1 -CB87 1 -CB88 1 -CB89 1 -CB8A 1 -CB8B 1 -CB8C 1 -CB8D 1 -CB8E 1 -CB8F 1 -CB92 1 -CB93 1 -CB94 1 -CB95 1 -CB96 1 -CB97 1 -CB9E 1 -CB9F 1 -CBA5 1 -CBA6 1 -CBA7 1 -CBA8 1 -CBA9 1 -CBAA 1 -CBAB 1 -CBAC 1 -CBAD 1 -CBAF 1 -CBB0 1 -CBB1 1 -CBB2 1 -CBB3 1 -CBB4 1 -CBB5 1 -CBB6 1 -CBB7 1 -CBB8 1 -CBB9 1 -CBBA 1 -CBBB 1 -CBBC 1 -CBBD 1 -CBBE 1 -CBBF 1 -C2B0 1 -D282 1 -D88E 1 -D88F 1 -DBA9 1 -CFB6 1 -2B 1 -C2B1 1 -C3B7 1 -C397 1 -3C 1 -3D 1 -3E 1 -C2AC 1 -7C 1 -C2A6 1 -7E 1 -CB90 1 -CB91 1 -C2A4 1 -C2A2 1 -24 1 -C2A3 1 -C2A5 1 -30 1 -D9A0 1 -DBB0 1 -31 1 -C2B9 1 -D9A1 1 -DBB1 1 -C2BD 1 -C2BC 1 -32 1 -C2B2 1 -D9A2 1 -DBB2 1 -33 1 -C2B3 1 -D9A3 1 -DBB3 1 -C2BE 1 -34 1 -D9A4 1 -DBB4 1 -35 1 -D9A5 1 -DBB5 1 -36 1 -D9A6 1 -DBB6 1 -37 1 -D9A7 1 -DBB7 1 -38 1 -D9A8 1 -DBB8 1 -39 1 -D9A9 1 -DBB9 1 -41 1 -61 1 -C2AA 1 -C380 1 -C381 1 -C382 1 -C383 1 -C384 1 -C385 1 -C3A0 1 -C3A1 1 -C3A2 1 -C3A3 1 -C3A4 1 -C3A5 1 -C480 1 -C481 1 -C482 1 -C483 1 -C484 1 -C485 1 -C78D 1 -C78E 1 -C79E 1 -C79F 1 -C7A0 1 -C7A1 1 -C7BA 1 -C7BB 1 -C880 1 -C881 1 -C882 1 -C883 1 -C8A6 1 -C8A7 1 -CDA3 1 -C386 1 -C3A6 1 -C7A2 1 -C7A3 1 -C7BC 1 -C7BD 1 -C990 1 -C991 1 -C992 1 -42 1 -62 1 -CA99 1 -C680 1 -C681 1 -C993 1 -C682 1 -C683 1 -43 1 -63 1 -C387 1 -C3A7 1 -C486 1 -C487 1 -C488 1 -C489 1 -C48A 1 -C48B 1 -CDA8 1 -C48C 1 -C48D 1 -C687 1 -C688 1 -C995 1 -44 1 -64 1 -C48E 1 -C48F 1 -CDA9 1 -C784 1 -C785 1 -C786 1 -C7B1 1 -C7B2 1 -C7B3 1 -CAA3 1 -CAA5 1 -CAA4 1 -C490 1 -C491 1 -C689 1 -C996 1 -C68A 1 -C997 1 -C68B 1 -C68C 1 -C8A1 1 -C390 1 -C3B0 1 -45 1 -65 1 -C388 1 -C389 1 -C38A 1 -C38B 1 -C3A8 1 -C3A9 1 -C3AA 1 -C3AB 1 -C492 1 -C493 1 -C494 1 -C495 1 -C496 1 -C497 1 -C498 1 -C499 1 -C49A 1 -C49B 1 -C884 1 -C885 1 -C886 1 -C887 1 -C8A8 1 -C8A9 1 -CDA4 1 -C68E 1 -C79D 1 -C68F 1 -C999 1 -C690 1 -C99B 1 -C998 1 -C99A 1 -C99C 1 -C99D 1 -C99E 1 -CA9A 1 -C9A4 1 -46 1 -66 1 -CAA9 1 -C691 1 -C692 1 -47 1 -67 1 -C49C 1 -C49D 1 -C49E 1 -C49F 1 -C4A0 1 -C4A1 1 -C7A6 1 -C7A7 1 -C7B4 1 -C7B5 1 -C4A2 1 -C4A3 1 -C9A1 1 -C9A2 1 -C7A4 1 -C7A5 1 -C693 1 -C9A0 1 -CA9B 1 -C694 1 -C9A3 1 -CBA0 1 -C6A2 1 -C6A3 1 -48 1 -68 1 -C4A4 1 -C4A5 1 -C89E 1 -C89F 1 -CAB0 1 -CDAA 1 -CA9C 1 -C695 1 -C7B6 1 -C4A6 1 -C4A7 1 -C9A6 1 -CAB1 1 -C9A7 1 -CABB 1 -CABD 1 -49 1 -69 1 -C38C 1 -C38D 1 -C38E 1 -C38F 1 -C3AC 1 -C3AD 1 -C3AE 1 -C3AF 1 -C4A8 1 -C4A9 1 -C4AA 1 -C4AB 1 -C4AC 1 -C4AD 1 -C4AE 1 -C4AF 1 -C4B0 1 -C78F 1 -C790 1 -C888 1 -C889 1 -C88A 1 -C88B 1 -CDA5 1 -C4B2 1 -C4B3 1 -59 1 -79 1 -C4B1 1 -C9AA 1 -C697 1 -C9A8 1 -C696 1 -C9A9 1 -4A 1 -6A 1 -C4B4 1 -C4B5 1 -C7B0 1 -CAB2 1 -CA9D 1 -C99F 1 -CA84 1 -4B 1 -6B 1 -C7A8 1 -C7A9 1 -C4B6 1 -C4B7 1 -C698 1 -C699 1 -CA9E 1 -4C 1 -6C 1 -C4B9 1 -C4BA 1 -C4BD 1 -C4BE 1 -CBA1 1 -C4BF 1 -C580 1 -C787 1 -C788 1 -C789 1 -CAAA 1 -CAAB 1 -C4BB 1 -C4BC 1 -CA9F 1 -C581 1 -C582 1 -C69A 1 -C9AB 1 -C9AC 1 -C9AD 1 -C8B4 1 -C9AE 1 -C69B 1 -CA8E 1 -4D 1 -6D 1 -CDAB 1 -C9B1 1 -4E 1 -6E 1 -C391 1 -C3B1 1 -C583 1 -C584 1 -C587 1 -C588 1 -C7B8 1 -C7B9 1 -C78A 1 -C78B 1 -C78C 1 -C585 1 -C586 1 -C9B4 1 -C69D 1 -C9B2 1 -C69E 1 -C8A0 1 -C9B3 1 -C8B5 1 -C58A 1 -C58B 1 -4F 1 -6F 1 -C2BA 1 -C392 1 -C393 1 -C394 1 -C395 1 -C396 1 -C3B2 1 -C3B3 1 -C3B4 1 -C3B5 1 -C3B6 1 -C58C 1 -C58D 1 -C58E 1 -C58F 1 -C590 1 -C591 1 -C6A0 1 -C6A1 1 -C791 1 -C792 1 -C7AA 1 -C7AB 1 -C7AC 1 -C7AD 1 -C88C 1 -C88D 1 -C88E 1 -C88F 1 -C8AA 1 -C8AB 1 -C8AC 1 -C8AD 1 -C8AE 1 -C8AF 1 -C8B0 1 -C8B1 1 -CDA6 1 -C592 1 -C593 1 -C9B6 1 -C398 1 -C3B8 1 -C7BE 1 -C7BF 1 -C686 1 -C994 1 -C69F 1 -C9B5 1 -C9B7 1 -C8A2 1 -C8A3 1 -50 1 -70 1 -C6A4 1 -C6A5 1 -C9B8 1 -51 1 -71 1 -CAA0 1 -C4B8 1 -52 1 -72 1 -C594 1 -C595 1 -C598 1 -C599 1 -C890 1 -C891 1 -C892 1 -C893 1 -CAB3 1 -CDAC 1 -C596 1 -C597 1 -C6A6 1 -CA80 1 -C9B9 1 -CAB4 1 -C9BA 1 -C9BB 1 -CAB5 1 -C9BC 1 -C9BD 1 -C9BE 1 -C9BF 1 -CA81 1 -CAB6 1 -53 1 -73 1 -C59A 1 -C59B 1 -C59C 1 -C59D 1 -C59E 1 -C59F 1 -C5BF 1 -C898 1 -C899 1 -CBA2 1 -C39F 1 -C5A0 1 -C5A1 1 -CA82 1 -C6A9 1 -CA83 1 -C6AA 1 -CA85 1 -CA86 1 -54 1 -74 1 -C5A2 1 -C5A3 1 -C5A4 1 -C5A5 1 -C89A 1 -C89B 1 -CDAD 1 -CAA8 1 -C6BE 1 -CAA6 1 -CAA7 1 -C5A6 1 -C5A7 1 -C6AB 1 -C6AC 1 -C6AD 1 -C6AE 1 -CA88 1 -C8B6 1 -CA87 1 -55 1 -75 1 -C399 1 -C39A 1 -C39B 1 -C39C 1 -C3B9 1 -C3BA 1 -C3BB 1 -C3BC 1 -C5A8 1 -C5A9 1 -C5AA 1 -C5AB 1 -C5AC 1 -C5AD 1 -C5AE 1 -C5AF 1 -C5B0 1 -C5B1 1 -C5B2 1 -C5B3 1 -C6AF 1 -C6B0 1 -C793 1 -C794 1 -C795 1 -C796 1 -C797 1 -C798 1 -C799 1 -C79A 1 -C79B 1 -C79C 1 -C894 1 -C895 1 -C896 1 -C897 1 -CDA7 1 -CA89 1 -C9A5 1 -CAAE 1 -CAAF 1 -C69C 1 -C9AF 1 -C9B0 1 -C6B1 1 -CA8A 1 -56 1 -76 1 -CDAE 1 -C6B2 1 -CA8B 1 -CA8C 1 -57 1 -77 1 -C5B4 1 -C5B5 1 -CAB7 1 -CA8D 1 -58 1 -78 1 -CBA3 1 -CDAF 1 -C39D 1 -C3BD 1 -C3BF 1 -C5B6 1 -C5B7 1 -C5B8 1 -C8B2 1 -C8B3 1 -CAB8 1 -CA8F 1 -C6B3 1 -C6B4 1 -5A 1 -7A 1 -C5B9 1 -C5BA 1 -C5BB 1 -C5BC 1 -C68D 1 -C5BD 1 -C5BE 1 -C6B5 1 -C6B6 1 -C8A4 1 -C8A5 1 -CA90 1 -CA91 1 -C6B7 1 -C7AE 1 -C7AF 1 -CA92 1 -C6B8 1 -C6B9 1 -C6BA 1 -CA93 1 -C89C 1 -C89D 1 -C39E 1 -C3BE 1 -C6BF 1 -C7B7 1 -C6BB 1 -C6A7 1 -C6A8 1 -C6BC 1 -C6BD 1 -C684 1 -C685 1 -CA94 1 -CB80 1 -CABC 1 -C589 1 -CBAE 1 -CABE 1 -CA95 1 -CBA4 1 -CABF 1 -CB81 1 -CAA1 1 -CAA2 1 -CA96 1 -C780 1 -C781 1 -C782 1 -C783 1 -CA97 1 -CA98 1 -CAAC 1 -CAAD 1 -CE86 1 -CE91 1 -CEAC 1 -CEB1 1 -CE92 1 -CEB2 1 -CF90 1 -CE93 1 -CEB3 1 -CE94 1 -CEB4 1 -CE88 1 -CE95 1 -CEAD 1 -CEB5 1 -CFB5 1 -CF9C 1 -CF9D 1 -CF9A 1 -CF9B 1 -CE96 1 -CEB6 1 -CE89 1 -CE97 1 -CEAE 1 -CEB7 1 -CE98 1 -CEB8 1 -CF91 1 -CFB4 1 -CDBA 1 -CE8A 1 -CE90 1 -CE99 1 -CEAA 1 -CEAF 1 -CEB9 1 -CF8A 1 -CFB3 1 -CE9A 1 -CEBA 1 -CFB0 1 -CF97 1 -CE9B 1 -CEBB 1 -C2B5 1 -CE9C 1 -CEBC 1 -CE9D 1 -CEBD 1 -CE9E 1 -CEBE 1 -CE8C 1 -CE9F 1 -CEBF 1 -CF8C 1 -CEA0 1 -CF80 1 -CF96 1 -CF9E 1 -CF9F 1 -CF98 1 -CF99 1 -CEA1 1 -CF81 1 -CFB1 1 -CEA3 1 -CF82 1 -CF83 1 -CFB2 1 -CFB9 1 -CEA4 1 -CF84 1 -CE8E 1 -CEA5 1 -CEAB 1 -CEB0 1 -CF85 1 -CF8B 1 -CF8D 1 -CF92 1 -CF93 1 -CF94 1 -CEA6 1 -CF86 1 -CF95 1 -CEA7 1 -CF87 1 -CEA8 1 -CF88 1 -CE8F 1 -CEA9 1 -CF89 1 -CF8E 1 -CFA0 1 -CFA1 1 -CFB7 1 -CFB8 1 -CFBA 1 -CFBB 1 -CFA2 1 -CFA3 1 -CFA4 1 -CFA5 1 -CFA6 1 -CFA7 1 -CFA8 1 -CFA9 1 -CFAA 1 -CFAB 1 -CFAC 1 -CFAD 1 -CFAE 1 -CFAF 1 -D090 1 -D0B0 1 -D390 1 -D391 1 -D392 1 -D393 1 -D398 1 -D399 1 -D39A 1 -D39B 1 -D394 1 -D395 1 -D091 1 -D0B1 1 -D092 1 -D0B2 1 -D093 1 -D0B3 1 -D290 1 -D291 1 -D292 1 -D293 1 -D294 1 -D295 1 -D094 1 -D0B4 1 -D480 1 -D481 1 -D082 1 -D192 1 -D482 1 -D483 1 -D083 1 -D193 1 -D298 1 -D299 1 -D080 1 -D081 1 -D095 1 -D0B5 1 -D190 1 -D191 1 -D396 1 -D397 1 -D084 1 -D194 1 -D096 1 -D0B6 1 -D381 1 -D382 1 -D39C 1 -D39D 1 -D296 1 -D297 1 -D097 1 -D0B7 1 -D484 1 -D485 1 -D39E 1 -D39F 1 -D085 1 -D195 1 -D3A0 1 -D3A1 1 -D486 1 -D487 1 -D08D 1 -D098 1 -D0B8 1 -D19D 1 -D3A2 1 -D3A3 1 -D28A 1 -D28B 1 -D3A4 1 -D3A5 1 -D086 1 -D196 1 -D087 1 -D197 1 -D099 1 -D0B9 1 -D088 1 -D198 1 -D09A 1 -D0BA 1 -D29A 1 -D29B 1 -D383 1 -D384 1 -D2A0 1 -D2A1 1 -D29E 1 -D29F 1 -D29C 1 -D29D 1 -D09B 1 -D0BB 1 -D385 1 -D386 1 -D089 1 -D199 1 -D488 1 -D489 1 -D09C 1 -D0BC 1 -D38D 1 -D38E 1 -D09D 1 -D0BD 1 -D389 1 -D38A 1 -D2A2 1 -D2A3 1 -D387 1 -D388 1 -D2A4 1 -D2A5 1 -D08A 1 -D19A 1 -D48A 1 -D48B 1 -D09E 1 -D0BE 1 -D3A6 1 -D3A7 1 -D3A8 1 -D3A9 1 -D3AA 1 -D3AB 1 -D09F 1 -D0BF 1 -D2A6 1 -D2A7 1 -D280 1 -D281 1 -D0A0 1 -D180 1 -D28E 1 -D28F 1 -D0A1 1 -D181 1 -D48C 1 -D48D 1 -D2AA 1 -D2AB 1 -D0A2 1 -D182 1 -D48E 1 -D48F 1 -D2AC 1 -D2AD 1 -D08B 1 -D19B 1 -D08C 1 -D19C 1 -D0A3 1 -D183 1 -D3AE 1 -D3AF 1 -D08E 1 -D19E 1 -D3B0 1 -D3B1 1 -D3B2 1 -D3B3 1 -D2AE 1 -D2AF 1 -D2B0 1 -D2B1 1 -D1B8 1 -D1B9 1 -D0A4 1 -D184 1 -D0A5 1 -D185 1 -D2B2 1 -D2B3 1 -D2BA 1 -D2BB 1 -D1A0 1 -D1A1 1 -D1BE 1 -D1BF 1 -D1BC 1 -D1BD 1 -D1BA 1 -D1BB 1 -D0A6 1 -D186 1 -D2B4 1 -D2B5 1 -D0A7 1 -D187 1 -D3B4 1 -D3B5 1 -D2B6 1 -D2B7 1 -D38B 1 -D38C 1 -D2B8 1 -D2B9 1 -D2BC 1 -D2BD 1 -D2BE 1 -D2BF 1 -D08F 1 -D19F 1 -D0A8 1 -D188 1 -D0A9 1 -D189 1 -D0AA 1 -D18A 1 -D0AB 1 -D18B 1 -D3B8 1 -D3B9 1 -D0AC 1 -D18C 1 -D28C 1 -D28D 1 -D1A2 1 -D1A3 1 -D0AD 1 -D18D 1 -D3AC 1 -D3AD 1 -D0AE 1 -D18E 1 -D0AF 1 -D18F 1 -D1A4 1 -D1A5 1 -D1A6 1 -D1A7 1 -D1AA 1 -D1AB 1 -D1A8 1 -D1A9 1 -D1AC 1 -D1AD 1 -D1AE 1 -D1AF 1 -D1B0 1 -D1B1 1 -D1B2 1 -D1B3 1 -D1B4 1 -D1B5 1 -D1B6 1 -D1B7 1 -D2A8 1 -D2A9 1 -D380 1 -D4B1 1 -D5A1 1 -D4B2 1 -D5A2 1 -D4B3 1 -D5A3 1 -D4B4 1 -D5A4 1 -D4B5 1 -D5A5 1 -D687 1 -D4B6 1 -D5A6 1 -D4B7 1 -D5A7 1 -D4B8 1 -D5A8 1 -D4B9 1 -D5A9 1 -D4BA 1 -D5AA 1 -D4BB 1 -D5AB 1 -D4BC 1 -D5AC 1 -D4BD 1 -D5AD 1 -D4BE 1 -D5AE 1 -D4BF 1 -D5AF 1 -D580 1 -D5B0 1 -D581 1 -D5B1 1 -D582 1 -D5B2 1 -D583 1 -D5B3 1 -D584 1 -D5B4 1 -D585 1 -D5B5 1 -D586 1 -D5B6 1 -D587 1 -D5B7 1 -D588 1 -D5B8 1 -D589 1 -D5B9 1 -D58A 1 -D5BA 1 -D58B 1 -D5BB 1 -D58C 1 -D5BC 1 -D58D 1 -D5BD 1 -D58E 1 -D5BE 1 -D58F 1 -D5BF 1 -D590 1 -D680 1 -D591 1 -D681 1 -D592 1 -D682 1 -D593 1 -D683 1 -D594 1 -D684 1 -D595 1 -D685 1 -D596 1 -D686 1 -D599 1 -D790 1 -D791 1 -D792 1 -D793 1 -D794 1 -D795 1 -D7B0 1 -D7B1 1 -D796 1 -D797 1 -D798 1 -D799 1 -D7B2 1 -D79A 1 -D79B 1 -D79C 1 -D79D 1 -D79E 1 -D79F 1 -D7A0 1 -D7A1 1 -D7A2 1 -D7A3 1 -D7A4 1 -D7A5 1 -D7A6 1 -D7A7 1 -D7A8 1 -D7A9 1 -D7AA 1 -D8A1 1 -D9B4 1 -DBBD 1 -D8A2 1 -D8A3 1 -D9B2 1 -D9B1 1 -D8A4 1 -D8A5 1 -D9B3 1 -D8A6 1 -D8A7 1 -D9B5 1 -D9AE 1 -D8A8 1 -D9BB 1 -D9BE 1 -DA80 1 -D8A9 1 -D8AA 1 -D8AB 1 -D9B9 1 -D9BA 1 -D9BC 1 -D9BD 1 -D9BF 1 -D8AC 1 -DA83 1 -DA84 1 -DA86 1 -DABF 1 -DA87 1 -D8AD 1 -D8AE 1 -DA81 1 -DA82 1 -DA85 1 -D8AF 1 -D8B0 1 -DA88 1 -DA89 1 -DA8A 1 -DA8B 1 -DA8C 1 -DA8D 1 -DA8E 1 -DA8F 1 -DA90 1 -DBAE 1 -D8B1 1 -D8B2 1 -DA91 1 -DA92 1 -DA93 1 -DA94 1 -DA95 1 -DA96 1 -DA97 1 -DA98 1 -DA99 1 -DBAF 1 -D8B3 1 -D8B4 1 -DA9A 1 -DA9B 1 -DA9C 1 -DBBA 1 -D8B5 1 -D8B6 1 -DA9D 1 -DA9E 1 -DBBB 1 -D8B7 1 -D8B8 1 -DA9F 1 -D8B9 1 -D8BA 1 -DAA0 1 -DBBC 1 -D981 1 -DAA1 1 -DAA2 1 -DAA3 1 -DAA4 1 -DAA5 1 -DAA6 1 -D9AF 1 -D982 1 -DAA7 1 -DAA8 1 -D983 1 -DAA9 1 -DAAA 1 -DAAB 1 -DAAC 1 -DAAD 1 -DAAE 1 -DAAF 1 -DAB0 1 -DAB1 1 -DAB2 1 -DAB3 1 -DAB4 1 -D984 1 -DAB5 1 -DAB6 1 -DAB7 1 -DAB8 1 -D985 1 -DBBE 1 -D986 1 -DABA 1 -DABB 1 -DABC 1 -DABD 1 -DAB9 1 -D987 1 -DABE 1 -DB81 1 -DB82 1 -DB83 1 -DBBF 1 -DB80 1 -DB95 1 -D988 1 -DBA5 1 -D9B6 1 -DB84 1 -DB85 1 -DB86 1 -DB87 1 -D9B7 1 -DB88 1 -DB89 1 -DB8A 1 -DB8B 1 -DB8F 1 -D989 1 -D98A 1 -DBA6 1 -D9B8 1 -DB8C 1 -DB8D 1 -DB8E 1 -DB90 1 -DB91 1 -DB92 1 -DB93 1 -DC90 1 -DC92 1 -DCAD 1 -DC93 1 -DC94 1 -DCAE 1 -DC96 1 -DC95 1 -DCAF 1 -DC97 1 -DC98 1 -DC99 1 -DD8D 1 -DC9A 1 -DC9B 1 -DC9C 1 -DC9D 1 -DC9E 1 -DC9F 1 -DD8E 1 -DCA0 1 -DCA1 1 -DCA2 1 -DCA3 1 -DCA4 1 -DCA5 1 -DCA6 1 -DCA7 1 -DD8F 1 -DCA8 1 -DCA9 1 -DCAA 1 -DCAB 1 -DCAC 1 -DE80 1 -DE99 1 -DE9A 1 -DE81 1 -DE82 1 -DE83 1 -DE9C 1 -DE84 1 -DE85 1 -DE86 1 -DE87 1 -DEA2 1 -DEA3 1 -DE88 1 -DEA5 1 -DE89 1 -DE8A 1 -DE8B 1 -DE9B 1 -DE8C 1 -DE98 1 -DEA0 1 -DEA1 1 -DE8D 1 -DE8E 1 -DEA4 1 -DE8F 1 -DE90 1 -DE9D 1 -DE9E 1 -DE9F 1 -DE91 1 -DE92 1 -DE93 1 -DE94 1 -DE95 1 -DE96 1 -DE97 1 -DEB1 1 -DEA6 1 -DEA7 1 -DEA8 1 -DEA9 1 -DEAA 1 -DEAB 1 -DEAC 1 -DEAD 1 -DEAE 1 -DEAF 1 -DEB0 1 -E4B880 1 -E4B881 1 -E4B882 1 -E4B883 1 -E4B884 1 -E4B885 1 -E4B886 1 -E4B887 1 -E4B888 1 -E4B889 1 -E4B88A 1 -E4B88B 1 -E4B88C 1 -E4B88D 1 -E4B88E 1 -E4B88F 1 -E4B890 1 -E4B891 1 -E4B892 1 -E4B893 1 -E4B894 1 -E4B895 1 -E4B896 1 -E4B897 1 -E4B898 1 -E4B899 1 -E4B89A 1 -E4B89B 1 -E4B89C 1 -E4B89D 1 -E4B89E 1 -E4B89F 1 -E4B8A0 1 -E4B8A1 1 -E4B8A2 1 -E4B8A3 1 -E4B8A4 1 -E4B8A5 1 -E4B8A6 1 -E4B8A7 1 -E4B8A8 1 -E4B8A9 1 -E4B8AA 1 -E4B8AB 1 -E4B8AC 1 -E4B8AD 1 -E4B8AE 1 -E4B8AF 1 -E4B8B0 1 -E4B8B1 1 -E4B8B2 1 -E4B8B3 1 -E4B8B4 1 -E4B8B5 1 -E4B8B6 1 -E4B8B7 1 -E4B8B8 1 -E4B8B9 1 -E4B8BA 1 -E4B8BB 1 -E4B8BC 1 -E4B8BD 1 -E4B8BE 1 -E4B8BF 1 -E4B980 1 -E4B981 1 -E4B982 1 -E4B983 1 -E4B984 1 -E4B985 1 -E4B986 1 -E4B987 1 -E4B988 1 -E4B989 1 -E4B98A 1 -E4B98B 1 -E4B98C 1 -E4B98D 1 -E4B98E 1 -E4B98F 1 -E4B990 1 -E4B991 1 -E4B992 1 -E4B993 1 -E4B994 1 -E4B995 1 -E4B996 1 -E4B997 1 -E4B998 1 -E4B999 1 -E4B99A 1 -E4B99B 1 -E4B99C 1 -E4B99D 1 -E4B99E 1 -E4B99F 1 -E4B9A0 1 -E4B9A1 1 -E4B9A2 1 -E4B9A3 1 -E4B9A4 1 -E4B9A5 1 -E4B9A6 1 -E4B9A7 1 -E4B9A8 1 -E4B9A9 1 -E4B9AA 1 -E4B9AB 1 -E4B9AC 1 -E4B9AD 1 -E4B9AE 1 -E4B9AF 1 -E4B9B0 1 -E4B9B1 1 -E4B9B2 1 -E4B9B3 1 -E4B9B4 1 -E4B9B5 1 -E4B9B6 1 -E4B9B7 1 -E4B9B8 1 -E4B9B9 1 -E4B9BA 1 -E4B9BB 1 -E4B9BC 1 -E4B9BD 1 -E4B9BE 1 -E4B9BF 1 -E4BA80 1 -E4BA81 1 -E4BA82 1 -E4BA83 1 -E4BA84 1 -E4BA85 1 -E4BA86 1 -E4BA87 1 -E4BA88 1 -E4BA89 1 -E4BA8A 1 -E4BA8B 1 -E4BA8C 1 -E4BA8D 1 -E4BA8E 1 -E4BA8F 1 -E4BA90 1 -E4BA91 1 -E4BA92 1 -E4BA93 1 -E4BA94 1 -E4BA95 1 -E4BA96 1 -E4BA97 1 -E4BA98 1 -E4BA99 1 -E4BA9A 1 -E4BA9B 1 -E4BA9C 1 -E4BA9D 1 -E4BA9E 1 -E4BA9F 1 -E4BAA0 1 -E4BAA1 1 -E4BAA2 1 -E4BAA3 1 -E4BAA4 1 -E4BAA5 1 -E4BAA6 1 -E4BAA7 1 -E4BAA8 1 -E4BAA9 1 -E4BAAA 1 -E4BAAB 1 -E4BAAC 1 -E4BAAD 1 -E4BAAE 1 -E4BAAF 1 -E4BAB0 1 -E4BAB1 1 -E4BAB2 1 -E4BAB3 1 -E4BAB4 1 -E4BAB5 1 -E4BAB6 1 -E4BAB7 1 -E4BAB8 1 -E4BAB9 1 -E4BABA 1 -E4BABB 1 -E4BABC 1 -E4BABD 1 -E4BABE 1 -E4BABF 1 -E4BB80 1 -E4BB81 1 -E4BB82 1 -E4BB83 1 -E4BB84 1 -E4BB85 1 -E4BB86 1 -E4BB87 1 -E4BB88 1 -E4BB89 1 -E4BB8A 1 -E4BB8B 1 -E4BB8C 1 -E4BB8D 1 -E4BB8E 1 -E4BB8F 1 -E4BB90 1 -E4BB91 1 -E4BB92 1 -E4BB93 1 -E4BB94 1 -E4BB95 1 -E4BB96 1 -E4BB97 1 -E4BB98 1 -E4BB99 1 -E4BB9A 1 -E4BB9B 1 -E4BB9C 1 -E4BB9D 1 -E4BB9E 1 -E4BB9F 1 -E4BBA0 1 -E4BBA1 1 -E4BBA2 1 -E4BBA3 1 -E4BBA4 1 -E4BBA5 1 -E4BBA6 1 -E4BBA7 1 -E4BBA8 1 -E4BBA9 1 -E4BBAA 1 -E4BBAB 1 -E4BBAC 1 -E4BBAD 1 -E4BBAE 1 -E4BBAF 1 -E4BBB0 1 -E4BBB1 1 -E4BBB2 1 -E4BBB3 1 -E4BBB4 1 -E4BBB5 1 -E4BBB6 1 -E4BBB7 1 -E4BBB8 1 -E4BBB9 1 -E4BBBA 1 -E4BBBB 1 -E4BBBC 1 -E4BBBD 1 -E4BBBE 1 -E4BBBF 1 -E4BC80 1 -E4BC81 1 -E4BC82 1 -E4BC83 1 -E4BC84 1 -E4BC85 1 -E4BC86 1 -E4BC87 1 -E4BC88 1 -E4BC89 1 -E4BC8A 1 -E4BC8B 1 -E4BC8C 1 -E4BC8D 1 -E4BC8E 1 -E4BC8F 1 -E4BC90 1 -E4BC91 1 -E4BC92 1 -E4BC93 1 -E4BC94 1 -E4BC95 1 -E4BC96 1 -E4BC97 1 -E4BC98 1 -E4BC99 1 -E4BC9A 1 -E4BC9B 1 -E4BC9C 1 -E4BC9D 1 -E4BC9E 1 -E4BC9F 1 -E4BCA0 1 -E4BCA1 1 -E4BCA2 1 -E4BCA3 1 -E4BCA4 1 -E4BCA5 1 -E4BCA6 1 -E4BCA7 1 -E4BCA8 1 -E4BCA9 1 -E4BCAA 1 -E4BCAB 1 -E4BCAC 1 -E4BCAD 1 -E4BCAE 1 -E4BCAF 1 -E4BCB0 1 -E4BCB1 1 -E4BCB2 1 -E4BCB3 1 -E4BCB4 1 -E4BCB5 1 -E4BCB6 1 -E4BCB7 1 -E4BCB8 1 -E4BCB9 1 -E4BCBA 1 -E4BCBB 1 -E4BCBC 1 -E4BCBD 1 -E4BCBE 1 -E4BCBF 1 -E4BD80 1 -E4BD81 1 -E4BD82 1 -E4BD83 1 -E4BD84 1 -E4BD85 1 -E4BD86 1 -E4BD87 1 -E4BD88 1 -E4BD89 1 -E4BD8A 1 -E4BD8B 1 -E4BD8C 1 -E4BD8D 1 -E4BD8E 1 -E4BD8F 1 -E4BD90 1 -E4BD91 1 -E4BD92 1 -E4BD93 1 -E4BD94 1 -E4BD95 1 -E4BD96 1 -E4BD97 1 -E4BD98 1 -E4BD99 1 -E4BD9A 1 -E4BD9B 1 -E4BD9C 1 -E4BD9D 1 -E4BD9E 1 -E4BD9F 1 -E4BDA0 1 -E4BDA1 1 -E4BDA2 1 -E4BDA3 1 -E4BDA4 1 -E4BDA5 1 -E4BDA6 1 -E4BDA7 1 -E4BDA8 1 -E4BDA9 1 -E4BDAA 1 -E4BDAB 1 -E4BDAC 1 -E4BDAD 1 -E4BDAE 1 -E4BDAF 1 -E4BDB0 1 -E4BDB1 1 -E4BDB2 1 -E4BDB3 1 -E4BDB4 1 -E4BDB5 1 -E4BDB6 1 -E4BDB7 1 -E4BDB8 1 -E4BDB9 1 -E4BDBA 1 -E4BDBB 1 -E4BDBC 1 -E4BDBD 1 -E4BDBE 1 -E4BDBF 1 -E4BE80 1 -E4BE81 1 -E4BE82 1 -E4BE83 1 -E4BE84 1 -E4BE85 1 -E4BE86 1 -E4BE87 1 -E4BE88 1 -E4BE89 1 -E4BE8A 1 -E4BE8B 1 -E4BE8C 1 -E4BE8D 1 -E4BE8E 1 -E4BE8F 1 -E4BE90 1 -E4BE91 1 -E4BE92 1 -E4BE93 1 -E4BE94 1 -E4BE95 1 -E4BE96 1 -E4BE97 1 -E4BE98 1 -E4BE99 1 -E4BE9A 1 -E4BE9B 1 -E4BE9C 1 -E4BE9D 1 -E4BE9E 1 -E4BE9F 1 -E4BEA0 1 -E4BEA1 1 -E4BEA2 1 -E4BEA3 1 -E4BEA4 1 -E4BEA5 1 -E4BEA6 1 -E4BEA7 1 -E4BEA8 1 -E4BEA9 1 -E4BEAA 1 -E4BEAB 1 -E4BEAC 1 -E4BEAD 1 -E4BEAE 1 -E4BEAF 1 -E4BEB0 1 -E4BEB1 1 -E4BEB2 1 -E4BEB3 1 -E4BEB4 1 -E4BEB5 1 -E4BEB6 1 -E4BEB7 1 -E4BEB8 1 -E4BEB9 1 -E4BEBA 1 -E4BEBB 1 -E4BEBC 1 -E4BEBD 1 -E4BEBE 1 -E4BEBF 1 -E4BF80 1 -E4BF81 1 -E4BF82 1 -E4BF83 1 -E4BF84 1 -E4BF85 1 -E4BF86 1 -E4BF87 1 -E4BF88 1 -E4BF89 1 -E4BF8A 1 -E4BF8B 1 -E4BF8C 1 -E4BF8D 1 -E4BF8E 1 -E4BF8F 1 -E4BF90 1 -E4BF91 1 -E4BF92 1 -E4BF93 1 -E4BF94 1 -E4BF95 1 -E4BF96 1 -E4BF97 1 -E4BF98 1 -E4BF99 1 -E4BF9A 1 -E4BF9B 1 -E4BF9C 1 -E4BF9D 1 -E4BF9E 1 -E4BF9F 1 -E4BFA0 1 -E4BFA1 1 -E4BFA2 1 -E4BFA3 1 -E4BFA4 1 -E4BFA5 1 -E4BFA6 1 -E4BFA7 1 -E4BFA8 1 -E4BFA9 1 -E4BFAA 1 -E4BFAB 1 -E4BFAC 1 -E4BFAD 1 -E4BFAE 1 -E4BFAF 1 -E4BFB0 1 -E4BFB1 1 -E4BFB2 1 -E4BFB3 1 -E4BFB4 1 -E4BFB5 1 -E4BFB6 1 -E4BFB7 1 -E4BFB8 1 -E4BFB9 1 -E4BFBA 1 -E4BFBB 1 -E4BFBC 1 -E4BFBD 1 -E4BFBE 1 -E4BFBF 1 -C8B7 1 -C8B8 1 -C8B9 1 -C8BA 1 -C8BB 1 -C8BC 1 -C8BD 1 -C8BE 1 -C8BF 1 -C980 1 -C981 1 -C982 1 -C983 1 -C984 1 -C985 1 -C986 1 -C987 1 -C988 1 -C989 1 -C98A 1 -C98B 1 -C98C 1 -C98D 1 -C98E 1 -C98F 1 -CD98 1 -CD99 1 -CD9A 1 -CD9B 1 -CD9C 1 -CDB0 1 -CDB1 1 -CDB2 1 -CDB3 1 -CDB6 1 -CDB7 1 -CDB8 1 -CDB9 1 -CDBB 1 -CDBC 1 -CDBD 1 -CDBF 1 -CE80 1 -CE81 1 -CE82 1 -CE83 1 -CE8B 1 -CE8D 1 -CEA2 1 -CF8F 1 -CFBC 1 -CFBD 1 -CFBE 1 -CFBF 1 -D287 1 -D38F 1 -D3B6 1 -D3B7 1 -D3BA 1 -D3BB 1 -D3BC 1 -D3BD 1 -D3BE 1 -D3BF 1 -D490 1 -D491 1 -D492 1 -D493 1 -D494 1 -D495 1 -D496 1 -D497 1 -D498 1 -D499 1 -D49A 1 -D49B 1 -D49C 1 -D49D 1 -D49E 1 -D49F 1 -D4A0 1 -D4A1 1 -D4A2 1 -D4A3 1 -D4A4 1 -D4A5 1 -D4A6 1 -D4A7 1 -D4A8 1 -D4A9 1 -D4AA 1 -D4AB 1 -D4AC 1 -D4AD 1 -D4AE 1 -D4AF 1 -D4B0 1 -D597 1 -D598 1 -D5A0 1 -D688 1 -D68B 1 -D68C 1 -D68D 1 -D68E 1 -D68F 1 -D690 1 -D6A2 1 -D6BA 1 -D785 1 -D786 1 -D787 1 -D788 1 -D789 1 -D78A 1 -D78B 1 -D78C 1 -D78D 1 -D78E 1 -D78F 1 -D7AB 1 -D7AC 1 -D7AD 1 -D7AE 1 -D7AF 1 -D7B5 1 -D7B6 1 -D7B7 1 -D7B8 1 -D7B9 1 -D7BA 1 -D7BB 1 -D7BC 1 -D7BD 1 -D7BE 1 -D7BF 1 -D884 1 -D885 1 -D886 1 -D887 1 -D888 1 -D889 1 -D88A 1 -D88B 1 -D896 1 -D897 1 -D898 1 -D899 1 -D89A 1 -D89C 1 -D89D 1 -D89E 1 -D8A0 1 -D8BB 1 -D8BC 1 -D8BD 1 -D8BE 1 -D8BF 1 -D999 1 -D99A 1 -D99B 1 -D99C 1 -D99D 1 -D99E 1 -D99F 1 -DC8E 1 -DD8B 1 -DD8C 1 -DD90 1 -DD91 1 -DD92 1 -DD93 1 -DD94 1 -DD95 1 -DD96 1 -DD97 1 -DD98 1 -DD99 1 -DD9A 1 -DD9B 1 -DD9C 1 -DD9D 1 -DD9E 1 -DD9F 1 -DDA0 1 -DDA1 1 -DDA2 1 -DDA3 1 -DDA4 1 -DDA5 1 -DDA6 1 -DDA7 1 -DDA8 1 -DDA9 1 -DDAA 1 -DDAB 1 -DDAC 1 -DDAD 1 -DDAE 1 -DDAF 1 -DDB0 1 -DDB1 1 -DDB2 1 -DDB3 1 -DDB4 1 -DDB5 1 -DDB6 1 -DDB7 1 -DDB8 1 -DDB9 1 -DDBA 1 -DDBB 1 -DDBC 1 -DDBD 1 -DDBE 1 -DDBF 1 -DEB2 1 -DEB3 1 -DEB4 1 -DEB5 1 -DEB6 1 -DEB7 1 -DEB8 1 -DEB9 1 -DEBA 1 -DEBB 1 -DEBC 1 -DEBD 1 -DEBE 1 -DEBF 1 -DF80 1 -DF81 1 -DF82 1 -DF83 1 -DF84 1 -DF85 1 -DF86 1 -DF87 1 -DF88 1 -DF89 1 -DF8A 1 -DF8B 1 -DF8C 1 -DF8D 1 -DF8E 1 -DF8F 1 -DF90 1 -DF91 1 -DF92 1 -DF93 1 -DF94 1 -DF95 1 -DF96 1 -DF97 1 -DF98 1 -DF99 1 -DF9A 1 -DF9B 1 -DF9C 1 -DF9D 1 -DF9E 1 -DF9F 1 -DFA0 1 -DFA1 1 -DFA2 1 -DFA3 1 -DFA4 1 -DFA5 1 -DFA6 1 -DFA7 1 -DFA8 1 -DFA9 1 -DFAA 1 -DFAB 1 -DFAC 1 -DFAD 1 -DFAE 1 -DFAF 1 -DFB0 1 -DFB1 1 -DFB2 1 -DFB3 1 -DFB4 1 -DFB5 1 -DFB6 1 -DFB7 1 -DFB8 1 -DFB9 1 -DFBA 1 -DFBB 1 -DFBC 1 -DFBD 1 -DFBE 1 -DFBF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_lithuanian_ci) ENGINE=NDB CHARACTER SET utf8 COLLATE utf8_lithuanian_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_lithuanian_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -C285 1 -7F 1 -C280 1 -C281 1 -C282 1 -C283 1 -C284 1 -C286 1 -C287 1 -C288 1 -C289 1 -C28A 1 -C28B 1 -C28C 1 -C28D 1 -C28E 1 -C28F 1 -C290 1 -C291 1 -C292 1 -C293 1 -C294 1 -C295 1 -C296 1 -C297 1 -C298 1 -C299 1 -C29A 1 -C29B 1 -C29C 1 -C29D 1 -C29E 1 -C29F 1 -C2A0 1 -CC80 1 -CC81 1 -CC82 1 -CC83 1 -CC84 1 -CC85 1 -CC86 1 -CC87 1 -CC88 1 -CC89 1 -CC8A 1 -CC8B 1 -CC8C 1 -CC8D 1 -CC8E 1 -CC8F 1 -CC90 1 -CC91 1 -CC92 1 -CC93 1 -CC94 1 -CC95 1 -CC96 1 -CC97 1 -CC98 1 -CC99 1 -CC9A 1 -CC9B 1 -CC9C 1 -CC9D 1 -CC9E 1 -CC9F 1 -CCA0 1 -CCA1 1 -CCA2 1 -CCA3 1 -CCA4 1 -CCA5 1 -CCA6 1 -CCA7 1 -CCA8 1 -CCA9 1 -CCAA 1 -CCAB 1 -CCAC 1 -CCAD 1 -CCAE 1 -CCAF 1 -CCB0 1 -CCB1 1 -CCB2 1 -CCB3 1 -CCB4 1 -CCB5 1 -CCB6 1 -CCB7 1 -CCB8 1 -CCB9 1 -CCBA 1 -CCBB 1 -CCBC 1 -CCBD 1 -CCBE 1 -CCBF 1 -CD80 1 -CD81 1 -CD82 1 -CD83 1 -CD84 1 -CD85 1 -CD86 1 -CD87 1 -CD88 1 -CD89 1 -CD8A 1 -CD8B 1 -CD8C 1 -CD8D 1 -CD8E 1 -CD8F 1 -CD90 1 -CD91 1 -CD92 1 -CD93 1 -CD94 1 -CD95 1 -CD96 1 -CD97 1 -CD9D 1 -CD9E 1 -CD9F 1 -CDA0 1 -CDA1 1 -CDA2 1 -D283 1 -D284 1 -D285 1 -D286 1 -D288 1 -D289 1 -D691 1 -D692 1 -D693 1 -D694 1 -D695 1 -D696 1 -D697 1 -D698 1 -D699 1 -D69A 1 -D69B 1 -D69C 1 -D69D 1 -D69E 1 -D69F 1 -D6A0 1 -D6A1 1 -D6A3 1 -D6A4 1 -D6A5 1 -D6A6 1 -D6A7 1 -D6A8 1 -D6A9 1 -D6AA 1 -D6AB 1 -D6AC 1 -D6AD 1 -D6AE 1 -D6AF 1 -D6B0 1 -D6B1 1 -D6B2 1 -D6B3 1 -D6B4 1 -D6B5 1 -D6B6 1 -D6B7 1 -D6B8 1 -D6B9 1 -D6BB 1 -D6BC 1 -D6BD 1 -D6BF 1 -D781 1 -D782 1 -D784 1 -D880 1 -D881 1 -D882 1 -D883 1 -D890 1 -D891 1 -D892 1 -D893 1 -D894 1 -D895 1 -D98B 1 -D98C 1 -D98D 1 -D98E 1 -D98F 1 -D990 1 -D991 1 -D992 1 -D993 1 -D994 1 -D995 1 -D996 1 -D997 1 -D998 1 -D9B0 1 -DB96 1 -DB97 1 -DB98 1 -DB99 1 -DB9A 1 -DB9B 1 -DB9C 1 -DB9D 1 -DB9E 1 -DB9F 1 -DBA0 1 -DBA1 1 -DBA2 1 -DBA3 1 -DBA4 1 -DBA7 1 -DBA8 1 -DBAA 1 -DBAB 1 -DBAC 1 -DBAD 1 -DC8F 1 -DC91 1 -DCB0 1 -DCB1 1 -DCB2 1 -DCB3 1 -DCB4 1 -DCB5 1 -DCB6 1 -DCB7 1 -DCB8 1 -DCB9 1 -DCBA 1 -DCBB 1 -DCBC 1 -DCBD 1 -DCBE 1 -DCBF 1 -DD80 1 -DD81 1 -DD82 1 -DD83 1 -DD84 1 -DD85 1 -DD86 1 -DD87 1 -DD88 1 -DD89 1 -DD8A 1 -D980 1 -60 1 -C2B4 1 -CE84 1 -CB9C 1 -5E 1 -C2AF 1 -CB98 1 -CB99 1 -C2A8 1 -CE85 1 -CB9A 1 -CB9D 1 -C2B8 1 -CB9B 1 -5F 1 -C2AD 1 -2D 1 -D68A 1 -2C 1 -D59D 1 -D88C 1 -D88D 1 -D9AB 1 -D9AC 1 -3B 1 -CDBE 1 -D89B 1 -3A 1 -D689 1 -DC83 1 -DC84 1 -DC85 1 -DC86 1 -DC87 1 -DC88 1 -21 1 -C2A1 1 -D59C 1 -3F 1 -C2BF 1 -D59E 1 -D89F 1 -DC89 1 -2E 1 -DB94 1 -DC81 1 -DC82 1 -C2B7 1 -CE87 1 -DC80 1 -27 1 -22 1 -C2AB 1 -C2BB 1 -28 1 -29 1 -5B 1 -7B 1 -7D 1 -C2A7 1 -C2B6 1 -C2A9 1 -C2AE 1 -40 1 -2A 1 -D9AD 1 -2F 1 -26 1 -23 1 -25 1 -D9AA 1 -D59A 1 -D59B 1 -D59F 1 -D6BE 1 -D780 1 -D783 1 -D7B3 1 -D7B4 1 -DC8A 1 -DC8B 1 -DC8C 1 -DC8D 1 -CAB9 1 -CDB4 1 -CDB5 1 -CABA 1 -CB82 1 -CB83 1 -CB84 1 -CB85 1 -CB86 1 -CB87 1 -CB88 1 -CB89 1 -CB8A 1 -CB8B 1 -CB8C 1 -CB8D 1 -CB8E 1 -CB8F 1 -CB92 1 -CB93 1 -CB94 1 -CB95 1 -CB96 1 -CB97 1 -CB9E 1 -CB9F 1 -CBA5 1 -CBA6 1 -CBA7 1 -CBA8 1 -CBA9 1 -CBAA 1 -CBAB 1 -CBAC 1 -CBAD 1 -CBAF 1 -CBB0 1 -CBB1 1 -CBB2 1 -CBB3 1 -CBB4 1 -CBB5 1 -CBB6 1 -CBB7 1 -CBB8 1 -CBB9 1 -CBBA 1 -CBBB 1 -CBBC 1 -CBBD 1 -CBBE 1 -CBBF 1 -C2B0 1 -D282 1 -D88E 1 -D88F 1 -DBA9 1 -CFB6 1 -2B 1 -C2B1 1 -C3B7 1 -C397 1 -3C 1 -3D 1 -3E 1 -C2AC 1 -7C 1 -C2A6 1 -7E 1 -CB90 1 -CB91 1 -C2A4 1 -C2A2 1 -24 1 -C2A3 1 -C2A5 1 -30 1 -D9A0 1 -DBB0 1 -31 1 -C2B9 1 -D9A1 1 -DBB1 1 -C2BD 1 -C2BC 1 -32 1 -C2B2 1 -D9A2 1 -DBB2 1 -33 1 -C2B3 1 -D9A3 1 -DBB3 1 -C2BE 1 -34 1 -D9A4 1 -DBB4 1 -35 1 -D9A5 1 -DBB5 1 -36 1 -D9A6 1 -DBB6 1 -37 1 -D9A7 1 -DBB7 1 -38 1 -D9A8 1 -DBB8 1 -39 1 -D9A9 1 -DBB9 1 -41 1 -61 1 -C2AA 1 -C380 1 -C381 1 -C382 1 -C383 1 -C384 1 -C385 1 -C3A0 1 -C3A1 1 -C3A2 1 -C3A3 1 -C3A4 1 -C3A5 1 -C480 1 -C481 1 -C482 1 -C483 1 -C484 1 -C485 1 -C78D 1 -C78E 1 -C79E 1 -C79F 1 -C7A0 1 -C7A1 1 -C7BA 1 -C7BB 1 -C880 1 -C881 1 -C882 1 -C883 1 -C8A6 1 -C8A7 1 -CDA3 1 -C386 1 -C3A6 1 -C7A2 1 -C7A3 1 -C7BC 1 -C7BD 1 -C990 1 -C991 1 -C992 1 -42 1 -62 1 -CA99 1 -C680 1 -C681 1 -C993 1 -C682 1 -C683 1 -43 1 -63 1 -C387 1 -C3A7 1 -C486 1 -C487 1 -C488 1 -C489 1 -C48A 1 -C48B 1 -CDA8 1 -C48C 1 -C48D 1 -C687 1 -C688 1 -C995 1 -44 1 -64 1 -C48E 1 -C48F 1 -CDA9 1 -C784 1 -C785 1 -C786 1 -C7B1 1 -C7B2 1 -C7B3 1 -CAA3 1 -CAA5 1 -CAA4 1 -C490 1 -C491 1 -C689 1 -C996 1 -C68A 1 -C997 1 -C68B 1 -C68C 1 -C8A1 1 -C390 1 -C3B0 1 -45 1 -65 1 -C388 1 -C389 1 -C38A 1 -C38B 1 -C3A8 1 -C3A9 1 -C3AA 1 -C3AB 1 -C492 1 -C493 1 -C494 1 -C495 1 -C496 1 -C497 1 -C498 1 -C499 1 -C49A 1 -C49B 1 -C884 1 -C885 1 -C886 1 -C887 1 -C8A8 1 -C8A9 1 -CDA4 1 -C68E 1 -C79D 1 -C68F 1 -C999 1 -C690 1 -C99B 1 -C998 1 -C99A 1 -C99C 1 -C99D 1 -C99E 1 -CA9A 1 -C9A4 1 -46 1 -66 1 -CAA9 1 -C691 1 -C692 1 -47 1 -67 1 -C49C 1 -C49D 1 -C49E 1 -C49F 1 -C4A0 1 -C4A1 1 -C4A2 1 -C4A3 1 -C7A6 1 -C7A7 1 -C7B4 1 -C7B5 1 -C9A1 1 -C9A2 1 -C7A4 1 -C7A5 1 -C693 1 -C9A0 1 -CA9B 1 -C694 1 -C9A3 1 -CBA0 1 -C6A2 1 -C6A3 1 -48 1 -68 1 -C4A4 1 -C4A5 1 -C89E 1 -C89F 1 -CAB0 1 -CDAA 1 -CA9C 1 -C695 1 -C7B6 1 -C4A6 1 -C4A7 1 -C9A6 1 -CAB1 1 -C9A7 1 -CABB 1 -CABD 1 -49 1 -59 1 -69 1 -79 1 -C38C 1 -C38D 1 -C38E 1 -C38F 1 -C3AC 1 -C3AD 1 -C3AE 1 -C3AF 1 -C4A8 1 -C4A9 1 -C4AA 1 -C4AB 1 -C4AC 1 -C4AD 1 -C4AE 1 -C4AF 1 -C4B0 1 -C78F 1 -C790 1 -C888 1 -C889 1 -C88A 1 -C88B 1 -CDA5 1 -C4B2 1 -C4B3 1 -C4B1 1 -C9AA 1 -C697 1 -C9A8 1 -C696 1 -C9A9 1 -4A 1 -6A 1 -C4B4 1 -C4B5 1 -C7B0 1 -CAB2 1 -CA9D 1 -C99F 1 -CA84 1 -4B 1 -6B 1 -C4B6 1 -C4B7 1 -C7A8 1 -C7A9 1 -C698 1 -C699 1 -CA9E 1 -4C 1 -6C 1 -C4B9 1 -C4BA 1 -C4BB 1 -C4BC 1 -C4BD 1 -C4BE 1 -CBA1 1 -C4BF 1 -C580 1 -C787 1 -C788 1 -C789 1 -CAAA 1 -CAAB 1 -CA9F 1 -C581 1 -C582 1 -C69A 1 -C9AB 1 -C9AC 1 -C9AD 1 -C8B4 1 -C9AE 1 -C69B 1 -CA8E 1 -4D 1 -6D 1 -CDAB 1 -C9B1 1 -4E 1 -6E 1 -C391 1 -C3B1 1 -C583 1 -C584 1 -C585 1 -C586 1 -C587 1 -C588 1 -C7B8 1 -C7B9 1 -C78A 1 -C78B 1 -C78C 1 -C9B4 1 -C69D 1 -C9B2 1 -C69E 1 -C8A0 1 -C9B3 1 -C8B5 1 -C58A 1 -C58B 1 -4F 1 -6F 1 -C2BA 1 -C392 1 -C393 1 -C394 1 -C395 1 -C396 1 -C3B2 1 -C3B3 1 -C3B4 1 -C3B5 1 -C3B6 1 -C58C 1 -C58D 1 -C58E 1 -C58F 1 -C590 1 -C591 1 -C6A0 1 -C6A1 1 -C791 1 -C792 1 -C7AA 1 -C7AB 1 -C7AC 1 -C7AD 1 -C88C 1 -C88D 1 -C88E 1 -C88F 1 -C8AA 1 -C8AB 1 -C8AC 1 -C8AD 1 -C8AE 1 -C8AF 1 -C8B0 1 -C8B1 1 -CDA6 1 -C592 1 -C593 1 -C9B6 1 -C398 1 -C3B8 1 -C7BE 1 -C7BF 1 -C686 1 -C994 1 -C69F 1 -C9B5 1 -C9B7 1 -C8A2 1 -C8A3 1 -50 1 -70 1 -C6A4 1 -C6A5 1 -C9B8 1 -51 1 -71 1 -CAA0 1 -C4B8 1 -52 1 -72 1 -C594 1 -C595 1 -C596 1 -C597 1 -C598 1 -C599 1 -C890 1 -C891 1 -C892 1 -C893 1 -CAB3 1 -CDAC 1 -C6A6 1 -CA80 1 -C9B9 1 -CAB4 1 -C9BA 1 -C9BB 1 -CAB5 1 -C9BC 1 -C9BD 1 -C9BE 1 -C9BF 1 -CA81 1 -CAB6 1 -53 1 -73 1 -C59A 1 -C59B 1 -C59C 1 -C59D 1 -C59E 1 -C59F 1 -C5BF 1 -C898 1 -C899 1 -CBA2 1 -C39F 1 -C5A0 1 -C5A1 1 -CA82 1 -C6A9 1 -CA83 1 -C6AA 1 -CA85 1 -CA86 1 -54 1 -74 1 -C5A2 1 -C5A3 1 -C5A4 1 -C5A5 1 -C89A 1 -C89B 1 -CDAD 1 -CAA8 1 -C6BE 1 -CAA6 1 -CAA7 1 -C5A6 1 -C5A7 1 -C6AB 1 -C6AC 1 -C6AD 1 -C6AE 1 -CA88 1 -C8B6 1 -CA87 1 -55 1 -75 1 -C399 1 -C39A 1 -C39B 1 -C39C 1 -C3B9 1 -C3BA 1 -C3BB 1 -C3BC 1 -C5A8 1 -C5A9 1 -C5AA 1 -C5AB 1 -C5AC 1 -C5AD 1 -C5AE 1 -C5AF 1 -C5B0 1 -C5B1 1 -C5B2 1 -C5B3 1 -C6AF 1 -C6B0 1 -C793 1 -C794 1 -C795 1 -C796 1 -C797 1 -C798 1 -C799 1 -C79A 1 -C79B 1 -C79C 1 -C894 1 -C895 1 -C896 1 -C897 1 -CDA7 1 -CA89 1 -C9A5 1 -CAAE 1 -CAAF 1 -C69C 1 -C9AF 1 -C9B0 1 -C6B1 1 -CA8A 1 -56 1 -76 1 -CDAE 1 -C6B2 1 -CA8B 1 -CA8C 1 -57 1 -77 1 -C5B4 1 -C5B5 1 -CAB7 1 -CA8D 1 -58 1 -78 1 -CBA3 1 -CDAF 1 -C39D 1 -C3BD 1 -C3BF 1 -C5B6 1 -C5B7 1 -C5B8 1 -C8B2 1 -C8B3 1 -CAB8 1 -CA8F 1 -C6B3 1 -C6B4 1 -5A 1 -7A 1 -C5B9 1 -C5BA 1 -C5BB 1 -C5BC 1 -C68D 1 -C5BD 1 -C5BE 1 -C6B5 1 -C6B6 1 -C8A4 1 -C8A5 1 -CA90 1 -CA91 1 -C6B7 1 -C7AE 1 -C7AF 1 -CA92 1 -C6B8 1 -C6B9 1 -C6BA 1 -CA93 1 -C89C 1 -C89D 1 -C39E 1 -C3BE 1 -C6BF 1 -C7B7 1 -C6BB 1 -C6A7 1 -C6A8 1 -C6BC 1 -C6BD 1 -C684 1 -C685 1 -CA94 1 -CB80 1 -CABC 1 -C589 1 -CBAE 1 -CABE 1 -CA95 1 -CBA4 1 -CABF 1 -CB81 1 -CAA1 1 -CAA2 1 -CA96 1 -C780 1 -C781 1 -C782 1 -C783 1 -CA97 1 -CA98 1 -CAAC 1 -CAAD 1 -CE86 1 -CE91 1 -CEAC 1 -CEB1 1 -CE92 1 -CEB2 1 -CF90 1 -CE93 1 -CEB3 1 -CE94 1 -CEB4 1 -CE88 1 -CE95 1 -CEAD 1 -CEB5 1 -CFB5 1 -CF9C 1 -CF9D 1 -CF9A 1 -CF9B 1 -CE96 1 -CEB6 1 -CE89 1 -CE97 1 -CEAE 1 -CEB7 1 -CE98 1 -CEB8 1 -CF91 1 -CFB4 1 -CDBA 1 -CE8A 1 -CE90 1 -CE99 1 -CEAA 1 -CEAF 1 -CEB9 1 -CF8A 1 -CFB3 1 -CE9A 1 -CEBA 1 -CFB0 1 -CF97 1 -CE9B 1 -CEBB 1 -C2B5 1 -CE9C 1 -CEBC 1 -CE9D 1 -CEBD 1 -CE9E 1 -CEBE 1 -CE8C 1 -CE9F 1 -CEBF 1 -CF8C 1 -CEA0 1 -CF80 1 -CF96 1 -CF9E 1 -CF9F 1 -CF98 1 -CF99 1 -CEA1 1 -CF81 1 -CFB1 1 -CEA3 1 -CF82 1 -CF83 1 -CFB2 1 -CFB9 1 -CEA4 1 -CF84 1 -CE8E 1 -CEA5 1 -CEAB 1 -CEB0 1 -CF85 1 -CF8B 1 -CF8D 1 -CF92 1 -CF93 1 -CF94 1 -CEA6 1 -CF86 1 -CF95 1 -CEA7 1 -CF87 1 -CEA8 1 -CF88 1 -CE8F 1 -CEA9 1 -CF89 1 -CF8E 1 -CFA0 1 -CFA1 1 -CFB7 1 -CFB8 1 -CFBA 1 -CFBB 1 -CFA2 1 -CFA3 1 -CFA4 1 -CFA5 1 -CFA6 1 -CFA7 1 -CFA8 1 -CFA9 1 -CFAA 1 -CFAB 1 -CFAC 1 -CFAD 1 -CFAE 1 -CFAF 1 -D090 1 -D0B0 1 -D390 1 -D391 1 -D392 1 -D393 1 -D398 1 -D399 1 -D39A 1 -D39B 1 -D394 1 -D395 1 -D091 1 -D0B1 1 -D092 1 -D0B2 1 -D093 1 -D0B3 1 -D290 1 -D291 1 -D292 1 -D293 1 -D294 1 -D295 1 -D094 1 -D0B4 1 -D480 1 -D481 1 -D082 1 -D192 1 -D482 1 -D483 1 -D083 1 -D193 1 -D298 1 -D299 1 -D080 1 -D081 1 -D095 1 -D0B5 1 -D190 1 -D191 1 -D396 1 -D397 1 -D084 1 -D194 1 -D096 1 -D0B6 1 -D381 1 -D382 1 -D39C 1 -D39D 1 -D296 1 -D297 1 -D097 1 -D0B7 1 -D484 1 -D485 1 -D39E 1 -D39F 1 -D085 1 -D195 1 -D3A0 1 -D3A1 1 -D486 1 -D487 1 -D08D 1 -D098 1 -D0B8 1 -D19D 1 -D3A2 1 -D3A3 1 -D28A 1 -D28B 1 -D3A4 1 -D3A5 1 -D086 1 -D196 1 -D087 1 -D197 1 -D099 1 -D0B9 1 -D088 1 -D198 1 -D09A 1 -D0BA 1 -D29A 1 -D29B 1 -D383 1 -D384 1 -D2A0 1 -D2A1 1 -D29E 1 -D29F 1 -D29C 1 -D29D 1 -D09B 1 -D0BB 1 -D385 1 -D386 1 -D089 1 -D199 1 -D488 1 -D489 1 -D09C 1 -D0BC 1 -D38D 1 -D38E 1 -D09D 1 -D0BD 1 -D389 1 -D38A 1 -D2A2 1 -D2A3 1 -D387 1 -D388 1 -D2A4 1 -D2A5 1 -D08A 1 -D19A 1 -D48A 1 -D48B 1 -D09E 1 -D0BE 1 -D3A6 1 -D3A7 1 -D3A8 1 -D3A9 1 -D3AA 1 -D3AB 1 -D09F 1 -D0BF 1 -D2A6 1 -D2A7 1 -D280 1 -D281 1 -D0A0 1 -D180 1 -D28E 1 -D28F 1 -D0A1 1 -D181 1 -D48C 1 -D48D 1 -D2AA 1 -D2AB 1 -D0A2 1 -D182 1 -D48E 1 -D48F 1 -D2AC 1 -D2AD 1 -D08B 1 -D19B 1 -D08C 1 -D19C 1 -D0A3 1 -D183 1 -D3AE 1 -D3AF 1 -D08E 1 -D19E 1 -D3B0 1 -D3B1 1 -D3B2 1 -D3B3 1 -D2AE 1 -D2AF 1 -D2B0 1 -D2B1 1 -D1B8 1 -D1B9 1 -D0A4 1 -D184 1 -D0A5 1 -D185 1 -D2B2 1 -D2B3 1 -D2BA 1 -D2BB 1 -D1A0 1 -D1A1 1 -D1BE 1 -D1BF 1 -D1BC 1 -D1BD 1 -D1BA 1 -D1BB 1 -D0A6 1 -D186 1 -D2B4 1 -D2B5 1 -D0A7 1 -D187 1 -D3B4 1 -D3B5 1 -D2B6 1 -D2B7 1 -D38B 1 -D38C 1 -D2B8 1 -D2B9 1 -D2BC 1 -D2BD 1 -D2BE 1 -D2BF 1 -D08F 1 -D19F 1 -D0A8 1 -D188 1 -D0A9 1 -D189 1 -D0AA 1 -D18A 1 -D0AB 1 -D18B 1 -D3B8 1 -D3B9 1 -D0AC 1 -D18C 1 -D28C 1 -D28D 1 -D1A2 1 -D1A3 1 -D0AD 1 -D18D 1 -D3AC 1 -D3AD 1 -D0AE 1 -D18E 1 -D0AF 1 -D18F 1 -D1A4 1 -D1A5 1 -D1A6 1 -D1A7 1 -D1AA 1 -D1AB 1 -D1A8 1 -D1A9 1 -D1AC 1 -D1AD 1 -D1AE 1 -D1AF 1 -D1B0 1 -D1B1 1 -D1B2 1 -D1B3 1 -D1B4 1 -D1B5 1 -D1B6 1 -D1B7 1 -D2A8 1 -D2A9 1 -D380 1 -D4B1 1 -D5A1 1 -D4B2 1 -D5A2 1 -D4B3 1 -D5A3 1 -D4B4 1 -D5A4 1 -D4B5 1 -D5A5 1 -D687 1 -D4B6 1 -D5A6 1 -D4B7 1 -D5A7 1 -D4B8 1 -D5A8 1 -D4B9 1 -D5A9 1 -D4BA 1 -D5AA 1 -D4BB 1 -D5AB 1 -D4BC 1 -D5AC 1 -D4BD 1 -D5AD 1 -D4BE 1 -D5AE 1 -D4BF 1 -D5AF 1 -D580 1 -D5B0 1 -D581 1 -D5B1 1 -D582 1 -D5B2 1 -D583 1 -D5B3 1 -D584 1 -D5B4 1 -D585 1 -D5B5 1 -D586 1 -D5B6 1 -D587 1 -D5B7 1 -D588 1 -D5B8 1 -D589 1 -D5B9 1 -D58A 1 -D5BA 1 -D58B 1 -D5BB 1 -D58C 1 -D5BC 1 -D58D 1 -D5BD 1 -D58E 1 -D5BE 1 -D58F 1 -D5BF 1 -D590 1 -D680 1 -D591 1 -D681 1 -D592 1 -D682 1 -D593 1 -D683 1 -D594 1 -D684 1 -D595 1 -D685 1 -D596 1 -D686 1 -D599 1 -D790 1 -D791 1 -D792 1 -D793 1 -D794 1 -D795 1 -D7B0 1 -D7B1 1 -D796 1 -D797 1 -D798 1 -D799 1 -D7B2 1 -D79A 1 -D79B 1 -D79C 1 -D79D 1 -D79E 1 -D79F 1 -D7A0 1 -D7A1 1 -D7A2 1 -D7A3 1 -D7A4 1 -D7A5 1 -D7A6 1 -D7A7 1 -D7A8 1 -D7A9 1 -D7AA 1 -D8A1 1 -D9B4 1 -DBBD 1 -D8A2 1 -D8A3 1 -D9B2 1 -D9B1 1 -D8A4 1 -D8A5 1 -D9B3 1 -D8A6 1 -D8A7 1 -D9B5 1 -D9AE 1 -D8A8 1 -D9BB 1 -D9BE 1 -DA80 1 -D8A9 1 -D8AA 1 -D8AB 1 -D9B9 1 -D9BA 1 -D9BC 1 -D9BD 1 -D9BF 1 -D8AC 1 -DA83 1 -DA84 1 -DA86 1 -DABF 1 -DA87 1 -D8AD 1 -D8AE 1 -DA81 1 -DA82 1 -DA85 1 -D8AF 1 -D8B0 1 -DA88 1 -DA89 1 -DA8A 1 -DA8B 1 -DA8C 1 -DA8D 1 -DA8E 1 -DA8F 1 -DA90 1 -DBAE 1 -D8B1 1 -D8B2 1 -DA91 1 -DA92 1 -DA93 1 -DA94 1 -DA95 1 -DA96 1 -DA97 1 -DA98 1 -DA99 1 -DBAF 1 -D8B3 1 -D8B4 1 -DA9A 1 -DA9B 1 -DA9C 1 -DBBA 1 -D8B5 1 -D8B6 1 -DA9D 1 -DA9E 1 -DBBB 1 -D8B7 1 -D8B8 1 -DA9F 1 -D8B9 1 -D8BA 1 -DAA0 1 -DBBC 1 -D981 1 -DAA1 1 -DAA2 1 -DAA3 1 -DAA4 1 -DAA5 1 -DAA6 1 -D9AF 1 -D982 1 -DAA7 1 -DAA8 1 -D983 1 -DAA9 1 -DAAA 1 -DAAB 1 -DAAC 1 -DAAD 1 -DAAE 1 -DAAF 1 -DAB0 1 -DAB1 1 -DAB2 1 -DAB3 1 -DAB4 1 -D984 1 -DAB5 1 -DAB6 1 -DAB7 1 -DAB8 1 -D985 1 -DBBE 1 -D986 1 -DABA 1 -DABB 1 -DABC 1 -DABD 1 -DAB9 1 -D987 1 -DABE 1 -DB81 1 -DB82 1 -DB83 1 -DBBF 1 -DB80 1 -DB95 1 -D988 1 -DBA5 1 -D9B6 1 -DB84 1 -DB85 1 -DB86 1 -DB87 1 -D9B7 1 -DB88 1 -DB89 1 -DB8A 1 -DB8B 1 -DB8F 1 -D989 1 -D98A 1 -DBA6 1 -D9B8 1 -DB8C 1 -DB8D 1 -DB8E 1 -DB90 1 -DB91 1 -DB92 1 -DB93 1 -DC90 1 -DC92 1 -DCAD 1 -DC93 1 -DC94 1 -DCAE 1 -DC96 1 -DC95 1 -DCAF 1 -DC97 1 -DC98 1 -DC99 1 -DD8D 1 -DC9A 1 -DC9B 1 -DC9C 1 -DC9D 1 -DC9E 1 -DC9F 1 -DD8E 1 -DCA0 1 -DCA1 1 -DCA2 1 -DCA3 1 -DCA4 1 -DCA5 1 -DCA6 1 -DCA7 1 -DD8F 1 -DCA8 1 -DCA9 1 -DCAA 1 -DCAB 1 -DCAC 1 -DE80 1 -DE99 1 -DE9A 1 -DE81 1 -DE82 1 -DE83 1 -DE9C 1 -DE84 1 -DE85 1 -DE86 1 -DE87 1 -DEA2 1 -DEA3 1 -DE88 1 -DEA5 1 -DE89 1 -DE8A 1 -DE8B 1 -DE9B 1 -DE8C 1 -DE98 1 -DEA0 1 -DEA1 1 -DE8D 1 -DE8E 1 -DEA4 1 -DE8F 1 -DE90 1 -DE9D 1 -DE9E 1 -DE9F 1 -DE91 1 -DE92 1 -DE93 1 -DE94 1 -DE95 1 -DE96 1 -DE97 1 -DEB1 1 -DEA6 1 -DEA7 1 -DEA8 1 -DEA9 1 -DEAA 1 -DEAB 1 -DEAC 1 -DEAD 1 -DEAE 1 -DEAF 1 -DEB0 1 -E4B880 1 -E4B881 1 -E4B882 1 -E4B883 1 -E4B884 1 -E4B885 1 -E4B886 1 -E4B887 1 -E4B888 1 -E4B889 1 -E4B88A 1 -E4B88B 1 -E4B88C 1 -E4B88D 1 -E4B88E 1 -E4B88F 1 -E4B890 1 -E4B891 1 -E4B892 1 -E4B893 1 -E4B894 1 -E4B895 1 -E4B896 1 -E4B897 1 -E4B898 1 -E4B899 1 -E4B89A 1 -E4B89B 1 -E4B89C 1 -E4B89D 1 -E4B89E 1 -E4B89F 1 -E4B8A0 1 -E4B8A1 1 -E4B8A2 1 -E4B8A3 1 -E4B8A4 1 -E4B8A5 1 -E4B8A6 1 -E4B8A7 1 -E4B8A8 1 -E4B8A9 1 -E4B8AA 1 -E4B8AB 1 -E4B8AC 1 -E4B8AD 1 -E4B8AE 1 -E4B8AF 1 -E4B8B0 1 -E4B8B1 1 -E4B8B2 1 -E4B8B3 1 -E4B8B4 1 -E4B8B5 1 -E4B8B6 1 -E4B8B7 1 -E4B8B8 1 -E4B8B9 1 -E4B8BA 1 -E4B8BB 1 -E4B8BC 1 -E4B8BD 1 -E4B8BE 1 -E4B8BF 1 -E4B980 1 -E4B981 1 -E4B982 1 -E4B983 1 -E4B984 1 -E4B985 1 -E4B986 1 -E4B987 1 -E4B988 1 -E4B989 1 -E4B98A 1 -E4B98B 1 -E4B98C 1 -E4B98D 1 -E4B98E 1 -E4B98F 1 -E4B990 1 -E4B991 1 -E4B992 1 -E4B993 1 -E4B994 1 -E4B995 1 -E4B996 1 -E4B997 1 -E4B998 1 -E4B999 1 -E4B99A 1 -E4B99B 1 -E4B99C 1 -E4B99D 1 -E4B99E 1 -E4B99F 1 -E4B9A0 1 -E4B9A1 1 -E4B9A2 1 -E4B9A3 1 -E4B9A4 1 -E4B9A5 1 -E4B9A6 1 -E4B9A7 1 -E4B9A8 1 -E4B9A9 1 -E4B9AA 1 -E4B9AB 1 -E4B9AC 1 -E4B9AD 1 -E4B9AE 1 -E4B9AF 1 -E4B9B0 1 -E4B9B1 1 -E4B9B2 1 -E4B9B3 1 -E4B9B4 1 -E4B9B5 1 -E4B9B6 1 -E4B9B7 1 -E4B9B8 1 -E4B9B9 1 -E4B9BA 1 -E4B9BB 1 -E4B9BC 1 -E4B9BD 1 -E4B9BE 1 -E4B9BF 1 -E4BA80 1 -E4BA81 1 -E4BA82 1 -E4BA83 1 -E4BA84 1 -E4BA85 1 -E4BA86 1 -E4BA87 1 -E4BA88 1 -E4BA89 1 -E4BA8A 1 -E4BA8B 1 -E4BA8C 1 -E4BA8D 1 -E4BA8E 1 -E4BA8F 1 -E4BA90 1 -E4BA91 1 -E4BA92 1 -E4BA93 1 -E4BA94 1 -E4BA95 1 -E4BA96 1 -E4BA97 1 -E4BA98 1 -E4BA99 1 -E4BA9A 1 -E4BA9B 1 -E4BA9C 1 -E4BA9D 1 -E4BA9E 1 -E4BA9F 1 -E4BAA0 1 -E4BAA1 1 -E4BAA2 1 -E4BAA3 1 -E4BAA4 1 -E4BAA5 1 -E4BAA6 1 -E4BAA7 1 -E4BAA8 1 -E4BAA9 1 -E4BAAA 1 -E4BAAB 1 -E4BAAC 1 -E4BAAD 1 -E4BAAE 1 -E4BAAF 1 -E4BAB0 1 -E4BAB1 1 -E4BAB2 1 -E4BAB3 1 -E4BAB4 1 -E4BAB5 1 -E4BAB6 1 -E4BAB7 1 -E4BAB8 1 -E4BAB9 1 -E4BABA 1 -E4BABB 1 -E4BABC 1 -E4BABD 1 -E4BABE 1 -E4BABF 1 -E4BB80 1 -E4BB81 1 -E4BB82 1 -E4BB83 1 -E4BB84 1 -E4BB85 1 -E4BB86 1 -E4BB87 1 -E4BB88 1 -E4BB89 1 -E4BB8A 1 -E4BB8B 1 -E4BB8C 1 -E4BB8D 1 -E4BB8E 1 -E4BB8F 1 -E4BB90 1 -E4BB91 1 -E4BB92 1 -E4BB93 1 -E4BB94 1 -E4BB95 1 -E4BB96 1 -E4BB97 1 -E4BB98 1 -E4BB99 1 -E4BB9A 1 -E4BB9B 1 -E4BB9C 1 -E4BB9D 1 -E4BB9E 1 -E4BB9F 1 -E4BBA0 1 -E4BBA1 1 -E4BBA2 1 -E4BBA3 1 -E4BBA4 1 -E4BBA5 1 -E4BBA6 1 -E4BBA7 1 -E4BBA8 1 -E4BBA9 1 -E4BBAA 1 -E4BBAB 1 -E4BBAC 1 -E4BBAD 1 -E4BBAE 1 -E4BBAF 1 -E4BBB0 1 -E4BBB1 1 -E4BBB2 1 -E4BBB3 1 -E4BBB4 1 -E4BBB5 1 -E4BBB6 1 -E4BBB7 1 -E4BBB8 1 -E4BBB9 1 -E4BBBA 1 -E4BBBB 1 -E4BBBC 1 -E4BBBD 1 -E4BBBE 1 -E4BBBF 1 -E4BC80 1 -E4BC81 1 -E4BC82 1 -E4BC83 1 -E4BC84 1 -E4BC85 1 -E4BC86 1 -E4BC87 1 -E4BC88 1 -E4BC89 1 -E4BC8A 1 -E4BC8B 1 -E4BC8C 1 -E4BC8D 1 -E4BC8E 1 -E4BC8F 1 -E4BC90 1 -E4BC91 1 -E4BC92 1 -E4BC93 1 -E4BC94 1 -E4BC95 1 -E4BC96 1 -E4BC97 1 -E4BC98 1 -E4BC99 1 -E4BC9A 1 -E4BC9B 1 -E4BC9C 1 -E4BC9D 1 -E4BC9E 1 -E4BC9F 1 -E4BCA0 1 -E4BCA1 1 -E4BCA2 1 -E4BCA3 1 -E4BCA4 1 -E4BCA5 1 -E4BCA6 1 -E4BCA7 1 -E4BCA8 1 -E4BCA9 1 -E4BCAA 1 -E4BCAB 1 -E4BCAC 1 -E4BCAD 1 -E4BCAE 1 -E4BCAF 1 -E4BCB0 1 -E4BCB1 1 -E4BCB2 1 -E4BCB3 1 -E4BCB4 1 -E4BCB5 1 -E4BCB6 1 -E4BCB7 1 -E4BCB8 1 -E4BCB9 1 -E4BCBA 1 -E4BCBB 1 -E4BCBC 1 -E4BCBD 1 -E4BCBE 1 -E4BCBF 1 -E4BD80 1 -E4BD81 1 -E4BD82 1 -E4BD83 1 -E4BD84 1 -E4BD85 1 -E4BD86 1 -E4BD87 1 -E4BD88 1 -E4BD89 1 -E4BD8A 1 -E4BD8B 1 -E4BD8C 1 -E4BD8D 1 -E4BD8E 1 -E4BD8F 1 -E4BD90 1 -E4BD91 1 -E4BD92 1 -E4BD93 1 -E4BD94 1 -E4BD95 1 -E4BD96 1 -E4BD97 1 -E4BD98 1 -E4BD99 1 -E4BD9A 1 -E4BD9B 1 -E4BD9C 1 -E4BD9D 1 -E4BD9E 1 -E4BD9F 1 -E4BDA0 1 -E4BDA1 1 -E4BDA2 1 -E4BDA3 1 -E4BDA4 1 -E4BDA5 1 -E4BDA6 1 -E4BDA7 1 -E4BDA8 1 -E4BDA9 1 -E4BDAA 1 -E4BDAB 1 -E4BDAC 1 -E4BDAD 1 -E4BDAE 1 -E4BDAF 1 -E4BDB0 1 -E4BDB1 1 -E4BDB2 1 -E4BDB3 1 -E4BDB4 1 -E4BDB5 1 -E4BDB6 1 -E4BDB7 1 -E4BDB8 1 -E4BDB9 1 -E4BDBA 1 -E4BDBB 1 -E4BDBC 1 -E4BDBD 1 -E4BDBE 1 -E4BDBF 1 -E4BE80 1 -E4BE81 1 -E4BE82 1 -E4BE83 1 -E4BE84 1 -E4BE85 1 -E4BE86 1 -E4BE87 1 -E4BE88 1 -E4BE89 1 -E4BE8A 1 -E4BE8B 1 -E4BE8C 1 -E4BE8D 1 -E4BE8E 1 -E4BE8F 1 -E4BE90 1 -E4BE91 1 -E4BE92 1 -E4BE93 1 -E4BE94 1 -E4BE95 1 -E4BE96 1 -E4BE97 1 -E4BE98 1 -E4BE99 1 -E4BE9A 1 -E4BE9B 1 -E4BE9C 1 -E4BE9D 1 -E4BE9E 1 -E4BE9F 1 -E4BEA0 1 -E4BEA1 1 -E4BEA2 1 -E4BEA3 1 -E4BEA4 1 -E4BEA5 1 -E4BEA6 1 -E4BEA7 1 -E4BEA8 1 -E4BEA9 1 -E4BEAA 1 -E4BEAB 1 -E4BEAC 1 -E4BEAD 1 -E4BEAE 1 -E4BEAF 1 -E4BEB0 1 -E4BEB1 1 -E4BEB2 1 -E4BEB3 1 -E4BEB4 1 -E4BEB5 1 -E4BEB6 1 -E4BEB7 1 -E4BEB8 1 -E4BEB9 1 -E4BEBA 1 -E4BEBB 1 -E4BEBC 1 -E4BEBD 1 -E4BEBE 1 -E4BEBF 1 -E4BF80 1 -E4BF81 1 -E4BF82 1 -E4BF83 1 -E4BF84 1 -E4BF85 1 -E4BF86 1 -E4BF87 1 -E4BF88 1 -E4BF89 1 -E4BF8A 1 -E4BF8B 1 -E4BF8C 1 -E4BF8D 1 -E4BF8E 1 -E4BF8F 1 -E4BF90 1 -E4BF91 1 -E4BF92 1 -E4BF93 1 -E4BF94 1 -E4BF95 1 -E4BF96 1 -E4BF97 1 -E4BF98 1 -E4BF99 1 -E4BF9A 1 -E4BF9B 1 -E4BF9C 1 -E4BF9D 1 -E4BF9E 1 -E4BF9F 1 -E4BFA0 1 -E4BFA1 1 -E4BFA2 1 -E4BFA3 1 -E4BFA4 1 -E4BFA5 1 -E4BFA6 1 -E4BFA7 1 -E4BFA8 1 -E4BFA9 1 -E4BFAA 1 -E4BFAB 1 -E4BFAC 1 -E4BFAD 1 -E4BFAE 1 -E4BFAF 1 -E4BFB0 1 -E4BFB1 1 -E4BFB2 1 -E4BFB3 1 -E4BFB4 1 -E4BFB5 1 -E4BFB6 1 -E4BFB7 1 -E4BFB8 1 -E4BFB9 1 -E4BFBA 1 -E4BFBB 1 -E4BFBC 1 -E4BFBD 1 -E4BFBE 1 -E4BFBF 1 -C8B7 1 -C8B8 1 -C8B9 1 -C8BA 1 -C8BB 1 -C8BC 1 -C8BD 1 -C8BE 1 -C8BF 1 -C980 1 -C981 1 -C982 1 -C983 1 -C984 1 -C985 1 -C986 1 -C987 1 -C988 1 -C989 1 -C98A 1 -C98B 1 -C98C 1 -C98D 1 -C98E 1 -C98F 1 -CD98 1 -CD99 1 -CD9A 1 -CD9B 1 -CD9C 1 -CDB0 1 -CDB1 1 -CDB2 1 -CDB3 1 -CDB6 1 -CDB7 1 -CDB8 1 -CDB9 1 -CDBB 1 -CDBC 1 -CDBD 1 -CDBF 1 -CE80 1 -CE81 1 -CE82 1 -CE83 1 -CE8B 1 -CE8D 1 -CEA2 1 -CF8F 1 -CFBC 1 -CFBD 1 -CFBE 1 -CFBF 1 -D287 1 -D38F 1 -D3B6 1 -D3B7 1 -D3BA 1 -D3BB 1 -D3BC 1 -D3BD 1 -D3BE 1 -D3BF 1 -D490 1 -D491 1 -D492 1 -D493 1 -D494 1 -D495 1 -D496 1 -D497 1 -D498 1 -D499 1 -D49A 1 -D49B 1 -D49C 1 -D49D 1 -D49E 1 -D49F 1 -D4A0 1 -D4A1 1 -D4A2 1 -D4A3 1 -D4A4 1 -D4A5 1 -D4A6 1 -D4A7 1 -D4A8 1 -D4A9 1 -D4AA 1 -D4AB 1 -D4AC 1 -D4AD 1 -D4AE 1 -D4AF 1 -D4B0 1 -D597 1 -D598 1 -D5A0 1 -D688 1 -D68B 1 -D68C 1 -D68D 1 -D68E 1 -D68F 1 -D690 1 -D6A2 1 -D6BA 1 -D785 1 -D786 1 -D787 1 -D788 1 -D789 1 -D78A 1 -D78B 1 -D78C 1 -D78D 1 -D78E 1 -D78F 1 -D7AB 1 -D7AC 1 -D7AD 1 -D7AE 1 -D7AF 1 -D7B5 1 -D7B6 1 -D7B7 1 -D7B8 1 -D7B9 1 -D7BA 1 -D7BB 1 -D7BC 1 -D7BD 1 -D7BE 1 -D7BF 1 -D884 1 -D885 1 -D886 1 -D887 1 -D888 1 -D889 1 -D88A 1 -D88B 1 -D896 1 -D897 1 -D898 1 -D899 1 -D89A 1 -D89C 1 -D89D 1 -D89E 1 -D8A0 1 -D8BB 1 -D8BC 1 -D8BD 1 -D8BE 1 -D8BF 1 -D999 1 -D99A 1 -D99B 1 -D99C 1 -D99D 1 -D99E 1 -D99F 1 -DC8E 1 -DD8B 1 -DD8C 1 -DD90 1 -DD91 1 -DD92 1 -DD93 1 -DD94 1 -DD95 1 -DD96 1 -DD97 1 -DD98 1 -DD99 1 -DD9A 1 -DD9B 1 -DD9C 1 -DD9D 1 -DD9E 1 -DD9F 1 -DDA0 1 -DDA1 1 -DDA2 1 -DDA3 1 -DDA4 1 -DDA5 1 -DDA6 1 -DDA7 1 -DDA8 1 -DDA9 1 -DDAA 1 -DDAB 1 -DDAC 1 -DDAD 1 -DDAE 1 -DDAF 1 -DDB0 1 -DDB1 1 -DDB2 1 -DDB3 1 -DDB4 1 -DDB5 1 -DDB6 1 -DDB7 1 -DDB8 1 -DDB9 1 -DDBA 1 -DDBB 1 -DDBC 1 -DDBD 1 -DDBE 1 -DDBF 1 -DEB2 1 -DEB3 1 -DEB4 1 -DEB5 1 -DEB6 1 -DEB7 1 -DEB8 1 -DEB9 1 -DEBA 1 -DEBB 1 -DEBC 1 -DEBD 1 -DEBE 1 -DEBF 1 -DF80 1 -DF81 1 -DF82 1 -DF83 1 -DF84 1 -DF85 1 -DF86 1 -DF87 1 -DF88 1 -DF89 1 -DF8A 1 -DF8B 1 -DF8C 1 -DF8D 1 -DF8E 1 -DF8F 1 -DF90 1 -DF91 1 -DF92 1 -DF93 1 -DF94 1 -DF95 1 -DF96 1 -DF97 1 -DF98 1 -DF99 1 -DF9A 1 -DF9B 1 -DF9C 1 -DF9D 1 -DF9E 1 -DF9F 1 -DFA0 1 -DFA1 1 -DFA2 1 -DFA3 1 -DFA4 1 -DFA5 1 -DFA6 1 -DFA7 1 -DFA8 1 -DFA9 1 -DFAA 1 -DFAB 1 -DFAC 1 -DFAD 1 -DFAE 1 -DFAF 1 -DFB0 1 -DFB1 1 -DFB2 1 -DFB3 1 -DFB4 1 -DFB5 1 -DFB6 1 -DFB7 1 -DFB8 1 -DFB9 1 -DFBA 1 -DFBB 1 -DFBC 1 -DFBD 1 -DFBE 1 -DFBF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_persian_ci) ENGINE=NDB CHARACTER SET utf8 COLLATE utf8_persian_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_persian_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -D993 1 -D994 1 -D995 1 -D9B0 1 -C285 1 -7F 1 -C280 1 -C281 1 -C282 1 -C283 1 -C284 1 -C286 1 -C287 1 -C288 1 -C289 1 -C28A 1 -C28B 1 -C28C 1 -C28D 1 -C28E 1 -C28F 1 -C290 1 -C291 1 -C292 1 -C293 1 -C294 1 -C295 1 -C296 1 -C297 1 -C298 1 -C299 1 -C29A 1 -C29B 1 -C29C 1 -C29D 1 -C29E 1 -C29F 1 -C2A0 1 -CC80 1 -CC81 1 -CC82 1 -CC83 1 -CC84 1 -CC85 1 -CC86 1 -CC87 1 -CC88 1 -CC89 1 -CC8A 1 -CC8B 1 -CC8C 1 -CC8D 1 -CC8E 1 -CC8F 1 -CC90 1 -CC91 1 -CC92 1 -CC93 1 -CC94 1 -CC95 1 -CC96 1 -CC97 1 -CC98 1 -CC99 1 -CC9A 1 -CC9B 1 -CC9C 1 -CC9D 1 -CC9E 1 -CC9F 1 -CCA0 1 -CCA1 1 -CCA2 1 -CCA3 1 -CCA4 1 -CCA5 1 -CCA6 1 -CCA7 1 -CCA8 1 -CCA9 1 -CCAA 1 -CCAB 1 -CCAC 1 -CCAD 1 -CCAE 1 -CCAF 1 -CCB0 1 -CCB1 1 -CCB2 1 -CCB3 1 -CCB4 1 -CCB5 1 -CCB6 1 -CCB7 1 -CCB8 1 -CCB9 1 -CCBA 1 -CCBB 1 -CCBC 1 -CCBD 1 -CCBE 1 -CCBF 1 -CD80 1 -CD81 1 -CD82 1 -CD83 1 -CD84 1 -CD85 1 -CD86 1 -CD87 1 -CD88 1 -CD89 1 -CD8A 1 -CD8B 1 -CD8C 1 -CD8D 1 -CD8E 1 -CD8F 1 -CD90 1 -CD91 1 -CD92 1 -CD93 1 -CD94 1 -CD95 1 -CD96 1 -CD97 1 -CD9D 1 -CD9E 1 -CD9F 1 -CDA0 1 -CDA1 1 -CDA2 1 -D283 1 -D284 1 -D285 1 -D286 1 -D288 1 -D289 1 -D691 1 -D692 1 -D693 1 -D694 1 -D695 1 -D696 1 -D697 1 -D698 1 -D699 1 -D69A 1 -D69B 1 -D69C 1 -D69D 1 -D69E 1 -D69F 1 -D6A0 1 -D6A1 1 -D6A3 1 -D6A4 1 -D6A5 1 -D6A6 1 -D6A7 1 -D6A8 1 -D6A9 1 -D6AA 1 -D6AB 1 -D6AC 1 -D6AD 1 -D6AE 1 -D6AF 1 -D6B0 1 -D6B1 1 -D6B2 1 -D6B3 1 -D6B4 1 -D6B5 1 -D6B6 1 -D6B7 1 -D6B8 1 -D6B9 1 -D6BB 1 -D6BC 1 -D6BD 1 -D6BF 1 -D781 1 -D782 1 -D784 1 -D880 1 -D881 1 -D882 1 -D883 1 -D890 1 -D891 1 -D892 1 -D893 1 -D894 1 -D895 1 -D991 1 -D992 1 -D996 1 -D997 1 -D998 1 -DB96 1 -DB97 1 -DB98 1 -DB99 1 -DB9A 1 -DB9B 1 -DB9C 1 -DB9D 1 -DB9E 1 -DB9F 1 -DBA0 1 -DBA1 1 -DBA2 1 -DBA3 1 -DBA4 1 -DBA7 1 -DBA8 1 -DBAA 1 -DBAB 1 -DBAC 1 -DBAD 1 -DC8F 1 -DC91 1 -DCB0 1 -DCB1 1 -DCB2 1 -DCB3 1 -DCB4 1 -DCB5 1 -DCB6 1 -DCB7 1 -DCB8 1 -DCB9 1 -DCBA 1 -DCBB 1 -DCBC 1 -DCBD 1 -DCBE 1 -DCBF 1 -DD80 1 -DD81 1 -DD82 1 -DD83 1 -DD84 1 -DD85 1 -DD86 1 -DD87 1 -DD88 1 -DD89 1 -DD8A 1 -D980 1 -60 1 -C2B4 1 -CE84 1 -CB9C 1 -5E 1 -C2AF 1 -CB98 1 -CB99 1 -C2A8 1 -CE85 1 -CB9A 1 -CB9D 1 -C2B8 1 -CB9B 1 -5F 1 -C2AD 1 -2D 1 -D68A 1 -2C 1 -D59D 1 -D88C 1 -D88D 1 -D9AB 1 -D9AC 1 -3B 1 -CDBE 1 -D89B 1 -3A 1 -D689 1 -DC83 1 -DC84 1 -DC85 1 -DC86 1 -DC87 1 -DC88 1 -21 1 -C2A1 1 -D59C 1 -3F 1 -C2BF 1 -D59E 1 -D89F 1 -DC89 1 -2E 1 -DB94 1 -DC81 1 -DC82 1 -C2B7 1 -CE87 1 -DC80 1 -27 1 -22 1 -C2AB 1 -C2BB 1 -28 1 -29 1 -5B 1 -7B 1 -7D 1 -C2A7 1 -C2B6 1 -C2A9 1 -C2AE 1 -40 1 -2A 1 -D9AD 1 -2F 1 -D98E 1 -26 1 -D990 1 -23 1 -D98F 1 -25 1 -D9AA 1 -D98B 1 -D98D 1 -D98C 1 -D59A 1 -D59B 1 -D59F 1 -D6BE 1 -D780 1 -D783 1 -D7B3 1 -D7B4 1 -DC8A 1 -DC8B 1 -DC8C 1 -DC8D 1 -CAB9 1 -CDB4 1 -CDB5 1 -CABA 1 -CB82 1 -CB83 1 -CB84 1 -CB85 1 -CB86 1 -CB87 1 -CB88 1 -CB89 1 -CB8A 1 -CB8B 1 -CB8C 1 -CB8D 1 -CB8E 1 -CB8F 1 -CB92 1 -CB93 1 -CB94 1 -CB95 1 -CB96 1 -CB97 1 -CB9E 1 -CB9F 1 -CBA5 1 -CBA6 1 -CBA7 1 -CBA8 1 -CBA9 1 -CBAA 1 -CBAB 1 -CBAC 1 -CBAD 1 -CBAF 1 -CBB0 1 -CBB1 1 -CBB2 1 -CBB3 1 -CBB4 1 -CBB5 1 -CBB6 1 -CBB7 1 -CBB8 1 -CBB9 1 -CBBA 1 -CBBB 1 -CBBC 1 -CBBD 1 -CBBE 1 -CBBF 1 -C2B0 1 -D282 1 -D88E 1 -D88F 1 -DBA9 1 -CFB6 1 -2B 1 -C2B1 1 -C3B7 1 -C397 1 -3C 1 -3D 1 -3E 1 -C2AC 1 -7C 1 -C2A6 1 -7E 1 -CB90 1 -CB91 1 -C2A4 1 -C2A2 1 -24 1 -C2A3 1 -C2A5 1 -30 1 -D9A0 1 -DBB0 1 -31 1 -C2B9 1 -D9A1 1 -DBB1 1 -C2BD 1 -C2BC 1 -32 1 -C2B2 1 -D9A2 1 -DBB2 1 -33 1 -C2B3 1 -D9A3 1 -DBB3 1 -C2BE 1 -34 1 -D9A4 1 -DBB4 1 -35 1 -D9A5 1 -DBB5 1 -36 1 -D9A6 1 -DBB6 1 -37 1 -D9A7 1 -DBB7 1 -38 1 -D9A8 1 -DBB8 1 -39 1 -D9A9 1 -DBB9 1 -41 1 -61 1 -C2AA 1 -C380 1 -C381 1 -C382 1 -C383 1 -C384 1 -C385 1 -C3A0 1 -C3A1 1 -C3A2 1 -C3A3 1 -C3A4 1 -C3A5 1 -C480 1 -C481 1 -C482 1 -C483 1 -C484 1 -C485 1 -C78D 1 -C78E 1 -C79E 1 -C79F 1 -C7A0 1 -C7A1 1 -C7BA 1 -C7BB 1 -C880 1 -C881 1 -C882 1 -C883 1 -C8A6 1 -C8A7 1 -CDA3 1 -D8A2 1 -D8A7 1 -D9B1 1 -D8A1 1 -D8A3 1 -C386 1 -C3A6 1 -C7A2 1 -C7A3 1 -C7BC 1 -C7BD 1 -D8A5 1 -D8A4 1 -D8A6 1 -C990 1 -C991 1 -C992 1 -42 1 -62 1 -CA99 1 -C680 1 -C681 1 -C993 1 -C682 1 -C683 1 -43 1 -63 1 -C387 1 -C3A7 1 -C486 1 -C487 1 -C488 1 -C489 1 -C48A 1 -C48B 1 -C48C 1 -C48D 1 -CDA8 1 -C687 1 -C688 1 -C995 1 -44 1 -64 1 -C48E 1 -C48F 1 -CDA9 1 -C784 1 -C785 1 -C786 1 -C7B1 1 -C7B2 1 -C7B3 1 -CAA3 1 -CAA5 1 -CAA4 1 -C490 1 -C491 1 -C689 1 -C996 1 -C68A 1 -C997 1 -C68B 1 -C68C 1 -C8A1 1 -C390 1 -C3B0 1 -45 1 -65 1 -C388 1 -C389 1 -C38A 1 -C38B 1 -C3A8 1 -C3A9 1 -C3AA 1 -C3AB 1 -C492 1 -C493 1 -C494 1 -C495 1 -C496 1 -C497 1 -C498 1 -C499 1 -C49A 1 -C49B 1 -C884 1 -C885 1 -C886 1 -C887 1 -C8A8 1 -C8A9 1 -CDA4 1 -C68E 1 -C79D 1 -C68F 1 -C999 1 -C690 1 -C99B 1 -C998 1 -C99A 1 -C99C 1 -C99D 1 -C99E 1 -CA9A 1 -C9A4 1 -46 1 -66 1 -CAA9 1 -C691 1 -C692 1 -47 1 -67 1 -C49C 1 -C49D 1 -C49E 1 -C49F 1 -C4A0 1 -C4A1 1 -C4A2 1 -C4A3 1 -C7A6 1 -C7A7 1 -C7B4 1 -C7B5 1 -C9A1 1 -C9A2 1 -C7A4 1 -C7A5 1 -C693 1 -C9A0 1 -CA9B 1 -C694 1 -C9A3 1 -CBA0 1 -C6A2 1 -C6A3 1 -48 1 -68 1 -C4A4 1 -C4A5 1 -C89E 1 -C89F 1 -CAB0 1 -CDAA 1 -CA9C 1 -C695 1 -C7B6 1 -C4A6 1 -C4A7 1 -C9A6 1 -CAB1 1 -C9A7 1 -CABB 1 -CABD 1 -49 1 -69 1 -C38C 1 -C38D 1 -C38E 1 -C38F 1 -C3AC 1 -C3AD 1 -C3AE 1 -C3AF 1 -C4A8 1 -C4A9 1 -C4AA 1 -C4AB 1 -C4AC 1 -C4AD 1 -C4AE 1 -C4AF 1 -C4B0 1 -C78F 1 -C790 1 -C888 1 -C889 1 -C88A 1 -C88B 1 -CDA5 1 -C4B2 1 -C4B3 1 -C4B1 1 -C9AA 1 -C697 1 -C9A8 1 -C696 1 -C9A9 1 -4A 1 -6A 1 -C4B4 1 -C4B5 1 -C7B0 1 -CAB2 1 -CA9D 1 -C99F 1 -CA84 1 -4B 1 -6B 1 -C4B6 1 -C4B7 1 -C7A8 1 -C7A9 1 -C698 1 -C699 1 -CA9E 1 -4C 1 -6C 1 -C4B9 1 -C4BA 1 -C4BB 1 -C4BC 1 -C4BD 1 -C4BE 1 -CBA1 1 -C4BF 1 -C580 1 -C787 1 -C788 1 -C789 1 -CAAA 1 -CAAB 1 -CA9F 1 -C581 1 -C582 1 -C69A 1 -C9AB 1 -C9AC 1 -C9AD 1 -C8B4 1 -C9AE 1 -C69B 1 -CA8E 1 -4D 1 -6D 1 -CDAB 1 -C9B1 1 -4E 1 -6E 1 -C391 1 -C3B1 1 -C583 1 -C584 1 -C585 1 -C586 1 -C587 1 -C588 1 -C7B8 1 -C7B9 1 -C78A 1 -C78B 1 -C78C 1 -C9B4 1 -C69D 1 -C9B2 1 -C69E 1 -C8A0 1 -C9B3 1 -C8B5 1 -C58A 1 -C58B 1 -4F 1 -6F 1 -C2BA 1 -C392 1 -C393 1 -C394 1 -C395 1 -C396 1 -C3B2 1 -C3B3 1 -C3B4 1 -C3B5 1 -C3B6 1 -C58C 1 -C58D 1 -C58E 1 -C58F 1 -C590 1 -C591 1 -C6A0 1 -C6A1 1 -C791 1 -C792 1 -C7AA 1 -C7AB 1 -C7AC 1 -C7AD 1 -C88C 1 -C88D 1 -C88E 1 -C88F 1 -C8AA 1 -C8AB 1 -C8AC 1 -C8AD 1 -C8AE 1 -C8AF 1 -C8B0 1 -C8B1 1 -CDA6 1 -C592 1 -C593 1 -C9B6 1 -C398 1 -C3B8 1 -C7BE 1 -C7BF 1 -C686 1 -C994 1 -C69F 1 -C9B5 1 -C9B7 1 -C8A2 1 -C8A3 1 -50 1 -70 1 -C6A4 1 -C6A5 1 -C9B8 1 -51 1 -71 1 -CAA0 1 -C4B8 1 -52 1 -72 1 -C594 1 -C595 1 -C596 1 -C597 1 -C598 1 -C599 1 -C890 1 -C891 1 -C892 1 -C893 1 -CAB3 1 -CDAC 1 -C6A6 1 -CA80 1 -C9B9 1 -CAB4 1 -C9BA 1 -C9BB 1 -CAB5 1 -C9BC 1 -C9BD 1 -C9BE 1 -C9BF 1 -CA81 1 -CAB6 1 -53 1 -73 1 -C59A 1 -C59B 1 -C59C 1 -C59D 1 -C59E 1 -C59F 1 -C5A0 1 -C5A1 1 -C5BF 1 -C898 1 -C899 1 -CBA2 1 -C39F 1 -CA82 1 -C6A9 1 -CA83 1 -C6AA 1 -CA85 1 -CA86 1 -54 1 -74 1 -C5A2 1 -C5A3 1 -C5A4 1 -C5A5 1 -C89A 1 -C89B 1 -CDAD 1 -CAA8 1 -C6BE 1 -CAA6 1 -CAA7 1 -C5A6 1 -C5A7 1 -C6AB 1 -C6AC 1 -C6AD 1 -C6AE 1 -CA88 1 -C8B6 1 -CA87 1 -55 1 -75 1 -C399 1 -C39A 1 -C39B 1 -C39C 1 -C3B9 1 -C3BA 1 -C3BB 1 -C3BC 1 -C5A8 1 -C5A9 1 -C5AA 1 -C5AB 1 -C5AC 1 -C5AD 1 -C5AE 1 -C5AF 1 -C5B0 1 -C5B1 1 -C5B2 1 -C5B3 1 -C6AF 1 -C6B0 1 -C793 1 -C794 1 -C795 1 -C796 1 -C797 1 -C798 1 -C799 1 -C79A 1 -C79B 1 -C79C 1 -C894 1 -C895 1 -C896 1 -C897 1 -CDA7 1 -CA89 1 -C9A5 1 -CAAE 1 -CAAF 1 -C69C 1 -C9AF 1 -C9B0 1 -C6B1 1 -CA8A 1 -56 1 -76 1 -CDAE 1 -C6B2 1 -CA8B 1 -CA8C 1 -57 1 -77 1 -C5B4 1 -C5B5 1 -CAB7 1 -CA8D 1 -58 1 -78 1 -CBA3 1 -CDAF 1 -59 1 -79 1 -C39D 1 -C3BD 1 -C3BF 1 -C5B6 1 -C5B7 1 -C5B8 1 -C8B2 1 -C8B3 1 -CAB8 1 -CA8F 1 -C6B3 1 -C6B4 1 -5A 1 -7A 1 -C5B9 1 -C5BA 1 -C5BB 1 -C5BC 1 -C5BD 1 -C5BE 1 -C68D 1 -C6B5 1 -C6B6 1 -C8A4 1 -C8A5 1 -CA90 1 -CA91 1 -C6B7 1 -C7AE 1 -C7AF 1 -CA92 1 -C6B8 1 -C6B9 1 -C6BA 1 -CA93 1 -C89C 1 -C89D 1 -C39E 1 -C3BE 1 -C6BF 1 -C7B7 1 -C6BB 1 -C6A7 1 -C6A8 1 -C6BC 1 -C6BD 1 -C684 1 -C685 1 -CA94 1 -CB80 1 -CABC 1 -C589 1 -CBAE 1 -CABE 1 -CA95 1 -CBA4 1 -CABF 1 -CB81 1 -CAA1 1 -CAA2 1 -CA96 1 -C780 1 -C781 1 -C782 1 -C783 1 -CA97 1 -CA98 1 -CAAC 1 -CAAD 1 -CE86 1 -CE91 1 -CEAC 1 -CEB1 1 -CE92 1 -CEB2 1 -CF90 1 -CE93 1 -CEB3 1 -CE94 1 -CEB4 1 -CE88 1 -CE95 1 -CEAD 1 -CEB5 1 -CFB5 1 -CF9C 1 -CF9D 1 -CF9A 1 -CF9B 1 -CE96 1 -CEB6 1 -CE89 1 -CE97 1 -CEAE 1 -CEB7 1 -CE98 1 -CEB8 1 -CF91 1 -CFB4 1 -CDBA 1 -CE8A 1 -CE90 1 -CE99 1 -CEAA 1 -CEAF 1 -CEB9 1 -CF8A 1 -CFB3 1 -CE9A 1 -CEBA 1 -CFB0 1 -CF97 1 -CE9B 1 -CEBB 1 -C2B5 1 -CE9C 1 -CEBC 1 -CE9D 1 -CEBD 1 -CE9E 1 -CEBE 1 -CE8C 1 -CE9F 1 -CEBF 1 -CF8C 1 -CEA0 1 -CF80 1 -CF96 1 -CF9E 1 -CF9F 1 -CF98 1 -CF99 1 -CEA1 1 -CF81 1 -CFB1 1 -CEA3 1 -CF82 1 -CF83 1 -CFB2 1 -CFB9 1 -CEA4 1 -CF84 1 -CE8E 1 -CEA5 1 -CEAB 1 -CEB0 1 -CF85 1 -CF8B 1 -CF8D 1 -CF92 1 -CF93 1 -CF94 1 -CEA6 1 -CF86 1 -CF95 1 -CEA7 1 -CF87 1 -CEA8 1 -CF88 1 -CE8F 1 -CEA9 1 -CF89 1 -CF8E 1 -CFA0 1 -CFA1 1 -CFB7 1 -CFB8 1 -CFBA 1 -CFBB 1 -CFA2 1 -CFA3 1 -CFA4 1 -CFA5 1 -CFA6 1 -CFA7 1 -CFA8 1 -CFA9 1 -CFAA 1 -CFAB 1 -CFAC 1 -CFAD 1 -CFAE 1 -CFAF 1 -D090 1 -D0B0 1 -D390 1 -D391 1 -D392 1 -D393 1 -D398 1 -D399 1 -D39A 1 -D39B 1 -D394 1 -D395 1 -D091 1 -D0B1 1 -D092 1 -D0B2 1 -D093 1 -D0B3 1 -D290 1 -D291 1 -D292 1 -D293 1 -D294 1 -D295 1 -D094 1 -D0B4 1 -D480 1 -D481 1 -D082 1 -D192 1 -D482 1 -D483 1 -D083 1 -D193 1 -D298 1 -D299 1 -D080 1 -D081 1 -D095 1 -D0B5 1 -D190 1 -D191 1 -D396 1 -D397 1 -D084 1 -D194 1 -D096 1 -D0B6 1 -D381 1 -D382 1 -D39C 1 -D39D 1 -D296 1 -D297 1 -D097 1 -D0B7 1 -D484 1 -D485 1 -D39E 1 -D39F 1 -D085 1 -D195 1 -D3A0 1 -D3A1 1 -D486 1 -D487 1 -D08D 1 -D098 1 -D0B8 1 -D19D 1 -D3A2 1 -D3A3 1 -D28A 1 -D28B 1 -D3A4 1 -D3A5 1 -D086 1 -D196 1 -D087 1 -D197 1 -D099 1 -D0B9 1 -D088 1 -D198 1 -D09A 1 -D0BA 1 -D29A 1 -D29B 1 -D383 1 -D384 1 -D2A0 1 -D2A1 1 -D29E 1 -D29F 1 -D29C 1 -D29D 1 -D09B 1 -D0BB 1 -D385 1 -D386 1 -D089 1 -D199 1 -D488 1 -D489 1 -D09C 1 -D0BC 1 -D38D 1 -D38E 1 -D09D 1 -D0BD 1 -D389 1 -D38A 1 -D2A2 1 -D2A3 1 -D387 1 -D388 1 -D2A4 1 -D2A5 1 -D08A 1 -D19A 1 -D48A 1 -D48B 1 -D09E 1 -D0BE 1 -D3A6 1 -D3A7 1 -D3A8 1 -D3A9 1 -D3AA 1 -D3AB 1 -D09F 1 -D0BF 1 -D2A6 1 -D2A7 1 -D280 1 -D281 1 -D0A0 1 -D180 1 -D28E 1 -D28F 1 -D0A1 1 -D181 1 -D48C 1 -D48D 1 -D2AA 1 -D2AB 1 -D0A2 1 -D182 1 -D48E 1 -D48F 1 -D2AC 1 -D2AD 1 -D08B 1 -D19B 1 -D08C 1 -D19C 1 -D0A3 1 -D183 1 -D3AE 1 -D3AF 1 -D08E 1 -D19E 1 -D3B0 1 -D3B1 1 -D3B2 1 -D3B3 1 -D2AE 1 -D2AF 1 -D2B0 1 -D2B1 1 -D1B8 1 -D1B9 1 -D0A4 1 -D184 1 -D0A5 1 -D185 1 -D2B2 1 -D2B3 1 -D2BA 1 -D2BB 1 -D1A0 1 -D1A1 1 -D1BE 1 -D1BF 1 -D1BC 1 -D1BD 1 -D1BA 1 -D1BB 1 -D0A6 1 -D186 1 -D2B4 1 -D2B5 1 -D0A7 1 -D187 1 -D3B4 1 -D3B5 1 -D2B6 1 -D2B7 1 -D38B 1 -D38C 1 -D2B8 1 -D2B9 1 -D2BC 1 -D2BD 1 -D2BE 1 -D2BF 1 -D08F 1 -D19F 1 -D0A8 1 -D188 1 -D0A9 1 -D189 1 -D0AA 1 -D18A 1 -D0AB 1 -D18B 1 -D3B8 1 -D3B9 1 -D0AC 1 -D18C 1 -D28C 1 -D28D 1 -D1A2 1 -D1A3 1 -D0AD 1 -D18D 1 -D3AC 1 -D3AD 1 -D0AE 1 -D18E 1 -D0AF 1 -D18F 1 -D1A4 1 -D1A5 1 -D1A6 1 -D1A7 1 -D1AA 1 -D1AB 1 -D1A8 1 -D1A9 1 -D1AC 1 -D1AD 1 -D1AE 1 -D1AF 1 -D1B0 1 -D1B1 1 -D1B2 1 -D1B3 1 -D1B4 1 -D1B5 1 -D1B6 1 -D1B7 1 -D2A8 1 -D2A9 1 -D380 1 -D4B1 1 -D5A1 1 -D4B2 1 -D5A2 1 -D4B3 1 -D5A3 1 -D4B4 1 -D5A4 1 -D4B5 1 -D5A5 1 -D687 1 -D4B6 1 -D5A6 1 -D4B7 1 -D5A7 1 -D4B8 1 -D5A8 1 -D4B9 1 -D5A9 1 -D4BA 1 -D5AA 1 -D4BB 1 -D5AB 1 -D4BC 1 -D5AC 1 -D4BD 1 -D5AD 1 -D4BE 1 -D5AE 1 -D4BF 1 -D5AF 1 -D580 1 -D5B0 1 -D581 1 -D5B1 1 -D582 1 -D5B2 1 -D583 1 -D5B3 1 -D584 1 -D5B4 1 -D585 1 -D5B5 1 -D586 1 -D5B6 1 -D587 1 -D5B7 1 -D588 1 -D5B8 1 -D589 1 -D5B9 1 -D58A 1 -D5BA 1 -D58B 1 -D5BB 1 -D58C 1 -D5BC 1 -D58D 1 -D5BD 1 -D58E 1 -D5BE 1 -D58F 1 -D5BF 1 -D590 1 -D680 1 -D591 1 -D681 1 -D592 1 -D682 1 -D593 1 -D683 1 -D594 1 -D684 1 -D595 1 -D685 1 -D596 1 -D686 1 -D599 1 -D790 1 -D791 1 -D792 1 -D793 1 -D794 1 -D795 1 -D7B0 1 -D7B1 1 -D796 1 -D797 1 -D798 1 -D799 1 -D7B2 1 -D79A 1 -D79B 1 -D79C 1 -D79D 1 -D79E 1 -D79F 1 -D7A0 1 -D7A1 1 -D7A2 1 -D7A3 1 -D7A4 1 -D7A5 1 -D7A6 1 -D7A7 1 -D7A8 1 -D7A9 1 -D7AA 1 -D9B4 1 -DBBD 1 -D9B2 1 -D9B3 1 -D9B5 1 -D9AE 1 -D8A8 1 -D9BB 1 -D9BE 1 -DA80 1 -DA89 1 -DA8A 1 -D8AA 1 -D8AB 1 -D9B9 1 -D9BA 1 -D9BC 1 -D9BD 1 -D9BF 1 -D8AC 1 -DA83 1 -DA84 1 -DA86 1 -DABF 1 -DA87 1 -D8AD 1 -D8AE 1 -DA81 1 -DA82 1 -DA85 1 -D8AF 1 -D8B0 1 -DA88 1 -DA8B 1 -DA8C 1 -DA8D 1 -DA8E 1 -DA8F 1 -DA90 1 -DBAE 1 -D8B1 1 -D8B2 1 -DA91 1 -DA92 1 -DA93 1 -DA94 1 -DA95 1 -DA96 1 -DA97 1 -DA98 1 -DA99 1 -DBAF 1 -D8B3 1 -D8B4 1 -DA9A 1 -DA9B 1 -DA9C 1 -DBBA 1 -D8B5 1 -D8B6 1 -DA9D 1 -DA9E 1 -DBBB 1 -D8B7 1 -D8B8 1 -DA9F 1 -D8B9 1 -D8BA 1 -DAA0 1 -DBBC 1 -D981 1 -DAA1 1 -DAA2 1 -DAA3 1 -DAA4 1 -DAA5 1 -DAA6 1 -D9AF 1 -D982 1 -DAA7 1 -DAA9 1 -D983 1 -DAA8 1 -DAAA 1 -DAAB 1 -DAAC 1 -DAAD 1 -DAAE 1 -DAAF 1 -DAB0 1 -DAB1 1 -DAB2 1 -DAB3 1 -DAB4 1 -D984 1 -DAB5 1 -DAB6 1 -DAB7 1 -DAB8 1 -D985 1 -DBBE 1 -D986 1 -DABA 1 -DABB 1 -DABC 1 -DABD 1 -DAB9 1 -DABE 1 -DB81 1 -DB82 1 -DB83 1 -DBBF 1 -DB95 1 -D988 1 -DBA5 1 -D9B6 1 -D987 1 -DB84 1 -D8A9 1 -DB85 1 -DB80 1 -DB86 1 -DB87 1 -DB8C 1 -D9B7 1 -D989 1 -DB88 1 -D98A 1 -DB89 1 -DB8A 1 -DB8B 1 -DB8F 1 -DBA6 1 -D9B8 1 -DB8D 1 -DB8E 1 -DB90 1 -DB91 1 -DB92 1 -DB93 1 -DC90 1 -DC92 1 -DCAD 1 -DC93 1 -DC94 1 -DCAE 1 -DC96 1 -DC95 1 -DCAF 1 -DC97 1 -DC98 1 -DC99 1 -DD8D 1 -DC9A 1 -DC9B 1 -DC9C 1 -DC9D 1 -DC9E 1 -DC9F 1 -DD8E 1 -DCA0 1 -DCA1 1 -DCA2 1 -DCA3 1 -DCA4 1 -DCA5 1 -DCA6 1 -DCA7 1 -DD8F 1 -DCA8 1 -DCA9 1 -DCAA 1 -DCAB 1 -DCAC 1 -DE80 1 -DE99 1 -DE9A 1 -DE81 1 -DE82 1 -DE83 1 -DE9C 1 -DE84 1 -DE85 1 -DE86 1 -DE87 1 -DEA2 1 -DEA3 1 -DE88 1 -DEA5 1 -DE89 1 -DE8A 1 -DE8B 1 -DE9B 1 -DE8C 1 -DE98 1 -DEA0 1 -DEA1 1 -DE8D 1 -DE8E 1 -DEA4 1 -DE8F 1 -DE90 1 -DE9D 1 -DE9E 1 -DE9F 1 -DE91 1 -DE92 1 -DE93 1 -DE94 1 -DE95 1 -DE96 1 -DE97 1 -DEB1 1 -DEA6 1 -DEA7 1 -DEA8 1 -DEA9 1 -DEAA 1 -DEAB 1 -DEAC 1 -DEAD 1 -DEAE 1 -DEAF 1 -DEB0 1 -E4B880 1 -E4B881 1 -E4B882 1 -E4B883 1 -E4B884 1 -E4B885 1 -E4B886 1 -E4B887 1 -E4B888 1 -E4B889 1 -E4B88A 1 -E4B88B 1 -E4B88C 1 -E4B88D 1 -E4B88E 1 -E4B88F 1 -E4B890 1 -E4B891 1 -E4B892 1 -E4B893 1 -E4B894 1 -E4B895 1 -E4B896 1 -E4B897 1 -E4B898 1 -E4B899 1 -E4B89A 1 -E4B89B 1 -E4B89C 1 -E4B89D 1 -E4B89E 1 -E4B89F 1 -E4B8A0 1 -E4B8A1 1 -E4B8A2 1 -E4B8A3 1 -E4B8A4 1 -E4B8A5 1 -E4B8A6 1 -E4B8A7 1 -E4B8A8 1 -E4B8A9 1 -E4B8AA 1 -E4B8AB 1 -E4B8AC 1 -E4B8AD 1 -E4B8AE 1 -E4B8AF 1 -E4B8B0 1 -E4B8B1 1 -E4B8B2 1 -E4B8B3 1 -E4B8B4 1 -E4B8B5 1 -E4B8B6 1 -E4B8B7 1 -E4B8B8 1 -E4B8B9 1 -E4B8BA 1 -E4B8BB 1 -E4B8BC 1 -E4B8BD 1 -E4B8BE 1 -E4B8BF 1 -E4B980 1 -E4B981 1 -E4B982 1 -E4B983 1 -E4B984 1 -E4B985 1 -E4B986 1 -E4B987 1 -E4B988 1 -E4B989 1 -E4B98A 1 -E4B98B 1 -E4B98C 1 -E4B98D 1 -E4B98E 1 -E4B98F 1 -E4B990 1 -E4B991 1 -E4B992 1 -E4B993 1 -E4B994 1 -E4B995 1 -E4B996 1 -E4B997 1 -E4B998 1 -E4B999 1 -E4B99A 1 -E4B99B 1 -E4B99C 1 -E4B99D 1 -E4B99E 1 -E4B99F 1 -E4B9A0 1 -E4B9A1 1 -E4B9A2 1 -E4B9A3 1 -E4B9A4 1 -E4B9A5 1 -E4B9A6 1 -E4B9A7 1 -E4B9A8 1 -E4B9A9 1 -E4B9AA 1 -E4B9AB 1 -E4B9AC 1 -E4B9AD 1 -E4B9AE 1 -E4B9AF 1 -E4B9B0 1 -E4B9B1 1 -E4B9B2 1 -E4B9B3 1 -E4B9B4 1 -E4B9B5 1 -E4B9B6 1 -E4B9B7 1 -E4B9B8 1 -E4B9B9 1 -E4B9BA 1 -E4B9BB 1 -E4B9BC 1 -E4B9BD 1 -E4B9BE 1 -E4B9BF 1 -E4BA80 1 -E4BA81 1 -E4BA82 1 -E4BA83 1 -E4BA84 1 -E4BA85 1 -E4BA86 1 -E4BA87 1 -E4BA88 1 -E4BA89 1 -E4BA8A 1 -E4BA8B 1 -E4BA8C 1 -E4BA8D 1 -E4BA8E 1 -E4BA8F 1 -E4BA90 1 -E4BA91 1 -E4BA92 1 -E4BA93 1 -E4BA94 1 -E4BA95 1 -E4BA96 1 -E4BA97 1 -E4BA98 1 -E4BA99 1 -E4BA9A 1 -E4BA9B 1 -E4BA9C 1 -E4BA9D 1 -E4BA9E 1 -E4BA9F 1 -E4BAA0 1 -E4BAA1 1 -E4BAA2 1 -E4BAA3 1 -E4BAA4 1 -E4BAA5 1 -E4BAA6 1 -E4BAA7 1 -E4BAA8 1 -E4BAA9 1 -E4BAAA 1 -E4BAAB 1 -E4BAAC 1 -E4BAAD 1 -E4BAAE 1 -E4BAAF 1 -E4BAB0 1 -E4BAB1 1 -E4BAB2 1 -E4BAB3 1 -E4BAB4 1 -E4BAB5 1 -E4BAB6 1 -E4BAB7 1 -E4BAB8 1 -E4BAB9 1 -E4BABA 1 -E4BABB 1 -E4BABC 1 -E4BABD 1 -E4BABE 1 -E4BABF 1 -E4BB80 1 -E4BB81 1 -E4BB82 1 -E4BB83 1 -E4BB84 1 -E4BB85 1 -E4BB86 1 -E4BB87 1 -E4BB88 1 -E4BB89 1 -E4BB8A 1 -E4BB8B 1 -E4BB8C 1 -E4BB8D 1 -E4BB8E 1 -E4BB8F 1 -E4BB90 1 -E4BB91 1 -E4BB92 1 -E4BB93 1 -E4BB94 1 -E4BB95 1 -E4BB96 1 -E4BB97 1 -E4BB98 1 -E4BB99 1 -E4BB9A 1 -E4BB9B 1 -E4BB9C 1 -E4BB9D 1 -E4BB9E 1 -E4BB9F 1 -E4BBA0 1 -E4BBA1 1 -E4BBA2 1 -E4BBA3 1 -E4BBA4 1 -E4BBA5 1 -E4BBA6 1 -E4BBA7 1 -E4BBA8 1 -E4BBA9 1 -E4BBAA 1 -E4BBAB 1 -E4BBAC 1 -E4BBAD 1 -E4BBAE 1 -E4BBAF 1 -E4BBB0 1 -E4BBB1 1 -E4BBB2 1 -E4BBB3 1 -E4BBB4 1 -E4BBB5 1 -E4BBB6 1 -E4BBB7 1 -E4BBB8 1 -E4BBB9 1 -E4BBBA 1 -E4BBBB 1 -E4BBBC 1 -E4BBBD 1 -E4BBBE 1 -E4BBBF 1 -E4BC80 1 -E4BC81 1 -E4BC82 1 -E4BC83 1 -E4BC84 1 -E4BC85 1 -E4BC86 1 -E4BC87 1 -E4BC88 1 -E4BC89 1 -E4BC8A 1 -E4BC8B 1 -E4BC8C 1 -E4BC8D 1 -E4BC8E 1 -E4BC8F 1 -E4BC90 1 -E4BC91 1 -E4BC92 1 -E4BC93 1 -E4BC94 1 -E4BC95 1 -E4BC96 1 -E4BC97 1 -E4BC98 1 -E4BC99 1 -E4BC9A 1 -E4BC9B 1 -E4BC9C 1 -E4BC9D 1 -E4BC9E 1 -E4BC9F 1 -E4BCA0 1 -E4BCA1 1 -E4BCA2 1 -E4BCA3 1 -E4BCA4 1 -E4BCA5 1 -E4BCA6 1 -E4BCA7 1 -E4BCA8 1 -E4BCA9 1 -E4BCAA 1 -E4BCAB 1 -E4BCAC 1 -E4BCAD 1 -E4BCAE 1 -E4BCAF 1 -E4BCB0 1 -E4BCB1 1 -E4BCB2 1 -E4BCB3 1 -E4BCB4 1 -E4BCB5 1 -E4BCB6 1 -E4BCB7 1 -E4BCB8 1 -E4BCB9 1 -E4BCBA 1 -E4BCBB 1 -E4BCBC 1 -E4BCBD 1 -E4BCBE 1 -E4BCBF 1 -E4BD80 1 -E4BD81 1 -E4BD82 1 -E4BD83 1 -E4BD84 1 -E4BD85 1 -E4BD86 1 -E4BD87 1 -E4BD88 1 -E4BD89 1 -E4BD8A 1 -E4BD8B 1 -E4BD8C 1 -E4BD8D 1 -E4BD8E 1 -E4BD8F 1 -E4BD90 1 -E4BD91 1 -E4BD92 1 -E4BD93 1 -E4BD94 1 -E4BD95 1 -E4BD96 1 -E4BD97 1 -E4BD98 1 -E4BD99 1 -E4BD9A 1 -E4BD9B 1 -E4BD9C 1 -E4BD9D 1 -E4BD9E 1 -E4BD9F 1 -E4BDA0 1 -E4BDA1 1 -E4BDA2 1 -E4BDA3 1 -E4BDA4 1 -E4BDA5 1 -E4BDA6 1 -E4BDA7 1 -E4BDA8 1 -E4BDA9 1 -E4BDAA 1 -E4BDAB 1 -E4BDAC 1 -E4BDAD 1 -E4BDAE 1 -E4BDAF 1 -E4BDB0 1 -E4BDB1 1 -E4BDB2 1 -E4BDB3 1 -E4BDB4 1 -E4BDB5 1 -E4BDB6 1 -E4BDB7 1 -E4BDB8 1 -E4BDB9 1 -E4BDBA 1 -E4BDBB 1 -E4BDBC 1 -E4BDBD 1 -E4BDBE 1 -E4BDBF 1 -E4BE80 1 -E4BE81 1 -E4BE82 1 -E4BE83 1 -E4BE84 1 -E4BE85 1 -E4BE86 1 -E4BE87 1 -E4BE88 1 -E4BE89 1 -E4BE8A 1 -E4BE8B 1 -E4BE8C 1 -E4BE8D 1 -E4BE8E 1 -E4BE8F 1 -E4BE90 1 -E4BE91 1 -E4BE92 1 -E4BE93 1 -E4BE94 1 -E4BE95 1 -E4BE96 1 -E4BE97 1 -E4BE98 1 -E4BE99 1 -E4BE9A 1 -E4BE9B 1 -E4BE9C 1 -E4BE9D 1 -E4BE9E 1 -E4BE9F 1 -E4BEA0 1 -E4BEA1 1 -E4BEA2 1 -E4BEA3 1 -E4BEA4 1 -E4BEA5 1 -E4BEA6 1 -E4BEA7 1 -E4BEA8 1 -E4BEA9 1 -E4BEAA 1 -E4BEAB 1 -E4BEAC 1 -E4BEAD 1 -E4BEAE 1 -E4BEAF 1 -E4BEB0 1 -E4BEB1 1 -E4BEB2 1 -E4BEB3 1 -E4BEB4 1 -E4BEB5 1 -E4BEB6 1 -E4BEB7 1 -E4BEB8 1 -E4BEB9 1 -E4BEBA 1 -E4BEBB 1 -E4BEBC 1 -E4BEBD 1 -E4BEBE 1 -E4BEBF 1 -E4BF80 1 -E4BF81 1 -E4BF82 1 -E4BF83 1 -E4BF84 1 -E4BF85 1 -E4BF86 1 -E4BF87 1 -E4BF88 1 -E4BF89 1 -E4BF8A 1 -E4BF8B 1 -E4BF8C 1 -E4BF8D 1 -E4BF8E 1 -E4BF8F 1 -E4BF90 1 -E4BF91 1 -E4BF92 1 -E4BF93 1 -E4BF94 1 -E4BF95 1 -E4BF96 1 -E4BF97 1 -E4BF98 1 -E4BF99 1 -E4BF9A 1 -E4BF9B 1 -E4BF9C 1 -E4BF9D 1 -E4BF9E 1 -E4BF9F 1 -E4BFA0 1 -E4BFA1 1 -E4BFA2 1 -E4BFA3 1 -E4BFA4 1 -E4BFA5 1 -E4BFA6 1 -E4BFA7 1 -E4BFA8 1 -E4BFA9 1 -E4BFAA 1 -E4BFAB 1 -E4BFAC 1 -E4BFAD 1 -E4BFAE 1 -E4BFAF 1 -E4BFB0 1 -E4BFB1 1 -E4BFB2 1 -E4BFB3 1 -E4BFB4 1 -E4BFB5 1 -E4BFB6 1 -E4BFB7 1 -E4BFB8 1 -E4BFB9 1 -E4BFBA 1 -E4BFBB 1 -E4BFBC 1 -E4BFBD 1 -E4BFBE 1 -E4BFBF 1 -C8B7 1 -C8B8 1 -C8B9 1 -C8BA 1 -C8BB 1 -C8BC 1 -C8BD 1 -C8BE 1 -C8BF 1 -C980 1 -C981 1 -C982 1 -C983 1 -C984 1 -C985 1 -C986 1 -C987 1 -C988 1 -C989 1 -C98A 1 -C98B 1 -C98C 1 -C98D 1 -C98E 1 -C98F 1 -CD98 1 -CD99 1 -CD9A 1 -CD9B 1 -CD9C 1 -CDB0 1 -CDB1 1 -CDB2 1 -CDB3 1 -CDB6 1 -CDB7 1 -CDB8 1 -CDB9 1 -CDBB 1 -CDBC 1 -CDBD 1 -CDBF 1 -CE80 1 -CE81 1 -CE82 1 -CE83 1 -CE8B 1 -CE8D 1 -CEA2 1 -CF8F 1 -CFBC 1 -CFBD 1 -CFBE 1 -CFBF 1 -D287 1 -D38F 1 -D3B6 1 -D3B7 1 -D3BA 1 -D3BB 1 -D3BC 1 -D3BD 1 -D3BE 1 -D3BF 1 -D490 1 -D491 1 -D492 1 -D493 1 -D494 1 -D495 1 -D496 1 -D497 1 -D498 1 -D499 1 -D49A 1 -D49B 1 -D49C 1 -D49D 1 -D49E 1 -D49F 1 -D4A0 1 -D4A1 1 -D4A2 1 -D4A3 1 -D4A4 1 -D4A5 1 -D4A6 1 -D4A7 1 -D4A8 1 -D4A9 1 -D4AA 1 -D4AB 1 -D4AC 1 -D4AD 1 -D4AE 1 -D4AF 1 -D4B0 1 -D597 1 -D598 1 -D5A0 1 -D688 1 -D68B 1 -D68C 1 -D68D 1 -D68E 1 -D68F 1 -D690 1 -D6A2 1 -D6BA 1 -D785 1 -D786 1 -D787 1 -D788 1 -D789 1 -D78A 1 -D78B 1 -D78C 1 -D78D 1 -D78E 1 -D78F 1 -D7AB 1 -D7AC 1 -D7AD 1 -D7AE 1 -D7AF 1 -D7B5 1 -D7B6 1 -D7B7 1 -D7B8 1 -D7B9 1 -D7BA 1 -D7BB 1 -D7BC 1 -D7BD 1 -D7BE 1 -D7BF 1 -D884 1 -D885 1 -D886 1 -D887 1 -D888 1 -D889 1 -D88A 1 -D88B 1 -D896 1 -D897 1 -D898 1 -D899 1 -D89A 1 -D89C 1 -D89D 1 -D89E 1 -D8A0 1 -D8BB 1 -D8BC 1 -D8BD 1 -D8BE 1 -D8BF 1 -D999 1 -D99A 1 -D99B 1 -D99C 1 -D99D 1 -D99E 1 -D99F 1 -DC8E 1 -DD8B 1 -DD8C 1 -DD90 1 -DD91 1 -DD92 1 -DD93 1 -DD94 1 -DD95 1 -DD96 1 -DD97 1 -DD98 1 -DD99 1 -DD9A 1 -DD9B 1 -DD9C 1 -DD9D 1 -DD9E 1 -DD9F 1 -DDA0 1 -DDA1 1 -DDA2 1 -DDA3 1 -DDA4 1 -DDA5 1 -DDA6 1 -DDA7 1 -DDA8 1 -DDA9 1 -DDAA 1 -DDAB 1 -DDAC 1 -DDAD 1 -DDAE 1 -DDAF 1 -DDB0 1 -DDB1 1 -DDB2 1 -DDB3 1 -DDB4 1 -DDB5 1 -DDB6 1 -DDB7 1 -DDB8 1 -DDB9 1 -DDBA 1 -DDBB 1 -DDBC 1 -DDBD 1 -DDBE 1 -DDBF 1 -DEB2 1 -DEB3 1 -DEB4 1 -DEB5 1 -DEB6 1 -DEB7 1 -DEB8 1 -DEB9 1 -DEBA 1 -DEBB 1 -DEBC 1 -DEBD 1 -DEBE 1 -DEBF 1 -DF80 1 -DF81 1 -DF82 1 -DF83 1 -DF84 1 -DF85 1 -DF86 1 -DF87 1 -DF88 1 -DF89 1 -DF8A 1 -DF8B 1 -DF8C 1 -DF8D 1 -DF8E 1 -DF8F 1 -DF90 1 -DF91 1 -DF92 1 -DF93 1 -DF94 1 -DF95 1 -DF96 1 -DF97 1 -DF98 1 -DF99 1 -DF9A 1 -DF9B 1 -DF9C 1 -DF9D 1 -DF9E 1 -DF9F 1 -DFA0 1 -DFA1 1 -DFA2 1 -DFA3 1 -DFA4 1 -DFA5 1 -DFA6 1 -DFA7 1 -DFA8 1 -DFA9 1 -DFAA 1 -DFAB 1 -DFAC 1 -DFAD 1 -DFAE 1 -DFAF 1 -DFB0 1 -DFB1 1 -DFB2 1 -DFB3 1 -DFB4 1 -DFB5 1 -DFB6 1 -DFB7 1 -DFB8 1 -DFB9 1 -DFBA 1 -DFBB 1 -DFBC 1 -DFBD 1 -DFBE 1 -DFBF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_polish_ci) ENGINE=NDB CHARACTER SET utf8 COLLATE utf8_polish_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_polish_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -C285 1 -7F 1 -C280 1 -C281 1 -C282 1 -C283 1 -C284 1 -C286 1 -C287 1 -C288 1 -C289 1 -C28A 1 -C28B 1 -C28C 1 -C28D 1 -C28E 1 -C28F 1 -C290 1 -C291 1 -C292 1 -C293 1 -C294 1 -C295 1 -C296 1 -C297 1 -C298 1 -C299 1 -C29A 1 -C29B 1 -C29C 1 -C29D 1 -C29E 1 -C29F 1 -C2A0 1 -CC80 1 -CC81 1 -CC82 1 -CC83 1 -CC84 1 -CC85 1 -CC86 1 -CC87 1 -CC88 1 -CC89 1 -CC8A 1 -CC8B 1 -CC8C 1 -CC8D 1 -CC8E 1 -CC8F 1 -CC90 1 -CC91 1 -CC92 1 -CC93 1 -CC94 1 -CC95 1 -CC96 1 -CC97 1 -CC98 1 -CC99 1 -CC9A 1 -CC9B 1 -CC9C 1 -CC9D 1 -CC9E 1 -CC9F 1 -CCA0 1 -CCA1 1 -CCA2 1 -CCA3 1 -CCA4 1 -CCA5 1 -CCA6 1 -CCA7 1 -CCA8 1 -CCA9 1 -CCAA 1 -CCAB 1 -CCAC 1 -CCAD 1 -CCAE 1 -CCAF 1 -CCB0 1 -CCB1 1 -CCB2 1 -CCB3 1 -CCB4 1 -CCB5 1 -CCB6 1 -CCB7 1 -CCB8 1 -CCB9 1 -CCBA 1 -CCBB 1 -CCBC 1 -CCBD 1 -CCBE 1 -CCBF 1 -CD80 1 -CD81 1 -CD82 1 -CD83 1 -CD84 1 -CD85 1 -CD86 1 -CD87 1 -CD88 1 -CD89 1 -CD8A 1 -CD8B 1 -CD8C 1 -CD8D 1 -CD8E 1 -CD8F 1 -CD90 1 -CD91 1 -CD92 1 -CD93 1 -CD94 1 -CD95 1 -CD96 1 -CD97 1 -CD9D 1 -CD9E 1 -CD9F 1 -CDA0 1 -CDA1 1 -CDA2 1 -D283 1 -D284 1 -D285 1 -D286 1 -D288 1 -D289 1 -D691 1 -D692 1 -D693 1 -D694 1 -D695 1 -D696 1 -D697 1 -D698 1 -D699 1 -D69A 1 -D69B 1 -D69C 1 -D69D 1 -D69E 1 -D69F 1 -D6A0 1 -D6A1 1 -D6A3 1 -D6A4 1 -D6A5 1 -D6A6 1 -D6A7 1 -D6A8 1 -D6A9 1 -D6AA 1 -D6AB 1 -D6AC 1 -D6AD 1 -D6AE 1 -D6AF 1 -D6B0 1 -D6B1 1 -D6B2 1 -D6B3 1 -D6B4 1 -D6B5 1 -D6B6 1 -D6B7 1 -D6B8 1 -D6B9 1 -D6BB 1 -D6BC 1 -D6BD 1 -D6BF 1 -D781 1 -D782 1 -D784 1 -D880 1 -D881 1 -D882 1 -D883 1 -D890 1 -D891 1 -D892 1 -D893 1 -D894 1 -D895 1 -D98B 1 -D98C 1 -D98D 1 -D98E 1 -D98F 1 -D990 1 -D991 1 -D992 1 -D993 1 -D994 1 -D995 1 -D996 1 -D997 1 -D998 1 -D9B0 1 -DB96 1 -DB97 1 -DB98 1 -DB99 1 -DB9A 1 -DB9B 1 -DB9C 1 -DB9D 1 -DB9E 1 -DB9F 1 -DBA0 1 -DBA1 1 -DBA2 1 -DBA3 1 -DBA4 1 -DBA7 1 -DBA8 1 -DBAA 1 -DBAB 1 -DBAC 1 -DBAD 1 -DC8F 1 -DC91 1 -DCB0 1 -DCB1 1 -DCB2 1 -DCB3 1 -DCB4 1 -DCB5 1 -DCB6 1 -DCB7 1 -DCB8 1 -DCB9 1 -DCBA 1 -DCBB 1 -DCBC 1 -DCBD 1 -DCBE 1 -DCBF 1 -DD80 1 -DD81 1 -DD82 1 -DD83 1 -DD84 1 -DD85 1 -DD86 1 -DD87 1 -DD88 1 -DD89 1 -DD8A 1 -D980 1 -60 1 -C2B4 1 -CE84 1 -CB9C 1 -5E 1 -C2AF 1 -CB98 1 -CB99 1 -C2A8 1 -CE85 1 -CB9A 1 -CB9D 1 -C2B8 1 -CB9B 1 -5F 1 -C2AD 1 -2D 1 -D68A 1 -2C 1 -D59D 1 -D88C 1 -D88D 1 -D9AB 1 -D9AC 1 -3B 1 -CDBE 1 -D89B 1 -3A 1 -D689 1 -DC83 1 -DC84 1 -DC85 1 -DC86 1 -DC87 1 -DC88 1 -21 1 -C2A1 1 -D59C 1 -3F 1 -C2BF 1 -D59E 1 -D89F 1 -DC89 1 -2E 1 -DB94 1 -DC81 1 -DC82 1 -C2B7 1 -CE87 1 -DC80 1 -27 1 -22 1 -C2AB 1 -C2BB 1 -28 1 -29 1 -5B 1 -7B 1 -7D 1 -C2A7 1 -C2B6 1 -C2A9 1 -C2AE 1 -40 1 -2A 1 -D9AD 1 -2F 1 -26 1 -23 1 -25 1 -D9AA 1 -D59A 1 -D59B 1 -D59F 1 -D6BE 1 -D780 1 -D783 1 -D7B3 1 -D7B4 1 -DC8A 1 -DC8B 1 -DC8C 1 -DC8D 1 -CAB9 1 -CDB4 1 -CDB5 1 -CABA 1 -CB82 1 -CB83 1 -CB84 1 -CB85 1 -CB86 1 -CB87 1 -CB88 1 -CB89 1 -CB8A 1 -CB8B 1 -CB8C 1 -CB8D 1 -CB8E 1 -CB8F 1 -CB92 1 -CB93 1 -CB94 1 -CB95 1 -CB96 1 -CB97 1 -CB9E 1 -CB9F 1 -CBA5 1 -CBA6 1 -CBA7 1 -CBA8 1 -CBA9 1 -CBAA 1 -CBAB 1 -CBAC 1 -CBAD 1 -CBAF 1 -CBB0 1 -CBB1 1 -CBB2 1 -CBB3 1 -CBB4 1 -CBB5 1 -CBB6 1 -CBB7 1 -CBB8 1 -CBB9 1 -CBBA 1 -CBBB 1 -CBBC 1 -CBBD 1 -CBBE 1 -CBBF 1 -C2B0 1 -D282 1 -D88E 1 -D88F 1 -DBA9 1 -CFB6 1 -2B 1 -C2B1 1 -C3B7 1 -C397 1 -3C 1 -3D 1 -3E 1 -C2AC 1 -7C 1 -C2A6 1 -7E 1 -CB90 1 -CB91 1 -C2A4 1 -C2A2 1 -24 1 -C2A3 1 -C2A5 1 -30 1 -D9A0 1 -DBB0 1 -31 1 -C2B9 1 -D9A1 1 -DBB1 1 -C2BD 1 -C2BC 1 -32 1 -C2B2 1 -D9A2 1 -DBB2 1 -33 1 -C2B3 1 -D9A3 1 -DBB3 1 -C2BE 1 -34 1 -D9A4 1 -DBB4 1 -35 1 -D9A5 1 -DBB5 1 -36 1 -D9A6 1 -DBB6 1 -37 1 -D9A7 1 -DBB7 1 -38 1 -D9A8 1 -DBB8 1 -39 1 -D9A9 1 -DBB9 1 -41 1 -61 1 -C2AA 1 -C380 1 -C381 1 -C382 1 -C383 1 -C384 1 -C385 1 -C3A0 1 -C3A1 1 -C3A2 1 -C3A3 1 -C3A4 1 -C3A5 1 -C480 1 -C481 1 -C482 1 -C483 1 -C78D 1 -C78E 1 -C79E 1 -C79F 1 -C7A0 1 -C7A1 1 -C7BA 1 -C7BB 1 -C880 1 -C881 1 -C882 1 -C883 1 -C8A6 1 -C8A7 1 -CDA3 1 -C484 1 -C485 1 -C386 1 -C3A6 1 -C7A2 1 -C7A3 1 -C7BC 1 -C7BD 1 -C990 1 -C991 1 -C992 1 -42 1 -62 1 -CA99 1 -C680 1 -C681 1 -C993 1 -C682 1 -C683 1 -43 1 -63 1 -C387 1 -C3A7 1 -C488 1 -C489 1 -C48A 1 -C48B 1 -C48C 1 -C48D 1 -CDA8 1 -C486 1 -C487 1 -C687 1 -C688 1 -C995 1 -44 1 -64 1 -C48E 1 -C48F 1 -CDA9 1 -C784 1 -C785 1 -C786 1 -C7B1 1 -C7B2 1 -C7B3 1 -CAA3 1 -CAA5 1 -CAA4 1 -C490 1 -C491 1 -C689 1 -C996 1 -C68A 1 -C997 1 -C68B 1 -C68C 1 -C8A1 1 -C390 1 -C3B0 1 -45 1 -65 1 -C388 1 -C389 1 -C38A 1 -C38B 1 -C3A8 1 -C3A9 1 -C3AA 1 -C3AB 1 -C492 1 -C493 1 -C494 1 -C495 1 -C496 1 -C497 1 -C49A 1 -C49B 1 -C884 1 -C885 1 -C886 1 -C887 1 -C8A8 1 -C8A9 1 -CDA4 1 -C498 1 -C499 1 -C68E 1 -C79D 1 -C68F 1 -C999 1 -C690 1 -C99B 1 -C998 1 -C99A 1 -C99C 1 -C99D 1 -C99E 1 -CA9A 1 -C9A4 1 -46 1 -66 1 -CAA9 1 -C691 1 -C692 1 -47 1 -67 1 -C49C 1 -C49D 1 -C49E 1 -C49F 1 -C4A0 1 -C4A1 1 -C4A2 1 -C4A3 1 -C7A6 1 -C7A7 1 -C7B4 1 -C7B5 1 -C9A1 1 -C9A2 1 -C7A4 1 -C7A5 1 -C693 1 -C9A0 1 -CA9B 1 -C694 1 -C9A3 1 -CBA0 1 -C6A2 1 -C6A3 1 -48 1 -68 1 -C4A4 1 -C4A5 1 -C89E 1 -C89F 1 -CAB0 1 -CDAA 1 -CA9C 1 -C695 1 -C7B6 1 -C4A6 1 -C4A7 1 -C9A6 1 -CAB1 1 -C9A7 1 -CABB 1 -CABD 1 -49 1 -69 1 -C38C 1 -C38D 1 -C38E 1 -C38F 1 -C3AC 1 -C3AD 1 -C3AE 1 -C3AF 1 -C4A8 1 -C4A9 1 -C4AA 1 -C4AB 1 -C4AC 1 -C4AD 1 -C4AE 1 -C4AF 1 -C4B0 1 -C78F 1 -C790 1 -C888 1 -C889 1 -C88A 1 -C88B 1 -CDA5 1 -C4B2 1 -C4B3 1 -C4B1 1 -C9AA 1 -C697 1 -C9A8 1 -C696 1 -C9A9 1 -4A 1 -6A 1 -C4B4 1 -C4B5 1 -C7B0 1 -CAB2 1 -CA9D 1 -C99F 1 -CA84 1 -4B 1 -6B 1 -C4B6 1 -C4B7 1 -C7A8 1 -C7A9 1 -C698 1 -C699 1 -CA9E 1 -4C 1 -6C 1 -C4B9 1 -C4BA 1 -C4BB 1 -C4BC 1 -C4BD 1 -C4BE 1 -CBA1 1 -C4BF 1 -C580 1 -C787 1 -C788 1 -C789 1 -CAAA 1 -CAAB 1 -C581 1 -C582 1 -CA9F 1 -C69A 1 -C9AB 1 -C9AC 1 -C9AD 1 -C8B4 1 -C9AE 1 -C69B 1 -CA8E 1 -4D 1 -6D 1 -CDAB 1 -C9B1 1 -4E 1 -6E 1 -C391 1 -C3B1 1 -C585 1 -C586 1 -C587 1 -C588 1 -C7B8 1 -C7B9 1 -C78A 1 -C78B 1 -C78C 1 -C583 1 -C584 1 -C9B4 1 -C69D 1 -C9B2 1 -C69E 1 -C8A0 1 -C9B3 1 -C8B5 1 -C58A 1 -C58B 1 -4F 1 -6F 1 -C2BA 1 -C392 1 -C394 1 -C395 1 -C396 1 -C3B2 1 -C3B4 1 -C3B5 1 -C3B6 1 -C58C 1 -C58D 1 -C58E 1 -C58F 1 -C590 1 -C591 1 -C6A0 1 -C6A1 1 -C791 1 -C792 1 -C7AA 1 -C7AB 1 -C7AC 1 -C7AD 1 -C88C 1 -C88D 1 -C88E 1 -C88F 1 -C8AA 1 -C8AB 1 -C8AC 1 -C8AD 1 -C8AE 1 -C8AF 1 -C8B0 1 -C8B1 1 -CDA6 1 -C592 1 -C593 1 -C393 1 -C3B3 1 -C9B6 1 -C398 1 -C3B8 1 -C7BE 1 -C7BF 1 -C686 1 -C994 1 -C69F 1 -C9B5 1 -C9B7 1 -C8A2 1 -C8A3 1 -50 1 -70 1 -C6A4 1 -C6A5 1 -C9B8 1 -51 1 -71 1 -CAA0 1 -C4B8 1 -52 1 -72 1 -C594 1 -C595 1 -C596 1 -C597 1 -C598 1 -C599 1 -C890 1 -C891 1 -C892 1 -C893 1 -CAB3 1 -CDAC 1 -C6A6 1 -CA80 1 -C9B9 1 -CAB4 1 -C9BA 1 -C9BB 1 -CAB5 1 -C9BC 1 -C9BD 1 -C9BE 1 -C9BF 1 -CA81 1 -CAB6 1 -53 1 -73 1 -C59C 1 -C59D 1 -C59E 1 -C59F 1 -C5A0 1 -C5A1 1 -C5BF 1 -C898 1 -C899 1 -CBA2 1 -C39F 1 -C59A 1 -C59B 1 -CA82 1 -C6A9 1 -CA83 1 -C6AA 1 -CA85 1 -CA86 1 -54 1 -74 1 -C5A2 1 -C5A3 1 -C5A4 1 -C5A5 1 -C89A 1 -C89B 1 -CDAD 1 -CAA8 1 -C6BE 1 -CAA6 1 -CAA7 1 -C5A6 1 -C5A7 1 -C6AB 1 -C6AC 1 -C6AD 1 -C6AE 1 -CA88 1 -C8B6 1 -CA87 1 -55 1 -75 1 -C399 1 -C39A 1 -C39B 1 -C39C 1 -C3B9 1 -C3BA 1 -C3BB 1 -C3BC 1 -C5A8 1 -C5A9 1 -C5AA 1 -C5AB 1 -C5AC 1 -C5AD 1 -C5AE 1 -C5AF 1 -C5B0 1 -C5B1 1 -C5B2 1 -C5B3 1 -C6AF 1 -C6B0 1 -C793 1 -C794 1 -C795 1 -C796 1 -C797 1 -C798 1 -C799 1 -C79A 1 -C79B 1 -C79C 1 -C894 1 -C895 1 -C896 1 -C897 1 -CDA7 1 -CA89 1 -C9A5 1 -CAAE 1 -CAAF 1 -C69C 1 -C9AF 1 -C9B0 1 -C6B1 1 -CA8A 1 -56 1 -76 1 -CDAE 1 -C6B2 1 -CA8B 1 -CA8C 1 -57 1 -77 1 -C5B4 1 -C5B5 1 -CAB7 1 -CA8D 1 -58 1 -78 1 -CBA3 1 -CDAF 1 -59 1 -79 1 -C39D 1 -C3BD 1 -C3BF 1 -C5B6 1 -C5B7 1 -C5B8 1 -C8B2 1 -C8B3 1 -CAB8 1 -CA8F 1 -C6B3 1 -C6B4 1 -5A 1 -7A 1 -C5BD 1 -C5BE 1 -C68D 1 -C5B9 1 -C5BA 1 -C5BB 1 -C5BC 1 -C6B5 1 -C6B6 1 -C8A4 1 -C8A5 1 -CA90 1 -CA91 1 -C6B7 1 -C7AE 1 -C7AF 1 -CA92 1 -C6B8 1 -C6B9 1 -C6BA 1 -CA93 1 -C89C 1 -C89D 1 -C39E 1 -C3BE 1 -C6BF 1 -C7B7 1 -C6BB 1 -C6A7 1 -C6A8 1 -C6BC 1 -C6BD 1 -C684 1 -C685 1 -CA94 1 -CB80 1 -CABC 1 -C589 1 -CBAE 1 -CABE 1 -CA95 1 -CBA4 1 -CABF 1 -CB81 1 -CAA1 1 -CAA2 1 -CA96 1 -C780 1 -C781 1 -C782 1 -C783 1 -CA97 1 -CA98 1 -CAAC 1 -CAAD 1 -CE86 1 -CE91 1 -CEAC 1 -CEB1 1 -CE92 1 -CEB2 1 -CF90 1 -CE93 1 -CEB3 1 -CE94 1 -CEB4 1 -CE88 1 -CE95 1 -CEAD 1 -CEB5 1 -CFB5 1 -CF9C 1 -CF9D 1 -CF9A 1 -CF9B 1 -CE96 1 -CEB6 1 -CE89 1 -CE97 1 -CEAE 1 -CEB7 1 -CE98 1 -CEB8 1 -CF91 1 -CFB4 1 -CDBA 1 -CE8A 1 -CE90 1 -CE99 1 -CEAA 1 -CEAF 1 -CEB9 1 -CF8A 1 -CFB3 1 -CE9A 1 -CEBA 1 -CFB0 1 -CF97 1 -CE9B 1 -CEBB 1 -C2B5 1 -CE9C 1 -CEBC 1 -CE9D 1 -CEBD 1 -CE9E 1 -CEBE 1 -CE8C 1 -CE9F 1 -CEBF 1 -CF8C 1 -CEA0 1 -CF80 1 -CF96 1 -CF9E 1 -CF9F 1 -CF98 1 -CF99 1 -CEA1 1 -CF81 1 -CFB1 1 -CEA3 1 -CF82 1 -CF83 1 -CFB2 1 -CFB9 1 -CEA4 1 -CF84 1 -CE8E 1 -CEA5 1 -CEAB 1 -CEB0 1 -CF85 1 -CF8B 1 -CF8D 1 -CF92 1 -CF93 1 -CF94 1 -CEA6 1 -CF86 1 -CF95 1 -CEA7 1 -CF87 1 -CEA8 1 -CF88 1 -CE8F 1 -CEA9 1 -CF89 1 -CF8E 1 -CFA0 1 -CFA1 1 -CFB7 1 -CFB8 1 -CFBA 1 -CFBB 1 -CFA2 1 -CFA3 1 -CFA4 1 -CFA5 1 -CFA6 1 -CFA7 1 -CFA8 1 -CFA9 1 -CFAA 1 -CFAB 1 -CFAC 1 -CFAD 1 -CFAE 1 -CFAF 1 -D090 1 -D0B0 1 -D390 1 -D391 1 -D392 1 -D393 1 -D398 1 -D399 1 -D39A 1 -D39B 1 -D394 1 -D395 1 -D091 1 -D0B1 1 -D092 1 -D0B2 1 -D093 1 -D0B3 1 -D290 1 -D291 1 -D292 1 -D293 1 -D294 1 -D295 1 -D094 1 -D0B4 1 -D480 1 -D481 1 -D082 1 -D192 1 -D482 1 -D483 1 -D083 1 -D193 1 -D298 1 -D299 1 -D080 1 -D081 1 -D095 1 -D0B5 1 -D190 1 -D191 1 -D396 1 -D397 1 -D084 1 -D194 1 -D096 1 -D0B6 1 -D381 1 -D382 1 -D39C 1 -D39D 1 -D296 1 -D297 1 -D097 1 -D0B7 1 -D484 1 -D485 1 -D39E 1 -D39F 1 -D085 1 -D195 1 -D3A0 1 -D3A1 1 -D486 1 -D487 1 -D08D 1 -D098 1 -D0B8 1 -D19D 1 -D3A2 1 -D3A3 1 -D28A 1 -D28B 1 -D3A4 1 -D3A5 1 -D086 1 -D196 1 -D087 1 -D197 1 -D099 1 -D0B9 1 -D088 1 -D198 1 -D09A 1 -D0BA 1 -D29A 1 -D29B 1 -D383 1 -D384 1 -D2A0 1 -D2A1 1 -D29E 1 -D29F 1 -D29C 1 -D29D 1 -D09B 1 -D0BB 1 -D385 1 -D386 1 -D089 1 -D199 1 -D488 1 -D489 1 -D09C 1 -D0BC 1 -D38D 1 -D38E 1 -D09D 1 -D0BD 1 -D389 1 -D38A 1 -D2A2 1 -D2A3 1 -D387 1 -D388 1 -D2A4 1 -D2A5 1 -D08A 1 -D19A 1 -D48A 1 -D48B 1 -D09E 1 -D0BE 1 -D3A6 1 -D3A7 1 -D3A8 1 -D3A9 1 -D3AA 1 -D3AB 1 -D09F 1 -D0BF 1 -D2A6 1 -D2A7 1 -D280 1 -D281 1 -D0A0 1 -D180 1 -D28E 1 -D28F 1 -D0A1 1 -D181 1 -D48C 1 -D48D 1 -D2AA 1 -D2AB 1 -D0A2 1 -D182 1 -D48E 1 -D48F 1 -D2AC 1 -D2AD 1 -D08B 1 -D19B 1 -D08C 1 -D19C 1 -D0A3 1 -D183 1 -D3AE 1 -D3AF 1 -D08E 1 -D19E 1 -D3B0 1 -D3B1 1 -D3B2 1 -D3B3 1 -D2AE 1 -D2AF 1 -D2B0 1 -D2B1 1 -D1B8 1 -D1B9 1 -D0A4 1 -D184 1 -D0A5 1 -D185 1 -D2B2 1 -D2B3 1 -D2BA 1 -D2BB 1 -D1A0 1 -D1A1 1 -D1BE 1 -D1BF 1 -D1BC 1 -D1BD 1 -D1BA 1 -D1BB 1 -D0A6 1 -D186 1 -D2B4 1 -D2B5 1 -D0A7 1 -D187 1 -D3B4 1 -D3B5 1 -D2B6 1 -D2B7 1 -D38B 1 -D38C 1 -D2B8 1 -D2B9 1 -D2BC 1 -D2BD 1 -D2BE 1 -D2BF 1 -D08F 1 -D19F 1 -D0A8 1 -D188 1 -D0A9 1 -D189 1 -D0AA 1 -D18A 1 -D0AB 1 -D18B 1 -D3B8 1 -D3B9 1 -D0AC 1 -D18C 1 -D28C 1 -D28D 1 -D1A2 1 -D1A3 1 -D0AD 1 -D18D 1 -D3AC 1 -D3AD 1 -D0AE 1 -D18E 1 -D0AF 1 -D18F 1 -D1A4 1 -D1A5 1 -D1A6 1 -D1A7 1 -D1AA 1 -D1AB 1 -D1A8 1 -D1A9 1 -D1AC 1 -D1AD 1 -D1AE 1 -D1AF 1 -D1B0 1 -D1B1 1 -D1B2 1 -D1B3 1 -D1B4 1 -D1B5 1 -D1B6 1 -D1B7 1 -D2A8 1 -D2A9 1 -D380 1 -D4B1 1 -D5A1 1 -D4B2 1 -D5A2 1 -D4B3 1 -D5A3 1 -D4B4 1 -D5A4 1 -D4B5 1 -D5A5 1 -D687 1 -D4B6 1 -D5A6 1 -D4B7 1 -D5A7 1 -D4B8 1 -D5A8 1 -D4B9 1 -D5A9 1 -D4BA 1 -D5AA 1 -D4BB 1 -D5AB 1 -D4BC 1 -D5AC 1 -D4BD 1 -D5AD 1 -D4BE 1 -D5AE 1 -D4BF 1 -D5AF 1 -D580 1 -D5B0 1 -D581 1 -D5B1 1 -D582 1 -D5B2 1 -D583 1 -D5B3 1 -D584 1 -D5B4 1 -D585 1 -D5B5 1 -D586 1 -D5B6 1 -D587 1 -D5B7 1 -D588 1 -D5B8 1 -D589 1 -D5B9 1 -D58A 1 -D5BA 1 -D58B 1 -D5BB 1 -D58C 1 -D5BC 1 -D58D 1 -D5BD 1 -D58E 1 -D5BE 1 -D58F 1 -D5BF 1 -D590 1 -D680 1 -D591 1 -D681 1 -D592 1 -D682 1 -D593 1 -D683 1 -D594 1 -D684 1 -D595 1 -D685 1 -D596 1 -D686 1 -D599 1 -D790 1 -D791 1 -D792 1 -D793 1 -D794 1 -D795 1 -D7B0 1 -D7B1 1 -D796 1 -D797 1 -D798 1 -D799 1 -D7B2 1 -D79A 1 -D79B 1 -D79C 1 -D79D 1 -D79E 1 -D79F 1 -D7A0 1 -D7A1 1 -D7A2 1 -D7A3 1 -D7A4 1 -D7A5 1 -D7A6 1 -D7A7 1 -D7A8 1 -D7A9 1 -D7AA 1 -D8A1 1 -D9B4 1 -DBBD 1 -D8A2 1 -D8A3 1 -D9B2 1 -D9B1 1 -D8A4 1 -D8A5 1 -D9B3 1 -D8A6 1 -D8A7 1 -D9B5 1 -D9AE 1 -D8A8 1 -D9BB 1 -D9BE 1 -DA80 1 -D8A9 1 -D8AA 1 -D8AB 1 -D9B9 1 -D9BA 1 -D9BC 1 -D9BD 1 -D9BF 1 -D8AC 1 -DA83 1 -DA84 1 -DA86 1 -DABF 1 -DA87 1 -D8AD 1 -D8AE 1 -DA81 1 -DA82 1 -DA85 1 -D8AF 1 -D8B0 1 -DA88 1 -DA89 1 -DA8A 1 -DA8B 1 -DA8C 1 -DA8D 1 -DA8E 1 -DA8F 1 -DA90 1 -DBAE 1 -D8B1 1 -D8B2 1 -DA91 1 -DA92 1 -DA93 1 -DA94 1 -DA95 1 -DA96 1 -DA97 1 -DA98 1 -DA99 1 -DBAF 1 -D8B3 1 -D8B4 1 -DA9A 1 -DA9B 1 -DA9C 1 -DBBA 1 -D8B5 1 -D8B6 1 -DA9D 1 -DA9E 1 -DBBB 1 -D8B7 1 -D8B8 1 -DA9F 1 -D8B9 1 -D8BA 1 -DAA0 1 -DBBC 1 -D981 1 -DAA1 1 -DAA2 1 -DAA3 1 -DAA4 1 -DAA5 1 -DAA6 1 -D9AF 1 -D982 1 -DAA7 1 -DAA8 1 -D983 1 -DAA9 1 -DAAA 1 -DAAB 1 -DAAC 1 -DAAD 1 -DAAE 1 -DAAF 1 -DAB0 1 -DAB1 1 -DAB2 1 -DAB3 1 -DAB4 1 -D984 1 -DAB5 1 -DAB6 1 -DAB7 1 -DAB8 1 -D985 1 -DBBE 1 -D986 1 -DABA 1 -DABB 1 -DABC 1 -DABD 1 -DAB9 1 -D987 1 -DABE 1 -DB81 1 -DB82 1 -DB83 1 -DBBF 1 -DB80 1 -DB95 1 -D988 1 -DBA5 1 -D9B6 1 -DB84 1 -DB85 1 -DB86 1 -DB87 1 -D9B7 1 -DB88 1 -DB89 1 -DB8A 1 -DB8B 1 -DB8F 1 -D989 1 -D98A 1 -DBA6 1 -D9B8 1 -DB8C 1 -DB8D 1 -DB8E 1 -DB90 1 -DB91 1 -DB92 1 -DB93 1 -DC90 1 -DC92 1 -DCAD 1 -DC93 1 -DC94 1 -DCAE 1 -DC96 1 -DC95 1 -DCAF 1 -DC97 1 -DC98 1 -DC99 1 -DD8D 1 -DC9A 1 -DC9B 1 -DC9C 1 -DC9D 1 -DC9E 1 -DC9F 1 -DD8E 1 -DCA0 1 -DCA1 1 -DCA2 1 -DCA3 1 -DCA4 1 -DCA5 1 -DCA6 1 -DCA7 1 -DD8F 1 -DCA8 1 -DCA9 1 -DCAA 1 -DCAB 1 -DCAC 1 -DE80 1 -DE99 1 -DE9A 1 -DE81 1 -DE82 1 -DE83 1 -DE9C 1 -DE84 1 -DE85 1 -DE86 1 -DE87 1 -DEA2 1 -DEA3 1 -DE88 1 -DEA5 1 -DE89 1 -DE8A 1 -DE8B 1 -DE9B 1 -DE8C 1 -DE98 1 -DEA0 1 -DEA1 1 -DE8D 1 -DE8E 1 -DEA4 1 -DE8F 1 -DE90 1 -DE9D 1 -DE9E 1 -DE9F 1 -DE91 1 -DE92 1 -DE93 1 -DE94 1 -DE95 1 -DE96 1 -DE97 1 -DEB1 1 -DEA6 1 -DEA7 1 -DEA8 1 -DEA9 1 -DEAA 1 -DEAB 1 -DEAC 1 -DEAD 1 -DEAE 1 -DEAF 1 -DEB0 1 -E4B880 1 -E4B881 1 -E4B882 1 -E4B883 1 -E4B884 1 -E4B885 1 -E4B886 1 -E4B887 1 -E4B888 1 -E4B889 1 -E4B88A 1 -E4B88B 1 -E4B88C 1 -E4B88D 1 -E4B88E 1 -E4B88F 1 -E4B890 1 -E4B891 1 -E4B892 1 -E4B893 1 -E4B894 1 -E4B895 1 -E4B896 1 -E4B897 1 -E4B898 1 -E4B899 1 -E4B89A 1 -E4B89B 1 -E4B89C 1 -E4B89D 1 -E4B89E 1 -E4B89F 1 -E4B8A0 1 -E4B8A1 1 -E4B8A2 1 -E4B8A3 1 -E4B8A4 1 -E4B8A5 1 -E4B8A6 1 -E4B8A7 1 -E4B8A8 1 -E4B8A9 1 -E4B8AA 1 -E4B8AB 1 -E4B8AC 1 -E4B8AD 1 -E4B8AE 1 -E4B8AF 1 -E4B8B0 1 -E4B8B1 1 -E4B8B2 1 -E4B8B3 1 -E4B8B4 1 -E4B8B5 1 -E4B8B6 1 -E4B8B7 1 -E4B8B8 1 -E4B8B9 1 -E4B8BA 1 -E4B8BB 1 -E4B8BC 1 -E4B8BD 1 -E4B8BE 1 -E4B8BF 1 -E4B980 1 -E4B981 1 -E4B982 1 -E4B983 1 -E4B984 1 -E4B985 1 -E4B986 1 -E4B987 1 -E4B988 1 -E4B989 1 -E4B98A 1 -E4B98B 1 -E4B98C 1 -E4B98D 1 -E4B98E 1 -E4B98F 1 -E4B990 1 -E4B991 1 -E4B992 1 -E4B993 1 -E4B994 1 -E4B995 1 -E4B996 1 -E4B997 1 -E4B998 1 -E4B999 1 -E4B99A 1 -E4B99B 1 -E4B99C 1 -E4B99D 1 -E4B99E 1 -E4B99F 1 -E4B9A0 1 -E4B9A1 1 -E4B9A2 1 -E4B9A3 1 -E4B9A4 1 -E4B9A5 1 -E4B9A6 1 -E4B9A7 1 -E4B9A8 1 -E4B9A9 1 -E4B9AA 1 -E4B9AB 1 -E4B9AC 1 -E4B9AD 1 -E4B9AE 1 -E4B9AF 1 -E4B9B0 1 -E4B9B1 1 -E4B9B2 1 -E4B9B3 1 -E4B9B4 1 -E4B9B5 1 -E4B9B6 1 -E4B9B7 1 -E4B9B8 1 -E4B9B9 1 -E4B9BA 1 -E4B9BB 1 -E4B9BC 1 -E4B9BD 1 -E4B9BE 1 -E4B9BF 1 -E4BA80 1 -E4BA81 1 -E4BA82 1 -E4BA83 1 -E4BA84 1 -E4BA85 1 -E4BA86 1 -E4BA87 1 -E4BA88 1 -E4BA89 1 -E4BA8A 1 -E4BA8B 1 -E4BA8C 1 -E4BA8D 1 -E4BA8E 1 -E4BA8F 1 -E4BA90 1 -E4BA91 1 -E4BA92 1 -E4BA93 1 -E4BA94 1 -E4BA95 1 -E4BA96 1 -E4BA97 1 -E4BA98 1 -E4BA99 1 -E4BA9A 1 -E4BA9B 1 -E4BA9C 1 -E4BA9D 1 -E4BA9E 1 -E4BA9F 1 -E4BAA0 1 -E4BAA1 1 -E4BAA2 1 -E4BAA3 1 -E4BAA4 1 -E4BAA5 1 -E4BAA6 1 -E4BAA7 1 -E4BAA8 1 -E4BAA9 1 -E4BAAA 1 -E4BAAB 1 -E4BAAC 1 -E4BAAD 1 -E4BAAE 1 -E4BAAF 1 -E4BAB0 1 -E4BAB1 1 -E4BAB2 1 -E4BAB3 1 -E4BAB4 1 -E4BAB5 1 -E4BAB6 1 -E4BAB7 1 -E4BAB8 1 -E4BAB9 1 -E4BABA 1 -E4BABB 1 -E4BABC 1 -E4BABD 1 -E4BABE 1 -E4BABF 1 -E4BB80 1 -E4BB81 1 -E4BB82 1 -E4BB83 1 -E4BB84 1 -E4BB85 1 -E4BB86 1 -E4BB87 1 -E4BB88 1 -E4BB89 1 -E4BB8A 1 -E4BB8B 1 -E4BB8C 1 -E4BB8D 1 -E4BB8E 1 -E4BB8F 1 -E4BB90 1 -E4BB91 1 -E4BB92 1 -E4BB93 1 -E4BB94 1 -E4BB95 1 -E4BB96 1 -E4BB97 1 -E4BB98 1 -E4BB99 1 -E4BB9A 1 -E4BB9B 1 -E4BB9C 1 -E4BB9D 1 -E4BB9E 1 -E4BB9F 1 -E4BBA0 1 -E4BBA1 1 -E4BBA2 1 -E4BBA3 1 -E4BBA4 1 -E4BBA5 1 -E4BBA6 1 -E4BBA7 1 -E4BBA8 1 -E4BBA9 1 -E4BBAA 1 -E4BBAB 1 -E4BBAC 1 -E4BBAD 1 -E4BBAE 1 -E4BBAF 1 -E4BBB0 1 -E4BBB1 1 -E4BBB2 1 -E4BBB3 1 -E4BBB4 1 -E4BBB5 1 -E4BBB6 1 -E4BBB7 1 -E4BBB8 1 -E4BBB9 1 -E4BBBA 1 -E4BBBB 1 -E4BBBC 1 -E4BBBD 1 -E4BBBE 1 -E4BBBF 1 -E4BC80 1 -E4BC81 1 -E4BC82 1 -E4BC83 1 -E4BC84 1 -E4BC85 1 -E4BC86 1 -E4BC87 1 -E4BC88 1 -E4BC89 1 -E4BC8A 1 -E4BC8B 1 -E4BC8C 1 -E4BC8D 1 -E4BC8E 1 -E4BC8F 1 -E4BC90 1 -E4BC91 1 -E4BC92 1 -E4BC93 1 -E4BC94 1 -E4BC95 1 -E4BC96 1 -E4BC97 1 -E4BC98 1 -E4BC99 1 -E4BC9A 1 -E4BC9B 1 -E4BC9C 1 -E4BC9D 1 -E4BC9E 1 -E4BC9F 1 -E4BCA0 1 -E4BCA1 1 -E4BCA2 1 -E4BCA3 1 -E4BCA4 1 -E4BCA5 1 -E4BCA6 1 -E4BCA7 1 -E4BCA8 1 -E4BCA9 1 -E4BCAA 1 -E4BCAB 1 -E4BCAC 1 -E4BCAD 1 -E4BCAE 1 -E4BCAF 1 -E4BCB0 1 -E4BCB1 1 -E4BCB2 1 -E4BCB3 1 -E4BCB4 1 -E4BCB5 1 -E4BCB6 1 -E4BCB7 1 -E4BCB8 1 -E4BCB9 1 -E4BCBA 1 -E4BCBB 1 -E4BCBC 1 -E4BCBD 1 -E4BCBE 1 -E4BCBF 1 -E4BD80 1 -E4BD81 1 -E4BD82 1 -E4BD83 1 -E4BD84 1 -E4BD85 1 -E4BD86 1 -E4BD87 1 -E4BD88 1 -E4BD89 1 -E4BD8A 1 -E4BD8B 1 -E4BD8C 1 -E4BD8D 1 -E4BD8E 1 -E4BD8F 1 -E4BD90 1 -E4BD91 1 -E4BD92 1 -E4BD93 1 -E4BD94 1 -E4BD95 1 -E4BD96 1 -E4BD97 1 -E4BD98 1 -E4BD99 1 -E4BD9A 1 -E4BD9B 1 -E4BD9C 1 -E4BD9D 1 -E4BD9E 1 -E4BD9F 1 -E4BDA0 1 -E4BDA1 1 -E4BDA2 1 -E4BDA3 1 -E4BDA4 1 -E4BDA5 1 -E4BDA6 1 -E4BDA7 1 -E4BDA8 1 -E4BDA9 1 -E4BDAA 1 -E4BDAB 1 -E4BDAC 1 -E4BDAD 1 -E4BDAE 1 -E4BDAF 1 -E4BDB0 1 -E4BDB1 1 -E4BDB2 1 -E4BDB3 1 -E4BDB4 1 -E4BDB5 1 -E4BDB6 1 -E4BDB7 1 -E4BDB8 1 -E4BDB9 1 -E4BDBA 1 -E4BDBB 1 -E4BDBC 1 -E4BDBD 1 -E4BDBE 1 -E4BDBF 1 -E4BE80 1 -E4BE81 1 -E4BE82 1 -E4BE83 1 -E4BE84 1 -E4BE85 1 -E4BE86 1 -E4BE87 1 -E4BE88 1 -E4BE89 1 -E4BE8A 1 -E4BE8B 1 -E4BE8C 1 -E4BE8D 1 -E4BE8E 1 -E4BE8F 1 -E4BE90 1 -E4BE91 1 -E4BE92 1 -E4BE93 1 -E4BE94 1 -E4BE95 1 -E4BE96 1 -E4BE97 1 -E4BE98 1 -E4BE99 1 -E4BE9A 1 -E4BE9B 1 -E4BE9C 1 -E4BE9D 1 -E4BE9E 1 -E4BE9F 1 -E4BEA0 1 -E4BEA1 1 -E4BEA2 1 -E4BEA3 1 -E4BEA4 1 -E4BEA5 1 -E4BEA6 1 -E4BEA7 1 -E4BEA8 1 -E4BEA9 1 -E4BEAA 1 -E4BEAB 1 -E4BEAC 1 -E4BEAD 1 -E4BEAE 1 -E4BEAF 1 -E4BEB0 1 -E4BEB1 1 -E4BEB2 1 -E4BEB3 1 -E4BEB4 1 -E4BEB5 1 -E4BEB6 1 -E4BEB7 1 -E4BEB8 1 -E4BEB9 1 -E4BEBA 1 -E4BEBB 1 -E4BEBC 1 -E4BEBD 1 -E4BEBE 1 -E4BEBF 1 -E4BF80 1 -E4BF81 1 -E4BF82 1 -E4BF83 1 -E4BF84 1 -E4BF85 1 -E4BF86 1 -E4BF87 1 -E4BF88 1 -E4BF89 1 -E4BF8A 1 -E4BF8B 1 -E4BF8C 1 -E4BF8D 1 -E4BF8E 1 -E4BF8F 1 -E4BF90 1 -E4BF91 1 -E4BF92 1 -E4BF93 1 -E4BF94 1 -E4BF95 1 -E4BF96 1 -E4BF97 1 -E4BF98 1 -E4BF99 1 -E4BF9A 1 -E4BF9B 1 -E4BF9C 1 -E4BF9D 1 -E4BF9E 1 -E4BF9F 1 -E4BFA0 1 -E4BFA1 1 -E4BFA2 1 -E4BFA3 1 -E4BFA4 1 -E4BFA5 1 -E4BFA6 1 -E4BFA7 1 -E4BFA8 1 -E4BFA9 1 -E4BFAA 1 -E4BFAB 1 -E4BFAC 1 -E4BFAD 1 -E4BFAE 1 -E4BFAF 1 -E4BFB0 1 -E4BFB1 1 -E4BFB2 1 -E4BFB3 1 -E4BFB4 1 -E4BFB5 1 -E4BFB6 1 -E4BFB7 1 -E4BFB8 1 -E4BFB9 1 -E4BFBA 1 -E4BFBB 1 -E4BFBC 1 -E4BFBD 1 -E4BFBE 1 -E4BFBF 1 -C8B7 1 -C8B8 1 -C8B9 1 -C8BA 1 -C8BB 1 -C8BC 1 -C8BD 1 -C8BE 1 -C8BF 1 -C980 1 -C981 1 -C982 1 -C983 1 -C984 1 -C985 1 -C986 1 -C987 1 -C988 1 -C989 1 -C98A 1 -C98B 1 -C98C 1 -C98D 1 -C98E 1 -C98F 1 -CD98 1 -CD99 1 -CD9A 1 -CD9B 1 -CD9C 1 -CDB0 1 -CDB1 1 -CDB2 1 -CDB3 1 -CDB6 1 -CDB7 1 -CDB8 1 -CDB9 1 -CDBB 1 -CDBC 1 -CDBD 1 -CDBF 1 -CE80 1 -CE81 1 -CE82 1 -CE83 1 -CE8B 1 -CE8D 1 -CEA2 1 -CF8F 1 -CFBC 1 -CFBD 1 -CFBE 1 -CFBF 1 -D287 1 -D38F 1 -D3B6 1 -D3B7 1 -D3BA 1 -D3BB 1 -D3BC 1 -D3BD 1 -D3BE 1 -D3BF 1 -D490 1 -D491 1 -D492 1 -D493 1 -D494 1 -D495 1 -D496 1 -D497 1 -D498 1 -D499 1 -D49A 1 -D49B 1 -D49C 1 -D49D 1 -D49E 1 -D49F 1 -D4A0 1 -D4A1 1 -D4A2 1 -D4A3 1 -D4A4 1 -D4A5 1 -D4A6 1 -D4A7 1 -D4A8 1 -D4A9 1 -D4AA 1 -D4AB 1 -D4AC 1 -D4AD 1 -D4AE 1 -D4AF 1 -D4B0 1 -D597 1 -D598 1 -D5A0 1 -D688 1 -D68B 1 -D68C 1 -D68D 1 -D68E 1 -D68F 1 -D690 1 -D6A2 1 -D6BA 1 -D785 1 -D786 1 -D787 1 -D788 1 -D789 1 -D78A 1 -D78B 1 -D78C 1 -D78D 1 -D78E 1 -D78F 1 -D7AB 1 -D7AC 1 -D7AD 1 -D7AE 1 -D7AF 1 -D7B5 1 -D7B6 1 -D7B7 1 -D7B8 1 -D7B9 1 -D7BA 1 -D7BB 1 -D7BC 1 -D7BD 1 -D7BE 1 -D7BF 1 -D884 1 -D885 1 -D886 1 -D887 1 -D888 1 -D889 1 -D88A 1 -D88B 1 -D896 1 -D897 1 -D898 1 -D899 1 -D89A 1 -D89C 1 -D89D 1 -D89E 1 -D8A0 1 -D8BB 1 -D8BC 1 -D8BD 1 -D8BE 1 -D8BF 1 -D999 1 -D99A 1 -D99B 1 -D99C 1 -D99D 1 -D99E 1 -D99F 1 -DC8E 1 -DD8B 1 -DD8C 1 -DD90 1 -DD91 1 -DD92 1 -DD93 1 -DD94 1 -DD95 1 -DD96 1 -DD97 1 -DD98 1 -DD99 1 -DD9A 1 -DD9B 1 -DD9C 1 -DD9D 1 -DD9E 1 -DD9F 1 -DDA0 1 -DDA1 1 -DDA2 1 -DDA3 1 -DDA4 1 -DDA5 1 -DDA6 1 -DDA7 1 -DDA8 1 -DDA9 1 -DDAA 1 -DDAB 1 -DDAC 1 -DDAD 1 -DDAE 1 -DDAF 1 -DDB0 1 -DDB1 1 -DDB2 1 -DDB3 1 -DDB4 1 -DDB5 1 -DDB6 1 -DDB7 1 -DDB8 1 -DDB9 1 -DDBA 1 -DDBB 1 -DDBC 1 -DDBD 1 -DDBE 1 -DDBF 1 -DEB2 1 -DEB3 1 -DEB4 1 -DEB5 1 -DEB6 1 -DEB7 1 -DEB8 1 -DEB9 1 -DEBA 1 -DEBB 1 -DEBC 1 -DEBD 1 -DEBE 1 -DEBF 1 -DF80 1 -DF81 1 -DF82 1 -DF83 1 -DF84 1 -DF85 1 -DF86 1 -DF87 1 -DF88 1 -DF89 1 -DF8A 1 -DF8B 1 -DF8C 1 -DF8D 1 -DF8E 1 -DF8F 1 -DF90 1 -DF91 1 -DF92 1 -DF93 1 -DF94 1 -DF95 1 -DF96 1 -DF97 1 -DF98 1 -DF99 1 -DF9A 1 -DF9B 1 -DF9C 1 -DF9D 1 -DF9E 1 -DF9F 1 -DFA0 1 -DFA1 1 -DFA2 1 -DFA3 1 -DFA4 1 -DFA5 1 -DFA6 1 -DFA7 1 -DFA8 1 -DFA9 1 -DFAA 1 -DFAB 1 -DFAC 1 -DFAD 1 -DFAE 1 -DFAF 1 -DFB0 1 -DFB1 1 -DFB2 1 -DFB3 1 -DFB4 1 -DFB5 1 -DFB6 1 -DFB7 1 -DFB8 1 -DFB9 1 -DFBA 1 -DFBB 1 -DFBC 1 -DFBD 1 -DFBE 1 -DFBF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_roman_ci) ENGINE=NDB CHARACTER SET utf8 COLLATE utf8_roman_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_roman_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -C285 1 -7F 1 -C280 1 -C281 1 -C282 1 -C283 1 -C284 1 -C286 1 -C287 1 -C288 1 -C289 1 -C28A 1 -C28B 1 -C28C 1 -C28D 1 -C28E 1 -C28F 1 -C290 1 -C291 1 -C292 1 -C293 1 -C294 1 -C295 1 -C296 1 -C297 1 -C298 1 -C299 1 -C29A 1 -C29B 1 -C29C 1 -C29D 1 -C29E 1 -C29F 1 -C2A0 1 -CC80 1 -CC81 1 -CC82 1 -CC83 1 -CC84 1 -CC85 1 -CC86 1 -CC87 1 -CC88 1 -CC89 1 -CC8A 1 -CC8B 1 -CC8C 1 -CC8D 1 -CC8E 1 -CC8F 1 -CC90 1 -CC91 1 -CC92 1 -CC93 1 -CC94 1 -CC95 1 -CC96 1 -CC97 1 -CC98 1 -CC99 1 -CC9A 1 -CC9B 1 -CC9C 1 -CC9D 1 -CC9E 1 -CC9F 1 -CCA0 1 -CCA1 1 -CCA2 1 -CCA3 1 -CCA4 1 -CCA5 1 -CCA6 1 -CCA7 1 -CCA8 1 -CCA9 1 -CCAA 1 -CCAB 1 -CCAC 1 -CCAD 1 -CCAE 1 -CCAF 1 -CCB0 1 -CCB1 1 -CCB2 1 -CCB3 1 -CCB4 1 -CCB5 1 -CCB6 1 -CCB7 1 -CCB8 1 -CCB9 1 -CCBA 1 -CCBB 1 -CCBC 1 -CCBD 1 -CCBE 1 -CCBF 1 -CD80 1 -CD81 1 -CD82 1 -CD83 1 -CD84 1 -CD85 1 -CD86 1 -CD87 1 -CD88 1 -CD89 1 -CD8A 1 -CD8B 1 -CD8C 1 -CD8D 1 -CD8E 1 -CD8F 1 -CD90 1 -CD91 1 -CD92 1 -CD93 1 -CD94 1 -CD95 1 -CD96 1 -CD97 1 -CD9D 1 -CD9E 1 -CD9F 1 -CDA0 1 -CDA1 1 -CDA2 1 -D283 1 -D284 1 -D285 1 -D286 1 -D288 1 -D289 1 -D691 1 -D692 1 -D693 1 -D694 1 -D695 1 -D696 1 -D697 1 -D698 1 -D699 1 -D69A 1 -D69B 1 -D69C 1 -D69D 1 -D69E 1 -D69F 1 -D6A0 1 -D6A1 1 -D6A3 1 -D6A4 1 -D6A5 1 -D6A6 1 -D6A7 1 -D6A8 1 -D6A9 1 -D6AA 1 -D6AB 1 -D6AC 1 -D6AD 1 -D6AE 1 -D6AF 1 -D6B0 1 -D6B1 1 -D6B2 1 -D6B3 1 -D6B4 1 -D6B5 1 -D6B6 1 -D6B7 1 -D6B8 1 -D6B9 1 -D6BB 1 -D6BC 1 -D6BD 1 -D6BF 1 -D781 1 -D782 1 -D784 1 -D880 1 -D881 1 -D882 1 -D883 1 -D890 1 -D891 1 -D892 1 -D893 1 -D894 1 -D895 1 -D98B 1 -D98C 1 -D98D 1 -D98E 1 -D98F 1 -D990 1 -D991 1 -D992 1 -D993 1 -D994 1 -D995 1 -D996 1 -D997 1 -D998 1 -D9B0 1 -DB96 1 -DB97 1 -DB98 1 -DB99 1 -DB9A 1 -DB9B 1 -DB9C 1 -DB9D 1 -DB9E 1 -DB9F 1 -DBA0 1 -DBA1 1 -DBA2 1 -DBA3 1 -DBA4 1 -DBA7 1 -DBA8 1 -DBAA 1 -DBAB 1 -DBAC 1 -DBAD 1 -DC8F 1 -DC91 1 -DCB0 1 -DCB1 1 -DCB2 1 -DCB3 1 -DCB4 1 -DCB5 1 -DCB6 1 -DCB7 1 -DCB8 1 -DCB9 1 -DCBA 1 -DCBB 1 -DCBC 1 -DCBD 1 -DCBE 1 -DCBF 1 -DD80 1 -DD81 1 -DD82 1 -DD83 1 -DD84 1 -DD85 1 -DD86 1 -DD87 1 -DD88 1 -DD89 1 -DD8A 1 -D980 1 -60 1 -C2B4 1 -CE84 1 -CB9C 1 -5E 1 -C2AF 1 -CB98 1 -CB99 1 -C2A8 1 -CE85 1 -CB9A 1 -CB9D 1 -C2B8 1 -CB9B 1 -5F 1 -C2AD 1 -2D 1 -D68A 1 -2C 1 -D59D 1 -D88C 1 -D88D 1 -D9AB 1 -D9AC 1 -3B 1 -CDBE 1 -D89B 1 -3A 1 -D689 1 -DC83 1 -DC84 1 -DC85 1 -DC86 1 -DC87 1 -DC88 1 -21 1 -C2A1 1 -D59C 1 -3F 1 -C2BF 1 -D59E 1 -D89F 1 -DC89 1 -2E 1 -DB94 1 -DC81 1 -DC82 1 -C2B7 1 -CE87 1 -DC80 1 -27 1 -22 1 -C2AB 1 -C2BB 1 -28 1 -29 1 -5B 1 -7B 1 -7D 1 -C2A7 1 -C2B6 1 -C2A9 1 -C2AE 1 -40 1 -2A 1 -D9AD 1 -2F 1 -26 1 -23 1 -25 1 -D9AA 1 -D59A 1 -D59B 1 -D59F 1 -D6BE 1 -D780 1 -D783 1 -D7B3 1 -D7B4 1 -DC8A 1 -DC8B 1 -DC8C 1 -DC8D 1 -CAB9 1 -CDB4 1 -CDB5 1 -CABA 1 -CB82 1 -CB83 1 -CB84 1 -CB85 1 -CB86 1 -CB87 1 -CB88 1 -CB89 1 -CB8A 1 -CB8B 1 -CB8C 1 -CB8D 1 -CB8E 1 -CB8F 1 -CB92 1 -CB93 1 -CB94 1 -CB95 1 -CB96 1 -CB97 1 -CB9E 1 -CB9F 1 -CBA5 1 -CBA6 1 -CBA7 1 -CBA8 1 -CBA9 1 -CBAA 1 -CBAB 1 -CBAC 1 -CBAD 1 -CBAF 1 -CBB0 1 -CBB1 1 -CBB2 1 -CBB3 1 -CBB4 1 -CBB5 1 -CBB6 1 -CBB7 1 -CBB8 1 -CBB9 1 -CBBA 1 -CBBB 1 -CBBC 1 -CBBD 1 -CBBE 1 -CBBF 1 -C2B0 1 -D282 1 -D88E 1 -D88F 1 -DBA9 1 -CFB6 1 -2B 1 -C2B1 1 -C3B7 1 -C397 1 -3C 1 -3D 1 -3E 1 -C2AC 1 -7C 1 -C2A6 1 -7E 1 -CB90 1 -CB91 1 -C2A4 1 -C2A2 1 -24 1 -C2A3 1 -C2A5 1 -30 1 -D9A0 1 -DBB0 1 -31 1 -C2B9 1 -D9A1 1 -DBB1 1 -C2BD 1 -C2BC 1 -32 1 -C2B2 1 -D9A2 1 -DBB2 1 -33 1 -C2B3 1 -D9A3 1 -DBB3 1 -C2BE 1 -34 1 -D9A4 1 -DBB4 1 -35 1 -D9A5 1 -DBB5 1 -36 1 -D9A6 1 -DBB6 1 -37 1 -D9A7 1 -DBB7 1 -38 1 -D9A8 1 -DBB8 1 -39 1 -D9A9 1 -DBB9 1 -41 1 -61 1 -C2AA 1 -C380 1 -C381 1 -C382 1 -C383 1 -C384 1 -C385 1 -C3A0 1 -C3A1 1 -C3A2 1 -C3A3 1 -C3A4 1 -C3A5 1 -C480 1 -C481 1 -C482 1 -C483 1 -C484 1 -C485 1 -C78D 1 -C78E 1 -C79E 1 -C79F 1 -C7A0 1 -C7A1 1 -C7BA 1 -C7BB 1 -C880 1 -C881 1 -C882 1 -C883 1 -C8A6 1 -C8A7 1 -CDA3 1 -C386 1 -C3A6 1 -C7A2 1 -C7A3 1 -C7BC 1 -C7BD 1 -C990 1 -C991 1 -C992 1 -42 1 -62 1 -CA99 1 -C680 1 -C681 1 -C993 1 -C682 1 -C683 1 -43 1 -63 1 -C387 1 -C3A7 1 -C486 1 -C487 1 -C488 1 -C489 1 -C48A 1 -C48B 1 -C48C 1 -C48D 1 -CDA8 1 -C687 1 -C688 1 -C995 1 -44 1 -64 1 -C48E 1 -C48F 1 -CDA9 1 -C784 1 -C785 1 -C786 1 -C7B1 1 -C7B2 1 -C7B3 1 -CAA3 1 -CAA5 1 -CAA4 1 -C490 1 -C491 1 -C689 1 -C996 1 -C68A 1 -C997 1 -C68B 1 -C68C 1 -C8A1 1 -C390 1 -C3B0 1 -45 1 -65 1 -C388 1 -C389 1 -C38A 1 -C38B 1 -C3A8 1 -C3A9 1 -C3AA 1 -C3AB 1 -C492 1 -C493 1 -C494 1 -C495 1 -C496 1 -C497 1 -C498 1 -C499 1 -C49A 1 -C49B 1 -C884 1 -C885 1 -C886 1 -C887 1 -C8A8 1 -C8A9 1 -CDA4 1 -C68E 1 -C79D 1 -C68F 1 -C999 1 -C690 1 -C99B 1 -C998 1 -C99A 1 -C99C 1 -C99D 1 -C99E 1 -CA9A 1 -C9A4 1 -46 1 -66 1 -CAA9 1 -C691 1 -C692 1 -47 1 -67 1 -C49C 1 -C49D 1 -C49E 1 -C49F 1 -C4A0 1 -C4A1 1 -C4A2 1 -C4A3 1 -C7A6 1 -C7A7 1 -C7B4 1 -C7B5 1 -C9A1 1 -C9A2 1 -C7A4 1 -C7A5 1 -C693 1 -C9A0 1 -CA9B 1 -C694 1 -C9A3 1 -CBA0 1 -C6A2 1 -C6A3 1 -48 1 -68 1 -C4A4 1 -C4A5 1 -C89E 1 -C89F 1 -CAB0 1 -CDAA 1 -CA9C 1 -C695 1 -C7B6 1 -C4A6 1 -C4A7 1 -C9A6 1 -CAB1 1 -C9A7 1 -CABB 1 -CABD 1 -49 1 -4A 1 -69 1 -6A 1 -C38C 1 -C38D 1 -C38E 1 -C38F 1 -C3AC 1 -C3AD 1 -C3AE 1 -C3AF 1 -C4A8 1 -C4A9 1 -C4AA 1 -C4AB 1 -C4AC 1 -C4AD 1 -C4AE 1 -C4AF 1 -C4B0 1 -C78F 1 -C790 1 -C888 1 -C889 1 -C88A 1 -C88B 1 -CDA5 1 -C4B2 1 -C4B3 1 -C4B1 1 -C9AA 1 -C697 1 -C9A8 1 -C696 1 -C9A9 1 -C4B4 1 -C4B5 1 -C7B0 1 -CAB2 1 -CA9D 1 -C99F 1 -CA84 1 -4B 1 -6B 1 -C4B6 1 -C4B7 1 -C7A8 1 -C7A9 1 -C698 1 -C699 1 -CA9E 1 -4C 1 -6C 1 -C4B9 1 -C4BA 1 -C4BB 1 -C4BC 1 -C4BD 1 -C4BE 1 -CBA1 1 -C4BF 1 -C580 1 -C787 1 -C788 1 -C789 1 -CAAA 1 -CAAB 1 -CA9F 1 -C581 1 -C582 1 -C69A 1 -C9AB 1 -C9AC 1 -C9AD 1 -C8B4 1 -C9AE 1 -C69B 1 -CA8E 1 -4D 1 -6D 1 -CDAB 1 -C9B1 1 -4E 1 -6E 1 -C391 1 -C3B1 1 -C583 1 -C584 1 -C585 1 -C586 1 -C587 1 -C588 1 -C7B8 1 -C7B9 1 -C78A 1 -C78B 1 -C78C 1 -C9B4 1 -C69D 1 -C9B2 1 -C69E 1 -C8A0 1 -C9B3 1 -C8B5 1 -C58A 1 -C58B 1 -4F 1 -6F 1 -C2BA 1 -C392 1 -C393 1 -C394 1 -C395 1 -C396 1 -C3B2 1 -C3B3 1 -C3B4 1 -C3B5 1 -C3B6 1 -C58C 1 -C58D 1 -C58E 1 -C58F 1 -C590 1 -C591 1 -C6A0 1 -C6A1 1 -C791 1 -C792 1 -C7AA 1 -C7AB 1 -C7AC 1 -C7AD 1 -C88C 1 -C88D 1 -C88E 1 -C88F 1 -C8AA 1 -C8AB 1 -C8AC 1 -C8AD 1 -C8AE 1 -C8AF 1 -C8B0 1 -C8B1 1 -CDA6 1 -C592 1 -C593 1 -C9B6 1 -C398 1 -C3B8 1 -C7BE 1 -C7BF 1 -C686 1 -C994 1 -C69F 1 -C9B5 1 -C9B7 1 -C8A2 1 -C8A3 1 -50 1 -70 1 -C6A4 1 -C6A5 1 -C9B8 1 -51 1 -71 1 -CAA0 1 -C4B8 1 -52 1 -72 1 -C594 1 -C595 1 -C596 1 -C597 1 -C598 1 -C599 1 -C890 1 -C891 1 -C892 1 -C893 1 -CAB3 1 -CDAC 1 -C6A6 1 -CA80 1 -C9B9 1 -CAB4 1 -C9BA 1 -C9BB 1 -CAB5 1 -C9BC 1 -C9BD 1 -C9BE 1 -C9BF 1 -CA81 1 -CAB6 1 -53 1 -73 1 -C59A 1 -C59B 1 -C59C 1 -C59D 1 -C59E 1 -C59F 1 -C5A0 1 -C5A1 1 -C5BF 1 -C898 1 -C899 1 -CBA2 1 -C39F 1 -CA82 1 -C6A9 1 -CA83 1 -C6AA 1 -CA85 1 -CA86 1 -54 1 -74 1 -C5A2 1 -C5A3 1 -C5A4 1 -C5A5 1 -C89A 1 -C89B 1 -CDAD 1 -CAA8 1 -C6BE 1 -CAA6 1 -CAA7 1 -C5A6 1 -C5A7 1 -C6AB 1 -C6AC 1 -C6AD 1 -C6AE 1 -CA88 1 -C8B6 1 -CA87 1 -C399 1 -C39A 1 -C39B 1 -C39C 1 -C3B9 1 -C3BA 1 -C3BB 1 -C3BC 1 -C5A8 1 -C5A9 1 -C5AA 1 -C5AB 1 -C5AC 1 -C5AD 1 -C5AE 1 -C5AF 1 -C5B0 1 -C5B1 1 -C5B2 1 -C5B3 1 -C6AF 1 -C6B0 1 -C793 1 -C794 1 -C795 1 -C796 1 -C797 1 -C798 1 -C799 1 -C79A 1 -C79B 1 -C79C 1 -C894 1 -C895 1 -C896 1 -C897 1 -CDA7 1 -CA89 1 -C9A5 1 -CAAE 1 -CAAF 1 -C69C 1 -C9AF 1 -C9B0 1 -C6B1 1 -CA8A 1 -55 1 -56 1 -75 1 -76 1 -CDAE 1 -C6B2 1 -CA8B 1 -CA8C 1 -57 1 -77 1 -C5B4 1 -C5B5 1 -CAB7 1 -CA8D 1 -58 1 -78 1 -CBA3 1 -CDAF 1 -59 1 -79 1 -C39D 1 -C3BD 1 -C3BF 1 -C5B6 1 -C5B7 1 -C5B8 1 -C8B2 1 -C8B3 1 -CAB8 1 -CA8F 1 -C6B3 1 -C6B4 1 -5A 1 -7A 1 -C5B9 1 -C5BA 1 -C5BB 1 -C5BC 1 -C5BD 1 -C5BE 1 -C68D 1 -C6B5 1 -C6B6 1 -C8A4 1 -C8A5 1 -CA90 1 -CA91 1 -C6B7 1 -C7AE 1 -C7AF 1 -CA92 1 -C6B8 1 -C6B9 1 -C6BA 1 -CA93 1 -C89C 1 -C89D 1 -C39E 1 -C3BE 1 -C6BF 1 -C7B7 1 -C6BB 1 -C6A7 1 -C6A8 1 -C6BC 1 -C6BD 1 -C684 1 -C685 1 -CA94 1 -CB80 1 -CABC 1 -C589 1 -CBAE 1 -CABE 1 -CA95 1 -CBA4 1 -CABF 1 -CB81 1 -CAA1 1 -CAA2 1 -CA96 1 -C780 1 -C781 1 -C782 1 -C783 1 -CA97 1 -CA98 1 -CAAC 1 -CAAD 1 -CE86 1 -CE91 1 -CEAC 1 -CEB1 1 -CE92 1 -CEB2 1 -CF90 1 -CE93 1 -CEB3 1 -CE94 1 -CEB4 1 -CE88 1 -CE95 1 -CEAD 1 -CEB5 1 -CFB5 1 -CF9C 1 -CF9D 1 -CF9A 1 -CF9B 1 -CE96 1 -CEB6 1 -CE89 1 -CE97 1 -CEAE 1 -CEB7 1 -CE98 1 -CEB8 1 -CF91 1 -CFB4 1 -CDBA 1 -CE8A 1 -CE90 1 -CE99 1 -CEAA 1 -CEAF 1 -CEB9 1 -CF8A 1 -CFB3 1 -CE9A 1 -CEBA 1 -CFB0 1 -CF97 1 -CE9B 1 -CEBB 1 -C2B5 1 -CE9C 1 -CEBC 1 -CE9D 1 -CEBD 1 -CE9E 1 -CEBE 1 -CE8C 1 -CE9F 1 -CEBF 1 -CF8C 1 -CEA0 1 -CF80 1 -CF96 1 -CF9E 1 -CF9F 1 -CF98 1 -CF99 1 -CEA1 1 -CF81 1 -CFB1 1 -CEA3 1 -CF82 1 -CF83 1 -CFB2 1 -CFB9 1 -CEA4 1 -CF84 1 -CE8E 1 -CEA5 1 -CEAB 1 -CEB0 1 -CF85 1 -CF8B 1 -CF8D 1 -CF92 1 -CF93 1 -CF94 1 -CEA6 1 -CF86 1 -CF95 1 -CEA7 1 -CF87 1 -CEA8 1 -CF88 1 -CE8F 1 -CEA9 1 -CF89 1 -CF8E 1 -CFA0 1 -CFA1 1 -CFB7 1 -CFB8 1 -CFBA 1 -CFBB 1 -CFA2 1 -CFA3 1 -CFA4 1 -CFA5 1 -CFA6 1 -CFA7 1 -CFA8 1 -CFA9 1 -CFAA 1 -CFAB 1 -CFAC 1 -CFAD 1 -CFAE 1 -CFAF 1 -D090 1 -D0B0 1 -D390 1 -D391 1 -D392 1 -D393 1 -D398 1 -D399 1 -D39A 1 -D39B 1 -D394 1 -D395 1 -D091 1 -D0B1 1 -D092 1 -D0B2 1 -D093 1 -D0B3 1 -D290 1 -D291 1 -D292 1 -D293 1 -D294 1 -D295 1 -D094 1 -D0B4 1 -D480 1 -D481 1 -D082 1 -D192 1 -D482 1 -D483 1 -D083 1 -D193 1 -D298 1 -D299 1 -D080 1 -D081 1 -D095 1 -D0B5 1 -D190 1 -D191 1 -D396 1 -D397 1 -D084 1 -D194 1 -D096 1 -D0B6 1 -D381 1 -D382 1 -D39C 1 -D39D 1 -D296 1 -D297 1 -D097 1 -D0B7 1 -D484 1 -D485 1 -D39E 1 -D39F 1 -D085 1 -D195 1 -D3A0 1 -D3A1 1 -D486 1 -D487 1 -D08D 1 -D098 1 -D0B8 1 -D19D 1 -D3A2 1 -D3A3 1 -D28A 1 -D28B 1 -D3A4 1 -D3A5 1 -D086 1 -D196 1 -D087 1 -D197 1 -D099 1 -D0B9 1 -D088 1 -D198 1 -D09A 1 -D0BA 1 -D29A 1 -D29B 1 -D383 1 -D384 1 -D2A0 1 -D2A1 1 -D29E 1 -D29F 1 -D29C 1 -D29D 1 -D09B 1 -D0BB 1 -D385 1 -D386 1 -D089 1 -D199 1 -D488 1 -D489 1 -D09C 1 -D0BC 1 -D38D 1 -D38E 1 -D09D 1 -D0BD 1 -D389 1 -D38A 1 -D2A2 1 -D2A3 1 -D387 1 -D388 1 -D2A4 1 -D2A5 1 -D08A 1 -D19A 1 -D48A 1 -D48B 1 -D09E 1 -D0BE 1 -D3A6 1 -D3A7 1 -D3A8 1 -D3A9 1 -D3AA 1 -D3AB 1 -D09F 1 -D0BF 1 -D2A6 1 -D2A7 1 -D280 1 -D281 1 -D0A0 1 -D180 1 -D28E 1 -D28F 1 -D0A1 1 -D181 1 -D48C 1 -D48D 1 -D2AA 1 -D2AB 1 -D0A2 1 -D182 1 -D48E 1 -D48F 1 -D2AC 1 -D2AD 1 -D08B 1 -D19B 1 -D08C 1 -D19C 1 -D0A3 1 -D183 1 -D3AE 1 -D3AF 1 -D08E 1 -D19E 1 -D3B0 1 -D3B1 1 -D3B2 1 -D3B3 1 -D2AE 1 -D2AF 1 -D2B0 1 -D2B1 1 -D1B8 1 -D1B9 1 -D0A4 1 -D184 1 -D0A5 1 -D185 1 -D2B2 1 -D2B3 1 -D2BA 1 -D2BB 1 -D1A0 1 -D1A1 1 -D1BE 1 -D1BF 1 -D1BC 1 -D1BD 1 -D1BA 1 -D1BB 1 -D0A6 1 -D186 1 -D2B4 1 -D2B5 1 -D0A7 1 -D187 1 -D3B4 1 -D3B5 1 -D2B6 1 -D2B7 1 -D38B 1 -D38C 1 -D2B8 1 -D2B9 1 -D2BC 1 -D2BD 1 -D2BE 1 -D2BF 1 -D08F 1 -D19F 1 -D0A8 1 -D188 1 -D0A9 1 -D189 1 -D0AA 1 -D18A 1 -D0AB 1 -D18B 1 -D3B8 1 -D3B9 1 -D0AC 1 -D18C 1 -D28C 1 -D28D 1 -D1A2 1 -D1A3 1 -D0AD 1 -D18D 1 -D3AC 1 -D3AD 1 -D0AE 1 -D18E 1 -D0AF 1 -D18F 1 -D1A4 1 -D1A5 1 -D1A6 1 -D1A7 1 -D1AA 1 -D1AB 1 -D1A8 1 -D1A9 1 -D1AC 1 -D1AD 1 -D1AE 1 -D1AF 1 -D1B0 1 -D1B1 1 -D1B2 1 -D1B3 1 -D1B4 1 -D1B5 1 -D1B6 1 -D1B7 1 -D2A8 1 -D2A9 1 -D380 1 -D4B1 1 -D5A1 1 -D4B2 1 -D5A2 1 -D4B3 1 -D5A3 1 -D4B4 1 -D5A4 1 -D4B5 1 -D5A5 1 -D687 1 -D4B6 1 -D5A6 1 -D4B7 1 -D5A7 1 -D4B8 1 -D5A8 1 -D4B9 1 -D5A9 1 -D4BA 1 -D5AA 1 -D4BB 1 -D5AB 1 -D4BC 1 -D5AC 1 -D4BD 1 -D5AD 1 -D4BE 1 -D5AE 1 -D4BF 1 -D5AF 1 -D580 1 -D5B0 1 -D581 1 -D5B1 1 -D582 1 -D5B2 1 -D583 1 -D5B3 1 -D584 1 -D5B4 1 -D585 1 -D5B5 1 -D586 1 -D5B6 1 -D587 1 -D5B7 1 -D588 1 -D5B8 1 -D589 1 -D5B9 1 -D58A 1 -D5BA 1 -D58B 1 -D5BB 1 -D58C 1 -D5BC 1 -D58D 1 -D5BD 1 -D58E 1 -D5BE 1 -D58F 1 -D5BF 1 -D590 1 -D680 1 -D591 1 -D681 1 -D592 1 -D682 1 -D593 1 -D683 1 -D594 1 -D684 1 -D595 1 -D685 1 -D596 1 -D686 1 -D599 1 -D790 1 -D791 1 -D792 1 -D793 1 -D794 1 -D795 1 -D7B0 1 -D7B1 1 -D796 1 -D797 1 -D798 1 -D799 1 -D7B2 1 -D79A 1 -D79B 1 -D79C 1 -D79D 1 -D79E 1 -D79F 1 -D7A0 1 -D7A1 1 -D7A2 1 -D7A3 1 -D7A4 1 -D7A5 1 -D7A6 1 -D7A7 1 -D7A8 1 -D7A9 1 -D7AA 1 -D8A1 1 -D9B4 1 -DBBD 1 -D8A2 1 -D8A3 1 -D9B2 1 -D9B1 1 -D8A4 1 -D8A5 1 -D9B3 1 -D8A6 1 -D8A7 1 -D9B5 1 -D9AE 1 -D8A8 1 -D9BB 1 -D9BE 1 -DA80 1 -D8A9 1 -D8AA 1 -D8AB 1 -D9B9 1 -D9BA 1 -D9BC 1 -D9BD 1 -D9BF 1 -D8AC 1 -DA83 1 -DA84 1 -DA86 1 -DABF 1 -DA87 1 -D8AD 1 -D8AE 1 -DA81 1 -DA82 1 -DA85 1 -D8AF 1 -D8B0 1 -DA88 1 -DA89 1 -DA8A 1 -DA8B 1 -DA8C 1 -DA8D 1 -DA8E 1 -DA8F 1 -DA90 1 -DBAE 1 -D8B1 1 -D8B2 1 -DA91 1 -DA92 1 -DA93 1 -DA94 1 -DA95 1 -DA96 1 -DA97 1 -DA98 1 -DA99 1 -DBAF 1 -D8B3 1 -D8B4 1 -DA9A 1 -DA9B 1 -DA9C 1 -DBBA 1 -D8B5 1 -D8B6 1 -DA9D 1 -DA9E 1 -DBBB 1 -D8B7 1 -D8B8 1 -DA9F 1 -D8B9 1 -D8BA 1 -DAA0 1 -DBBC 1 -D981 1 -DAA1 1 -DAA2 1 -DAA3 1 -DAA4 1 -DAA5 1 -DAA6 1 -D9AF 1 -D982 1 -DAA7 1 -DAA8 1 -D983 1 -DAA9 1 -DAAA 1 -DAAB 1 -DAAC 1 -DAAD 1 -DAAE 1 -DAAF 1 -DAB0 1 -DAB1 1 -DAB2 1 -DAB3 1 -DAB4 1 -D984 1 -DAB5 1 -DAB6 1 -DAB7 1 -DAB8 1 -D985 1 -DBBE 1 -D986 1 -DABA 1 -DABB 1 -DABC 1 -DABD 1 -DAB9 1 -D987 1 -DABE 1 -DB81 1 -DB82 1 -DB83 1 -DBBF 1 -DB80 1 -DB95 1 -D988 1 -DBA5 1 -D9B6 1 -DB84 1 -DB85 1 -DB86 1 -DB87 1 -D9B7 1 -DB88 1 -DB89 1 -DB8A 1 -DB8B 1 -DB8F 1 -D989 1 -D98A 1 -DBA6 1 -D9B8 1 -DB8C 1 -DB8D 1 -DB8E 1 -DB90 1 -DB91 1 -DB92 1 -DB93 1 -DC90 1 -DC92 1 -DCAD 1 -DC93 1 -DC94 1 -DCAE 1 -DC96 1 -DC95 1 -DCAF 1 -DC97 1 -DC98 1 -DC99 1 -DD8D 1 -DC9A 1 -DC9B 1 -DC9C 1 -DC9D 1 -DC9E 1 -DC9F 1 -DD8E 1 -DCA0 1 -DCA1 1 -DCA2 1 -DCA3 1 -DCA4 1 -DCA5 1 -DCA6 1 -DCA7 1 -DD8F 1 -DCA8 1 -DCA9 1 -DCAA 1 -DCAB 1 -DCAC 1 -DE80 1 -DE99 1 -DE9A 1 -DE81 1 -DE82 1 -DE83 1 -DE9C 1 -DE84 1 -DE85 1 -DE86 1 -DE87 1 -DEA2 1 -DEA3 1 -DE88 1 -DEA5 1 -DE89 1 -DE8A 1 -DE8B 1 -DE9B 1 -DE8C 1 -DE98 1 -DEA0 1 -DEA1 1 -DE8D 1 -DE8E 1 -DEA4 1 -DE8F 1 -DE90 1 -DE9D 1 -DE9E 1 -DE9F 1 -DE91 1 -DE92 1 -DE93 1 -DE94 1 -DE95 1 -DE96 1 -DE97 1 -DEB1 1 -DEA6 1 -DEA7 1 -DEA8 1 -DEA9 1 -DEAA 1 -DEAB 1 -DEAC 1 -DEAD 1 -DEAE 1 -DEAF 1 -DEB0 1 -E4B880 1 -E4B881 1 -E4B882 1 -E4B883 1 -E4B884 1 -E4B885 1 -E4B886 1 -E4B887 1 -E4B888 1 -E4B889 1 -E4B88A 1 -E4B88B 1 -E4B88C 1 -E4B88D 1 -E4B88E 1 -E4B88F 1 -E4B890 1 -E4B891 1 -E4B892 1 -E4B893 1 -E4B894 1 -E4B895 1 -E4B896 1 -E4B897 1 -E4B898 1 -E4B899 1 -E4B89A 1 -E4B89B 1 -E4B89C 1 -E4B89D 1 -E4B89E 1 -E4B89F 1 -E4B8A0 1 -E4B8A1 1 -E4B8A2 1 -E4B8A3 1 -E4B8A4 1 -E4B8A5 1 -E4B8A6 1 -E4B8A7 1 -E4B8A8 1 -E4B8A9 1 -E4B8AA 1 -E4B8AB 1 -E4B8AC 1 -E4B8AD 1 -E4B8AE 1 -E4B8AF 1 -E4B8B0 1 -E4B8B1 1 -E4B8B2 1 -E4B8B3 1 -E4B8B4 1 -E4B8B5 1 -E4B8B6 1 -E4B8B7 1 -E4B8B8 1 -E4B8B9 1 -E4B8BA 1 -E4B8BB 1 -E4B8BC 1 -E4B8BD 1 -E4B8BE 1 -E4B8BF 1 -E4B980 1 -E4B981 1 -E4B982 1 -E4B983 1 -E4B984 1 -E4B985 1 -E4B986 1 -E4B987 1 -E4B988 1 -E4B989 1 -E4B98A 1 -E4B98B 1 -E4B98C 1 -E4B98D 1 -E4B98E 1 -E4B98F 1 -E4B990 1 -E4B991 1 -E4B992 1 -E4B993 1 -E4B994 1 -E4B995 1 -E4B996 1 -E4B997 1 -E4B998 1 -E4B999 1 -E4B99A 1 -E4B99B 1 -E4B99C 1 -E4B99D 1 -E4B99E 1 -E4B99F 1 -E4B9A0 1 -E4B9A1 1 -E4B9A2 1 -E4B9A3 1 -E4B9A4 1 -E4B9A5 1 -E4B9A6 1 -E4B9A7 1 -E4B9A8 1 -E4B9A9 1 -E4B9AA 1 -E4B9AB 1 -E4B9AC 1 -E4B9AD 1 -E4B9AE 1 -E4B9AF 1 -E4B9B0 1 -E4B9B1 1 -E4B9B2 1 -E4B9B3 1 -E4B9B4 1 -E4B9B5 1 -E4B9B6 1 -E4B9B7 1 -E4B9B8 1 -E4B9B9 1 -E4B9BA 1 -E4B9BB 1 -E4B9BC 1 -E4B9BD 1 -E4B9BE 1 -E4B9BF 1 -E4BA80 1 -E4BA81 1 -E4BA82 1 -E4BA83 1 -E4BA84 1 -E4BA85 1 -E4BA86 1 -E4BA87 1 -E4BA88 1 -E4BA89 1 -E4BA8A 1 -E4BA8B 1 -E4BA8C 1 -E4BA8D 1 -E4BA8E 1 -E4BA8F 1 -E4BA90 1 -E4BA91 1 -E4BA92 1 -E4BA93 1 -E4BA94 1 -E4BA95 1 -E4BA96 1 -E4BA97 1 -E4BA98 1 -E4BA99 1 -E4BA9A 1 -E4BA9B 1 -E4BA9C 1 -E4BA9D 1 -E4BA9E 1 -E4BA9F 1 -E4BAA0 1 -E4BAA1 1 -E4BAA2 1 -E4BAA3 1 -E4BAA4 1 -E4BAA5 1 -E4BAA6 1 -E4BAA7 1 -E4BAA8 1 -E4BAA9 1 -E4BAAA 1 -E4BAAB 1 -E4BAAC 1 -E4BAAD 1 -E4BAAE 1 -E4BAAF 1 -E4BAB0 1 -E4BAB1 1 -E4BAB2 1 -E4BAB3 1 -E4BAB4 1 -E4BAB5 1 -E4BAB6 1 -E4BAB7 1 -E4BAB8 1 -E4BAB9 1 -E4BABA 1 -E4BABB 1 -E4BABC 1 -E4BABD 1 -E4BABE 1 -E4BABF 1 -E4BB80 1 -E4BB81 1 -E4BB82 1 -E4BB83 1 -E4BB84 1 -E4BB85 1 -E4BB86 1 -E4BB87 1 -E4BB88 1 -E4BB89 1 -E4BB8A 1 -E4BB8B 1 -E4BB8C 1 -E4BB8D 1 -E4BB8E 1 -E4BB8F 1 -E4BB90 1 -E4BB91 1 -E4BB92 1 -E4BB93 1 -E4BB94 1 -E4BB95 1 -E4BB96 1 -E4BB97 1 -E4BB98 1 -E4BB99 1 -E4BB9A 1 -E4BB9B 1 -E4BB9C 1 -E4BB9D 1 -E4BB9E 1 -E4BB9F 1 -E4BBA0 1 -E4BBA1 1 -E4BBA2 1 -E4BBA3 1 -E4BBA4 1 -E4BBA5 1 -E4BBA6 1 -E4BBA7 1 -E4BBA8 1 -E4BBA9 1 -E4BBAA 1 -E4BBAB 1 -E4BBAC 1 -E4BBAD 1 -E4BBAE 1 -E4BBAF 1 -E4BBB0 1 -E4BBB1 1 -E4BBB2 1 -E4BBB3 1 -E4BBB4 1 -E4BBB5 1 -E4BBB6 1 -E4BBB7 1 -E4BBB8 1 -E4BBB9 1 -E4BBBA 1 -E4BBBB 1 -E4BBBC 1 -E4BBBD 1 -E4BBBE 1 -E4BBBF 1 -E4BC80 1 -E4BC81 1 -E4BC82 1 -E4BC83 1 -E4BC84 1 -E4BC85 1 -E4BC86 1 -E4BC87 1 -E4BC88 1 -E4BC89 1 -E4BC8A 1 -E4BC8B 1 -E4BC8C 1 -E4BC8D 1 -E4BC8E 1 -E4BC8F 1 -E4BC90 1 -E4BC91 1 -E4BC92 1 -E4BC93 1 -E4BC94 1 -E4BC95 1 -E4BC96 1 -E4BC97 1 -E4BC98 1 -E4BC99 1 -E4BC9A 1 -E4BC9B 1 -E4BC9C 1 -E4BC9D 1 -E4BC9E 1 -E4BC9F 1 -E4BCA0 1 -E4BCA1 1 -E4BCA2 1 -E4BCA3 1 -E4BCA4 1 -E4BCA5 1 -E4BCA6 1 -E4BCA7 1 -E4BCA8 1 -E4BCA9 1 -E4BCAA 1 -E4BCAB 1 -E4BCAC 1 -E4BCAD 1 -E4BCAE 1 -E4BCAF 1 -E4BCB0 1 -E4BCB1 1 -E4BCB2 1 -E4BCB3 1 -E4BCB4 1 -E4BCB5 1 -E4BCB6 1 -E4BCB7 1 -E4BCB8 1 -E4BCB9 1 -E4BCBA 1 -E4BCBB 1 -E4BCBC 1 -E4BCBD 1 -E4BCBE 1 -E4BCBF 1 -E4BD80 1 -E4BD81 1 -E4BD82 1 -E4BD83 1 -E4BD84 1 -E4BD85 1 -E4BD86 1 -E4BD87 1 -E4BD88 1 -E4BD89 1 -E4BD8A 1 -E4BD8B 1 -E4BD8C 1 -E4BD8D 1 -E4BD8E 1 -E4BD8F 1 -E4BD90 1 -E4BD91 1 -E4BD92 1 -E4BD93 1 -E4BD94 1 -E4BD95 1 -E4BD96 1 -E4BD97 1 -E4BD98 1 -E4BD99 1 -E4BD9A 1 -E4BD9B 1 -E4BD9C 1 -E4BD9D 1 -E4BD9E 1 -E4BD9F 1 -E4BDA0 1 -E4BDA1 1 -E4BDA2 1 -E4BDA3 1 -E4BDA4 1 -E4BDA5 1 -E4BDA6 1 -E4BDA7 1 -E4BDA8 1 -E4BDA9 1 -E4BDAA 1 -E4BDAB 1 -E4BDAC 1 -E4BDAD 1 -E4BDAE 1 -E4BDAF 1 -E4BDB0 1 -E4BDB1 1 -E4BDB2 1 -E4BDB3 1 -E4BDB4 1 -E4BDB5 1 -E4BDB6 1 -E4BDB7 1 -E4BDB8 1 -E4BDB9 1 -E4BDBA 1 -E4BDBB 1 -E4BDBC 1 -E4BDBD 1 -E4BDBE 1 -E4BDBF 1 -E4BE80 1 -E4BE81 1 -E4BE82 1 -E4BE83 1 -E4BE84 1 -E4BE85 1 -E4BE86 1 -E4BE87 1 -E4BE88 1 -E4BE89 1 -E4BE8A 1 -E4BE8B 1 -E4BE8C 1 -E4BE8D 1 -E4BE8E 1 -E4BE8F 1 -E4BE90 1 -E4BE91 1 -E4BE92 1 -E4BE93 1 -E4BE94 1 -E4BE95 1 -E4BE96 1 -E4BE97 1 -E4BE98 1 -E4BE99 1 -E4BE9A 1 -E4BE9B 1 -E4BE9C 1 -E4BE9D 1 -E4BE9E 1 -E4BE9F 1 -E4BEA0 1 -E4BEA1 1 -E4BEA2 1 -E4BEA3 1 -E4BEA4 1 -E4BEA5 1 -E4BEA6 1 -E4BEA7 1 -E4BEA8 1 -E4BEA9 1 -E4BEAA 1 -E4BEAB 1 -E4BEAC 1 -E4BEAD 1 -E4BEAE 1 -E4BEAF 1 -E4BEB0 1 -E4BEB1 1 -E4BEB2 1 -E4BEB3 1 -E4BEB4 1 -E4BEB5 1 -E4BEB6 1 -E4BEB7 1 -E4BEB8 1 -E4BEB9 1 -E4BEBA 1 -E4BEBB 1 -E4BEBC 1 -E4BEBD 1 -E4BEBE 1 -E4BEBF 1 -E4BF80 1 -E4BF81 1 -E4BF82 1 -E4BF83 1 -E4BF84 1 -E4BF85 1 -E4BF86 1 -E4BF87 1 -E4BF88 1 -E4BF89 1 -E4BF8A 1 -E4BF8B 1 -E4BF8C 1 -E4BF8D 1 -E4BF8E 1 -E4BF8F 1 -E4BF90 1 -E4BF91 1 -E4BF92 1 -E4BF93 1 -E4BF94 1 -E4BF95 1 -E4BF96 1 -E4BF97 1 -E4BF98 1 -E4BF99 1 -E4BF9A 1 -E4BF9B 1 -E4BF9C 1 -E4BF9D 1 -E4BF9E 1 -E4BF9F 1 -E4BFA0 1 -E4BFA1 1 -E4BFA2 1 -E4BFA3 1 -E4BFA4 1 -E4BFA5 1 -E4BFA6 1 -E4BFA7 1 -E4BFA8 1 -E4BFA9 1 -E4BFAA 1 -E4BFAB 1 -E4BFAC 1 -E4BFAD 1 -E4BFAE 1 -E4BFAF 1 -E4BFB0 1 -E4BFB1 1 -E4BFB2 1 -E4BFB3 1 -E4BFB4 1 -E4BFB5 1 -E4BFB6 1 -E4BFB7 1 -E4BFB8 1 -E4BFB9 1 -E4BFBA 1 -E4BFBB 1 -E4BFBC 1 -E4BFBD 1 -E4BFBE 1 -E4BFBF 1 -C8B7 1 -C8B8 1 -C8B9 1 -C8BA 1 -C8BB 1 -C8BC 1 -C8BD 1 -C8BE 1 -C8BF 1 -C980 1 -C981 1 -C982 1 -C983 1 -C984 1 -C985 1 -C986 1 -C987 1 -C988 1 -C989 1 -C98A 1 -C98B 1 -C98C 1 -C98D 1 -C98E 1 -C98F 1 -CD98 1 -CD99 1 -CD9A 1 -CD9B 1 -CD9C 1 -CDB0 1 -CDB1 1 -CDB2 1 -CDB3 1 -CDB6 1 -CDB7 1 -CDB8 1 -CDB9 1 -CDBB 1 -CDBC 1 -CDBD 1 -CDBF 1 -CE80 1 -CE81 1 -CE82 1 -CE83 1 -CE8B 1 -CE8D 1 -CEA2 1 -CF8F 1 -CFBC 1 -CFBD 1 -CFBE 1 -CFBF 1 -D287 1 -D38F 1 -D3B6 1 -D3B7 1 -D3BA 1 -D3BB 1 -D3BC 1 -D3BD 1 -D3BE 1 -D3BF 1 -D490 1 -D491 1 -D492 1 -D493 1 -D494 1 -D495 1 -D496 1 -D497 1 -D498 1 -D499 1 -D49A 1 -D49B 1 -D49C 1 -D49D 1 -D49E 1 -D49F 1 -D4A0 1 -D4A1 1 -D4A2 1 -D4A3 1 -D4A4 1 -D4A5 1 -D4A6 1 -D4A7 1 -D4A8 1 -D4A9 1 -D4AA 1 -D4AB 1 -D4AC 1 -D4AD 1 -D4AE 1 -D4AF 1 -D4B0 1 -D597 1 -D598 1 -D5A0 1 -D688 1 -D68B 1 -D68C 1 -D68D 1 -D68E 1 -D68F 1 -D690 1 -D6A2 1 -D6BA 1 -D785 1 -D786 1 -D787 1 -D788 1 -D789 1 -D78A 1 -D78B 1 -D78C 1 -D78D 1 -D78E 1 -D78F 1 -D7AB 1 -D7AC 1 -D7AD 1 -D7AE 1 -D7AF 1 -D7B5 1 -D7B6 1 -D7B7 1 -D7B8 1 -D7B9 1 -D7BA 1 -D7BB 1 -D7BC 1 -D7BD 1 -D7BE 1 -D7BF 1 -D884 1 -D885 1 -D886 1 -D887 1 -D888 1 -D889 1 -D88A 1 -D88B 1 -D896 1 -D897 1 -D898 1 -D899 1 -D89A 1 -D89C 1 -D89D 1 -D89E 1 -D8A0 1 -D8BB 1 -D8BC 1 -D8BD 1 -D8BE 1 -D8BF 1 -D999 1 -D99A 1 -D99B 1 -D99C 1 -D99D 1 -D99E 1 -D99F 1 -DC8E 1 -DD8B 1 -DD8C 1 -DD90 1 -DD91 1 -DD92 1 -DD93 1 -DD94 1 -DD95 1 -DD96 1 -DD97 1 -DD98 1 -DD99 1 -DD9A 1 -DD9B 1 -DD9C 1 -DD9D 1 -DD9E 1 -DD9F 1 -DDA0 1 -DDA1 1 -DDA2 1 -DDA3 1 -DDA4 1 -DDA5 1 -DDA6 1 -DDA7 1 -DDA8 1 -DDA9 1 -DDAA 1 -DDAB 1 -DDAC 1 -DDAD 1 -DDAE 1 -DDAF 1 -DDB0 1 -DDB1 1 -DDB2 1 -DDB3 1 -DDB4 1 -DDB5 1 -DDB6 1 -DDB7 1 -DDB8 1 -DDB9 1 -DDBA 1 -DDBB 1 -DDBC 1 -DDBD 1 -DDBE 1 -DDBF 1 -DEB2 1 -DEB3 1 -DEB4 1 -DEB5 1 -DEB6 1 -DEB7 1 -DEB8 1 -DEB9 1 -DEBA 1 -DEBB 1 -DEBC 1 -DEBD 1 -DEBE 1 -DEBF 1 -DF80 1 -DF81 1 -DF82 1 -DF83 1 -DF84 1 -DF85 1 -DF86 1 -DF87 1 -DF88 1 -DF89 1 -DF8A 1 -DF8B 1 -DF8C 1 -DF8D 1 -DF8E 1 -DF8F 1 -DF90 1 -DF91 1 -DF92 1 -DF93 1 -DF94 1 -DF95 1 -DF96 1 -DF97 1 -DF98 1 -DF99 1 -DF9A 1 -DF9B 1 -DF9C 1 -DF9D 1 -DF9E 1 -DF9F 1 -DFA0 1 -DFA1 1 -DFA2 1 -DFA3 1 -DFA4 1 -DFA5 1 -DFA6 1 -DFA7 1 -DFA8 1 -DFA9 1 -DFAA 1 -DFAB 1 -DFAC 1 -DFAD 1 -DFAE 1 -DFAF 1 -DFB0 1 -DFB1 1 -DFB2 1 -DFB3 1 -DFB4 1 -DFB5 1 -DFB6 1 -DFB7 1 -DFB8 1 -DFB9 1 -DFBA 1 -DFBB 1 -DFBC 1 -DFBD 1 -DFBE 1 -DFBF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_romanian_ci) ENGINE=NDB CHARACTER SET utf8 COLLATE utf8_romanian_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_romanian_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -C285 1 -7F 1 -C280 1 -C281 1 -C282 1 -C283 1 -C284 1 -C286 1 -C287 1 -C288 1 -C289 1 -C28A 1 -C28B 1 -C28C 1 -C28D 1 -C28E 1 -C28F 1 -C290 1 -C291 1 -C292 1 -C293 1 -C294 1 -C295 1 -C296 1 -C297 1 -C298 1 -C299 1 -C29A 1 -C29B 1 -C29C 1 -C29D 1 -C29E 1 -C29F 1 -C2A0 1 -CC80 1 -CC81 1 -CC82 1 -CC83 1 -CC84 1 -CC85 1 -CC86 1 -CC87 1 -CC88 1 -CC89 1 -CC8A 1 -CC8B 1 -CC8C 1 -CC8D 1 -CC8E 1 -CC8F 1 -CC90 1 -CC91 1 -CC92 1 -CC93 1 -CC94 1 -CC95 1 -CC96 1 -CC97 1 -CC98 1 -CC99 1 -CC9A 1 -CC9B 1 -CC9C 1 -CC9D 1 -CC9E 1 -CC9F 1 -CCA0 1 -CCA1 1 -CCA2 1 -CCA3 1 -CCA4 1 -CCA5 1 -CCA6 1 -CCA7 1 -CCA8 1 -CCA9 1 -CCAA 1 -CCAB 1 -CCAC 1 -CCAD 1 -CCAE 1 -CCAF 1 -CCB0 1 -CCB1 1 -CCB2 1 -CCB3 1 -CCB4 1 -CCB5 1 -CCB6 1 -CCB7 1 -CCB8 1 -CCB9 1 -CCBA 1 -CCBB 1 -CCBC 1 -CCBD 1 -CCBE 1 -CCBF 1 -CD80 1 -CD81 1 -CD82 1 -CD83 1 -CD84 1 -CD85 1 -CD86 1 -CD87 1 -CD88 1 -CD89 1 -CD8A 1 -CD8B 1 -CD8C 1 -CD8D 1 -CD8E 1 -CD8F 1 -CD90 1 -CD91 1 -CD92 1 -CD93 1 -CD94 1 -CD95 1 -CD96 1 -CD97 1 -CD9D 1 -CD9E 1 -CD9F 1 -CDA0 1 -CDA1 1 -CDA2 1 -D283 1 -D284 1 -D285 1 -D286 1 -D288 1 -D289 1 -D691 1 -D692 1 -D693 1 -D694 1 -D695 1 -D696 1 -D697 1 -D698 1 -D699 1 -D69A 1 -D69B 1 -D69C 1 -D69D 1 -D69E 1 -D69F 1 -D6A0 1 -D6A1 1 -D6A3 1 -D6A4 1 -D6A5 1 -D6A6 1 -D6A7 1 -D6A8 1 -D6A9 1 -D6AA 1 -D6AB 1 -D6AC 1 -D6AD 1 -D6AE 1 -D6AF 1 -D6B0 1 -D6B1 1 -D6B2 1 -D6B3 1 -D6B4 1 -D6B5 1 -D6B6 1 -D6B7 1 -D6B8 1 -D6B9 1 -D6BB 1 -D6BC 1 -D6BD 1 -D6BF 1 -D781 1 -D782 1 -D784 1 -D880 1 -D881 1 -D882 1 -D883 1 -D890 1 -D891 1 -D892 1 -D893 1 -D894 1 -D895 1 -D98B 1 -D98C 1 -D98D 1 -D98E 1 -D98F 1 -D990 1 -D991 1 -D992 1 -D993 1 -D994 1 -D995 1 -D996 1 -D997 1 -D998 1 -D9B0 1 -DB96 1 -DB97 1 -DB98 1 -DB99 1 -DB9A 1 -DB9B 1 -DB9C 1 -DB9D 1 -DB9E 1 -DB9F 1 -DBA0 1 -DBA1 1 -DBA2 1 -DBA3 1 -DBA4 1 -DBA7 1 -DBA8 1 -DBAA 1 -DBAB 1 -DBAC 1 -DBAD 1 -DC8F 1 -DC91 1 -DCB0 1 -DCB1 1 -DCB2 1 -DCB3 1 -DCB4 1 -DCB5 1 -DCB6 1 -DCB7 1 -DCB8 1 -DCB9 1 -DCBA 1 -DCBB 1 -DCBC 1 -DCBD 1 -DCBE 1 -DCBF 1 -DD80 1 -DD81 1 -DD82 1 -DD83 1 -DD84 1 -DD85 1 -DD86 1 -DD87 1 -DD88 1 -DD89 1 -DD8A 1 -D980 1 -60 1 -C2B4 1 -CE84 1 -CB9C 1 -5E 1 -C2AF 1 -CB98 1 -CB99 1 -C2A8 1 -CE85 1 -CB9A 1 -CB9D 1 -C2B8 1 -CB9B 1 -5F 1 -C2AD 1 -2D 1 -D68A 1 -2C 1 -D59D 1 -D88C 1 -D88D 1 -D9AB 1 -D9AC 1 -3B 1 -CDBE 1 -D89B 1 -3A 1 -D689 1 -DC83 1 -DC84 1 -DC85 1 -DC86 1 -DC87 1 -DC88 1 -21 1 -C2A1 1 -D59C 1 -3F 1 -C2BF 1 -D59E 1 -D89F 1 -DC89 1 -2E 1 -DB94 1 -DC81 1 -DC82 1 -C2B7 1 -CE87 1 -DC80 1 -27 1 -22 1 -C2AB 1 -C2BB 1 -28 1 -29 1 -5B 1 -7B 1 -7D 1 -C2A7 1 -C2B6 1 -C2A9 1 -C2AE 1 -40 1 -2A 1 -D9AD 1 -2F 1 -26 1 -23 1 -25 1 -D9AA 1 -D59A 1 -D59B 1 -D59F 1 -D6BE 1 -D780 1 -D783 1 -D7B3 1 -D7B4 1 -DC8A 1 -DC8B 1 -DC8C 1 -DC8D 1 -CAB9 1 -CDB4 1 -CDB5 1 -CABA 1 -CB82 1 -CB83 1 -CB84 1 -CB85 1 -CB86 1 -CB87 1 -CB88 1 -CB89 1 -CB8A 1 -CB8B 1 -CB8C 1 -CB8D 1 -CB8E 1 -CB8F 1 -CB92 1 -CB93 1 -CB94 1 -CB95 1 -CB96 1 -CB97 1 -CB9E 1 -CB9F 1 -CBA5 1 -CBA6 1 -CBA7 1 -CBA8 1 -CBA9 1 -CBAA 1 -CBAB 1 -CBAC 1 -CBAD 1 -CBAF 1 -CBB0 1 -CBB1 1 -CBB2 1 -CBB3 1 -CBB4 1 -CBB5 1 -CBB6 1 -CBB7 1 -CBB8 1 -CBB9 1 -CBBA 1 -CBBB 1 -CBBC 1 -CBBD 1 -CBBE 1 -CBBF 1 -C2B0 1 -D282 1 -D88E 1 -D88F 1 -DBA9 1 -CFB6 1 -2B 1 -C2B1 1 -C3B7 1 -C397 1 -3C 1 -3D 1 -3E 1 -C2AC 1 -7C 1 -C2A6 1 -7E 1 -CB90 1 -CB91 1 -C2A4 1 -C2A2 1 -24 1 -C2A3 1 -C2A5 1 -30 1 -D9A0 1 -DBB0 1 -31 1 -C2B9 1 -D9A1 1 -DBB1 1 -C2BD 1 -C2BC 1 -32 1 -C2B2 1 -D9A2 1 -DBB2 1 -33 1 -C2B3 1 -D9A3 1 -DBB3 1 -C2BE 1 -34 1 -D9A4 1 -DBB4 1 -35 1 -D9A5 1 -DBB5 1 -36 1 -D9A6 1 -DBB6 1 -37 1 -D9A7 1 -DBB7 1 -38 1 -D9A8 1 -DBB8 1 -39 1 -D9A9 1 -DBB9 1 -41 1 -61 1 -C2AA 1 -C380 1 -C381 1 -C383 1 -C384 1 -C385 1 -C3A0 1 -C3A1 1 -C3A3 1 -C3A4 1 -C3A5 1 -C480 1 -C481 1 -C484 1 -C485 1 -C78D 1 -C78E 1 -C79E 1 -C79F 1 -C7A0 1 -C7A1 1 -C7BA 1 -C7BB 1 -C880 1 -C881 1 -C882 1 -C883 1 -C8A6 1 -C8A7 1 -CDA3 1 -C482 1 -C483 1 -C382 1 -C3A2 1 -C386 1 -C3A6 1 -C7A2 1 -C7A3 1 -C7BC 1 -C7BD 1 -C990 1 -C991 1 -C992 1 -42 1 -62 1 -CA99 1 -C680 1 -C681 1 -C993 1 -C682 1 -C683 1 -43 1 -63 1 -C387 1 -C3A7 1 -C486 1 -C487 1 -C488 1 -C489 1 -C48A 1 -C48B 1 -C48C 1 -C48D 1 -CDA8 1 -C687 1 -C688 1 -C995 1 -44 1 -64 1 -C48E 1 -C48F 1 -CDA9 1 -C784 1 -C785 1 -C786 1 -C7B1 1 -C7B2 1 -C7B3 1 -CAA3 1 -CAA5 1 -CAA4 1 -C490 1 -C491 1 -C689 1 -C996 1 -C68A 1 -C997 1 -C68B 1 -C68C 1 -C8A1 1 -C390 1 -C3B0 1 -45 1 -65 1 -C388 1 -C389 1 -C38A 1 -C38B 1 -C3A8 1 -C3A9 1 -C3AA 1 -C3AB 1 -C492 1 -C493 1 -C494 1 -C495 1 -C496 1 -C497 1 -C498 1 -C499 1 -C49A 1 -C49B 1 -C884 1 -C885 1 -C886 1 -C887 1 -C8A8 1 -C8A9 1 -CDA4 1 -C68E 1 -C79D 1 -C68F 1 -C999 1 -C690 1 -C99B 1 -C998 1 -C99A 1 -C99C 1 -C99D 1 -C99E 1 -CA9A 1 -C9A4 1 -46 1 -66 1 -CAA9 1 -C691 1 -C692 1 -47 1 -67 1 -C49C 1 -C49D 1 -C49E 1 -C49F 1 -C4A0 1 -C4A1 1 -C4A2 1 -C4A3 1 -C7A6 1 -C7A7 1 -C7B4 1 -C7B5 1 -C9A1 1 -C9A2 1 -C7A4 1 -C7A5 1 -C693 1 -C9A0 1 -CA9B 1 -C694 1 -C9A3 1 -CBA0 1 -C6A2 1 -C6A3 1 -48 1 -68 1 -C4A4 1 -C4A5 1 -C89E 1 -C89F 1 -CAB0 1 -CDAA 1 -CA9C 1 -C695 1 -C7B6 1 -C4A6 1 -C4A7 1 -C9A6 1 -CAB1 1 -C9A7 1 -CABB 1 -CABD 1 -49 1 -69 1 -C38C 1 -C38D 1 -C38F 1 -C3AC 1 -C3AD 1 -C3AF 1 -C4A8 1 -C4A9 1 -C4AA 1 -C4AB 1 -C4AC 1 -C4AD 1 -C4AE 1 -C4AF 1 -C4B0 1 -C78F 1 -C790 1 -C888 1 -C889 1 -C88A 1 -C88B 1 -CDA5 1 -C4B2 1 -C4B3 1 -C38E 1 -C3AE 1 -C4B1 1 -C9AA 1 -C697 1 -C9A8 1 -C696 1 -C9A9 1 -4A 1 -6A 1 -C4B4 1 -C4B5 1 -C7B0 1 -CAB2 1 -CA9D 1 -C99F 1 -CA84 1 -4B 1 -6B 1 -C4B6 1 -C4B7 1 -C7A8 1 -C7A9 1 -C698 1 -C699 1 -CA9E 1 -4C 1 -6C 1 -C4B9 1 -C4BA 1 -C4BB 1 -C4BC 1 -C4BD 1 -C4BE 1 -CBA1 1 -C4BF 1 -C580 1 -C787 1 -C788 1 -C789 1 -CAAA 1 -CAAB 1 -CA9F 1 -C581 1 -C582 1 -C69A 1 -C9AB 1 -C9AC 1 -C9AD 1 -C8B4 1 -C9AE 1 -C69B 1 -CA8E 1 -4D 1 -6D 1 -CDAB 1 -C9B1 1 -4E 1 -6E 1 -C391 1 -C3B1 1 -C583 1 -C584 1 -C585 1 -C586 1 -C587 1 -C588 1 -C7B8 1 -C7B9 1 -C78A 1 -C78B 1 -C78C 1 -C9B4 1 -C69D 1 -C9B2 1 -C69E 1 -C8A0 1 -C9B3 1 -C8B5 1 -C58A 1 -C58B 1 -4F 1 -6F 1 -C2BA 1 -C392 1 -C393 1 -C394 1 -C395 1 -C396 1 -C3B2 1 -C3B3 1 -C3B4 1 -C3B5 1 -C3B6 1 -C58C 1 -C58D 1 -C58E 1 -C58F 1 -C590 1 -C591 1 -C6A0 1 -C6A1 1 -C791 1 -C792 1 -C7AA 1 -C7AB 1 -C7AC 1 -C7AD 1 -C88C 1 -C88D 1 -C88E 1 -C88F 1 -C8AA 1 -C8AB 1 -C8AC 1 -C8AD 1 -C8AE 1 -C8AF 1 -C8B0 1 -C8B1 1 -CDA6 1 -C592 1 -C593 1 -C9B6 1 -C398 1 -C3B8 1 -C7BE 1 -C7BF 1 -C686 1 -C994 1 -C69F 1 -C9B5 1 -C9B7 1 -C8A2 1 -C8A3 1 -50 1 -70 1 -C6A4 1 -C6A5 1 -C9B8 1 -51 1 -71 1 -CAA0 1 -C4B8 1 -52 1 -72 1 -C594 1 -C595 1 -C596 1 -C597 1 -C598 1 -C599 1 -C890 1 -C891 1 -C892 1 -C893 1 -CAB3 1 -CDAC 1 -C6A6 1 -CA80 1 -C9B9 1 -CAB4 1 -C9BA 1 -C9BB 1 -CAB5 1 -C9BC 1 -C9BD 1 -C9BE 1 -C9BF 1 -CA81 1 -CAB6 1 -53 1 -73 1 -C59A 1 -C59B 1 -C59C 1 -C59D 1 -C5A0 1 -C5A1 1 -C5BF 1 -CBA2 1 -C39F 1 -C59E 1 -C59F 1 -C898 1 -C899 1 -CA82 1 -C6A9 1 -CA83 1 -C6AA 1 -CA85 1 -CA86 1 -54 1 -74 1 -C5A4 1 -C5A5 1 -CDAD 1 -CAA8 1 -C6BE 1 -CAA6 1 -CAA7 1 -C5A2 1 -C5A3 1 -C89A 1 -C89B 1 -C5A6 1 -C5A7 1 -C6AB 1 -C6AC 1 -C6AD 1 -C6AE 1 -CA88 1 -C8B6 1 -CA87 1 -55 1 -75 1 -C399 1 -C39A 1 -C39B 1 -C39C 1 -C3B9 1 -C3BA 1 -C3BB 1 -C3BC 1 -C5A8 1 -C5A9 1 -C5AA 1 -C5AB 1 -C5AC 1 -C5AD 1 -C5AE 1 -C5AF 1 -C5B0 1 -C5B1 1 -C5B2 1 -C5B3 1 -C6AF 1 -C6B0 1 -C793 1 -C794 1 -C795 1 -C796 1 -C797 1 -C798 1 -C799 1 -C79A 1 -C79B 1 -C79C 1 -C894 1 -C895 1 -C896 1 -C897 1 -CDA7 1 -CA89 1 -C9A5 1 -CAAE 1 -CAAF 1 -C69C 1 -C9AF 1 -C9B0 1 -C6B1 1 -CA8A 1 -56 1 -76 1 -CDAE 1 -C6B2 1 -CA8B 1 -CA8C 1 -57 1 -77 1 -C5B4 1 -C5B5 1 -CAB7 1 -CA8D 1 -58 1 -78 1 -CBA3 1 -CDAF 1 -59 1 -79 1 -C39D 1 -C3BD 1 -C3BF 1 -C5B6 1 -C5B7 1 -C5B8 1 -C8B2 1 -C8B3 1 -CAB8 1 -CA8F 1 -C6B3 1 -C6B4 1 -5A 1 -7A 1 -C5B9 1 -C5BA 1 -C5BB 1 -C5BC 1 -C5BD 1 -C5BE 1 -C68D 1 -C6B5 1 -C6B6 1 -C8A4 1 -C8A5 1 -CA90 1 -CA91 1 -C6B7 1 -C7AE 1 -C7AF 1 -CA92 1 -C6B8 1 -C6B9 1 -C6BA 1 -CA93 1 -C89C 1 -C89D 1 -C39E 1 -C3BE 1 -C6BF 1 -C7B7 1 -C6BB 1 -C6A7 1 -C6A8 1 -C6BC 1 -C6BD 1 -C684 1 -C685 1 -CA94 1 -CB80 1 -CABC 1 -C589 1 -CBAE 1 -CABE 1 -CA95 1 -CBA4 1 -CABF 1 -CB81 1 -CAA1 1 -CAA2 1 -CA96 1 -C780 1 -C781 1 -C782 1 -C783 1 -CA97 1 -CA98 1 -CAAC 1 -CAAD 1 -CE86 1 -CE91 1 -CEAC 1 -CEB1 1 -CE92 1 -CEB2 1 -CF90 1 -CE93 1 -CEB3 1 -CE94 1 -CEB4 1 -CE88 1 -CE95 1 -CEAD 1 -CEB5 1 -CFB5 1 -CF9C 1 -CF9D 1 -CF9A 1 -CF9B 1 -CE96 1 -CEB6 1 -CE89 1 -CE97 1 -CEAE 1 -CEB7 1 -CE98 1 -CEB8 1 -CF91 1 -CFB4 1 -CDBA 1 -CE8A 1 -CE90 1 -CE99 1 -CEAA 1 -CEAF 1 -CEB9 1 -CF8A 1 -CFB3 1 -CE9A 1 -CEBA 1 -CFB0 1 -CF97 1 -CE9B 1 -CEBB 1 -C2B5 1 -CE9C 1 -CEBC 1 -CE9D 1 -CEBD 1 -CE9E 1 -CEBE 1 -CE8C 1 -CE9F 1 -CEBF 1 -CF8C 1 -CEA0 1 -CF80 1 -CF96 1 -CF9E 1 -CF9F 1 -CF98 1 -CF99 1 -CEA1 1 -CF81 1 -CFB1 1 -CEA3 1 -CF82 1 -CF83 1 -CFB2 1 -CFB9 1 -CEA4 1 -CF84 1 -CE8E 1 -CEA5 1 -CEAB 1 -CEB0 1 -CF85 1 -CF8B 1 -CF8D 1 -CF92 1 -CF93 1 -CF94 1 -CEA6 1 -CF86 1 -CF95 1 -CEA7 1 -CF87 1 -CEA8 1 -CF88 1 -CE8F 1 -CEA9 1 -CF89 1 -CF8E 1 -CFA0 1 -CFA1 1 -CFB7 1 -CFB8 1 -CFBA 1 -CFBB 1 -CFA2 1 -CFA3 1 -CFA4 1 -CFA5 1 -CFA6 1 -CFA7 1 -CFA8 1 -CFA9 1 -CFAA 1 -CFAB 1 -CFAC 1 -CFAD 1 -CFAE 1 -CFAF 1 -D090 1 -D0B0 1 -D390 1 -D391 1 -D392 1 -D393 1 -D398 1 -D399 1 -D39A 1 -D39B 1 -D394 1 -D395 1 -D091 1 -D0B1 1 -D092 1 -D0B2 1 -D093 1 -D0B3 1 -D290 1 -D291 1 -D292 1 -D293 1 -D294 1 -D295 1 -D094 1 -D0B4 1 -D480 1 -D481 1 -D082 1 -D192 1 -D482 1 -D483 1 -D083 1 -D193 1 -D298 1 -D299 1 -D080 1 -D081 1 -D095 1 -D0B5 1 -D190 1 -D191 1 -D396 1 -D397 1 -D084 1 -D194 1 -D096 1 -D0B6 1 -D381 1 -D382 1 -D39C 1 -D39D 1 -D296 1 -D297 1 -D097 1 -D0B7 1 -D484 1 -D485 1 -D39E 1 -D39F 1 -D085 1 -D195 1 -D3A0 1 -D3A1 1 -D486 1 -D487 1 -D08D 1 -D098 1 -D0B8 1 -D19D 1 -D3A2 1 -D3A3 1 -D28A 1 -D28B 1 -D3A4 1 -D3A5 1 -D086 1 -D196 1 -D087 1 -D197 1 -D099 1 -D0B9 1 -D088 1 -D198 1 -D09A 1 -D0BA 1 -D29A 1 -D29B 1 -D383 1 -D384 1 -D2A0 1 -D2A1 1 -D29E 1 -D29F 1 -D29C 1 -D29D 1 -D09B 1 -D0BB 1 -D385 1 -D386 1 -D089 1 -D199 1 -D488 1 -D489 1 -D09C 1 -D0BC 1 -D38D 1 -D38E 1 -D09D 1 -D0BD 1 -D389 1 -D38A 1 -D2A2 1 -D2A3 1 -D387 1 -D388 1 -D2A4 1 -D2A5 1 -D08A 1 -D19A 1 -D48A 1 -D48B 1 -D09E 1 -D0BE 1 -D3A6 1 -D3A7 1 -D3A8 1 -D3A9 1 -D3AA 1 -D3AB 1 -D09F 1 -D0BF 1 -D2A6 1 -D2A7 1 -D280 1 -D281 1 -D0A0 1 -D180 1 -D28E 1 -D28F 1 -D0A1 1 -D181 1 -D48C 1 -D48D 1 -D2AA 1 -D2AB 1 -D0A2 1 -D182 1 -D48E 1 -D48F 1 -D2AC 1 -D2AD 1 -D08B 1 -D19B 1 -D08C 1 -D19C 1 -D0A3 1 -D183 1 -D3AE 1 -D3AF 1 -D08E 1 -D19E 1 -D3B0 1 -D3B1 1 -D3B2 1 -D3B3 1 -D2AE 1 -D2AF 1 -D2B0 1 -D2B1 1 -D1B8 1 -D1B9 1 -D0A4 1 -D184 1 -D0A5 1 -D185 1 -D2B2 1 -D2B3 1 -D2BA 1 -D2BB 1 -D1A0 1 -D1A1 1 -D1BE 1 -D1BF 1 -D1BC 1 -D1BD 1 -D1BA 1 -D1BB 1 -D0A6 1 -D186 1 -D2B4 1 -D2B5 1 -D0A7 1 -D187 1 -D3B4 1 -D3B5 1 -D2B6 1 -D2B7 1 -D38B 1 -D38C 1 -D2B8 1 -D2B9 1 -D2BC 1 -D2BD 1 -D2BE 1 -D2BF 1 -D08F 1 -D19F 1 -D0A8 1 -D188 1 -D0A9 1 -D189 1 -D0AA 1 -D18A 1 -D0AB 1 -D18B 1 -D3B8 1 -D3B9 1 -D0AC 1 -D18C 1 -D28C 1 -D28D 1 -D1A2 1 -D1A3 1 -D0AD 1 -D18D 1 -D3AC 1 -D3AD 1 -D0AE 1 -D18E 1 -D0AF 1 -D18F 1 -D1A4 1 -D1A5 1 -D1A6 1 -D1A7 1 -D1AA 1 -D1AB 1 -D1A8 1 -D1A9 1 -D1AC 1 -D1AD 1 -D1AE 1 -D1AF 1 -D1B0 1 -D1B1 1 -D1B2 1 -D1B3 1 -D1B4 1 -D1B5 1 -D1B6 1 -D1B7 1 -D2A8 1 -D2A9 1 -D380 1 -D4B1 1 -D5A1 1 -D4B2 1 -D5A2 1 -D4B3 1 -D5A3 1 -D4B4 1 -D5A4 1 -D4B5 1 -D5A5 1 -D687 1 -D4B6 1 -D5A6 1 -D4B7 1 -D5A7 1 -D4B8 1 -D5A8 1 -D4B9 1 -D5A9 1 -D4BA 1 -D5AA 1 -D4BB 1 -D5AB 1 -D4BC 1 -D5AC 1 -D4BD 1 -D5AD 1 -D4BE 1 -D5AE 1 -D4BF 1 -D5AF 1 -D580 1 -D5B0 1 -D581 1 -D5B1 1 -D582 1 -D5B2 1 -D583 1 -D5B3 1 -D584 1 -D5B4 1 -D585 1 -D5B5 1 -D586 1 -D5B6 1 -D587 1 -D5B7 1 -D588 1 -D5B8 1 -D589 1 -D5B9 1 -D58A 1 -D5BA 1 -D58B 1 -D5BB 1 -D58C 1 -D5BC 1 -D58D 1 -D5BD 1 -D58E 1 -D5BE 1 -D58F 1 -D5BF 1 -D590 1 -D680 1 -D591 1 -D681 1 -D592 1 -D682 1 -D593 1 -D683 1 -D594 1 -D684 1 -D595 1 -D685 1 -D596 1 -D686 1 -D599 1 -D790 1 -D791 1 -D792 1 -D793 1 -D794 1 -D795 1 -D7B0 1 -D7B1 1 -D796 1 -D797 1 -D798 1 -D799 1 -D7B2 1 -D79A 1 -D79B 1 -D79C 1 -D79D 1 -D79E 1 -D79F 1 -D7A0 1 -D7A1 1 -D7A2 1 -D7A3 1 -D7A4 1 -D7A5 1 -D7A6 1 -D7A7 1 -D7A8 1 -D7A9 1 -D7AA 1 -D8A1 1 -D9B4 1 -DBBD 1 -D8A2 1 -D8A3 1 -D9B2 1 -D9B1 1 -D8A4 1 -D8A5 1 -D9B3 1 -D8A6 1 -D8A7 1 -D9B5 1 -D9AE 1 -D8A8 1 -D9BB 1 -D9BE 1 -DA80 1 -D8A9 1 -D8AA 1 -D8AB 1 -D9B9 1 -D9BA 1 -D9BC 1 -D9BD 1 -D9BF 1 -D8AC 1 -DA83 1 -DA84 1 -DA86 1 -DABF 1 -DA87 1 -D8AD 1 -D8AE 1 -DA81 1 -DA82 1 -DA85 1 -D8AF 1 -D8B0 1 -DA88 1 -DA89 1 -DA8A 1 -DA8B 1 -DA8C 1 -DA8D 1 -DA8E 1 -DA8F 1 -DA90 1 -DBAE 1 -D8B1 1 -D8B2 1 -DA91 1 -DA92 1 -DA93 1 -DA94 1 -DA95 1 -DA96 1 -DA97 1 -DA98 1 -DA99 1 -DBAF 1 -D8B3 1 -D8B4 1 -DA9A 1 -DA9B 1 -DA9C 1 -DBBA 1 -D8B5 1 -D8B6 1 -DA9D 1 -DA9E 1 -DBBB 1 -D8B7 1 -D8B8 1 -DA9F 1 -D8B9 1 -D8BA 1 -DAA0 1 -DBBC 1 -D981 1 -DAA1 1 -DAA2 1 -DAA3 1 -DAA4 1 -DAA5 1 -DAA6 1 -D9AF 1 -D982 1 -DAA7 1 -DAA8 1 -D983 1 -DAA9 1 -DAAA 1 -DAAB 1 -DAAC 1 -DAAD 1 -DAAE 1 -DAAF 1 -DAB0 1 -DAB1 1 -DAB2 1 -DAB3 1 -DAB4 1 -D984 1 -DAB5 1 -DAB6 1 -DAB7 1 -DAB8 1 -D985 1 -DBBE 1 -D986 1 -DABA 1 -DABB 1 -DABC 1 -DABD 1 -DAB9 1 -D987 1 -DABE 1 -DB81 1 -DB82 1 -DB83 1 -DBBF 1 -DB80 1 -DB95 1 -D988 1 -DBA5 1 -D9B6 1 -DB84 1 -DB85 1 -DB86 1 -DB87 1 -D9B7 1 -DB88 1 -DB89 1 -DB8A 1 -DB8B 1 -DB8F 1 -D989 1 -D98A 1 -DBA6 1 -D9B8 1 -DB8C 1 -DB8D 1 -DB8E 1 -DB90 1 -DB91 1 -DB92 1 -DB93 1 -DC90 1 -DC92 1 -DCAD 1 -DC93 1 -DC94 1 -DCAE 1 -DC96 1 -DC95 1 -DCAF 1 -DC97 1 -DC98 1 -DC99 1 -DD8D 1 -DC9A 1 -DC9B 1 -DC9C 1 -DC9D 1 -DC9E 1 -DC9F 1 -DD8E 1 -DCA0 1 -DCA1 1 -DCA2 1 -DCA3 1 -DCA4 1 -DCA5 1 -DCA6 1 -DCA7 1 -DD8F 1 -DCA8 1 -DCA9 1 -DCAA 1 -DCAB 1 -DCAC 1 -DE80 1 -DE99 1 -DE9A 1 -DE81 1 -DE82 1 -DE83 1 -DE9C 1 -DE84 1 -DE85 1 -DE86 1 -DE87 1 -DEA2 1 -DEA3 1 -DE88 1 -DEA5 1 -DE89 1 -DE8A 1 -DE8B 1 -DE9B 1 -DE8C 1 -DE98 1 -DEA0 1 -DEA1 1 -DE8D 1 -DE8E 1 -DEA4 1 -DE8F 1 -DE90 1 -DE9D 1 -DE9E 1 -DE9F 1 -DE91 1 -DE92 1 -DE93 1 -DE94 1 -DE95 1 -DE96 1 -DE97 1 -DEB1 1 -DEA6 1 -DEA7 1 -DEA8 1 -DEA9 1 -DEAA 1 -DEAB 1 -DEAC 1 -DEAD 1 -DEAE 1 -DEAF 1 -DEB0 1 -E4B880 1 -E4B881 1 -E4B882 1 -E4B883 1 -E4B884 1 -E4B885 1 -E4B886 1 -E4B887 1 -E4B888 1 -E4B889 1 -E4B88A 1 -E4B88B 1 -E4B88C 1 -E4B88D 1 -E4B88E 1 -E4B88F 1 -E4B890 1 -E4B891 1 -E4B892 1 -E4B893 1 -E4B894 1 -E4B895 1 -E4B896 1 -E4B897 1 -E4B898 1 -E4B899 1 -E4B89A 1 -E4B89B 1 -E4B89C 1 -E4B89D 1 -E4B89E 1 -E4B89F 1 -E4B8A0 1 -E4B8A1 1 -E4B8A2 1 -E4B8A3 1 -E4B8A4 1 -E4B8A5 1 -E4B8A6 1 -E4B8A7 1 -E4B8A8 1 -E4B8A9 1 -E4B8AA 1 -E4B8AB 1 -E4B8AC 1 -E4B8AD 1 -E4B8AE 1 -E4B8AF 1 -E4B8B0 1 -E4B8B1 1 -E4B8B2 1 -E4B8B3 1 -E4B8B4 1 -E4B8B5 1 -E4B8B6 1 -E4B8B7 1 -E4B8B8 1 -E4B8B9 1 -E4B8BA 1 -E4B8BB 1 -E4B8BC 1 -E4B8BD 1 -E4B8BE 1 -E4B8BF 1 -E4B980 1 -E4B981 1 -E4B982 1 -E4B983 1 -E4B984 1 -E4B985 1 -E4B986 1 -E4B987 1 -E4B988 1 -E4B989 1 -E4B98A 1 -E4B98B 1 -E4B98C 1 -E4B98D 1 -E4B98E 1 -E4B98F 1 -E4B990 1 -E4B991 1 -E4B992 1 -E4B993 1 -E4B994 1 -E4B995 1 -E4B996 1 -E4B997 1 -E4B998 1 -E4B999 1 -E4B99A 1 -E4B99B 1 -E4B99C 1 -E4B99D 1 -E4B99E 1 -E4B99F 1 -E4B9A0 1 -E4B9A1 1 -E4B9A2 1 -E4B9A3 1 -E4B9A4 1 -E4B9A5 1 -E4B9A6 1 -E4B9A7 1 -E4B9A8 1 -E4B9A9 1 -E4B9AA 1 -E4B9AB 1 -E4B9AC 1 -E4B9AD 1 -E4B9AE 1 -E4B9AF 1 -E4B9B0 1 -E4B9B1 1 -E4B9B2 1 -E4B9B3 1 -E4B9B4 1 -E4B9B5 1 -E4B9B6 1 -E4B9B7 1 -E4B9B8 1 -E4B9B9 1 -E4B9BA 1 -E4B9BB 1 -E4B9BC 1 -E4B9BD 1 -E4B9BE 1 -E4B9BF 1 -E4BA80 1 -E4BA81 1 -E4BA82 1 -E4BA83 1 -E4BA84 1 -E4BA85 1 -E4BA86 1 -E4BA87 1 -E4BA88 1 -E4BA89 1 -E4BA8A 1 -E4BA8B 1 -E4BA8C 1 -E4BA8D 1 -E4BA8E 1 -E4BA8F 1 -E4BA90 1 -E4BA91 1 -E4BA92 1 -E4BA93 1 -E4BA94 1 -E4BA95 1 -E4BA96 1 -E4BA97 1 -E4BA98 1 -E4BA99 1 -E4BA9A 1 -E4BA9B 1 -E4BA9C 1 -E4BA9D 1 -E4BA9E 1 -E4BA9F 1 -E4BAA0 1 -E4BAA1 1 -E4BAA2 1 -E4BAA3 1 -E4BAA4 1 -E4BAA5 1 -E4BAA6 1 -E4BAA7 1 -E4BAA8 1 -E4BAA9 1 -E4BAAA 1 -E4BAAB 1 -E4BAAC 1 -E4BAAD 1 -E4BAAE 1 -E4BAAF 1 -E4BAB0 1 -E4BAB1 1 -E4BAB2 1 -E4BAB3 1 -E4BAB4 1 -E4BAB5 1 -E4BAB6 1 -E4BAB7 1 -E4BAB8 1 -E4BAB9 1 -E4BABA 1 -E4BABB 1 -E4BABC 1 -E4BABD 1 -E4BABE 1 -E4BABF 1 -E4BB80 1 -E4BB81 1 -E4BB82 1 -E4BB83 1 -E4BB84 1 -E4BB85 1 -E4BB86 1 -E4BB87 1 -E4BB88 1 -E4BB89 1 -E4BB8A 1 -E4BB8B 1 -E4BB8C 1 -E4BB8D 1 -E4BB8E 1 -E4BB8F 1 -E4BB90 1 -E4BB91 1 -E4BB92 1 -E4BB93 1 -E4BB94 1 -E4BB95 1 -E4BB96 1 -E4BB97 1 -E4BB98 1 -E4BB99 1 -E4BB9A 1 -E4BB9B 1 -E4BB9C 1 -E4BB9D 1 -E4BB9E 1 -E4BB9F 1 -E4BBA0 1 -E4BBA1 1 -E4BBA2 1 -E4BBA3 1 -E4BBA4 1 -E4BBA5 1 -E4BBA6 1 -E4BBA7 1 -E4BBA8 1 -E4BBA9 1 -E4BBAA 1 -E4BBAB 1 -E4BBAC 1 -E4BBAD 1 -E4BBAE 1 -E4BBAF 1 -E4BBB0 1 -E4BBB1 1 -E4BBB2 1 -E4BBB3 1 -E4BBB4 1 -E4BBB5 1 -E4BBB6 1 -E4BBB7 1 -E4BBB8 1 -E4BBB9 1 -E4BBBA 1 -E4BBBB 1 -E4BBBC 1 -E4BBBD 1 -E4BBBE 1 -E4BBBF 1 -E4BC80 1 -E4BC81 1 -E4BC82 1 -E4BC83 1 -E4BC84 1 -E4BC85 1 -E4BC86 1 -E4BC87 1 -E4BC88 1 -E4BC89 1 -E4BC8A 1 -E4BC8B 1 -E4BC8C 1 -E4BC8D 1 -E4BC8E 1 -E4BC8F 1 -E4BC90 1 -E4BC91 1 -E4BC92 1 -E4BC93 1 -E4BC94 1 -E4BC95 1 -E4BC96 1 -E4BC97 1 -E4BC98 1 -E4BC99 1 -E4BC9A 1 -E4BC9B 1 -E4BC9C 1 -E4BC9D 1 -E4BC9E 1 -E4BC9F 1 -E4BCA0 1 -E4BCA1 1 -E4BCA2 1 -E4BCA3 1 -E4BCA4 1 -E4BCA5 1 -E4BCA6 1 -E4BCA7 1 -E4BCA8 1 -E4BCA9 1 -E4BCAA 1 -E4BCAB 1 -E4BCAC 1 -E4BCAD 1 -E4BCAE 1 -E4BCAF 1 -E4BCB0 1 -E4BCB1 1 -E4BCB2 1 -E4BCB3 1 -E4BCB4 1 -E4BCB5 1 -E4BCB6 1 -E4BCB7 1 -E4BCB8 1 -E4BCB9 1 -E4BCBA 1 -E4BCBB 1 -E4BCBC 1 -E4BCBD 1 -E4BCBE 1 -E4BCBF 1 -E4BD80 1 -E4BD81 1 -E4BD82 1 -E4BD83 1 -E4BD84 1 -E4BD85 1 -E4BD86 1 -E4BD87 1 -E4BD88 1 -E4BD89 1 -E4BD8A 1 -E4BD8B 1 -E4BD8C 1 -E4BD8D 1 -E4BD8E 1 -E4BD8F 1 -E4BD90 1 -E4BD91 1 -E4BD92 1 -E4BD93 1 -E4BD94 1 -E4BD95 1 -E4BD96 1 -E4BD97 1 -E4BD98 1 -E4BD99 1 -E4BD9A 1 -E4BD9B 1 -E4BD9C 1 -E4BD9D 1 -E4BD9E 1 -E4BD9F 1 -E4BDA0 1 -E4BDA1 1 -E4BDA2 1 -E4BDA3 1 -E4BDA4 1 -E4BDA5 1 -E4BDA6 1 -E4BDA7 1 -E4BDA8 1 -E4BDA9 1 -E4BDAA 1 -E4BDAB 1 -E4BDAC 1 -E4BDAD 1 -E4BDAE 1 -E4BDAF 1 -E4BDB0 1 -E4BDB1 1 -E4BDB2 1 -E4BDB3 1 -E4BDB4 1 -E4BDB5 1 -E4BDB6 1 -E4BDB7 1 -E4BDB8 1 -E4BDB9 1 -E4BDBA 1 -E4BDBB 1 -E4BDBC 1 -E4BDBD 1 -E4BDBE 1 -E4BDBF 1 -E4BE80 1 -E4BE81 1 -E4BE82 1 -E4BE83 1 -E4BE84 1 -E4BE85 1 -E4BE86 1 -E4BE87 1 -E4BE88 1 -E4BE89 1 -E4BE8A 1 -E4BE8B 1 -E4BE8C 1 -E4BE8D 1 -E4BE8E 1 -E4BE8F 1 -E4BE90 1 -E4BE91 1 -E4BE92 1 -E4BE93 1 -E4BE94 1 -E4BE95 1 -E4BE96 1 -E4BE97 1 -E4BE98 1 -E4BE99 1 -E4BE9A 1 -E4BE9B 1 -E4BE9C 1 -E4BE9D 1 -E4BE9E 1 -E4BE9F 1 -E4BEA0 1 -E4BEA1 1 -E4BEA2 1 -E4BEA3 1 -E4BEA4 1 -E4BEA5 1 -E4BEA6 1 -E4BEA7 1 -E4BEA8 1 -E4BEA9 1 -E4BEAA 1 -E4BEAB 1 -E4BEAC 1 -E4BEAD 1 -E4BEAE 1 -E4BEAF 1 -E4BEB0 1 -E4BEB1 1 -E4BEB2 1 -E4BEB3 1 -E4BEB4 1 -E4BEB5 1 -E4BEB6 1 -E4BEB7 1 -E4BEB8 1 -E4BEB9 1 -E4BEBA 1 -E4BEBB 1 -E4BEBC 1 -E4BEBD 1 -E4BEBE 1 -E4BEBF 1 -E4BF80 1 -E4BF81 1 -E4BF82 1 -E4BF83 1 -E4BF84 1 -E4BF85 1 -E4BF86 1 -E4BF87 1 -E4BF88 1 -E4BF89 1 -E4BF8A 1 -E4BF8B 1 -E4BF8C 1 -E4BF8D 1 -E4BF8E 1 -E4BF8F 1 -E4BF90 1 -E4BF91 1 -E4BF92 1 -E4BF93 1 -E4BF94 1 -E4BF95 1 -E4BF96 1 -E4BF97 1 -E4BF98 1 -E4BF99 1 -E4BF9A 1 -E4BF9B 1 -E4BF9C 1 -E4BF9D 1 -E4BF9E 1 -E4BF9F 1 -E4BFA0 1 -E4BFA1 1 -E4BFA2 1 -E4BFA3 1 -E4BFA4 1 -E4BFA5 1 -E4BFA6 1 -E4BFA7 1 -E4BFA8 1 -E4BFA9 1 -E4BFAA 1 -E4BFAB 1 -E4BFAC 1 -E4BFAD 1 -E4BFAE 1 -E4BFAF 1 -E4BFB0 1 -E4BFB1 1 -E4BFB2 1 -E4BFB3 1 -E4BFB4 1 -E4BFB5 1 -E4BFB6 1 -E4BFB7 1 -E4BFB8 1 -E4BFB9 1 -E4BFBA 1 -E4BFBB 1 -E4BFBC 1 -E4BFBD 1 -E4BFBE 1 -E4BFBF 1 -C8B7 1 -C8B8 1 -C8B9 1 -C8BA 1 -C8BB 1 -C8BC 1 -C8BD 1 -C8BE 1 -C8BF 1 -C980 1 -C981 1 -C982 1 -C983 1 -C984 1 -C985 1 -C986 1 -C987 1 -C988 1 -C989 1 -C98A 1 -C98B 1 -C98C 1 -C98D 1 -C98E 1 -C98F 1 -CD98 1 -CD99 1 -CD9A 1 -CD9B 1 -CD9C 1 -CDB0 1 -CDB1 1 -CDB2 1 -CDB3 1 -CDB6 1 -CDB7 1 -CDB8 1 -CDB9 1 -CDBB 1 -CDBC 1 -CDBD 1 -CDBF 1 -CE80 1 -CE81 1 -CE82 1 -CE83 1 -CE8B 1 -CE8D 1 -CEA2 1 -CF8F 1 -CFBC 1 -CFBD 1 -CFBE 1 -CFBF 1 -D287 1 -D38F 1 -D3B6 1 -D3B7 1 -D3BA 1 -D3BB 1 -D3BC 1 -D3BD 1 -D3BE 1 -D3BF 1 -D490 1 -D491 1 -D492 1 -D493 1 -D494 1 -D495 1 -D496 1 -D497 1 -D498 1 -D499 1 -D49A 1 -D49B 1 -D49C 1 -D49D 1 -D49E 1 -D49F 1 -D4A0 1 -D4A1 1 -D4A2 1 -D4A3 1 -D4A4 1 -D4A5 1 -D4A6 1 -D4A7 1 -D4A8 1 -D4A9 1 -D4AA 1 -D4AB 1 -D4AC 1 -D4AD 1 -D4AE 1 -D4AF 1 -D4B0 1 -D597 1 -D598 1 -D5A0 1 -D688 1 -D68B 1 -D68C 1 -D68D 1 -D68E 1 -D68F 1 -D690 1 -D6A2 1 -D6BA 1 -D785 1 -D786 1 -D787 1 -D788 1 -D789 1 -D78A 1 -D78B 1 -D78C 1 -D78D 1 -D78E 1 -D78F 1 -D7AB 1 -D7AC 1 -D7AD 1 -D7AE 1 -D7AF 1 -D7B5 1 -D7B6 1 -D7B7 1 -D7B8 1 -D7B9 1 -D7BA 1 -D7BB 1 -D7BC 1 -D7BD 1 -D7BE 1 -D7BF 1 -D884 1 -D885 1 -D886 1 -D887 1 -D888 1 -D889 1 -D88A 1 -D88B 1 -D896 1 -D897 1 -D898 1 -D899 1 -D89A 1 -D89C 1 -D89D 1 -D89E 1 -D8A0 1 -D8BB 1 -D8BC 1 -D8BD 1 -D8BE 1 -D8BF 1 -D999 1 -D99A 1 -D99B 1 -D99C 1 -D99D 1 -D99E 1 -D99F 1 -DC8E 1 -DD8B 1 -DD8C 1 -DD90 1 -DD91 1 -DD92 1 -DD93 1 -DD94 1 -DD95 1 -DD96 1 -DD97 1 -DD98 1 -DD99 1 -DD9A 1 -DD9B 1 -DD9C 1 -DD9D 1 -DD9E 1 -DD9F 1 -DDA0 1 -DDA1 1 -DDA2 1 -DDA3 1 -DDA4 1 -DDA5 1 -DDA6 1 -DDA7 1 -DDA8 1 -DDA9 1 -DDAA 1 -DDAB 1 -DDAC 1 -DDAD 1 -DDAE 1 -DDAF 1 -DDB0 1 -DDB1 1 -DDB2 1 -DDB3 1 -DDB4 1 -DDB5 1 -DDB6 1 -DDB7 1 -DDB8 1 -DDB9 1 -DDBA 1 -DDBB 1 -DDBC 1 -DDBD 1 -DDBE 1 -DDBF 1 -DEB2 1 -DEB3 1 -DEB4 1 -DEB5 1 -DEB6 1 -DEB7 1 -DEB8 1 -DEB9 1 -DEBA 1 -DEBB 1 -DEBC 1 -DEBD 1 -DEBE 1 -DEBF 1 -DF80 1 -DF81 1 -DF82 1 -DF83 1 -DF84 1 -DF85 1 -DF86 1 -DF87 1 -DF88 1 -DF89 1 -DF8A 1 -DF8B 1 -DF8C 1 -DF8D 1 -DF8E 1 -DF8F 1 -DF90 1 -DF91 1 -DF92 1 -DF93 1 -DF94 1 -DF95 1 -DF96 1 -DF97 1 -DF98 1 -DF99 1 -DF9A 1 -DF9B 1 -DF9C 1 -DF9D 1 -DF9E 1 -DF9F 1 -DFA0 1 -DFA1 1 -DFA2 1 -DFA3 1 -DFA4 1 -DFA5 1 -DFA6 1 -DFA7 1 -DFA8 1 -DFA9 1 -DFAA 1 -DFAB 1 -DFAC 1 -DFAD 1 -DFAE 1 -DFAF 1 -DFB0 1 -DFB1 1 -DFB2 1 -DFB3 1 -DFB4 1 -DFB5 1 -DFB6 1 -DFB7 1 -DFB8 1 -DFB9 1 -DFBA 1 -DFBB 1 -DFBC 1 -DFBD 1 -DFBE 1 -DFBF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_slovak_ci) ENGINE=NDB CHARACTER SET utf8 COLLATE utf8_slovak_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_slovak_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -C285 1 -7F 1 -C280 1 -C281 1 -C282 1 -C283 1 -C284 1 -C286 1 -C287 1 -C288 1 -C289 1 -C28A 1 -C28B 1 -C28C 1 -C28D 1 -C28E 1 -C28F 1 -C290 1 -C291 1 -C292 1 -C293 1 -C294 1 -C295 1 -C296 1 -C297 1 -C298 1 -C299 1 -C29A 1 -C29B 1 -C29C 1 -C29D 1 -C29E 1 -C29F 1 -C2A0 1 -CC80 1 -CC81 1 -CC82 1 -CC83 1 -CC84 1 -CC85 1 -CC86 1 -CC87 1 -CC88 1 -CC89 1 -CC8A 1 -CC8B 1 -CC8C 1 -CC8D 1 -CC8E 1 -CC8F 1 -CC90 1 -CC91 1 -CC92 1 -CC93 1 -CC94 1 -CC95 1 -CC96 1 -CC97 1 -CC98 1 -CC99 1 -CC9A 1 -CC9B 1 -CC9C 1 -CC9D 1 -CC9E 1 -CC9F 1 -CCA0 1 -CCA1 1 -CCA2 1 -CCA3 1 -CCA4 1 -CCA5 1 -CCA6 1 -CCA7 1 -CCA8 1 -CCA9 1 -CCAA 1 -CCAB 1 -CCAC 1 -CCAD 1 -CCAE 1 -CCAF 1 -CCB0 1 -CCB1 1 -CCB2 1 -CCB3 1 -CCB4 1 -CCB5 1 -CCB6 1 -CCB7 1 -CCB8 1 -CCB9 1 -CCBA 1 -CCBB 1 -CCBC 1 -CCBD 1 -CCBE 1 -CCBF 1 -CD80 1 -CD81 1 -CD82 1 -CD83 1 -CD84 1 -CD85 1 -CD86 1 -CD87 1 -CD88 1 -CD89 1 -CD8A 1 -CD8B 1 -CD8C 1 -CD8D 1 -CD8E 1 -CD8F 1 -CD90 1 -CD91 1 -CD92 1 -CD93 1 -CD94 1 -CD95 1 -CD96 1 -CD97 1 -CD9D 1 -CD9E 1 -CD9F 1 -CDA0 1 -CDA1 1 -CDA2 1 -D283 1 -D284 1 -D285 1 -D286 1 -D288 1 -D289 1 -D691 1 -D692 1 -D693 1 -D694 1 -D695 1 -D696 1 -D697 1 -D698 1 -D699 1 -D69A 1 -D69B 1 -D69C 1 -D69D 1 -D69E 1 -D69F 1 -D6A0 1 -D6A1 1 -D6A3 1 -D6A4 1 -D6A5 1 -D6A6 1 -D6A7 1 -D6A8 1 -D6A9 1 -D6AA 1 -D6AB 1 -D6AC 1 -D6AD 1 -D6AE 1 -D6AF 1 -D6B0 1 -D6B1 1 -D6B2 1 -D6B3 1 -D6B4 1 -D6B5 1 -D6B6 1 -D6B7 1 -D6B8 1 -D6B9 1 -D6BB 1 -D6BC 1 -D6BD 1 -D6BF 1 -D781 1 -D782 1 -D784 1 -D880 1 -D881 1 -D882 1 -D883 1 -D890 1 -D891 1 -D892 1 -D893 1 -D894 1 -D895 1 -D98B 1 -D98C 1 -D98D 1 -D98E 1 -D98F 1 -D990 1 -D991 1 -D992 1 -D993 1 -D994 1 -D995 1 -D996 1 -D997 1 -D998 1 -D9B0 1 -DB96 1 -DB97 1 -DB98 1 -DB99 1 -DB9A 1 -DB9B 1 -DB9C 1 -DB9D 1 -DB9E 1 -DB9F 1 -DBA0 1 -DBA1 1 -DBA2 1 -DBA3 1 -DBA4 1 -DBA7 1 -DBA8 1 -DBAA 1 -DBAB 1 -DBAC 1 -DBAD 1 -DC8F 1 -DC91 1 -DCB0 1 -DCB1 1 -DCB2 1 -DCB3 1 -DCB4 1 -DCB5 1 -DCB6 1 -DCB7 1 -DCB8 1 -DCB9 1 -DCBA 1 -DCBB 1 -DCBC 1 -DCBD 1 -DCBE 1 -DCBF 1 -DD80 1 -DD81 1 -DD82 1 -DD83 1 -DD84 1 -DD85 1 -DD86 1 -DD87 1 -DD88 1 -DD89 1 -DD8A 1 -D980 1 -60 1 -C2B4 1 -CE84 1 -CB9C 1 -5E 1 -C2AF 1 -CB98 1 -CB99 1 -C2A8 1 -CE85 1 -CB9A 1 -CB9D 1 -C2B8 1 -CB9B 1 -5F 1 -C2AD 1 -2D 1 -D68A 1 -2C 1 -D59D 1 -D88C 1 -D88D 1 -D9AB 1 -D9AC 1 -3B 1 -CDBE 1 -D89B 1 -3A 1 -D689 1 -DC83 1 -DC84 1 -DC85 1 -DC86 1 -DC87 1 -DC88 1 -21 1 -C2A1 1 -D59C 1 -3F 1 -C2BF 1 -D59E 1 -D89F 1 -DC89 1 -2E 1 -DB94 1 -DC81 1 -DC82 1 -C2B7 1 -CE87 1 -DC80 1 -27 1 -22 1 -C2AB 1 -C2BB 1 -28 1 -29 1 -5B 1 -7B 1 -7D 1 -C2A7 1 -C2B6 1 -C2A9 1 -C2AE 1 -40 1 -2A 1 -D9AD 1 -2F 1 -26 1 -23 1 -25 1 -D9AA 1 -D59A 1 -D59B 1 -D59F 1 -D6BE 1 -D780 1 -D783 1 -D7B3 1 -D7B4 1 -DC8A 1 -DC8B 1 -DC8C 1 -DC8D 1 -CAB9 1 -CDB4 1 -CDB5 1 -CABA 1 -CB82 1 -CB83 1 -CB84 1 -CB85 1 -CB86 1 -CB87 1 -CB88 1 -CB89 1 -CB8A 1 -CB8B 1 -CB8C 1 -CB8D 1 -CB8E 1 -CB8F 1 -CB92 1 -CB93 1 -CB94 1 -CB95 1 -CB96 1 -CB97 1 -CB9E 1 -CB9F 1 -CBA5 1 -CBA6 1 -CBA7 1 -CBA8 1 -CBA9 1 -CBAA 1 -CBAB 1 -CBAC 1 -CBAD 1 -CBAF 1 -CBB0 1 -CBB1 1 -CBB2 1 -CBB3 1 -CBB4 1 -CBB5 1 -CBB6 1 -CBB7 1 -CBB8 1 -CBB9 1 -CBBA 1 -CBBB 1 -CBBC 1 -CBBD 1 -CBBE 1 -CBBF 1 -C2B0 1 -D282 1 -D88E 1 -D88F 1 -DBA9 1 -CFB6 1 -2B 1 -C2B1 1 -C3B7 1 -C397 1 -3C 1 -3D 1 -3E 1 -C2AC 1 -7C 1 -C2A6 1 -7E 1 -CB90 1 -CB91 1 -C2A4 1 -C2A2 1 -24 1 -C2A3 1 -C2A5 1 -30 1 -D9A0 1 -DBB0 1 -31 1 -C2B9 1 -D9A1 1 -DBB1 1 -C2BD 1 -C2BC 1 -32 1 -C2B2 1 -D9A2 1 -DBB2 1 -33 1 -C2B3 1 -D9A3 1 -DBB3 1 -C2BE 1 -34 1 -D9A4 1 -DBB4 1 -35 1 -D9A5 1 -DBB5 1 -36 1 -D9A6 1 -DBB6 1 -37 1 -D9A7 1 -DBB7 1 -38 1 -D9A8 1 -DBB8 1 -39 1 -D9A9 1 -DBB9 1 -41 1 -61 1 -C2AA 1 -C380 1 -C381 1 -C382 1 -C383 1 -C385 1 -C3A0 1 -C3A1 1 -C3A2 1 -C3A3 1 -C3A5 1 -C480 1 -C481 1 -C482 1 -C483 1 -C484 1 -C485 1 -C78D 1 -C78E 1 -C79E 1 -C79F 1 -C7A0 1 -C7A1 1 -C7BA 1 -C7BB 1 -C880 1 -C881 1 -C882 1 -C883 1 -C8A6 1 -C8A7 1 -CDA3 1 -C384 1 -C3A4 1 -C386 1 -C3A6 1 -C7A2 1 -C7A3 1 -C7BC 1 -C7BD 1 -C990 1 -C991 1 -C992 1 -42 1 -62 1 -CA99 1 -C680 1 -C681 1 -C993 1 -C682 1 -C683 1 -43 1 -63 1 -C387 1 -C3A7 1 -C486 1 -C487 1 -C488 1 -C489 1 -C48A 1 -C48B 1 -CDA8 1 -C48C 1 -C48D 1 -C687 1 -C688 1 -C995 1 -44 1 -64 1 -C48E 1 -C48F 1 -CDA9 1 -C784 1 -C785 1 -C786 1 -C7B1 1 -C7B2 1 -C7B3 1 -CAA3 1 -CAA5 1 -CAA4 1 -C490 1 -C491 1 -C689 1 -C996 1 -C68A 1 -C997 1 -C68B 1 -C68C 1 -C8A1 1 -C390 1 -C3B0 1 -45 1 -65 1 -C388 1 -C389 1 -C38A 1 -C38B 1 -C3A8 1 -C3A9 1 -C3AA 1 -C3AB 1 -C492 1 -C493 1 -C494 1 -C495 1 -C496 1 -C497 1 -C498 1 -C499 1 -C49A 1 -C49B 1 -C884 1 -C885 1 -C886 1 -C887 1 -C8A8 1 -C8A9 1 -CDA4 1 -C68E 1 -C79D 1 -C68F 1 -C999 1 -C690 1 -C99B 1 -C998 1 -C99A 1 -C99C 1 -C99D 1 -C99E 1 -CA9A 1 -C9A4 1 -46 1 -66 1 -CAA9 1 -C691 1 -C692 1 -47 1 -67 1 -C49C 1 -C49D 1 -C49E 1 -C49F 1 -C4A0 1 -C4A1 1 -C4A2 1 -C4A3 1 -C7A6 1 -C7A7 1 -C7B4 1 -C7B5 1 -C9A1 1 -C9A2 1 -C7A4 1 -C7A5 1 -C693 1 -C9A0 1 -CA9B 1 -C694 1 -C9A3 1 -CBA0 1 -C6A2 1 -C6A3 1 -48 1 -68 1 -C4A4 1 -C4A5 1 -C89E 1 -C89F 1 -CAB0 1 -CDAA 1 -CA9C 1 -C695 1 -C7B6 1 -C4A6 1 -C4A7 1 -C9A6 1 -CAB1 1 -C9A7 1 -CABB 1 -CABD 1 -49 1 -69 1 -C38C 1 -C38D 1 -C38E 1 -C38F 1 -C3AC 1 -C3AD 1 -C3AE 1 -C3AF 1 -C4A8 1 -C4A9 1 -C4AA 1 -C4AB 1 -C4AC 1 -C4AD 1 -C4AE 1 -C4AF 1 -C4B0 1 -C78F 1 -C790 1 -C888 1 -C889 1 -C88A 1 -C88B 1 -CDA5 1 -C4B2 1 -C4B3 1 -C4B1 1 -C9AA 1 -C697 1 -C9A8 1 -C696 1 -C9A9 1 -4A 1 -6A 1 -C4B4 1 -C4B5 1 -C7B0 1 -CAB2 1 -CA9D 1 -C99F 1 -CA84 1 -4B 1 -6B 1 -C4B6 1 -C4B7 1 -C7A8 1 -C7A9 1 -C698 1 -C699 1 -CA9E 1 -4C 1 -6C 1 -C4B9 1 -C4BA 1 -C4BB 1 -C4BC 1 -C4BD 1 -C4BE 1 -CBA1 1 -C4BF 1 -C580 1 -C787 1 -C788 1 -C789 1 -CAAA 1 -CAAB 1 -CA9F 1 -C581 1 -C582 1 -C69A 1 -C9AB 1 -C9AC 1 -C9AD 1 -C8B4 1 -C9AE 1 -C69B 1 -CA8E 1 -4D 1 -6D 1 -CDAB 1 -C9B1 1 -4E 1 -6E 1 -C391 1 -C3B1 1 -C583 1 -C584 1 -C585 1 -C586 1 -C587 1 -C588 1 -C7B8 1 -C7B9 1 -C78A 1 -C78B 1 -C78C 1 -C9B4 1 -C69D 1 -C9B2 1 -C69E 1 -C8A0 1 -C9B3 1 -C8B5 1 -C58A 1 -C58B 1 -4F 1 -6F 1 -C2BA 1 -C392 1 -C393 1 -C395 1 -C396 1 -C3B2 1 -C3B3 1 -C3B5 1 -C3B6 1 -C58C 1 -C58D 1 -C58E 1 -C58F 1 -C590 1 -C591 1 -C6A0 1 -C6A1 1 -C791 1 -C792 1 -C7AA 1 -C7AB 1 -C7AC 1 -C7AD 1 -C88C 1 -C88D 1 -C88E 1 -C88F 1 -C8AA 1 -C8AB 1 -C8AC 1 -C8AD 1 -C8AE 1 -C8AF 1 -C8B0 1 -C8B1 1 -CDA6 1 -C592 1 -C593 1 -C394 1 -C3B4 1 -C9B6 1 -C398 1 -C3B8 1 -C7BE 1 -C7BF 1 -C686 1 -C994 1 -C69F 1 -C9B5 1 -C9B7 1 -C8A2 1 -C8A3 1 -50 1 -70 1 -C6A4 1 -C6A5 1 -C9B8 1 -51 1 -71 1 -CAA0 1 -C4B8 1 -52 1 -72 1 -C594 1 -C595 1 -C596 1 -C597 1 -C598 1 -C599 1 -C890 1 -C891 1 -C892 1 -C893 1 -CAB3 1 -CDAC 1 -C6A6 1 -CA80 1 -C9B9 1 -CAB4 1 -C9BA 1 -C9BB 1 -CAB5 1 -C9BC 1 -C9BD 1 -C9BE 1 -C9BF 1 -CA81 1 -CAB6 1 -53 1 -73 1 -C59A 1 -C59B 1 -C59C 1 -C59D 1 -C59E 1 -C59F 1 -C5BF 1 -C898 1 -C899 1 -CBA2 1 -C39F 1 -C5A0 1 -C5A1 1 -CA82 1 -C6A9 1 -CA83 1 -C6AA 1 -CA85 1 -CA86 1 -54 1 -74 1 -C5A2 1 -C5A3 1 -C5A4 1 -C5A5 1 -C89A 1 -C89B 1 -CDAD 1 -CAA8 1 -C6BE 1 -CAA6 1 -CAA7 1 -C5A6 1 -C5A7 1 -C6AB 1 -C6AC 1 -C6AD 1 -C6AE 1 -CA88 1 -C8B6 1 -CA87 1 -55 1 -75 1 -C399 1 -C39A 1 -C39B 1 -C39C 1 -C3B9 1 -C3BA 1 -C3BB 1 -C3BC 1 -C5A8 1 -C5A9 1 -C5AA 1 -C5AB 1 -C5AC 1 -C5AD 1 -C5AE 1 -C5AF 1 -C5B0 1 -C5B1 1 -C5B2 1 -C5B3 1 -C6AF 1 -C6B0 1 -C793 1 -C794 1 -C795 1 -C796 1 -C797 1 -C798 1 -C799 1 -C79A 1 -C79B 1 -C79C 1 -C894 1 -C895 1 -C896 1 -C897 1 -CDA7 1 -CA89 1 -C9A5 1 -CAAE 1 -CAAF 1 -C69C 1 -C9AF 1 -C9B0 1 -C6B1 1 -CA8A 1 -56 1 -76 1 -CDAE 1 -C6B2 1 -CA8B 1 -CA8C 1 -57 1 -77 1 -C5B4 1 -C5B5 1 -CAB7 1 -CA8D 1 -58 1 -78 1 -CBA3 1 -CDAF 1 -59 1 -79 1 -C39D 1 -C3BD 1 -C3BF 1 -C5B6 1 -C5B7 1 -C5B8 1 -C8B2 1 -C8B3 1 -CAB8 1 -CA8F 1 -C6B3 1 -C6B4 1 -5A 1 -7A 1 -C5B9 1 -C5BA 1 -C5BB 1 -C5BC 1 -C68D 1 -C5BD 1 -C5BE 1 -C6B5 1 -C6B6 1 -C8A4 1 -C8A5 1 -CA90 1 -CA91 1 -C6B7 1 -C7AE 1 -C7AF 1 -CA92 1 -C6B8 1 -C6B9 1 -C6BA 1 -CA93 1 -C89C 1 -C89D 1 -C39E 1 -C3BE 1 -C6BF 1 -C7B7 1 -C6BB 1 -C6A7 1 -C6A8 1 -C6BC 1 -C6BD 1 -C684 1 -C685 1 -CA94 1 -CB80 1 -CABC 1 -C589 1 -CBAE 1 -CABE 1 -CA95 1 -CBA4 1 -CABF 1 -CB81 1 -CAA1 1 -CAA2 1 -CA96 1 -C780 1 -C781 1 -C782 1 -C783 1 -CA97 1 -CA98 1 -CAAC 1 -CAAD 1 -CE86 1 -CE91 1 -CEAC 1 -CEB1 1 -CE92 1 -CEB2 1 -CF90 1 -CE93 1 -CEB3 1 -CE94 1 -CEB4 1 -CE88 1 -CE95 1 -CEAD 1 -CEB5 1 -CFB5 1 -CF9C 1 -CF9D 1 -CF9A 1 -CF9B 1 -CE96 1 -CEB6 1 -CE89 1 -CE97 1 -CEAE 1 -CEB7 1 -CE98 1 -CEB8 1 -CF91 1 -CFB4 1 -CDBA 1 -CE8A 1 -CE90 1 -CE99 1 -CEAA 1 -CEAF 1 -CEB9 1 -CF8A 1 -CFB3 1 -CE9A 1 -CEBA 1 -CFB0 1 -CF97 1 -CE9B 1 -CEBB 1 -C2B5 1 -CE9C 1 -CEBC 1 -CE9D 1 -CEBD 1 -CE9E 1 -CEBE 1 -CE8C 1 -CE9F 1 -CEBF 1 -CF8C 1 -CEA0 1 -CF80 1 -CF96 1 -CF9E 1 -CF9F 1 -CF98 1 -CF99 1 -CEA1 1 -CF81 1 -CFB1 1 -CEA3 1 -CF82 1 -CF83 1 -CFB2 1 -CFB9 1 -CEA4 1 -CF84 1 -CE8E 1 -CEA5 1 -CEAB 1 -CEB0 1 -CF85 1 -CF8B 1 -CF8D 1 -CF92 1 -CF93 1 -CF94 1 -CEA6 1 -CF86 1 -CF95 1 -CEA7 1 -CF87 1 -CEA8 1 -CF88 1 -CE8F 1 -CEA9 1 -CF89 1 -CF8E 1 -CFA0 1 -CFA1 1 -CFB7 1 -CFB8 1 -CFBA 1 -CFBB 1 -CFA2 1 -CFA3 1 -CFA4 1 -CFA5 1 -CFA6 1 -CFA7 1 -CFA8 1 -CFA9 1 -CFAA 1 -CFAB 1 -CFAC 1 -CFAD 1 -CFAE 1 -CFAF 1 -D090 1 -D0B0 1 -D390 1 -D391 1 -D392 1 -D393 1 -D398 1 -D399 1 -D39A 1 -D39B 1 -D394 1 -D395 1 -D091 1 -D0B1 1 -D092 1 -D0B2 1 -D093 1 -D0B3 1 -D290 1 -D291 1 -D292 1 -D293 1 -D294 1 -D295 1 -D094 1 -D0B4 1 -D480 1 -D481 1 -D082 1 -D192 1 -D482 1 -D483 1 -D083 1 -D193 1 -D298 1 -D299 1 -D080 1 -D081 1 -D095 1 -D0B5 1 -D190 1 -D191 1 -D396 1 -D397 1 -D084 1 -D194 1 -D096 1 -D0B6 1 -D381 1 -D382 1 -D39C 1 -D39D 1 -D296 1 -D297 1 -D097 1 -D0B7 1 -D484 1 -D485 1 -D39E 1 -D39F 1 -D085 1 -D195 1 -D3A0 1 -D3A1 1 -D486 1 -D487 1 -D08D 1 -D098 1 -D0B8 1 -D19D 1 -D3A2 1 -D3A3 1 -D28A 1 -D28B 1 -D3A4 1 -D3A5 1 -D086 1 -D196 1 -D087 1 -D197 1 -D099 1 -D0B9 1 -D088 1 -D198 1 -D09A 1 -D0BA 1 -D29A 1 -D29B 1 -D383 1 -D384 1 -D2A0 1 -D2A1 1 -D29E 1 -D29F 1 -D29C 1 -D29D 1 -D09B 1 -D0BB 1 -D385 1 -D386 1 -D089 1 -D199 1 -D488 1 -D489 1 -D09C 1 -D0BC 1 -D38D 1 -D38E 1 -D09D 1 -D0BD 1 -D389 1 -D38A 1 -D2A2 1 -D2A3 1 -D387 1 -D388 1 -D2A4 1 -D2A5 1 -D08A 1 -D19A 1 -D48A 1 -D48B 1 -D09E 1 -D0BE 1 -D3A6 1 -D3A7 1 -D3A8 1 -D3A9 1 -D3AA 1 -D3AB 1 -D09F 1 -D0BF 1 -D2A6 1 -D2A7 1 -D280 1 -D281 1 -D0A0 1 -D180 1 -D28E 1 -D28F 1 -D0A1 1 -D181 1 -D48C 1 -D48D 1 -D2AA 1 -D2AB 1 -D0A2 1 -D182 1 -D48E 1 -D48F 1 -D2AC 1 -D2AD 1 -D08B 1 -D19B 1 -D08C 1 -D19C 1 -D0A3 1 -D183 1 -D3AE 1 -D3AF 1 -D08E 1 -D19E 1 -D3B0 1 -D3B1 1 -D3B2 1 -D3B3 1 -D2AE 1 -D2AF 1 -D2B0 1 -D2B1 1 -D1B8 1 -D1B9 1 -D0A4 1 -D184 1 -D0A5 1 -D185 1 -D2B2 1 -D2B3 1 -D2BA 1 -D2BB 1 -D1A0 1 -D1A1 1 -D1BE 1 -D1BF 1 -D1BC 1 -D1BD 1 -D1BA 1 -D1BB 1 -D0A6 1 -D186 1 -D2B4 1 -D2B5 1 -D0A7 1 -D187 1 -D3B4 1 -D3B5 1 -D2B6 1 -D2B7 1 -D38B 1 -D38C 1 -D2B8 1 -D2B9 1 -D2BC 1 -D2BD 1 -D2BE 1 -D2BF 1 -D08F 1 -D19F 1 -D0A8 1 -D188 1 -D0A9 1 -D189 1 -D0AA 1 -D18A 1 -D0AB 1 -D18B 1 -D3B8 1 -D3B9 1 -D0AC 1 -D18C 1 -D28C 1 -D28D 1 -D1A2 1 -D1A3 1 -D0AD 1 -D18D 1 -D3AC 1 -D3AD 1 -D0AE 1 -D18E 1 -D0AF 1 -D18F 1 -D1A4 1 -D1A5 1 -D1A6 1 -D1A7 1 -D1AA 1 -D1AB 1 -D1A8 1 -D1A9 1 -D1AC 1 -D1AD 1 -D1AE 1 -D1AF 1 -D1B0 1 -D1B1 1 -D1B2 1 -D1B3 1 -D1B4 1 -D1B5 1 -D1B6 1 -D1B7 1 -D2A8 1 -D2A9 1 -D380 1 -D4B1 1 -D5A1 1 -D4B2 1 -D5A2 1 -D4B3 1 -D5A3 1 -D4B4 1 -D5A4 1 -D4B5 1 -D5A5 1 -D687 1 -D4B6 1 -D5A6 1 -D4B7 1 -D5A7 1 -D4B8 1 -D5A8 1 -D4B9 1 -D5A9 1 -D4BA 1 -D5AA 1 -D4BB 1 -D5AB 1 -D4BC 1 -D5AC 1 -D4BD 1 -D5AD 1 -D4BE 1 -D5AE 1 -D4BF 1 -D5AF 1 -D580 1 -D5B0 1 -D581 1 -D5B1 1 -D582 1 -D5B2 1 -D583 1 -D5B3 1 -D584 1 -D5B4 1 -D585 1 -D5B5 1 -D586 1 -D5B6 1 -D587 1 -D5B7 1 -D588 1 -D5B8 1 -D589 1 -D5B9 1 -D58A 1 -D5BA 1 -D58B 1 -D5BB 1 -D58C 1 -D5BC 1 -D58D 1 -D5BD 1 -D58E 1 -D5BE 1 -D58F 1 -D5BF 1 -D590 1 -D680 1 -D591 1 -D681 1 -D592 1 -D682 1 -D593 1 -D683 1 -D594 1 -D684 1 -D595 1 -D685 1 -D596 1 -D686 1 -D599 1 -D790 1 -D791 1 -D792 1 -D793 1 -D794 1 -D795 1 -D7B0 1 -D7B1 1 -D796 1 -D797 1 -D798 1 -D799 1 -D7B2 1 -D79A 1 -D79B 1 -D79C 1 -D79D 1 -D79E 1 -D79F 1 -D7A0 1 -D7A1 1 -D7A2 1 -D7A3 1 -D7A4 1 -D7A5 1 -D7A6 1 -D7A7 1 -D7A8 1 -D7A9 1 -D7AA 1 -D8A1 1 -D9B4 1 -DBBD 1 -D8A2 1 -D8A3 1 -D9B2 1 -D9B1 1 -D8A4 1 -D8A5 1 -D9B3 1 -D8A6 1 -D8A7 1 -D9B5 1 -D9AE 1 -D8A8 1 -D9BB 1 -D9BE 1 -DA80 1 -D8A9 1 -D8AA 1 -D8AB 1 -D9B9 1 -D9BA 1 -D9BC 1 -D9BD 1 -D9BF 1 -D8AC 1 -DA83 1 -DA84 1 -DA86 1 -DABF 1 -DA87 1 -D8AD 1 -D8AE 1 -DA81 1 -DA82 1 -DA85 1 -D8AF 1 -D8B0 1 -DA88 1 -DA89 1 -DA8A 1 -DA8B 1 -DA8C 1 -DA8D 1 -DA8E 1 -DA8F 1 -DA90 1 -DBAE 1 -D8B1 1 -D8B2 1 -DA91 1 -DA92 1 -DA93 1 -DA94 1 -DA95 1 -DA96 1 -DA97 1 -DA98 1 -DA99 1 -DBAF 1 -D8B3 1 -D8B4 1 -DA9A 1 -DA9B 1 -DA9C 1 -DBBA 1 -D8B5 1 -D8B6 1 -DA9D 1 -DA9E 1 -DBBB 1 -D8B7 1 -D8B8 1 -DA9F 1 -D8B9 1 -D8BA 1 -DAA0 1 -DBBC 1 -D981 1 -DAA1 1 -DAA2 1 -DAA3 1 -DAA4 1 -DAA5 1 -DAA6 1 -D9AF 1 -D982 1 -DAA7 1 -DAA8 1 -D983 1 -DAA9 1 -DAAA 1 -DAAB 1 -DAAC 1 -DAAD 1 -DAAE 1 -DAAF 1 -DAB0 1 -DAB1 1 -DAB2 1 -DAB3 1 -DAB4 1 -D984 1 -DAB5 1 -DAB6 1 -DAB7 1 -DAB8 1 -D985 1 -DBBE 1 -D986 1 -DABA 1 -DABB 1 -DABC 1 -DABD 1 -DAB9 1 -D987 1 -DABE 1 -DB81 1 -DB82 1 -DB83 1 -DBBF 1 -DB80 1 -DB95 1 -D988 1 -DBA5 1 -D9B6 1 -DB84 1 -DB85 1 -DB86 1 -DB87 1 -D9B7 1 -DB88 1 -DB89 1 -DB8A 1 -DB8B 1 -DB8F 1 -D989 1 -D98A 1 -DBA6 1 -D9B8 1 -DB8C 1 -DB8D 1 -DB8E 1 -DB90 1 -DB91 1 -DB92 1 -DB93 1 -DC90 1 -DC92 1 -DCAD 1 -DC93 1 -DC94 1 -DCAE 1 -DC96 1 -DC95 1 -DCAF 1 -DC97 1 -DC98 1 -DC99 1 -DD8D 1 -DC9A 1 -DC9B 1 -DC9C 1 -DC9D 1 -DC9E 1 -DC9F 1 -DD8E 1 -DCA0 1 -DCA1 1 -DCA2 1 -DCA3 1 -DCA4 1 -DCA5 1 -DCA6 1 -DCA7 1 -DD8F 1 -DCA8 1 -DCA9 1 -DCAA 1 -DCAB 1 -DCAC 1 -DE80 1 -DE99 1 -DE9A 1 -DE81 1 -DE82 1 -DE83 1 -DE9C 1 -DE84 1 -DE85 1 -DE86 1 -DE87 1 -DEA2 1 -DEA3 1 -DE88 1 -DEA5 1 -DE89 1 -DE8A 1 -DE8B 1 -DE9B 1 -DE8C 1 -DE98 1 -DEA0 1 -DEA1 1 -DE8D 1 -DE8E 1 -DEA4 1 -DE8F 1 -DE90 1 -DE9D 1 -DE9E 1 -DE9F 1 -DE91 1 -DE92 1 -DE93 1 -DE94 1 -DE95 1 -DE96 1 -DE97 1 -DEB1 1 -DEA6 1 -DEA7 1 -DEA8 1 -DEA9 1 -DEAA 1 -DEAB 1 -DEAC 1 -DEAD 1 -DEAE 1 -DEAF 1 -DEB0 1 -E4B880 1 -E4B881 1 -E4B882 1 -E4B883 1 -E4B884 1 -E4B885 1 -E4B886 1 -E4B887 1 -E4B888 1 -E4B889 1 -E4B88A 1 -E4B88B 1 -E4B88C 1 -E4B88D 1 -E4B88E 1 -E4B88F 1 -E4B890 1 -E4B891 1 -E4B892 1 -E4B893 1 -E4B894 1 -E4B895 1 -E4B896 1 -E4B897 1 -E4B898 1 -E4B899 1 -E4B89A 1 -E4B89B 1 -E4B89C 1 -E4B89D 1 -E4B89E 1 -E4B89F 1 -E4B8A0 1 -E4B8A1 1 -E4B8A2 1 -E4B8A3 1 -E4B8A4 1 -E4B8A5 1 -E4B8A6 1 -E4B8A7 1 -E4B8A8 1 -E4B8A9 1 -E4B8AA 1 -E4B8AB 1 -E4B8AC 1 -E4B8AD 1 -E4B8AE 1 -E4B8AF 1 -E4B8B0 1 -E4B8B1 1 -E4B8B2 1 -E4B8B3 1 -E4B8B4 1 -E4B8B5 1 -E4B8B6 1 -E4B8B7 1 -E4B8B8 1 -E4B8B9 1 -E4B8BA 1 -E4B8BB 1 -E4B8BC 1 -E4B8BD 1 -E4B8BE 1 -E4B8BF 1 -E4B980 1 -E4B981 1 -E4B982 1 -E4B983 1 -E4B984 1 -E4B985 1 -E4B986 1 -E4B987 1 -E4B988 1 -E4B989 1 -E4B98A 1 -E4B98B 1 -E4B98C 1 -E4B98D 1 -E4B98E 1 -E4B98F 1 -E4B990 1 -E4B991 1 -E4B992 1 -E4B993 1 -E4B994 1 -E4B995 1 -E4B996 1 -E4B997 1 -E4B998 1 -E4B999 1 -E4B99A 1 -E4B99B 1 -E4B99C 1 -E4B99D 1 -E4B99E 1 -E4B99F 1 -E4B9A0 1 -E4B9A1 1 -E4B9A2 1 -E4B9A3 1 -E4B9A4 1 -E4B9A5 1 -E4B9A6 1 -E4B9A7 1 -E4B9A8 1 -E4B9A9 1 -E4B9AA 1 -E4B9AB 1 -E4B9AC 1 -E4B9AD 1 -E4B9AE 1 -E4B9AF 1 -E4B9B0 1 -E4B9B1 1 -E4B9B2 1 -E4B9B3 1 -E4B9B4 1 -E4B9B5 1 -E4B9B6 1 -E4B9B7 1 -E4B9B8 1 -E4B9B9 1 -E4B9BA 1 -E4B9BB 1 -E4B9BC 1 -E4B9BD 1 -E4B9BE 1 -E4B9BF 1 -E4BA80 1 -E4BA81 1 -E4BA82 1 -E4BA83 1 -E4BA84 1 -E4BA85 1 -E4BA86 1 -E4BA87 1 -E4BA88 1 -E4BA89 1 -E4BA8A 1 -E4BA8B 1 -E4BA8C 1 -E4BA8D 1 -E4BA8E 1 -E4BA8F 1 -E4BA90 1 -E4BA91 1 -E4BA92 1 -E4BA93 1 -E4BA94 1 -E4BA95 1 -E4BA96 1 -E4BA97 1 -E4BA98 1 -E4BA99 1 -E4BA9A 1 -E4BA9B 1 -E4BA9C 1 -E4BA9D 1 -E4BA9E 1 -E4BA9F 1 -E4BAA0 1 -E4BAA1 1 -E4BAA2 1 -E4BAA3 1 -E4BAA4 1 -E4BAA5 1 -E4BAA6 1 -E4BAA7 1 -E4BAA8 1 -E4BAA9 1 -E4BAAA 1 -E4BAAB 1 -E4BAAC 1 -E4BAAD 1 -E4BAAE 1 -E4BAAF 1 -E4BAB0 1 -E4BAB1 1 -E4BAB2 1 -E4BAB3 1 -E4BAB4 1 -E4BAB5 1 -E4BAB6 1 -E4BAB7 1 -E4BAB8 1 -E4BAB9 1 -E4BABA 1 -E4BABB 1 -E4BABC 1 -E4BABD 1 -E4BABE 1 -E4BABF 1 -E4BB80 1 -E4BB81 1 -E4BB82 1 -E4BB83 1 -E4BB84 1 -E4BB85 1 -E4BB86 1 -E4BB87 1 -E4BB88 1 -E4BB89 1 -E4BB8A 1 -E4BB8B 1 -E4BB8C 1 -E4BB8D 1 -E4BB8E 1 -E4BB8F 1 -E4BB90 1 -E4BB91 1 -E4BB92 1 -E4BB93 1 -E4BB94 1 -E4BB95 1 -E4BB96 1 -E4BB97 1 -E4BB98 1 -E4BB99 1 -E4BB9A 1 -E4BB9B 1 -E4BB9C 1 -E4BB9D 1 -E4BB9E 1 -E4BB9F 1 -E4BBA0 1 -E4BBA1 1 -E4BBA2 1 -E4BBA3 1 -E4BBA4 1 -E4BBA5 1 -E4BBA6 1 -E4BBA7 1 -E4BBA8 1 -E4BBA9 1 -E4BBAA 1 -E4BBAB 1 -E4BBAC 1 -E4BBAD 1 -E4BBAE 1 -E4BBAF 1 -E4BBB0 1 -E4BBB1 1 -E4BBB2 1 -E4BBB3 1 -E4BBB4 1 -E4BBB5 1 -E4BBB6 1 -E4BBB7 1 -E4BBB8 1 -E4BBB9 1 -E4BBBA 1 -E4BBBB 1 -E4BBBC 1 -E4BBBD 1 -E4BBBE 1 -E4BBBF 1 -E4BC80 1 -E4BC81 1 -E4BC82 1 -E4BC83 1 -E4BC84 1 -E4BC85 1 -E4BC86 1 -E4BC87 1 -E4BC88 1 -E4BC89 1 -E4BC8A 1 -E4BC8B 1 -E4BC8C 1 -E4BC8D 1 -E4BC8E 1 -E4BC8F 1 -E4BC90 1 -E4BC91 1 -E4BC92 1 -E4BC93 1 -E4BC94 1 -E4BC95 1 -E4BC96 1 -E4BC97 1 -E4BC98 1 -E4BC99 1 -E4BC9A 1 -E4BC9B 1 -E4BC9C 1 -E4BC9D 1 -E4BC9E 1 -E4BC9F 1 -E4BCA0 1 -E4BCA1 1 -E4BCA2 1 -E4BCA3 1 -E4BCA4 1 -E4BCA5 1 -E4BCA6 1 -E4BCA7 1 -E4BCA8 1 -E4BCA9 1 -E4BCAA 1 -E4BCAB 1 -E4BCAC 1 -E4BCAD 1 -E4BCAE 1 -E4BCAF 1 -E4BCB0 1 -E4BCB1 1 -E4BCB2 1 -E4BCB3 1 -E4BCB4 1 -E4BCB5 1 -E4BCB6 1 -E4BCB7 1 -E4BCB8 1 -E4BCB9 1 -E4BCBA 1 -E4BCBB 1 -E4BCBC 1 -E4BCBD 1 -E4BCBE 1 -E4BCBF 1 -E4BD80 1 -E4BD81 1 -E4BD82 1 -E4BD83 1 -E4BD84 1 -E4BD85 1 -E4BD86 1 -E4BD87 1 -E4BD88 1 -E4BD89 1 -E4BD8A 1 -E4BD8B 1 -E4BD8C 1 -E4BD8D 1 -E4BD8E 1 -E4BD8F 1 -E4BD90 1 -E4BD91 1 -E4BD92 1 -E4BD93 1 -E4BD94 1 -E4BD95 1 -E4BD96 1 -E4BD97 1 -E4BD98 1 -E4BD99 1 -E4BD9A 1 -E4BD9B 1 -E4BD9C 1 -E4BD9D 1 -E4BD9E 1 -E4BD9F 1 -E4BDA0 1 -E4BDA1 1 -E4BDA2 1 -E4BDA3 1 -E4BDA4 1 -E4BDA5 1 -E4BDA6 1 -E4BDA7 1 -E4BDA8 1 -E4BDA9 1 -E4BDAA 1 -E4BDAB 1 -E4BDAC 1 -E4BDAD 1 -E4BDAE 1 -E4BDAF 1 -E4BDB0 1 -E4BDB1 1 -E4BDB2 1 -E4BDB3 1 -E4BDB4 1 -E4BDB5 1 -E4BDB6 1 -E4BDB7 1 -E4BDB8 1 -E4BDB9 1 -E4BDBA 1 -E4BDBB 1 -E4BDBC 1 -E4BDBD 1 -E4BDBE 1 -E4BDBF 1 -E4BE80 1 -E4BE81 1 -E4BE82 1 -E4BE83 1 -E4BE84 1 -E4BE85 1 -E4BE86 1 -E4BE87 1 -E4BE88 1 -E4BE89 1 -E4BE8A 1 -E4BE8B 1 -E4BE8C 1 -E4BE8D 1 -E4BE8E 1 -E4BE8F 1 -E4BE90 1 -E4BE91 1 -E4BE92 1 -E4BE93 1 -E4BE94 1 -E4BE95 1 -E4BE96 1 -E4BE97 1 -E4BE98 1 -E4BE99 1 -E4BE9A 1 -E4BE9B 1 -E4BE9C 1 -E4BE9D 1 -E4BE9E 1 -E4BE9F 1 -E4BEA0 1 -E4BEA1 1 -E4BEA2 1 -E4BEA3 1 -E4BEA4 1 -E4BEA5 1 -E4BEA6 1 -E4BEA7 1 -E4BEA8 1 -E4BEA9 1 -E4BEAA 1 -E4BEAB 1 -E4BEAC 1 -E4BEAD 1 -E4BEAE 1 -E4BEAF 1 -E4BEB0 1 -E4BEB1 1 -E4BEB2 1 -E4BEB3 1 -E4BEB4 1 -E4BEB5 1 -E4BEB6 1 -E4BEB7 1 -E4BEB8 1 -E4BEB9 1 -E4BEBA 1 -E4BEBB 1 -E4BEBC 1 -E4BEBD 1 -E4BEBE 1 -E4BEBF 1 -E4BF80 1 -E4BF81 1 -E4BF82 1 -E4BF83 1 -E4BF84 1 -E4BF85 1 -E4BF86 1 -E4BF87 1 -E4BF88 1 -E4BF89 1 -E4BF8A 1 -E4BF8B 1 -E4BF8C 1 -E4BF8D 1 -E4BF8E 1 -E4BF8F 1 -E4BF90 1 -E4BF91 1 -E4BF92 1 -E4BF93 1 -E4BF94 1 -E4BF95 1 -E4BF96 1 -E4BF97 1 -E4BF98 1 -E4BF99 1 -E4BF9A 1 -E4BF9B 1 -E4BF9C 1 -E4BF9D 1 -E4BF9E 1 -E4BF9F 1 -E4BFA0 1 -E4BFA1 1 -E4BFA2 1 -E4BFA3 1 -E4BFA4 1 -E4BFA5 1 -E4BFA6 1 -E4BFA7 1 -E4BFA8 1 -E4BFA9 1 -E4BFAA 1 -E4BFAB 1 -E4BFAC 1 -E4BFAD 1 -E4BFAE 1 -E4BFAF 1 -E4BFB0 1 -E4BFB1 1 -E4BFB2 1 -E4BFB3 1 -E4BFB4 1 -E4BFB5 1 -E4BFB6 1 -E4BFB7 1 -E4BFB8 1 -E4BFB9 1 -E4BFBA 1 -E4BFBB 1 -E4BFBC 1 -E4BFBD 1 -E4BFBE 1 -E4BFBF 1 -C8B7 1 -C8B8 1 -C8B9 1 -C8BA 1 -C8BB 1 -C8BC 1 -C8BD 1 -C8BE 1 -C8BF 1 -C980 1 -C981 1 -C982 1 -C983 1 -C984 1 -C985 1 -C986 1 -C987 1 -C988 1 -C989 1 -C98A 1 -C98B 1 -C98C 1 -C98D 1 -C98E 1 -C98F 1 -CD98 1 -CD99 1 -CD9A 1 -CD9B 1 -CD9C 1 -CDB0 1 -CDB1 1 -CDB2 1 -CDB3 1 -CDB6 1 -CDB7 1 -CDB8 1 -CDB9 1 -CDBB 1 -CDBC 1 -CDBD 1 -CDBF 1 -CE80 1 -CE81 1 -CE82 1 -CE83 1 -CE8B 1 -CE8D 1 -CEA2 1 -CF8F 1 -CFBC 1 -CFBD 1 -CFBE 1 -CFBF 1 -D287 1 -D38F 1 -D3B6 1 -D3B7 1 -D3BA 1 -D3BB 1 -D3BC 1 -D3BD 1 -D3BE 1 -D3BF 1 -D490 1 -D491 1 -D492 1 -D493 1 -D494 1 -D495 1 -D496 1 -D497 1 -D498 1 -D499 1 -D49A 1 -D49B 1 -D49C 1 -D49D 1 -D49E 1 -D49F 1 -D4A0 1 -D4A1 1 -D4A2 1 -D4A3 1 -D4A4 1 -D4A5 1 -D4A6 1 -D4A7 1 -D4A8 1 -D4A9 1 -D4AA 1 -D4AB 1 -D4AC 1 -D4AD 1 -D4AE 1 -D4AF 1 -D4B0 1 -D597 1 -D598 1 -D5A0 1 -D688 1 -D68B 1 -D68C 1 -D68D 1 -D68E 1 -D68F 1 -D690 1 -D6A2 1 -D6BA 1 -D785 1 -D786 1 -D787 1 -D788 1 -D789 1 -D78A 1 -D78B 1 -D78C 1 -D78D 1 -D78E 1 -D78F 1 -D7AB 1 -D7AC 1 -D7AD 1 -D7AE 1 -D7AF 1 -D7B5 1 -D7B6 1 -D7B7 1 -D7B8 1 -D7B9 1 -D7BA 1 -D7BB 1 -D7BC 1 -D7BD 1 -D7BE 1 -D7BF 1 -D884 1 -D885 1 -D886 1 -D887 1 -D888 1 -D889 1 -D88A 1 -D88B 1 -D896 1 -D897 1 -D898 1 -D899 1 -D89A 1 -D89C 1 -D89D 1 -D89E 1 -D8A0 1 -D8BB 1 -D8BC 1 -D8BD 1 -D8BE 1 -D8BF 1 -D999 1 -D99A 1 -D99B 1 -D99C 1 -D99D 1 -D99E 1 -D99F 1 -DC8E 1 -DD8B 1 -DD8C 1 -DD90 1 -DD91 1 -DD92 1 -DD93 1 -DD94 1 -DD95 1 -DD96 1 -DD97 1 -DD98 1 -DD99 1 -DD9A 1 -DD9B 1 -DD9C 1 -DD9D 1 -DD9E 1 -DD9F 1 -DDA0 1 -DDA1 1 -DDA2 1 -DDA3 1 -DDA4 1 -DDA5 1 -DDA6 1 -DDA7 1 -DDA8 1 -DDA9 1 -DDAA 1 -DDAB 1 -DDAC 1 -DDAD 1 -DDAE 1 -DDAF 1 -DDB0 1 -DDB1 1 -DDB2 1 -DDB3 1 -DDB4 1 -DDB5 1 -DDB6 1 -DDB7 1 -DDB8 1 -DDB9 1 -DDBA 1 -DDBB 1 -DDBC 1 -DDBD 1 -DDBE 1 -DDBF 1 -DEB2 1 -DEB3 1 -DEB4 1 -DEB5 1 -DEB6 1 -DEB7 1 -DEB8 1 -DEB9 1 -DEBA 1 -DEBB 1 -DEBC 1 -DEBD 1 -DEBE 1 -DEBF 1 -DF80 1 -DF81 1 -DF82 1 -DF83 1 -DF84 1 -DF85 1 -DF86 1 -DF87 1 -DF88 1 -DF89 1 -DF8A 1 -DF8B 1 -DF8C 1 -DF8D 1 -DF8E 1 -DF8F 1 -DF90 1 -DF91 1 -DF92 1 -DF93 1 -DF94 1 -DF95 1 -DF96 1 -DF97 1 -DF98 1 -DF99 1 -DF9A 1 -DF9B 1 -DF9C 1 -DF9D 1 -DF9E 1 -DF9F 1 -DFA0 1 -DFA1 1 -DFA2 1 -DFA3 1 -DFA4 1 -DFA5 1 -DFA6 1 -DFA7 1 -DFA8 1 -DFA9 1 -DFAA 1 -DFAB 1 -DFAC 1 -DFAD 1 -DFAE 1 -DFAF 1 -DFB0 1 -DFB1 1 -DFB2 1 -DFB3 1 -DFB4 1 -DFB5 1 -DFB6 1 -DFB7 1 -DFB8 1 -DFB9 1 -DFBA 1 -DFBB 1 -DFBC 1 -DFBD 1 -DFBE 1 -DFBF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_slovenian_ci) ENGINE=NDB CHARACTER SET utf8 COLLATE utf8_slovenian_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_slovenian_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -C285 1 -7F 1 -C280 1 -C281 1 -C282 1 -C283 1 -C284 1 -C286 1 -C287 1 -C288 1 -C289 1 -C28A 1 -C28B 1 -C28C 1 -C28D 1 -C28E 1 -C28F 1 -C290 1 -C291 1 -C292 1 -C293 1 -C294 1 -C295 1 -C296 1 -C297 1 -C298 1 -C299 1 -C29A 1 -C29B 1 -C29C 1 -C29D 1 -C29E 1 -C29F 1 -C2A0 1 -CC80 1 -CC81 1 -CC82 1 -CC83 1 -CC84 1 -CC85 1 -CC86 1 -CC87 1 -CC88 1 -CC89 1 -CC8A 1 -CC8B 1 -CC8C 1 -CC8D 1 -CC8E 1 -CC8F 1 -CC90 1 -CC91 1 -CC92 1 -CC93 1 -CC94 1 -CC95 1 -CC96 1 -CC97 1 -CC98 1 -CC99 1 -CC9A 1 -CC9B 1 -CC9C 1 -CC9D 1 -CC9E 1 -CC9F 1 -CCA0 1 -CCA1 1 -CCA2 1 -CCA3 1 -CCA4 1 -CCA5 1 -CCA6 1 -CCA7 1 -CCA8 1 -CCA9 1 -CCAA 1 -CCAB 1 -CCAC 1 -CCAD 1 -CCAE 1 -CCAF 1 -CCB0 1 -CCB1 1 -CCB2 1 -CCB3 1 -CCB4 1 -CCB5 1 -CCB6 1 -CCB7 1 -CCB8 1 -CCB9 1 -CCBA 1 -CCBB 1 -CCBC 1 -CCBD 1 -CCBE 1 -CCBF 1 -CD80 1 -CD81 1 -CD82 1 -CD83 1 -CD84 1 -CD85 1 -CD86 1 -CD87 1 -CD88 1 -CD89 1 -CD8A 1 -CD8B 1 -CD8C 1 -CD8D 1 -CD8E 1 -CD8F 1 -CD90 1 -CD91 1 -CD92 1 -CD93 1 -CD94 1 -CD95 1 -CD96 1 -CD97 1 -CD9D 1 -CD9E 1 -CD9F 1 -CDA0 1 -CDA1 1 -CDA2 1 -D283 1 -D284 1 -D285 1 -D286 1 -D288 1 -D289 1 -D691 1 -D692 1 -D693 1 -D694 1 -D695 1 -D696 1 -D697 1 -D698 1 -D699 1 -D69A 1 -D69B 1 -D69C 1 -D69D 1 -D69E 1 -D69F 1 -D6A0 1 -D6A1 1 -D6A3 1 -D6A4 1 -D6A5 1 -D6A6 1 -D6A7 1 -D6A8 1 -D6A9 1 -D6AA 1 -D6AB 1 -D6AC 1 -D6AD 1 -D6AE 1 -D6AF 1 -D6B0 1 -D6B1 1 -D6B2 1 -D6B3 1 -D6B4 1 -D6B5 1 -D6B6 1 -D6B7 1 -D6B8 1 -D6B9 1 -D6BB 1 -D6BC 1 -D6BD 1 -D6BF 1 -D781 1 -D782 1 -D784 1 -D880 1 -D881 1 -D882 1 -D883 1 -D890 1 -D891 1 -D892 1 -D893 1 -D894 1 -D895 1 -D98B 1 -D98C 1 -D98D 1 -D98E 1 -D98F 1 -D990 1 -D991 1 -D992 1 -D993 1 -D994 1 -D995 1 -D996 1 -D997 1 -D998 1 -D9B0 1 -DB96 1 -DB97 1 -DB98 1 -DB99 1 -DB9A 1 -DB9B 1 -DB9C 1 -DB9D 1 -DB9E 1 -DB9F 1 -DBA0 1 -DBA1 1 -DBA2 1 -DBA3 1 -DBA4 1 -DBA7 1 -DBA8 1 -DBAA 1 -DBAB 1 -DBAC 1 -DBAD 1 -DC8F 1 -DC91 1 -DCB0 1 -DCB1 1 -DCB2 1 -DCB3 1 -DCB4 1 -DCB5 1 -DCB6 1 -DCB7 1 -DCB8 1 -DCB9 1 -DCBA 1 -DCBB 1 -DCBC 1 -DCBD 1 -DCBE 1 -DCBF 1 -DD80 1 -DD81 1 -DD82 1 -DD83 1 -DD84 1 -DD85 1 -DD86 1 -DD87 1 -DD88 1 -DD89 1 -DD8A 1 -D980 1 -60 1 -C2B4 1 -CE84 1 -CB9C 1 -5E 1 -C2AF 1 -CB98 1 -CB99 1 -C2A8 1 -CE85 1 -CB9A 1 -CB9D 1 -C2B8 1 -CB9B 1 -5F 1 -C2AD 1 -2D 1 -D68A 1 -2C 1 -D59D 1 -D88C 1 -D88D 1 -D9AB 1 -D9AC 1 -3B 1 -CDBE 1 -D89B 1 -3A 1 -D689 1 -DC83 1 -DC84 1 -DC85 1 -DC86 1 -DC87 1 -DC88 1 -21 1 -C2A1 1 -D59C 1 -3F 1 -C2BF 1 -D59E 1 -D89F 1 -DC89 1 -2E 1 -DB94 1 -DC81 1 -DC82 1 -C2B7 1 -CE87 1 -DC80 1 -27 1 -22 1 -C2AB 1 -C2BB 1 -28 1 -29 1 -5B 1 -7B 1 -7D 1 -C2A7 1 -C2B6 1 -C2A9 1 -C2AE 1 -40 1 -2A 1 -D9AD 1 -2F 1 -26 1 -23 1 -25 1 -D9AA 1 -D59A 1 -D59B 1 -D59F 1 -D6BE 1 -D780 1 -D783 1 -D7B3 1 -D7B4 1 -DC8A 1 -DC8B 1 -DC8C 1 -DC8D 1 -CAB9 1 -CDB4 1 -CDB5 1 -CABA 1 -CB82 1 -CB83 1 -CB84 1 -CB85 1 -CB86 1 -CB87 1 -CB88 1 -CB89 1 -CB8A 1 -CB8B 1 -CB8C 1 -CB8D 1 -CB8E 1 -CB8F 1 -CB92 1 -CB93 1 -CB94 1 -CB95 1 -CB96 1 -CB97 1 -CB9E 1 -CB9F 1 -CBA5 1 -CBA6 1 -CBA7 1 -CBA8 1 -CBA9 1 -CBAA 1 -CBAB 1 -CBAC 1 -CBAD 1 -CBAF 1 -CBB0 1 -CBB1 1 -CBB2 1 -CBB3 1 -CBB4 1 -CBB5 1 -CBB6 1 -CBB7 1 -CBB8 1 -CBB9 1 -CBBA 1 -CBBB 1 -CBBC 1 -CBBD 1 -CBBE 1 -CBBF 1 -C2B0 1 -D282 1 -D88E 1 -D88F 1 -DBA9 1 -CFB6 1 -2B 1 -C2B1 1 -C3B7 1 -C397 1 -3C 1 -3D 1 -3E 1 -C2AC 1 -7C 1 -C2A6 1 -7E 1 -CB90 1 -CB91 1 -C2A4 1 -C2A2 1 -24 1 -C2A3 1 -C2A5 1 -30 1 -D9A0 1 -DBB0 1 -31 1 -C2B9 1 -D9A1 1 -DBB1 1 -C2BD 1 -C2BC 1 -32 1 -C2B2 1 -D9A2 1 -DBB2 1 -33 1 -C2B3 1 -D9A3 1 -DBB3 1 -C2BE 1 -34 1 -D9A4 1 -DBB4 1 -35 1 -D9A5 1 -DBB5 1 -36 1 -D9A6 1 -DBB6 1 -37 1 -D9A7 1 -DBB7 1 -38 1 -D9A8 1 -DBB8 1 -39 1 -D9A9 1 -DBB9 1 -41 1 -61 1 -C2AA 1 -C380 1 -C381 1 -C382 1 -C383 1 -C384 1 -C385 1 -C3A0 1 -C3A1 1 -C3A2 1 -C3A3 1 -C3A4 1 -C3A5 1 -C480 1 -C481 1 -C482 1 -C483 1 -C484 1 -C485 1 -C78D 1 -C78E 1 -C79E 1 -C79F 1 -C7A0 1 -C7A1 1 -C7BA 1 -C7BB 1 -C880 1 -C881 1 -C882 1 -C883 1 -C8A6 1 -C8A7 1 -CDA3 1 -C386 1 -C3A6 1 -C7A2 1 -C7A3 1 -C7BC 1 -C7BD 1 -C990 1 -C991 1 -C992 1 -42 1 -62 1 -CA99 1 -C680 1 -C681 1 -C993 1 -C682 1 -C683 1 -43 1 -63 1 -C387 1 -C3A7 1 -C486 1 -C487 1 -C488 1 -C489 1 -C48A 1 -C48B 1 -CDA8 1 -C48C 1 -C48D 1 -C687 1 -C688 1 -C995 1 -44 1 -64 1 -C48E 1 -C48F 1 -CDA9 1 -C784 1 -C785 1 -C786 1 -C7B1 1 -C7B2 1 -C7B3 1 -CAA3 1 -CAA5 1 -CAA4 1 -C490 1 -C491 1 -C689 1 -C996 1 -C68A 1 -C997 1 -C68B 1 -C68C 1 -C8A1 1 -C390 1 -C3B0 1 -45 1 -65 1 -C388 1 -C389 1 -C38A 1 -C38B 1 -C3A8 1 -C3A9 1 -C3AA 1 -C3AB 1 -C492 1 -C493 1 -C494 1 -C495 1 -C496 1 -C497 1 -C498 1 -C499 1 -C49A 1 -C49B 1 -C884 1 -C885 1 -C886 1 -C887 1 -C8A8 1 -C8A9 1 -CDA4 1 -C68E 1 -C79D 1 -C68F 1 -C999 1 -C690 1 -C99B 1 -C998 1 -C99A 1 -C99C 1 -C99D 1 -C99E 1 -CA9A 1 -C9A4 1 -46 1 -66 1 -CAA9 1 -C691 1 -C692 1 -47 1 -67 1 -C49C 1 -C49D 1 -C49E 1 -C49F 1 -C4A0 1 -C4A1 1 -C4A2 1 -C4A3 1 -C7A6 1 -C7A7 1 -C7B4 1 -C7B5 1 -C9A1 1 -C9A2 1 -C7A4 1 -C7A5 1 -C693 1 -C9A0 1 -CA9B 1 -C694 1 -C9A3 1 -CBA0 1 -C6A2 1 -C6A3 1 -48 1 -68 1 -C4A4 1 -C4A5 1 -C89E 1 -C89F 1 -CAB0 1 -CDAA 1 -CA9C 1 -C695 1 -C7B6 1 -C4A6 1 -C4A7 1 -C9A6 1 -CAB1 1 -C9A7 1 -CABB 1 -CABD 1 -49 1 -69 1 -C38C 1 -C38D 1 -C38E 1 -C38F 1 -C3AC 1 -C3AD 1 -C3AE 1 -C3AF 1 -C4A8 1 -C4A9 1 -C4AA 1 -C4AB 1 -C4AC 1 -C4AD 1 -C4AE 1 -C4AF 1 -C4B0 1 -C78F 1 -C790 1 -C888 1 -C889 1 -C88A 1 -C88B 1 -CDA5 1 -C4B2 1 -C4B3 1 -C4B1 1 -C9AA 1 -C697 1 -C9A8 1 -C696 1 -C9A9 1 -4A 1 -6A 1 -C4B4 1 -C4B5 1 -C7B0 1 -CAB2 1 -CA9D 1 -C99F 1 -CA84 1 -4B 1 -6B 1 -C4B6 1 -C4B7 1 -C7A8 1 -C7A9 1 -C698 1 -C699 1 -CA9E 1 -4C 1 -6C 1 -C4B9 1 -C4BA 1 -C4BB 1 -C4BC 1 -C4BD 1 -C4BE 1 -CBA1 1 -C4BF 1 -C580 1 -C787 1 -C788 1 -C789 1 -CAAA 1 -CAAB 1 -CA9F 1 -C581 1 -C582 1 -C69A 1 -C9AB 1 -C9AC 1 -C9AD 1 -C8B4 1 -C9AE 1 -C69B 1 -CA8E 1 -4D 1 -6D 1 -CDAB 1 -C9B1 1 -4E 1 -6E 1 -C391 1 -C3B1 1 -C583 1 -C584 1 -C585 1 -C586 1 -C587 1 -C588 1 -C7B8 1 -C7B9 1 -C78A 1 -C78B 1 -C78C 1 -C9B4 1 -C69D 1 -C9B2 1 -C69E 1 -C8A0 1 -C9B3 1 -C8B5 1 -C58A 1 -C58B 1 -4F 1 -6F 1 -C2BA 1 -C392 1 -C393 1 -C394 1 -C395 1 -C396 1 -C3B2 1 -C3B3 1 -C3B4 1 -C3B5 1 -C3B6 1 -C58C 1 -C58D 1 -C58E 1 -C58F 1 -C590 1 -C591 1 -C6A0 1 -C6A1 1 -C791 1 -C792 1 -C7AA 1 -C7AB 1 -C7AC 1 -C7AD 1 -C88C 1 -C88D 1 -C88E 1 -C88F 1 -C8AA 1 -C8AB 1 -C8AC 1 -C8AD 1 -C8AE 1 -C8AF 1 -C8B0 1 -C8B1 1 -CDA6 1 -C592 1 -C593 1 -C9B6 1 -C398 1 -C3B8 1 -C7BE 1 -C7BF 1 -C686 1 -C994 1 -C69F 1 -C9B5 1 -C9B7 1 -C8A2 1 -C8A3 1 -50 1 -70 1 -C6A4 1 -C6A5 1 -C9B8 1 -51 1 -71 1 -CAA0 1 -C4B8 1 -52 1 -72 1 -C594 1 -C595 1 -C596 1 -C597 1 -C598 1 -C599 1 -C890 1 -C891 1 -C892 1 -C893 1 -CAB3 1 -CDAC 1 -C6A6 1 -CA80 1 -C9B9 1 -CAB4 1 -C9BA 1 -C9BB 1 -CAB5 1 -C9BC 1 -C9BD 1 -C9BE 1 -C9BF 1 -CA81 1 -CAB6 1 -53 1 -73 1 -C59A 1 -C59B 1 -C59C 1 -C59D 1 -C59E 1 -C59F 1 -C5BF 1 -C898 1 -C899 1 -CBA2 1 -C39F 1 -C5A0 1 -C5A1 1 -CA82 1 -C6A9 1 -CA83 1 -C6AA 1 -CA85 1 -CA86 1 -54 1 -74 1 -C5A2 1 -C5A3 1 -C5A4 1 -C5A5 1 -C89A 1 -C89B 1 -CDAD 1 -CAA8 1 -C6BE 1 -CAA6 1 -CAA7 1 -C5A6 1 -C5A7 1 -C6AB 1 -C6AC 1 -C6AD 1 -C6AE 1 -CA88 1 -C8B6 1 -CA87 1 -55 1 -75 1 -C399 1 -C39A 1 -C39B 1 -C39C 1 -C3B9 1 -C3BA 1 -C3BB 1 -C3BC 1 -C5A8 1 -C5A9 1 -C5AA 1 -C5AB 1 -C5AC 1 -C5AD 1 -C5AE 1 -C5AF 1 -C5B0 1 -C5B1 1 -C5B2 1 -C5B3 1 -C6AF 1 -C6B0 1 -C793 1 -C794 1 -C795 1 -C796 1 -C797 1 -C798 1 -C799 1 -C79A 1 -C79B 1 -C79C 1 -C894 1 -C895 1 -C896 1 -C897 1 -CDA7 1 -CA89 1 -C9A5 1 -CAAE 1 -CAAF 1 -C69C 1 -C9AF 1 -C9B0 1 -C6B1 1 -CA8A 1 -56 1 -76 1 -CDAE 1 -C6B2 1 -CA8B 1 -CA8C 1 -57 1 -77 1 -C5B4 1 -C5B5 1 -CAB7 1 -CA8D 1 -58 1 -78 1 -CBA3 1 -CDAF 1 -59 1 -79 1 -C39D 1 -C3BD 1 -C3BF 1 -C5B6 1 -C5B7 1 -C5B8 1 -C8B2 1 -C8B3 1 -CAB8 1 -CA8F 1 -C6B3 1 -C6B4 1 -5A 1 -7A 1 -C5B9 1 -C5BA 1 -C5BB 1 -C5BC 1 -C68D 1 -C5BD 1 -C5BE 1 -C6B5 1 -C6B6 1 -C8A4 1 -C8A5 1 -CA90 1 -CA91 1 -C6B7 1 -C7AE 1 -C7AF 1 -CA92 1 -C6B8 1 -C6B9 1 -C6BA 1 -CA93 1 -C89C 1 -C89D 1 -C39E 1 -C3BE 1 -C6BF 1 -C7B7 1 -C6BB 1 -C6A7 1 -C6A8 1 -C6BC 1 -C6BD 1 -C684 1 -C685 1 -CA94 1 -CB80 1 -CABC 1 -C589 1 -CBAE 1 -CABE 1 -CA95 1 -CBA4 1 -CABF 1 -CB81 1 -CAA1 1 -CAA2 1 -CA96 1 -C780 1 -C781 1 -C782 1 -C783 1 -CA97 1 -CA98 1 -CAAC 1 -CAAD 1 -CE86 1 -CE91 1 -CEAC 1 -CEB1 1 -CE92 1 -CEB2 1 -CF90 1 -CE93 1 -CEB3 1 -CE94 1 -CEB4 1 -CE88 1 -CE95 1 -CEAD 1 -CEB5 1 -CFB5 1 -CF9C 1 -CF9D 1 -CF9A 1 -CF9B 1 -CE96 1 -CEB6 1 -CE89 1 -CE97 1 -CEAE 1 -CEB7 1 -CE98 1 -CEB8 1 -CF91 1 -CFB4 1 -CDBA 1 -CE8A 1 -CE90 1 -CE99 1 -CEAA 1 -CEAF 1 -CEB9 1 -CF8A 1 -CFB3 1 -CE9A 1 -CEBA 1 -CFB0 1 -CF97 1 -CE9B 1 -CEBB 1 -C2B5 1 -CE9C 1 -CEBC 1 -CE9D 1 -CEBD 1 -CE9E 1 -CEBE 1 -CE8C 1 -CE9F 1 -CEBF 1 -CF8C 1 -CEA0 1 -CF80 1 -CF96 1 -CF9E 1 -CF9F 1 -CF98 1 -CF99 1 -CEA1 1 -CF81 1 -CFB1 1 -CEA3 1 -CF82 1 -CF83 1 -CFB2 1 -CFB9 1 -CEA4 1 -CF84 1 -CE8E 1 -CEA5 1 -CEAB 1 -CEB0 1 -CF85 1 -CF8B 1 -CF8D 1 -CF92 1 -CF93 1 -CF94 1 -CEA6 1 -CF86 1 -CF95 1 -CEA7 1 -CF87 1 -CEA8 1 -CF88 1 -CE8F 1 -CEA9 1 -CF89 1 -CF8E 1 -CFA0 1 -CFA1 1 -CFB7 1 -CFB8 1 -CFBA 1 -CFBB 1 -CFA2 1 -CFA3 1 -CFA4 1 -CFA5 1 -CFA6 1 -CFA7 1 -CFA8 1 -CFA9 1 -CFAA 1 -CFAB 1 -CFAC 1 -CFAD 1 -CFAE 1 -CFAF 1 -D090 1 -D0B0 1 -D390 1 -D391 1 -D392 1 -D393 1 -D398 1 -D399 1 -D39A 1 -D39B 1 -D394 1 -D395 1 -D091 1 -D0B1 1 -D092 1 -D0B2 1 -D093 1 -D0B3 1 -D290 1 -D291 1 -D292 1 -D293 1 -D294 1 -D295 1 -D094 1 -D0B4 1 -D480 1 -D481 1 -D082 1 -D192 1 -D482 1 -D483 1 -D083 1 -D193 1 -D298 1 -D299 1 -D080 1 -D081 1 -D095 1 -D0B5 1 -D190 1 -D191 1 -D396 1 -D397 1 -D084 1 -D194 1 -D096 1 -D0B6 1 -D381 1 -D382 1 -D39C 1 -D39D 1 -D296 1 -D297 1 -D097 1 -D0B7 1 -D484 1 -D485 1 -D39E 1 -D39F 1 -D085 1 -D195 1 -D3A0 1 -D3A1 1 -D486 1 -D487 1 -D08D 1 -D098 1 -D0B8 1 -D19D 1 -D3A2 1 -D3A3 1 -D28A 1 -D28B 1 -D3A4 1 -D3A5 1 -D086 1 -D196 1 -D087 1 -D197 1 -D099 1 -D0B9 1 -D088 1 -D198 1 -D09A 1 -D0BA 1 -D29A 1 -D29B 1 -D383 1 -D384 1 -D2A0 1 -D2A1 1 -D29E 1 -D29F 1 -D29C 1 -D29D 1 -D09B 1 -D0BB 1 -D385 1 -D386 1 -D089 1 -D199 1 -D488 1 -D489 1 -D09C 1 -D0BC 1 -D38D 1 -D38E 1 -D09D 1 -D0BD 1 -D389 1 -D38A 1 -D2A2 1 -D2A3 1 -D387 1 -D388 1 -D2A4 1 -D2A5 1 -D08A 1 -D19A 1 -D48A 1 -D48B 1 -D09E 1 -D0BE 1 -D3A6 1 -D3A7 1 -D3A8 1 -D3A9 1 -D3AA 1 -D3AB 1 -D09F 1 -D0BF 1 -D2A6 1 -D2A7 1 -D280 1 -D281 1 -D0A0 1 -D180 1 -D28E 1 -D28F 1 -D0A1 1 -D181 1 -D48C 1 -D48D 1 -D2AA 1 -D2AB 1 -D0A2 1 -D182 1 -D48E 1 -D48F 1 -D2AC 1 -D2AD 1 -D08B 1 -D19B 1 -D08C 1 -D19C 1 -D0A3 1 -D183 1 -D3AE 1 -D3AF 1 -D08E 1 -D19E 1 -D3B0 1 -D3B1 1 -D3B2 1 -D3B3 1 -D2AE 1 -D2AF 1 -D2B0 1 -D2B1 1 -D1B8 1 -D1B9 1 -D0A4 1 -D184 1 -D0A5 1 -D185 1 -D2B2 1 -D2B3 1 -D2BA 1 -D2BB 1 -D1A0 1 -D1A1 1 -D1BE 1 -D1BF 1 -D1BC 1 -D1BD 1 -D1BA 1 -D1BB 1 -D0A6 1 -D186 1 -D2B4 1 -D2B5 1 -D0A7 1 -D187 1 -D3B4 1 -D3B5 1 -D2B6 1 -D2B7 1 -D38B 1 -D38C 1 -D2B8 1 -D2B9 1 -D2BC 1 -D2BD 1 -D2BE 1 -D2BF 1 -D08F 1 -D19F 1 -D0A8 1 -D188 1 -D0A9 1 -D189 1 -D0AA 1 -D18A 1 -D0AB 1 -D18B 1 -D3B8 1 -D3B9 1 -D0AC 1 -D18C 1 -D28C 1 -D28D 1 -D1A2 1 -D1A3 1 -D0AD 1 -D18D 1 -D3AC 1 -D3AD 1 -D0AE 1 -D18E 1 -D0AF 1 -D18F 1 -D1A4 1 -D1A5 1 -D1A6 1 -D1A7 1 -D1AA 1 -D1AB 1 -D1A8 1 -D1A9 1 -D1AC 1 -D1AD 1 -D1AE 1 -D1AF 1 -D1B0 1 -D1B1 1 -D1B2 1 -D1B3 1 -D1B4 1 -D1B5 1 -D1B6 1 -D1B7 1 -D2A8 1 -D2A9 1 -D380 1 -D4B1 1 -D5A1 1 -D4B2 1 -D5A2 1 -D4B3 1 -D5A3 1 -D4B4 1 -D5A4 1 -D4B5 1 -D5A5 1 -D687 1 -D4B6 1 -D5A6 1 -D4B7 1 -D5A7 1 -D4B8 1 -D5A8 1 -D4B9 1 -D5A9 1 -D4BA 1 -D5AA 1 -D4BB 1 -D5AB 1 -D4BC 1 -D5AC 1 -D4BD 1 -D5AD 1 -D4BE 1 -D5AE 1 -D4BF 1 -D5AF 1 -D580 1 -D5B0 1 -D581 1 -D5B1 1 -D582 1 -D5B2 1 -D583 1 -D5B3 1 -D584 1 -D5B4 1 -D585 1 -D5B5 1 -D586 1 -D5B6 1 -D587 1 -D5B7 1 -D588 1 -D5B8 1 -D589 1 -D5B9 1 -D58A 1 -D5BA 1 -D58B 1 -D5BB 1 -D58C 1 -D5BC 1 -D58D 1 -D5BD 1 -D58E 1 -D5BE 1 -D58F 1 -D5BF 1 -D590 1 -D680 1 -D591 1 -D681 1 -D592 1 -D682 1 -D593 1 -D683 1 -D594 1 -D684 1 -D595 1 -D685 1 -D596 1 -D686 1 -D599 1 -D790 1 -D791 1 -D792 1 -D793 1 -D794 1 -D795 1 -D7B0 1 -D7B1 1 -D796 1 -D797 1 -D798 1 -D799 1 -D7B2 1 -D79A 1 -D79B 1 -D79C 1 -D79D 1 -D79E 1 -D79F 1 -D7A0 1 -D7A1 1 -D7A2 1 -D7A3 1 -D7A4 1 -D7A5 1 -D7A6 1 -D7A7 1 -D7A8 1 -D7A9 1 -D7AA 1 -D8A1 1 -D9B4 1 -DBBD 1 -D8A2 1 -D8A3 1 -D9B2 1 -D9B1 1 -D8A4 1 -D8A5 1 -D9B3 1 -D8A6 1 -D8A7 1 -D9B5 1 -D9AE 1 -D8A8 1 -D9BB 1 -D9BE 1 -DA80 1 -D8A9 1 -D8AA 1 -D8AB 1 -D9B9 1 -D9BA 1 -D9BC 1 -D9BD 1 -D9BF 1 -D8AC 1 -DA83 1 -DA84 1 -DA86 1 -DABF 1 -DA87 1 -D8AD 1 -D8AE 1 -DA81 1 -DA82 1 -DA85 1 -D8AF 1 -D8B0 1 -DA88 1 -DA89 1 -DA8A 1 -DA8B 1 -DA8C 1 -DA8D 1 -DA8E 1 -DA8F 1 -DA90 1 -DBAE 1 -D8B1 1 -D8B2 1 -DA91 1 -DA92 1 -DA93 1 -DA94 1 -DA95 1 -DA96 1 -DA97 1 -DA98 1 -DA99 1 -DBAF 1 -D8B3 1 -D8B4 1 -DA9A 1 -DA9B 1 -DA9C 1 -DBBA 1 -D8B5 1 -D8B6 1 -DA9D 1 -DA9E 1 -DBBB 1 -D8B7 1 -D8B8 1 -DA9F 1 -D8B9 1 -D8BA 1 -DAA0 1 -DBBC 1 -D981 1 -DAA1 1 -DAA2 1 -DAA3 1 -DAA4 1 -DAA5 1 -DAA6 1 -D9AF 1 -D982 1 -DAA7 1 -DAA8 1 -D983 1 -DAA9 1 -DAAA 1 -DAAB 1 -DAAC 1 -DAAD 1 -DAAE 1 -DAAF 1 -DAB0 1 -DAB1 1 -DAB2 1 -DAB3 1 -DAB4 1 -D984 1 -DAB5 1 -DAB6 1 -DAB7 1 -DAB8 1 -D985 1 -DBBE 1 -D986 1 -DABA 1 -DABB 1 -DABC 1 -DABD 1 -DAB9 1 -D987 1 -DABE 1 -DB81 1 -DB82 1 -DB83 1 -DBBF 1 -DB80 1 -DB95 1 -D988 1 -DBA5 1 -D9B6 1 -DB84 1 -DB85 1 -DB86 1 -DB87 1 -D9B7 1 -DB88 1 -DB89 1 -DB8A 1 -DB8B 1 -DB8F 1 -D989 1 -D98A 1 -DBA6 1 -D9B8 1 -DB8C 1 -DB8D 1 -DB8E 1 -DB90 1 -DB91 1 -DB92 1 -DB93 1 -DC90 1 -DC92 1 -DCAD 1 -DC93 1 -DC94 1 -DCAE 1 -DC96 1 -DC95 1 -DCAF 1 -DC97 1 -DC98 1 -DC99 1 -DD8D 1 -DC9A 1 -DC9B 1 -DC9C 1 -DC9D 1 -DC9E 1 -DC9F 1 -DD8E 1 -DCA0 1 -DCA1 1 -DCA2 1 -DCA3 1 -DCA4 1 -DCA5 1 -DCA6 1 -DCA7 1 -DD8F 1 -DCA8 1 -DCA9 1 -DCAA 1 -DCAB 1 -DCAC 1 -DE80 1 -DE99 1 -DE9A 1 -DE81 1 -DE82 1 -DE83 1 -DE9C 1 -DE84 1 -DE85 1 -DE86 1 -DE87 1 -DEA2 1 -DEA3 1 -DE88 1 -DEA5 1 -DE89 1 -DE8A 1 -DE8B 1 -DE9B 1 -DE8C 1 -DE98 1 -DEA0 1 -DEA1 1 -DE8D 1 -DE8E 1 -DEA4 1 -DE8F 1 -DE90 1 -DE9D 1 -DE9E 1 -DE9F 1 -DE91 1 -DE92 1 -DE93 1 -DE94 1 -DE95 1 -DE96 1 -DE97 1 -DEB1 1 -DEA6 1 -DEA7 1 -DEA8 1 -DEA9 1 -DEAA 1 -DEAB 1 -DEAC 1 -DEAD 1 -DEAE 1 -DEAF 1 -DEB0 1 -E4B880 1 -E4B881 1 -E4B882 1 -E4B883 1 -E4B884 1 -E4B885 1 -E4B886 1 -E4B887 1 -E4B888 1 -E4B889 1 -E4B88A 1 -E4B88B 1 -E4B88C 1 -E4B88D 1 -E4B88E 1 -E4B88F 1 -E4B890 1 -E4B891 1 -E4B892 1 -E4B893 1 -E4B894 1 -E4B895 1 -E4B896 1 -E4B897 1 -E4B898 1 -E4B899 1 -E4B89A 1 -E4B89B 1 -E4B89C 1 -E4B89D 1 -E4B89E 1 -E4B89F 1 -E4B8A0 1 -E4B8A1 1 -E4B8A2 1 -E4B8A3 1 -E4B8A4 1 -E4B8A5 1 -E4B8A6 1 -E4B8A7 1 -E4B8A8 1 -E4B8A9 1 -E4B8AA 1 -E4B8AB 1 -E4B8AC 1 -E4B8AD 1 -E4B8AE 1 -E4B8AF 1 -E4B8B0 1 -E4B8B1 1 -E4B8B2 1 -E4B8B3 1 -E4B8B4 1 -E4B8B5 1 -E4B8B6 1 -E4B8B7 1 -E4B8B8 1 -E4B8B9 1 -E4B8BA 1 -E4B8BB 1 -E4B8BC 1 -E4B8BD 1 -E4B8BE 1 -E4B8BF 1 -E4B980 1 -E4B981 1 -E4B982 1 -E4B983 1 -E4B984 1 -E4B985 1 -E4B986 1 -E4B987 1 -E4B988 1 -E4B989 1 -E4B98A 1 -E4B98B 1 -E4B98C 1 -E4B98D 1 -E4B98E 1 -E4B98F 1 -E4B990 1 -E4B991 1 -E4B992 1 -E4B993 1 -E4B994 1 -E4B995 1 -E4B996 1 -E4B997 1 -E4B998 1 -E4B999 1 -E4B99A 1 -E4B99B 1 -E4B99C 1 -E4B99D 1 -E4B99E 1 -E4B99F 1 -E4B9A0 1 -E4B9A1 1 -E4B9A2 1 -E4B9A3 1 -E4B9A4 1 -E4B9A5 1 -E4B9A6 1 -E4B9A7 1 -E4B9A8 1 -E4B9A9 1 -E4B9AA 1 -E4B9AB 1 -E4B9AC 1 -E4B9AD 1 -E4B9AE 1 -E4B9AF 1 -E4B9B0 1 -E4B9B1 1 -E4B9B2 1 -E4B9B3 1 -E4B9B4 1 -E4B9B5 1 -E4B9B6 1 -E4B9B7 1 -E4B9B8 1 -E4B9B9 1 -E4B9BA 1 -E4B9BB 1 -E4B9BC 1 -E4B9BD 1 -E4B9BE 1 -E4B9BF 1 -E4BA80 1 -E4BA81 1 -E4BA82 1 -E4BA83 1 -E4BA84 1 -E4BA85 1 -E4BA86 1 -E4BA87 1 -E4BA88 1 -E4BA89 1 -E4BA8A 1 -E4BA8B 1 -E4BA8C 1 -E4BA8D 1 -E4BA8E 1 -E4BA8F 1 -E4BA90 1 -E4BA91 1 -E4BA92 1 -E4BA93 1 -E4BA94 1 -E4BA95 1 -E4BA96 1 -E4BA97 1 -E4BA98 1 -E4BA99 1 -E4BA9A 1 -E4BA9B 1 -E4BA9C 1 -E4BA9D 1 -E4BA9E 1 -E4BA9F 1 -E4BAA0 1 -E4BAA1 1 -E4BAA2 1 -E4BAA3 1 -E4BAA4 1 -E4BAA5 1 -E4BAA6 1 -E4BAA7 1 -E4BAA8 1 -E4BAA9 1 -E4BAAA 1 -E4BAAB 1 -E4BAAC 1 -E4BAAD 1 -E4BAAE 1 -E4BAAF 1 -E4BAB0 1 -E4BAB1 1 -E4BAB2 1 -E4BAB3 1 -E4BAB4 1 -E4BAB5 1 -E4BAB6 1 -E4BAB7 1 -E4BAB8 1 -E4BAB9 1 -E4BABA 1 -E4BABB 1 -E4BABC 1 -E4BABD 1 -E4BABE 1 -E4BABF 1 -E4BB80 1 -E4BB81 1 -E4BB82 1 -E4BB83 1 -E4BB84 1 -E4BB85 1 -E4BB86 1 -E4BB87 1 -E4BB88 1 -E4BB89 1 -E4BB8A 1 -E4BB8B 1 -E4BB8C 1 -E4BB8D 1 -E4BB8E 1 -E4BB8F 1 -E4BB90 1 -E4BB91 1 -E4BB92 1 -E4BB93 1 -E4BB94 1 -E4BB95 1 -E4BB96 1 -E4BB97 1 -E4BB98 1 -E4BB99 1 -E4BB9A 1 -E4BB9B 1 -E4BB9C 1 -E4BB9D 1 -E4BB9E 1 -E4BB9F 1 -E4BBA0 1 -E4BBA1 1 -E4BBA2 1 -E4BBA3 1 -E4BBA4 1 -E4BBA5 1 -E4BBA6 1 -E4BBA7 1 -E4BBA8 1 -E4BBA9 1 -E4BBAA 1 -E4BBAB 1 -E4BBAC 1 -E4BBAD 1 -E4BBAE 1 -E4BBAF 1 -E4BBB0 1 -E4BBB1 1 -E4BBB2 1 -E4BBB3 1 -E4BBB4 1 -E4BBB5 1 -E4BBB6 1 -E4BBB7 1 -E4BBB8 1 -E4BBB9 1 -E4BBBA 1 -E4BBBB 1 -E4BBBC 1 -E4BBBD 1 -E4BBBE 1 -E4BBBF 1 -E4BC80 1 -E4BC81 1 -E4BC82 1 -E4BC83 1 -E4BC84 1 -E4BC85 1 -E4BC86 1 -E4BC87 1 -E4BC88 1 -E4BC89 1 -E4BC8A 1 -E4BC8B 1 -E4BC8C 1 -E4BC8D 1 -E4BC8E 1 -E4BC8F 1 -E4BC90 1 -E4BC91 1 -E4BC92 1 -E4BC93 1 -E4BC94 1 -E4BC95 1 -E4BC96 1 -E4BC97 1 -E4BC98 1 -E4BC99 1 -E4BC9A 1 -E4BC9B 1 -E4BC9C 1 -E4BC9D 1 -E4BC9E 1 -E4BC9F 1 -E4BCA0 1 -E4BCA1 1 -E4BCA2 1 -E4BCA3 1 -E4BCA4 1 -E4BCA5 1 -E4BCA6 1 -E4BCA7 1 -E4BCA8 1 -E4BCA9 1 -E4BCAA 1 -E4BCAB 1 -E4BCAC 1 -E4BCAD 1 -E4BCAE 1 -E4BCAF 1 -E4BCB0 1 -E4BCB1 1 -E4BCB2 1 -E4BCB3 1 -E4BCB4 1 -E4BCB5 1 -E4BCB6 1 -E4BCB7 1 -E4BCB8 1 -E4BCB9 1 -E4BCBA 1 -E4BCBB 1 -E4BCBC 1 -E4BCBD 1 -E4BCBE 1 -E4BCBF 1 -E4BD80 1 -E4BD81 1 -E4BD82 1 -E4BD83 1 -E4BD84 1 -E4BD85 1 -E4BD86 1 -E4BD87 1 -E4BD88 1 -E4BD89 1 -E4BD8A 1 -E4BD8B 1 -E4BD8C 1 -E4BD8D 1 -E4BD8E 1 -E4BD8F 1 -E4BD90 1 -E4BD91 1 -E4BD92 1 -E4BD93 1 -E4BD94 1 -E4BD95 1 -E4BD96 1 -E4BD97 1 -E4BD98 1 -E4BD99 1 -E4BD9A 1 -E4BD9B 1 -E4BD9C 1 -E4BD9D 1 -E4BD9E 1 -E4BD9F 1 -E4BDA0 1 -E4BDA1 1 -E4BDA2 1 -E4BDA3 1 -E4BDA4 1 -E4BDA5 1 -E4BDA6 1 -E4BDA7 1 -E4BDA8 1 -E4BDA9 1 -E4BDAA 1 -E4BDAB 1 -E4BDAC 1 -E4BDAD 1 -E4BDAE 1 -E4BDAF 1 -E4BDB0 1 -E4BDB1 1 -E4BDB2 1 -E4BDB3 1 -E4BDB4 1 -E4BDB5 1 -E4BDB6 1 -E4BDB7 1 -E4BDB8 1 -E4BDB9 1 -E4BDBA 1 -E4BDBB 1 -E4BDBC 1 -E4BDBD 1 -E4BDBE 1 -E4BDBF 1 -E4BE80 1 -E4BE81 1 -E4BE82 1 -E4BE83 1 -E4BE84 1 -E4BE85 1 -E4BE86 1 -E4BE87 1 -E4BE88 1 -E4BE89 1 -E4BE8A 1 -E4BE8B 1 -E4BE8C 1 -E4BE8D 1 -E4BE8E 1 -E4BE8F 1 -E4BE90 1 -E4BE91 1 -E4BE92 1 -E4BE93 1 -E4BE94 1 -E4BE95 1 -E4BE96 1 -E4BE97 1 -E4BE98 1 -E4BE99 1 -E4BE9A 1 -E4BE9B 1 -E4BE9C 1 -E4BE9D 1 -E4BE9E 1 -E4BE9F 1 -E4BEA0 1 -E4BEA1 1 -E4BEA2 1 -E4BEA3 1 -E4BEA4 1 -E4BEA5 1 -E4BEA6 1 -E4BEA7 1 -E4BEA8 1 -E4BEA9 1 -E4BEAA 1 -E4BEAB 1 -E4BEAC 1 -E4BEAD 1 -E4BEAE 1 -E4BEAF 1 -E4BEB0 1 -E4BEB1 1 -E4BEB2 1 -E4BEB3 1 -E4BEB4 1 -E4BEB5 1 -E4BEB6 1 -E4BEB7 1 -E4BEB8 1 -E4BEB9 1 -E4BEBA 1 -E4BEBB 1 -E4BEBC 1 -E4BEBD 1 -E4BEBE 1 -E4BEBF 1 -E4BF80 1 -E4BF81 1 -E4BF82 1 -E4BF83 1 -E4BF84 1 -E4BF85 1 -E4BF86 1 -E4BF87 1 -E4BF88 1 -E4BF89 1 -E4BF8A 1 -E4BF8B 1 -E4BF8C 1 -E4BF8D 1 -E4BF8E 1 -E4BF8F 1 -E4BF90 1 -E4BF91 1 -E4BF92 1 -E4BF93 1 -E4BF94 1 -E4BF95 1 -E4BF96 1 -E4BF97 1 -E4BF98 1 -E4BF99 1 -E4BF9A 1 -E4BF9B 1 -E4BF9C 1 -E4BF9D 1 -E4BF9E 1 -E4BF9F 1 -E4BFA0 1 -E4BFA1 1 -E4BFA2 1 -E4BFA3 1 -E4BFA4 1 -E4BFA5 1 -E4BFA6 1 -E4BFA7 1 -E4BFA8 1 -E4BFA9 1 -E4BFAA 1 -E4BFAB 1 -E4BFAC 1 -E4BFAD 1 -E4BFAE 1 -E4BFAF 1 -E4BFB0 1 -E4BFB1 1 -E4BFB2 1 -E4BFB3 1 -E4BFB4 1 -E4BFB5 1 -E4BFB6 1 -E4BFB7 1 -E4BFB8 1 -E4BFB9 1 -E4BFBA 1 -E4BFBB 1 -E4BFBC 1 -E4BFBD 1 -E4BFBE 1 -E4BFBF 1 -C8B7 1 -C8B8 1 -C8B9 1 -C8BA 1 -C8BB 1 -C8BC 1 -C8BD 1 -C8BE 1 -C8BF 1 -C980 1 -C981 1 -C982 1 -C983 1 -C984 1 -C985 1 -C986 1 -C987 1 -C988 1 -C989 1 -C98A 1 -C98B 1 -C98C 1 -C98D 1 -C98E 1 -C98F 1 -CD98 1 -CD99 1 -CD9A 1 -CD9B 1 -CD9C 1 -CDB0 1 -CDB1 1 -CDB2 1 -CDB3 1 -CDB6 1 -CDB7 1 -CDB8 1 -CDB9 1 -CDBB 1 -CDBC 1 -CDBD 1 -CDBF 1 -CE80 1 -CE81 1 -CE82 1 -CE83 1 -CE8B 1 -CE8D 1 -CEA2 1 -CF8F 1 -CFBC 1 -CFBD 1 -CFBE 1 -CFBF 1 -D287 1 -D38F 1 -D3B6 1 -D3B7 1 -D3BA 1 -D3BB 1 -D3BC 1 -D3BD 1 -D3BE 1 -D3BF 1 -D490 1 -D491 1 -D492 1 -D493 1 -D494 1 -D495 1 -D496 1 -D497 1 -D498 1 -D499 1 -D49A 1 -D49B 1 -D49C 1 -D49D 1 -D49E 1 -D49F 1 -D4A0 1 -D4A1 1 -D4A2 1 -D4A3 1 -D4A4 1 -D4A5 1 -D4A6 1 -D4A7 1 -D4A8 1 -D4A9 1 -D4AA 1 -D4AB 1 -D4AC 1 -D4AD 1 -D4AE 1 -D4AF 1 -D4B0 1 -D597 1 -D598 1 -D5A0 1 -D688 1 -D68B 1 -D68C 1 -D68D 1 -D68E 1 -D68F 1 -D690 1 -D6A2 1 -D6BA 1 -D785 1 -D786 1 -D787 1 -D788 1 -D789 1 -D78A 1 -D78B 1 -D78C 1 -D78D 1 -D78E 1 -D78F 1 -D7AB 1 -D7AC 1 -D7AD 1 -D7AE 1 -D7AF 1 -D7B5 1 -D7B6 1 -D7B7 1 -D7B8 1 -D7B9 1 -D7BA 1 -D7BB 1 -D7BC 1 -D7BD 1 -D7BE 1 -D7BF 1 -D884 1 -D885 1 -D886 1 -D887 1 -D888 1 -D889 1 -D88A 1 -D88B 1 -D896 1 -D897 1 -D898 1 -D899 1 -D89A 1 -D89C 1 -D89D 1 -D89E 1 -D8A0 1 -D8BB 1 -D8BC 1 -D8BD 1 -D8BE 1 -D8BF 1 -D999 1 -D99A 1 -D99B 1 -D99C 1 -D99D 1 -D99E 1 -D99F 1 -DC8E 1 -DD8B 1 -DD8C 1 -DD90 1 -DD91 1 -DD92 1 -DD93 1 -DD94 1 -DD95 1 -DD96 1 -DD97 1 -DD98 1 -DD99 1 -DD9A 1 -DD9B 1 -DD9C 1 -DD9D 1 -DD9E 1 -DD9F 1 -DDA0 1 -DDA1 1 -DDA2 1 -DDA3 1 -DDA4 1 -DDA5 1 -DDA6 1 -DDA7 1 -DDA8 1 -DDA9 1 -DDAA 1 -DDAB 1 -DDAC 1 -DDAD 1 -DDAE 1 -DDAF 1 -DDB0 1 -DDB1 1 -DDB2 1 -DDB3 1 -DDB4 1 -DDB5 1 -DDB6 1 -DDB7 1 -DDB8 1 -DDB9 1 -DDBA 1 -DDBB 1 -DDBC 1 -DDBD 1 -DDBE 1 -DDBF 1 -DEB2 1 -DEB3 1 -DEB4 1 -DEB5 1 -DEB6 1 -DEB7 1 -DEB8 1 -DEB9 1 -DEBA 1 -DEBB 1 -DEBC 1 -DEBD 1 -DEBE 1 -DEBF 1 -DF80 1 -DF81 1 -DF82 1 -DF83 1 -DF84 1 -DF85 1 -DF86 1 -DF87 1 -DF88 1 -DF89 1 -DF8A 1 -DF8B 1 -DF8C 1 -DF8D 1 -DF8E 1 -DF8F 1 -DF90 1 -DF91 1 -DF92 1 -DF93 1 -DF94 1 -DF95 1 -DF96 1 -DF97 1 -DF98 1 -DF99 1 -DF9A 1 -DF9B 1 -DF9C 1 -DF9D 1 -DF9E 1 -DF9F 1 -DFA0 1 -DFA1 1 -DFA2 1 -DFA3 1 -DFA4 1 -DFA5 1 -DFA6 1 -DFA7 1 -DFA8 1 -DFA9 1 -DFAA 1 -DFAB 1 -DFAC 1 -DFAD 1 -DFAE 1 -DFAF 1 -DFB0 1 -DFB1 1 -DFB2 1 -DFB3 1 -DFB4 1 -DFB5 1 -DFB6 1 -DFB7 1 -DFB8 1 -DFB9 1 -DFBA 1 -DFBB 1 -DFBC 1 -DFBD 1 -DFBE 1 -DFBF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_spanish2_ci) ENGINE=NDB CHARACTER SET utf8 COLLATE utf8_spanish2_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_spanish2_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -C285 1 -7F 1 -C280 1 -C281 1 -C282 1 -C283 1 -C284 1 -C286 1 -C287 1 -C288 1 -C289 1 -C28A 1 -C28B 1 -C28C 1 -C28D 1 -C28E 1 -C28F 1 -C290 1 -C291 1 -C292 1 -C293 1 -C294 1 -C295 1 -C296 1 -C297 1 -C298 1 -C299 1 -C29A 1 -C29B 1 -C29C 1 -C29D 1 -C29E 1 -C29F 1 -C2A0 1 -CC80 1 -CC81 1 -CC82 1 -CC83 1 -CC84 1 -CC85 1 -CC86 1 -CC87 1 -CC88 1 -CC89 1 -CC8A 1 -CC8B 1 -CC8C 1 -CC8D 1 -CC8E 1 -CC8F 1 -CC90 1 -CC91 1 -CC92 1 -CC93 1 -CC94 1 -CC95 1 -CC96 1 -CC97 1 -CC98 1 -CC99 1 -CC9A 1 -CC9B 1 -CC9C 1 -CC9D 1 -CC9E 1 -CC9F 1 -CCA0 1 -CCA1 1 -CCA2 1 -CCA3 1 -CCA4 1 -CCA5 1 -CCA6 1 -CCA7 1 -CCA8 1 -CCA9 1 -CCAA 1 -CCAB 1 -CCAC 1 -CCAD 1 -CCAE 1 -CCAF 1 -CCB0 1 -CCB1 1 -CCB2 1 -CCB3 1 -CCB4 1 -CCB5 1 -CCB6 1 -CCB7 1 -CCB8 1 -CCB9 1 -CCBA 1 -CCBB 1 -CCBC 1 -CCBD 1 -CCBE 1 -CCBF 1 -CD80 1 -CD81 1 -CD82 1 -CD83 1 -CD84 1 -CD85 1 -CD86 1 -CD87 1 -CD88 1 -CD89 1 -CD8A 1 -CD8B 1 -CD8C 1 -CD8D 1 -CD8E 1 -CD8F 1 -CD90 1 -CD91 1 -CD92 1 -CD93 1 -CD94 1 -CD95 1 -CD96 1 -CD97 1 -CD9D 1 -CD9E 1 -CD9F 1 -CDA0 1 -CDA1 1 -CDA2 1 -D283 1 -D284 1 -D285 1 -D286 1 -D288 1 -D289 1 -D691 1 -D692 1 -D693 1 -D694 1 -D695 1 -D696 1 -D697 1 -D698 1 -D699 1 -D69A 1 -D69B 1 -D69C 1 -D69D 1 -D69E 1 -D69F 1 -D6A0 1 -D6A1 1 -D6A3 1 -D6A4 1 -D6A5 1 -D6A6 1 -D6A7 1 -D6A8 1 -D6A9 1 -D6AA 1 -D6AB 1 -D6AC 1 -D6AD 1 -D6AE 1 -D6AF 1 -D6B0 1 -D6B1 1 -D6B2 1 -D6B3 1 -D6B4 1 -D6B5 1 -D6B6 1 -D6B7 1 -D6B8 1 -D6B9 1 -D6BB 1 -D6BC 1 -D6BD 1 -D6BF 1 -D781 1 -D782 1 -D784 1 -D880 1 -D881 1 -D882 1 -D883 1 -D890 1 -D891 1 -D892 1 -D893 1 -D894 1 -D895 1 -D98B 1 -D98C 1 -D98D 1 -D98E 1 -D98F 1 -D990 1 -D991 1 -D992 1 -D993 1 -D994 1 -D995 1 -D996 1 -D997 1 -D998 1 -D9B0 1 -DB96 1 -DB97 1 -DB98 1 -DB99 1 -DB9A 1 -DB9B 1 -DB9C 1 -DB9D 1 -DB9E 1 -DB9F 1 -DBA0 1 -DBA1 1 -DBA2 1 -DBA3 1 -DBA4 1 -DBA7 1 -DBA8 1 -DBAA 1 -DBAB 1 -DBAC 1 -DBAD 1 -DC8F 1 -DC91 1 -DCB0 1 -DCB1 1 -DCB2 1 -DCB3 1 -DCB4 1 -DCB5 1 -DCB6 1 -DCB7 1 -DCB8 1 -DCB9 1 -DCBA 1 -DCBB 1 -DCBC 1 -DCBD 1 -DCBE 1 -DCBF 1 -DD80 1 -DD81 1 -DD82 1 -DD83 1 -DD84 1 -DD85 1 -DD86 1 -DD87 1 -DD88 1 -DD89 1 -DD8A 1 -D980 1 -60 1 -C2B4 1 -CE84 1 -CB9C 1 -5E 1 -C2AF 1 -CB98 1 -CB99 1 -C2A8 1 -CE85 1 -CB9A 1 -CB9D 1 -C2B8 1 -CB9B 1 -5F 1 -C2AD 1 -2D 1 -D68A 1 -2C 1 -D59D 1 -D88C 1 -D88D 1 -D9AB 1 -D9AC 1 -3B 1 -CDBE 1 -D89B 1 -3A 1 -D689 1 -DC83 1 -DC84 1 -DC85 1 -DC86 1 -DC87 1 -DC88 1 -21 1 -C2A1 1 -D59C 1 -3F 1 -C2BF 1 -D59E 1 -D89F 1 -DC89 1 -2E 1 -DB94 1 -DC81 1 -DC82 1 -C2B7 1 -CE87 1 -DC80 1 -27 1 -22 1 -C2AB 1 -C2BB 1 -28 1 -29 1 -5B 1 -7B 1 -7D 1 -C2A7 1 -C2B6 1 -C2A9 1 -C2AE 1 -40 1 -2A 1 -D9AD 1 -2F 1 -26 1 -23 1 -25 1 -D9AA 1 -D59A 1 -D59B 1 -D59F 1 -D6BE 1 -D780 1 -D783 1 -D7B3 1 -D7B4 1 -DC8A 1 -DC8B 1 -DC8C 1 -DC8D 1 -CAB9 1 -CDB4 1 -CDB5 1 -CABA 1 -CB82 1 -CB83 1 -CB84 1 -CB85 1 -CB86 1 -CB87 1 -CB88 1 -CB89 1 -CB8A 1 -CB8B 1 -CB8C 1 -CB8D 1 -CB8E 1 -CB8F 1 -CB92 1 -CB93 1 -CB94 1 -CB95 1 -CB96 1 -CB97 1 -CB9E 1 -CB9F 1 -CBA5 1 -CBA6 1 -CBA7 1 -CBA8 1 -CBA9 1 -CBAA 1 -CBAB 1 -CBAC 1 -CBAD 1 -CBAF 1 -CBB0 1 -CBB1 1 -CBB2 1 -CBB3 1 -CBB4 1 -CBB5 1 -CBB6 1 -CBB7 1 -CBB8 1 -CBB9 1 -CBBA 1 -CBBB 1 -CBBC 1 -CBBD 1 -CBBE 1 -CBBF 1 -C2B0 1 -D282 1 -D88E 1 -D88F 1 -DBA9 1 -CFB6 1 -2B 1 -C2B1 1 -C3B7 1 -C397 1 -3C 1 -3D 1 -3E 1 -C2AC 1 -7C 1 -C2A6 1 -7E 1 -CB90 1 -CB91 1 -C2A4 1 -C2A2 1 -24 1 -C2A3 1 -C2A5 1 -30 1 -D9A0 1 -DBB0 1 -31 1 -C2B9 1 -D9A1 1 -DBB1 1 -C2BD 1 -C2BC 1 -32 1 -C2B2 1 -D9A2 1 -DBB2 1 -33 1 -C2B3 1 -D9A3 1 -DBB3 1 -C2BE 1 -34 1 -D9A4 1 -DBB4 1 -35 1 -D9A5 1 -DBB5 1 -36 1 -D9A6 1 -DBB6 1 -37 1 -D9A7 1 -DBB7 1 -38 1 -D9A8 1 -DBB8 1 -39 1 -D9A9 1 -DBB9 1 -41 1 -61 1 -C2AA 1 -C380 1 -C381 1 -C382 1 -C383 1 -C384 1 -C385 1 -C3A0 1 -C3A1 1 -C3A2 1 -C3A3 1 -C3A4 1 -C3A5 1 -C480 1 -C481 1 -C482 1 -C483 1 -C484 1 -C485 1 -C78D 1 -C78E 1 -C79E 1 -C79F 1 -C7A0 1 -C7A1 1 -C7BA 1 -C7BB 1 -C880 1 -C881 1 -C882 1 -C883 1 -C8A6 1 -C8A7 1 -CDA3 1 -C386 1 -C3A6 1 -C7A2 1 -C7A3 1 -C7BC 1 -C7BD 1 -C990 1 -C991 1 -C992 1 -42 1 -62 1 -CA99 1 -C680 1 -C681 1 -C993 1 -C682 1 -C683 1 -43 1 -63 1 -C387 1 -C3A7 1 -C486 1 -C487 1 -C488 1 -C489 1 -C48A 1 -C48B 1 -C48C 1 -C48D 1 -CDA8 1 -C687 1 -C688 1 -C995 1 -44 1 -64 1 -C48E 1 -C48F 1 -CDA9 1 -C784 1 -C785 1 -C786 1 -C7B1 1 -C7B2 1 -C7B3 1 -CAA3 1 -CAA5 1 -CAA4 1 -C490 1 -C491 1 -C689 1 -C996 1 -C68A 1 -C997 1 -C68B 1 -C68C 1 -C8A1 1 -C390 1 -C3B0 1 -45 1 -65 1 -C388 1 -C389 1 -C38A 1 -C38B 1 -C3A8 1 -C3A9 1 -C3AA 1 -C3AB 1 -C492 1 -C493 1 -C494 1 -C495 1 -C496 1 -C497 1 -C498 1 -C499 1 -C49A 1 -C49B 1 -C884 1 -C885 1 -C886 1 -C887 1 -C8A8 1 -C8A9 1 -CDA4 1 -C68E 1 -C79D 1 -C68F 1 -C999 1 -C690 1 -C99B 1 -C998 1 -C99A 1 -C99C 1 -C99D 1 -C99E 1 -CA9A 1 -C9A4 1 -46 1 -66 1 -CAA9 1 -C691 1 -C692 1 -47 1 -67 1 -C49C 1 -C49D 1 -C49E 1 -C49F 1 -C4A0 1 -C4A1 1 -C4A2 1 -C4A3 1 -C7A6 1 -C7A7 1 -C7B4 1 -C7B5 1 -C9A1 1 -C9A2 1 -C7A4 1 -C7A5 1 -C693 1 -C9A0 1 -CA9B 1 -C694 1 -C9A3 1 -CBA0 1 -C6A2 1 -C6A3 1 -48 1 -68 1 -C4A4 1 -C4A5 1 -C89E 1 -C89F 1 -CAB0 1 -CDAA 1 -CA9C 1 -C695 1 -C7B6 1 -C4A6 1 -C4A7 1 -C9A6 1 -CAB1 1 -C9A7 1 -CABB 1 -CABD 1 -49 1 -69 1 -C38C 1 -C38D 1 -C38E 1 -C38F 1 -C3AC 1 -C3AD 1 -C3AE 1 -C3AF 1 -C4A8 1 -C4A9 1 -C4AA 1 -C4AB 1 -C4AC 1 -C4AD 1 -C4AE 1 -C4AF 1 -C4B0 1 -C78F 1 -C790 1 -C888 1 -C889 1 -C88A 1 -C88B 1 -CDA5 1 -C4B2 1 -C4B3 1 -C4B1 1 -C9AA 1 -C697 1 -C9A8 1 -C696 1 -C9A9 1 -4A 1 -6A 1 -C4B4 1 -C4B5 1 -C7B0 1 -CAB2 1 -CA9D 1 -C99F 1 -CA84 1 -4B 1 -6B 1 -C4B6 1 -C4B7 1 -C7A8 1 -C7A9 1 -C698 1 -C699 1 -CA9E 1 -4C 1 -6C 1 -C4B9 1 -C4BA 1 -C4BB 1 -C4BC 1 -C4BD 1 -C4BE 1 -CBA1 1 -C4BF 1 -C580 1 -C787 1 -C788 1 -C789 1 -CAAA 1 -CAAB 1 -CA9F 1 -C581 1 -C582 1 -C69A 1 -C9AB 1 -C9AC 1 -C9AD 1 -C8B4 1 -C9AE 1 -C69B 1 -CA8E 1 -4D 1 -6D 1 -CDAB 1 -C9B1 1 -4E 1 -6E 1 -C583 1 -C584 1 -C585 1 -C586 1 -C587 1 -C588 1 -C7B8 1 -C7B9 1 -C78A 1 -C78B 1 -C78C 1 -C391 1 -C3B1 1 -C9B4 1 -C69D 1 -C9B2 1 -C69E 1 -C8A0 1 -C9B3 1 -C8B5 1 -C58A 1 -C58B 1 -4F 1 -6F 1 -C2BA 1 -C392 1 -C393 1 -C394 1 -C395 1 -C396 1 -C3B2 1 -C3B3 1 -C3B4 1 -C3B5 1 -C3B6 1 -C58C 1 -C58D 1 -C58E 1 -C58F 1 -C590 1 -C591 1 -C6A0 1 -C6A1 1 -C791 1 -C792 1 -C7AA 1 -C7AB 1 -C7AC 1 -C7AD 1 -C88C 1 -C88D 1 -C88E 1 -C88F 1 -C8AA 1 -C8AB 1 -C8AC 1 -C8AD 1 -C8AE 1 -C8AF 1 -C8B0 1 -C8B1 1 -CDA6 1 -C592 1 -C593 1 -C9B6 1 -C398 1 -C3B8 1 -C7BE 1 -C7BF 1 -C686 1 -C994 1 -C69F 1 -C9B5 1 -C9B7 1 -C8A2 1 -C8A3 1 -50 1 -70 1 -C6A4 1 -C6A5 1 -C9B8 1 -51 1 -71 1 -CAA0 1 -C4B8 1 -52 1 -72 1 -C594 1 -C595 1 -C596 1 -C597 1 -C598 1 -C599 1 -C890 1 -C891 1 -C892 1 -C893 1 -CAB3 1 -CDAC 1 -C6A6 1 -CA80 1 -C9B9 1 -CAB4 1 -C9BA 1 -C9BB 1 -CAB5 1 -C9BC 1 -C9BD 1 -C9BE 1 -C9BF 1 -CA81 1 -CAB6 1 -53 1 -73 1 -C59A 1 -C59B 1 -C59C 1 -C59D 1 -C59E 1 -C59F 1 -C5A0 1 -C5A1 1 -C5BF 1 -C898 1 -C899 1 -CBA2 1 -C39F 1 -CA82 1 -C6A9 1 -CA83 1 -C6AA 1 -CA85 1 -CA86 1 -54 1 -74 1 -C5A2 1 -C5A3 1 -C5A4 1 -C5A5 1 -C89A 1 -C89B 1 -CDAD 1 -CAA8 1 -C6BE 1 -CAA6 1 -CAA7 1 -C5A6 1 -C5A7 1 -C6AB 1 -C6AC 1 -C6AD 1 -C6AE 1 -CA88 1 -C8B6 1 -CA87 1 -55 1 -75 1 -C399 1 -C39A 1 -C39B 1 -C39C 1 -C3B9 1 -C3BA 1 -C3BB 1 -C3BC 1 -C5A8 1 -C5A9 1 -C5AA 1 -C5AB 1 -C5AC 1 -C5AD 1 -C5AE 1 -C5AF 1 -C5B0 1 -C5B1 1 -C5B2 1 -C5B3 1 -C6AF 1 -C6B0 1 -C793 1 -C794 1 -C795 1 -C796 1 -C797 1 -C798 1 -C799 1 -C79A 1 -C79B 1 -C79C 1 -C894 1 -C895 1 -C896 1 -C897 1 -CDA7 1 -CA89 1 -C9A5 1 -CAAE 1 -CAAF 1 -C69C 1 -C9AF 1 -C9B0 1 -C6B1 1 -CA8A 1 -56 1 -76 1 -CDAE 1 -C6B2 1 -CA8B 1 -CA8C 1 -57 1 -77 1 -C5B4 1 -C5B5 1 -CAB7 1 -CA8D 1 -58 1 -78 1 -CBA3 1 -CDAF 1 -59 1 -79 1 -C39D 1 -C3BD 1 -C3BF 1 -C5B6 1 -C5B7 1 -C5B8 1 -C8B2 1 -C8B3 1 -CAB8 1 -CA8F 1 -C6B3 1 -C6B4 1 -5A 1 -7A 1 -C5B9 1 -C5BA 1 -C5BB 1 -C5BC 1 -C5BD 1 -C5BE 1 -C68D 1 -C6B5 1 -C6B6 1 -C8A4 1 -C8A5 1 -CA90 1 -CA91 1 -C6B7 1 -C7AE 1 -C7AF 1 -CA92 1 -C6B8 1 -C6B9 1 -C6BA 1 -CA93 1 -C89C 1 -C89D 1 -C39E 1 -C3BE 1 -C6BF 1 -C7B7 1 -C6BB 1 -C6A7 1 -C6A8 1 -C6BC 1 -C6BD 1 -C684 1 -C685 1 -CA94 1 -CB80 1 -CABC 1 -C589 1 -CBAE 1 -CABE 1 -CA95 1 -CBA4 1 -CABF 1 -CB81 1 -CAA1 1 -CAA2 1 -CA96 1 -C780 1 -C781 1 -C782 1 -C783 1 -CA97 1 -CA98 1 -CAAC 1 -CAAD 1 -CE86 1 -CE91 1 -CEAC 1 -CEB1 1 -CE92 1 -CEB2 1 -CF90 1 -CE93 1 -CEB3 1 -CE94 1 -CEB4 1 -CE88 1 -CE95 1 -CEAD 1 -CEB5 1 -CFB5 1 -CF9C 1 -CF9D 1 -CF9A 1 -CF9B 1 -CE96 1 -CEB6 1 -CE89 1 -CE97 1 -CEAE 1 -CEB7 1 -CE98 1 -CEB8 1 -CF91 1 -CFB4 1 -CDBA 1 -CE8A 1 -CE90 1 -CE99 1 -CEAA 1 -CEAF 1 -CEB9 1 -CF8A 1 -CFB3 1 -CE9A 1 -CEBA 1 -CFB0 1 -CF97 1 -CE9B 1 -CEBB 1 -C2B5 1 -CE9C 1 -CEBC 1 -CE9D 1 -CEBD 1 -CE9E 1 -CEBE 1 -CE8C 1 -CE9F 1 -CEBF 1 -CF8C 1 -CEA0 1 -CF80 1 -CF96 1 -CF9E 1 -CF9F 1 -CF98 1 -CF99 1 -CEA1 1 -CF81 1 -CFB1 1 -CEA3 1 -CF82 1 -CF83 1 -CFB2 1 -CFB9 1 -CEA4 1 -CF84 1 -CE8E 1 -CEA5 1 -CEAB 1 -CEB0 1 -CF85 1 -CF8B 1 -CF8D 1 -CF92 1 -CF93 1 -CF94 1 -CEA6 1 -CF86 1 -CF95 1 -CEA7 1 -CF87 1 -CEA8 1 -CF88 1 -CE8F 1 -CEA9 1 -CF89 1 -CF8E 1 -CFA0 1 -CFA1 1 -CFB7 1 -CFB8 1 -CFBA 1 -CFBB 1 -CFA2 1 -CFA3 1 -CFA4 1 -CFA5 1 -CFA6 1 -CFA7 1 -CFA8 1 -CFA9 1 -CFAA 1 -CFAB 1 -CFAC 1 -CFAD 1 -CFAE 1 -CFAF 1 -D090 1 -D0B0 1 -D390 1 -D391 1 -D392 1 -D393 1 -D398 1 -D399 1 -D39A 1 -D39B 1 -D394 1 -D395 1 -D091 1 -D0B1 1 -D092 1 -D0B2 1 -D093 1 -D0B3 1 -D290 1 -D291 1 -D292 1 -D293 1 -D294 1 -D295 1 -D094 1 -D0B4 1 -D480 1 -D481 1 -D082 1 -D192 1 -D482 1 -D483 1 -D083 1 -D193 1 -D298 1 -D299 1 -D080 1 -D081 1 -D095 1 -D0B5 1 -D190 1 -D191 1 -D396 1 -D397 1 -D084 1 -D194 1 -D096 1 -D0B6 1 -D381 1 -D382 1 -D39C 1 -D39D 1 -D296 1 -D297 1 -D097 1 -D0B7 1 -D484 1 -D485 1 -D39E 1 -D39F 1 -D085 1 -D195 1 -D3A0 1 -D3A1 1 -D486 1 -D487 1 -D08D 1 -D098 1 -D0B8 1 -D19D 1 -D3A2 1 -D3A3 1 -D28A 1 -D28B 1 -D3A4 1 -D3A5 1 -D086 1 -D196 1 -D087 1 -D197 1 -D099 1 -D0B9 1 -D088 1 -D198 1 -D09A 1 -D0BA 1 -D29A 1 -D29B 1 -D383 1 -D384 1 -D2A0 1 -D2A1 1 -D29E 1 -D29F 1 -D29C 1 -D29D 1 -D09B 1 -D0BB 1 -D385 1 -D386 1 -D089 1 -D199 1 -D488 1 -D489 1 -D09C 1 -D0BC 1 -D38D 1 -D38E 1 -D09D 1 -D0BD 1 -D389 1 -D38A 1 -D2A2 1 -D2A3 1 -D387 1 -D388 1 -D2A4 1 -D2A5 1 -D08A 1 -D19A 1 -D48A 1 -D48B 1 -D09E 1 -D0BE 1 -D3A6 1 -D3A7 1 -D3A8 1 -D3A9 1 -D3AA 1 -D3AB 1 -D09F 1 -D0BF 1 -D2A6 1 -D2A7 1 -D280 1 -D281 1 -D0A0 1 -D180 1 -D28E 1 -D28F 1 -D0A1 1 -D181 1 -D48C 1 -D48D 1 -D2AA 1 -D2AB 1 -D0A2 1 -D182 1 -D48E 1 -D48F 1 -D2AC 1 -D2AD 1 -D08B 1 -D19B 1 -D08C 1 -D19C 1 -D0A3 1 -D183 1 -D3AE 1 -D3AF 1 -D08E 1 -D19E 1 -D3B0 1 -D3B1 1 -D3B2 1 -D3B3 1 -D2AE 1 -D2AF 1 -D2B0 1 -D2B1 1 -D1B8 1 -D1B9 1 -D0A4 1 -D184 1 -D0A5 1 -D185 1 -D2B2 1 -D2B3 1 -D2BA 1 -D2BB 1 -D1A0 1 -D1A1 1 -D1BE 1 -D1BF 1 -D1BC 1 -D1BD 1 -D1BA 1 -D1BB 1 -D0A6 1 -D186 1 -D2B4 1 -D2B5 1 -D0A7 1 -D187 1 -D3B4 1 -D3B5 1 -D2B6 1 -D2B7 1 -D38B 1 -D38C 1 -D2B8 1 -D2B9 1 -D2BC 1 -D2BD 1 -D2BE 1 -D2BF 1 -D08F 1 -D19F 1 -D0A8 1 -D188 1 -D0A9 1 -D189 1 -D0AA 1 -D18A 1 -D0AB 1 -D18B 1 -D3B8 1 -D3B9 1 -D0AC 1 -D18C 1 -D28C 1 -D28D 1 -D1A2 1 -D1A3 1 -D0AD 1 -D18D 1 -D3AC 1 -D3AD 1 -D0AE 1 -D18E 1 -D0AF 1 -D18F 1 -D1A4 1 -D1A5 1 -D1A6 1 -D1A7 1 -D1AA 1 -D1AB 1 -D1A8 1 -D1A9 1 -D1AC 1 -D1AD 1 -D1AE 1 -D1AF 1 -D1B0 1 -D1B1 1 -D1B2 1 -D1B3 1 -D1B4 1 -D1B5 1 -D1B6 1 -D1B7 1 -D2A8 1 -D2A9 1 -D380 1 -D4B1 1 -D5A1 1 -D4B2 1 -D5A2 1 -D4B3 1 -D5A3 1 -D4B4 1 -D5A4 1 -D4B5 1 -D5A5 1 -D687 1 -D4B6 1 -D5A6 1 -D4B7 1 -D5A7 1 -D4B8 1 -D5A8 1 -D4B9 1 -D5A9 1 -D4BA 1 -D5AA 1 -D4BB 1 -D5AB 1 -D4BC 1 -D5AC 1 -D4BD 1 -D5AD 1 -D4BE 1 -D5AE 1 -D4BF 1 -D5AF 1 -D580 1 -D5B0 1 -D581 1 -D5B1 1 -D582 1 -D5B2 1 -D583 1 -D5B3 1 -D584 1 -D5B4 1 -D585 1 -D5B5 1 -D586 1 -D5B6 1 -D587 1 -D5B7 1 -D588 1 -D5B8 1 -D589 1 -D5B9 1 -D58A 1 -D5BA 1 -D58B 1 -D5BB 1 -D58C 1 -D5BC 1 -D58D 1 -D5BD 1 -D58E 1 -D5BE 1 -D58F 1 -D5BF 1 -D590 1 -D680 1 -D591 1 -D681 1 -D592 1 -D682 1 -D593 1 -D683 1 -D594 1 -D684 1 -D595 1 -D685 1 -D596 1 -D686 1 -D599 1 -D790 1 -D791 1 -D792 1 -D793 1 -D794 1 -D795 1 -D7B0 1 -D7B1 1 -D796 1 -D797 1 -D798 1 -D799 1 -D7B2 1 -D79A 1 -D79B 1 -D79C 1 -D79D 1 -D79E 1 -D79F 1 -D7A0 1 -D7A1 1 -D7A2 1 -D7A3 1 -D7A4 1 -D7A5 1 -D7A6 1 -D7A7 1 -D7A8 1 -D7A9 1 -D7AA 1 -D8A1 1 -D9B4 1 -DBBD 1 -D8A2 1 -D8A3 1 -D9B2 1 -D9B1 1 -D8A4 1 -D8A5 1 -D9B3 1 -D8A6 1 -D8A7 1 -D9B5 1 -D9AE 1 -D8A8 1 -D9BB 1 -D9BE 1 -DA80 1 -D8A9 1 -D8AA 1 -D8AB 1 -D9B9 1 -D9BA 1 -D9BC 1 -D9BD 1 -D9BF 1 -D8AC 1 -DA83 1 -DA84 1 -DA86 1 -DABF 1 -DA87 1 -D8AD 1 -D8AE 1 -DA81 1 -DA82 1 -DA85 1 -D8AF 1 -D8B0 1 -DA88 1 -DA89 1 -DA8A 1 -DA8B 1 -DA8C 1 -DA8D 1 -DA8E 1 -DA8F 1 -DA90 1 -DBAE 1 -D8B1 1 -D8B2 1 -DA91 1 -DA92 1 -DA93 1 -DA94 1 -DA95 1 -DA96 1 -DA97 1 -DA98 1 -DA99 1 -DBAF 1 -D8B3 1 -D8B4 1 -DA9A 1 -DA9B 1 -DA9C 1 -DBBA 1 -D8B5 1 -D8B6 1 -DA9D 1 -DA9E 1 -DBBB 1 -D8B7 1 -D8B8 1 -DA9F 1 -D8B9 1 -D8BA 1 -DAA0 1 -DBBC 1 -D981 1 -DAA1 1 -DAA2 1 -DAA3 1 -DAA4 1 -DAA5 1 -DAA6 1 -D9AF 1 -D982 1 -DAA7 1 -DAA8 1 -D983 1 -DAA9 1 -DAAA 1 -DAAB 1 -DAAC 1 -DAAD 1 -DAAE 1 -DAAF 1 -DAB0 1 -DAB1 1 -DAB2 1 -DAB3 1 -DAB4 1 -D984 1 -DAB5 1 -DAB6 1 -DAB7 1 -DAB8 1 -D985 1 -DBBE 1 -D986 1 -DABA 1 -DABB 1 -DABC 1 -DABD 1 -DAB9 1 -D987 1 -DABE 1 -DB81 1 -DB82 1 -DB83 1 -DBBF 1 -DB80 1 -DB95 1 -D988 1 -DBA5 1 -D9B6 1 -DB84 1 -DB85 1 -DB86 1 -DB87 1 -D9B7 1 -DB88 1 -DB89 1 -DB8A 1 -DB8B 1 -DB8F 1 -D989 1 -D98A 1 -DBA6 1 -D9B8 1 -DB8C 1 -DB8D 1 -DB8E 1 -DB90 1 -DB91 1 -DB92 1 -DB93 1 -DC90 1 -DC92 1 -DCAD 1 -DC93 1 -DC94 1 -DCAE 1 -DC96 1 -DC95 1 -DCAF 1 -DC97 1 -DC98 1 -DC99 1 -DD8D 1 -DC9A 1 -DC9B 1 -DC9C 1 -DC9D 1 -DC9E 1 -DC9F 1 -DD8E 1 -DCA0 1 -DCA1 1 -DCA2 1 -DCA3 1 -DCA4 1 -DCA5 1 -DCA6 1 -DCA7 1 -DD8F 1 -DCA8 1 -DCA9 1 -DCAA 1 -DCAB 1 -DCAC 1 -DE80 1 -DE99 1 -DE9A 1 -DE81 1 -DE82 1 -DE83 1 -DE9C 1 -DE84 1 -DE85 1 -DE86 1 -DE87 1 -DEA2 1 -DEA3 1 -DE88 1 -DEA5 1 -DE89 1 -DE8A 1 -DE8B 1 -DE9B 1 -DE8C 1 -DE98 1 -DEA0 1 -DEA1 1 -DE8D 1 -DE8E 1 -DEA4 1 -DE8F 1 -DE90 1 -DE9D 1 -DE9E 1 -DE9F 1 -DE91 1 -DE92 1 -DE93 1 -DE94 1 -DE95 1 -DE96 1 -DE97 1 -DEB1 1 -DEA6 1 -DEA7 1 -DEA8 1 -DEA9 1 -DEAA 1 -DEAB 1 -DEAC 1 -DEAD 1 -DEAE 1 -DEAF 1 -DEB0 1 -E4B880 1 -E4B881 1 -E4B882 1 -E4B883 1 -E4B884 1 -E4B885 1 -E4B886 1 -E4B887 1 -E4B888 1 -E4B889 1 -E4B88A 1 -E4B88B 1 -E4B88C 1 -E4B88D 1 -E4B88E 1 -E4B88F 1 -E4B890 1 -E4B891 1 -E4B892 1 -E4B893 1 -E4B894 1 -E4B895 1 -E4B896 1 -E4B897 1 -E4B898 1 -E4B899 1 -E4B89A 1 -E4B89B 1 -E4B89C 1 -E4B89D 1 -E4B89E 1 -E4B89F 1 -E4B8A0 1 -E4B8A1 1 -E4B8A2 1 -E4B8A3 1 -E4B8A4 1 -E4B8A5 1 -E4B8A6 1 -E4B8A7 1 -E4B8A8 1 -E4B8A9 1 -E4B8AA 1 -E4B8AB 1 -E4B8AC 1 -E4B8AD 1 -E4B8AE 1 -E4B8AF 1 -E4B8B0 1 -E4B8B1 1 -E4B8B2 1 -E4B8B3 1 -E4B8B4 1 -E4B8B5 1 -E4B8B6 1 -E4B8B7 1 -E4B8B8 1 -E4B8B9 1 -E4B8BA 1 -E4B8BB 1 -E4B8BC 1 -E4B8BD 1 -E4B8BE 1 -E4B8BF 1 -E4B980 1 -E4B981 1 -E4B982 1 -E4B983 1 -E4B984 1 -E4B985 1 -E4B986 1 -E4B987 1 -E4B988 1 -E4B989 1 -E4B98A 1 -E4B98B 1 -E4B98C 1 -E4B98D 1 -E4B98E 1 -E4B98F 1 -E4B990 1 -E4B991 1 -E4B992 1 -E4B993 1 -E4B994 1 -E4B995 1 -E4B996 1 -E4B997 1 -E4B998 1 -E4B999 1 -E4B99A 1 -E4B99B 1 -E4B99C 1 -E4B99D 1 -E4B99E 1 -E4B99F 1 -E4B9A0 1 -E4B9A1 1 -E4B9A2 1 -E4B9A3 1 -E4B9A4 1 -E4B9A5 1 -E4B9A6 1 -E4B9A7 1 -E4B9A8 1 -E4B9A9 1 -E4B9AA 1 -E4B9AB 1 -E4B9AC 1 -E4B9AD 1 -E4B9AE 1 -E4B9AF 1 -E4B9B0 1 -E4B9B1 1 -E4B9B2 1 -E4B9B3 1 -E4B9B4 1 -E4B9B5 1 -E4B9B6 1 -E4B9B7 1 -E4B9B8 1 -E4B9B9 1 -E4B9BA 1 -E4B9BB 1 -E4B9BC 1 -E4B9BD 1 -E4B9BE 1 -E4B9BF 1 -E4BA80 1 -E4BA81 1 -E4BA82 1 -E4BA83 1 -E4BA84 1 -E4BA85 1 -E4BA86 1 -E4BA87 1 -E4BA88 1 -E4BA89 1 -E4BA8A 1 -E4BA8B 1 -E4BA8C 1 -E4BA8D 1 -E4BA8E 1 -E4BA8F 1 -E4BA90 1 -E4BA91 1 -E4BA92 1 -E4BA93 1 -E4BA94 1 -E4BA95 1 -E4BA96 1 -E4BA97 1 -E4BA98 1 -E4BA99 1 -E4BA9A 1 -E4BA9B 1 -E4BA9C 1 -E4BA9D 1 -E4BA9E 1 -E4BA9F 1 -E4BAA0 1 -E4BAA1 1 -E4BAA2 1 -E4BAA3 1 -E4BAA4 1 -E4BAA5 1 -E4BAA6 1 -E4BAA7 1 -E4BAA8 1 -E4BAA9 1 -E4BAAA 1 -E4BAAB 1 -E4BAAC 1 -E4BAAD 1 -E4BAAE 1 -E4BAAF 1 -E4BAB0 1 -E4BAB1 1 -E4BAB2 1 -E4BAB3 1 -E4BAB4 1 -E4BAB5 1 -E4BAB6 1 -E4BAB7 1 -E4BAB8 1 -E4BAB9 1 -E4BABA 1 -E4BABB 1 -E4BABC 1 -E4BABD 1 -E4BABE 1 -E4BABF 1 -E4BB80 1 -E4BB81 1 -E4BB82 1 -E4BB83 1 -E4BB84 1 -E4BB85 1 -E4BB86 1 -E4BB87 1 -E4BB88 1 -E4BB89 1 -E4BB8A 1 -E4BB8B 1 -E4BB8C 1 -E4BB8D 1 -E4BB8E 1 -E4BB8F 1 -E4BB90 1 -E4BB91 1 -E4BB92 1 -E4BB93 1 -E4BB94 1 -E4BB95 1 -E4BB96 1 -E4BB97 1 -E4BB98 1 -E4BB99 1 -E4BB9A 1 -E4BB9B 1 -E4BB9C 1 -E4BB9D 1 -E4BB9E 1 -E4BB9F 1 -E4BBA0 1 -E4BBA1 1 -E4BBA2 1 -E4BBA3 1 -E4BBA4 1 -E4BBA5 1 -E4BBA6 1 -E4BBA7 1 -E4BBA8 1 -E4BBA9 1 -E4BBAA 1 -E4BBAB 1 -E4BBAC 1 -E4BBAD 1 -E4BBAE 1 -E4BBAF 1 -E4BBB0 1 -E4BBB1 1 -E4BBB2 1 -E4BBB3 1 -E4BBB4 1 -E4BBB5 1 -E4BBB6 1 -E4BBB7 1 -E4BBB8 1 -E4BBB9 1 -E4BBBA 1 -E4BBBB 1 -E4BBBC 1 -E4BBBD 1 -E4BBBE 1 -E4BBBF 1 -E4BC80 1 -E4BC81 1 -E4BC82 1 -E4BC83 1 -E4BC84 1 -E4BC85 1 -E4BC86 1 -E4BC87 1 -E4BC88 1 -E4BC89 1 -E4BC8A 1 -E4BC8B 1 -E4BC8C 1 -E4BC8D 1 -E4BC8E 1 -E4BC8F 1 -E4BC90 1 -E4BC91 1 -E4BC92 1 -E4BC93 1 -E4BC94 1 -E4BC95 1 -E4BC96 1 -E4BC97 1 -E4BC98 1 -E4BC99 1 -E4BC9A 1 -E4BC9B 1 -E4BC9C 1 -E4BC9D 1 -E4BC9E 1 -E4BC9F 1 -E4BCA0 1 -E4BCA1 1 -E4BCA2 1 -E4BCA3 1 -E4BCA4 1 -E4BCA5 1 -E4BCA6 1 -E4BCA7 1 -E4BCA8 1 -E4BCA9 1 -E4BCAA 1 -E4BCAB 1 -E4BCAC 1 -E4BCAD 1 -E4BCAE 1 -E4BCAF 1 -E4BCB0 1 -E4BCB1 1 -E4BCB2 1 -E4BCB3 1 -E4BCB4 1 -E4BCB5 1 -E4BCB6 1 -E4BCB7 1 -E4BCB8 1 -E4BCB9 1 -E4BCBA 1 -E4BCBB 1 -E4BCBC 1 -E4BCBD 1 -E4BCBE 1 -E4BCBF 1 -E4BD80 1 -E4BD81 1 -E4BD82 1 -E4BD83 1 -E4BD84 1 -E4BD85 1 -E4BD86 1 -E4BD87 1 -E4BD88 1 -E4BD89 1 -E4BD8A 1 -E4BD8B 1 -E4BD8C 1 -E4BD8D 1 -E4BD8E 1 -E4BD8F 1 -E4BD90 1 -E4BD91 1 -E4BD92 1 -E4BD93 1 -E4BD94 1 -E4BD95 1 -E4BD96 1 -E4BD97 1 -E4BD98 1 -E4BD99 1 -E4BD9A 1 -E4BD9B 1 -E4BD9C 1 -E4BD9D 1 -E4BD9E 1 -E4BD9F 1 -E4BDA0 1 -E4BDA1 1 -E4BDA2 1 -E4BDA3 1 -E4BDA4 1 -E4BDA5 1 -E4BDA6 1 -E4BDA7 1 -E4BDA8 1 -E4BDA9 1 -E4BDAA 1 -E4BDAB 1 -E4BDAC 1 -E4BDAD 1 -E4BDAE 1 -E4BDAF 1 -E4BDB0 1 -E4BDB1 1 -E4BDB2 1 -E4BDB3 1 -E4BDB4 1 -E4BDB5 1 -E4BDB6 1 -E4BDB7 1 -E4BDB8 1 -E4BDB9 1 -E4BDBA 1 -E4BDBB 1 -E4BDBC 1 -E4BDBD 1 -E4BDBE 1 -E4BDBF 1 -E4BE80 1 -E4BE81 1 -E4BE82 1 -E4BE83 1 -E4BE84 1 -E4BE85 1 -E4BE86 1 -E4BE87 1 -E4BE88 1 -E4BE89 1 -E4BE8A 1 -E4BE8B 1 -E4BE8C 1 -E4BE8D 1 -E4BE8E 1 -E4BE8F 1 -E4BE90 1 -E4BE91 1 -E4BE92 1 -E4BE93 1 -E4BE94 1 -E4BE95 1 -E4BE96 1 -E4BE97 1 -E4BE98 1 -E4BE99 1 -E4BE9A 1 -E4BE9B 1 -E4BE9C 1 -E4BE9D 1 -E4BE9E 1 -E4BE9F 1 -E4BEA0 1 -E4BEA1 1 -E4BEA2 1 -E4BEA3 1 -E4BEA4 1 -E4BEA5 1 -E4BEA6 1 -E4BEA7 1 -E4BEA8 1 -E4BEA9 1 -E4BEAA 1 -E4BEAB 1 -E4BEAC 1 -E4BEAD 1 -E4BEAE 1 -E4BEAF 1 -E4BEB0 1 -E4BEB1 1 -E4BEB2 1 -E4BEB3 1 -E4BEB4 1 -E4BEB5 1 -E4BEB6 1 -E4BEB7 1 -E4BEB8 1 -E4BEB9 1 -E4BEBA 1 -E4BEBB 1 -E4BEBC 1 -E4BEBD 1 -E4BEBE 1 -E4BEBF 1 -E4BF80 1 -E4BF81 1 -E4BF82 1 -E4BF83 1 -E4BF84 1 -E4BF85 1 -E4BF86 1 -E4BF87 1 -E4BF88 1 -E4BF89 1 -E4BF8A 1 -E4BF8B 1 -E4BF8C 1 -E4BF8D 1 -E4BF8E 1 -E4BF8F 1 -E4BF90 1 -E4BF91 1 -E4BF92 1 -E4BF93 1 -E4BF94 1 -E4BF95 1 -E4BF96 1 -E4BF97 1 -E4BF98 1 -E4BF99 1 -E4BF9A 1 -E4BF9B 1 -E4BF9C 1 -E4BF9D 1 -E4BF9E 1 -E4BF9F 1 -E4BFA0 1 -E4BFA1 1 -E4BFA2 1 -E4BFA3 1 -E4BFA4 1 -E4BFA5 1 -E4BFA6 1 -E4BFA7 1 -E4BFA8 1 -E4BFA9 1 -E4BFAA 1 -E4BFAB 1 -E4BFAC 1 -E4BFAD 1 -E4BFAE 1 -E4BFAF 1 -E4BFB0 1 -E4BFB1 1 -E4BFB2 1 -E4BFB3 1 -E4BFB4 1 -E4BFB5 1 -E4BFB6 1 -E4BFB7 1 -E4BFB8 1 -E4BFB9 1 -E4BFBA 1 -E4BFBB 1 -E4BFBC 1 -E4BFBD 1 -E4BFBE 1 -E4BFBF 1 -C8B7 1 -C8B8 1 -C8B9 1 -C8BA 1 -C8BB 1 -C8BC 1 -C8BD 1 -C8BE 1 -C8BF 1 -C980 1 -C981 1 -C982 1 -C983 1 -C984 1 -C985 1 -C986 1 -C987 1 -C988 1 -C989 1 -C98A 1 -C98B 1 -C98C 1 -C98D 1 -C98E 1 -C98F 1 -CD98 1 -CD99 1 -CD9A 1 -CD9B 1 -CD9C 1 -CDB0 1 -CDB1 1 -CDB2 1 -CDB3 1 -CDB6 1 -CDB7 1 -CDB8 1 -CDB9 1 -CDBB 1 -CDBC 1 -CDBD 1 -CDBF 1 -CE80 1 -CE81 1 -CE82 1 -CE83 1 -CE8B 1 -CE8D 1 -CEA2 1 -CF8F 1 -CFBC 1 -CFBD 1 -CFBE 1 -CFBF 1 -D287 1 -D38F 1 -D3B6 1 -D3B7 1 -D3BA 1 -D3BB 1 -D3BC 1 -D3BD 1 -D3BE 1 -D3BF 1 -D490 1 -D491 1 -D492 1 -D493 1 -D494 1 -D495 1 -D496 1 -D497 1 -D498 1 -D499 1 -D49A 1 -D49B 1 -D49C 1 -D49D 1 -D49E 1 -D49F 1 -D4A0 1 -D4A1 1 -D4A2 1 -D4A3 1 -D4A4 1 -D4A5 1 -D4A6 1 -D4A7 1 -D4A8 1 -D4A9 1 -D4AA 1 -D4AB 1 -D4AC 1 -D4AD 1 -D4AE 1 -D4AF 1 -D4B0 1 -D597 1 -D598 1 -D5A0 1 -D688 1 -D68B 1 -D68C 1 -D68D 1 -D68E 1 -D68F 1 -D690 1 -D6A2 1 -D6BA 1 -D785 1 -D786 1 -D787 1 -D788 1 -D789 1 -D78A 1 -D78B 1 -D78C 1 -D78D 1 -D78E 1 -D78F 1 -D7AB 1 -D7AC 1 -D7AD 1 -D7AE 1 -D7AF 1 -D7B5 1 -D7B6 1 -D7B7 1 -D7B8 1 -D7B9 1 -D7BA 1 -D7BB 1 -D7BC 1 -D7BD 1 -D7BE 1 -D7BF 1 -D884 1 -D885 1 -D886 1 -D887 1 -D888 1 -D889 1 -D88A 1 -D88B 1 -D896 1 -D897 1 -D898 1 -D899 1 -D89A 1 -D89C 1 -D89D 1 -D89E 1 -D8A0 1 -D8BB 1 -D8BC 1 -D8BD 1 -D8BE 1 -D8BF 1 -D999 1 -D99A 1 -D99B 1 -D99C 1 -D99D 1 -D99E 1 -D99F 1 -DC8E 1 -DD8B 1 -DD8C 1 -DD90 1 -DD91 1 -DD92 1 -DD93 1 -DD94 1 -DD95 1 -DD96 1 -DD97 1 -DD98 1 -DD99 1 -DD9A 1 -DD9B 1 -DD9C 1 -DD9D 1 -DD9E 1 -DD9F 1 -DDA0 1 -DDA1 1 -DDA2 1 -DDA3 1 -DDA4 1 -DDA5 1 -DDA6 1 -DDA7 1 -DDA8 1 -DDA9 1 -DDAA 1 -DDAB 1 -DDAC 1 -DDAD 1 -DDAE 1 -DDAF 1 -DDB0 1 -DDB1 1 -DDB2 1 -DDB3 1 -DDB4 1 -DDB5 1 -DDB6 1 -DDB7 1 -DDB8 1 -DDB9 1 -DDBA 1 -DDBB 1 -DDBC 1 -DDBD 1 -DDBE 1 -DDBF 1 -DEB2 1 -DEB3 1 -DEB4 1 -DEB5 1 -DEB6 1 -DEB7 1 -DEB8 1 -DEB9 1 -DEBA 1 -DEBB 1 -DEBC 1 -DEBD 1 -DEBE 1 -DEBF 1 -DF80 1 -DF81 1 -DF82 1 -DF83 1 -DF84 1 -DF85 1 -DF86 1 -DF87 1 -DF88 1 -DF89 1 -DF8A 1 -DF8B 1 -DF8C 1 -DF8D 1 -DF8E 1 -DF8F 1 -DF90 1 -DF91 1 -DF92 1 -DF93 1 -DF94 1 -DF95 1 -DF96 1 -DF97 1 -DF98 1 -DF99 1 -DF9A 1 -DF9B 1 -DF9C 1 -DF9D 1 -DF9E 1 -DF9F 1 -DFA0 1 -DFA1 1 -DFA2 1 -DFA3 1 -DFA4 1 -DFA5 1 -DFA6 1 -DFA7 1 -DFA8 1 -DFA9 1 -DFAA 1 -DFAB 1 -DFAC 1 -DFAD 1 -DFAE 1 -DFAF 1 -DFB0 1 -DFB1 1 -DFB2 1 -DFB3 1 -DFB4 1 -DFB5 1 -DFB6 1 -DFB7 1 -DFB8 1 -DFB9 1 -DFBA 1 -DFBB 1 -DFBC 1 -DFBD 1 -DFBE 1 -DFBF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_spanish_ci) ENGINE=NDB CHARACTER SET utf8 COLLATE utf8_spanish_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_spanish_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -C285 1 -7F 1 -C280 1 -C281 1 -C282 1 -C283 1 -C284 1 -C286 1 -C287 1 -C288 1 -C289 1 -C28A 1 -C28B 1 -C28C 1 -C28D 1 -C28E 1 -C28F 1 -C290 1 -C291 1 -C292 1 -C293 1 -C294 1 -C295 1 -C296 1 -C297 1 -C298 1 -C299 1 -C29A 1 -C29B 1 -C29C 1 -C29D 1 -C29E 1 -C29F 1 -C2A0 1 -CC80 1 -CC81 1 -CC82 1 -CC83 1 -CC84 1 -CC85 1 -CC86 1 -CC87 1 -CC88 1 -CC89 1 -CC8A 1 -CC8B 1 -CC8C 1 -CC8D 1 -CC8E 1 -CC8F 1 -CC90 1 -CC91 1 -CC92 1 -CC93 1 -CC94 1 -CC95 1 -CC96 1 -CC97 1 -CC98 1 -CC99 1 -CC9A 1 -CC9B 1 -CC9C 1 -CC9D 1 -CC9E 1 -CC9F 1 -CCA0 1 -CCA1 1 -CCA2 1 -CCA3 1 -CCA4 1 -CCA5 1 -CCA6 1 -CCA7 1 -CCA8 1 -CCA9 1 -CCAA 1 -CCAB 1 -CCAC 1 -CCAD 1 -CCAE 1 -CCAF 1 -CCB0 1 -CCB1 1 -CCB2 1 -CCB3 1 -CCB4 1 -CCB5 1 -CCB6 1 -CCB7 1 -CCB8 1 -CCB9 1 -CCBA 1 -CCBB 1 -CCBC 1 -CCBD 1 -CCBE 1 -CCBF 1 -CD80 1 -CD81 1 -CD82 1 -CD83 1 -CD84 1 -CD85 1 -CD86 1 -CD87 1 -CD88 1 -CD89 1 -CD8A 1 -CD8B 1 -CD8C 1 -CD8D 1 -CD8E 1 -CD8F 1 -CD90 1 -CD91 1 -CD92 1 -CD93 1 -CD94 1 -CD95 1 -CD96 1 -CD97 1 -CD9D 1 -CD9E 1 -CD9F 1 -CDA0 1 -CDA1 1 -CDA2 1 -D283 1 -D284 1 -D285 1 -D286 1 -D288 1 -D289 1 -D691 1 -D692 1 -D693 1 -D694 1 -D695 1 -D696 1 -D697 1 -D698 1 -D699 1 -D69A 1 -D69B 1 -D69C 1 -D69D 1 -D69E 1 -D69F 1 -D6A0 1 -D6A1 1 -D6A3 1 -D6A4 1 -D6A5 1 -D6A6 1 -D6A7 1 -D6A8 1 -D6A9 1 -D6AA 1 -D6AB 1 -D6AC 1 -D6AD 1 -D6AE 1 -D6AF 1 -D6B0 1 -D6B1 1 -D6B2 1 -D6B3 1 -D6B4 1 -D6B5 1 -D6B6 1 -D6B7 1 -D6B8 1 -D6B9 1 -D6BB 1 -D6BC 1 -D6BD 1 -D6BF 1 -D781 1 -D782 1 -D784 1 -D880 1 -D881 1 -D882 1 -D883 1 -D890 1 -D891 1 -D892 1 -D893 1 -D894 1 -D895 1 -D98B 1 -D98C 1 -D98D 1 -D98E 1 -D98F 1 -D990 1 -D991 1 -D992 1 -D993 1 -D994 1 -D995 1 -D996 1 -D997 1 -D998 1 -D9B0 1 -DB96 1 -DB97 1 -DB98 1 -DB99 1 -DB9A 1 -DB9B 1 -DB9C 1 -DB9D 1 -DB9E 1 -DB9F 1 -DBA0 1 -DBA1 1 -DBA2 1 -DBA3 1 -DBA4 1 -DBA7 1 -DBA8 1 -DBAA 1 -DBAB 1 -DBAC 1 -DBAD 1 -DC8F 1 -DC91 1 -DCB0 1 -DCB1 1 -DCB2 1 -DCB3 1 -DCB4 1 -DCB5 1 -DCB6 1 -DCB7 1 -DCB8 1 -DCB9 1 -DCBA 1 -DCBB 1 -DCBC 1 -DCBD 1 -DCBE 1 -DCBF 1 -DD80 1 -DD81 1 -DD82 1 -DD83 1 -DD84 1 -DD85 1 -DD86 1 -DD87 1 -DD88 1 -DD89 1 -DD8A 1 -D980 1 -60 1 -C2B4 1 -CE84 1 -CB9C 1 -5E 1 -C2AF 1 -CB98 1 -CB99 1 -C2A8 1 -CE85 1 -CB9A 1 -CB9D 1 -C2B8 1 -CB9B 1 -5F 1 -C2AD 1 -2D 1 -D68A 1 -2C 1 -D59D 1 -D88C 1 -D88D 1 -D9AB 1 -D9AC 1 -3B 1 -CDBE 1 -D89B 1 -3A 1 -D689 1 -DC83 1 -DC84 1 -DC85 1 -DC86 1 -DC87 1 -DC88 1 -21 1 -C2A1 1 -D59C 1 -3F 1 -C2BF 1 -D59E 1 -D89F 1 -DC89 1 -2E 1 -DB94 1 -DC81 1 -DC82 1 -C2B7 1 -CE87 1 -DC80 1 -27 1 -22 1 -C2AB 1 -C2BB 1 -28 1 -29 1 -5B 1 -7B 1 -7D 1 -C2A7 1 -C2B6 1 -C2A9 1 -C2AE 1 -40 1 -2A 1 -D9AD 1 -2F 1 -26 1 -23 1 -25 1 -D9AA 1 -D59A 1 -D59B 1 -D59F 1 -D6BE 1 -D780 1 -D783 1 -D7B3 1 -D7B4 1 -DC8A 1 -DC8B 1 -DC8C 1 -DC8D 1 -CAB9 1 -CDB4 1 -CDB5 1 -CABA 1 -CB82 1 -CB83 1 -CB84 1 -CB85 1 -CB86 1 -CB87 1 -CB88 1 -CB89 1 -CB8A 1 -CB8B 1 -CB8C 1 -CB8D 1 -CB8E 1 -CB8F 1 -CB92 1 -CB93 1 -CB94 1 -CB95 1 -CB96 1 -CB97 1 -CB9E 1 -CB9F 1 -CBA5 1 -CBA6 1 -CBA7 1 -CBA8 1 -CBA9 1 -CBAA 1 -CBAB 1 -CBAC 1 -CBAD 1 -CBAF 1 -CBB0 1 -CBB1 1 -CBB2 1 -CBB3 1 -CBB4 1 -CBB5 1 -CBB6 1 -CBB7 1 -CBB8 1 -CBB9 1 -CBBA 1 -CBBB 1 -CBBC 1 -CBBD 1 -CBBE 1 -CBBF 1 -C2B0 1 -D282 1 -D88E 1 -D88F 1 -DBA9 1 -CFB6 1 -2B 1 -C2B1 1 -C3B7 1 -C397 1 -3C 1 -3D 1 -3E 1 -C2AC 1 -7C 1 -C2A6 1 -7E 1 -CB90 1 -CB91 1 -C2A4 1 -C2A2 1 -24 1 -C2A3 1 -C2A5 1 -30 1 -D9A0 1 -DBB0 1 -31 1 -C2B9 1 -D9A1 1 -DBB1 1 -C2BD 1 -C2BC 1 -32 1 -C2B2 1 -D9A2 1 -DBB2 1 -33 1 -C2B3 1 -D9A3 1 -DBB3 1 -C2BE 1 -34 1 -D9A4 1 -DBB4 1 -35 1 -D9A5 1 -DBB5 1 -36 1 -D9A6 1 -DBB6 1 -37 1 -D9A7 1 -DBB7 1 -38 1 -D9A8 1 -DBB8 1 -39 1 -D9A9 1 -DBB9 1 -41 1 -61 1 -C2AA 1 -C380 1 -C381 1 -C382 1 -C383 1 -C384 1 -C385 1 -C3A0 1 -C3A1 1 -C3A2 1 -C3A3 1 -C3A4 1 -C3A5 1 -C480 1 -C481 1 -C482 1 -C483 1 -C484 1 -C485 1 -C78D 1 -C78E 1 -C79E 1 -C79F 1 -C7A0 1 -C7A1 1 -C7BA 1 -C7BB 1 -C880 1 -C881 1 -C882 1 -C883 1 -C8A6 1 -C8A7 1 -CDA3 1 -C386 1 -C3A6 1 -C7A2 1 -C7A3 1 -C7BC 1 -C7BD 1 -C990 1 -C991 1 -C992 1 -42 1 -62 1 -CA99 1 -C680 1 -C681 1 -C993 1 -C682 1 -C683 1 -43 1 -63 1 -C387 1 -C3A7 1 -C486 1 -C487 1 -C488 1 -C489 1 -C48A 1 -C48B 1 -C48C 1 -C48D 1 -CDA8 1 -C687 1 -C688 1 -C995 1 -44 1 -64 1 -C48E 1 -C48F 1 -CDA9 1 -C784 1 -C785 1 -C786 1 -C7B1 1 -C7B2 1 -C7B3 1 -CAA3 1 -CAA5 1 -CAA4 1 -C490 1 -C491 1 -C689 1 -C996 1 -C68A 1 -C997 1 -C68B 1 -C68C 1 -C8A1 1 -C390 1 -C3B0 1 -45 1 -65 1 -C388 1 -C389 1 -C38A 1 -C38B 1 -C3A8 1 -C3A9 1 -C3AA 1 -C3AB 1 -C492 1 -C493 1 -C494 1 -C495 1 -C496 1 -C497 1 -C498 1 -C499 1 -C49A 1 -C49B 1 -C884 1 -C885 1 -C886 1 -C887 1 -C8A8 1 -C8A9 1 -CDA4 1 -C68E 1 -C79D 1 -C68F 1 -C999 1 -C690 1 -C99B 1 -C998 1 -C99A 1 -C99C 1 -C99D 1 -C99E 1 -CA9A 1 -C9A4 1 -46 1 -66 1 -CAA9 1 -C691 1 -C692 1 -47 1 -67 1 -C49C 1 -C49D 1 -C49E 1 -C49F 1 -C4A0 1 -C4A1 1 -C4A2 1 -C4A3 1 -C7A6 1 -C7A7 1 -C7B4 1 -C7B5 1 -C9A1 1 -C9A2 1 -C7A4 1 -C7A5 1 -C693 1 -C9A0 1 -CA9B 1 -C694 1 -C9A3 1 -CBA0 1 -C6A2 1 -C6A3 1 -48 1 -68 1 -C4A4 1 -C4A5 1 -C89E 1 -C89F 1 -CAB0 1 -CDAA 1 -CA9C 1 -C695 1 -C7B6 1 -C4A6 1 -C4A7 1 -C9A6 1 -CAB1 1 -C9A7 1 -CABB 1 -CABD 1 -49 1 -69 1 -C38C 1 -C38D 1 -C38E 1 -C38F 1 -C3AC 1 -C3AD 1 -C3AE 1 -C3AF 1 -C4A8 1 -C4A9 1 -C4AA 1 -C4AB 1 -C4AC 1 -C4AD 1 -C4AE 1 -C4AF 1 -C4B0 1 -C78F 1 -C790 1 -C888 1 -C889 1 -C88A 1 -C88B 1 -CDA5 1 -C4B2 1 -C4B3 1 -C4B1 1 -C9AA 1 -C697 1 -C9A8 1 -C696 1 -C9A9 1 -4A 1 -6A 1 -C4B4 1 -C4B5 1 -C7B0 1 -CAB2 1 -CA9D 1 -C99F 1 -CA84 1 -4B 1 -6B 1 -C4B6 1 -C4B7 1 -C7A8 1 -C7A9 1 -C698 1 -C699 1 -CA9E 1 -4C 1 -6C 1 -C4B9 1 -C4BA 1 -C4BB 1 -C4BC 1 -C4BD 1 -C4BE 1 -CBA1 1 -C4BF 1 -C580 1 -C787 1 -C788 1 -C789 1 -CAAA 1 -CAAB 1 -CA9F 1 -C581 1 -C582 1 -C69A 1 -C9AB 1 -C9AC 1 -C9AD 1 -C8B4 1 -C9AE 1 -C69B 1 -CA8E 1 -4D 1 -6D 1 -CDAB 1 -C9B1 1 -4E 1 -6E 1 -C583 1 -C584 1 -C585 1 -C586 1 -C587 1 -C588 1 -C7B8 1 -C7B9 1 -C78A 1 -C78B 1 -C78C 1 -C391 1 -C3B1 1 -C9B4 1 -C69D 1 -C9B2 1 -C69E 1 -C8A0 1 -C9B3 1 -C8B5 1 -C58A 1 -C58B 1 -4F 1 -6F 1 -C2BA 1 -C392 1 -C393 1 -C394 1 -C395 1 -C396 1 -C3B2 1 -C3B3 1 -C3B4 1 -C3B5 1 -C3B6 1 -C58C 1 -C58D 1 -C58E 1 -C58F 1 -C590 1 -C591 1 -C6A0 1 -C6A1 1 -C791 1 -C792 1 -C7AA 1 -C7AB 1 -C7AC 1 -C7AD 1 -C88C 1 -C88D 1 -C88E 1 -C88F 1 -C8AA 1 -C8AB 1 -C8AC 1 -C8AD 1 -C8AE 1 -C8AF 1 -C8B0 1 -C8B1 1 -CDA6 1 -C592 1 -C593 1 -C9B6 1 -C398 1 -C3B8 1 -C7BE 1 -C7BF 1 -C686 1 -C994 1 -C69F 1 -C9B5 1 -C9B7 1 -C8A2 1 -C8A3 1 -50 1 -70 1 -C6A4 1 -C6A5 1 -C9B8 1 -51 1 -71 1 -CAA0 1 -C4B8 1 -52 1 -72 1 -C594 1 -C595 1 -C596 1 -C597 1 -C598 1 -C599 1 -C890 1 -C891 1 -C892 1 -C893 1 -CAB3 1 -CDAC 1 -C6A6 1 -CA80 1 -C9B9 1 -CAB4 1 -C9BA 1 -C9BB 1 -CAB5 1 -C9BC 1 -C9BD 1 -C9BE 1 -C9BF 1 -CA81 1 -CAB6 1 -53 1 -73 1 -C59A 1 -C59B 1 -C59C 1 -C59D 1 -C59E 1 -C59F 1 -C5A0 1 -C5A1 1 -C5BF 1 -C898 1 -C899 1 -CBA2 1 -C39F 1 -CA82 1 -C6A9 1 -CA83 1 -C6AA 1 -CA85 1 -CA86 1 -54 1 -74 1 -C5A2 1 -C5A3 1 -C5A4 1 -C5A5 1 -C89A 1 -C89B 1 -CDAD 1 -CAA8 1 -C6BE 1 -CAA6 1 -CAA7 1 -C5A6 1 -C5A7 1 -C6AB 1 -C6AC 1 -C6AD 1 -C6AE 1 -CA88 1 -C8B6 1 -CA87 1 -55 1 -75 1 -C399 1 -C39A 1 -C39B 1 -C39C 1 -C3B9 1 -C3BA 1 -C3BB 1 -C3BC 1 -C5A8 1 -C5A9 1 -C5AA 1 -C5AB 1 -C5AC 1 -C5AD 1 -C5AE 1 -C5AF 1 -C5B0 1 -C5B1 1 -C5B2 1 -C5B3 1 -C6AF 1 -C6B0 1 -C793 1 -C794 1 -C795 1 -C796 1 -C797 1 -C798 1 -C799 1 -C79A 1 -C79B 1 -C79C 1 -C894 1 -C895 1 -C896 1 -C897 1 -CDA7 1 -CA89 1 -C9A5 1 -CAAE 1 -CAAF 1 -C69C 1 -C9AF 1 -C9B0 1 -C6B1 1 -CA8A 1 -56 1 -76 1 -CDAE 1 -C6B2 1 -CA8B 1 -CA8C 1 -57 1 -77 1 -C5B4 1 -C5B5 1 -CAB7 1 -CA8D 1 -58 1 -78 1 -CBA3 1 -CDAF 1 -59 1 -79 1 -C39D 1 -C3BD 1 -C3BF 1 -C5B6 1 -C5B7 1 -C5B8 1 -C8B2 1 -C8B3 1 -CAB8 1 -CA8F 1 -C6B3 1 -C6B4 1 -5A 1 -7A 1 -C5B9 1 -C5BA 1 -C5BB 1 -C5BC 1 -C5BD 1 -C5BE 1 -C68D 1 -C6B5 1 -C6B6 1 -C8A4 1 -C8A5 1 -CA90 1 -CA91 1 -C6B7 1 -C7AE 1 -C7AF 1 -CA92 1 -C6B8 1 -C6B9 1 -C6BA 1 -CA93 1 -C89C 1 -C89D 1 -C39E 1 -C3BE 1 -C6BF 1 -C7B7 1 -C6BB 1 -C6A7 1 -C6A8 1 -C6BC 1 -C6BD 1 -C684 1 -C685 1 -CA94 1 -CB80 1 -CABC 1 -C589 1 -CBAE 1 -CABE 1 -CA95 1 -CBA4 1 -CABF 1 -CB81 1 -CAA1 1 -CAA2 1 -CA96 1 -C780 1 -C781 1 -C782 1 -C783 1 -CA97 1 -CA98 1 -CAAC 1 -CAAD 1 -CE86 1 -CE91 1 -CEAC 1 -CEB1 1 -CE92 1 -CEB2 1 -CF90 1 -CE93 1 -CEB3 1 -CE94 1 -CEB4 1 -CE88 1 -CE95 1 -CEAD 1 -CEB5 1 -CFB5 1 -CF9C 1 -CF9D 1 -CF9A 1 -CF9B 1 -CE96 1 -CEB6 1 -CE89 1 -CE97 1 -CEAE 1 -CEB7 1 -CE98 1 -CEB8 1 -CF91 1 -CFB4 1 -CDBA 1 -CE8A 1 -CE90 1 -CE99 1 -CEAA 1 -CEAF 1 -CEB9 1 -CF8A 1 -CFB3 1 -CE9A 1 -CEBA 1 -CFB0 1 -CF97 1 -CE9B 1 -CEBB 1 -C2B5 1 -CE9C 1 -CEBC 1 -CE9D 1 -CEBD 1 -CE9E 1 -CEBE 1 -CE8C 1 -CE9F 1 -CEBF 1 -CF8C 1 -CEA0 1 -CF80 1 -CF96 1 -CF9E 1 -CF9F 1 -CF98 1 -CF99 1 -CEA1 1 -CF81 1 -CFB1 1 -CEA3 1 -CF82 1 -CF83 1 -CFB2 1 -CFB9 1 -CEA4 1 -CF84 1 -CE8E 1 -CEA5 1 -CEAB 1 -CEB0 1 -CF85 1 -CF8B 1 -CF8D 1 -CF92 1 -CF93 1 -CF94 1 -CEA6 1 -CF86 1 -CF95 1 -CEA7 1 -CF87 1 -CEA8 1 -CF88 1 -CE8F 1 -CEA9 1 -CF89 1 -CF8E 1 -CFA0 1 -CFA1 1 -CFB7 1 -CFB8 1 -CFBA 1 -CFBB 1 -CFA2 1 -CFA3 1 -CFA4 1 -CFA5 1 -CFA6 1 -CFA7 1 -CFA8 1 -CFA9 1 -CFAA 1 -CFAB 1 -CFAC 1 -CFAD 1 -CFAE 1 -CFAF 1 -D090 1 -D0B0 1 -D390 1 -D391 1 -D392 1 -D393 1 -D398 1 -D399 1 -D39A 1 -D39B 1 -D394 1 -D395 1 -D091 1 -D0B1 1 -D092 1 -D0B2 1 -D093 1 -D0B3 1 -D290 1 -D291 1 -D292 1 -D293 1 -D294 1 -D295 1 -D094 1 -D0B4 1 -D480 1 -D481 1 -D082 1 -D192 1 -D482 1 -D483 1 -D083 1 -D193 1 -D298 1 -D299 1 -D080 1 -D081 1 -D095 1 -D0B5 1 -D190 1 -D191 1 -D396 1 -D397 1 -D084 1 -D194 1 -D096 1 -D0B6 1 -D381 1 -D382 1 -D39C 1 -D39D 1 -D296 1 -D297 1 -D097 1 -D0B7 1 -D484 1 -D485 1 -D39E 1 -D39F 1 -D085 1 -D195 1 -D3A0 1 -D3A1 1 -D486 1 -D487 1 -D08D 1 -D098 1 -D0B8 1 -D19D 1 -D3A2 1 -D3A3 1 -D28A 1 -D28B 1 -D3A4 1 -D3A5 1 -D086 1 -D196 1 -D087 1 -D197 1 -D099 1 -D0B9 1 -D088 1 -D198 1 -D09A 1 -D0BA 1 -D29A 1 -D29B 1 -D383 1 -D384 1 -D2A0 1 -D2A1 1 -D29E 1 -D29F 1 -D29C 1 -D29D 1 -D09B 1 -D0BB 1 -D385 1 -D386 1 -D089 1 -D199 1 -D488 1 -D489 1 -D09C 1 -D0BC 1 -D38D 1 -D38E 1 -D09D 1 -D0BD 1 -D389 1 -D38A 1 -D2A2 1 -D2A3 1 -D387 1 -D388 1 -D2A4 1 -D2A5 1 -D08A 1 -D19A 1 -D48A 1 -D48B 1 -D09E 1 -D0BE 1 -D3A6 1 -D3A7 1 -D3A8 1 -D3A9 1 -D3AA 1 -D3AB 1 -D09F 1 -D0BF 1 -D2A6 1 -D2A7 1 -D280 1 -D281 1 -D0A0 1 -D180 1 -D28E 1 -D28F 1 -D0A1 1 -D181 1 -D48C 1 -D48D 1 -D2AA 1 -D2AB 1 -D0A2 1 -D182 1 -D48E 1 -D48F 1 -D2AC 1 -D2AD 1 -D08B 1 -D19B 1 -D08C 1 -D19C 1 -D0A3 1 -D183 1 -D3AE 1 -D3AF 1 -D08E 1 -D19E 1 -D3B0 1 -D3B1 1 -D3B2 1 -D3B3 1 -D2AE 1 -D2AF 1 -D2B0 1 -D2B1 1 -D1B8 1 -D1B9 1 -D0A4 1 -D184 1 -D0A5 1 -D185 1 -D2B2 1 -D2B3 1 -D2BA 1 -D2BB 1 -D1A0 1 -D1A1 1 -D1BE 1 -D1BF 1 -D1BC 1 -D1BD 1 -D1BA 1 -D1BB 1 -D0A6 1 -D186 1 -D2B4 1 -D2B5 1 -D0A7 1 -D187 1 -D3B4 1 -D3B5 1 -D2B6 1 -D2B7 1 -D38B 1 -D38C 1 -D2B8 1 -D2B9 1 -D2BC 1 -D2BD 1 -D2BE 1 -D2BF 1 -D08F 1 -D19F 1 -D0A8 1 -D188 1 -D0A9 1 -D189 1 -D0AA 1 -D18A 1 -D0AB 1 -D18B 1 -D3B8 1 -D3B9 1 -D0AC 1 -D18C 1 -D28C 1 -D28D 1 -D1A2 1 -D1A3 1 -D0AD 1 -D18D 1 -D3AC 1 -D3AD 1 -D0AE 1 -D18E 1 -D0AF 1 -D18F 1 -D1A4 1 -D1A5 1 -D1A6 1 -D1A7 1 -D1AA 1 -D1AB 1 -D1A8 1 -D1A9 1 -D1AC 1 -D1AD 1 -D1AE 1 -D1AF 1 -D1B0 1 -D1B1 1 -D1B2 1 -D1B3 1 -D1B4 1 -D1B5 1 -D1B6 1 -D1B7 1 -D2A8 1 -D2A9 1 -D380 1 -D4B1 1 -D5A1 1 -D4B2 1 -D5A2 1 -D4B3 1 -D5A3 1 -D4B4 1 -D5A4 1 -D4B5 1 -D5A5 1 -D687 1 -D4B6 1 -D5A6 1 -D4B7 1 -D5A7 1 -D4B8 1 -D5A8 1 -D4B9 1 -D5A9 1 -D4BA 1 -D5AA 1 -D4BB 1 -D5AB 1 -D4BC 1 -D5AC 1 -D4BD 1 -D5AD 1 -D4BE 1 -D5AE 1 -D4BF 1 -D5AF 1 -D580 1 -D5B0 1 -D581 1 -D5B1 1 -D582 1 -D5B2 1 -D583 1 -D5B3 1 -D584 1 -D5B4 1 -D585 1 -D5B5 1 -D586 1 -D5B6 1 -D587 1 -D5B7 1 -D588 1 -D5B8 1 -D589 1 -D5B9 1 -D58A 1 -D5BA 1 -D58B 1 -D5BB 1 -D58C 1 -D5BC 1 -D58D 1 -D5BD 1 -D58E 1 -D5BE 1 -D58F 1 -D5BF 1 -D590 1 -D680 1 -D591 1 -D681 1 -D592 1 -D682 1 -D593 1 -D683 1 -D594 1 -D684 1 -D595 1 -D685 1 -D596 1 -D686 1 -D599 1 -D790 1 -D791 1 -D792 1 -D793 1 -D794 1 -D795 1 -D7B0 1 -D7B1 1 -D796 1 -D797 1 -D798 1 -D799 1 -D7B2 1 -D79A 1 -D79B 1 -D79C 1 -D79D 1 -D79E 1 -D79F 1 -D7A0 1 -D7A1 1 -D7A2 1 -D7A3 1 -D7A4 1 -D7A5 1 -D7A6 1 -D7A7 1 -D7A8 1 -D7A9 1 -D7AA 1 -D8A1 1 -D9B4 1 -DBBD 1 -D8A2 1 -D8A3 1 -D9B2 1 -D9B1 1 -D8A4 1 -D8A5 1 -D9B3 1 -D8A6 1 -D8A7 1 -D9B5 1 -D9AE 1 -D8A8 1 -D9BB 1 -D9BE 1 -DA80 1 -D8A9 1 -D8AA 1 -D8AB 1 -D9B9 1 -D9BA 1 -D9BC 1 -D9BD 1 -D9BF 1 -D8AC 1 -DA83 1 -DA84 1 -DA86 1 -DABF 1 -DA87 1 -D8AD 1 -D8AE 1 -DA81 1 -DA82 1 -DA85 1 -D8AF 1 -D8B0 1 -DA88 1 -DA89 1 -DA8A 1 -DA8B 1 -DA8C 1 -DA8D 1 -DA8E 1 -DA8F 1 -DA90 1 -DBAE 1 -D8B1 1 -D8B2 1 -DA91 1 -DA92 1 -DA93 1 -DA94 1 -DA95 1 -DA96 1 -DA97 1 -DA98 1 -DA99 1 -DBAF 1 -D8B3 1 -D8B4 1 -DA9A 1 -DA9B 1 -DA9C 1 -DBBA 1 -D8B5 1 -D8B6 1 -DA9D 1 -DA9E 1 -DBBB 1 -D8B7 1 -D8B8 1 -DA9F 1 -D8B9 1 -D8BA 1 -DAA0 1 -DBBC 1 -D981 1 -DAA1 1 -DAA2 1 -DAA3 1 -DAA4 1 -DAA5 1 -DAA6 1 -D9AF 1 -D982 1 -DAA7 1 -DAA8 1 -D983 1 -DAA9 1 -DAAA 1 -DAAB 1 -DAAC 1 -DAAD 1 -DAAE 1 -DAAF 1 -DAB0 1 -DAB1 1 -DAB2 1 -DAB3 1 -DAB4 1 -D984 1 -DAB5 1 -DAB6 1 -DAB7 1 -DAB8 1 -D985 1 -DBBE 1 -D986 1 -DABA 1 -DABB 1 -DABC 1 -DABD 1 -DAB9 1 -D987 1 -DABE 1 -DB81 1 -DB82 1 -DB83 1 -DBBF 1 -DB80 1 -DB95 1 -D988 1 -DBA5 1 -D9B6 1 -DB84 1 -DB85 1 -DB86 1 -DB87 1 -D9B7 1 -DB88 1 -DB89 1 -DB8A 1 -DB8B 1 -DB8F 1 -D989 1 -D98A 1 -DBA6 1 -D9B8 1 -DB8C 1 -DB8D 1 -DB8E 1 -DB90 1 -DB91 1 -DB92 1 -DB93 1 -DC90 1 -DC92 1 -DCAD 1 -DC93 1 -DC94 1 -DCAE 1 -DC96 1 -DC95 1 -DCAF 1 -DC97 1 -DC98 1 -DC99 1 -DD8D 1 -DC9A 1 -DC9B 1 -DC9C 1 -DC9D 1 -DC9E 1 -DC9F 1 -DD8E 1 -DCA0 1 -DCA1 1 -DCA2 1 -DCA3 1 -DCA4 1 -DCA5 1 -DCA6 1 -DCA7 1 -DD8F 1 -DCA8 1 -DCA9 1 -DCAA 1 -DCAB 1 -DCAC 1 -DE80 1 -DE99 1 -DE9A 1 -DE81 1 -DE82 1 -DE83 1 -DE9C 1 -DE84 1 -DE85 1 -DE86 1 -DE87 1 -DEA2 1 -DEA3 1 -DE88 1 -DEA5 1 -DE89 1 -DE8A 1 -DE8B 1 -DE9B 1 -DE8C 1 -DE98 1 -DEA0 1 -DEA1 1 -DE8D 1 -DE8E 1 -DEA4 1 -DE8F 1 -DE90 1 -DE9D 1 -DE9E 1 -DE9F 1 -DE91 1 -DE92 1 -DE93 1 -DE94 1 -DE95 1 -DE96 1 -DE97 1 -DEB1 1 -DEA6 1 -DEA7 1 -DEA8 1 -DEA9 1 -DEAA 1 -DEAB 1 -DEAC 1 -DEAD 1 -DEAE 1 -DEAF 1 -DEB0 1 -E4B880 1 -E4B881 1 -E4B882 1 -E4B883 1 -E4B884 1 -E4B885 1 -E4B886 1 -E4B887 1 -E4B888 1 -E4B889 1 -E4B88A 1 -E4B88B 1 -E4B88C 1 -E4B88D 1 -E4B88E 1 -E4B88F 1 -E4B890 1 -E4B891 1 -E4B892 1 -E4B893 1 -E4B894 1 -E4B895 1 -E4B896 1 -E4B897 1 -E4B898 1 -E4B899 1 -E4B89A 1 -E4B89B 1 -E4B89C 1 -E4B89D 1 -E4B89E 1 -E4B89F 1 -E4B8A0 1 -E4B8A1 1 -E4B8A2 1 -E4B8A3 1 -E4B8A4 1 -E4B8A5 1 -E4B8A6 1 -E4B8A7 1 -E4B8A8 1 -E4B8A9 1 -E4B8AA 1 -E4B8AB 1 -E4B8AC 1 -E4B8AD 1 -E4B8AE 1 -E4B8AF 1 -E4B8B0 1 -E4B8B1 1 -E4B8B2 1 -E4B8B3 1 -E4B8B4 1 -E4B8B5 1 -E4B8B6 1 -E4B8B7 1 -E4B8B8 1 -E4B8B9 1 -E4B8BA 1 -E4B8BB 1 -E4B8BC 1 -E4B8BD 1 -E4B8BE 1 -E4B8BF 1 -E4B980 1 -E4B981 1 -E4B982 1 -E4B983 1 -E4B984 1 -E4B985 1 -E4B986 1 -E4B987 1 -E4B988 1 -E4B989 1 -E4B98A 1 -E4B98B 1 -E4B98C 1 -E4B98D 1 -E4B98E 1 -E4B98F 1 -E4B990 1 -E4B991 1 -E4B992 1 -E4B993 1 -E4B994 1 -E4B995 1 -E4B996 1 -E4B997 1 -E4B998 1 -E4B999 1 -E4B99A 1 -E4B99B 1 -E4B99C 1 -E4B99D 1 -E4B99E 1 -E4B99F 1 -E4B9A0 1 -E4B9A1 1 -E4B9A2 1 -E4B9A3 1 -E4B9A4 1 -E4B9A5 1 -E4B9A6 1 -E4B9A7 1 -E4B9A8 1 -E4B9A9 1 -E4B9AA 1 -E4B9AB 1 -E4B9AC 1 -E4B9AD 1 -E4B9AE 1 -E4B9AF 1 -E4B9B0 1 -E4B9B1 1 -E4B9B2 1 -E4B9B3 1 -E4B9B4 1 -E4B9B5 1 -E4B9B6 1 -E4B9B7 1 -E4B9B8 1 -E4B9B9 1 -E4B9BA 1 -E4B9BB 1 -E4B9BC 1 -E4B9BD 1 -E4B9BE 1 -E4B9BF 1 -E4BA80 1 -E4BA81 1 -E4BA82 1 -E4BA83 1 -E4BA84 1 -E4BA85 1 -E4BA86 1 -E4BA87 1 -E4BA88 1 -E4BA89 1 -E4BA8A 1 -E4BA8B 1 -E4BA8C 1 -E4BA8D 1 -E4BA8E 1 -E4BA8F 1 -E4BA90 1 -E4BA91 1 -E4BA92 1 -E4BA93 1 -E4BA94 1 -E4BA95 1 -E4BA96 1 -E4BA97 1 -E4BA98 1 -E4BA99 1 -E4BA9A 1 -E4BA9B 1 -E4BA9C 1 -E4BA9D 1 -E4BA9E 1 -E4BA9F 1 -E4BAA0 1 -E4BAA1 1 -E4BAA2 1 -E4BAA3 1 -E4BAA4 1 -E4BAA5 1 -E4BAA6 1 -E4BAA7 1 -E4BAA8 1 -E4BAA9 1 -E4BAAA 1 -E4BAAB 1 -E4BAAC 1 -E4BAAD 1 -E4BAAE 1 -E4BAAF 1 -E4BAB0 1 -E4BAB1 1 -E4BAB2 1 -E4BAB3 1 -E4BAB4 1 -E4BAB5 1 -E4BAB6 1 -E4BAB7 1 -E4BAB8 1 -E4BAB9 1 -E4BABA 1 -E4BABB 1 -E4BABC 1 -E4BABD 1 -E4BABE 1 -E4BABF 1 -E4BB80 1 -E4BB81 1 -E4BB82 1 -E4BB83 1 -E4BB84 1 -E4BB85 1 -E4BB86 1 -E4BB87 1 -E4BB88 1 -E4BB89 1 -E4BB8A 1 -E4BB8B 1 -E4BB8C 1 -E4BB8D 1 -E4BB8E 1 -E4BB8F 1 -E4BB90 1 -E4BB91 1 -E4BB92 1 -E4BB93 1 -E4BB94 1 -E4BB95 1 -E4BB96 1 -E4BB97 1 -E4BB98 1 -E4BB99 1 -E4BB9A 1 -E4BB9B 1 -E4BB9C 1 -E4BB9D 1 -E4BB9E 1 -E4BB9F 1 -E4BBA0 1 -E4BBA1 1 -E4BBA2 1 -E4BBA3 1 -E4BBA4 1 -E4BBA5 1 -E4BBA6 1 -E4BBA7 1 -E4BBA8 1 -E4BBA9 1 -E4BBAA 1 -E4BBAB 1 -E4BBAC 1 -E4BBAD 1 -E4BBAE 1 -E4BBAF 1 -E4BBB0 1 -E4BBB1 1 -E4BBB2 1 -E4BBB3 1 -E4BBB4 1 -E4BBB5 1 -E4BBB6 1 -E4BBB7 1 -E4BBB8 1 -E4BBB9 1 -E4BBBA 1 -E4BBBB 1 -E4BBBC 1 -E4BBBD 1 -E4BBBE 1 -E4BBBF 1 -E4BC80 1 -E4BC81 1 -E4BC82 1 -E4BC83 1 -E4BC84 1 -E4BC85 1 -E4BC86 1 -E4BC87 1 -E4BC88 1 -E4BC89 1 -E4BC8A 1 -E4BC8B 1 -E4BC8C 1 -E4BC8D 1 -E4BC8E 1 -E4BC8F 1 -E4BC90 1 -E4BC91 1 -E4BC92 1 -E4BC93 1 -E4BC94 1 -E4BC95 1 -E4BC96 1 -E4BC97 1 -E4BC98 1 -E4BC99 1 -E4BC9A 1 -E4BC9B 1 -E4BC9C 1 -E4BC9D 1 -E4BC9E 1 -E4BC9F 1 -E4BCA0 1 -E4BCA1 1 -E4BCA2 1 -E4BCA3 1 -E4BCA4 1 -E4BCA5 1 -E4BCA6 1 -E4BCA7 1 -E4BCA8 1 -E4BCA9 1 -E4BCAA 1 -E4BCAB 1 -E4BCAC 1 -E4BCAD 1 -E4BCAE 1 -E4BCAF 1 -E4BCB0 1 -E4BCB1 1 -E4BCB2 1 -E4BCB3 1 -E4BCB4 1 -E4BCB5 1 -E4BCB6 1 -E4BCB7 1 -E4BCB8 1 -E4BCB9 1 -E4BCBA 1 -E4BCBB 1 -E4BCBC 1 -E4BCBD 1 -E4BCBE 1 -E4BCBF 1 -E4BD80 1 -E4BD81 1 -E4BD82 1 -E4BD83 1 -E4BD84 1 -E4BD85 1 -E4BD86 1 -E4BD87 1 -E4BD88 1 -E4BD89 1 -E4BD8A 1 -E4BD8B 1 -E4BD8C 1 -E4BD8D 1 -E4BD8E 1 -E4BD8F 1 -E4BD90 1 -E4BD91 1 -E4BD92 1 -E4BD93 1 -E4BD94 1 -E4BD95 1 -E4BD96 1 -E4BD97 1 -E4BD98 1 -E4BD99 1 -E4BD9A 1 -E4BD9B 1 -E4BD9C 1 -E4BD9D 1 -E4BD9E 1 -E4BD9F 1 -E4BDA0 1 -E4BDA1 1 -E4BDA2 1 -E4BDA3 1 -E4BDA4 1 -E4BDA5 1 -E4BDA6 1 -E4BDA7 1 -E4BDA8 1 -E4BDA9 1 -E4BDAA 1 -E4BDAB 1 -E4BDAC 1 -E4BDAD 1 -E4BDAE 1 -E4BDAF 1 -E4BDB0 1 -E4BDB1 1 -E4BDB2 1 -E4BDB3 1 -E4BDB4 1 -E4BDB5 1 -E4BDB6 1 -E4BDB7 1 -E4BDB8 1 -E4BDB9 1 -E4BDBA 1 -E4BDBB 1 -E4BDBC 1 -E4BDBD 1 -E4BDBE 1 -E4BDBF 1 -E4BE80 1 -E4BE81 1 -E4BE82 1 -E4BE83 1 -E4BE84 1 -E4BE85 1 -E4BE86 1 -E4BE87 1 -E4BE88 1 -E4BE89 1 -E4BE8A 1 -E4BE8B 1 -E4BE8C 1 -E4BE8D 1 -E4BE8E 1 -E4BE8F 1 -E4BE90 1 -E4BE91 1 -E4BE92 1 -E4BE93 1 -E4BE94 1 -E4BE95 1 -E4BE96 1 -E4BE97 1 -E4BE98 1 -E4BE99 1 -E4BE9A 1 -E4BE9B 1 -E4BE9C 1 -E4BE9D 1 -E4BE9E 1 -E4BE9F 1 -E4BEA0 1 -E4BEA1 1 -E4BEA2 1 -E4BEA3 1 -E4BEA4 1 -E4BEA5 1 -E4BEA6 1 -E4BEA7 1 -E4BEA8 1 -E4BEA9 1 -E4BEAA 1 -E4BEAB 1 -E4BEAC 1 -E4BEAD 1 -E4BEAE 1 -E4BEAF 1 -E4BEB0 1 -E4BEB1 1 -E4BEB2 1 -E4BEB3 1 -E4BEB4 1 -E4BEB5 1 -E4BEB6 1 -E4BEB7 1 -E4BEB8 1 -E4BEB9 1 -E4BEBA 1 -E4BEBB 1 -E4BEBC 1 -E4BEBD 1 -E4BEBE 1 -E4BEBF 1 -E4BF80 1 -E4BF81 1 -E4BF82 1 -E4BF83 1 -E4BF84 1 -E4BF85 1 -E4BF86 1 -E4BF87 1 -E4BF88 1 -E4BF89 1 -E4BF8A 1 -E4BF8B 1 -E4BF8C 1 -E4BF8D 1 -E4BF8E 1 -E4BF8F 1 -E4BF90 1 -E4BF91 1 -E4BF92 1 -E4BF93 1 -E4BF94 1 -E4BF95 1 -E4BF96 1 -E4BF97 1 -E4BF98 1 -E4BF99 1 -E4BF9A 1 -E4BF9B 1 -E4BF9C 1 -E4BF9D 1 -E4BF9E 1 -E4BF9F 1 -E4BFA0 1 -E4BFA1 1 -E4BFA2 1 -E4BFA3 1 -E4BFA4 1 -E4BFA5 1 -E4BFA6 1 -E4BFA7 1 -E4BFA8 1 -E4BFA9 1 -E4BFAA 1 -E4BFAB 1 -E4BFAC 1 -E4BFAD 1 -E4BFAE 1 -E4BFAF 1 -E4BFB0 1 -E4BFB1 1 -E4BFB2 1 -E4BFB3 1 -E4BFB4 1 -E4BFB5 1 -E4BFB6 1 -E4BFB7 1 -E4BFB8 1 -E4BFB9 1 -E4BFBA 1 -E4BFBB 1 -E4BFBC 1 -E4BFBD 1 -E4BFBE 1 -E4BFBF 1 -C8B7 1 -C8B8 1 -C8B9 1 -C8BA 1 -C8BB 1 -C8BC 1 -C8BD 1 -C8BE 1 -C8BF 1 -C980 1 -C981 1 -C982 1 -C983 1 -C984 1 -C985 1 -C986 1 -C987 1 -C988 1 -C989 1 -C98A 1 -C98B 1 -C98C 1 -C98D 1 -C98E 1 -C98F 1 -CD98 1 -CD99 1 -CD9A 1 -CD9B 1 -CD9C 1 -CDB0 1 -CDB1 1 -CDB2 1 -CDB3 1 -CDB6 1 -CDB7 1 -CDB8 1 -CDB9 1 -CDBB 1 -CDBC 1 -CDBD 1 -CDBF 1 -CE80 1 -CE81 1 -CE82 1 -CE83 1 -CE8B 1 -CE8D 1 -CEA2 1 -CF8F 1 -CFBC 1 -CFBD 1 -CFBE 1 -CFBF 1 -D287 1 -D38F 1 -D3B6 1 -D3B7 1 -D3BA 1 -D3BB 1 -D3BC 1 -D3BD 1 -D3BE 1 -D3BF 1 -D490 1 -D491 1 -D492 1 -D493 1 -D494 1 -D495 1 -D496 1 -D497 1 -D498 1 -D499 1 -D49A 1 -D49B 1 -D49C 1 -D49D 1 -D49E 1 -D49F 1 -D4A0 1 -D4A1 1 -D4A2 1 -D4A3 1 -D4A4 1 -D4A5 1 -D4A6 1 -D4A7 1 -D4A8 1 -D4A9 1 -D4AA 1 -D4AB 1 -D4AC 1 -D4AD 1 -D4AE 1 -D4AF 1 -D4B0 1 -D597 1 -D598 1 -D5A0 1 -D688 1 -D68B 1 -D68C 1 -D68D 1 -D68E 1 -D68F 1 -D690 1 -D6A2 1 -D6BA 1 -D785 1 -D786 1 -D787 1 -D788 1 -D789 1 -D78A 1 -D78B 1 -D78C 1 -D78D 1 -D78E 1 -D78F 1 -D7AB 1 -D7AC 1 -D7AD 1 -D7AE 1 -D7AF 1 -D7B5 1 -D7B6 1 -D7B7 1 -D7B8 1 -D7B9 1 -D7BA 1 -D7BB 1 -D7BC 1 -D7BD 1 -D7BE 1 -D7BF 1 -D884 1 -D885 1 -D886 1 -D887 1 -D888 1 -D889 1 -D88A 1 -D88B 1 -D896 1 -D897 1 -D898 1 -D899 1 -D89A 1 -D89C 1 -D89D 1 -D89E 1 -D8A0 1 -D8BB 1 -D8BC 1 -D8BD 1 -D8BE 1 -D8BF 1 -D999 1 -D99A 1 -D99B 1 -D99C 1 -D99D 1 -D99E 1 -D99F 1 -DC8E 1 -DD8B 1 -DD8C 1 -DD90 1 -DD91 1 -DD92 1 -DD93 1 -DD94 1 -DD95 1 -DD96 1 -DD97 1 -DD98 1 -DD99 1 -DD9A 1 -DD9B 1 -DD9C 1 -DD9D 1 -DD9E 1 -DD9F 1 -DDA0 1 -DDA1 1 -DDA2 1 -DDA3 1 -DDA4 1 -DDA5 1 -DDA6 1 -DDA7 1 -DDA8 1 -DDA9 1 -DDAA 1 -DDAB 1 -DDAC 1 -DDAD 1 -DDAE 1 -DDAF 1 -DDB0 1 -DDB1 1 -DDB2 1 -DDB3 1 -DDB4 1 -DDB5 1 -DDB6 1 -DDB7 1 -DDB8 1 -DDB9 1 -DDBA 1 -DDBB 1 -DDBC 1 -DDBD 1 -DDBE 1 -DDBF 1 -DEB2 1 -DEB3 1 -DEB4 1 -DEB5 1 -DEB6 1 -DEB7 1 -DEB8 1 -DEB9 1 -DEBA 1 -DEBB 1 -DEBC 1 -DEBD 1 -DEBE 1 -DEBF 1 -DF80 1 -DF81 1 -DF82 1 -DF83 1 -DF84 1 -DF85 1 -DF86 1 -DF87 1 -DF88 1 -DF89 1 -DF8A 1 -DF8B 1 -DF8C 1 -DF8D 1 -DF8E 1 -DF8F 1 -DF90 1 -DF91 1 -DF92 1 -DF93 1 -DF94 1 -DF95 1 -DF96 1 -DF97 1 -DF98 1 -DF99 1 -DF9A 1 -DF9B 1 -DF9C 1 -DF9D 1 -DF9E 1 -DF9F 1 -DFA0 1 -DFA1 1 -DFA2 1 -DFA3 1 -DFA4 1 -DFA5 1 -DFA6 1 -DFA7 1 -DFA8 1 -DFA9 1 -DFAA 1 -DFAB 1 -DFAC 1 -DFAD 1 -DFAE 1 -DFAF 1 -DFB0 1 -DFB1 1 -DFB2 1 -DFB3 1 -DFB4 1 -DFB5 1 -DFB6 1 -DFB7 1 -DFB8 1 -DFB9 1 -DFBA 1 -DFBB 1 -DFBC 1 -DFBD 1 -DFBE 1 -DFBF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_swedish_ci) ENGINE=NDB CHARACTER SET utf8 COLLATE utf8_swedish_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_swedish_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -C285 1 -7F 1 -C280 1 -C281 1 -C282 1 -C283 1 -C284 1 -C286 1 -C287 1 -C288 1 -C289 1 -C28A 1 -C28B 1 -C28C 1 -C28D 1 -C28E 1 -C28F 1 -C290 1 -C291 1 -C292 1 -C293 1 -C294 1 -C295 1 -C296 1 -C297 1 -C298 1 -C299 1 -C29A 1 -C29B 1 -C29C 1 -C29D 1 -C29E 1 -C29F 1 -C2A0 1 -CC80 1 -CC81 1 -CC82 1 -CC83 1 -CC84 1 -CC85 1 -CC86 1 -CC87 1 -CC88 1 -CC89 1 -CC8A 1 -CC8B 1 -CC8C 1 -CC8D 1 -CC8E 1 -CC8F 1 -CC90 1 -CC91 1 -CC92 1 -CC93 1 -CC94 1 -CC95 1 -CC96 1 -CC97 1 -CC98 1 -CC99 1 -CC9A 1 -CC9B 1 -CC9C 1 -CC9D 1 -CC9E 1 -CC9F 1 -CCA0 1 -CCA1 1 -CCA2 1 -CCA3 1 -CCA4 1 -CCA5 1 -CCA6 1 -CCA7 1 -CCA8 1 -CCA9 1 -CCAA 1 -CCAB 1 -CCAC 1 -CCAD 1 -CCAE 1 -CCAF 1 -CCB0 1 -CCB1 1 -CCB2 1 -CCB3 1 -CCB4 1 -CCB5 1 -CCB6 1 -CCB7 1 -CCB8 1 -CCB9 1 -CCBA 1 -CCBB 1 -CCBC 1 -CCBD 1 -CCBE 1 -CCBF 1 -CD80 1 -CD81 1 -CD82 1 -CD83 1 -CD84 1 -CD85 1 -CD86 1 -CD87 1 -CD88 1 -CD89 1 -CD8A 1 -CD8B 1 -CD8C 1 -CD8D 1 -CD8E 1 -CD8F 1 -CD90 1 -CD91 1 -CD92 1 -CD93 1 -CD94 1 -CD95 1 -CD96 1 -CD97 1 -CD9D 1 -CD9E 1 -CD9F 1 -CDA0 1 -CDA1 1 -CDA2 1 -D283 1 -D284 1 -D285 1 -D286 1 -D288 1 -D289 1 -D691 1 -D692 1 -D693 1 -D694 1 -D695 1 -D696 1 -D697 1 -D698 1 -D699 1 -D69A 1 -D69B 1 -D69C 1 -D69D 1 -D69E 1 -D69F 1 -D6A0 1 -D6A1 1 -D6A3 1 -D6A4 1 -D6A5 1 -D6A6 1 -D6A7 1 -D6A8 1 -D6A9 1 -D6AA 1 -D6AB 1 -D6AC 1 -D6AD 1 -D6AE 1 -D6AF 1 -D6B0 1 -D6B1 1 -D6B2 1 -D6B3 1 -D6B4 1 -D6B5 1 -D6B6 1 -D6B7 1 -D6B8 1 -D6B9 1 -D6BB 1 -D6BC 1 -D6BD 1 -D6BF 1 -D781 1 -D782 1 -D784 1 -D880 1 -D881 1 -D882 1 -D883 1 -D890 1 -D891 1 -D892 1 -D893 1 -D894 1 -D895 1 -D98B 1 -D98C 1 -D98D 1 -D98E 1 -D98F 1 -D990 1 -D991 1 -D992 1 -D993 1 -D994 1 -D995 1 -D996 1 -D997 1 -D998 1 -D9B0 1 -DB96 1 -DB97 1 -DB98 1 -DB99 1 -DB9A 1 -DB9B 1 -DB9C 1 -DB9D 1 -DB9E 1 -DB9F 1 -DBA0 1 -DBA1 1 -DBA2 1 -DBA3 1 -DBA4 1 -DBA7 1 -DBA8 1 -DBAA 1 -DBAB 1 -DBAC 1 -DBAD 1 -DC8F 1 -DC91 1 -DCB0 1 -DCB1 1 -DCB2 1 -DCB3 1 -DCB4 1 -DCB5 1 -DCB6 1 -DCB7 1 -DCB8 1 -DCB9 1 -DCBA 1 -DCBB 1 -DCBC 1 -DCBD 1 -DCBE 1 -DCBF 1 -DD80 1 -DD81 1 -DD82 1 -DD83 1 -DD84 1 -DD85 1 -DD86 1 -DD87 1 -DD88 1 -DD89 1 -DD8A 1 -D980 1 -60 1 -C2B4 1 -CE84 1 -CB9C 1 -5E 1 -C2AF 1 -CB98 1 -CB99 1 -C2A8 1 -CE85 1 -CB9A 1 -CB9D 1 -C2B8 1 -CB9B 1 -5F 1 -C2AD 1 -2D 1 -D68A 1 -2C 1 -D59D 1 -D88C 1 -D88D 1 -D9AB 1 -D9AC 1 -3B 1 -CDBE 1 -D89B 1 -3A 1 -D689 1 -DC83 1 -DC84 1 -DC85 1 -DC86 1 -DC87 1 -DC88 1 -21 1 -C2A1 1 -D59C 1 -3F 1 -C2BF 1 -D59E 1 -D89F 1 -DC89 1 -2E 1 -DB94 1 -DC81 1 -DC82 1 -C2B7 1 -CE87 1 -DC80 1 -27 1 -22 1 -C2AB 1 -C2BB 1 -28 1 -29 1 -5B 1 -7B 1 -7D 1 -C2A7 1 -C2B6 1 -C2A9 1 -C2AE 1 -40 1 -2A 1 -D9AD 1 -2F 1 -26 1 -23 1 -25 1 -D9AA 1 -D59A 1 -D59B 1 -D59F 1 -D6BE 1 -D780 1 -D783 1 -D7B3 1 -D7B4 1 -DC8A 1 -DC8B 1 -DC8C 1 -DC8D 1 -CAB9 1 -CDB4 1 -CDB5 1 -CABA 1 -CB82 1 -CB83 1 -CB84 1 -CB85 1 -CB86 1 -CB87 1 -CB88 1 -CB89 1 -CB8A 1 -CB8B 1 -CB8C 1 -CB8D 1 -CB8E 1 -CB8F 1 -CB92 1 -CB93 1 -CB94 1 -CB95 1 -CB96 1 -CB97 1 -CB9E 1 -CB9F 1 -CBA5 1 -CBA6 1 -CBA7 1 -CBA8 1 -CBA9 1 -CBAA 1 -CBAB 1 -CBAC 1 -CBAD 1 -CBAF 1 -CBB0 1 -CBB1 1 -CBB2 1 -CBB3 1 -CBB4 1 -CBB5 1 -CBB6 1 -CBB7 1 -CBB8 1 -CBB9 1 -CBBA 1 -CBBB 1 -CBBC 1 -CBBD 1 -CBBE 1 -CBBF 1 -C2B0 1 -D282 1 -D88E 1 -D88F 1 -DBA9 1 -CFB6 1 -2B 1 -C2B1 1 -C3B7 1 -C397 1 -3C 1 -3D 1 -3E 1 -C2AC 1 -7C 1 -C2A6 1 -7E 1 -CB90 1 -CB91 1 -C2A4 1 -C2A2 1 -24 1 -C2A3 1 -C2A5 1 -30 1 -D9A0 1 -DBB0 1 -31 1 -C2B9 1 -D9A1 1 -DBB1 1 -C2BD 1 -C2BC 1 -32 1 -C2B2 1 -D9A2 1 -DBB2 1 -33 1 -C2B3 1 -D9A3 1 -DBB3 1 -C2BE 1 -34 1 -D9A4 1 -DBB4 1 -35 1 -D9A5 1 -DBB5 1 -36 1 -D9A6 1 -DBB6 1 -37 1 -D9A7 1 -DBB7 1 -38 1 -D9A8 1 -DBB8 1 -39 1 -D9A9 1 -DBB9 1 -41 1 -61 1 -C2AA 1 -C380 1 -C381 1 -C382 1 -C383 1 -C3A0 1 -C3A1 1 -C3A2 1 -C3A3 1 -C480 1 -C481 1 -C482 1 -C483 1 -C484 1 -C485 1 -C78D 1 -C78E 1 -C79E 1 -C79F 1 -C7A0 1 -C7A1 1 -C7BA 1 -C7BB 1 -C880 1 -C881 1 -C882 1 -C883 1 -C8A6 1 -C8A7 1 -CDA3 1 -C7A2 1 -C7A3 1 -C7BC 1 -C7BD 1 -C990 1 -C991 1 -C992 1 -42 1 -62 1 -CA99 1 -C680 1 -C681 1 -C993 1 -C682 1 -C683 1 -43 1 -63 1 -C387 1 -C3A7 1 -C486 1 -C487 1 -C488 1 -C489 1 -C48A 1 -C48B 1 -C48C 1 -C48D 1 -CDA8 1 -C687 1 -C688 1 -C995 1 -44 1 -64 1 -C48E 1 -C48F 1 -CDA9 1 -C784 1 -C785 1 -C786 1 -C7B1 1 -C7B2 1 -C7B3 1 -CAA3 1 -CAA5 1 -CAA4 1 -C490 1 -C491 1 -C689 1 -C996 1 -C68A 1 -C997 1 -C68B 1 -C68C 1 -C8A1 1 -C390 1 -C3B0 1 -45 1 -65 1 -C388 1 -C389 1 -C38A 1 -C38B 1 -C3A8 1 -C3A9 1 -C3AA 1 -C3AB 1 -C492 1 -C493 1 -C494 1 -C495 1 -C496 1 -C497 1 -C498 1 -C499 1 -C49A 1 -C49B 1 -C884 1 -C885 1 -C886 1 -C887 1 -C8A8 1 -C8A9 1 -CDA4 1 -C68E 1 -C79D 1 -C68F 1 -C999 1 -C690 1 -C99B 1 -C998 1 -C99A 1 -C99C 1 -C99D 1 -C99E 1 -CA9A 1 -C9A4 1 -46 1 -66 1 -CAA9 1 -C691 1 -C692 1 -47 1 -67 1 -C49C 1 -C49D 1 -C49E 1 -C49F 1 -C4A0 1 -C4A1 1 -C4A2 1 -C4A3 1 -C7A6 1 -C7A7 1 -C7B4 1 -C7B5 1 -C9A1 1 -C9A2 1 -C7A4 1 -C7A5 1 -C693 1 -C9A0 1 -CA9B 1 -C694 1 -C9A3 1 -CBA0 1 -C6A2 1 -C6A3 1 -48 1 -68 1 -C4A4 1 -C4A5 1 -C89E 1 -C89F 1 -CAB0 1 -CDAA 1 -CA9C 1 -C695 1 -C7B6 1 -C4A6 1 -C4A7 1 -C9A6 1 -CAB1 1 -C9A7 1 -CABB 1 -CABD 1 -49 1 -69 1 -C38C 1 -C38D 1 -C38E 1 -C38F 1 -C3AC 1 -C3AD 1 -C3AE 1 -C3AF 1 -C4A8 1 -C4A9 1 -C4AA 1 -C4AB 1 -C4AC 1 -C4AD 1 -C4AE 1 -C4AF 1 -C4B0 1 -C78F 1 -C790 1 -C888 1 -C889 1 -C88A 1 -C88B 1 -CDA5 1 -C4B2 1 -C4B3 1 -C4B1 1 -C9AA 1 -C697 1 -C9A8 1 -C696 1 -C9A9 1 -4A 1 -6A 1 -C4B4 1 -C4B5 1 -C7B0 1 -CAB2 1 -CA9D 1 -C99F 1 -CA84 1 -4B 1 -6B 1 -C4B6 1 -C4B7 1 -C7A8 1 -C7A9 1 -C698 1 -C699 1 -CA9E 1 -4C 1 -6C 1 -C4B9 1 -C4BA 1 -C4BB 1 -C4BC 1 -C4BD 1 -C4BE 1 -CBA1 1 -C4BF 1 -C580 1 -C787 1 -C788 1 -C789 1 -CAAA 1 -CAAB 1 -CA9F 1 -C581 1 -C582 1 -C69A 1 -C9AB 1 -C9AC 1 -C9AD 1 -C8B4 1 -C9AE 1 -C69B 1 -CA8E 1 -4D 1 -6D 1 -CDAB 1 -C9B1 1 -4E 1 -6E 1 -C391 1 -C3B1 1 -C583 1 -C584 1 -C585 1 -C586 1 -C587 1 -C588 1 -C7B8 1 -C7B9 1 -C78A 1 -C78B 1 -C78C 1 -C9B4 1 -C69D 1 -C9B2 1 -C69E 1 -C8A0 1 -C9B3 1 -C8B5 1 -C58A 1 -C58B 1 -4F 1 -6F 1 -C2BA 1 -C392 1 -C393 1 -C394 1 -C395 1 -C3B2 1 -C3B3 1 -C3B4 1 -C3B5 1 -C58C 1 -C58D 1 -C58E 1 -C58F 1 -C590 1 -C591 1 -C6A0 1 -C6A1 1 -C791 1 -C792 1 -C7AA 1 -C7AB 1 -C7AC 1 -C7AD 1 -C88C 1 -C88D 1 -C88E 1 -C88F 1 -C8AA 1 -C8AB 1 -C8AC 1 -C8AD 1 -C8AE 1 -C8AF 1 -C8B0 1 -C8B1 1 -CDA6 1 -C592 1 -C593 1 -C9B6 1 -C7BE 1 -C7BF 1 -C686 1 -C994 1 -C69F 1 -C9B5 1 -C9B7 1 -C8A2 1 -C8A3 1 -50 1 -70 1 -C6A4 1 -C6A5 1 -C9B8 1 -51 1 -71 1 -CAA0 1 -C4B8 1 -52 1 -72 1 -C594 1 -C595 1 -C596 1 -C597 1 -C598 1 -C599 1 -C890 1 -C891 1 -C892 1 -C893 1 -CAB3 1 -CDAC 1 -C6A6 1 -CA80 1 -C9B9 1 -CAB4 1 -C9BA 1 -C9BB 1 -CAB5 1 -C9BC 1 -C9BD 1 -C9BE 1 -C9BF 1 -CA81 1 -CAB6 1 -53 1 -73 1 -C59A 1 -C59B 1 -C59C 1 -C59D 1 -C59E 1 -C59F 1 -C5A0 1 -C5A1 1 -C5BF 1 -C898 1 -C899 1 -CBA2 1 -C39F 1 -CA82 1 -C6A9 1 -CA83 1 -C6AA 1 -CA85 1 -CA86 1 -54 1 -74 1 -C5A2 1 -C5A3 1 -C5A4 1 -C5A5 1 -C89A 1 -C89B 1 -CDAD 1 -CAA8 1 -C6BE 1 -CAA6 1 -CAA7 1 -C5A6 1 -C5A7 1 -C6AB 1 -C6AC 1 -C6AD 1 -C6AE 1 -CA88 1 -C8B6 1 -CA87 1 -55 1 -75 1 -C399 1 -C39A 1 -C39B 1 -C3B9 1 -C3BA 1 -C3BB 1 -C5A8 1 -C5A9 1 -C5AA 1 -C5AB 1 -C5AC 1 -C5AD 1 -C5AE 1 -C5AF 1 -C5B0 1 -C5B1 1 -C5B2 1 -C5B3 1 -C6AF 1 -C6B0 1 -C793 1 -C794 1 -C795 1 -C796 1 -C797 1 -C798 1 -C799 1 -C79A 1 -C79B 1 -C79C 1 -C894 1 -C895 1 -C896 1 -C897 1 -CDA7 1 -CA89 1 -C9A5 1 -CAAE 1 -CAAF 1 -C69C 1 -C9AF 1 -C9B0 1 -C6B1 1 -CA8A 1 -56 1 -76 1 -CDAE 1 -C6B2 1 -CA8B 1 -CA8C 1 -57 1 -77 1 -C5B4 1 -C5B5 1 -CAB7 1 -CA8D 1 -58 1 -78 1 -CBA3 1 -CDAF 1 -59 1 -79 1 -C39C 1 -C39D 1 -C3BC 1 -C3BD 1 -C3BF 1 -C5B6 1 -C5B7 1 -C5B8 1 -C8B2 1 -C8B3 1 -CAB8 1 -CA8F 1 -C6B3 1 -C6B4 1 -5A 1 -7A 1 -C5B9 1 -C5BA 1 -C5BB 1 -C5BC 1 -C5BD 1 -C5BE 1 -C68D 1 -C385 1 -C3A5 1 -C384 1 -C386 1 -C3A4 1 -C3A6 1 -C396 1 -C398 1 -C3B6 1 -C3B8 1 -C6B5 1 -C6B6 1 -C8A4 1 -C8A5 1 -CA90 1 -CA91 1 -C6B7 1 -C7AE 1 -C7AF 1 -CA92 1 -C6B8 1 -C6B9 1 -C6BA 1 -CA93 1 -C89C 1 -C89D 1 -C39E 1 -C3BE 1 -C6BF 1 -C7B7 1 -C6BB 1 -C6A7 1 -C6A8 1 -C6BC 1 -C6BD 1 -C684 1 -C685 1 -CA94 1 -CB80 1 -CABC 1 -C589 1 -CBAE 1 -CABE 1 -CA95 1 -CBA4 1 -CABF 1 -CB81 1 -CAA1 1 -CAA2 1 -CA96 1 -C780 1 -C781 1 -C782 1 -C783 1 -CA97 1 -CA98 1 -CAAC 1 -CAAD 1 -CE86 1 -CE91 1 -CEAC 1 -CEB1 1 -CE92 1 -CEB2 1 -CF90 1 -CE93 1 -CEB3 1 -CE94 1 -CEB4 1 -CE88 1 -CE95 1 -CEAD 1 -CEB5 1 -CFB5 1 -CF9C 1 -CF9D 1 -CF9A 1 -CF9B 1 -CE96 1 -CEB6 1 -CE89 1 -CE97 1 -CEAE 1 -CEB7 1 -CE98 1 -CEB8 1 -CF91 1 -CFB4 1 -CDBA 1 -CE8A 1 -CE90 1 -CE99 1 -CEAA 1 -CEAF 1 -CEB9 1 -CF8A 1 -CFB3 1 -CE9A 1 -CEBA 1 -CFB0 1 -CF97 1 -CE9B 1 -CEBB 1 -C2B5 1 -CE9C 1 -CEBC 1 -CE9D 1 -CEBD 1 -CE9E 1 -CEBE 1 -CE8C 1 -CE9F 1 -CEBF 1 -CF8C 1 -CEA0 1 -CF80 1 -CF96 1 -CF9E 1 -CF9F 1 -CF98 1 -CF99 1 -CEA1 1 -CF81 1 -CFB1 1 -CEA3 1 -CF82 1 -CF83 1 -CFB2 1 -CFB9 1 -CEA4 1 -CF84 1 -CE8E 1 -CEA5 1 -CEAB 1 -CEB0 1 -CF85 1 -CF8B 1 -CF8D 1 -CF92 1 -CF93 1 -CF94 1 -CEA6 1 -CF86 1 -CF95 1 -CEA7 1 -CF87 1 -CEA8 1 -CF88 1 -CE8F 1 -CEA9 1 -CF89 1 -CF8E 1 -CFA0 1 -CFA1 1 -CFB7 1 -CFB8 1 -CFBA 1 -CFBB 1 -CFA2 1 -CFA3 1 -CFA4 1 -CFA5 1 -CFA6 1 -CFA7 1 -CFA8 1 -CFA9 1 -CFAA 1 -CFAB 1 -CFAC 1 -CFAD 1 -CFAE 1 -CFAF 1 -D090 1 -D0B0 1 -D390 1 -D391 1 -D392 1 -D393 1 -D398 1 -D399 1 -D39A 1 -D39B 1 -D394 1 -D395 1 -D091 1 -D0B1 1 -D092 1 -D0B2 1 -D093 1 -D0B3 1 -D290 1 -D291 1 -D292 1 -D293 1 -D294 1 -D295 1 -D094 1 -D0B4 1 -D480 1 -D481 1 -D082 1 -D192 1 -D482 1 -D483 1 -D083 1 -D193 1 -D298 1 -D299 1 -D080 1 -D081 1 -D095 1 -D0B5 1 -D190 1 -D191 1 -D396 1 -D397 1 -D084 1 -D194 1 -D096 1 -D0B6 1 -D381 1 -D382 1 -D39C 1 -D39D 1 -D296 1 -D297 1 -D097 1 -D0B7 1 -D484 1 -D485 1 -D39E 1 -D39F 1 -D085 1 -D195 1 -D3A0 1 -D3A1 1 -D486 1 -D487 1 -D08D 1 -D098 1 -D0B8 1 -D19D 1 -D3A2 1 -D3A3 1 -D28A 1 -D28B 1 -D3A4 1 -D3A5 1 -D086 1 -D196 1 -D087 1 -D197 1 -D099 1 -D0B9 1 -D088 1 -D198 1 -D09A 1 -D0BA 1 -D29A 1 -D29B 1 -D383 1 -D384 1 -D2A0 1 -D2A1 1 -D29E 1 -D29F 1 -D29C 1 -D29D 1 -D09B 1 -D0BB 1 -D385 1 -D386 1 -D089 1 -D199 1 -D488 1 -D489 1 -D09C 1 -D0BC 1 -D38D 1 -D38E 1 -D09D 1 -D0BD 1 -D389 1 -D38A 1 -D2A2 1 -D2A3 1 -D387 1 -D388 1 -D2A4 1 -D2A5 1 -D08A 1 -D19A 1 -D48A 1 -D48B 1 -D09E 1 -D0BE 1 -D3A6 1 -D3A7 1 -D3A8 1 -D3A9 1 -D3AA 1 -D3AB 1 -D09F 1 -D0BF 1 -D2A6 1 -D2A7 1 -D280 1 -D281 1 -D0A0 1 -D180 1 -D28E 1 -D28F 1 -D0A1 1 -D181 1 -D48C 1 -D48D 1 -D2AA 1 -D2AB 1 -D0A2 1 -D182 1 -D48E 1 -D48F 1 -D2AC 1 -D2AD 1 -D08B 1 -D19B 1 -D08C 1 -D19C 1 -D0A3 1 -D183 1 -D3AE 1 -D3AF 1 -D08E 1 -D19E 1 -D3B0 1 -D3B1 1 -D3B2 1 -D3B3 1 -D2AE 1 -D2AF 1 -D2B0 1 -D2B1 1 -D1B8 1 -D1B9 1 -D0A4 1 -D184 1 -D0A5 1 -D185 1 -D2B2 1 -D2B3 1 -D2BA 1 -D2BB 1 -D1A0 1 -D1A1 1 -D1BE 1 -D1BF 1 -D1BC 1 -D1BD 1 -D1BA 1 -D1BB 1 -D0A6 1 -D186 1 -D2B4 1 -D2B5 1 -D0A7 1 -D187 1 -D3B4 1 -D3B5 1 -D2B6 1 -D2B7 1 -D38B 1 -D38C 1 -D2B8 1 -D2B9 1 -D2BC 1 -D2BD 1 -D2BE 1 -D2BF 1 -D08F 1 -D19F 1 -D0A8 1 -D188 1 -D0A9 1 -D189 1 -D0AA 1 -D18A 1 -D0AB 1 -D18B 1 -D3B8 1 -D3B9 1 -D0AC 1 -D18C 1 -D28C 1 -D28D 1 -D1A2 1 -D1A3 1 -D0AD 1 -D18D 1 -D3AC 1 -D3AD 1 -D0AE 1 -D18E 1 -D0AF 1 -D18F 1 -D1A4 1 -D1A5 1 -D1A6 1 -D1A7 1 -D1AA 1 -D1AB 1 -D1A8 1 -D1A9 1 -D1AC 1 -D1AD 1 -D1AE 1 -D1AF 1 -D1B0 1 -D1B1 1 -D1B2 1 -D1B3 1 -D1B4 1 -D1B5 1 -D1B6 1 -D1B7 1 -D2A8 1 -D2A9 1 -D380 1 -D4B1 1 -D5A1 1 -D4B2 1 -D5A2 1 -D4B3 1 -D5A3 1 -D4B4 1 -D5A4 1 -D4B5 1 -D5A5 1 -D687 1 -D4B6 1 -D5A6 1 -D4B7 1 -D5A7 1 -D4B8 1 -D5A8 1 -D4B9 1 -D5A9 1 -D4BA 1 -D5AA 1 -D4BB 1 -D5AB 1 -D4BC 1 -D5AC 1 -D4BD 1 -D5AD 1 -D4BE 1 -D5AE 1 -D4BF 1 -D5AF 1 -D580 1 -D5B0 1 -D581 1 -D5B1 1 -D582 1 -D5B2 1 -D583 1 -D5B3 1 -D584 1 -D5B4 1 -D585 1 -D5B5 1 -D586 1 -D5B6 1 -D587 1 -D5B7 1 -D588 1 -D5B8 1 -D589 1 -D5B9 1 -D58A 1 -D5BA 1 -D58B 1 -D5BB 1 -D58C 1 -D5BC 1 -D58D 1 -D5BD 1 -D58E 1 -D5BE 1 -D58F 1 -D5BF 1 -D590 1 -D680 1 -D591 1 -D681 1 -D592 1 -D682 1 -D593 1 -D683 1 -D594 1 -D684 1 -D595 1 -D685 1 -D596 1 -D686 1 -D599 1 -D790 1 -D791 1 -D792 1 -D793 1 -D794 1 -D795 1 -D7B0 1 -D7B1 1 -D796 1 -D797 1 -D798 1 -D799 1 -D7B2 1 -D79A 1 -D79B 1 -D79C 1 -D79D 1 -D79E 1 -D79F 1 -D7A0 1 -D7A1 1 -D7A2 1 -D7A3 1 -D7A4 1 -D7A5 1 -D7A6 1 -D7A7 1 -D7A8 1 -D7A9 1 -D7AA 1 -D8A1 1 -D9B4 1 -DBBD 1 -D8A2 1 -D8A3 1 -D9B2 1 -D9B1 1 -D8A4 1 -D8A5 1 -D9B3 1 -D8A6 1 -D8A7 1 -D9B5 1 -D9AE 1 -D8A8 1 -D9BB 1 -D9BE 1 -DA80 1 -D8A9 1 -D8AA 1 -D8AB 1 -D9B9 1 -D9BA 1 -D9BC 1 -D9BD 1 -D9BF 1 -D8AC 1 -DA83 1 -DA84 1 -DA86 1 -DABF 1 -DA87 1 -D8AD 1 -D8AE 1 -DA81 1 -DA82 1 -DA85 1 -D8AF 1 -D8B0 1 -DA88 1 -DA89 1 -DA8A 1 -DA8B 1 -DA8C 1 -DA8D 1 -DA8E 1 -DA8F 1 -DA90 1 -DBAE 1 -D8B1 1 -D8B2 1 -DA91 1 -DA92 1 -DA93 1 -DA94 1 -DA95 1 -DA96 1 -DA97 1 -DA98 1 -DA99 1 -DBAF 1 -D8B3 1 -D8B4 1 -DA9A 1 -DA9B 1 -DA9C 1 -DBBA 1 -D8B5 1 -D8B6 1 -DA9D 1 -DA9E 1 -DBBB 1 -D8B7 1 -D8B8 1 -DA9F 1 -D8B9 1 -D8BA 1 -DAA0 1 -DBBC 1 -D981 1 -DAA1 1 -DAA2 1 -DAA3 1 -DAA4 1 -DAA5 1 -DAA6 1 -D9AF 1 -D982 1 -DAA7 1 -DAA8 1 -D983 1 -DAA9 1 -DAAA 1 -DAAB 1 -DAAC 1 -DAAD 1 -DAAE 1 -DAAF 1 -DAB0 1 -DAB1 1 -DAB2 1 -DAB3 1 -DAB4 1 -D984 1 -DAB5 1 -DAB6 1 -DAB7 1 -DAB8 1 -D985 1 -DBBE 1 -D986 1 -DABA 1 -DABB 1 -DABC 1 -DABD 1 -DAB9 1 -D987 1 -DABE 1 -DB81 1 -DB82 1 -DB83 1 -DBBF 1 -DB80 1 -DB95 1 -D988 1 -DBA5 1 -D9B6 1 -DB84 1 -DB85 1 -DB86 1 -DB87 1 -D9B7 1 -DB88 1 -DB89 1 -DB8A 1 -DB8B 1 -DB8F 1 -D989 1 -D98A 1 -DBA6 1 -D9B8 1 -DB8C 1 -DB8D 1 -DB8E 1 -DB90 1 -DB91 1 -DB92 1 -DB93 1 -DC90 1 -DC92 1 -DCAD 1 -DC93 1 -DC94 1 -DCAE 1 -DC96 1 -DC95 1 -DCAF 1 -DC97 1 -DC98 1 -DC99 1 -DD8D 1 -DC9A 1 -DC9B 1 -DC9C 1 -DC9D 1 -DC9E 1 -DC9F 1 -DD8E 1 -DCA0 1 -DCA1 1 -DCA2 1 -DCA3 1 -DCA4 1 -DCA5 1 -DCA6 1 -DCA7 1 -DD8F 1 -DCA8 1 -DCA9 1 -DCAA 1 -DCAB 1 -DCAC 1 -DE80 1 -DE99 1 -DE9A 1 -DE81 1 -DE82 1 -DE83 1 -DE9C 1 -DE84 1 -DE85 1 -DE86 1 -DE87 1 -DEA2 1 -DEA3 1 -DE88 1 -DEA5 1 -DE89 1 -DE8A 1 -DE8B 1 -DE9B 1 -DE8C 1 -DE98 1 -DEA0 1 -DEA1 1 -DE8D 1 -DE8E 1 -DEA4 1 -DE8F 1 -DE90 1 -DE9D 1 -DE9E 1 -DE9F 1 -DE91 1 -DE92 1 -DE93 1 -DE94 1 -DE95 1 -DE96 1 -DE97 1 -DEB1 1 -DEA6 1 -DEA7 1 -DEA8 1 -DEA9 1 -DEAA 1 -DEAB 1 -DEAC 1 -DEAD 1 -DEAE 1 -DEAF 1 -DEB0 1 -E4B880 1 -E4B881 1 -E4B882 1 -E4B883 1 -E4B884 1 -E4B885 1 -E4B886 1 -E4B887 1 -E4B888 1 -E4B889 1 -E4B88A 1 -E4B88B 1 -E4B88C 1 -E4B88D 1 -E4B88E 1 -E4B88F 1 -E4B890 1 -E4B891 1 -E4B892 1 -E4B893 1 -E4B894 1 -E4B895 1 -E4B896 1 -E4B897 1 -E4B898 1 -E4B899 1 -E4B89A 1 -E4B89B 1 -E4B89C 1 -E4B89D 1 -E4B89E 1 -E4B89F 1 -E4B8A0 1 -E4B8A1 1 -E4B8A2 1 -E4B8A3 1 -E4B8A4 1 -E4B8A5 1 -E4B8A6 1 -E4B8A7 1 -E4B8A8 1 -E4B8A9 1 -E4B8AA 1 -E4B8AB 1 -E4B8AC 1 -E4B8AD 1 -E4B8AE 1 -E4B8AF 1 -E4B8B0 1 -E4B8B1 1 -E4B8B2 1 -E4B8B3 1 -E4B8B4 1 -E4B8B5 1 -E4B8B6 1 -E4B8B7 1 -E4B8B8 1 -E4B8B9 1 -E4B8BA 1 -E4B8BB 1 -E4B8BC 1 -E4B8BD 1 -E4B8BE 1 -E4B8BF 1 -E4B980 1 -E4B981 1 -E4B982 1 -E4B983 1 -E4B984 1 -E4B985 1 -E4B986 1 -E4B987 1 -E4B988 1 -E4B989 1 -E4B98A 1 -E4B98B 1 -E4B98C 1 -E4B98D 1 -E4B98E 1 -E4B98F 1 -E4B990 1 -E4B991 1 -E4B992 1 -E4B993 1 -E4B994 1 -E4B995 1 -E4B996 1 -E4B997 1 -E4B998 1 -E4B999 1 -E4B99A 1 -E4B99B 1 -E4B99C 1 -E4B99D 1 -E4B99E 1 -E4B99F 1 -E4B9A0 1 -E4B9A1 1 -E4B9A2 1 -E4B9A3 1 -E4B9A4 1 -E4B9A5 1 -E4B9A6 1 -E4B9A7 1 -E4B9A8 1 -E4B9A9 1 -E4B9AA 1 -E4B9AB 1 -E4B9AC 1 -E4B9AD 1 -E4B9AE 1 -E4B9AF 1 -E4B9B0 1 -E4B9B1 1 -E4B9B2 1 -E4B9B3 1 -E4B9B4 1 -E4B9B5 1 -E4B9B6 1 -E4B9B7 1 -E4B9B8 1 -E4B9B9 1 -E4B9BA 1 -E4B9BB 1 -E4B9BC 1 -E4B9BD 1 -E4B9BE 1 -E4B9BF 1 -E4BA80 1 -E4BA81 1 -E4BA82 1 -E4BA83 1 -E4BA84 1 -E4BA85 1 -E4BA86 1 -E4BA87 1 -E4BA88 1 -E4BA89 1 -E4BA8A 1 -E4BA8B 1 -E4BA8C 1 -E4BA8D 1 -E4BA8E 1 -E4BA8F 1 -E4BA90 1 -E4BA91 1 -E4BA92 1 -E4BA93 1 -E4BA94 1 -E4BA95 1 -E4BA96 1 -E4BA97 1 -E4BA98 1 -E4BA99 1 -E4BA9A 1 -E4BA9B 1 -E4BA9C 1 -E4BA9D 1 -E4BA9E 1 -E4BA9F 1 -E4BAA0 1 -E4BAA1 1 -E4BAA2 1 -E4BAA3 1 -E4BAA4 1 -E4BAA5 1 -E4BAA6 1 -E4BAA7 1 -E4BAA8 1 -E4BAA9 1 -E4BAAA 1 -E4BAAB 1 -E4BAAC 1 -E4BAAD 1 -E4BAAE 1 -E4BAAF 1 -E4BAB0 1 -E4BAB1 1 -E4BAB2 1 -E4BAB3 1 -E4BAB4 1 -E4BAB5 1 -E4BAB6 1 -E4BAB7 1 -E4BAB8 1 -E4BAB9 1 -E4BABA 1 -E4BABB 1 -E4BABC 1 -E4BABD 1 -E4BABE 1 -E4BABF 1 -E4BB80 1 -E4BB81 1 -E4BB82 1 -E4BB83 1 -E4BB84 1 -E4BB85 1 -E4BB86 1 -E4BB87 1 -E4BB88 1 -E4BB89 1 -E4BB8A 1 -E4BB8B 1 -E4BB8C 1 -E4BB8D 1 -E4BB8E 1 -E4BB8F 1 -E4BB90 1 -E4BB91 1 -E4BB92 1 -E4BB93 1 -E4BB94 1 -E4BB95 1 -E4BB96 1 -E4BB97 1 -E4BB98 1 -E4BB99 1 -E4BB9A 1 -E4BB9B 1 -E4BB9C 1 -E4BB9D 1 -E4BB9E 1 -E4BB9F 1 -E4BBA0 1 -E4BBA1 1 -E4BBA2 1 -E4BBA3 1 -E4BBA4 1 -E4BBA5 1 -E4BBA6 1 -E4BBA7 1 -E4BBA8 1 -E4BBA9 1 -E4BBAA 1 -E4BBAB 1 -E4BBAC 1 -E4BBAD 1 -E4BBAE 1 -E4BBAF 1 -E4BBB0 1 -E4BBB1 1 -E4BBB2 1 -E4BBB3 1 -E4BBB4 1 -E4BBB5 1 -E4BBB6 1 -E4BBB7 1 -E4BBB8 1 -E4BBB9 1 -E4BBBA 1 -E4BBBB 1 -E4BBBC 1 -E4BBBD 1 -E4BBBE 1 -E4BBBF 1 -E4BC80 1 -E4BC81 1 -E4BC82 1 -E4BC83 1 -E4BC84 1 -E4BC85 1 -E4BC86 1 -E4BC87 1 -E4BC88 1 -E4BC89 1 -E4BC8A 1 -E4BC8B 1 -E4BC8C 1 -E4BC8D 1 -E4BC8E 1 -E4BC8F 1 -E4BC90 1 -E4BC91 1 -E4BC92 1 -E4BC93 1 -E4BC94 1 -E4BC95 1 -E4BC96 1 -E4BC97 1 -E4BC98 1 -E4BC99 1 -E4BC9A 1 -E4BC9B 1 -E4BC9C 1 -E4BC9D 1 -E4BC9E 1 -E4BC9F 1 -E4BCA0 1 -E4BCA1 1 -E4BCA2 1 -E4BCA3 1 -E4BCA4 1 -E4BCA5 1 -E4BCA6 1 -E4BCA7 1 -E4BCA8 1 -E4BCA9 1 -E4BCAA 1 -E4BCAB 1 -E4BCAC 1 -E4BCAD 1 -E4BCAE 1 -E4BCAF 1 -E4BCB0 1 -E4BCB1 1 -E4BCB2 1 -E4BCB3 1 -E4BCB4 1 -E4BCB5 1 -E4BCB6 1 -E4BCB7 1 -E4BCB8 1 -E4BCB9 1 -E4BCBA 1 -E4BCBB 1 -E4BCBC 1 -E4BCBD 1 -E4BCBE 1 -E4BCBF 1 -E4BD80 1 -E4BD81 1 -E4BD82 1 -E4BD83 1 -E4BD84 1 -E4BD85 1 -E4BD86 1 -E4BD87 1 -E4BD88 1 -E4BD89 1 -E4BD8A 1 -E4BD8B 1 -E4BD8C 1 -E4BD8D 1 -E4BD8E 1 -E4BD8F 1 -E4BD90 1 -E4BD91 1 -E4BD92 1 -E4BD93 1 -E4BD94 1 -E4BD95 1 -E4BD96 1 -E4BD97 1 -E4BD98 1 -E4BD99 1 -E4BD9A 1 -E4BD9B 1 -E4BD9C 1 -E4BD9D 1 -E4BD9E 1 -E4BD9F 1 -E4BDA0 1 -E4BDA1 1 -E4BDA2 1 -E4BDA3 1 -E4BDA4 1 -E4BDA5 1 -E4BDA6 1 -E4BDA7 1 -E4BDA8 1 -E4BDA9 1 -E4BDAA 1 -E4BDAB 1 -E4BDAC 1 -E4BDAD 1 -E4BDAE 1 -E4BDAF 1 -E4BDB0 1 -E4BDB1 1 -E4BDB2 1 -E4BDB3 1 -E4BDB4 1 -E4BDB5 1 -E4BDB6 1 -E4BDB7 1 -E4BDB8 1 -E4BDB9 1 -E4BDBA 1 -E4BDBB 1 -E4BDBC 1 -E4BDBD 1 -E4BDBE 1 -E4BDBF 1 -E4BE80 1 -E4BE81 1 -E4BE82 1 -E4BE83 1 -E4BE84 1 -E4BE85 1 -E4BE86 1 -E4BE87 1 -E4BE88 1 -E4BE89 1 -E4BE8A 1 -E4BE8B 1 -E4BE8C 1 -E4BE8D 1 -E4BE8E 1 -E4BE8F 1 -E4BE90 1 -E4BE91 1 -E4BE92 1 -E4BE93 1 -E4BE94 1 -E4BE95 1 -E4BE96 1 -E4BE97 1 -E4BE98 1 -E4BE99 1 -E4BE9A 1 -E4BE9B 1 -E4BE9C 1 -E4BE9D 1 -E4BE9E 1 -E4BE9F 1 -E4BEA0 1 -E4BEA1 1 -E4BEA2 1 -E4BEA3 1 -E4BEA4 1 -E4BEA5 1 -E4BEA6 1 -E4BEA7 1 -E4BEA8 1 -E4BEA9 1 -E4BEAA 1 -E4BEAB 1 -E4BEAC 1 -E4BEAD 1 -E4BEAE 1 -E4BEAF 1 -E4BEB0 1 -E4BEB1 1 -E4BEB2 1 -E4BEB3 1 -E4BEB4 1 -E4BEB5 1 -E4BEB6 1 -E4BEB7 1 -E4BEB8 1 -E4BEB9 1 -E4BEBA 1 -E4BEBB 1 -E4BEBC 1 -E4BEBD 1 -E4BEBE 1 -E4BEBF 1 -E4BF80 1 -E4BF81 1 -E4BF82 1 -E4BF83 1 -E4BF84 1 -E4BF85 1 -E4BF86 1 -E4BF87 1 -E4BF88 1 -E4BF89 1 -E4BF8A 1 -E4BF8B 1 -E4BF8C 1 -E4BF8D 1 -E4BF8E 1 -E4BF8F 1 -E4BF90 1 -E4BF91 1 -E4BF92 1 -E4BF93 1 -E4BF94 1 -E4BF95 1 -E4BF96 1 -E4BF97 1 -E4BF98 1 -E4BF99 1 -E4BF9A 1 -E4BF9B 1 -E4BF9C 1 -E4BF9D 1 -E4BF9E 1 -E4BF9F 1 -E4BFA0 1 -E4BFA1 1 -E4BFA2 1 -E4BFA3 1 -E4BFA4 1 -E4BFA5 1 -E4BFA6 1 -E4BFA7 1 -E4BFA8 1 -E4BFA9 1 -E4BFAA 1 -E4BFAB 1 -E4BFAC 1 -E4BFAD 1 -E4BFAE 1 -E4BFAF 1 -E4BFB0 1 -E4BFB1 1 -E4BFB2 1 -E4BFB3 1 -E4BFB4 1 -E4BFB5 1 -E4BFB6 1 -E4BFB7 1 -E4BFB8 1 -E4BFB9 1 -E4BFBA 1 -E4BFBB 1 -E4BFBC 1 -E4BFBD 1 -E4BFBE 1 -E4BFBF 1 -C8B7 1 -C8B8 1 -C8B9 1 -C8BA 1 -C8BB 1 -C8BC 1 -C8BD 1 -C8BE 1 -C8BF 1 -C980 1 -C981 1 -C982 1 -C983 1 -C984 1 -C985 1 -C986 1 -C987 1 -C988 1 -C989 1 -C98A 1 -C98B 1 -C98C 1 -C98D 1 -C98E 1 -C98F 1 -CD98 1 -CD99 1 -CD9A 1 -CD9B 1 -CD9C 1 -CDB0 1 -CDB1 1 -CDB2 1 -CDB3 1 -CDB6 1 -CDB7 1 -CDB8 1 -CDB9 1 -CDBB 1 -CDBC 1 -CDBD 1 -CDBF 1 -CE80 1 -CE81 1 -CE82 1 -CE83 1 -CE8B 1 -CE8D 1 -CEA2 1 -CF8F 1 -CFBC 1 -CFBD 1 -CFBE 1 -CFBF 1 -D287 1 -D38F 1 -D3B6 1 -D3B7 1 -D3BA 1 -D3BB 1 -D3BC 1 -D3BD 1 -D3BE 1 -D3BF 1 -D490 1 -D491 1 -D492 1 -D493 1 -D494 1 -D495 1 -D496 1 -D497 1 -D498 1 -D499 1 -D49A 1 -D49B 1 -D49C 1 -D49D 1 -D49E 1 -D49F 1 -D4A0 1 -D4A1 1 -D4A2 1 -D4A3 1 -D4A4 1 -D4A5 1 -D4A6 1 -D4A7 1 -D4A8 1 -D4A9 1 -D4AA 1 -D4AB 1 -D4AC 1 -D4AD 1 -D4AE 1 -D4AF 1 -D4B0 1 -D597 1 -D598 1 -D5A0 1 -D688 1 -D68B 1 -D68C 1 -D68D 1 -D68E 1 -D68F 1 -D690 1 -D6A2 1 -D6BA 1 -D785 1 -D786 1 -D787 1 -D788 1 -D789 1 -D78A 1 -D78B 1 -D78C 1 -D78D 1 -D78E 1 -D78F 1 -D7AB 1 -D7AC 1 -D7AD 1 -D7AE 1 -D7AF 1 -D7B5 1 -D7B6 1 -D7B7 1 -D7B8 1 -D7B9 1 -D7BA 1 -D7BB 1 -D7BC 1 -D7BD 1 -D7BE 1 -D7BF 1 -D884 1 -D885 1 -D886 1 -D887 1 -D888 1 -D889 1 -D88A 1 -D88B 1 -D896 1 -D897 1 -D898 1 -D899 1 -D89A 1 -D89C 1 -D89D 1 -D89E 1 -D8A0 1 -D8BB 1 -D8BC 1 -D8BD 1 -D8BE 1 -D8BF 1 -D999 1 -D99A 1 -D99B 1 -D99C 1 -D99D 1 -D99E 1 -D99F 1 -DC8E 1 -DD8B 1 -DD8C 1 -DD90 1 -DD91 1 -DD92 1 -DD93 1 -DD94 1 -DD95 1 -DD96 1 -DD97 1 -DD98 1 -DD99 1 -DD9A 1 -DD9B 1 -DD9C 1 -DD9D 1 -DD9E 1 -DD9F 1 -DDA0 1 -DDA1 1 -DDA2 1 -DDA3 1 -DDA4 1 -DDA5 1 -DDA6 1 -DDA7 1 -DDA8 1 -DDA9 1 -DDAA 1 -DDAB 1 -DDAC 1 -DDAD 1 -DDAE 1 -DDAF 1 -DDB0 1 -DDB1 1 -DDB2 1 -DDB3 1 -DDB4 1 -DDB5 1 -DDB6 1 -DDB7 1 -DDB8 1 -DDB9 1 -DDBA 1 -DDBB 1 -DDBC 1 -DDBD 1 -DDBE 1 -DDBF 1 -DEB2 1 -DEB3 1 -DEB4 1 -DEB5 1 -DEB6 1 -DEB7 1 -DEB8 1 -DEB9 1 -DEBA 1 -DEBB 1 -DEBC 1 -DEBD 1 -DEBE 1 -DEBF 1 -DF80 1 -DF81 1 -DF82 1 -DF83 1 -DF84 1 -DF85 1 -DF86 1 -DF87 1 -DF88 1 -DF89 1 -DF8A 1 -DF8B 1 -DF8C 1 -DF8D 1 -DF8E 1 -DF8F 1 -DF90 1 -DF91 1 -DF92 1 -DF93 1 -DF94 1 -DF95 1 -DF96 1 -DF97 1 -DF98 1 -DF99 1 -DF9A 1 -DF9B 1 -DF9C 1 -DF9D 1 -DF9E 1 -DF9F 1 -DFA0 1 -DFA1 1 -DFA2 1 -DFA3 1 -DFA4 1 -DFA5 1 -DFA6 1 -DFA7 1 -DFA8 1 -DFA9 1 -DFAA 1 -DFAB 1 -DFAC 1 -DFAD 1 -DFAE 1 -DFAF 1 -DFB0 1 -DFB1 1 -DFB2 1 -DFB3 1 -DFB4 1 -DFB5 1 -DFB6 1 -DFB7 1 -DFB8 1 -DFB9 1 -DFBA 1 -DFBB 1 -DFBC 1 -DFBD 1 -DFBE 1 -DFBF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_turkish_ci) ENGINE=NDB CHARACTER SET utf8 COLLATE utf8_turkish_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_turkish_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -C285 1 -7F 1 -C280 1 -C281 1 -C282 1 -C283 1 -C284 1 -C286 1 -C287 1 -C288 1 -C289 1 -C28A 1 -C28B 1 -C28C 1 -C28D 1 -C28E 1 -C28F 1 -C290 1 -C291 1 -C292 1 -C293 1 -C294 1 -C295 1 -C296 1 -C297 1 -C298 1 -C299 1 -C29A 1 -C29B 1 -C29C 1 -C29D 1 -C29E 1 -C29F 1 -C2A0 1 -CC80 1 -CC81 1 -CC82 1 -CC83 1 -CC84 1 -CC85 1 -CC86 1 -CC87 1 -CC88 1 -CC89 1 -CC8A 1 -CC8B 1 -CC8C 1 -CC8D 1 -CC8E 1 -CC8F 1 -CC90 1 -CC91 1 -CC92 1 -CC93 1 -CC94 1 -CC95 1 -CC96 1 -CC97 1 -CC98 1 -CC99 1 -CC9A 1 -CC9B 1 -CC9C 1 -CC9D 1 -CC9E 1 -CC9F 1 -CCA0 1 -CCA1 1 -CCA2 1 -CCA3 1 -CCA4 1 -CCA5 1 -CCA6 1 -CCA7 1 -CCA8 1 -CCA9 1 -CCAA 1 -CCAB 1 -CCAC 1 -CCAD 1 -CCAE 1 -CCAF 1 -CCB0 1 -CCB1 1 -CCB2 1 -CCB3 1 -CCB4 1 -CCB5 1 -CCB6 1 -CCB7 1 -CCB8 1 -CCB9 1 -CCBA 1 -CCBB 1 -CCBC 1 -CCBD 1 -CCBE 1 -CCBF 1 -CD80 1 -CD81 1 -CD82 1 -CD83 1 -CD84 1 -CD85 1 -CD86 1 -CD87 1 -CD88 1 -CD89 1 -CD8A 1 -CD8B 1 -CD8C 1 -CD8D 1 -CD8E 1 -CD8F 1 -CD90 1 -CD91 1 -CD92 1 -CD93 1 -CD94 1 -CD95 1 -CD96 1 -CD97 1 -CD9D 1 -CD9E 1 -CD9F 1 -CDA0 1 -CDA1 1 -CDA2 1 -D283 1 -D284 1 -D285 1 -D286 1 -D288 1 -D289 1 -D691 1 -D692 1 -D693 1 -D694 1 -D695 1 -D696 1 -D697 1 -D698 1 -D699 1 -D69A 1 -D69B 1 -D69C 1 -D69D 1 -D69E 1 -D69F 1 -D6A0 1 -D6A1 1 -D6A3 1 -D6A4 1 -D6A5 1 -D6A6 1 -D6A7 1 -D6A8 1 -D6A9 1 -D6AA 1 -D6AB 1 -D6AC 1 -D6AD 1 -D6AE 1 -D6AF 1 -D6B0 1 -D6B1 1 -D6B2 1 -D6B3 1 -D6B4 1 -D6B5 1 -D6B6 1 -D6B7 1 -D6B8 1 -D6B9 1 -D6BB 1 -D6BC 1 -D6BD 1 -D6BF 1 -D781 1 -D782 1 -D784 1 -D880 1 -D881 1 -D882 1 -D883 1 -D890 1 -D891 1 -D892 1 -D893 1 -D894 1 -D895 1 -D98B 1 -D98C 1 -D98D 1 -D98E 1 -D98F 1 -D990 1 -D991 1 -D992 1 -D993 1 -D994 1 -D995 1 -D996 1 -D997 1 -D998 1 -D9B0 1 -DB96 1 -DB97 1 -DB98 1 -DB99 1 -DB9A 1 -DB9B 1 -DB9C 1 -DB9D 1 -DB9E 1 -DB9F 1 -DBA0 1 -DBA1 1 -DBA2 1 -DBA3 1 -DBA4 1 -DBA7 1 -DBA8 1 -DBAA 1 -DBAB 1 -DBAC 1 -DBAD 1 -DC8F 1 -DC91 1 -DCB0 1 -DCB1 1 -DCB2 1 -DCB3 1 -DCB4 1 -DCB5 1 -DCB6 1 -DCB7 1 -DCB8 1 -DCB9 1 -DCBA 1 -DCBB 1 -DCBC 1 -DCBD 1 -DCBE 1 -DCBF 1 -DD80 1 -DD81 1 -DD82 1 -DD83 1 -DD84 1 -DD85 1 -DD86 1 -DD87 1 -DD88 1 -DD89 1 -DD8A 1 -D980 1 -60 1 -C2B4 1 -CE84 1 -CB9C 1 -5E 1 -C2AF 1 -CB98 1 -CB99 1 -C2A8 1 -CE85 1 -CB9A 1 -CB9D 1 -C2B8 1 -CB9B 1 -5F 1 -C2AD 1 -2D 1 -D68A 1 -2C 1 -D59D 1 -D88C 1 -D88D 1 -D9AB 1 -D9AC 1 -3B 1 -CDBE 1 -D89B 1 -3A 1 -D689 1 -DC83 1 -DC84 1 -DC85 1 -DC86 1 -DC87 1 -DC88 1 -21 1 -C2A1 1 -D59C 1 -3F 1 -C2BF 1 -D59E 1 -D89F 1 -DC89 1 -2E 1 -DB94 1 -DC81 1 -DC82 1 -C2B7 1 -CE87 1 -DC80 1 -27 1 -22 1 -C2AB 1 -C2BB 1 -28 1 -29 1 -5B 1 -7B 1 -7D 1 -C2A7 1 -C2B6 1 -C2A9 1 -C2AE 1 -40 1 -2A 1 -D9AD 1 -2F 1 -26 1 -23 1 -25 1 -D9AA 1 -D59A 1 -D59B 1 -D59F 1 -D6BE 1 -D780 1 -D783 1 -D7B3 1 -D7B4 1 -DC8A 1 -DC8B 1 -DC8C 1 -DC8D 1 -CAB9 1 -CDB4 1 -CDB5 1 -CABA 1 -CB82 1 -CB83 1 -CB84 1 -CB85 1 -CB86 1 -CB87 1 -CB88 1 -CB89 1 -CB8A 1 -CB8B 1 -CB8C 1 -CB8D 1 -CB8E 1 -CB8F 1 -CB92 1 -CB93 1 -CB94 1 -CB95 1 -CB96 1 -CB97 1 -CB9E 1 -CB9F 1 -CBA5 1 -CBA6 1 -CBA7 1 -CBA8 1 -CBA9 1 -CBAA 1 -CBAB 1 -CBAC 1 -CBAD 1 -CBAF 1 -CBB0 1 -CBB1 1 -CBB2 1 -CBB3 1 -CBB4 1 -CBB5 1 -CBB6 1 -CBB7 1 -CBB8 1 -CBB9 1 -CBBA 1 -CBBB 1 -CBBC 1 -CBBD 1 -CBBE 1 -CBBF 1 -C2B0 1 -D282 1 -D88E 1 -D88F 1 -DBA9 1 -CFB6 1 -2B 1 -C2B1 1 -C3B7 1 -C397 1 -3C 1 -3D 1 -3E 1 -C2AC 1 -7C 1 -C2A6 1 -7E 1 -CB90 1 -CB91 1 -C2A4 1 -C2A2 1 -24 1 -C2A3 1 -C2A5 1 -30 1 -D9A0 1 -DBB0 1 -31 1 -C2B9 1 -D9A1 1 -DBB1 1 -C2BD 1 -C2BC 1 -32 1 -C2B2 1 -D9A2 1 -DBB2 1 -33 1 -C2B3 1 -D9A3 1 -DBB3 1 -C2BE 1 -34 1 -D9A4 1 -DBB4 1 -35 1 -D9A5 1 -DBB5 1 -36 1 -D9A6 1 -DBB6 1 -37 1 -D9A7 1 -DBB7 1 -38 1 -D9A8 1 -DBB8 1 -39 1 -D9A9 1 -DBB9 1 -41 1 -61 1 -C2AA 1 -C380 1 -C381 1 -C382 1 -C383 1 -C384 1 -C385 1 -C3A0 1 -C3A1 1 -C3A2 1 -C3A3 1 -C3A4 1 -C3A5 1 -C480 1 -C481 1 -C482 1 -C483 1 -C484 1 -C485 1 -C78D 1 -C78E 1 -C79E 1 -C79F 1 -C7A0 1 -C7A1 1 -C7BA 1 -C7BB 1 -C880 1 -C881 1 -C882 1 -C883 1 -C8A6 1 -C8A7 1 -CDA3 1 -C386 1 -C3A6 1 -C7A2 1 -C7A3 1 -C7BC 1 -C7BD 1 -C990 1 -C991 1 -C992 1 -42 1 -62 1 -CA99 1 -C680 1 -C681 1 -C993 1 -C682 1 -C683 1 -43 1 -63 1 -C486 1 -C487 1 -C488 1 -C489 1 -C48A 1 -C48B 1 -C48C 1 -C48D 1 -CDA8 1 -C387 1 -C3A7 1 -C687 1 -C688 1 -C995 1 -44 1 -64 1 -C48E 1 -C48F 1 -CDA9 1 -C784 1 -C785 1 -C786 1 -C7B1 1 -C7B2 1 -C7B3 1 -CAA3 1 -CAA5 1 -CAA4 1 -C490 1 -C491 1 -C689 1 -C996 1 -C68A 1 -C997 1 -C68B 1 -C68C 1 -C8A1 1 -C390 1 -C3B0 1 -45 1 -65 1 -C388 1 -C389 1 -C38A 1 -C38B 1 -C3A8 1 -C3A9 1 -C3AA 1 -C3AB 1 -C492 1 -C493 1 -C494 1 -C495 1 -C496 1 -C497 1 -C498 1 -C499 1 -C49A 1 -C49B 1 -C884 1 -C885 1 -C886 1 -C887 1 -C8A8 1 -C8A9 1 -CDA4 1 -C68E 1 -C79D 1 -C68F 1 -C999 1 -C690 1 -C99B 1 -C998 1 -C99A 1 -C99C 1 -C99D 1 -C99E 1 -CA9A 1 -C9A4 1 -46 1 -66 1 -CAA9 1 -C691 1 -C692 1 -47 1 -67 1 -C49C 1 -C49D 1 -C4A0 1 -C4A1 1 -C4A2 1 -C4A3 1 -C7A6 1 -C7A7 1 -C7B4 1 -C7B5 1 -C49E 1 -C49F 1 -C9A1 1 -C9A2 1 -C7A4 1 -C7A5 1 -C693 1 -C9A0 1 -CA9B 1 -C694 1 -C9A3 1 -CBA0 1 -C6A2 1 -C6A3 1 -48 1 -68 1 -C4A4 1 -C4A5 1 -C89E 1 -C89F 1 -CAB0 1 -CDAA 1 -49 1 -C4B1 1 -CA9C 1 -C695 1 -C7B6 1 -C4A6 1 -C4A7 1 -C9A6 1 -CAB1 1 -C9A7 1 -CABB 1 -CABD 1 -69 1 -C38C 1 -C38D 1 -C38E 1 -C38F 1 -C3AC 1 -C3AD 1 -C3AE 1 -C3AF 1 -C4A8 1 -C4A9 1 -C4AA 1 -C4AB 1 -C4AC 1 -C4AD 1 -C4AE 1 -C4AF 1 -C4B0 1 -C78F 1 -C790 1 -C888 1 -C889 1 -C88A 1 -C88B 1 -CDA5 1 -C4B2 1 -C4B3 1 -C9AA 1 -C697 1 -C9A8 1 -C696 1 -C9A9 1 -4A 1 -6A 1 -C4B4 1 -C4B5 1 -C7B0 1 -CAB2 1 -CA9D 1 -C99F 1 -CA84 1 -4B 1 -6B 1 -C4B6 1 -C4B7 1 -C7A8 1 -C7A9 1 -C698 1 -C699 1 -CA9E 1 -4C 1 -6C 1 -C4B9 1 -C4BA 1 -C4BB 1 -C4BC 1 -C4BD 1 -C4BE 1 -CBA1 1 -C4BF 1 -C580 1 -C787 1 -C788 1 -C789 1 -CAAA 1 -CAAB 1 -CA9F 1 -C581 1 -C582 1 -C69A 1 -C9AB 1 -C9AC 1 -C9AD 1 -C8B4 1 -C9AE 1 -C69B 1 -CA8E 1 -4D 1 -6D 1 -CDAB 1 -C9B1 1 -4E 1 -6E 1 -C391 1 -C3B1 1 -C583 1 -C584 1 -C585 1 -C586 1 -C587 1 -C588 1 -C7B8 1 -C7B9 1 -C78A 1 -C78B 1 -C78C 1 -C9B4 1 -C69D 1 -C9B2 1 -C69E 1 -C8A0 1 -C9B3 1 -C8B5 1 -C58A 1 -C58B 1 -4F 1 -6F 1 -C2BA 1 -C392 1 -C393 1 -C394 1 -C395 1 -C3B2 1 -C3B3 1 -C3B4 1 -C3B5 1 -C58C 1 -C58D 1 -C58E 1 -C58F 1 -C590 1 -C591 1 -C6A0 1 -C6A1 1 -C791 1 -C792 1 -C7AA 1 -C7AB 1 -C7AC 1 -C7AD 1 -C88C 1 -C88D 1 -C88E 1 -C88F 1 -C8AA 1 -C8AB 1 -C8AC 1 -C8AD 1 -C8AE 1 -C8AF 1 -C8B0 1 -C8B1 1 -CDA6 1 -C592 1 -C593 1 -C396 1 -C3B6 1 -C9B6 1 -C398 1 -C3B8 1 -C7BE 1 -C7BF 1 -C686 1 -C994 1 -C69F 1 -C9B5 1 -C9B7 1 -C8A2 1 -C8A3 1 -50 1 -70 1 -C6A4 1 -C6A5 1 -C9B8 1 -51 1 -71 1 -CAA0 1 -C4B8 1 -52 1 -72 1 -C594 1 -C595 1 -C596 1 -C597 1 -C598 1 -C599 1 -C890 1 -C891 1 -C892 1 -C893 1 -CAB3 1 -CDAC 1 -C6A6 1 -CA80 1 -C9B9 1 -CAB4 1 -C9BA 1 -C9BB 1 -CAB5 1 -C9BC 1 -C9BD 1 -C9BE 1 -C9BF 1 -CA81 1 -CAB6 1 -53 1 -73 1 -C59A 1 -C59B 1 -C59C 1 -C59D 1 -C5A0 1 -C5A1 1 -C5BF 1 -C898 1 -C899 1 -CBA2 1 -C39F 1 -C59E 1 -C59F 1 -CA82 1 -C6A9 1 -CA83 1 -C6AA 1 -CA85 1 -CA86 1 -54 1 -74 1 -C5A2 1 -C5A3 1 -C5A4 1 -C5A5 1 -C89A 1 -C89B 1 -CDAD 1 -CAA8 1 -C6BE 1 -CAA6 1 -CAA7 1 -C5A6 1 -C5A7 1 -C6AB 1 -C6AC 1 -C6AD 1 -C6AE 1 -CA88 1 -C8B6 1 -CA87 1 -55 1 -75 1 -C399 1 -C39A 1 -C39B 1 -C3B9 1 -C3BA 1 -C3BB 1 -C5A8 1 -C5A9 1 -C5AA 1 -C5AB 1 -C5AC 1 -C5AD 1 -C5AE 1 -C5AF 1 -C5B0 1 -C5B1 1 -C5B2 1 -C5B3 1 -C6AF 1 -C6B0 1 -C793 1 -C794 1 -C795 1 -C796 1 -C797 1 -C798 1 -C799 1 -C79A 1 -C79B 1 -C79C 1 -C894 1 -C895 1 -C896 1 -C897 1 -CDA7 1 -C39C 1 -C3BC 1 -CA89 1 -C9A5 1 -CAAE 1 -CAAF 1 -C69C 1 -C9AF 1 -C9B0 1 -C6B1 1 -CA8A 1 -56 1 -76 1 -CDAE 1 -C6B2 1 -CA8B 1 -CA8C 1 -57 1 -77 1 -C5B4 1 -C5B5 1 -CAB7 1 -CA8D 1 -58 1 -78 1 -CBA3 1 -CDAF 1 -59 1 -79 1 -C39D 1 -C3BD 1 -C3BF 1 -C5B6 1 -C5B7 1 -C5B8 1 -C8B2 1 -C8B3 1 -CAB8 1 -CA8F 1 -C6B3 1 -C6B4 1 -5A 1 -7A 1 -C5B9 1 -C5BA 1 -C5BB 1 -C5BC 1 -C5BD 1 -C5BE 1 -C68D 1 -C6B5 1 -C6B6 1 -C8A4 1 -C8A5 1 -CA90 1 -CA91 1 -C6B7 1 -C7AE 1 -C7AF 1 -CA92 1 -C6B8 1 -C6B9 1 -C6BA 1 -CA93 1 -C89C 1 -C89D 1 -C39E 1 -C3BE 1 -C6BF 1 -C7B7 1 -C6BB 1 -C6A7 1 -C6A8 1 -C6BC 1 -C6BD 1 -C684 1 -C685 1 -CA94 1 -CB80 1 -CABC 1 -C589 1 -CBAE 1 -CABE 1 -CA95 1 -CBA4 1 -CABF 1 -CB81 1 -CAA1 1 -CAA2 1 -CA96 1 -C780 1 -C781 1 -C782 1 -C783 1 -CA97 1 -CA98 1 -CAAC 1 -CAAD 1 -CE86 1 -CE91 1 -CEAC 1 -CEB1 1 -CE92 1 -CEB2 1 -CF90 1 -CE93 1 -CEB3 1 -CE94 1 -CEB4 1 -CE88 1 -CE95 1 -CEAD 1 -CEB5 1 -CFB5 1 -CF9C 1 -CF9D 1 -CF9A 1 -CF9B 1 -CE96 1 -CEB6 1 -CE89 1 -CE97 1 -CEAE 1 -CEB7 1 -CE98 1 -CEB8 1 -CF91 1 -CFB4 1 -CDBA 1 -CE8A 1 -CE90 1 -CE99 1 -CEAA 1 -CEAF 1 -CEB9 1 -CF8A 1 -CFB3 1 -CE9A 1 -CEBA 1 -CFB0 1 -CF97 1 -CE9B 1 -CEBB 1 -C2B5 1 -CE9C 1 -CEBC 1 -CE9D 1 -CEBD 1 -CE9E 1 -CEBE 1 -CE8C 1 -CE9F 1 -CEBF 1 -CF8C 1 -CEA0 1 -CF80 1 -CF96 1 -CF9E 1 -CF9F 1 -CF98 1 -CF99 1 -CEA1 1 -CF81 1 -CFB1 1 -CEA3 1 -CF82 1 -CF83 1 -CFB2 1 -CFB9 1 -CEA4 1 -CF84 1 -CE8E 1 -CEA5 1 -CEAB 1 -CEB0 1 -CF85 1 -CF8B 1 -CF8D 1 -CF92 1 -CF93 1 -CF94 1 -CEA6 1 -CF86 1 -CF95 1 -CEA7 1 -CF87 1 -CEA8 1 -CF88 1 -CE8F 1 -CEA9 1 -CF89 1 -CF8E 1 -CFA0 1 -CFA1 1 -CFB7 1 -CFB8 1 -CFBA 1 -CFBB 1 -CFA2 1 -CFA3 1 -CFA4 1 -CFA5 1 -CFA6 1 -CFA7 1 -CFA8 1 -CFA9 1 -CFAA 1 -CFAB 1 -CFAC 1 -CFAD 1 -CFAE 1 -CFAF 1 -D090 1 -D0B0 1 -D390 1 -D391 1 -D392 1 -D393 1 -D398 1 -D399 1 -D39A 1 -D39B 1 -D394 1 -D395 1 -D091 1 -D0B1 1 -D092 1 -D0B2 1 -D093 1 -D0B3 1 -D290 1 -D291 1 -D292 1 -D293 1 -D294 1 -D295 1 -D094 1 -D0B4 1 -D480 1 -D481 1 -D082 1 -D192 1 -D482 1 -D483 1 -D083 1 -D193 1 -D298 1 -D299 1 -D080 1 -D081 1 -D095 1 -D0B5 1 -D190 1 -D191 1 -D396 1 -D397 1 -D084 1 -D194 1 -D096 1 -D0B6 1 -D381 1 -D382 1 -D39C 1 -D39D 1 -D296 1 -D297 1 -D097 1 -D0B7 1 -D484 1 -D485 1 -D39E 1 -D39F 1 -D085 1 -D195 1 -D3A0 1 -D3A1 1 -D486 1 -D487 1 -D08D 1 -D098 1 -D0B8 1 -D19D 1 -D3A2 1 -D3A3 1 -D28A 1 -D28B 1 -D3A4 1 -D3A5 1 -D086 1 -D196 1 -D087 1 -D197 1 -D099 1 -D0B9 1 -D088 1 -D198 1 -D09A 1 -D0BA 1 -D29A 1 -D29B 1 -D383 1 -D384 1 -D2A0 1 -D2A1 1 -D29E 1 -D29F 1 -D29C 1 -D29D 1 -D09B 1 -D0BB 1 -D385 1 -D386 1 -D089 1 -D199 1 -D488 1 -D489 1 -D09C 1 -D0BC 1 -D38D 1 -D38E 1 -D09D 1 -D0BD 1 -D389 1 -D38A 1 -D2A2 1 -D2A3 1 -D387 1 -D388 1 -D2A4 1 -D2A5 1 -D08A 1 -D19A 1 -D48A 1 -D48B 1 -D09E 1 -D0BE 1 -D3A6 1 -D3A7 1 -D3A8 1 -D3A9 1 -D3AA 1 -D3AB 1 -D09F 1 -D0BF 1 -D2A6 1 -D2A7 1 -D280 1 -D281 1 -D0A0 1 -D180 1 -D28E 1 -D28F 1 -D0A1 1 -D181 1 -D48C 1 -D48D 1 -D2AA 1 -D2AB 1 -D0A2 1 -D182 1 -D48E 1 -D48F 1 -D2AC 1 -D2AD 1 -D08B 1 -D19B 1 -D08C 1 -D19C 1 -D0A3 1 -D183 1 -D3AE 1 -D3AF 1 -D08E 1 -D19E 1 -D3B0 1 -D3B1 1 -D3B2 1 -D3B3 1 -D2AE 1 -D2AF 1 -D2B0 1 -D2B1 1 -D1B8 1 -D1B9 1 -D0A4 1 -D184 1 -D0A5 1 -D185 1 -D2B2 1 -D2B3 1 -D2BA 1 -D2BB 1 -D1A0 1 -D1A1 1 -D1BE 1 -D1BF 1 -D1BC 1 -D1BD 1 -D1BA 1 -D1BB 1 -D0A6 1 -D186 1 -D2B4 1 -D2B5 1 -D0A7 1 -D187 1 -D3B4 1 -D3B5 1 -D2B6 1 -D2B7 1 -D38B 1 -D38C 1 -D2B8 1 -D2B9 1 -D2BC 1 -D2BD 1 -D2BE 1 -D2BF 1 -D08F 1 -D19F 1 -D0A8 1 -D188 1 -D0A9 1 -D189 1 -D0AA 1 -D18A 1 -D0AB 1 -D18B 1 -D3B8 1 -D3B9 1 -D0AC 1 -D18C 1 -D28C 1 -D28D 1 -D1A2 1 -D1A3 1 -D0AD 1 -D18D 1 -D3AC 1 -D3AD 1 -D0AE 1 -D18E 1 -D0AF 1 -D18F 1 -D1A4 1 -D1A5 1 -D1A6 1 -D1A7 1 -D1AA 1 -D1AB 1 -D1A8 1 -D1A9 1 -D1AC 1 -D1AD 1 -D1AE 1 -D1AF 1 -D1B0 1 -D1B1 1 -D1B2 1 -D1B3 1 -D1B4 1 -D1B5 1 -D1B6 1 -D1B7 1 -D2A8 1 -D2A9 1 -D380 1 -D4B1 1 -D5A1 1 -D4B2 1 -D5A2 1 -D4B3 1 -D5A3 1 -D4B4 1 -D5A4 1 -D4B5 1 -D5A5 1 -D687 1 -D4B6 1 -D5A6 1 -D4B7 1 -D5A7 1 -D4B8 1 -D5A8 1 -D4B9 1 -D5A9 1 -D4BA 1 -D5AA 1 -D4BB 1 -D5AB 1 -D4BC 1 -D5AC 1 -D4BD 1 -D5AD 1 -D4BE 1 -D5AE 1 -D4BF 1 -D5AF 1 -D580 1 -D5B0 1 -D581 1 -D5B1 1 -D582 1 -D5B2 1 -D583 1 -D5B3 1 -D584 1 -D5B4 1 -D585 1 -D5B5 1 -D586 1 -D5B6 1 -D587 1 -D5B7 1 -D588 1 -D5B8 1 -D589 1 -D5B9 1 -D58A 1 -D5BA 1 -D58B 1 -D5BB 1 -D58C 1 -D5BC 1 -D58D 1 -D5BD 1 -D58E 1 -D5BE 1 -D58F 1 -D5BF 1 -D590 1 -D680 1 -D591 1 -D681 1 -D592 1 -D682 1 -D593 1 -D683 1 -D594 1 -D684 1 -D595 1 -D685 1 -D596 1 -D686 1 -D599 1 -D790 1 -D791 1 -D792 1 -D793 1 -D794 1 -D795 1 -D7B0 1 -D7B1 1 -D796 1 -D797 1 -D798 1 -D799 1 -D7B2 1 -D79A 1 -D79B 1 -D79C 1 -D79D 1 -D79E 1 -D79F 1 -D7A0 1 -D7A1 1 -D7A2 1 -D7A3 1 -D7A4 1 -D7A5 1 -D7A6 1 -D7A7 1 -D7A8 1 -D7A9 1 -D7AA 1 -D8A1 1 -D9B4 1 -DBBD 1 -D8A2 1 -D8A3 1 -D9B2 1 -D9B1 1 -D8A4 1 -D8A5 1 -D9B3 1 -D8A6 1 -D8A7 1 -D9B5 1 -D9AE 1 -D8A8 1 -D9BB 1 -D9BE 1 -DA80 1 -D8A9 1 -D8AA 1 -D8AB 1 -D9B9 1 -D9BA 1 -D9BC 1 -D9BD 1 -D9BF 1 -D8AC 1 -DA83 1 -DA84 1 -DA86 1 -DABF 1 -DA87 1 -D8AD 1 -D8AE 1 -DA81 1 -DA82 1 -DA85 1 -D8AF 1 -D8B0 1 -DA88 1 -DA89 1 -DA8A 1 -DA8B 1 -DA8C 1 -DA8D 1 -DA8E 1 -DA8F 1 -DA90 1 -DBAE 1 -D8B1 1 -D8B2 1 -DA91 1 -DA92 1 -DA93 1 -DA94 1 -DA95 1 -DA96 1 -DA97 1 -DA98 1 -DA99 1 -DBAF 1 -D8B3 1 -D8B4 1 -DA9A 1 -DA9B 1 -DA9C 1 -DBBA 1 -D8B5 1 -D8B6 1 -DA9D 1 -DA9E 1 -DBBB 1 -D8B7 1 -D8B8 1 -DA9F 1 -D8B9 1 -D8BA 1 -DAA0 1 -DBBC 1 -D981 1 -DAA1 1 -DAA2 1 -DAA3 1 -DAA4 1 -DAA5 1 -DAA6 1 -D9AF 1 -D982 1 -DAA7 1 -DAA8 1 -D983 1 -DAA9 1 -DAAA 1 -DAAB 1 -DAAC 1 -DAAD 1 -DAAE 1 -DAAF 1 -DAB0 1 -DAB1 1 -DAB2 1 -DAB3 1 -DAB4 1 -D984 1 -DAB5 1 -DAB6 1 -DAB7 1 -DAB8 1 -D985 1 -DBBE 1 -D986 1 -DABA 1 -DABB 1 -DABC 1 -DABD 1 -DAB9 1 -D987 1 -DABE 1 -DB81 1 -DB82 1 -DB83 1 -DBBF 1 -DB80 1 -DB95 1 -D988 1 -DBA5 1 -D9B6 1 -DB84 1 -DB85 1 -DB86 1 -DB87 1 -D9B7 1 -DB88 1 -DB89 1 -DB8A 1 -DB8B 1 -DB8F 1 -D989 1 -D98A 1 -DBA6 1 -D9B8 1 -DB8C 1 -DB8D 1 -DB8E 1 -DB90 1 -DB91 1 -DB92 1 -DB93 1 -DC90 1 -DC92 1 -DCAD 1 -DC93 1 -DC94 1 -DCAE 1 -DC96 1 -DC95 1 -DCAF 1 -DC97 1 -DC98 1 -DC99 1 -DD8D 1 -DC9A 1 -DC9B 1 -DC9C 1 -DC9D 1 -DC9E 1 -DC9F 1 -DD8E 1 -DCA0 1 -DCA1 1 -DCA2 1 -DCA3 1 -DCA4 1 -DCA5 1 -DCA6 1 -DCA7 1 -DD8F 1 -DCA8 1 -DCA9 1 -DCAA 1 -DCAB 1 -DCAC 1 -DE80 1 -DE99 1 -DE9A 1 -DE81 1 -DE82 1 -DE83 1 -DE9C 1 -DE84 1 -DE85 1 -DE86 1 -DE87 1 -DEA2 1 -DEA3 1 -DE88 1 -DEA5 1 -DE89 1 -DE8A 1 -DE8B 1 -DE9B 1 -DE8C 1 -DE98 1 -DEA0 1 -DEA1 1 -DE8D 1 -DE8E 1 -DEA4 1 -DE8F 1 -DE90 1 -DE9D 1 -DE9E 1 -DE9F 1 -DE91 1 -DE92 1 -DE93 1 -DE94 1 -DE95 1 -DE96 1 -DE97 1 -DEB1 1 -DEA6 1 -DEA7 1 -DEA8 1 -DEA9 1 -DEAA 1 -DEAB 1 -DEAC 1 -DEAD 1 -DEAE 1 -DEAF 1 -DEB0 1 -E4B880 1 -E4B881 1 -E4B882 1 -E4B883 1 -E4B884 1 -E4B885 1 -E4B886 1 -E4B887 1 -E4B888 1 -E4B889 1 -E4B88A 1 -E4B88B 1 -E4B88C 1 -E4B88D 1 -E4B88E 1 -E4B88F 1 -E4B890 1 -E4B891 1 -E4B892 1 -E4B893 1 -E4B894 1 -E4B895 1 -E4B896 1 -E4B897 1 -E4B898 1 -E4B899 1 -E4B89A 1 -E4B89B 1 -E4B89C 1 -E4B89D 1 -E4B89E 1 -E4B89F 1 -E4B8A0 1 -E4B8A1 1 -E4B8A2 1 -E4B8A3 1 -E4B8A4 1 -E4B8A5 1 -E4B8A6 1 -E4B8A7 1 -E4B8A8 1 -E4B8A9 1 -E4B8AA 1 -E4B8AB 1 -E4B8AC 1 -E4B8AD 1 -E4B8AE 1 -E4B8AF 1 -E4B8B0 1 -E4B8B1 1 -E4B8B2 1 -E4B8B3 1 -E4B8B4 1 -E4B8B5 1 -E4B8B6 1 -E4B8B7 1 -E4B8B8 1 -E4B8B9 1 -E4B8BA 1 -E4B8BB 1 -E4B8BC 1 -E4B8BD 1 -E4B8BE 1 -E4B8BF 1 -E4B980 1 -E4B981 1 -E4B982 1 -E4B983 1 -E4B984 1 -E4B985 1 -E4B986 1 -E4B987 1 -E4B988 1 -E4B989 1 -E4B98A 1 -E4B98B 1 -E4B98C 1 -E4B98D 1 -E4B98E 1 -E4B98F 1 -E4B990 1 -E4B991 1 -E4B992 1 -E4B993 1 -E4B994 1 -E4B995 1 -E4B996 1 -E4B997 1 -E4B998 1 -E4B999 1 -E4B99A 1 -E4B99B 1 -E4B99C 1 -E4B99D 1 -E4B99E 1 -E4B99F 1 -E4B9A0 1 -E4B9A1 1 -E4B9A2 1 -E4B9A3 1 -E4B9A4 1 -E4B9A5 1 -E4B9A6 1 -E4B9A7 1 -E4B9A8 1 -E4B9A9 1 -E4B9AA 1 -E4B9AB 1 -E4B9AC 1 -E4B9AD 1 -E4B9AE 1 -E4B9AF 1 -E4B9B0 1 -E4B9B1 1 -E4B9B2 1 -E4B9B3 1 -E4B9B4 1 -E4B9B5 1 -E4B9B6 1 -E4B9B7 1 -E4B9B8 1 -E4B9B9 1 -E4B9BA 1 -E4B9BB 1 -E4B9BC 1 -E4B9BD 1 -E4B9BE 1 -E4B9BF 1 -E4BA80 1 -E4BA81 1 -E4BA82 1 -E4BA83 1 -E4BA84 1 -E4BA85 1 -E4BA86 1 -E4BA87 1 -E4BA88 1 -E4BA89 1 -E4BA8A 1 -E4BA8B 1 -E4BA8C 1 -E4BA8D 1 -E4BA8E 1 -E4BA8F 1 -E4BA90 1 -E4BA91 1 -E4BA92 1 -E4BA93 1 -E4BA94 1 -E4BA95 1 -E4BA96 1 -E4BA97 1 -E4BA98 1 -E4BA99 1 -E4BA9A 1 -E4BA9B 1 -E4BA9C 1 -E4BA9D 1 -E4BA9E 1 -E4BA9F 1 -E4BAA0 1 -E4BAA1 1 -E4BAA2 1 -E4BAA3 1 -E4BAA4 1 -E4BAA5 1 -E4BAA6 1 -E4BAA7 1 -E4BAA8 1 -E4BAA9 1 -E4BAAA 1 -E4BAAB 1 -E4BAAC 1 -E4BAAD 1 -E4BAAE 1 -E4BAAF 1 -E4BAB0 1 -E4BAB1 1 -E4BAB2 1 -E4BAB3 1 -E4BAB4 1 -E4BAB5 1 -E4BAB6 1 -E4BAB7 1 -E4BAB8 1 -E4BAB9 1 -E4BABA 1 -E4BABB 1 -E4BABC 1 -E4BABD 1 -E4BABE 1 -E4BABF 1 -E4BB80 1 -E4BB81 1 -E4BB82 1 -E4BB83 1 -E4BB84 1 -E4BB85 1 -E4BB86 1 -E4BB87 1 -E4BB88 1 -E4BB89 1 -E4BB8A 1 -E4BB8B 1 -E4BB8C 1 -E4BB8D 1 -E4BB8E 1 -E4BB8F 1 -E4BB90 1 -E4BB91 1 -E4BB92 1 -E4BB93 1 -E4BB94 1 -E4BB95 1 -E4BB96 1 -E4BB97 1 -E4BB98 1 -E4BB99 1 -E4BB9A 1 -E4BB9B 1 -E4BB9C 1 -E4BB9D 1 -E4BB9E 1 -E4BB9F 1 -E4BBA0 1 -E4BBA1 1 -E4BBA2 1 -E4BBA3 1 -E4BBA4 1 -E4BBA5 1 -E4BBA6 1 -E4BBA7 1 -E4BBA8 1 -E4BBA9 1 -E4BBAA 1 -E4BBAB 1 -E4BBAC 1 -E4BBAD 1 -E4BBAE 1 -E4BBAF 1 -E4BBB0 1 -E4BBB1 1 -E4BBB2 1 -E4BBB3 1 -E4BBB4 1 -E4BBB5 1 -E4BBB6 1 -E4BBB7 1 -E4BBB8 1 -E4BBB9 1 -E4BBBA 1 -E4BBBB 1 -E4BBBC 1 -E4BBBD 1 -E4BBBE 1 -E4BBBF 1 -E4BC80 1 -E4BC81 1 -E4BC82 1 -E4BC83 1 -E4BC84 1 -E4BC85 1 -E4BC86 1 -E4BC87 1 -E4BC88 1 -E4BC89 1 -E4BC8A 1 -E4BC8B 1 -E4BC8C 1 -E4BC8D 1 -E4BC8E 1 -E4BC8F 1 -E4BC90 1 -E4BC91 1 -E4BC92 1 -E4BC93 1 -E4BC94 1 -E4BC95 1 -E4BC96 1 -E4BC97 1 -E4BC98 1 -E4BC99 1 -E4BC9A 1 -E4BC9B 1 -E4BC9C 1 -E4BC9D 1 -E4BC9E 1 -E4BC9F 1 -E4BCA0 1 -E4BCA1 1 -E4BCA2 1 -E4BCA3 1 -E4BCA4 1 -E4BCA5 1 -E4BCA6 1 -E4BCA7 1 -E4BCA8 1 -E4BCA9 1 -E4BCAA 1 -E4BCAB 1 -E4BCAC 1 -E4BCAD 1 -E4BCAE 1 -E4BCAF 1 -E4BCB0 1 -E4BCB1 1 -E4BCB2 1 -E4BCB3 1 -E4BCB4 1 -E4BCB5 1 -E4BCB6 1 -E4BCB7 1 -E4BCB8 1 -E4BCB9 1 -E4BCBA 1 -E4BCBB 1 -E4BCBC 1 -E4BCBD 1 -E4BCBE 1 -E4BCBF 1 -E4BD80 1 -E4BD81 1 -E4BD82 1 -E4BD83 1 -E4BD84 1 -E4BD85 1 -E4BD86 1 -E4BD87 1 -E4BD88 1 -E4BD89 1 -E4BD8A 1 -E4BD8B 1 -E4BD8C 1 -E4BD8D 1 -E4BD8E 1 -E4BD8F 1 -E4BD90 1 -E4BD91 1 -E4BD92 1 -E4BD93 1 -E4BD94 1 -E4BD95 1 -E4BD96 1 -E4BD97 1 -E4BD98 1 -E4BD99 1 -E4BD9A 1 -E4BD9B 1 -E4BD9C 1 -E4BD9D 1 -E4BD9E 1 -E4BD9F 1 -E4BDA0 1 -E4BDA1 1 -E4BDA2 1 -E4BDA3 1 -E4BDA4 1 -E4BDA5 1 -E4BDA6 1 -E4BDA7 1 -E4BDA8 1 -E4BDA9 1 -E4BDAA 1 -E4BDAB 1 -E4BDAC 1 -E4BDAD 1 -E4BDAE 1 -E4BDAF 1 -E4BDB0 1 -E4BDB1 1 -E4BDB2 1 -E4BDB3 1 -E4BDB4 1 -E4BDB5 1 -E4BDB6 1 -E4BDB7 1 -E4BDB8 1 -E4BDB9 1 -E4BDBA 1 -E4BDBB 1 -E4BDBC 1 -E4BDBD 1 -E4BDBE 1 -E4BDBF 1 -E4BE80 1 -E4BE81 1 -E4BE82 1 -E4BE83 1 -E4BE84 1 -E4BE85 1 -E4BE86 1 -E4BE87 1 -E4BE88 1 -E4BE89 1 -E4BE8A 1 -E4BE8B 1 -E4BE8C 1 -E4BE8D 1 -E4BE8E 1 -E4BE8F 1 -E4BE90 1 -E4BE91 1 -E4BE92 1 -E4BE93 1 -E4BE94 1 -E4BE95 1 -E4BE96 1 -E4BE97 1 -E4BE98 1 -E4BE99 1 -E4BE9A 1 -E4BE9B 1 -E4BE9C 1 -E4BE9D 1 -E4BE9E 1 -E4BE9F 1 -E4BEA0 1 -E4BEA1 1 -E4BEA2 1 -E4BEA3 1 -E4BEA4 1 -E4BEA5 1 -E4BEA6 1 -E4BEA7 1 -E4BEA8 1 -E4BEA9 1 -E4BEAA 1 -E4BEAB 1 -E4BEAC 1 -E4BEAD 1 -E4BEAE 1 -E4BEAF 1 -E4BEB0 1 -E4BEB1 1 -E4BEB2 1 -E4BEB3 1 -E4BEB4 1 -E4BEB5 1 -E4BEB6 1 -E4BEB7 1 -E4BEB8 1 -E4BEB9 1 -E4BEBA 1 -E4BEBB 1 -E4BEBC 1 -E4BEBD 1 -E4BEBE 1 -E4BEBF 1 -E4BF80 1 -E4BF81 1 -E4BF82 1 -E4BF83 1 -E4BF84 1 -E4BF85 1 -E4BF86 1 -E4BF87 1 -E4BF88 1 -E4BF89 1 -E4BF8A 1 -E4BF8B 1 -E4BF8C 1 -E4BF8D 1 -E4BF8E 1 -E4BF8F 1 -E4BF90 1 -E4BF91 1 -E4BF92 1 -E4BF93 1 -E4BF94 1 -E4BF95 1 -E4BF96 1 -E4BF97 1 -E4BF98 1 -E4BF99 1 -E4BF9A 1 -E4BF9B 1 -E4BF9C 1 -E4BF9D 1 -E4BF9E 1 -E4BF9F 1 -E4BFA0 1 -E4BFA1 1 -E4BFA2 1 -E4BFA3 1 -E4BFA4 1 -E4BFA5 1 -E4BFA6 1 -E4BFA7 1 -E4BFA8 1 -E4BFA9 1 -E4BFAA 1 -E4BFAB 1 -E4BFAC 1 -E4BFAD 1 -E4BFAE 1 -E4BFAF 1 -E4BFB0 1 -E4BFB1 1 -E4BFB2 1 -E4BFB3 1 -E4BFB4 1 -E4BFB5 1 -E4BFB6 1 -E4BFB7 1 -E4BFB8 1 -E4BFB9 1 -E4BFBA 1 -E4BFBB 1 -E4BFBC 1 -E4BFBD 1 -E4BFBE 1 -E4BFBF 1 -C8B7 1 -C8B8 1 -C8B9 1 -C8BA 1 -C8BB 1 -C8BC 1 -C8BD 1 -C8BE 1 -C8BF 1 -C980 1 -C981 1 -C982 1 -C983 1 -C984 1 -C985 1 -C986 1 -C987 1 -C988 1 -C989 1 -C98A 1 -C98B 1 -C98C 1 -C98D 1 -C98E 1 -C98F 1 -CD98 1 -CD99 1 -CD9A 1 -CD9B 1 -CD9C 1 -CDB0 1 -CDB1 1 -CDB2 1 -CDB3 1 -CDB6 1 -CDB7 1 -CDB8 1 -CDB9 1 -CDBB 1 -CDBC 1 -CDBD 1 -CDBF 1 -CE80 1 -CE81 1 -CE82 1 -CE83 1 -CE8B 1 -CE8D 1 -CEA2 1 -CF8F 1 -CFBC 1 -CFBD 1 -CFBE 1 -CFBF 1 -D287 1 -D38F 1 -D3B6 1 -D3B7 1 -D3BA 1 -D3BB 1 -D3BC 1 -D3BD 1 -D3BE 1 -D3BF 1 -D490 1 -D491 1 -D492 1 -D493 1 -D494 1 -D495 1 -D496 1 -D497 1 -D498 1 -D499 1 -D49A 1 -D49B 1 -D49C 1 -D49D 1 -D49E 1 -D49F 1 -D4A0 1 -D4A1 1 -D4A2 1 -D4A3 1 -D4A4 1 -D4A5 1 -D4A6 1 -D4A7 1 -D4A8 1 -D4A9 1 -D4AA 1 -D4AB 1 -D4AC 1 -D4AD 1 -D4AE 1 -D4AF 1 -D4B0 1 -D597 1 -D598 1 -D5A0 1 -D688 1 -D68B 1 -D68C 1 -D68D 1 -D68E 1 -D68F 1 -D690 1 -D6A2 1 -D6BA 1 -D785 1 -D786 1 -D787 1 -D788 1 -D789 1 -D78A 1 -D78B 1 -D78C 1 -D78D 1 -D78E 1 -D78F 1 -D7AB 1 -D7AC 1 -D7AD 1 -D7AE 1 -D7AF 1 -D7B5 1 -D7B6 1 -D7B7 1 -D7B8 1 -D7B9 1 -D7BA 1 -D7BB 1 -D7BC 1 -D7BD 1 -D7BE 1 -D7BF 1 -D884 1 -D885 1 -D886 1 -D887 1 -D888 1 -D889 1 -D88A 1 -D88B 1 -D896 1 -D897 1 -D898 1 -D899 1 -D89A 1 -D89C 1 -D89D 1 -D89E 1 -D8A0 1 -D8BB 1 -D8BC 1 -D8BD 1 -D8BE 1 -D8BF 1 -D999 1 -D99A 1 -D99B 1 -D99C 1 -D99D 1 -D99E 1 -D99F 1 -DC8E 1 -DD8B 1 -DD8C 1 -DD90 1 -DD91 1 -DD92 1 -DD93 1 -DD94 1 -DD95 1 -DD96 1 -DD97 1 -DD98 1 -DD99 1 -DD9A 1 -DD9B 1 -DD9C 1 -DD9D 1 -DD9E 1 -DD9F 1 -DDA0 1 -DDA1 1 -DDA2 1 -DDA3 1 -DDA4 1 -DDA5 1 -DDA6 1 -DDA7 1 -DDA8 1 -DDA9 1 -DDAA 1 -DDAB 1 -DDAC 1 -DDAD 1 -DDAE 1 -DDAF 1 -DDB0 1 -DDB1 1 -DDB2 1 -DDB3 1 -DDB4 1 -DDB5 1 -DDB6 1 -DDB7 1 -DDB8 1 -DDB9 1 -DDBA 1 -DDBB 1 -DDBC 1 -DDBD 1 -DDBE 1 -DDBF 1 -DEB2 1 -DEB3 1 -DEB4 1 -DEB5 1 -DEB6 1 -DEB7 1 -DEB8 1 -DEB9 1 -DEBA 1 -DEBB 1 -DEBC 1 -DEBD 1 -DEBE 1 -DEBF 1 -DF80 1 -DF81 1 -DF82 1 -DF83 1 -DF84 1 -DF85 1 -DF86 1 -DF87 1 -DF88 1 -DF89 1 -DF8A 1 -DF8B 1 -DF8C 1 -DF8D 1 -DF8E 1 -DF8F 1 -DF90 1 -DF91 1 -DF92 1 -DF93 1 -DF94 1 -DF95 1 -DF96 1 -DF97 1 -DF98 1 -DF99 1 -DF9A 1 -DF9B 1 -DF9C 1 -DF9D 1 -DF9E 1 -DF9F 1 -DFA0 1 -DFA1 1 -DFA2 1 -DFA3 1 -DFA4 1 -DFA5 1 -DFA6 1 -DFA7 1 -DFA8 1 -DFA9 1 -DFAA 1 -DFAB 1 -DFAC 1 -DFAD 1 -DFAE 1 -DFAF 1 -DFB0 1 -DFB1 1 -DFB2 1 -DFB3 1 -DFB4 1 -DFB5 1 -DFB6 1 -DFB7 1 -DFB8 1 -DFB9 1 -DFBA 1 -DFBB 1 -DFBC 1 -DFBD 1 -DFBE 1 -DFBF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_unicode_ci) ENGINE=NDB CHARACTER SET utf8 COLLATE utf8_unicode_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_unicode_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -C285 1 -7F 1 -C280 1 -C281 1 -C282 1 -C283 1 -C284 1 -C286 1 -C287 1 -C288 1 -C289 1 -C28A 1 -C28B 1 -C28C 1 -C28D 1 -C28E 1 -C28F 1 -C290 1 -C291 1 -C292 1 -C293 1 -C294 1 -C295 1 -C296 1 -C297 1 -C298 1 -C299 1 -C29A 1 -C29B 1 -C29C 1 -C29D 1 -C29E 1 -C29F 1 -C2A0 1 -CC80 1 -CC81 1 -CC82 1 -CC83 1 -CC84 1 -CC85 1 -CC86 1 -CC87 1 -CC88 1 -CC89 1 -CC8A 1 -CC8B 1 -CC8C 1 -CC8D 1 -CC8E 1 -CC8F 1 -CC90 1 -CC91 1 -CC92 1 -CC93 1 -CC94 1 -CC95 1 -CC96 1 -CC97 1 -CC98 1 -CC99 1 -CC9A 1 -CC9B 1 -CC9C 1 -CC9D 1 -CC9E 1 -CC9F 1 -CCA0 1 -CCA1 1 -CCA2 1 -CCA3 1 -CCA4 1 -CCA5 1 -CCA6 1 -CCA7 1 -CCA8 1 -CCA9 1 -CCAA 1 -CCAB 1 -CCAC 1 -CCAD 1 -CCAE 1 -CCAF 1 -CCB0 1 -CCB1 1 -CCB2 1 -CCB3 1 -CCB4 1 -CCB5 1 -CCB6 1 -CCB7 1 -CCB8 1 -CCB9 1 -CCBA 1 -CCBB 1 -CCBC 1 -CCBD 1 -CCBE 1 -CCBF 1 -CD80 1 -CD81 1 -CD82 1 -CD83 1 -CD84 1 -CD85 1 -CD86 1 -CD87 1 -CD88 1 -CD89 1 -CD8A 1 -CD8B 1 -CD8C 1 -CD8D 1 -CD8E 1 -CD8F 1 -CD90 1 -CD91 1 -CD92 1 -CD93 1 -CD94 1 -CD95 1 -CD96 1 -CD97 1 -CD9D 1 -CD9E 1 -CD9F 1 -CDA0 1 -CDA1 1 -CDA2 1 -D283 1 -D284 1 -D285 1 -D286 1 -D288 1 -D289 1 -D691 1 -D692 1 -D693 1 -D694 1 -D695 1 -D696 1 -D697 1 -D698 1 -D699 1 -D69A 1 -D69B 1 -D69C 1 -D69D 1 -D69E 1 -D69F 1 -D6A0 1 -D6A1 1 -D6A3 1 -D6A4 1 -D6A5 1 -D6A6 1 -D6A7 1 -D6A8 1 -D6A9 1 -D6AA 1 -D6AB 1 -D6AC 1 -D6AD 1 -D6AE 1 -D6AF 1 -D6B0 1 -D6B1 1 -D6B2 1 -D6B3 1 -D6B4 1 -D6B5 1 -D6B6 1 -D6B7 1 -D6B8 1 -D6B9 1 -D6BB 1 -D6BC 1 -D6BD 1 -D6BF 1 -D781 1 -D782 1 -D784 1 -D880 1 -D881 1 -D882 1 -D883 1 -D890 1 -D891 1 -D892 1 -D893 1 -D894 1 -D895 1 -D98B 1 -D98C 1 -D98D 1 -D98E 1 -D98F 1 -D990 1 -D991 1 -D992 1 -D993 1 -D994 1 -D995 1 -D996 1 -D997 1 -D998 1 -D9B0 1 -DB96 1 -DB97 1 -DB98 1 -DB99 1 -DB9A 1 -DB9B 1 -DB9C 1 -DB9D 1 -DB9E 1 -DB9F 1 -DBA0 1 -DBA1 1 -DBA2 1 -DBA3 1 -DBA4 1 -DBA7 1 -DBA8 1 -DBAA 1 -DBAB 1 -DBAC 1 -DBAD 1 -DC8F 1 -DC91 1 -DCB0 1 -DCB1 1 -DCB2 1 -DCB3 1 -DCB4 1 -DCB5 1 -DCB6 1 -DCB7 1 -DCB8 1 -DCB9 1 -DCBA 1 -DCBB 1 -DCBC 1 -DCBD 1 -DCBE 1 -DCBF 1 -DD80 1 -DD81 1 -DD82 1 -DD83 1 -DD84 1 -DD85 1 -DD86 1 -DD87 1 -DD88 1 -DD89 1 -DD8A 1 -D980 1 -60 1 -C2B4 1 -CE84 1 -CB9C 1 -5E 1 -C2AF 1 -CB98 1 -CB99 1 -C2A8 1 -CE85 1 -CB9A 1 -CB9D 1 -C2B8 1 -CB9B 1 -5F 1 -C2AD 1 -2D 1 -D68A 1 -2C 1 -D59D 1 -D88C 1 -D88D 1 -D9AB 1 -D9AC 1 -3B 1 -CDBE 1 -D89B 1 -3A 1 -D689 1 -DC83 1 -DC84 1 -DC85 1 -DC86 1 -DC87 1 -DC88 1 -21 1 -C2A1 1 -D59C 1 -3F 1 -C2BF 1 -D59E 1 -D89F 1 -DC89 1 -2E 1 -DB94 1 -DC81 1 -DC82 1 -C2B7 1 -CE87 1 -DC80 1 -27 1 -22 1 -C2AB 1 -C2BB 1 -28 1 -29 1 -5B 1 -7B 1 -7D 1 -C2A7 1 -C2B6 1 -C2A9 1 -C2AE 1 -40 1 -2A 1 -D9AD 1 -2F 1 -26 1 -23 1 -25 1 -D9AA 1 -D59A 1 -D59B 1 -D59F 1 -D6BE 1 -D780 1 -D783 1 -D7B3 1 -D7B4 1 -DC8A 1 -DC8B 1 -DC8C 1 -DC8D 1 -CAB9 1 -CDB4 1 -CDB5 1 -CABA 1 -CB82 1 -CB83 1 -CB84 1 -CB85 1 -CB86 1 -CB87 1 -CB88 1 -CB89 1 -CB8A 1 -CB8B 1 -CB8C 1 -CB8D 1 -CB8E 1 -CB8F 1 -CB92 1 -CB93 1 -CB94 1 -CB95 1 -CB96 1 -CB97 1 -CB9E 1 -CB9F 1 -CBA5 1 -CBA6 1 -CBA7 1 -CBA8 1 -CBA9 1 -CBAA 1 -CBAB 1 -CBAC 1 -CBAD 1 -CBAF 1 -CBB0 1 -CBB1 1 -CBB2 1 -CBB3 1 -CBB4 1 -CBB5 1 -CBB6 1 -CBB7 1 -CBB8 1 -CBB9 1 -CBBA 1 -CBBB 1 -CBBC 1 -CBBD 1 -CBBE 1 -CBBF 1 -C2B0 1 -D282 1 -D88E 1 -D88F 1 -DBA9 1 -CFB6 1 -2B 1 -C2B1 1 -C3B7 1 -C397 1 -3C 1 -3D 1 -3E 1 -C2AC 1 -7C 1 -C2A6 1 -7E 1 -CB90 1 -CB91 1 -C2A4 1 -C2A2 1 -24 1 -C2A3 1 -C2A5 1 -30 1 -D9A0 1 -DBB0 1 -31 1 -C2B9 1 -D9A1 1 -DBB1 1 -C2BD 1 -C2BC 1 -32 1 -C2B2 1 -D9A2 1 -DBB2 1 -33 1 -C2B3 1 -D9A3 1 -DBB3 1 -C2BE 1 -34 1 -D9A4 1 -DBB4 1 -35 1 -D9A5 1 -DBB5 1 -36 1 -D9A6 1 -DBB6 1 -37 1 -D9A7 1 -DBB7 1 -38 1 -D9A8 1 -DBB8 1 -39 1 -D9A9 1 -DBB9 1 -41 1 -61 1 -C2AA 1 -C380 1 -C381 1 -C382 1 -C383 1 -C384 1 -C385 1 -C3A0 1 -C3A1 1 -C3A2 1 -C3A3 1 -C3A4 1 -C3A5 1 -C480 1 -C481 1 -C482 1 -C483 1 -C484 1 -C485 1 -C78D 1 -C78E 1 -C79E 1 -C79F 1 -C7A0 1 -C7A1 1 -C7BA 1 -C7BB 1 -C880 1 -C881 1 -C882 1 -C883 1 -C8A6 1 -C8A7 1 -CDA3 1 -C386 1 -C3A6 1 -C7A2 1 -C7A3 1 -C7BC 1 -C7BD 1 -C990 1 -C991 1 -C992 1 -42 1 -62 1 -CA99 1 -C680 1 -C681 1 -C993 1 -C682 1 -C683 1 -43 1 -63 1 -C387 1 -C3A7 1 -C486 1 -C487 1 -C488 1 -C489 1 -C48A 1 -C48B 1 -C48C 1 -C48D 1 -CDA8 1 -C687 1 -C688 1 -C995 1 -44 1 -64 1 -C48E 1 -C48F 1 -CDA9 1 -C784 1 -C785 1 -C786 1 -C7B1 1 -C7B2 1 -C7B3 1 -CAA3 1 -CAA5 1 -CAA4 1 -C490 1 -C491 1 -C689 1 -C996 1 -C68A 1 -C997 1 -C68B 1 -C68C 1 -C8A1 1 -C390 1 -C3B0 1 -45 1 -65 1 -C388 1 -C389 1 -C38A 1 -C38B 1 -C3A8 1 -C3A9 1 -C3AA 1 -C3AB 1 -C492 1 -C493 1 -C494 1 -C495 1 -C496 1 -C497 1 -C498 1 -C499 1 -C49A 1 -C49B 1 -C884 1 -C885 1 -C886 1 -C887 1 -C8A8 1 -C8A9 1 -CDA4 1 -C68E 1 -C79D 1 -C68F 1 -C999 1 -C690 1 -C99B 1 -C998 1 -C99A 1 -C99C 1 -C99D 1 -C99E 1 -CA9A 1 -C9A4 1 -46 1 -66 1 -CAA9 1 -C691 1 -C692 1 -47 1 -67 1 -C49C 1 -C49D 1 -C49E 1 -C49F 1 -C4A0 1 -C4A1 1 -C4A2 1 -C4A3 1 -C7A6 1 -C7A7 1 -C7B4 1 -C7B5 1 -C9A1 1 -C9A2 1 -C7A4 1 -C7A5 1 -C693 1 -C9A0 1 -CA9B 1 -C694 1 -C9A3 1 -CBA0 1 -C6A2 1 -C6A3 1 -48 1 -68 1 -C4A4 1 -C4A5 1 -C89E 1 -C89F 1 -CAB0 1 -CDAA 1 -CA9C 1 -C695 1 -C7B6 1 -C4A6 1 -C4A7 1 -C9A6 1 -CAB1 1 -C9A7 1 -CABB 1 -CABD 1 -49 1 -69 1 -C38C 1 -C38D 1 -C38E 1 -C38F 1 -C3AC 1 -C3AD 1 -C3AE 1 -C3AF 1 -C4A8 1 -C4A9 1 -C4AA 1 -C4AB 1 -C4AC 1 -C4AD 1 -C4AE 1 -C4AF 1 -C4B0 1 -C78F 1 -C790 1 -C888 1 -C889 1 -C88A 1 -C88B 1 -CDA5 1 -C4B2 1 -C4B3 1 -C4B1 1 -C9AA 1 -C697 1 -C9A8 1 -C696 1 -C9A9 1 -4A 1 -6A 1 -C4B4 1 -C4B5 1 -C7B0 1 -CAB2 1 -CA9D 1 -C99F 1 -CA84 1 -4B 1 -6B 1 -C4B6 1 -C4B7 1 -C7A8 1 -C7A9 1 -C698 1 -C699 1 -CA9E 1 -4C 1 -6C 1 -C4B9 1 -C4BA 1 -C4BB 1 -C4BC 1 -C4BD 1 -C4BE 1 -CBA1 1 -C4BF 1 -C580 1 -C787 1 -C788 1 -C789 1 -CAAA 1 -CAAB 1 -CA9F 1 -C581 1 -C582 1 -C69A 1 -C9AB 1 -C9AC 1 -C9AD 1 -C8B4 1 -C9AE 1 -C69B 1 -CA8E 1 -4D 1 -6D 1 -CDAB 1 -C9B1 1 -4E 1 -6E 1 -C391 1 -C3B1 1 -C583 1 -C584 1 -C585 1 -C586 1 -C587 1 -C588 1 -C7B8 1 -C7B9 1 -C78A 1 -C78B 1 -C78C 1 -C9B4 1 -C69D 1 -C9B2 1 -C69E 1 -C8A0 1 -C9B3 1 -C8B5 1 -C58A 1 -C58B 1 -4F 1 -6F 1 -C2BA 1 -C392 1 -C393 1 -C394 1 -C395 1 -C396 1 -C3B2 1 -C3B3 1 -C3B4 1 -C3B5 1 -C3B6 1 -C58C 1 -C58D 1 -C58E 1 -C58F 1 -C590 1 -C591 1 -C6A0 1 -C6A1 1 -C791 1 -C792 1 -C7AA 1 -C7AB 1 -C7AC 1 -C7AD 1 -C88C 1 -C88D 1 -C88E 1 -C88F 1 -C8AA 1 -C8AB 1 -C8AC 1 -C8AD 1 -C8AE 1 -C8AF 1 -C8B0 1 -C8B1 1 -CDA6 1 -C592 1 -C593 1 -C9B6 1 -C398 1 -C3B8 1 -C7BE 1 -C7BF 1 -C686 1 -C994 1 -C69F 1 -C9B5 1 -C9B7 1 -C8A2 1 -C8A3 1 -50 1 -70 1 -C6A4 1 -C6A5 1 -C9B8 1 -51 1 -71 1 -CAA0 1 -C4B8 1 -52 1 -72 1 -C594 1 -C595 1 -C596 1 -C597 1 -C598 1 -C599 1 -C890 1 -C891 1 -C892 1 -C893 1 -CAB3 1 -CDAC 1 -C6A6 1 -CA80 1 -C9B9 1 -CAB4 1 -C9BA 1 -C9BB 1 -CAB5 1 -C9BC 1 -C9BD 1 -C9BE 1 -C9BF 1 -CA81 1 -CAB6 1 -53 1 -73 1 -C59A 1 -C59B 1 -C59C 1 -C59D 1 -C59E 1 -C59F 1 -C5A0 1 -C5A1 1 -C5BF 1 -C898 1 -C899 1 -CBA2 1 -C39F 1 -CA82 1 -C6A9 1 -CA83 1 -C6AA 1 -CA85 1 -CA86 1 -54 1 -74 1 -C5A2 1 -C5A3 1 -C5A4 1 -C5A5 1 -C89A 1 -C89B 1 -CDAD 1 -CAA8 1 -C6BE 1 -CAA6 1 -CAA7 1 -C5A6 1 -C5A7 1 -C6AB 1 -C6AC 1 -C6AD 1 -C6AE 1 -CA88 1 -C8B6 1 -CA87 1 -55 1 -75 1 -C399 1 -C39A 1 -C39B 1 -C39C 1 -C3B9 1 -C3BA 1 -C3BB 1 -C3BC 1 -C5A8 1 -C5A9 1 -C5AA 1 -C5AB 1 -C5AC 1 -C5AD 1 -C5AE 1 -C5AF 1 -C5B0 1 -C5B1 1 -C5B2 1 -C5B3 1 -C6AF 1 -C6B0 1 -C793 1 -C794 1 -C795 1 -C796 1 -C797 1 -C798 1 -C799 1 -C79A 1 -C79B 1 -C79C 1 -C894 1 -C895 1 -C896 1 -C897 1 -CDA7 1 -CA89 1 -C9A5 1 -CAAE 1 -CAAF 1 -C69C 1 -C9AF 1 -C9B0 1 -C6B1 1 -CA8A 1 -56 1 -76 1 -CDAE 1 -C6B2 1 -CA8B 1 -CA8C 1 -57 1 -77 1 -C5B4 1 -C5B5 1 -CAB7 1 -CA8D 1 -58 1 -78 1 -CBA3 1 -CDAF 1 -59 1 -79 1 -C39D 1 -C3BD 1 -C3BF 1 -C5B6 1 -C5B7 1 -C5B8 1 -C8B2 1 -C8B3 1 -CAB8 1 -CA8F 1 -C6B3 1 -C6B4 1 -5A 1 -7A 1 -C5B9 1 -C5BA 1 -C5BB 1 -C5BC 1 -C5BD 1 -C5BE 1 -C68D 1 -C6B5 1 -C6B6 1 -C8A4 1 -C8A5 1 -CA90 1 -CA91 1 -C6B7 1 -C7AE 1 -C7AF 1 -CA92 1 -C6B8 1 -C6B9 1 -C6BA 1 -CA93 1 -C89C 1 -C89D 1 -C39E 1 -C3BE 1 -C6BF 1 -C7B7 1 -C6BB 1 -C6A7 1 -C6A8 1 -C6BC 1 -C6BD 1 -C684 1 -C685 1 -CA94 1 -CB80 1 -CABC 1 -C589 1 -CBAE 1 -CABE 1 -CA95 1 -CBA4 1 -CABF 1 -CB81 1 -CAA1 1 -CAA2 1 -CA96 1 -C780 1 -C781 1 -C782 1 -C783 1 -CA97 1 -CA98 1 -CAAC 1 -CAAD 1 -CE86 1 -CE91 1 -CEAC 1 -CEB1 1 -CE92 1 -CEB2 1 -CF90 1 -CE93 1 -CEB3 1 -CE94 1 -CEB4 1 -CE88 1 -CE95 1 -CEAD 1 -CEB5 1 -CFB5 1 -CF9C 1 -CF9D 1 -CF9A 1 -CF9B 1 -CE96 1 -CEB6 1 -CE89 1 -CE97 1 -CEAE 1 -CEB7 1 -CE98 1 -CEB8 1 -CF91 1 -CFB4 1 -CDBA 1 -CE8A 1 -CE90 1 -CE99 1 -CEAA 1 -CEAF 1 -CEB9 1 -CF8A 1 -CFB3 1 -CE9A 1 -CEBA 1 -CFB0 1 -CF97 1 -CE9B 1 -CEBB 1 -C2B5 1 -CE9C 1 -CEBC 1 -CE9D 1 -CEBD 1 -CE9E 1 -CEBE 1 -CE8C 1 -CE9F 1 -CEBF 1 -CF8C 1 -CEA0 1 -CF80 1 -CF96 1 -CF9E 1 -CF9F 1 -CF98 1 -CF99 1 -CEA1 1 -CF81 1 -CFB1 1 -CEA3 1 -CF82 1 -CF83 1 -CFB2 1 -CFB9 1 -CEA4 1 -CF84 1 -CE8E 1 -CEA5 1 -CEAB 1 -CEB0 1 -CF85 1 -CF8B 1 -CF8D 1 -CF92 1 -CF93 1 -CF94 1 -CEA6 1 -CF86 1 -CF95 1 -CEA7 1 -CF87 1 -CEA8 1 -CF88 1 -CE8F 1 -CEA9 1 -CF89 1 -CF8E 1 -CFA0 1 -CFA1 1 -CFB7 1 -CFB8 1 -CFBA 1 -CFBB 1 -CFA2 1 -CFA3 1 -CFA4 1 -CFA5 1 -CFA6 1 -CFA7 1 -CFA8 1 -CFA9 1 -CFAA 1 -CFAB 1 -CFAC 1 -CFAD 1 -CFAE 1 -CFAF 1 -D090 1 -D0B0 1 -D390 1 -D391 1 -D392 1 -D393 1 -D398 1 -D399 1 -D39A 1 -D39B 1 -D394 1 -D395 1 -D091 1 -D0B1 1 -D092 1 -D0B2 1 -D093 1 -D0B3 1 -D290 1 -D291 1 -D292 1 -D293 1 -D294 1 -D295 1 -D094 1 -D0B4 1 -D480 1 -D481 1 -D082 1 -D192 1 -D482 1 -D483 1 -D083 1 -D193 1 -D298 1 -D299 1 -D080 1 -D081 1 -D095 1 -D0B5 1 -D190 1 -D191 1 -D396 1 -D397 1 -D084 1 -D194 1 -D096 1 -D0B6 1 -D381 1 -D382 1 -D39C 1 -D39D 1 -D296 1 -D297 1 -D097 1 -D0B7 1 -D484 1 -D485 1 -D39E 1 -D39F 1 -D085 1 -D195 1 -D3A0 1 -D3A1 1 -D486 1 -D487 1 -D08D 1 -D098 1 -D0B8 1 -D19D 1 -D3A2 1 -D3A3 1 -D28A 1 -D28B 1 -D3A4 1 -D3A5 1 -D086 1 -D196 1 -D087 1 -D197 1 -D099 1 -D0B9 1 -D088 1 -D198 1 -D09A 1 -D0BA 1 -D29A 1 -D29B 1 -D383 1 -D384 1 -D2A0 1 -D2A1 1 -D29E 1 -D29F 1 -D29C 1 -D29D 1 -D09B 1 -D0BB 1 -D385 1 -D386 1 -D089 1 -D199 1 -D488 1 -D489 1 -D09C 1 -D0BC 1 -D38D 1 -D38E 1 -D09D 1 -D0BD 1 -D389 1 -D38A 1 -D2A2 1 -D2A3 1 -D387 1 -D388 1 -D2A4 1 -D2A5 1 -D08A 1 -D19A 1 -D48A 1 -D48B 1 -D09E 1 -D0BE 1 -D3A6 1 -D3A7 1 -D3A8 1 -D3A9 1 -D3AA 1 -D3AB 1 -D09F 1 -D0BF 1 -D2A6 1 -D2A7 1 -D280 1 -D281 1 -D0A0 1 -D180 1 -D28E 1 -D28F 1 -D0A1 1 -D181 1 -D48C 1 -D48D 1 -D2AA 1 -D2AB 1 -D0A2 1 -D182 1 -D48E 1 -D48F 1 -D2AC 1 -D2AD 1 -D08B 1 -D19B 1 -D08C 1 -D19C 1 -D0A3 1 -D183 1 -D3AE 1 -D3AF 1 -D08E 1 -D19E 1 -D3B0 1 -D3B1 1 -D3B2 1 -D3B3 1 -D2AE 1 -D2AF 1 -D2B0 1 -D2B1 1 -D1B8 1 -D1B9 1 -D0A4 1 -D184 1 -D0A5 1 -D185 1 -D2B2 1 -D2B3 1 -D2BA 1 -D2BB 1 -D1A0 1 -D1A1 1 -D1BE 1 -D1BF 1 -D1BC 1 -D1BD 1 -D1BA 1 -D1BB 1 -D0A6 1 -D186 1 -D2B4 1 -D2B5 1 -D0A7 1 -D187 1 -D3B4 1 -D3B5 1 -D2B6 1 -D2B7 1 -D38B 1 -D38C 1 -D2B8 1 -D2B9 1 -D2BC 1 -D2BD 1 -D2BE 1 -D2BF 1 -D08F 1 -D19F 1 -D0A8 1 -D188 1 -D0A9 1 -D189 1 -D0AA 1 -D18A 1 -D0AB 1 -D18B 1 -D3B8 1 -D3B9 1 -D0AC 1 -D18C 1 -D28C 1 -D28D 1 -D1A2 1 -D1A3 1 -D0AD 1 -D18D 1 -D3AC 1 -D3AD 1 -D0AE 1 -D18E 1 -D0AF 1 -D18F 1 -D1A4 1 -D1A5 1 -D1A6 1 -D1A7 1 -D1AA 1 -D1AB 1 -D1A8 1 -D1A9 1 -D1AC 1 -D1AD 1 -D1AE 1 -D1AF 1 -D1B0 1 -D1B1 1 -D1B2 1 -D1B3 1 -D1B4 1 -D1B5 1 -D1B6 1 -D1B7 1 -D2A8 1 -D2A9 1 -D380 1 -D4B1 1 -D5A1 1 -D4B2 1 -D5A2 1 -D4B3 1 -D5A3 1 -D4B4 1 -D5A4 1 -D4B5 1 -D5A5 1 -D687 1 -D4B6 1 -D5A6 1 -D4B7 1 -D5A7 1 -D4B8 1 -D5A8 1 -D4B9 1 -D5A9 1 -D4BA 1 -D5AA 1 -D4BB 1 -D5AB 1 -D4BC 1 -D5AC 1 -D4BD 1 -D5AD 1 -D4BE 1 -D5AE 1 -D4BF 1 -D5AF 1 -D580 1 -D5B0 1 -D581 1 -D5B1 1 -D582 1 -D5B2 1 -D583 1 -D5B3 1 -D584 1 -D5B4 1 -D585 1 -D5B5 1 -D586 1 -D5B6 1 -D587 1 -D5B7 1 -D588 1 -D5B8 1 -D589 1 -D5B9 1 -D58A 1 -D5BA 1 -D58B 1 -D5BB 1 -D58C 1 -D5BC 1 -D58D 1 -D5BD 1 -D58E 1 -D5BE 1 -D58F 1 -D5BF 1 -D590 1 -D680 1 -D591 1 -D681 1 -D592 1 -D682 1 -D593 1 -D683 1 -D594 1 -D684 1 -D595 1 -D685 1 -D596 1 -D686 1 -D599 1 -D790 1 -D791 1 -D792 1 -D793 1 -D794 1 -D795 1 -D7B0 1 -D7B1 1 -D796 1 -D797 1 -D798 1 -D799 1 -D7B2 1 -D79A 1 -D79B 1 -D79C 1 -D79D 1 -D79E 1 -D79F 1 -D7A0 1 -D7A1 1 -D7A2 1 -D7A3 1 -D7A4 1 -D7A5 1 -D7A6 1 -D7A7 1 -D7A8 1 -D7A9 1 -D7AA 1 -D8A1 1 -D9B4 1 -DBBD 1 -D8A2 1 -D8A3 1 -D9B2 1 -D9B1 1 -D8A4 1 -D8A5 1 -D9B3 1 -D8A6 1 -D8A7 1 -D9B5 1 -D9AE 1 -D8A8 1 -D9BB 1 -D9BE 1 -DA80 1 -D8A9 1 -D8AA 1 -D8AB 1 -D9B9 1 -D9BA 1 -D9BC 1 -D9BD 1 -D9BF 1 -D8AC 1 -DA83 1 -DA84 1 -DA86 1 -DABF 1 -DA87 1 -D8AD 1 -D8AE 1 -DA81 1 -DA82 1 -DA85 1 -D8AF 1 -D8B0 1 -DA88 1 -DA89 1 -DA8A 1 -DA8B 1 -DA8C 1 -DA8D 1 -DA8E 1 -DA8F 1 -DA90 1 -DBAE 1 -D8B1 1 -D8B2 1 -DA91 1 -DA92 1 -DA93 1 -DA94 1 -DA95 1 -DA96 1 -DA97 1 -DA98 1 -DA99 1 -DBAF 1 -D8B3 1 -D8B4 1 -DA9A 1 -DA9B 1 -DA9C 1 -DBBA 1 -D8B5 1 -D8B6 1 -DA9D 1 -DA9E 1 -DBBB 1 -D8B7 1 -D8B8 1 -DA9F 1 -D8B9 1 -D8BA 1 -DAA0 1 -DBBC 1 -D981 1 -DAA1 1 -DAA2 1 -DAA3 1 -DAA4 1 -DAA5 1 -DAA6 1 -D9AF 1 -D982 1 -DAA7 1 -DAA8 1 -D983 1 -DAA9 1 -DAAA 1 -DAAB 1 -DAAC 1 -DAAD 1 -DAAE 1 -DAAF 1 -DAB0 1 -DAB1 1 -DAB2 1 -DAB3 1 -DAB4 1 -D984 1 -DAB5 1 -DAB6 1 -DAB7 1 -DAB8 1 -D985 1 -DBBE 1 -D986 1 -DABA 1 -DABB 1 -DABC 1 -DABD 1 -DAB9 1 -D987 1 -DABE 1 -DB81 1 -DB82 1 -DB83 1 -DBBF 1 -DB80 1 -DB95 1 -D988 1 -DBA5 1 -D9B6 1 -DB84 1 -DB85 1 -DB86 1 -DB87 1 -D9B7 1 -DB88 1 -DB89 1 -DB8A 1 -DB8B 1 -DB8F 1 -D989 1 -D98A 1 -DBA6 1 -D9B8 1 -DB8C 1 -DB8D 1 -DB8E 1 -DB90 1 -DB91 1 -DB92 1 -DB93 1 -DC90 1 -DC92 1 -DCAD 1 -DC93 1 -DC94 1 -DCAE 1 -DC96 1 -DC95 1 -DCAF 1 -DC97 1 -DC98 1 -DC99 1 -DD8D 1 -DC9A 1 -DC9B 1 -DC9C 1 -DC9D 1 -DC9E 1 -DC9F 1 -DD8E 1 -DCA0 1 -DCA1 1 -DCA2 1 -DCA3 1 -DCA4 1 -DCA5 1 -DCA6 1 -DCA7 1 -DD8F 1 -DCA8 1 -DCA9 1 -DCAA 1 -DCAB 1 -DCAC 1 -DE80 1 -DE99 1 -DE9A 1 -DE81 1 -DE82 1 -DE83 1 -DE9C 1 -DE84 1 -DE85 1 -DE86 1 -DE87 1 -DEA2 1 -DEA3 1 -DE88 1 -DEA5 1 -DE89 1 -DE8A 1 -DE8B 1 -DE9B 1 -DE8C 1 -DE98 1 -DEA0 1 -DEA1 1 -DE8D 1 -DE8E 1 -DEA4 1 -DE8F 1 -DE90 1 -DE9D 1 -DE9E 1 -DE9F 1 -DE91 1 -DE92 1 -DE93 1 -DE94 1 -DE95 1 -DE96 1 -DE97 1 -DEB1 1 -DEA6 1 -DEA7 1 -DEA8 1 -DEA9 1 -DEAA 1 -DEAB 1 -DEAC 1 -DEAD 1 -DEAE 1 -DEAF 1 -DEB0 1 -E4B880 1 -E4B881 1 -E4B882 1 -E4B883 1 -E4B884 1 -E4B885 1 -E4B886 1 -E4B887 1 -E4B888 1 -E4B889 1 -E4B88A 1 -E4B88B 1 -E4B88C 1 -E4B88D 1 -E4B88E 1 -E4B88F 1 -E4B890 1 -E4B891 1 -E4B892 1 -E4B893 1 -E4B894 1 -E4B895 1 -E4B896 1 -E4B897 1 -E4B898 1 -E4B899 1 -E4B89A 1 -E4B89B 1 -E4B89C 1 -E4B89D 1 -E4B89E 1 -E4B89F 1 -E4B8A0 1 -E4B8A1 1 -E4B8A2 1 -E4B8A3 1 -E4B8A4 1 -E4B8A5 1 -E4B8A6 1 -E4B8A7 1 -E4B8A8 1 -E4B8A9 1 -E4B8AA 1 -E4B8AB 1 -E4B8AC 1 -E4B8AD 1 -E4B8AE 1 -E4B8AF 1 -E4B8B0 1 -E4B8B1 1 -E4B8B2 1 -E4B8B3 1 -E4B8B4 1 -E4B8B5 1 -E4B8B6 1 -E4B8B7 1 -E4B8B8 1 -E4B8B9 1 -E4B8BA 1 -E4B8BB 1 -E4B8BC 1 -E4B8BD 1 -E4B8BE 1 -E4B8BF 1 -E4B980 1 -E4B981 1 -E4B982 1 -E4B983 1 -E4B984 1 -E4B985 1 -E4B986 1 -E4B987 1 -E4B988 1 -E4B989 1 -E4B98A 1 -E4B98B 1 -E4B98C 1 -E4B98D 1 -E4B98E 1 -E4B98F 1 -E4B990 1 -E4B991 1 -E4B992 1 -E4B993 1 -E4B994 1 -E4B995 1 -E4B996 1 -E4B997 1 -E4B998 1 -E4B999 1 -E4B99A 1 -E4B99B 1 -E4B99C 1 -E4B99D 1 -E4B99E 1 -E4B99F 1 -E4B9A0 1 -E4B9A1 1 -E4B9A2 1 -E4B9A3 1 -E4B9A4 1 -E4B9A5 1 -E4B9A6 1 -E4B9A7 1 -E4B9A8 1 -E4B9A9 1 -E4B9AA 1 -E4B9AB 1 -E4B9AC 1 -E4B9AD 1 -E4B9AE 1 -E4B9AF 1 -E4B9B0 1 -E4B9B1 1 -E4B9B2 1 -E4B9B3 1 -E4B9B4 1 -E4B9B5 1 -E4B9B6 1 -E4B9B7 1 -E4B9B8 1 -E4B9B9 1 -E4B9BA 1 -E4B9BB 1 -E4B9BC 1 -E4B9BD 1 -E4B9BE 1 -E4B9BF 1 -E4BA80 1 -E4BA81 1 -E4BA82 1 -E4BA83 1 -E4BA84 1 -E4BA85 1 -E4BA86 1 -E4BA87 1 -E4BA88 1 -E4BA89 1 -E4BA8A 1 -E4BA8B 1 -E4BA8C 1 -E4BA8D 1 -E4BA8E 1 -E4BA8F 1 -E4BA90 1 -E4BA91 1 -E4BA92 1 -E4BA93 1 -E4BA94 1 -E4BA95 1 -E4BA96 1 -E4BA97 1 -E4BA98 1 -E4BA99 1 -E4BA9A 1 -E4BA9B 1 -E4BA9C 1 -E4BA9D 1 -E4BA9E 1 -E4BA9F 1 -E4BAA0 1 -E4BAA1 1 -E4BAA2 1 -E4BAA3 1 -E4BAA4 1 -E4BAA5 1 -E4BAA6 1 -E4BAA7 1 -E4BAA8 1 -E4BAA9 1 -E4BAAA 1 -E4BAAB 1 -E4BAAC 1 -E4BAAD 1 -E4BAAE 1 -E4BAAF 1 -E4BAB0 1 -E4BAB1 1 -E4BAB2 1 -E4BAB3 1 -E4BAB4 1 -E4BAB5 1 -E4BAB6 1 -E4BAB7 1 -E4BAB8 1 -E4BAB9 1 -E4BABA 1 -E4BABB 1 -E4BABC 1 -E4BABD 1 -E4BABE 1 -E4BABF 1 -E4BB80 1 -E4BB81 1 -E4BB82 1 -E4BB83 1 -E4BB84 1 -E4BB85 1 -E4BB86 1 -E4BB87 1 -E4BB88 1 -E4BB89 1 -E4BB8A 1 -E4BB8B 1 -E4BB8C 1 -E4BB8D 1 -E4BB8E 1 -E4BB8F 1 -E4BB90 1 -E4BB91 1 -E4BB92 1 -E4BB93 1 -E4BB94 1 -E4BB95 1 -E4BB96 1 -E4BB97 1 -E4BB98 1 -E4BB99 1 -E4BB9A 1 -E4BB9B 1 -E4BB9C 1 -E4BB9D 1 -E4BB9E 1 -E4BB9F 1 -E4BBA0 1 -E4BBA1 1 -E4BBA2 1 -E4BBA3 1 -E4BBA4 1 -E4BBA5 1 -E4BBA6 1 -E4BBA7 1 -E4BBA8 1 -E4BBA9 1 -E4BBAA 1 -E4BBAB 1 -E4BBAC 1 -E4BBAD 1 -E4BBAE 1 -E4BBAF 1 -E4BBB0 1 -E4BBB1 1 -E4BBB2 1 -E4BBB3 1 -E4BBB4 1 -E4BBB5 1 -E4BBB6 1 -E4BBB7 1 -E4BBB8 1 -E4BBB9 1 -E4BBBA 1 -E4BBBB 1 -E4BBBC 1 -E4BBBD 1 -E4BBBE 1 -E4BBBF 1 -E4BC80 1 -E4BC81 1 -E4BC82 1 -E4BC83 1 -E4BC84 1 -E4BC85 1 -E4BC86 1 -E4BC87 1 -E4BC88 1 -E4BC89 1 -E4BC8A 1 -E4BC8B 1 -E4BC8C 1 -E4BC8D 1 -E4BC8E 1 -E4BC8F 1 -E4BC90 1 -E4BC91 1 -E4BC92 1 -E4BC93 1 -E4BC94 1 -E4BC95 1 -E4BC96 1 -E4BC97 1 -E4BC98 1 -E4BC99 1 -E4BC9A 1 -E4BC9B 1 -E4BC9C 1 -E4BC9D 1 -E4BC9E 1 -E4BC9F 1 -E4BCA0 1 -E4BCA1 1 -E4BCA2 1 -E4BCA3 1 -E4BCA4 1 -E4BCA5 1 -E4BCA6 1 -E4BCA7 1 -E4BCA8 1 -E4BCA9 1 -E4BCAA 1 -E4BCAB 1 -E4BCAC 1 -E4BCAD 1 -E4BCAE 1 -E4BCAF 1 -E4BCB0 1 -E4BCB1 1 -E4BCB2 1 -E4BCB3 1 -E4BCB4 1 -E4BCB5 1 -E4BCB6 1 -E4BCB7 1 -E4BCB8 1 -E4BCB9 1 -E4BCBA 1 -E4BCBB 1 -E4BCBC 1 -E4BCBD 1 -E4BCBE 1 -E4BCBF 1 -E4BD80 1 -E4BD81 1 -E4BD82 1 -E4BD83 1 -E4BD84 1 -E4BD85 1 -E4BD86 1 -E4BD87 1 -E4BD88 1 -E4BD89 1 -E4BD8A 1 -E4BD8B 1 -E4BD8C 1 -E4BD8D 1 -E4BD8E 1 -E4BD8F 1 -E4BD90 1 -E4BD91 1 -E4BD92 1 -E4BD93 1 -E4BD94 1 -E4BD95 1 -E4BD96 1 -E4BD97 1 -E4BD98 1 -E4BD99 1 -E4BD9A 1 -E4BD9B 1 -E4BD9C 1 -E4BD9D 1 -E4BD9E 1 -E4BD9F 1 -E4BDA0 1 -E4BDA1 1 -E4BDA2 1 -E4BDA3 1 -E4BDA4 1 -E4BDA5 1 -E4BDA6 1 -E4BDA7 1 -E4BDA8 1 -E4BDA9 1 -E4BDAA 1 -E4BDAB 1 -E4BDAC 1 -E4BDAD 1 -E4BDAE 1 -E4BDAF 1 -E4BDB0 1 -E4BDB1 1 -E4BDB2 1 -E4BDB3 1 -E4BDB4 1 -E4BDB5 1 -E4BDB6 1 -E4BDB7 1 -E4BDB8 1 -E4BDB9 1 -E4BDBA 1 -E4BDBB 1 -E4BDBC 1 -E4BDBD 1 -E4BDBE 1 -E4BDBF 1 -E4BE80 1 -E4BE81 1 -E4BE82 1 -E4BE83 1 -E4BE84 1 -E4BE85 1 -E4BE86 1 -E4BE87 1 -E4BE88 1 -E4BE89 1 -E4BE8A 1 -E4BE8B 1 -E4BE8C 1 -E4BE8D 1 -E4BE8E 1 -E4BE8F 1 -E4BE90 1 -E4BE91 1 -E4BE92 1 -E4BE93 1 -E4BE94 1 -E4BE95 1 -E4BE96 1 -E4BE97 1 -E4BE98 1 -E4BE99 1 -E4BE9A 1 -E4BE9B 1 -E4BE9C 1 -E4BE9D 1 -E4BE9E 1 -E4BE9F 1 -E4BEA0 1 -E4BEA1 1 -E4BEA2 1 -E4BEA3 1 -E4BEA4 1 -E4BEA5 1 -E4BEA6 1 -E4BEA7 1 -E4BEA8 1 -E4BEA9 1 -E4BEAA 1 -E4BEAB 1 -E4BEAC 1 -E4BEAD 1 -E4BEAE 1 -E4BEAF 1 -E4BEB0 1 -E4BEB1 1 -E4BEB2 1 -E4BEB3 1 -E4BEB4 1 -E4BEB5 1 -E4BEB6 1 -E4BEB7 1 -E4BEB8 1 -E4BEB9 1 -E4BEBA 1 -E4BEBB 1 -E4BEBC 1 -E4BEBD 1 -E4BEBE 1 -E4BEBF 1 -E4BF80 1 -E4BF81 1 -E4BF82 1 -E4BF83 1 -E4BF84 1 -E4BF85 1 -E4BF86 1 -E4BF87 1 -E4BF88 1 -E4BF89 1 -E4BF8A 1 -E4BF8B 1 -E4BF8C 1 -E4BF8D 1 -E4BF8E 1 -E4BF8F 1 -E4BF90 1 -E4BF91 1 -E4BF92 1 -E4BF93 1 -E4BF94 1 -E4BF95 1 -E4BF96 1 -E4BF97 1 -E4BF98 1 -E4BF99 1 -E4BF9A 1 -E4BF9B 1 -E4BF9C 1 -E4BF9D 1 -E4BF9E 1 -E4BF9F 1 -E4BFA0 1 -E4BFA1 1 -E4BFA2 1 -E4BFA3 1 -E4BFA4 1 -E4BFA5 1 -E4BFA6 1 -E4BFA7 1 -E4BFA8 1 -E4BFA9 1 -E4BFAA 1 -E4BFAB 1 -E4BFAC 1 -E4BFAD 1 -E4BFAE 1 -E4BFAF 1 -E4BFB0 1 -E4BFB1 1 -E4BFB2 1 -E4BFB3 1 -E4BFB4 1 -E4BFB5 1 -E4BFB6 1 -E4BFB7 1 -E4BFB8 1 -E4BFB9 1 -E4BFBA 1 -E4BFBB 1 -E4BFBC 1 -E4BFBD 1 -E4BFBE 1 -E4BFBF 1 -C8B7 1 -C8B8 1 -C8B9 1 -C8BA 1 -C8BB 1 -C8BC 1 -C8BD 1 -C8BE 1 -C8BF 1 -C980 1 -C981 1 -C982 1 -C983 1 -C984 1 -C985 1 -C986 1 -C987 1 -C988 1 -C989 1 -C98A 1 -C98B 1 -C98C 1 -C98D 1 -C98E 1 -C98F 1 -CD98 1 -CD99 1 -CD9A 1 -CD9B 1 -CD9C 1 -CDB0 1 -CDB1 1 -CDB2 1 -CDB3 1 -CDB6 1 -CDB7 1 -CDB8 1 -CDB9 1 -CDBB 1 -CDBC 1 -CDBD 1 -CDBF 1 -CE80 1 -CE81 1 -CE82 1 -CE83 1 -CE8B 1 -CE8D 1 -CEA2 1 -CF8F 1 -CFBC 1 -CFBD 1 -CFBE 1 -CFBF 1 -D287 1 -D38F 1 -D3B6 1 -D3B7 1 -D3BA 1 -D3BB 1 -D3BC 1 -D3BD 1 -D3BE 1 -D3BF 1 -D490 1 -D491 1 -D492 1 -D493 1 -D494 1 -D495 1 -D496 1 -D497 1 -D498 1 -D499 1 -D49A 1 -D49B 1 -D49C 1 -D49D 1 -D49E 1 -D49F 1 -D4A0 1 -D4A1 1 -D4A2 1 -D4A3 1 -D4A4 1 -D4A5 1 -D4A6 1 -D4A7 1 -D4A8 1 -D4A9 1 -D4AA 1 -D4AB 1 -D4AC 1 -D4AD 1 -D4AE 1 -D4AF 1 -D4B0 1 -D597 1 -D598 1 -D5A0 1 -D688 1 -D68B 1 -D68C 1 -D68D 1 -D68E 1 -D68F 1 -D690 1 -D6A2 1 -D6BA 1 -D785 1 -D786 1 -D787 1 -D788 1 -D789 1 -D78A 1 -D78B 1 -D78C 1 -D78D 1 -D78E 1 -D78F 1 -D7AB 1 -D7AC 1 -D7AD 1 -D7AE 1 -D7AF 1 -D7B5 1 -D7B6 1 -D7B7 1 -D7B8 1 -D7B9 1 -D7BA 1 -D7BB 1 -D7BC 1 -D7BD 1 -D7BE 1 -D7BF 1 -D884 1 -D885 1 -D886 1 -D887 1 -D888 1 -D889 1 -D88A 1 -D88B 1 -D896 1 -D897 1 -D898 1 -D899 1 -D89A 1 -D89C 1 -D89D 1 -D89E 1 -D8A0 1 -D8BB 1 -D8BC 1 -D8BD 1 -D8BE 1 -D8BF 1 -D999 1 -D99A 1 -D99B 1 -D99C 1 -D99D 1 -D99E 1 -D99F 1 -DC8E 1 -DD8B 1 -DD8C 1 -DD90 1 -DD91 1 -DD92 1 -DD93 1 -DD94 1 -DD95 1 -DD96 1 -DD97 1 -DD98 1 -DD99 1 -DD9A 1 -DD9B 1 -DD9C 1 -DD9D 1 -DD9E 1 -DD9F 1 -DDA0 1 -DDA1 1 -DDA2 1 -DDA3 1 -DDA4 1 -DDA5 1 -DDA6 1 -DDA7 1 -DDA8 1 -DDA9 1 -DDAA 1 -DDAB 1 -DDAC 1 -DDAD 1 -DDAE 1 -DDAF 1 -DDB0 1 -DDB1 1 -DDB2 1 -DDB3 1 -DDB4 1 -DDB5 1 -DDB6 1 -DDB7 1 -DDB8 1 -DDB9 1 -DDBA 1 -DDBB 1 -DDBC 1 -DDBD 1 -DDBE 1 -DDBF 1 -DEB2 1 -DEB3 1 -DEB4 1 -DEB5 1 -DEB6 1 -DEB7 1 -DEB8 1 -DEB9 1 -DEBA 1 -DEBB 1 -DEBC 1 -DEBD 1 -DEBE 1 -DEBF 1 -DF80 1 -DF81 1 -DF82 1 -DF83 1 -DF84 1 -DF85 1 -DF86 1 -DF87 1 -DF88 1 -DF89 1 -DF8A 1 -DF8B 1 -DF8C 1 -DF8D 1 -DF8E 1 -DF8F 1 -DF90 1 -DF91 1 -DF92 1 -DF93 1 -DF94 1 -DF95 1 -DF96 1 -DF97 1 -DF98 1 -DF99 1 -DF9A 1 -DF9B 1 -DF9C 1 -DF9D 1 -DF9E 1 -DF9F 1 -DFA0 1 -DFA1 1 -DFA2 1 -DFA3 1 -DFA4 1 -DFA5 1 -DFA6 1 -DFA7 1 -DFA8 1 -DFA9 1 -DFAA 1 -DFAB 1 -DFAC 1 -DFAD 1 -DFAE 1 -DFAF 1 -DFB0 1 -DFB1 1 -DFB2 1 -DFB3 1 -DFB4 1 -DFB5 1 -DFB6 1 -DFB7 1 -DFB8 1 -DFB9 1 -DFBA 1 -DFBB 1 -DFBC 1 -DFBD 1 -DFBE 1 -DFBF 1 -DROP TABLE IF EXISTS test.t1; diff --git a/mysql-test/suite/funcs_2/t/disabled.def b/mysql-test/suite/funcs_2/t/disabled.def index 8ca94961dd2..8b137891791 100644 --- a/mysql-test/suite/funcs_2/t/disabled.def +++ b/mysql-test/suite/funcs_2/t/disabled.def @@ -1,4 +1 @@ -# Should maybe be enabled, but ndb is not part of the ordinary build. -# Bernt M. Johnsen 2010-05-10 -ndb_charset : Bug#20447 Problem with prefix keys with contractions and expansions diff --git a/mysql-test/suite/funcs_2/t/ndb_charset.test b/mysql-test/suite/funcs_2/t/ndb_charset.test deleted file mode 100644 index 68665cc1ae5..00000000000 --- a/mysql-test/suite/funcs_2/t/ndb_charset.test +++ /dev/null @@ -1,14 +0,0 @@ -################################################################################ -# Author: Serge Kozlov # -# Date: 09/21/2005 # -# Purpose: Testing the charsets for NDB engine # -# # -# Checking of other prerequisites is in charset_master.test # -################################################################################ - ---source include/have_ndb.inc ---source include/not_embedded.inc - -let $engine_type= NDB; ---source suite/funcs_2/charset/charset_master.test - diff --git a/mysql-test/suite/innodb/t/innodb_bug42419.test b/mysql-test/suite/innodb/t/innodb_bug42419.test index 93c4764252a..46f357c1777 100644 --- a/mysql-test/suite/innodb/t/innodb_bug42419.test +++ b/mysql-test/suite/innodb/t/innodb_bug42419.test @@ -7,7 +7,7 @@ --source include/have_innodb.inc let $innodb_lock_wait_timeout= query_get_value(SHOW VARIABLES LIKE 'innodb_lock_wait_timeout%', Value, 1); -if (`SELECT $innodb_lock_wait_timeout < 10`) +if ($innodb_lock_wait_timeout < 10) { --echo # innodb_lock_wait_timeout must be >= 10 seconds --echo # so that this test can work all time fine on an overloaded testing box diff --git a/mysql-test/suite/large_tests/t/rpl_slave_net_timeout.test b/mysql-test/suite/large_tests/t/rpl_slave_net_timeout.test index 9a2cdc3b596..bfe7f712a20 100644 --- a/mysql-test/suite/large_tests/t/rpl_slave_net_timeout.test +++ b/mysql-test/suite/large_tests/t/rpl_slave_net_timeout.test @@ -79,3 +79,4 @@ set @@global.log_output = @save_log_output; connection slave; set @@global.slave_net_timeout = @save_slave_net_timeout; +--source include/rpl_end.inc diff --git a/mysql-test/suite/manual/t/rpl_replication_delay.test b/mysql-test/suite/manual/t/rpl_replication_delay.test index fc1db9bfe18..f2b2da6f53c 100644 --- a/mysql-test/suite/manual/t/rpl_replication_delay.test +++ b/mysql-test/suite/manual/t/rpl_replication_delay.test @@ -7,9 +7,8 @@ source include/master-slave.inc; -connection master; -#connection slave; -sync_slave_with_master; +connection slave; + --echo # Second_behind reports 0 let $status_items= Seconds_Behind_Master; source include/show_slave_status.inc; @@ -61,9 +60,4 @@ unlock tables; connection master; drop table t1; -#connection slave; -sync_slave_with_master; - - -# End of tests - +--source include/rpl_end.inc diff --git a/mysql-test/suite/ndb/my.cnf b/mysql-test/suite/ndb/my.cnf deleted file mode 100644 index 37dfc3945ce..00000000000 --- a/mysql-test/suite/ndb/my.cnf +++ /dev/null @@ -1,22 +0,0 @@ -!include include/default_mysqld.cnf -!include include/default_ndbd.cnf -!include include/default_client.cnf - -[cluster_config.1] -NoOfReplicas= 2 -ndbd=, -ndb_mgmd= -mysqld=, - -[mysqld] -# Make all mysqlds use cluster -ndbcluster - -[ENV] -NDB_CONNECTSTRING= @mysql_cluster.1.ndb_connectstring -MASTER_MYSOCK= @mysqld.1.1.socket -MASTER_MYPORT= @mysqld.1.1.port -MASTER_MYPORT1= @mysqld.2.1.port - -NDB_BACKUP_DIR= @cluster_config.ndbd.1.1.BackupDataDir - diff --git a/mysql-test/suite/ndb/r/loaddata_autocom_ndb.result b/mysql-test/suite/ndb/r/loaddata_autocom_ndb.result deleted file mode 100644 index b4d0b0b81a7..00000000000 --- a/mysql-test/suite/ndb/r/loaddata_autocom_ndb.result +++ /dev/null @@ -1,23 +0,0 @@ -SET SESSION STORAGE_ENGINE = ndbcluster; -drop table if exists t1; -create table t1 (id int unsigned not null auto_increment primary key, a text, b text); -start transaction; -load data infile 'LOAD_FILE' into table t1 fields terminated by ',' enclosed by '''' (a, b); -Warnings: -Warning 1261 Row 3 doesn't contain data for all columns -commit; -select count(*) from t1; -count(*) -4 -truncate table t1; -start transaction; -load data infile 'LOAD_FILE' into table t1 fields terminated by ',' enclosed by '''' (a, b); -Warnings: -Warning 1261 Row 3 doesn't contain data for all columns -rollback; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -select count(*) from t1; -count(*) -4 -drop table t1; diff --git a/mysql-test/suite/ndb/r/ndb_alter_table.result b/mysql-test/suite/ndb/r/ndb_alter_table.result deleted file mode 100644 index 35b983e1901..00000000000 --- a/mysql-test/suite/ndb/r/ndb_alter_table.result +++ /dev/null @@ -1,437 +0,0 @@ -DROP TABLE IF EXISTS t1, t2; -drop database if exists mysqltest; -CREATE TABLE t1 ( -a INT NOT NULL, -b INT NOT NULL -) ENGINE=ndbcluster; -INSERT INTO t1 VALUES (9410,9412); -ALTER TABLE t1 ADD COLUMN c int not null; -SELECT * FROM t1; -a b c -9410 9412 0 -DROP TABLE t1; -CREATE DATABASE mysqltest; -USE mysqltest; -CREATE TABLE t1 ( -a INT NOT NULL, -b INT NOT NULL -) ENGINE=ndbcluster; -RENAME TABLE t1 TO test.t1; -SHOW TABLES; -Tables_in_mysqltest -DROP DATABASE mysqltest; -USE test; -SHOW TABLES; -Tables_in_test -t1 -DROP TABLE t1; -create table t1 ( -col1 int not null auto_increment primary key, -col2 varchar(30) not null, -col3 varchar (20) not null, -col4 varchar(4) not null, -col5 enum('PENDING', 'ACTIVE', 'DISABLED') not null, -col6 int not null, to_be_deleted int) ENGINE=ndbcluster; -show table status; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster 10 Dynamic 0 # # # 0 # 1 # # # latin1_swedish_ci NULL # -SET SQL_MODE=NO_AUTO_VALUE_ON_ZERO; -insert into t1 values -(0,4,3,5,"PENDING",1,7),(NULL,4,3,5,"PENDING",1,7),(31,4,3,5,"PENDING",1,7), (7,4,3,5,"PENDING",1,7), (NULL,4,3,5,"PENDING",1,7), (100,4,3,5,"PENDING",1,7), (99,4,3,5,"PENDING",1,7), (8,4,3,5,"PENDING",1,7), (NULL,4,3,5,"PENDING",1,7); -show table status; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster 10 Dynamic 9 # # # 0 # 102 # # # latin1_swedish_ci NULL # -select * from t1 order by col1; -col1 col2 col3 col4 col5 col6 to_be_deleted -0 4 3 5 PENDING 1 7 -1 4 3 5 PENDING 1 7 -7 4 3 5 PENDING 1 7 -8 4 3 5 PENDING 1 7 -31 4 3 5 PENDING 1 7 -32 4 3 5 PENDING 1 7 -99 4 3 5 PENDING 1 7 -100 4 3 5 PENDING 1 7 -101 4 3 5 PENDING 1 7 -alter table t1 -add column col4_5 varchar(20) not null after col4, -add column col7 varchar(30) not null after col5, -add column col8 datetime not null, drop column to_be_deleted, -change column col2 fourth varchar(30) not null after col3, -modify column col6 int not null first; -show table status; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster 10 Dynamic 9 # # # 0 # 102 # # # latin1_swedish_ci NULL # -select * from t1 order by col1; -col6 col1 col3 fourth col4 col4_5 col5 col7 col8 -1 0 3 4 5 PENDING 0000-00-00 00:00:00 -1 1 3 4 5 PENDING 0000-00-00 00:00:00 -1 7 3 4 5 PENDING 0000-00-00 00:00:00 -1 8 3 4 5 PENDING 0000-00-00 00:00:00 -1 31 3 4 5 PENDING 0000-00-00 00:00:00 -1 32 3 4 5 PENDING 0000-00-00 00:00:00 -1 99 3 4 5 PENDING 0000-00-00 00:00:00 -1 100 3 4 5 PENDING 0000-00-00 00:00:00 -1 101 3 4 5 PENDING 0000-00-00 00:00:00 -insert into t1 values (2, NULL,4,3,5,99,"PENDING","EXTRA",'2004-01-01 00:00:00'); -show table status; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster 10 Dynamic 10 # # # 0 # 103 # # # latin1_swedish_ci NULL # -select * from t1 order by col1; -col6 col1 col3 fourth col4 col4_5 col5 col7 col8 -1 0 3 4 5 PENDING 0000-00-00 00:00:00 -1 1 3 4 5 PENDING 0000-00-00 00:00:00 -1 7 3 4 5 PENDING 0000-00-00 00:00:00 -1 8 3 4 5 PENDING 0000-00-00 00:00:00 -1 31 3 4 5 PENDING 0000-00-00 00:00:00 -1 32 3 4 5 PENDING 0000-00-00 00:00:00 -1 99 3 4 5 PENDING 0000-00-00 00:00:00 -1 100 3 4 5 PENDING 0000-00-00 00:00:00 -1 101 3 4 5 PENDING 0000-00-00 00:00:00 -2 102 4 3 5 99 PENDING EXTRA 2004-01-01 00:00:00 -delete from t1; -insert into t1 values (0,0,4,3,5,99,"PENDING","EXTRA",'2004-01-01 00:00:00'); -SET SQL_MODE=''; -insert into t1 values (1,0,4,3,5,99,"PENDING","EXTRA",'2004-01-01 00:00:00'); -select * from t1 order by col1; -col6 col1 col3 fourth col4 col4_5 col5 col7 col8 -0 0 4 3 5 99 PENDING EXTRA 2004-01-01 00:00:00 -1 103 4 3 5 99 PENDING EXTRA 2004-01-01 00:00:00 -alter table t1 drop column col4_5; -insert into t1 values (2,0,4,3,5,"PENDING","EXTRA",'2004-01-01 00:00:00'); -select * from t1 order by col1; -col6 col1 col3 fourth col4 col5 col7 col8 -0 0 4 3 5 PENDING EXTRA 2004-01-01 00:00:00 -1 103 4 3 5 PENDING EXTRA 2004-01-01 00:00:00 -2 104 4 3 5 PENDING EXTRA 2004-01-01 00:00:00 -drop table t1; -CREATE TABLE t1 ( -a INT NOT NULL, -b INT NOT NULL -) ENGINE=ndbcluster; -INSERT INTO t1 VALUES (9410,9412); -ALTER TABLE t1 ADD COLUMN c int not null; -select * from t1 order by a; -a b c -9410 9412 0 -select * from t1 order by a; -a b c -9410 9412 0 -alter table t1 drop c; -select * from t1 order by a; -a b -9410 9412 -drop table t1; -select * from t1 order by a; -ERROR 42S02: Table 'test.t1' doesn't exist -CREATE TABLE t1 ( -a INT NOT NULL PRIMARY KEY, -b INT NOT NULL -) ENGINE=ndbcluster; -INSERT INTO t1 VALUES (0,1),(17,18); -select * from t1 order by a; -a b -0 1 -17 18 -SET SQL_MODE=NO_AUTO_VALUE_ON_ZERO; -alter table t1 modify column a int not null auto_increment; -SET SQL_MODE=''; -select * from t1 order by a; -a b -0 1 -17 18 -INSERT INTO t1 VALUES (0,19),(20,21); -select * from t1 order by a; -a b -0 1 -17 18 -18 19 -20 21 -drop table t1; -CREATE TABLE t1 ( -a INT NOT NULL PRIMARY KEY, -b INT NOT NULL -) ENGINE=ndbcluster; -INSERT INTO t1 VALUES (0,1),(17,18); -select * from t1 order by a; -a b -0 1 -17 18 -alter table t1 add c int not null unique auto_increment; -select c from t1 order by c; -c -1 -2 -INSERT INTO t1 VALUES (1,2,0),(18,19,4),(20,21,0); -select c from t1 order by c; -c -1 -2 -3 -4 -5 -drop table t1; -create table t1 ( -ai bigint auto_increment, -c001 int(11) not null, -c002 int(11) not null, -c003 int(11) not null, -c004 int(11) not null, -c005 int(11) not null, -c006 int(11) not null, -c007 int(11) not null, -c008 int(11) not null, -c009 int(11) not null, -c010 int(11) not null, -c011 int(11) not null, -c012 int(11) not null, -c013 int(11) not null, -c014 int(11) not null, -c015 int(11) not null, -c016 int(11) not null, -c017 int(11) not null, -c018 int(11) not null, -c019 int(11) not null, -c020 int(11) not null, -c021 int(11) not null, -c022 int(11) not null, -c023 int(11) not null, -c024 int(11) not null, -c025 int(11) not null, -c026 int(11) not null, -c027 int(11) not null, -c028 int(11) not null, -c029 int(11) not null, -c030 int(11) not null, -c031 int(11) not null, -c032 int(11) not null, -c033 int(11) not null, -c034 int(11) not null, -c035 int(11) not null, -c036 int(11) not null, -c037 int(11) not null, -c038 int(11) not null, -c039 int(11) not null, -c040 int(11) not null, -c041 int(11) not null, -c042 int(11) not null, -c043 int(11) not null, -c044 int(11) not null, -c045 int(11) not null, -c046 int(11) not null, -c047 int(11) not null, -c048 int(11) not null, -c049 int(11) not null, -c050 int(11) not null, -c051 int(11) not null, -c052 int(11) not null, -c053 int(11) not null, -c054 int(11) not null, -c055 int(11) not null, -c056 int(11) not null, -c057 int(11) not null, -c058 int(11) not null, -c059 int(11) not null, -c060 int(11) not null, -c061 int(11) not null, -c062 int(11) not null, -c063 int(11) not null, -c064 int(11) not null, -c065 int(11) not null, -c066 int(11) not null, -c067 int(11) not null, -c068 int(11) not null, -c069 int(11) not null, -c070 int(11) not null, -c071 int(11) not null, -c072 int(11) not null, -c073 int(11) not null, -c074 int(11) not null, -c075 int(11) not null, -c076 int(11) not null, -c077 int(11) not null, -c078 int(11) not null, -c079 int(11) not null, -c080 int(11) not null, -c081 int(11) not null, -c082 int(11) not null, -c083 int(11) not null, -c084 int(11) not null, -c085 int(11) not null, -c086 int(11) not null, -c087 int(11) not null, -c088 int(11) not null, -c089 int(11) not null, -c090 int(11) not null, -c091 int(11) not null, -c092 int(11) not null, -c093 int(11) not null, -c094 int(11) not null, -c095 int(11) not null, -c096 int(11) not null, -c097 int(11) not null, -c098 int(11) not null, -c099 int(11) not null, -c100 int(11) not null, -c101 int(11) not null, -c102 int(11) not null, -c103 int(11) not null, -c104 int(11) not null, -c105 int(11) not null, -c106 int(11) not null, -c107 int(11) not null, -c108 int(11) not null, -c109 int(11) not null, -primary key (ai), -unique key tx1 (c002, c003, c004, c005)) engine=ndb; -create index tx2 -on t1 (c010, c011, c012, c013); -drop table t1; -CREATE TABLE t1 ( -auto int(5) unsigned NOT NULL auto_increment, -string char(10), -vstring varchar(10), -bin binary(2), -vbin varbinary(7), -tiny tinyint(4) DEFAULT '0' NOT NULL , -short smallint(6) DEFAULT '1' NOT NULL , -medium mediumint(8) DEFAULT '0' NOT NULL, -long_int int(11) DEFAULT '0' NOT NULL, -longlong bigint(13) DEFAULT '0' NOT NULL, -real_float float(13,1) DEFAULT 0.0 NOT NULL, -real_double double(16,4), -real_decimal decimal(16,4), -utiny tinyint(3) unsigned DEFAULT '0' NOT NULL, -ushort smallint(5) unsigned zerofill DEFAULT '00000' NOT NULL, -umedium mediumint(8) unsigned DEFAULT '0' NOT NULL, -ulong int(11) unsigned DEFAULT '0' NOT NULL, -ulonglong bigint(13) unsigned DEFAULT '0' NOT NULL, -bits bit(3), -options enum('zero','one','two','three','four') not null, -flags set('zero','one','two','three','four') not null, -date_field date, -year_field year, -time_field time, -date_time datetime, -time_stamp timestamp, -PRIMARY KEY (auto) -) engine=ndb; -CREATE TEMPORARY TABLE ndb_show_tables (id INT, type VARCHAR(20), state VARCHAR(20), logging VARCHAR(20), _database VARCHAR(255), _schema VARCHAR(20), name VARCHAR(255)); -LOAD DATA INFILE 'tmp.dat' INTO TABLE ndb_show_tables; -set @t1_id = (select id from ndb_show_tables where name like '%t1%'); -truncate ndb_show_tables; -alter table t1 change tiny new_tiny tinyint(4) DEFAULT '0' NOT NULL; -LOAD DATA INFILE 'tmp.dat' INTO TABLE ndb_show_tables; -select 'no_copy' from ndb_show_tables where id = @t1_id and name like '%t1%'; -no_copy -set @t1_id = (select id from ndb_show_tables where name like '%t1%'); -truncate ndb_show_tables; -create index i1 on t1(medium); -alter table t1 add index i2(new_tiny); -drop index i1 on t1; -LOAD DATA INFILE 'tmp.dat' INTO TABLE ndb_show_tables; -select 'no_copy' from ndb_show_tables where id = @t1_id and name like '%t1%'; -no_copy -no_copy -DROP TABLE t1, ndb_show_tables; -create table t1 (a int primary key auto_increment, b int) engine=ndb; -insert into t1 (b) values (101),(102),(103); -select * from t1 where a = 3; -a b -3 103 -alter table t1 rename t2; -insert into t2 (b) values (201),(202),(203); -select * from t2 where a = 6; -a b -6 203 -alter table t2 add c int; -insert into t2 (b) values (301),(302),(303); -select * from t2 where a = 9; -a b c -9 303 NULL -alter table t2 rename t1; -insert into t1 (b) values (401),(402),(403); -select * from t1 where a = 12; -a b c -12 403 NULL -drop table t1; -create table t1(a int not null) engine=ndb; -$PK Bigunsigned PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY -PRIMARY KEY($PK) - UniqueHashIndex -insert into t1 values (1),(2),(3); -alter table t1 add primary key (a); -a Int PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY -PRIMARY KEY(a) - UniqueHashIndex -PRIMARY(a) - OrderedIndex -update t1 set a = 17 where a = 1; -select * from t1 order by a; -a -2 -3 -17 -alter table t1 drop primary key; -$PK Bigunsigned PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY -PRIMARY KEY($PK) - UniqueHashIndex -update t1 set a = 1 where a = 17; -select * from t1 order by a; -a -1 -2 -3 -drop table t1; -create table t1(a int not null) engine=ndb; -$PK Bigunsigned PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY -PRIMARY KEY($PK) - UniqueHashIndex -insert into t1 values (1),(2),(3); -create unique index pk on t1(a); -a Int PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY -PRIMARY KEY(a) - UniqueHashIndex -update t1 set a = 17 where a = 1; -select * from t1 order by a; -a -2 -3 -17 -alter table t1 drop index pk; -$PK Bigunsigned PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY -PRIMARY KEY($PK) - UniqueHashIndex -update t1 set a = 1 where a = 17; -select * from t1 order by a; -a -1 -2 -3 -drop table t1; -create table t1 (a int not null primary key, b int not null default 0, c varchar(254)) engine=ndb; -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) NOT NULL, - `b` int(11) NOT NULL DEFAULT '0', - `c` varchar(254) DEFAULT NULL, - PRIMARY KEY (`a`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -alter table t1 alter b set default 1; -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) NOT NULL, - `b` int(11) NOT NULL DEFAULT '1', - `c` varchar(254) DEFAULT NULL, - PRIMARY KEY (`a`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -drop table t1; -create table t1 (a int not null, b int not null) engine=ndb; -insert into t1 values (1, 300), (2, 200), (3, 100); -select * from t1 order by a; -a b -1 300 -2 200 -3 100 -alter table t1 order by b; -select * from t1 order by b; -a b -3 100 -2 200 -1 300 -drop table t1; -End of 5.1 tests diff --git a/mysql-test/suite/ndb/r/ndb_alter_table2.result b/mysql-test/suite/ndb/r/ndb_alter_table2.result deleted file mode 100644 index 3783c76447c..00000000000 --- a/mysql-test/suite/ndb/r/ndb_alter_table2.result +++ /dev/null @@ -1,41 +0,0 @@ -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -a INT NOT NULL PRIMARY KEY, -b INT NOT NULL -) ENGINE=ndbcluster; -BEGIN; -INSERT INTO t1 VALUES (9410,9412); -BEGIN; -INSERT INTO t1 VALUES (9411,9412); -BEGIN; -INSERT INTO t1 VALUES (9412,9412); -BEGIN; -INSERT INTO t1 VALUES (9413,9412); -BEGIN; -INSERT INTO t1 VALUES (9414,9412); -BEGIN; -INSERT INTO t1 VALUES (9415,9412); -ROLLBACK; -ROLLBACK; -ROLLBACK; -ROLLBACK; -ROLLBACK; -ROLLBACK; -drop table t1; -CREATE TABLE t1 ( -a INT NOT NULL PRIMARY KEY, -b INT NOT NULL, -c INT NOT NULL -) ENGINE=ndbcluster; -select * from t1; -select * from t1; -a b c -select * from t1; -a b c -select * from t1; -a b c -select * from t1; -a b c -select * from t1; -a b c -drop table t1; diff --git a/mysql-test/suite/ndb/r/ndb_alter_table3.result b/mysql-test/suite/ndb/r/ndb_alter_table3.result deleted file mode 100644 index bf80d95bf82..00000000000 --- a/mysql-test/suite/ndb/r/ndb_alter_table3.result +++ /dev/null @@ -1,35 +0,0 @@ -DROP TABLE IF EXISTS t1; -create table t1 ( a int primary key, b varchar(10), c varchar(10), index (b) ) -engine=ndb; -insert into t1 values (1,'one','one'), (2,'two','two'), (3,'three','three'); -create index c on t1(c); -show indexes from t1; -Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment -t1 0 PRIMARY 1 a A 3 NULL NULL BTREE -t1 1 b 1 b A 3 NULL NULL YES BTREE -t1 1 c 1 c A 3 NULL NULL YES BTREE -select * from t1 where c = 'two'; -a b c -2 two two -alter table t1 drop index c; -show indexes from t1; -Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment -t1 0 PRIMARY 1 a A 3 NULL NULL BTREE -t1 1 b 1 b A 3 NULL NULL YES BTREE -select * from t1 where c = 'two'; -a b c -2 two two -drop table t1; -create table t3 (a int primary key) engine=ndbcluster; -begin; -insert into t3 values (1); -alter table t3 rename t4; -commit; -select * from t3; -ERROR 42S02: Table 'test.t3' doesn't exist -select * from t4; -a -1 -drop table t4; -show tables; -Tables_in_test diff --git a/mysql-test/suite/ndb/r/ndb_auto_increment.result b/mysql-test/suite/ndb/r/ndb_auto_increment.result deleted file mode 100644 index 78612b35113..00000000000 --- a/mysql-test/suite/ndb/r/ndb_auto_increment.result +++ /dev/null @@ -1,445 +0,0 @@ -DROP TABLE IF EXISTS t1,t2; -DROP TABLE IF EXISTS t1; -set @old_auto_increment_offset = @@session.auto_increment_offset; -set @old_auto_increment_increment = @@session.auto_increment_increment; -set @old_ndb_autoincrement_prefetch_sz = @@session.ndb_autoincrement_prefetch_sz; -flush status; -create table t1 (a int not null auto_increment primary key) engine ndb; -insert into t1 values (NULL); -select * from t1 order by a; -a -1 -update t1 set a = 5 where a = 1; -insert into t1 values (NULL); -select * from t1 order by a; -a -5 -6 -insert into t1 values (7); -insert into t1 values (NULL); -select * from t1 order by a; -a -5 -6 -7 -8 -insert into t1 values (2); -insert into t1 values (NULL); -select * from t1 order by a; -a -2 -5 -6 -7 -8 -9 -update t1 set a = 4 where a = 2; -insert into t1 values (NULL); -select * from t1 order by a; -a -4 -5 -6 -7 -8 -9 -10 -delete from t1 where a = 10; -insert into t1 values (NULL); -select * from t1 order by a; -a -4 -5 -6 -7 -8 -9 -11 -replace t1 values (NULL); -select * from t1 order by a; -a -4 -5 -6 -7 -8 -9 -11 -12 -replace t1 values (15); -select * from t1 order by a; -a -4 -5 -6 -7 -8 -9 -11 -12 -15 -replace into t1 values (NULL); -select * from t1 order by a; -a -4 -5 -6 -7 -8 -9 -11 -12 -15 -16 -replace t1 values (15); -select * from t1 order by a; -a -4 -5 -6 -7 -8 -9 -11 -12 -15 -16 -insert ignore into t1 values (NULL); -select * from t1 order by a; -a -4 -5 -6 -7 -8 -9 -11 -12 -15 -16 -17 -insert ignore into t1 values (15), (NULL); -select * from t1 order by a; -a -4 -5 -6 -7 -8 -9 -11 -12 -15 -16 -17 -18 -insert into t1 values (15) -on duplicate key update a = 20; -insert into t1 values (NULL); -select * from t1 order by a; -a -4 -5 -6 -7 -8 -9 -11 -12 -16 -17 -18 -20 -21 -insert into t1 values (NULL) on duplicate key update a = 30; -select * from t1 order by a; -a -4 -5 -6 -7 -8 -9 -11 -12 -16 -17 -18 -20 -21 -22 -insert into t1 values (30) on duplicate key update a = 40; -select * from t1 order by a; -a -4 -5 -6 -7 -8 -9 -11 -12 -16 -17 -18 -20 -21 -22 -30 -insert ignore into t1 values(600),(NULL),(NULL),(610),(NULL); -select * from t1 order by a; -a -4 -5 -6 -7 -8 -9 -11 -12 -16 -17 -18 -20 -21 -22 -30 -600 -601 -602 -610 -611 -drop table t1; -create table t1 (a int not null primary key, -b int not null unique auto_increment) engine ndb; -insert into t1 values (1, NULL); -insert into t1 values (3, NULL); -update t1 set b = 3 where a = 3; -insert into t1 values (4, NULL); -select * from t1 order by a; -a b -1 1 -3 3 -4 4 -drop table t1; -CREATE TABLE t1 ( -pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, -b INT NOT NULL, -c INT NOT NULL UNIQUE -) ENGINE=NDBCLUSTER; -CREATE TABLE t2 ( -pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, -b INT NOT NULL, -c INT NOT NULL UNIQUE -) ENGINE=MYISAM; -SET @@session.auto_increment_increment=10; -INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); -INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); -SELECT * FROM t1 ORDER BY pk; -pk b c -1 1 0 -11 2 1 -21 3 2 -SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; -COUNT(t1.pk) -3 -TRUNCATE t1; -TRUNCATE t2; -SET @@session.auto_increment_offset=5; -INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); -INSERT INTO t1 (pk,b,c) VALUES (27,4,3),(NULL,5,4),(99,6,5),(NULL,7,6); -INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); -INSERT INTO t2 (pk,b,c) VALUES (27,4,3),(NULL,5,4),(99,6,5),(NULL,7,6); -SELECT * FROM t1 ORDER BY pk; -pk b c -5 1 0 -15 2 1 -25 3 2 -27 4 3 -35 5 4 -99 6 5 -105 7 6 -SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; -COUNT(t1.pk) -7 -TRUNCATE t1; -TRUNCATE t2; -SET @@session.auto_increment_increment=2; -INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); -INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); -SELECT * FROM t1 ORDER BY pk; -pk b c -1 1 0 -3 2 1 -5 3 2 -SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; -COUNT(t1.pk) -3 -DROP TABLE t1, t2; -CREATE TABLE t1 ( -pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, -b INT NOT NULL, -c INT NOT NULL UNIQUE -) ENGINE=NDBCLUSTER AUTO_INCREMENT = 7; -CREATE TABLE t2 ( -pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, -b INT NOT NULL, -c INT NOT NULL UNIQUE -) ENGINE=MYISAM AUTO_INCREMENT = 7; -SET @@session.auto_increment_offset=1; -SET @@session.auto_increment_increment=1; -INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); -INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); -SELECT * FROM t1 ORDER BY pk; -pk b c -7 1 0 -8 2 1 -9 3 2 -SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; -COUNT(t1.pk) -3 -DROP TABLE t1, t2; -CREATE TABLE t1 ( -pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, -b INT NOT NULL, -c INT NOT NULL UNIQUE -) ENGINE=NDBCLUSTER AUTO_INCREMENT = 3; -CREATE TABLE t2 ( -pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, -b INT NOT NULL, -c INT NOT NULL UNIQUE -) ENGINE=MYISAM AUTO_INCREMENT = 3; -SET @@session.auto_increment_offset=5; -SET @@session.auto_increment_increment=10; -INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); -INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); -SELECT * FROM t1 ORDER BY pk; -pk b c -5 1 0 -15 2 1 -25 3 2 -SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; -COUNT(t1.pk) -3 -DROP TABLE t1, t2; -CREATE TABLE t1 ( -pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, -b INT NOT NULL, -c INT NOT NULL UNIQUE -) ENGINE=NDBCLUSTER AUTO_INCREMENT = 7; -CREATE TABLE t2 ( -pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, -b INT NOT NULL, -c INT NOT NULL UNIQUE -) ENGINE=MYISAM AUTO_INCREMENT = 7; -SET @@session.auto_increment_offset=5; -SET @@session.auto_increment_increment=10; -INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); -INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); -SELECT * FROM t1 ORDER BY pk; -pk b c -15 1 0 -25 2 1 -35 3 2 -SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; -COUNT(t1.pk) -3 -DROP TABLE t1, t2; -CREATE TABLE t1 ( -pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, -b INT NOT NULL, -c INT NOT NULL UNIQUE -) ENGINE=NDBCLUSTER AUTO_INCREMENT = 5; -CREATE TABLE t2 ( -pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, -b INT NOT NULL, -c INT NOT NULL UNIQUE -) ENGINE=MYISAM AUTO_INCREMENT = 5; -SET @@session.auto_increment_offset=5; -SET @@session.auto_increment_increment=10; -INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); -INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); -SELECT * FROM t1 ORDER BY pk; -pk b c -5 1 0 -15 2 1 -25 3 2 -SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; -COUNT(t1.pk) -3 -DROP TABLE t1, t2; -CREATE TABLE t1 ( -pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, -b INT NOT NULL, -c INT NOT NULL UNIQUE -) ENGINE=NDBCLUSTER AUTO_INCREMENT = 100; -CREATE TABLE t2 ( -pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, -b INT NOT NULL, -c INT NOT NULL UNIQUE -) ENGINE=MYISAM AUTO_INCREMENT = 100; -SET @@session.auto_increment_offset=5; -SET @@session.auto_increment_increment=10; -INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); -INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); -SELECT * FROM t1 ORDER BY pk; -pk b c -105 1 0 -115 2 1 -125 3 2 -SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; -COUNT(t1.pk) -3 -DROP TABLE t1, t2; -SET @@session.auto_increment_offset=1; -SET @@session.auto_increment_increment=1; -set ndb_autoincrement_prefetch_sz = 32; -drop table if exists t1; -SET @@session.auto_increment_offset=1; -SET @@session.auto_increment_increment=1; -set ndb_autoincrement_prefetch_sz = 32; -create table t1 (a int not null auto_increment primary key) engine ndb; -insert into t1 values (NULL); -insert into t1 values (NULL); -select * from t1 order by a; -a -1 -33 -insert into t1 values (20); -insert into t1 values (NULL); -select * from t1 order by a; -a -1 -20 -33 -34 -insert into t1 values (35); -insert into t1 values (NULL); -insert into t1 values (NULL); -ERROR 23000: Duplicate entry '35' for key 'PRIMARY' -select * from t1 order by a; -a -1 -20 -33 -34 -35 -65 -insert into t1 values (100); -insert into t1 values (NULL); -insert into t1 values (NULL); -select * from t1 order by a; -a -1 -20 -33 -34 -35 -65 -66 -100 -101 -set auto_increment_offset = @old_auto_increment_offset; -set auto_increment_increment = @old_auto_increment_increment; -set ndb_autoincrement_prefetch_sz = @old_ndb_autoincrement_prefetch_sz; -drop table t1; diff --git a/mysql-test/suite/ndb/r/ndb_autoinc.result b/mysql-test/suite/ndb/r/ndb_autoinc.result deleted file mode 100644 index fe9d36393ad..00000000000 --- a/mysql-test/suite/ndb/r/ndb_autoinc.result +++ /dev/null @@ -1,37 +0,0 @@ -DROP TABLE IF EXISTS t1,t2,t3; -USE test; -CREATE TABLE t1 ( -id INT AUTO_INCREMENT, -PRIMARY KEY(id) -) ENGINE=NDBCLUSTER; -CREATE TABLE t2 ( -id INT AUTO_INCREMENT, -KEY(id) -) ENGINE=NDBCLUSTER; -ERROR HY000: Can't create table 'test.t2' (errno: 4335) -SHOW TABLES; -Tables_in_test -t1 -CREATE TABLE t3 ( -id INT AUTO_INCREMENT, -KEY(id) -) ENGINE=MYISAM; -ALTER TABLE t3 -ENGINE NDBCLUSTER; -SHOW CREATE TABLE t3; -Table Create Table -t3 CREATE TABLE `t3` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - KEY `id` (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -ALTER TABLE t3 -ADD PRIMARY KEY (id); -SHOW CREATE TABLE t3; -Table Create Table -t3 CREATE TABLE `t3` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - PRIMARY KEY (`id`), - KEY `id` (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -DROP TABLE t1, t3; -End of 5.1 tests diff --git a/mysql-test/suite/ndb/r/ndb_basic.result b/mysql-test/suite/ndb/r/ndb_basic.result deleted file mode 100644 index 8cb86fb4c2b..00000000000 --- a/mysql-test/suite/ndb/r/ndb_basic.result +++ /dev/null @@ -1,930 +0,0 @@ -DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; -drop database if exists mysqltest; -CREATE TABLE t1 ( -pk1 INT NOT NULL PRIMARY KEY, -attr1 INT NOT NULL, -attr2 INT, -attr3 VARCHAR(10) -) ENGINE=ndbcluster; -drop table t1; -SHOW GLOBAL STATUS LIKE 'ndb%'; -Variable_name Value -Ndb_cluster_node_id # -Ndb_config_from_host # -Ndb_config_from_port # -Ndb_number_of_data_nodes # -SHOW GLOBAL VARIABLES LIKE 'ndb%'; -Variable_name Value -ndb_autoincrement_prefetch_sz # -ndb_cache_check_time # -ndb_connectstring # -ndb_distribution # -ndb_extra_logging # -ndb_force_send # -ndb_index_stat_cache_entries # -ndb_index_stat_enable # -ndb_index_stat_update_freq # -ndb_mgmd_host # -ndb_nodeid # -ndb_optimized_node_selection # -ndb_report_thresh_binlog_epoch_slip # -ndb_report_thresh_binlog_mem_usage # -ndb_use_copying_alter_table # -ndb_use_exact_count # -ndb_use_transactions # -CREATE TABLE t1 ( -pk1 INT NOT NULL PRIMARY KEY, -attr1 INT NOT NULL, -attr2 INT, -attr3 VARCHAR(10) -) ENGINE=ndbcluster; -SHOW INDEX FROM t1; -Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment -t1 0 PRIMARY 1 pk1 A 0 NULL NULL BTREE -INSERT INTO t1 VALUES (9410,9412, NULL, '9412'), (9411,9413, 17, '9413'); -SHOW INDEX FROM t1; -Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment -t1 0 PRIMARY 1 pk1 A 2 NULL NULL BTREE -SELECT pk1 FROM t1 ORDER BY pk1; -pk1 -9410 -9411 -SELECT * FROM t1 ORDER BY pk1; -pk1 attr1 attr2 attr3 -9410 9412 NULL 9412 -9411 9413 17 9413 -SELECT t1.* FROM t1 ORDER BY pk1; -pk1 attr1 attr2 attr3 -9410 9412 NULL 9412 -9411 9413 17 9413 -UPDATE t1 SET attr1=1 WHERE pk1=9410; -SELECT * FROM t1 ORDER BY pk1; -pk1 attr1 attr2 attr3 -9410 1 NULL 9412 -9411 9413 17 9413 -UPDATE t1 SET pk1=2 WHERE attr1=1; -SELECT * FROM t1 ORDER BY pk1; -pk1 attr1 attr2 attr3 -2 1 NULL 9412 -9411 9413 17 9413 -UPDATE t1 SET pk1=pk1 + 1; -SELECT * FROM t1 ORDER BY pk1; -pk1 attr1 attr2 attr3 -3 1 NULL 9412 -9412 9413 17 9413 -UPDATE t1 SET pk1=4 WHERE pk1 = 3; -SELECT * FROM t1 ORDER BY pk1; -pk1 attr1 attr2 attr3 -4 1 NULL 9412 -9412 9413 17 9413 -DELETE FROM t1; -SELECT * FROM t1; -pk1 attr1 attr2 attr3 -INSERT INTO t1 VALUES (9410,9412, NULL, '9412'), (9408, 8765, NULL, '8765'), -(7,8, NULL, NULL), (8,9, NULL, NULL), (9,10, NULL, NULL), (10,11, NULL, NULL), (11,12, NULL, NULL), (12,13, NULL, NULL), (13,14, NULL, NULL); -UPDATE t1 SET attr1 = 9999; -SELECT * FROM t1 ORDER BY pk1; -pk1 attr1 attr2 attr3 -7 9999 NULL NULL -8 9999 NULL NULL -9 9999 NULL NULL -10 9999 NULL NULL -11 9999 NULL NULL -12 9999 NULL NULL -13 9999 NULL NULL -9408 9999 NULL 8765 -9410 9999 NULL 9412 -UPDATE t1 SET attr1 = 9998 WHERE pk1 < 1000; -SELECT * FROM t1 ORDER BY pk1; -pk1 attr1 attr2 attr3 -7 9998 NULL NULL -8 9998 NULL NULL -9 9998 NULL NULL -10 9998 NULL NULL -11 9998 NULL NULL -12 9998 NULL NULL -13 9998 NULL NULL -9408 9999 NULL 8765 -9410 9999 NULL 9412 -UPDATE t1 SET attr1 = 9997 WHERE attr1 = 9999; -SELECT * FROM t1 ORDER BY pk1; -pk1 attr1 attr2 attr3 -7 9998 NULL NULL -8 9998 NULL NULL -9 9998 NULL NULL -10 9998 NULL NULL -11 9998 NULL NULL -12 9998 NULL NULL -13 9998 NULL NULL -9408 9997 NULL 8765 -9410 9997 NULL 9412 -DELETE FROM t1 WHERE pk1 = 9410; -SELECT * FROM t1 ORDER BY pk1; -pk1 attr1 attr2 attr3 -7 9998 NULL NULL -8 9998 NULL NULL -9 9998 NULL NULL -10 9998 NULL NULL -11 9998 NULL NULL -12 9998 NULL NULL -13 9998 NULL NULL -9408 9997 NULL 8765 -DELETE FROM t1; -SELECT * FROM t1; -pk1 attr1 attr2 attr3 -INSERT INTO t1 values (1, 4, NULL, NULL), (2, 4, NULL, NULL), (3, 5, NULL, NULL), (4, 4, NULL, NULL), (5, 5, NULL, NULL); -DELETE FROM t1 WHERE attr1=4; -SELECT * FROM t1 order by pk1; -pk1 attr1 attr2 attr3 -3 5 NULL NULL -5 5 NULL NULL -DELETE FROM t1; -INSERT INTO t1 VALUES (9410,9412, NULL, NULL), (9411, 9413, NULL, NULL); -DELETE FROM t1 WHERE pk1 = 9410; -SELECT * FROM t1; -pk1 attr1 attr2 attr3 -9411 9413 NULL NULL -DROP TABLE t1; -CREATE TABLE t1 (id INT, id2 int) engine=ndbcluster; -INSERT INTO t1 values(3456, 7890); -SELECT * FROM t1; -id id2 -3456 7890 -UPDATE t1 SET id=2 WHERE id2=12; -SELECT * FROM t1; -id id2 -3456 7890 -UPDATE t1 SET id=1234 WHERE id2=7890; -SELECT * FROM t1; -id id2 -1234 7890 -DELETE FROM t1; -INSERT INTO t1 values(3456, 7890), (3456, 7890), (3456, 7890), (3454, 7890); -SELECT * FROM t1 ORDER BY id; -id id2 -3454 7890 -3456 7890 -3456 7890 -3456 7890 -DELETE FROM t1 WHERE id = 3456; -SELECT * FROM t1 ORDER BY id; -id id2 -3454 7890 -DROP TABLE t1; -CREATE TABLE t1 ( -pk1 INT NOT NULL PRIMARY KEY, -attr1 INT NOT NULL -) ENGINE=NDBCLUSTER; -INSERT INTO t1 values(1, 9999); -DROP TABLE t1; -CREATE TABLE t1 ( -pk1 INT NOT NULL PRIMARY KEY, -attr1 INT NOT NULL -) ENGINE=NDB; -INSERT INTO t1 values(1, 9999); -DROP TABLE t1; -CREATE TABLE t2 ( -a bigint unsigned NOT NULL PRIMARY KEY, -b int unsigned not null, -c int unsigned -) engine=ndbcluster; -CREATE TABLE t3 ( -a bigint unsigned NOT NULL, -b bigint unsigned not null, -c bigint unsigned, -PRIMARY KEY(a) -) engine=ndbcluster; -CREATE TABLE t4 ( -a bigint unsigned NOT NULL, -b bigint unsigned not null, -c bigint unsigned NOT NULL, -d int unsigned, -PRIMARY KEY(a, b, c) -) engine=ndbcluster; -select * from t2 where a = 7 order by b; -a b c -7 16 5 -select * from t2 where a = 7 order by a; -a b c -7 16 5 -select * from t2 where a = 7 order by 2; -a b c -7 16 5 -select * from t2 where a = 7 order by c; -a b c -7 16 5 -select * from t2 where a = 7 and b = 16 order by b; -a b c -7 16 5 -select * from t2 where a = 7 and b = 16 order by a; -a b c -7 16 5 -select * from t2 where a = 7 and b = 17 order by a; -a b c -select * from t2 where a = 7 and b != 16 order by b; -a b c -select * from t2 where a = 7 and b = 16 and c = 5 order by b; -a b c -7 16 5 -select * from t2 where a = 7 and b = 16 and c = 5 order by a; -a b c -7 16 5 -select * from t2 where a = 7 and b = 16 and c = 6 order by a; -a b c -select * from t2 where a = 7 and b != 16 and c = 5 order by b; -a b c -select * from t3 where a = 7 order by b; -a b c -7 16 5 -select * from t3 where a = 7 order by a; -a b c -7 16 5 -select * from t3 where a = 7 order by 2; -a b c -7 16 5 -select * from t3 where a = 7 order by c; -a b c -7 16 5 -select * from t3 where a = 7 and b = 16 order by b; -a b c -7 16 5 -select * from t3 where a = 7 and b = 16 order by a; -a b c -7 16 5 -select * from t3 where a = 7 and b = 17 order by a; -a b c -select * from t3 where a = 7 and b != 16 order by b; -a b c -select * from t4 where a = 7 order by b; -a b c d -7 16 5 26007 -select * from t4 where a = 7 order by a; -a b c d -7 16 5 26007 -select * from t4 where a = 7 order by 2; -a b c d -7 16 5 26007 -select * from t4 where a = 7 order by c; -a b c d -7 16 5 26007 -select * from t4 where a = 7 and b = 16 order by b; -a b c d -7 16 5 26007 -select * from t4 where a = 7 and b = 16 order by a; -a b c d -7 16 5 26007 -select * from t4 where a = 7 and b = 17 order by a; -a b c d -select * from t4 where a = 7 and b != 16 order by b; -a b c d -delete from t2 where a > 5; -select x1.a, x1.b from t2 x1, t2 x2 where x1.b = x2.b order by x1.a; -a b -1 10 -3 12 -5 14 -select a, b FROM t2 outer_table where -a = (select a from t2 where b = outer_table.b ) order by a; -a b -1 10 -3 12 -5 14 -delete from t2; -delete from t3; -delete from t4; -drop table t2; -drop table t3; -drop table t4; -CREATE TABLE t5 ( -a bigint unsigned NOT NULL, -b bigint unsigned not null, -c bigint unsigned NOT NULL, -d int unsigned, -PRIMARY KEY(a, b, c) -) engine=ndbcluster; -insert into t5 values(10, 19, 5, 26010); -delete from t5 where a=10 and b=19 and c=5; -select * from t5; -a b c d -insert into t5 values(10, 19, 5, 26010); -update t5 set d=21997 where a=10 and b=19 and c=5; -select * from t5; -a b c d -10 19 5 21997 -delete from t5; -drop table t5; -CREATE TABLE t6 ( -adress char(255), -a int NOT NULL PRIMARY KEY, -b int -) engine = NDB; -insert into t6 values -("Nice road 3456", 1, 23), -("Street Road 78", 3, 92), -("Road street 89C", 5, 71), -(NULL, 7, NULL); -select * from t6 order by a; -adress a b -Nice road 3456 1 23 -Street Road 78 3 92 -Road street 89C 5 71 -NULL 7 NULL -select a, b from t6 order by a; -a b -1 23 -3 92 -5 71 -7 NULL -update t6 set adress="End of road 09" where a=3; -update t6 set b=181, adress="Street 76" where a=7; -select * from t6 order by a; -adress a b -Nice road 3456 1 23 -End of road 09 3 92 -Road street 89C 5 71 -Street 76 7 181 -select * from t6 where a=1; -adress a b -Nice road 3456 1 23 -delete from t6 where a=1; -select * from t6 order by a; -adress a b -End of road 09 3 92 -Road street 89C 5 71 -Street 76 7 181 -delete from t6 where b=71; -select * from t6 order by a; -adress a b -End of road 09 3 92 -Street 76 7 181 -drop table t6; -CREATE TABLE t7 ( -adress char(255), -a int NOT NULL, -b int, -c int NOT NULL, -PRIMARY KEY(a, c) -) engine = NDB; -insert into t7 values -("Highway 3456", 1, 23, 2), -("Street Road 78", 3, 92, 3), -("Main street 89C", 5, 71, 4), -(NULL, 8, NULL, 12); -select * from t7 order by a; -adress a b c -Highway 3456 1 23 2 -Street Road 78 3 92 3 -Main street 89C 5 71 4 -NULL 8 NULL 12 -select a, b from t7 order by a; -a b -1 23 -3 92 -5 71 -8 NULL -update t7 set adress="End of road 09" where a=3; -update t7 set adress="Gatuvägen 90C" where a=5 and c=4; -update t7 set adress="No adress" where adress is NULL; -select * from t7 order by a; -adress a b c -Highway 3456 1 23 2 -End of road 09 3 92 3 -Gatuvägen 90C 5 71 4 -No adress 8 NULL 12 -select * from t7 where a=1 and c=2; -adress a b c -Highway 3456 1 23 2 -delete from t7 where a=1; -delete from t7 where a=3 and c=3; -delete from t7 where a=5 and c=4; -select * from t7; -adress a b c -No adress 8 NULL 12 -delete from t7 where b=23; -select * from t7; -adress a b c -No adress 8 NULL 12 -drop table t7; -CREATE TABLE t1 ( -pk1 INT NOT NULL PRIMARY KEY, -attr1 INT NOT NULL, -attr2 INT, -attr3 VARCHAR(10) -) ENGINE=ndbcluster; -INSERT INTO t1 VALUES (9410,9412, NULL, '9412'), (9411,9413, 17, '9413'); -create database mysqltest; -use mysqltest; -CREATE TABLE t2 ( -a bigint unsigned NOT NULL PRIMARY KEY, -b int unsigned not null, -c int unsigned -) engine=ndbcluster; -insert into t2 select pk1,attr1,attr2 from test.t1; -select * from t2 order by a; -a b c -9410 9412 NULL -9411 9413 17 -select b from test.t1, t2 where c = test.t1.attr2; -b -9413 -select b,test.t1.attr1 from test.t1, t2 where test.t1.pk1 < a; -b attr1 -9413 9412 -drop table test.t1, t2; -drop database mysqltest; -drop database if exists ndbtest1; -create database ndbtest1; -use ndbtest1; -create table t1(id int) engine=ndbcluster; -drop database ndbtest1; -drop database ndbtest1; -ERROR HY000: Can't drop database 'ndbtest1'; database doesn't exist -use test; -create table t1 (a int primary key, b char(0)); -insert into t1 values (1,""); -insert into t1 values (2,NULL); -select * from t1 order by a; -a b -1 -2 NULL -select * from t1 order by b; -a b -2 NULL -1 -select * from t1 where b IS NULL; -a b -2 NULL -select * from t1 where b IS NOT NULL; -a b -1 -drop table t1; -create table t1 ( -c1 int, -c2 int, -c3 int, -c4 int, -c5 int, -c6 int, -c7 int, -c8 int, -c9 int, -c10 int, -c11 int, -c12 int, -c13 int, -c14 int, -c15 int, -c16 int, -c17 int, -c18 int, -c19 int, -c20 int, -c21 int, -c22 int, -c23 int, -c24 int, -c25 int, -c26 int, -c27 int, -c28 int, -c29 int, -c30 int, -c31 int, -c32 int, -c33 int, -c34 int, -c35 int, -c36 int, -c37 int, -c38 int, -c39 int, -c40 int, -c41 int, -c42 int, -c43 int, -c44 int, -c45 int, -c46 int, -c47 int, -c48 int, -c49 int, -c50 int, -c51 int, -c52 int, -c53 int, -c54 int, -c55 int, -c56 int, -c57 int, -c58 int, -c59 int, -c60 int, -c61 int, -c62 int, -c63 int, -c64 int, -c65 int, -c66 int, -c67 int, -c68 int, -c69 int, -c70 int, -c71 int, -c72 int, -c73 int, -c74 int, -c75 int, -c76 int, -c77 int, -c78 int, -c79 int, -c80 int, -c81 int, -c82 int, -c83 int, -c84 int, -c85 int, -c86 int, -c87 int, -c88 int, -c89 int, -c90 int, -c91 int, -c92 int, -c93 int, -c94 int, -c95 int, -c96 int, -c97 int, -c98 int, -c99 int, -c100 int, -c101 int, -c102 int, -c103 int, -c104 int, -c105 int, -c106 int, -c107 int, -c108 int, -c109 int, -c110 int, -c111 int, -c112 int, -c113 int, -c114 int, -c115 int, -c116 int, -c117 int, -c118 int, -c119 int, -c120 int, -c121 int, -c122 int, -c123 int, -c124 int, -c125 int, -c126 int, -c127 int, -c128 int, -primary key using hash(c1)) engine=ndb partition by key(c1); -drop table t1; -create table t1 ( -a1234567890123456789012345678901234567890 int primary key, -a12345678901234567890123456789a1234567890 int, -index(a12345678901234567890123456789a1234567890) -) engine=ndb; -show tables; -Tables_in_test -t1 -insert into t1 values (1,1),(2,1),(3,1),(4,1),(5,2),(6,1),(7,1); -explain select * from t1 where a12345678901234567890123456789a1234567890=2; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref a12345678901234567890123456789a1234567890 a12345678901234567890123456789a1234567890 5 const # Using where with pushed condition -select * from t1 where a12345678901234567890123456789a1234567890=2; -a1234567890123456789012345678901234567890 a12345678901234567890123456789a1234567890 -5 2 -drop table t1; -create table t1 -(a bigint, b bigint, c bigint, d bigint, -primary key (a,b,c,d)) -engine=ndb -max_rows=800000000; -Warnings: -Warning 1105 Ndb might have problems storing the max amount of rows specified -insert into t1 values -(1,2,3,4),(2,3,4,5),(3,4,5,6), -(3,2,3,4),(1,3,4,5),(2,4,5,6), -(1,2,3,5),(2,3,4,8),(3,4,5,9), -(3,2,3,5),(1,3,4,8),(2,4,5,9), -(1,2,3,6),(2,3,4,6),(3,4,5,7), -(3,2,3,6),(1,3,4,6),(2,4,5,7), -(1,2,3,7),(2,3,4,7),(3,4,5,8), -(3,2,3,7),(1,3,4,7),(2,4,5,8), -(1,3,3,4),(2,4,4,5),(3,5,5,6), -(3,3,3,4),(1,4,4,5),(2,5,5,6), -(1,3,3,5),(2,4,4,8),(3,5,5,9), -(3,3,3,5),(1,4,4,8),(2,5,5,9), -(1,3,3,6),(2,4,4,6),(3,5,5,7), -(3,3,3,6),(1,4,4,6),(2,5,5,7), -(1,3,3,7),(2,4,4,7),(3,5,5,8), -(3,3,3,7),(1,4,4,7),(2,5,5,8); -select count(*) from t1; -count(*) -48 -drop table t1; -create table t1 -(a bigint, b bigint, c bigint, d bigint, -primary key (a)) -engine=ndb -max_rows=1; -drop table t1; -create table t1 -(counter int(64) NOT NULL auto_increment, -datavalue char(40) default 'XXXX', -primary key (counter) -) ENGINE=ndbcluster; -insert into t1 (datavalue) values ('newval'); -insert into t1 (datavalue) values ('newval'); -select * from t1 order by counter; -counter datavalue -1 newval -2 newval -insert into t1 (datavalue) select datavalue from t1 where counter < 100; -insert into t1 (datavalue) select datavalue from t1 where counter < 100; -select * from t1 order by counter; -counter datavalue -1 newval -2 newval -3 newval -4 newval -5 newval -6 newval -7 newval -8 newval -insert into t1 (datavalue) select datavalue from t1 where counter < 100; -insert into t1 (datavalue) select datavalue from t1 where counter < 100; -select * from t1 order by counter; -counter datavalue -1 newval -2 newval -3 newval -4 newval -5 newval -6 newval -7 newval -8 newval -9 newval -10 newval -11 newval -12 newval -13 newval -14 newval -15 newval -16 newval -17 newval -18 newval -19 newval -20 newval -21 newval -22 newval -23 newval -24 newval -25 newval -26 newval -27 newval -28 newval -29 newval -30 newval -31 newval -32 newval -drop table t1; -create table t1 (a int primary key auto_increment) engine = ndb; -insert into t1() values (),(),(),(),(),(),(),(),(),(),(),(); -insert into t1(a) values (20),(28); -insert into t1() values (),(),(),(),(),(),(),(),(),(),(),(); -insert into t1() values (21), (22); -drop table t1; -CREATE TABLE t1 ( b INT ) PACK_KEYS = 0 ENGINE = ndb; -select * from t1; -b -drop table t1; -create table t1 (a int) engine=ndb; -create table t2 (a int) engine=ndb; -insert into t1 values (1); -insert into t2 values (1); -delete t1.* from t1, t2 where t1.a = t2.a; -select * from t1; -a -select * from t2; -a -1 -drop table t1; -drop table t2; -CREATE TABLE t1 ( -i INT, -j INT, -x INT, -y INT, -z INT -) engine=ndb; -CREATE TABLE t2 ( -i INT, -k INT, -x INT, -y INT, -z INT -) engine=ndb; -CREATE TABLE t3 ( -j INT, -k INT, -x INT, -y INT, -z INT -) engine=ndb; -INSERT INTO t1 VALUES ( 1, 2,13,14,15); -INSERT INTO t2 VALUES ( 1, 3,23,24,25); -INSERT INTO t3 VALUES ( 2, 3, 1,34,35), ( 2, 3, 1,34,36); -UPDATE t1 AS a -INNER JOIN t2 AS b -ON a.i = b.i -INNER JOIN t3 AS c -ON a.j = c.j AND b.k = c.k -SET a.x = b.x, -a.y = b.y, -a.z = ( -SELECT sum(z) -FROM t3 -WHERE y = 34 -) -WHERE b.x = 23; -select * from t1; -i j x y z -1 2 23 24 71 -drop table t1; -drop table t2; -drop table t3; -create table atablewithareallylongandirritatingname (a int); -insert into atablewithareallylongandirritatingname values (2); -select * from atablewithareallylongandirritatingname; -a -2 -drop table atablewithareallylongandirritatingname; -create table t1 (f1 varchar(50), f2 text,f3 int, primary key(f1)) engine=NDB; -insert into t1 (f1,f2,f3)VALUES("111111","aaaaaa",1); -insert into t1 (f1,f2,f3)VALUES("222222","bbbbbb",2); -select * from t1 order by f1; -f1 f2 f3 -111111 aaaaaa 1 -222222 bbbbbb 2 -select * from t1 order by f2; -f1 f2 f3 -111111 aaaaaa 1 -222222 bbbbbb 2 -select * from t1 order by f3; -f1 f2 f3 -111111 aaaaaa 1 -222222 bbbbbb 2 -drop table t1; -Illegal ndb error code: 1186 -MySQL error code 1186 (ER_FLUSH_MASTER_BINLOG_CLOSED): Binlog closed, cannot RESET MASTER -CREATE TABLE t1 ( -a VARBINARY(40) NOT NULL, -b VARCHAR (256) CHARACTER SET UTF8 NOT NULL, -c VARCHAR(256) CHARACTER SET UTF8 NOT NULL, -PRIMARY KEY (b,c)) ENGINE=ndbcluster; -INSERT INTO t1 VALUES -("a","ab","abc"),("b","abc","abcd"),("c","abc","ab"),("d","ab","ab"),("e","abc","abc"); -SELECT * FROM t1 ORDER BY a; -a b c -a ab abc -b abc abcd -c abc ab -d ab ab -e abc abc -DROP TABLE t1; -create table t1 (a int not null primary key, b int not null) engine=ndb; -create table t2 (a int not null primary key, b int not null) engine=ndb; -insert into t1 values (1,10), (2,20), (3,30); -insert into t2 values (1,10), (2,20), (3,30); -select * from t1 order by a; -a b -1 10 -2 20 -3 30 -delete from t1 where a > 0 order by a desc limit 1; -select * from t1 order by a; -a b -1 10 -2 20 -delete from t1,t2 using t1,t2 where t1.a = t2.a; -select * from t2 order by a; -a b -3 30 -drop table t1,t2; -create table t1 (a int not null primary key, b int not null) engine=ndb; -insert into t1 values (1,10), (2,20), (3,30); -insert into t1 set a=1, b=100; -ERROR 23000: Duplicate entry '1' for key 'PRIMARY' -insert ignore into t1 set a=1, b=100; -select * from t1 order by a; -a b -1 10 -2 20 -3 30 -insert into t1 set a=1, b=1000 on duplicate key update b=b+1; -select * from t1 order by a; -a b -1 11 -2 20 -3 30 -drop table t1; -create table t1 (a int not null primary key, b int not null) engine=ndb; -create table t2 (c int not null primary key, d int not null) engine=ndb; -insert into t1 values (1,10), (2,10), (3,30), (4, 30); -insert into t2 values (1,10), (2,10), (3,30), (4, 30); -update t1 set a = 1 where a = 3; -ERROR 23000: Duplicate entry '1' for key 'PRIMARY' -select * from t1 order by a; -a b -1 10 -2 10 -3 30 -4 30 -update t1 set b = 1 where a > 1 order by a desc limit 1; -select * from t1 order by a; -a b -1 10 -2 10 -3 30 -4 1 -update t1,t2 set a = 1, c = 1 where a = 3 and c = 3; -ERROR 23000: Duplicate entry '1' for key 'PRIMARY' -select * from t1 order by a; -a b -1 10 -2 10 -3 30 -4 1 -update ignore t1,t2 set a = 1, c = 1 where a = 3 and c = 3; -select * from t1 order by a; -a b -1 10 -2 10 -3 30 -4 1 -drop table t1,t2; -create table t1 (a varchar(100) primary key, b varchar(100)) engine = NDB; -insert into t1 values -('a', 'a'),('b','b'),('c', 'c'),('aa', 'aa'),('bb', 'bb'),('cc', 'cc'); -replace into t1 values ('a', '-a'); -replace into t1 values ('b', '-b'); -replace into t1 values ('c', '-c'); -replace into t1 values ('aa', '-aa'); -replace into t1 values ('bb', '-bb'); -replace into t1 values ('cc', '-cc'); -replace into t1 values ('aaa', '-aaa'); -replace into t1 values ('bbb', '-bbb'); -replace into t1 values ('ccc', '-ccc'); -select * from t1 order by 1,2; -a b -a -a -aa -aa -aaa -aaa -b -b -bb -bb -bbb -bbb -c -c -cc -cc -ccc -ccc -drop table t1; -End of 5.0 tests -CREATE TABLE t1 (a VARCHAR(255) NOT NULL, -CONSTRAINT pk_a PRIMARY KEY (a))engine=ndb; -CREATE TABLE t2(a VARCHAR(255) NOT NULL, -b VARCHAR(255) NOT NULL, -c VARCHAR(255) NOT NULL, -CONSTRAINT pk_b_c_id PRIMARY KEY (b,c), -CONSTRAINT fk_a FOREIGN KEY(a) REFERENCES t1(a))engine=ndb; -drop table t1, t2; -create table t1 (a int not null primary key, b int) engine=ndb; -insert into t1 values(1,1),(2,2),(3,3); -create table t2 like t1; -insert into t2 select * from t1; -select * from t1 order by a; -a b -1 1 -2 2 -3 3 -select * from t2 order by a; -a b -1 1 -2 2 -3 3 -drop table t1, t2; -create table t1 (a int not null primary key, b int not null default 0, c varchar(254)) engine=ndb; -create table if not exists t1 (a int not null primary key, b int not null default 0, c varchar(254)) engine=ndb; -create table t2 like t1; -rename table t1 to t10, t2 to t20; -drop table t10,t20; -End of 5.1 tests diff --git a/mysql-test/suite/ndb/r/ndb_binlog_basic.result b/mysql-test/suite/ndb/r/ndb_binlog_basic.result deleted file mode 100644 index 09edd78bdb3..00000000000 --- a/mysql-test/suite/ndb/r/ndb_binlog_basic.result +++ /dev/null @@ -1,48 +0,0 @@ -drop table if exists t1, t2; -drop database if exists mysqltest; -create database mysqltest; -use mysqltest; -drop database mysqltest; -use test; -create table t1 (a int primary key) engine=ndb; -insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); -select @max_epoch:=max(epoch)-1 from mysql.ndb_binlog_index; -@max_epoch:=max(epoch)-1 -# -delete from t1; -alter table t1 add (b int); -insert into t1 values (3,3),(4,4); -alter table t1 rename t2; -begin; -insert into t2 values (1,1),(2,2); -update t2 set b=1 where a=3; -delete from t2 where a=4; -commit; -drop table t2; -select inserts from mysql.ndb_binlog_index where epoch > @max_epoch and inserts > 5; -inserts -10 -select deletes from mysql.ndb_binlog_index where epoch > @max_epoch and deletes > 5; -deletes -10 -select inserts,updates,deletes from -mysql.ndb_binlog_index where epoch > @max_epoch and updates > 0; -inserts updates deletes -2 1 1 -flush logs; -purge master logs before now(); -create table t1 (a int primary key, b int) engine=ndb; -create database mysqltest; -use mysqltest; -create table t1 (c int, d int primary key) engine=ndb; -use test; -insert into mysqltest.t1 values (2,1),(2,2); -select @max_epoch:=max(epoch)-1 from mysql.ndb_binlog_index; -@max_epoch:=max(epoch)-1 -# -drop table t1; -drop database mysqltest; -select inserts,updates,deletes from -mysql.ndb_binlog_index where epoch > @max_epoch and inserts > 0; -inserts updates deletes -2 0 0 diff --git a/mysql-test/suite/ndb/r/ndb_binlog_ddl_multi.result b/mysql-test/suite/ndb/r/ndb_binlog_ddl_multi.result deleted file mode 100644 index e3792f8272d..00000000000 --- a/mysql-test/suite/ndb/r/ndb_binlog_ddl_multi.result +++ /dev/null @@ -1,196 +0,0 @@ -drop database if exists mysqltest; -drop table if exists t1,t2,t3; -drop database if exists mysqltest; -drop table if exists t1,t2,t3; -reset master; -reset master; -create database mysqltest; -use mysqltest; -create table t1 (a int primary key) engine=ndb; -create table t2 (a int primary key) engine=ndb; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -mysqld-bin.000001 # Query 1 # create database mysqltest -mysqld-bin.000001 # Query 1 # use `mysqltest`; create table t1 (a int primary key) engine=ndb -mysqld-bin.000001 # Query 2 # use `test`; create table t2 (a int primary key) engine=ndb -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -mysqld-bin.000001 # Query 1 # create database mysqltest -mysqld-bin.000001 # Query 1 # use `mysqltest`; create table t1 (a int primary key) engine=ndb -mysqld-bin.000001 # Query 2 # use `test`; create table t2 (a int primary key) engine=ndb -reset master; -reset master; -alter table t2 add column (b int); -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -mysqld-bin.000001 # Query 2 # use `test`; alter table t2 add column (b int) -reset master; -reset master; -ALTER DATABASE mysqltest CHARACTER SET latin1; -drop table mysqltest.t1; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -mysqld-bin.000001 # Query 2 # ALTER DATABASE mysqltest CHARACTER SET latin1 -mysqld-bin.000001 # Query 2 # use `mysqltest`; drop table `t1` -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -mysqld-bin.000001 # Query 2 # ALTER DATABASE mysqltest CHARACTER SET latin1 -mysqld-bin.000001 # Query 2 # use `mysqltest`; drop table `t1` -reset master; -reset master; -use test; -insert into t2 values (1,2); -drop database mysqltest; -create table t1 (a int primary key) engine=ndb; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -mysqld-bin.000001 # Query 2 # BEGIN -mysqld-bin.000001 # Table_map 2 # table_id: # (test.t2) -mysqld-bin.000001 # Table_map 2 # table_id: # (mysql.ndb_apply_status) -mysqld-bin.000001 # Write_rows 2 # table_id: # -mysqld-bin.000001 # Write_rows 2 # table_id: # flags: STMT_END_F -mysqld-bin.000001 # Query 2 # COMMIT -mysqld-bin.000001 # Query 1 # drop database mysqltest -mysqld-bin.000001 # Query 1 # use `test`; create table t1 (a int primary key) engine=ndb -drop table t2; -reset master; -reset master; -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE = 4M -ENGINE=NDB; -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE NDB; -ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile02.dat' -INITIAL_SIZE = 4M -ENGINE=NDB; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE = NDB; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile02.dat' -ENGINE = NDB; -DROP TABLESPACE ts1 -ENGINE = NDB; -DROP LOGFILE GROUP lg1 -ENGINE =NDB; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -mysqld-bin.000001 # Query 1 # CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB -mysqld-bin.000001 # Query 1 # ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE = 4M -ENGINE=NDB -mysqld-bin.000001 # Query 1 # CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE NDB -mysqld-bin.000001 # Query 1 # ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile02.dat' -INITIAL_SIZE = 4M -ENGINE=NDB -mysqld-bin.000001 # Query 1 # ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE = NDB -mysqld-bin.000001 # Query 1 # ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile02.dat' -ENGINE = NDB -mysqld-bin.000001 # Query 1 # DROP TABLESPACE ts1 -ENGINE = NDB -mysqld-bin.000001 # Query 1 # DROP LOGFILE GROUP lg1 -ENGINE =NDB -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -mysqld-bin.000001 # Query 1 # CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB -mysqld-bin.000001 # Query 1 # ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE = 4M -ENGINE=NDB -mysqld-bin.000001 # Query 1 # CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE NDB -mysqld-bin.000001 # Query 1 # ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile02.dat' -INITIAL_SIZE = 4M -ENGINE=NDB -mysqld-bin.000001 # Query 1 # ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE = NDB -mysqld-bin.000001 # Query 1 # ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile02.dat' -ENGINE = NDB -mysqld-bin.000001 # Query 1 # DROP TABLESPACE ts1 -ENGINE = NDB -mysqld-bin.000001 # Query 1 # DROP LOGFILE GROUP lg1 -ENGINE =NDB -drop table t1; -reset master; -show tables; -Tables_in_test -reset master; -show tables; -Tables_in_test -create table t1 (a int key) engine=ndb; -create table t2 (a int key) engine=ndb; -create table t3 (a int key) engine=ndb; -rename table t3 to t4, t2 to t3, t1 to t2, t4 to t1; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -mysqld-bin.000001 # Query 1 # use `test`; create table t1 (a int key) engine=ndb -mysqld-bin.000001 # Query 1 # use `test`; create table t2 (a int key) engine=ndb -mysqld-bin.000001 # Query 1 # use `test`; create table t3 (a int key) engine=ndb -mysqld-bin.000001 # Query 1 # use `test`; rename table `test.t3` to `test.t4` -mysqld-bin.000001 # Query 1 # use `test`; rename table `test.t2` to `test.t3` -mysqld-bin.000001 # Query 1 # use `test`; rename table `test.t1` to `test.t2` -mysqld-bin.000001 # Query 1 # use `test`; rename table `test.t4` to `test.t1` -drop table t1; -drop table t2; -drop table t3; -reset master; -show tables; -Tables_in_test -reset master; -show tables; -Tables_in_test -create table t1 (a int key) engine=ndb; -insert into t1 values(1); -rename table t1 to t2; -insert into t2 values(2); -drop table t2; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -mysqld-bin.000001 # Query 1 # use `test`; create table t1 (a int key) engine=ndb -mysqld-bin.000001 # Query 2 # BEGIN -mysqld-bin.000001 # Table_map 2 # table_id: # (test.t1) -mysqld-bin.000001 # Table_map 2 # table_id: # (mysql.ndb_apply_status) -mysqld-bin.000001 # Write_rows 2 # table_id: # -mysqld-bin.000001 # Write_rows 2 # table_id: # flags: STMT_END_F -mysqld-bin.000001 # Query 2 # COMMIT -mysqld-bin.000001 # Query 1 # use `test`; rename table `test.t1` to `test.t2` -mysqld-bin.000001 # Query 2 # BEGIN -mysqld-bin.000001 # Table_map 2 # table_id: # (test.t2) -mysqld-bin.000001 # Table_map 2 # table_id: # (mysql.ndb_apply_status) -mysqld-bin.000001 # Write_rows 2 # table_id: # -mysqld-bin.000001 # Write_rows 2 # table_id: # flags: STMT_END_F -mysqld-bin.000001 # Query 2 # COMMIT -mysqld-bin.000001 # Query 2 # use `test`; DROP TABLE `t2` /* generated by server */ diff --git a/mysql-test/suite/ndb/r/ndb_binlog_discover.result b/mysql-test/suite/ndb/r/ndb_binlog_discover.result deleted file mode 100644 index f8704971878..00000000000 --- a/mysql-test/suite/ndb/r/ndb_binlog_discover.result +++ /dev/null @@ -1,17 +0,0 @@ -drop table if exists t1; -create table t1 (a int key) engine=ndb; -reset master; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -mysqld-bin.000001 # Incident 1 # #1 (LOST_EVENTS) -mysqld-bin.000001 # Rotate 1 # mysqld-bin.000002;pos=4 -PURGE MASTER LOGS TO 'mysqld-bin.000002'; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -mysqld-bin.000002 # Query 1 # BEGIN -mysqld-bin.000002 # Table_map 1 # table_id: # (test.t1) -mysqld-bin.000002 # Table_map 1 # table_id: # (mysql.ndb_apply_status) -mysqld-bin.000002 # Write_rows 1 # table_id: # -mysqld-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F -mysqld-bin.000002 # Query 1 # COMMIT -drop table t1; diff --git a/mysql-test/suite/ndb/r/ndb_binlog_format.result b/mysql-test/suite/ndb/r/ndb_binlog_format.result deleted file mode 100644 index b6022b61746..00000000000 --- a/mysql-test/suite/ndb/r/ndb_binlog_format.result +++ /dev/null @@ -1,41 +0,0 @@ -call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); -drop table if exists t1, t2, t3; -CREATE TABLE t1 (m INT, n INT) ENGINE=MYISAM; -CREATE TABLE t2 (b INT, c INT) ENGINE=BLACKHOLE; -CREATE TABLE t3 (e INT, f INT) ENGINE=NDB; -RESET MASTER; -SET SESSION BINLOG_FORMAT=STATEMENT; -INSERT INTO t1 VALUES (1,1), (1,2), (2,1), (2,2); -INSERT INTO t2 VALUES (1,1), (1,2), (2,1), (2,2); -UPDATE t1, t2 SET m = 2, b = 3 WHERE n = c; -START TRANSACTION; -INSERT INTO t3 VALUES (1,1), (1,2), (2,1), (2,2); -UPDATE t1, t3 SET m = 2, e = 3 WHERE n = f; -Warnings: -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them. -UPDATE t3, t2 SET e = 2, b = 3 WHERE f = c; -COMMIT; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -mysqld-bin.000001 # Query # # BEGIN -mysqld-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1), (1,2), (2,1), (2,2) -mysqld-bin.000001 # Query # # COMMIT -mysqld-bin.000001 # Query # # BEGIN -mysqld-bin.000001 # Query # # use `test`; INSERT INTO t2 VALUES (1,1), (1,2), (2,1), (2,2) -mysqld-bin.000001 # Query # # COMMIT -mysqld-bin.000001 # Query # # BEGIN -mysqld-bin.000001 # Query # # use `test`; UPDATE t1, t2 SET m = 2, b = 3 WHERE n = c -mysqld-bin.000001 # Query # # COMMIT -mysqld-bin.000001 # Query # # BEGIN -mysqld-bin.000001 # Query # # use `test`; UPDATE t3, t2 SET e = 2, b = 3 WHERE f = c -mysqld-bin.000001 # Query # # COMMIT -mysqld-bin.000001 # Query # # BEGIN -mysqld-bin.000001 # Query # # use `test`; INSERT INTO t3 VALUES (1,1), (1,2), (2,1), (2,2) -mysqld-bin.000001 # Query # # use `test`; UPDATE t1, t3 SET m = 2, e = 3 WHERE n = f -mysqld-bin.000001 # Query # # COMMIT -mysqld-bin.000001 # Query # # BEGIN -mysqld-bin.000001 # Table_map # # table_id: # (test.t3) -mysqld-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -mysqld-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -mysqld-bin.000001 # Query # # COMMIT -DROP TABLE t1, t2, t3; diff --git a/mysql-test/suite/ndb/r/ndb_binlog_ignore_db.result b/mysql-test/suite/ndb/r/ndb_binlog_ignore_db.result deleted file mode 100644 index 423b9f71ac6..00000000000 --- a/mysql-test/suite/ndb/r/ndb_binlog_ignore_db.result +++ /dev/null @@ -1,11 +0,0 @@ -reset master; -drop table if exists t1; -drop database if exists mysqltest; -create database mysqltest; -use mysqltest; -create table t1 (a int primary key, b int) engine=ndb; -insert into t1 values (1, 1); -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -mysqld-bin.000001 # Query 1 # use `test`; DROP TABLE IF EXISTS `t1` /* generated by server */ -drop database mysqltest; diff --git a/mysql-test/suite/ndb/r/ndb_binlog_log_bin.result b/mysql-test/suite/ndb/r/ndb_binlog_log_bin.result deleted file mode 100644 index ab952430d2d..00000000000 --- a/mysql-test/suite/ndb/r/ndb_binlog_log_bin.result +++ /dev/null @@ -1,80 +0,0 @@ -drop table if exists t1,t2,t3; -reset master; -drop table if exists t1,t2,t3; -reset master; -set SQL_LOG_BIN=0; -create database mysqltest; -use mysqltest; -create table t1 (a int key, b int) engine=ndb; -create table t2 (a int key, b int) engine=ndb; -insert into t1 values (1,1); -alter table t1 add c int; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -mysqld-bin.000001 # Query 1 # BEGIN -mysqld-bin.000001 # Table_map 1 # table_id: # (mysqltest.t1) -mysqld-bin.000001 # Table_map 1 # table_id: # (mysql.ndb_apply_status) -mysqld-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -mysqld-bin.000001 # Query 1 # COMMIT -reset master; -use mysqltest; -insert into t2 values (1,1); -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -mysqld-bin.000001 # Query 2 # BEGIN -mysqld-bin.000001 # Table_map 2 # table_id: # (mysqltest.t1) -mysqld-bin.000001 # Table_map 2 # table_id: # (mysql.ndb_apply_status) -mysqld-bin.000001 # Write_rows 2 # table_id: # flags: STMT_END_F -mysqld-bin.000001 # Query 2 # COMMIT -mysqld-bin.000001 # Query 2 # BEGIN -mysqld-bin.000001 # Table_map 2 # table_id: # (mysqltest.t2) -mysqld-bin.000001 # Table_map 2 # table_id: # (mysql.ndb_apply_status) -mysqld-bin.000001 # Write_rows 2 # table_id: # -mysqld-bin.000001 # Write_rows 2 # table_id: # flags: STMT_END_F -mysqld-bin.000001 # Query 2 # COMMIT -reset master; -use mysqltest; -drop table t1; -drop table t2; -create table t1 (d int key, e int) engine=ndb; -create table t2 (d int key, e int) engine=ndb; -insert into t1 values (1,1); -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -mysqld-bin.000001 # Query 1 # BEGIN -mysqld-bin.000001 # Table_map 1 # table_id: # (mysqltest.t2) -mysqld-bin.000001 # Table_map 1 # table_id: # (mysql.ndb_apply_status) -mysqld-bin.000001 # Write_rows 1 # table_id: # -mysqld-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -mysqld-bin.000001 # Query 1 # COMMIT -mysqld-bin.000001 # Query 1 # use `mysqltest`; DROP TABLE `t1` /* generated by server */ -mysqld-bin.000001 # Query 1 # use `mysqltest`; DROP TABLE `t2` /* generated by server */ -mysqld-bin.000001 # Query 1 # use `mysqltest`; create table t1 (d int key, e int) engine=ndb -mysqld-bin.000001 # Query 1 # use `mysqltest`; create table t2 (d int key, e int) engine=ndb -mysqld-bin.000001 # Query 1 # BEGIN -mysqld-bin.000001 # Table_map 1 # table_id: # (mysqltest.t1) -mysqld-bin.000001 # Table_map 1 # table_id: # (mysql.ndb_apply_status) -mysqld-bin.000001 # Write_rows 1 # table_id: # -mysqld-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -mysqld-bin.000001 # Query 1 # COMMIT -use mysqltest; -insert into t2 values (1,1); -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -mysqld-bin.000001 # Query 1 # use `mysqltest`; drop table `t1` -mysqld-bin.000001 # Query 1 # use `mysqltest`; drop table `t2` -mysqld-bin.000001 # Query 1 # use `mysqltest`; create table t1 (d int key, e int) engine=ndb -mysqld-bin.000001 # Query 1 # use `mysqltest`; create table t2 (d int key, e int) engine=ndb -mysqld-bin.000001 # Query 2 # BEGIN -mysqld-bin.000001 # Table_map 2 # table_id: # (mysqltest.t1) -mysqld-bin.000001 # Table_map 2 # table_id: # (mysql.ndb_apply_status) -mysqld-bin.000001 # Write_rows 2 # table_id: # -mysqld-bin.000001 # Write_rows 2 # table_id: # flags: STMT_END_F -mysqld-bin.000001 # Query 2 # COMMIT -mysqld-bin.000001 # Query 2 # BEGIN -mysqld-bin.000001 # Table_map 2 # table_id: # (mysqltest.t2) -mysqld-bin.000001 # Table_map 2 # table_id: # (mysql.ndb_apply_status) -mysqld-bin.000001 # Write_rows 2 # table_id: # -mysqld-bin.000001 # Write_rows 2 # table_id: # flags: STMT_END_F -mysqld-bin.000001 # Query 2 # COMMIT -drop database mysqltest; diff --git a/mysql-test/suite/ndb/r/ndb_binlog_multi.result b/mysql-test/suite/ndb/r/ndb_binlog_multi.result deleted file mode 100644 index 3fbb2660eb6..00000000000 --- a/mysql-test/suite/ndb/r/ndb_binlog_multi.result +++ /dev/null @@ -1,80 +0,0 @@ -drop table if exists t1,t2,t3; -drop table if exists t1,t2,t3; -CREATE TABLE t3 (dummy INT PRIMARY KEY) ENGINE = NDB; -DROP TABLE t3; -reset master; -reset master; -CREATE TABLE t2 (a INT PRIMARY KEY, b int) ENGINE = NDB; -INSERT INTO t2 VALUES (1,1),(2,2); -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -mysqld-bin.000001 # Query 2 # use `test`; CREATE TABLE t2 (a INT PRIMARY KEY, b int) ENGINE = NDB -mysqld-bin.000001 # Query 2 # BEGIN -mysqld-bin.000001 # Table_map 2 # table_id: # (test.t2) -mysqld-bin.000001 # Table_map 2 # table_id: # (mysql.ndb_apply_status) -mysqld-bin.000001 # Write_rows 2 # table_id: # -mysqld-bin.000001 # Write_rows 2 # table_id: # flags: STMT_END_F -mysqld-bin.000001 # Query 2 # COMMIT -select * from t2 order by a; -a b -1 1 -2 2 -SELECT @the_epoch:=epoch,inserts,updates,deletes,schemaops FROM -mysql.ndb_binlog_index ORDER BY epoch DESC LIMIT 1; -@the_epoch:=epoch inserts updates deletes schemaops - 2 0 0 0 -SELECT * FROM t2 ORDER BY a; -a b -1 1 -2 2 -DROP TABLE t2; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -mysqld-bin.000001 # Query 2 # use `test`; CREATE TABLE t2 (a INT PRIMARY KEY, b int) ENGINE = NDB -mysqld-bin.000001 # Query 1 # BEGIN -mysqld-bin.000001 # Table_map 1 # table_id: # (test.t2) -mysqld-bin.000001 # Table_map 1 # table_id: # (mysql.ndb_apply_status) -mysqld-bin.000001 # Write_rows 1 # table_id: # -mysqld-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -mysqld-bin.000001 # Query 1 # COMMIT -mysqld-bin.000001 # Query 1 # use `test`; DROP TABLE `t2` /* generated by server */ -SELECT inserts,updates,deletes,schemaops FROM -mysql.ndb_binlog_index WHERE epoch=; -inserts updates deletes schemaops -2 0 0 0 -reset master; -reset master; -CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE = NDB; -INSERT INTO t1 VALUES (1),(2); -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -mysqld-bin.000001 # Query 2 # use `test`; CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE = NDB -mysqld-bin.000001 # Query 2 # BEGIN -mysqld-bin.000001 # Table_map 2 # table_id: # (test.t1) -mysqld-bin.000001 # Table_map 2 # table_id: # (mysql.ndb_apply_status) -mysqld-bin.000001 # Write_rows 2 # table_id: # -mysqld-bin.000001 # Write_rows 2 # table_id: # flags: STMT_END_F -mysqld-bin.000001 # Query 2 # COMMIT -SELECT @the_epoch2:=epoch,inserts,updates,deletes,schemaops FROM -mysql.ndb_binlog_index ORDER BY epoch DESC LIMIT 1; -@the_epoch2:=epoch inserts updates deletes schemaops - 2 0 0 0 -SELECT inserts,updates,deletes,schemaops FROM -mysql.ndb_binlog_index WHERE epoch > AND epoch <= ; -inserts updates deletes schemaops -2 0 0 0 -drop table t1; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -mysqld-bin.000001 # Query 2 # use `test`; CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE = NDB -mysqld-bin.000001 # Query 2 # BEGIN -mysqld-bin.000001 # Table_map 2 # table_id: # (test.t1) -mysqld-bin.000001 # Table_map 2 # table_id: # (mysql.ndb_apply_status) -mysqld-bin.000001 # Write_rows 2 # table_id: # -mysqld-bin.000001 # Write_rows 2 # table_id: # flags: STMT_END_F -mysqld-bin.000001 # Query 2 # COMMIT -mysqld-bin.000001 # Query 2 # use `test`; DROP TABLE `t1` /* generated by server */ -SELECT inserts,updates,deletes,schemaops FROM -mysql.ndb_binlog_index WHERE epoch > AND epoch <= ; -inserts updates deletes schemaops -2 0 0 0 diff --git a/mysql-test/suite/ndb/r/ndb_bitfield.result b/mysql-test/suite/ndb/r/ndb_bitfield.result deleted file mode 100644 index 826f3a98348..00000000000 --- a/mysql-test/suite/ndb/r/ndb_bitfield.result +++ /dev/null @@ -1,224 +0,0 @@ -drop table if exists t1; -create table t1 ( -pk1 int not null primary key, -b bit(64) -) engine=ndbcluster; -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `pk1` int(11) NOT NULL, - `b` bit(64) DEFAULT NULL, - PRIMARY KEY (`pk1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -insert into t1 values -(0,b'1111111111111111111111111111111111111111111111111111111111111111'), -(1,b'1000000000000000000000000000000000000000000000000000000000000000'), -(2,b'0000000000000000000000000000000000000000000000000000000000000001'), -(3,b'1010101010101010101010101010101010101010101010101010101010101010'), -(4,b'0101010101010101010101010101010101010101010101010101010101010101'); -select hex(b) from t1 order by pk1; -hex(b) -FFFFFFFFFFFFFFFF -8000000000000000 -1 -AAAAAAAAAAAAAAAA -5555555555555555 -drop table t1; -create table t1 ( -pk1 int not null primary key, -b bit(9) -) engine=ndbcluster; -insert into t1 values -(0,b'000000000'), -(1,b'000000001'), -(2,b'000000010'), -(3,b'000000011'), -(4,b'000000100'); -select hex(b) from t1 order by pk1; -hex(b) -0 -1 -2 -3 -4 -update t1 set b = b + b'101010101'; -select hex(b) from t1 order by pk1; -hex(b) -155 -156 -157 -158 -159 -drop table t1; -create table t1 (a bit(7), b bit(9)) engine = ndbcluster; -insert into t1 values -(94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177), -(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380), -(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36), -(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499), -(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403), -(44, 307), (68, 454), (57, 135); -select a+0 from t1 order by a; -a+0 -0 -4 -5 -9 -23 -24 -28 -29 -30 -31 -34 -44 -49 -56 -57 -59 -60 -61 -68 -68 -75 -77 -78 -79 -87 -88 -94 -94 -104 -106 -108 -111 -116 -118 -119 -122 -123 -127 -select b+0 from t1 order by b; -b+0 -36 -42 -46 -67 -83 -118 -123 -133 -135 -152 -177 -178 -188 -202 -206 -245 -280 -307 -343 -345 -349 -351 -363 -368 -368 -379 -380 -390 -398 -399 -403 -411 -411 -438 -446 -454 -468 -499 -drop table t1; -create table t1 ( -dummyKey INTEGER NOT NULL, -a001 TINYINT, -a010 TINYINT, -a012 TINYINT, -a015 TINYINT, -a016 TINYINT, -a017 TINYINT, -a019 TINYINT, -a029 TINYINT, -a030 TINYINT, -a031 TINYINT, -a032 TINYINT, -a042 TINYINT, -a043 TINYINT, -a044 TINYINT, -a3001 TINYINT, -a3002 TINYINT, -a3003 TINYINT, -a3004 TINYINT, -a3005 TINYINT, -a3021 TINYINT, -a3022 TINYINT, -a BIT(6), -b BIT(6), -c BIT(6), -d TINYINT, -e TINYINT, -f TINYINT, -g TINYINT, -h TINYINT, -i TINYINT, -j TINYINT, -k TINYINT, -l TINYINT, -m TINYINT, -n TINYINT, -o TINYINT, -a034 TINYINT, -PRIMARY KEY USING HASH (dummyKey) ) engine=ndb; -INSERT INTO `t1` VALUES -(1,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'000001',b'111111',b'111110',4,5,5,5,5,5,5,5,5,5,3,2,1), -(2,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'000010',b'000000',b'111101',4,5,5,5,5,5,5,5,5,5,3,2,1), -(3,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'000100',b'001111',b'111011',4,5,5,5,5,5,5,5,5,5,3,2,1), -(4,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'001000',b'110000',b'110111',4,5,5,5,5,5,5,5,5,5,3,2,1), -(5,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'010000',b'100001',b'101111',4,5,5,5,5,5,5,5,5,5,3,2,1), -(6,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'100000',b'010010',b'011111',4,5,5,5,5,5,5,5,5,5,3,2,1), -(7,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'000000',b'001100',b'111111',4,5,5,5,5,5,5,5,5,5,3,2,1), -(8,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'111111',b'000000',b'000000',4,5,5,5,5,5,5,5,5,5,3,2,1); -INSERT INTO `t1` VALUES (1,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x01,0x3F,0x3E,4,5,5,5,5,5,5,5,5,5,3,2,1); -INSERT INTO `t1` VALUES (2,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x02,0x00,0x3D,4,5,5,5,5,5,5,5,5,5,3,2,1); -INSERT INTO `t1` VALUES (3,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x04,0x0F,0x3B,4,5,5,5,5,5,5,5,5,5,3,2,1); -INSERT INTO `t1` VALUES (4,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x08,0x30,0x37,4,5,5,5,5,5,5,5,5,5,3,2,1); -INSERT INTO `t1` VALUES (5,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x10,0x21,0x2F,4,5,5,5,5,5,5,5,5,5,3,2,1); -INSERT INTO `t1` VALUES (6,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x20,0x12,0x1F,4,5,5,5,5,5,5,5,5,5,3,2,1); -INSERT INTO `t1` VALUES (7,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x00,0x0C,0x3F,4,5,5,5,5,5,5,5,5,5,3,2,1); -INSERT INTO `t1` VALUES (8,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x3F,0x00,0x00,4,5,5,5,5,5,5,5,5,5,3,2,1); -drop table t1; -create table t1 ( -pk1 bit(9) not null primary key, -b int -) engine=ndbcluster; -ERROR HY000: Can't create table 'test.t1' (errno: 906) -show warnings; -Level Code Message -Warning 1296 Got error 906 'Unsupported attribute type in index' from NDB -Error 1005 Can't create table 'test.t1' (errno: 906) -create table t1 ( -pk1 int not null primary key, -b bit(9), -key(b) -) engine=ndbcluster; -ERROR HY000: Can't create table 'test.t1' (errno: 906) -show warnings; -Level Code Message -Warning 1296 Got error 906 'Unsupported attribute type in index' from NDB -Error 1005 Can't create table 'test.t1' (errno: 906) -create table t1 ( -pk1 int primary key, -b bit(32) not null -) engine=ndbcluster; -insert into t1 values (1,1); -drop table t1; diff --git a/mysql-test/suite/ndb/r/ndb_blob.result b/mysql-test/suite/ndb/r/ndb_blob.result deleted file mode 100644 index 31ce36864af..00000000000 --- a/mysql-test/suite/ndb/r/ndb_blob.result +++ /dev/null @@ -1,591 +0,0 @@ -drop table if exists t1; -drop database if exists test2; -set autocommit=0; -create table t1 ( -a int not null primary key, -b text not null, -c int not null, -d longblob, -key (c) -) engine=ndbcluster; -set @x0 = '01234567012345670123456701234567'; -set @x0 = concat(@x0,@x0,@x0,@x0,@x0,@x0,@x0,@x0); -set @b1 = 'b1'; -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@x0); -set @d1 = 'dd1'; -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @b2 = 'b2'; -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @d2 = 'dd2'; -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -select length(@x0),length(@b1),length(@d1) from dual; -length(@x0) length(@b1) length(@d1) -256 2256 3000 -select length(@x0),length(@b2),length(@d2) from dual; -length(@x0) length(@b2) length(@d2) -256 20000 30000 -insert into t1 values(1,@b1,111,@d1); -insert into t1 values(2,@b2,222,@d2); -commit; -explain select * from t1 where a = 1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 const PRIMARY PRIMARY 4 const # -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where a=1; -a length(b) substr(b,1+2*900,2) length(d) substr(d,1+3*900,3) -1 2256 b1 3000 dd1 -select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3) -from t1 where a=2; -a length(b) substr(b,1+2*9000,2) length(d) substr(d,1+3*9000,3) -2 20000 b2 30000 dd2 -update t1 set b=@b2,d=@d2 where a=1; -update t1 set b=@b1,d=@d1 where a=2; -commit; -select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3) -from t1 where a=1; -a length(b) substr(b,1+2*9000,2) length(d) substr(d,1+3*9000,3) -1 20000 b2 30000 dd2 -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where a=2; -a length(b) substr(b,1+2*900,2) length(d) substr(d,1+3*900,3) -2 2256 b1 3000 dd1 -update t1 set b=concat(b,b),d=concat(d,d) where a=1; -update t1 set b=concat(b,b),d=concat(d,d) where a=2; -commit; -select a,length(b),substr(b,1+4*9000,2),length(d),substr(d,1+6*9000,3) -from t1 where a=1; -a length(b) substr(b,1+4*9000,2) length(d) substr(d,1+6*9000,3) -1 40000 b2 60000 dd2 -select a,length(b),substr(b,1+4*900,2),length(d),substr(d,1+6*900,3) -from t1 where a=2; -a length(b) substr(b,1+4*900,2) length(d) substr(d,1+6*900,3) -2 4512 b1 6000 dd1 -update t1 set d=null where a=1; -commit; -select a from t1 where d is null; -a -1 -delete from t1 where a=45567; -commit; -delete from t1 where a=1; -delete from t1 where a=2; -commit; -select count(*) from t1; -count(*) -0 -replace t1 set a=1,b=@b1,c=111,d=@d1; -replace t1 set a=2,b=@b2,c=222,d=@d2; -commit; -explain select * from t1 where a = 1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 const PRIMARY PRIMARY 4 const # -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where a=1; -a length(b) substr(b,1+2*900,2) length(d) substr(d,1+3*900,3) -1 2256 b1 3000 dd1 -select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3) -from t1 where a=2; -a length(b) substr(b,1+2*9000,2) length(d) substr(d,1+3*9000,3) -2 20000 b2 30000 dd2 -replace t1 set a=1,b=@b2,c=111,d=@d2; -replace t1 set a=2,b=@b1,c=222,d=@d1; -commit; -select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3) -from t1 where a=1; -a length(b) substr(b,1+2*9000,2) length(d) substr(d,1+3*9000,3) -1 20000 b2 30000 dd2 -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where a=2; -a length(b) substr(b,1+2*900,2) length(d) substr(d,1+3*900,3) -2 2256 b1 3000 dd1 -replace t1 set a=1,b=concat(@b2,@b2),c=111,d=concat(@d2,@d2); -replace t1 set a=2,b=concat(@b1,@b1),c=222,d=concat(@d1,@d1); -commit; -select a,length(b),substr(b,1+4*9000,2),length(d),substr(d,1+6*9000,3) -from t1 where a=1; -a length(b) substr(b,1+4*9000,2) length(d) substr(d,1+6*9000,3) -1 40000 b2 60000 dd2 -select a,length(b),substr(b,1+4*900,2),length(d),substr(d,1+6*900,3) -from t1 where a=2; -a length(b) substr(b,1+4*900,2) length(d) substr(d,1+6*900,3) -2 4512 b1 6000 dd1 -replace t1 set a=1,b='xyz',c=111,d=null; -commit; -select a,b from t1 where d is null; -a b -1 xyz -delete from t1 where a=1; -delete from t1 where a=2; -commit; -select count(*) from t1; -count(*) -0 -insert into t1 values(1,@b1,111,@d1); -insert into t1 values(2,@b2,222,@d2); -commit; -explain select * from t1 where c = 111; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref c c 4 const # -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where c=111; -a length(b) substr(b,1+2*900,2) length(d) substr(d,1+3*900,3) -1 2256 b1 3000 dd1 -select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3) -from t1 where c=222; -a length(b) substr(b,1+2*9000,2) length(d) substr(d,1+3*9000,3) -2 20000 b2 30000 dd2 -update t1 set b=@b2,d=@d2 where c=111; -update t1 set b=@b1,d=@d1 where c=222; -commit; -select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3) -from t1 where c=111; -a length(b) substr(b,1+2*9000,2) length(d) substr(d,1+3*9000,3) -1 20000 b2 30000 dd2 -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where c=222; -a length(b) substr(b,1+2*900,2) length(d) substr(d,1+3*900,3) -2 2256 b1 3000 dd1 -update t1 set d=null where c=111; -commit; -select a from t1 where d is null; -a -1 -delete from t1 where c=111; -delete from t1 where c=222; -commit; -select count(*) from t1; -count(*) -0 -insert into t1 values(1,'b1',111,'dd1'); -insert into t1 values(2,'b2',222,'dd2'); -insert into t1 values(3,'b3',333,'dd3'); -insert into t1 values(4,'b4',444,'dd4'); -insert into t1 values(5,'b5',555,'dd5'); -insert into t1 values(6,'b6',666,'dd6'); -insert into t1 values(7,'b7',777,'dd7'); -insert into t1 values(8,'b8',888,'dd8'); -insert into t1 values(9,'b9',999,'dd9'); -commit; -explain select * from t1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL # -select * from t1 order by a; -a b c d -1 b1 111 dd1 -2 b2 222 dd2 -3 b3 333 dd3 -4 b4 444 dd4 -5 b5 555 dd5 -6 b6 666 dd6 -7 b7 777 dd7 -8 b8 888 dd8 -9 b9 999 dd9 -update t1 set b=concat(a,'x',b),d=concat(a,'x',d); -commit; -select * from t1 order by a; -a b c d -1 1xb1 111 1xdd1 -2 2xb2 222 2xdd2 -3 3xb3 333 3xdd3 -4 4xb4 444 4xdd4 -5 5xb5 555 5xdd5 -6 6xb6 666 6xdd6 -7 7xb7 777 7xdd7 -8 8xb8 888 8xdd8 -9 9xb9 999 9xdd9 -delete from t1; -commit; -select count(*) from t1; -count(*) -0 -insert into t1 values(1,@b1,111,@d1); -insert into t1 values(2,@b2,222,@d2); -commit; -explain select * from t1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL # -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 order by a; -a length(b) substr(b,1+2*900,2) length(d) substr(d,1+3*900,3) -1 2256 b1 3000 dd1 -2 20000 b2 30000 dd2 -update t1 set b=concat(b,b),d=concat(d,d); -commit; -select a,length(b),substr(b,1+4*9000,2),length(d),substr(d,1+6*9000,3) -from t1 order by a; -a length(b) substr(b,1+4*9000,2) length(d) substr(d,1+6*9000,3) -1 4512 6000 -2 40000 b2 60000 dd2 -delete from t1; -commit; -select count(*) from t1; -count(*) -0 -insert into t1 values(1,'b1',111,'dd1'); -insert into t1 values(2,'b2',222,'dd2'); -insert into t1 values(3,'b3',333,'dd3'); -insert into t1 values(4,'b4',444,'dd4'); -insert into t1 values(5,'b5',555,'dd5'); -insert into t1 values(6,'b6',666,'dd6'); -insert into t1 values(7,'b7',777,'dd7'); -insert into t1 values(8,'b8',888,'dd8'); -insert into t1 values(9,'b9',999,'dd9'); -commit; -explain select * from t1 where c >= 100 order by a; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 4 NULL # Using where with pushed condition; Using filesort -select * from t1 where c >= 100 order by a; -a b c d -1 b1 111 dd1 -2 b2 222 dd2 -3 b3 333 dd3 -4 b4 444 dd4 -5 b5 555 dd5 -6 b6 666 dd6 -7 b7 777 dd7 -8 b8 888 dd8 -9 b9 999 dd9 -update t1 set b=concat(a,'x',b),d=concat(a,'x',d) -where c >= 100; -commit; -select * from t1 where c >= 100 order by a; -a b c d -1 1xb1 111 1xdd1 -2 2xb2 222 2xdd2 -3 3xb3 333 3xdd3 -4 4xb4 444 4xdd4 -5 5xb5 555 5xdd5 -6 6xb6 666 6xdd6 -7 7xb7 777 7xdd7 -8 8xb8 888 8xdd8 -9 9xb9 999 9xdd9 -delete from t1 where c >= 100; -commit; -select count(*) from t1; -count(*) -0 -insert into t1 values(1,@b1,111,@d1); -insert into t1 values(2,@b2,222,@d2); -commit; -explain select * from t1 where c >= 100 order by a; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 4 NULL # Using where with pushed condition; Using filesort -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where c >= 100 order by a; -a length(b) substr(b,1+2*900,2) length(d) substr(d,1+3*900,3) -1 2256 b1 3000 dd1 -2 20000 b2 30000 dd2 -update t1 set b=concat(b,b),d=concat(d,d); -commit; -select a,length(b),substr(b,1+4*9000,2),length(d),substr(d,1+6*9000,3) -from t1 where c >= 100 order by a; -a length(b) substr(b,1+4*9000,2) length(d) substr(d,1+6*9000,3) -1 4512 6000 -2 40000 b2 60000 dd2 -delete from t1 where c >= 100; -commit; -select count(*) from t1; -count(*) -0 -insert into t1 values(1,@b1,111,@d1); -insert into t1 values(2,@b2,222,@d2); -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where a = 0; -a length(b) substr(b,1+2*900,2) length(d) substr(d,1+3*900,3) -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where a = 1; -a length(b) substr(b,1+2*900,2) length(d) substr(d,1+3*900,3) -1 2256 b1 3000 dd1 -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where a = 2; -a length(b) substr(b,1+2*900,2) length(d) substr(d,1+3*900,3) -2 20000 b2 30000 dd2 -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 order by a; -a length(b) substr(b,1+2*900,2) length(d) substr(d,1+3*900,3) -1 2256 b1 3000 dd1 -2 20000 b2 30000 dd2 -rollback; -select count(*) from t1; -count(*) -0 -insert into t1 values(1,'b1',111,'dd1'); -insert into t1 values(2,'b2',222,'dd2'); -insert into t1 values(3,'b3',333,'dd3'); -insert into t1 values(4,'b4',444,'dd4'); -insert into t1 values(5,'b5',555,'dd5'); -insert into t1 values(6,'b6',666,'dd6'); -insert into t1 values(7,'b7',777,'dd7'); -insert into t1 values(8,'b8',888,'dd8'); -insert into t1 values(9,'b9',999,'dd9'); -commit; -select * from t1 order by a; -a b c d -1 b1 111 dd1 -2 b2 222 dd2 -3 b3 333 dd3 -4 b4 444 dd4 -5 b5 555 dd5 -6 b6 666 dd6 -7 b7 777 dd7 -8 b8 888 dd8 -9 b9 999 dd9 -alter table t1 add x int; -select * from t1 order by a; -a b c d x -1 b1 111 dd1 NULL -2 b2 222 dd2 NULL -3 b3 333 dd3 NULL -4 b4 444 dd4 NULL -5 b5 555 dd5 NULL -6 b6 666 dd6 NULL -7 b7 777 dd7 NULL -8 b8 888 dd8 NULL -9 b9 999 dd9 NULL -alter table t1 drop x; -select * from t1 order by a; -a b c d -1 b1 111 dd1 -2 b2 222 dd2 -3 b3 333 dd3 -4 b4 444 dd4 -5 b5 555 dd5 -6 b6 666 dd6 -7 b7 777 dd7 -8 b8 888 dd8 -9 b9 999 dd9 -create database test2; -use test2; -CREATE TABLE t2 ( -a bigint unsigned NOT NULL PRIMARY KEY, -b int unsigned not null, -c int unsigned -) engine=ndbcluster; -insert into t2 values (1,1,1),(2,2,2); -select * from test.t1,t2 where test.t1.a = t2.a order by test.t1.a; -a b c d a b c -1 b1 111 dd1 1 1 1 -2 b2 222 dd2 2 2 2 -drop table t2; -use test; -select * from t1 order by a; -a b c d -1 b1 111 dd1 -2 b2 222 dd2 -3 b3 333 dd3 -4 b4 444 dd4 -5 b5 555 dd5 -6 b6 666 dd6 -7 b7 777 dd7 -8 b8 888 dd8 -9 b9 999 dd9 -alter table t1 add x int; -select * from t1 order by a; -a b c d x -1 b1 111 dd1 NULL -2 b2 222 dd2 NULL -3 b3 333 dd3 NULL -4 b4 444 dd4 NULL -5 b5 555 dd5 NULL -6 b6 666 dd6 NULL -7 b7 777 dd7 NULL -8 b8 888 dd8 NULL -9 b9 999 dd9 NULL -alter table t1 drop x; -select * from t1 order by a; -a b c d -1 b1 111 dd1 -2 b2 222 dd2 -3 b3 333 dd3 -4 b4 444 dd4 -5 b5 555 dd5 -6 b6 666 dd6 -7 b7 777 dd7 -8 b8 888 dd8 -9 b9 999 dd9 -drop table t1; -drop database test2; -set autocommit=0; -create table t1 ( -a int not null primary key, -b tinytext -) engine=ndbcluster; -insert into t1 values(1, 'x'); -update t1 set b = 'y'; -select * from t1; -a b -1 y -delete from t1; -select * from t1; -a b -commit; -replace t1 set a=2, b='y'; -select * from t1; -a b -2 y -delete from t1; -select * from t1; -a b -drop table t1; -set autocommit=0; -create table t1 ( -a int not null primary key, -b text not null -) engine=ndbcluster; -insert into t1 values(1, ''); -select * from t1; -a b -1 -commit; -drop table t1; -set autocommit=1; -use test; -CREATE TABLE t1 ( -a int, -b text, -PRIMARY KEY (a) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; -INSERT INTO t1 VALUES -(1,'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'); -INSERT INTO t1 VALUES -(2,'BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB'); -select * from t1 order by a; -a b -1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -2 BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB -alter table t1 engine=ndb; -select * from t1 order by a; -a b -1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -2 BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB -set autocommit=1; -alter table t1 engine=myisam; -select * from t1 order by a; -a b -1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -2 BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB -drop table t1; -create table t1 ( -id int(11) unsigned primary key NOT NULL auto_increment, -msg text NOT NULL -) engine=ndbcluster default charset=utf8; -insert into t1 (msg) values( -'Tries to validate (8 byte length + inline bytes) as UTF8 :( -Fast fix: removed validation for Text. It is not yet indexable -so bad data will not crash kernel.'); -select * from t1; -id msg -1 Tries to validate (8 byte length + inline bytes) as UTF8 :( -Fast fix: removed validation for Text. It is not yet indexable -so bad data will not crash kernel. -drop table t1; -create table t1 ( -a int primary key not null auto_increment, -b text -) engine=ndbcluster; -select count(*) from t1; -count(*) -500 -truncate t1; -select count(*) from t1; -count(*) -0 -drop table t1; -create table t1 ( -a varchar(40) not null, -b mediumint not null, -t text, -c varchar(2) not null, -d bigint not null, -primary key (a,b,c), -key (c,a), -unique key (d) -) engine=ndb; -insert into t1 (a,b,c,d,t) values ('a',1110,'a',1,@v1); -insert into t1 (a,b,c,d,t) values ('b',1110,'a',2,@v2); -insert into t1 (a,b,c,d,t) values ('a',1110,'b',3,@v3); -insert into t1 (a,b,c,d,t) values ('b',1110,'b',4,@v4); -select a,b,c,d,sha1(t) from t1 order by c,a; -a b c d sha1(t) -a 1110 a 1 558a30713786aa72f66abc1e6a521d55aacdeeb5 -b 1110 a 2 b238654911689bfb626a3ef9dba4a1ca074e6a5e -a 1110 b 3 2b6515f29c20b8e9e17cc597527e516c0de8d612 -b 1110 b 4 NULL -select a,b,c,d,sha1(t) from t1 where a='a' and b=1110 and c='a'; -a b c d sha1(t) -a 1110 a 1 558a30713786aa72f66abc1e6a521d55aacdeeb5 -select a,b,c,d,sha1(t) from t1 where a='a' and b=1110 and c='b'; -a b c d sha1(t) -a 1110 b 3 2b6515f29c20b8e9e17cc597527e516c0de8d612 -update t1 set t=@v4 where a='b' and b=1110 and c='a'; -update t1 set t=@v2 where a='b' and b=1110 and c='b'; -select a,b,c,d,sha1(t) from t1 order by c,a; -a b c d sha1(t) -a 1110 a 1 558a30713786aa72f66abc1e6a521d55aacdeeb5 -b 1110 a 2 NULL -a 1110 b 3 2b6515f29c20b8e9e17cc597527e516c0de8d612 -b 1110 b 4 b238654911689bfb626a3ef9dba4a1ca074e6a5e -update t1 set t=@v2 where d=2; -update t1 set t=@v4 where d=4; -select a,b,c,d,sha1(t) from t1 order by c,a; -a b c d sha1(t) -a 1110 a 1 558a30713786aa72f66abc1e6a521d55aacdeeb5 -b 1110 a 2 b238654911689bfb626a3ef9dba4a1ca074e6a5e -a 1110 b 3 2b6515f29c20b8e9e17cc597527e516c0de8d612 -b 1110 b 4 NULL -update t1 set t=@v4 where a='b' and c='a'; -update t1 set t=@v2 where a='b' and c='b'; -select a,b,c,d,sha1(t) from t1 order by c,a; -a b c d sha1(t) -a 1110 a 1 558a30713786aa72f66abc1e6a521d55aacdeeb5 -b 1110 a 2 NULL -a 1110 b 3 2b6515f29c20b8e9e17cc597527e516c0de8d612 -b 1110 b 4 b238654911689bfb626a3ef9dba4a1ca074e6a5e -update t1 set t=@v2 where b+d=1112; -update t1 set t=@v4 where b+d=1114; -select a,b,c,d,sha1(t) from t1 order by c,a; -a b c d sha1(t) -a 1110 a 1 558a30713786aa72f66abc1e6a521d55aacdeeb5 -b 1110 a 2 b238654911689bfb626a3ef9dba4a1ca074e6a5e -a 1110 b 3 2b6515f29c20b8e9e17cc597527e516c0de8d612 -b 1110 b 4 NULL -delete from t1 where a='a' and b=1110 and c='a'; -delete from t1 where a='b' and c='a'; -delete from t1 where d=3; -delete from t1 where b+d=1114; -select count(*) from t1; -count(*) -0 -drop table t1; -create table t1( -a int, -blob_nn blob not null, -text_nn text not null, -blob_nl blob, -text_nl text, -primary key(a) -) engine=ndb; -insert into t1(a) values (1); -Warnings: -Warning 1364 Field 'blob_nn' doesn't have a default value -Warning 1364 Field 'text_nn' doesn't have a default value -insert into t1(a, text_nl) values (2, 'MySQL Cluster NDB'); -Warnings: -Warning 1364 Field 'blob_nn' doesn't have a default value -Warning 1364 Field 'text_nn' doesn't have a default value -select a, length(blob_nn), length(text_nn), blob_nl, text_nl from t1 order by a; -a length(blob_nn) length(text_nn) blob_nl text_nl -1 0 0 NULL NULL -2 0 0 NULL MySQL Cluster NDB -drop table t1; diff --git a/mysql-test/suite/ndb/r/ndb_blob_partition.result b/mysql-test/suite/ndb/r/ndb_blob_partition.result deleted file mode 100644 index b08a91f0cdd..00000000000 --- a/mysql-test/suite/ndb/r/ndb_blob_partition.result +++ /dev/null @@ -1,104 +0,0 @@ -drop table if exists t1; -create table t1 ( -a mediumint not null, -b text not null, -c int not null, -d longblob, -primary key using hash (a,c), -unique key (c) -) -engine=ndb -partition by range (c) -partitions 3 -( partition p1 values less than (200), -partition p2 values less than (300), -partition p3 values less than (400)); -insert into t1 values (1, @v1, 101, @v2); -insert into t1 values (1, @v2, 102, @v3); -insert into t1 values (1, @v3, 103, @v4); -insert into t1 values (2, @v4, 201, @v5); -insert into t1 values (2, @v5, 202, @v6); -insert into t1 values (2, @v6, 203, @v7); -insert into t1 values (3, @v7, 301, @v8); -insert into t1 values (3, @v8, 302, @v9); -insert into t1 values (3, @v9, 303, @v1); -select a, sha1(b), c, sha1(d) from t1 order by a; -a sha1(b) c sha1(d) -1 1d42dd9090cf78314a06665d4ea938c35cc760f4 101 10d3c783026b310218d10b7188da96a2401648c6 -1 10d3c783026b310218d10b7188da96a2401648c6 102 a33549d9844092289a58ac348dd59f09fc28406a -1 a33549d9844092289a58ac348dd59f09fc28406a 103 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c -2 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c 201 70fc9a7d08beebc522258bfb02000a30c77a8f1d -2 70fc9a7d08beebc522258bfb02000a30c77a8f1d 202 090565c580809efed3d369481a4bbb168b20713e -2 090565c580809efed3d369481a4bbb168b20713e 203 1e0070bec426871a46291de27b9bd6e4255ab4e5 -3 1e0070bec426871a46291de27b9bd6e4255ab4e5 301 acbaba01bc2e682f015f40e79d9cbe475db3002e -3 acbaba01bc2e682f015f40e79d9cbe475db3002e 302 9ee30d99162574f79c66ae95cdf132dcf9cbc259 -3 9ee30d99162574f79c66ae95cdf132dcf9cbc259 303 1d42dd9090cf78314a06665d4ea938c35cc760f4 -select a, sha1(b), c, sha1(d) from t1 where a = 1 and c = 101; -a sha1(b) c sha1(d) -1 1d42dd9090cf78314a06665d4ea938c35cc760f4 101 10d3c783026b310218d10b7188da96a2401648c6 -select a, sha1(b), c, sha1(d) from t1 where a = 2 and c = 201; -a sha1(b) c sha1(d) -2 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c 201 70fc9a7d08beebc522258bfb02000a30c77a8f1d -select a, sha1(b), c, sha1(d) from t1 where a = 3 and c = 301; -a sha1(b) c sha1(d) -3 1e0070bec426871a46291de27b9bd6e4255ab4e5 301 acbaba01bc2e682f015f40e79d9cbe475db3002e -update t1 set b = @v3, d = @v4 where a = 1 and c = 102; -update t1 set b = @v6, d = @v7 where a = 2 and c = 202; -update t1 set b = @v9, d = @v1 where a = 3 and c = 302; -select a, sha1(b), c, sha1(d) from t1 order by a; -a sha1(b) c sha1(d) -1 1d42dd9090cf78314a06665d4ea938c35cc760f4 101 10d3c783026b310218d10b7188da96a2401648c6 -1 a33549d9844092289a58ac348dd59f09fc28406a 102 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c -1 a33549d9844092289a58ac348dd59f09fc28406a 103 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c -2 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c 201 70fc9a7d08beebc522258bfb02000a30c77a8f1d -2 090565c580809efed3d369481a4bbb168b20713e 202 1e0070bec426871a46291de27b9bd6e4255ab4e5 -2 090565c580809efed3d369481a4bbb168b20713e 203 1e0070bec426871a46291de27b9bd6e4255ab4e5 -3 1e0070bec426871a46291de27b9bd6e4255ab4e5 301 acbaba01bc2e682f015f40e79d9cbe475db3002e -3 9ee30d99162574f79c66ae95cdf132dcf9cbc259 302 1d42dd9090cf78314a06665d4ea938c35cc760f4 -3 9ee30d99162574f79c66ae95cdf132dcf9cbc259 303 1d42dd9090cf78314a06665d4ea938c35cc760f4 -update t1 set b = @v4, d = @v5 where c = 103; -update t1 set b = @v7, d = @v8 where c = 203; -update t1 set b = @v1, d = @v2 where c = 303; -select a, sha1(b), c, sha1(d) from t1 order by a; -a sha1(b) c sha1(d) -1 1d42dd9090cf78314a06665d4ea938c35cc760f4 101 10d3c783026b310218d10b7188da96a2401648c6 -1 a33549d9844092289a58ac348dd59f09fc28406a 102 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c -1 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c 103 70fc9a7d08beebc522258bfb02000a30c77a8f1d -2 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c 201 70fc9a7d08beebc522258bfb02000a30c77a8f1d -2 090565c580809efed3d369481a4bbb168b20713e 202 1e0070bec426871a46291de27b9bd6e4255ab4e5 -2 1e0070bec426871a46291de27b9bd6e4255ab4e5 203 acbaba01bc2e682f015f40e79d9cbe475db3002e -3 1e0070bec426871a46291de27b9bd6e4255ab4e5 301 acbaba01bc2e682f015f40e79d9cbe475db3002e -3 9ee30d99162574f79c66ae95cdf132dcf9cbc259 302 1d42dd9090cf78314a06665d4ea938c35cc760f4 -3 1d42dd9090cf78314a06665d4ea938c35cc760f4 303 10d3c783026b310218d10b7188da96a2401648c6 -update t1 set b = @v5, d = @v6; -select a, sha1(b), c, sha1(d) from t1 order by a; -a sha1(b) c sha1(d) -1 70fc9a7d08beebc522258bfb02000a30c77a8f1d 101 090565c580809efed3d369481a4bbb168b20713e -1 70fc9a7d08beebc522258bfb02000a30c77a8f1d 102 090565c580809efed3d369481a4bbb168b20713e -1 70fc9a7d08beebc522258bfb02000a30c77a8f1d 103 090565c580809efed3d369481a4bbb168b20713e -2 70fc9a7d08beebc522258bfb02000a30c77a8f1d 201 090565c580809efed3d369481a4bbb168b20713e -2 70fc9a7d08beebc522258bfb02000a30c77a8f1d 202 090565c580809efed3d369481a4bbb168b20713e -2 70fc9a7d08beebc522258bfb02000a30c77a8f1d 203 090565c580809efed3d369481a4bbb168b20713e -3 70fc9a7d08beebc522258bfb02000a30c77a8f1d 301 090565c580809efed3d369481a4bbb168b20713e -3 70fc9a7d08beebc522258bfb02000a30c77a8f1d 302 090565c580809efed3d369481a4bbb168b20713e -3 70fc9a7d08beebc522258bfb02000a30c77a8f1d 303 090565c580809efed3d369481a4bbb168b20713e -update t1 set b = @v1, d = @v2 where 100 < c and c < 200; -update t1 set b = @v4, d = @v5 where 200 < c and c < 300; -update t1 set b = @v7, d = @v8 where 300 < c and c < 400; -select a, sha1(b), c, sha1(d) from t1 order by a; -a sha1(b) c sha1(d) -1 1d42dd9090cf78314a06665d4ea938c35cc760f4 101 10d3c783026b310218d10b7188da96a2401648c6 -1 1d42dd9090cf78314a06665d4ea938c35cc760f4 102 10d3c783026b310218d10b7188da96a2401648c6 -1 1d42dd9090cf78314a06665d4ea938c35cc760f4 103 10d3c783026b310218d10b7188da96a2401648c6 -2 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c 201 70fc9a7d08beebc522258bfb02000a30c77a8f1d -2 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c 202 70fc9a7d08beebc522258bfb02000a30c77a8f1d -2 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c 203 70fc9a7d08beebc522258bfb02000a30c77a8f1d -3 1e0070bec426871a46291de27b9bd6e4255ab4e5 301 acbaba01bc2e682f015f40e79d9cbe475db3002e -3 1e0070bec426871a46291de27b9bd6e4255ab4e5 302 acbaba01bc2e682f015f40e79d9cbe475db3002e -3 1e0070bec426871a46291de27b9bd6e4255ab4e5 303 acbaba01bc2e682f015f40e79d9cbe475db3002e -delete from t1 where a = 1 and c = 101; -delete from t1 where c = 102; -delete from t1; -select a, sha1(b), c, sha1(d) from t1 order by a; -a sha1(b) c sha1(d) -drop table t1; diff --git a/mysql-test/suite/ndb/r/ndb_bug26793.result b/mysql-test/suite/ndb/r/ndb_bug26793.result deleted file mode 100644 index a9a8a798546..00000000000 --- a/mysql-test/suite/ndb/r/ndb_bug26793.result +++ /dev/null @@ -1,8 +0,0 @@ -DROP TABLE IF EXISTS t1; -CREATE TABLE `test` ( -`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY , -`t` VARCHAR( 10 ) NOT NULL -) ENGINE = ndbcluster; -GRANT USAGE ON *.* TO user1@localhost IDENTIFIED BY 'pass'; -DROP TABLE `test`.`test`; -drop user user1@localhost; diff --git a/mysql-test/suite/ndb/r/ndb_bug31477.result b/mysql-test/suite/ndb/r/ndb_bug31477.result deleted file mode 100644 index 002a928b485..00000000000 --- a/mysql-test/suite/ndb/r/ndb_bug31477.result +++ /dev/null @@ -1,98 +0,0 @@ -drop table if exists t1; -create table t1(a int primary key, b int, c int, unique(b)) engine = ndb; -insert into t1 values (2,2,2); -insert into t1 values (3,3,3); -insert into t1 values (4,4,4); -begin; -insert into t1 values (1,1,1); -begin; -update t1 set c = 2 where b = 1; -ERROR HY000: Lock wait timeout exceeded; try restarting transaction -rollback; -rollback; -drop table t1; -create table t1(a int primary key, b int, c int, key(b)) engine = ndb; -insert into t1 values (2,2,2); -insert into t1 values (3,3,3); -insert into t1 values (4,4,4); -begin; -insert into t1 values (1,1,1); -begin; -update t1 set c = 2 where b = 1; -ERROR HY000: Lock wait timeout exceeded; try restarting transaction -rollback; -rollback; -drop table t1; ---con1 -create table t1(a int primary key, b int, c int, key(b)) engine = ndb; -insert into t1 values (1,1,1); -insert into t1 values (2,2,2); -insert into t1 values (3,3,3); -insert into t1 values (4,4,4); -begin; -update t1 set c = 10 where a = 1; -update t1 set c = 20 where a = 1; -update t1 set c = 30 where a = 1; ---con1 c=30 -select * from t1 where b >= 1 order by b; -a b c -1 1 30 -2 2 2 -3 3 3 -4 4 4 ---con2 c=1 -select * from t1 where b >= 1 order by b; -a b c -1 1 1 -2 2 2 -3 3 3 -4 4 4 ---con1 -delete from t1 where a = 1; ---con1 c=none -select * from t1 where b >= 1 order by b; -a b c -2 2 2 -3 3 3 -4 4 4 ---con2 c=1 -select * from t1 where b >= 1 order by b; -a b c -1 1 1 -2 2 2 -3 3 3 -4 4 4 ---con1 -commit; ---con1 c=none -select * from t1 where b >= 1 order by b; -a b c -2 2 2 -3 3 3 -4 4 4 ---con2 c=none -select * from t1 where b >= 1 order by b; -a b c -2 2 2 -3 3 3 -4 4 4 ---con1 -begin; -insert into t1 values (1,1,1); -update t1 set c = 10 where a = 1; -update t1 set c = 20 where a = 1; -update t1 set c = 30 where a = 1; ---con1 c=30 -select * from t1 where b >= 1 order by b; -a b c -1 1 30 -2 2 2 -3 3 3 -4 4 4 ---con2 c=none -select * from t1 where b >= 1 order by b; -a b c -2 2 2 -3 3 3 -4 4 4 -drop table t1; diff --git a/mysql-test/suite/ndb/r/ndb_cache.result b/mysql-test/suite/ndb/r/ndb_cache.result deleted file mode 100644 index 478663b1aa1..00000000000 --- a/mysql-test/suite/ndb/r/ndb_cache.result +++ /dev/null @@ -1,191 +0,0 @@ -drop table if exists t1; -set GLOBAL query_cache_type=on; -set GLOBAL query_cache_size=1355776; -reset query cache; -flush status; -CREATE TABLE t1 ( pk int not null primary key, -a int, b int not null, c varchar(20)) ENGINE=ndbcluster; -insert into t1 value (1, 2, 3, 'First row'); -select * from t1; -pk a b c -1 2 3 First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -select * from t1; -pk a b c -1 2 3 First row -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 1 -update t1 set a=3 where pk=1; -select * from t1; -pk a b c -1 3 3 First row -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 2 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 1 -insert into t1 value (2, 7, 8, 'Second row'); -insert into t1 value (4, 5, 6, 'Fourth row'); -select * from t1 order by pk; -pk a b c -1 3 3 First row -2 7 8 Second row -4 5 6 Fourth row -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 3 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 1 -select * from t1 order by pk; -pk a b c -1 3 3 First row -2 7 8 Second row -4 5 6 Fourth row -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 2 -select * from t1 where b=3; -pk a b c -1 3 3 First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 2 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 2 -select * from t1 where b=3; -pk a b c -1 3 3 First row -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 3 -delete from t1 where c='Fourth row'; -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 0 -select * from t1 where b=3; -pk a b c -1 3 3 First row -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 3 -use test; -select * from t1 order by pk; -pk a b c -1 3 3 First row -2 7 8 Second row -select * from t1 where b=3; -pk a b c -1 3 3 First row -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 4 -update t1 set a=4 where b=3; -use test; -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 0 -select * from t1 order by pk desc; -pk a b c -2 7 8 Second row -1 4 3 First row -select * from t1 order by pk desc; -pk a b c -2 7 8 Second row -1 4 3 First row -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 7 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 5 -select * from t1 order by pk desc; -pk a b c -2 7 8 Second row -1 4 3 First row -select * from t1 order by pk desc; -pk a b c -2 7 8 Second row -1 4 3 First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 7 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 7 -begin; -update t1 set a=5 where pk=1; -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 0 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 7 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 7 -select * from t1 order by pk desc; -pk a b c -2 7 8 Second row -1 4 3 First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 8 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 7 -commit; -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 8 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 7 -select * from t1 order by pk desc; -pk a b c -2 7 8 Second row -1 5 3 First row -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 9 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 7 -select * from t1 order by pk desc; -pk a b c -2 7 8 Second row -1 5 3 First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 9 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 8 -drop table t1; -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 0 -SET GLOBAL query_cache_size=0; diff --git a/mysql-test/suite/ndb/r/ndb_cache2.result b/mysql-test/suite/ndb/r/ndb_cache2.result deleted file mode 100644 index 2876002f864..00000000000 --- a/mysql-test/suite/ndb/r/ndb_cache2.result +++ /dev/null @@ -1,623 +0,0 @@ -drop table if exists t1, t2, t3, t4, t5; -set GLOBAL query_cache_type=on; -set GLOBAL query_cache_size=1355776; -set GLOBAL ndb_cache_check_time=100; -reset query cache; -flush status; -CREATE TABLE t1 ( -pk int not null primary key, -a1 int, -b1 int not null, -c1 varchar(20) -) ENGINE=ndb; -CREATE TABLE t2 ( -pk int not null primary key, -a2 int, -b2 int not null -) ENGINE=ndb; -CREATE TABLE t3 ( -pk int not null primary key, -a3 int, -b3 int not null, -c3 int not null, -d3 varchar(20) -) ENGINE=ndb; -CREATE TABLE t4 ( -a4 int, -b4 int not null, -c4 char(20) -) ENGINE=ndbcluster; -CREATE TABLE t5 ( -pk int not null primary key, -a5 int, -b5 int not null, -c5 varchar(255) -) ENGINE=ndbcluster; -insert into t1 value (1, 2, 3, 'First row'); -insert into t2 value (1, 2, 3); -insert into t3 value (1, 2, 3, 4, '3 - First row'); -insert into t4 value (2, 3, '4 - First row'); -insert into t5 value (1, 2, 3, '5 - First row'); -select * from t1; -pk a1 b1 c1 -1 2 3 First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -select * from t1; -pk a1 b1 c1 -1 2 3 First row -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 1 -update t1 set a1=3 where pk=1; -select * from t1; -pk a1 b1 c1 -1 3 3 First row -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 2 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 1 -insert into t1 value (2, 7, 8, 'Second row'); -insert into t1 value (4, 5, 6, 'Fourth row'); -select * from t1 order by pk desc; -pk a1 b1 c1 -4 5 6 Fourth row -2 7 8 Second row -1 3 3 First row -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 3 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 1 -select * from t1 order by pk desc; -pk a1 b1 c1 -4 5 6 Fourth row -2 7 8 Second row -1 3 3 First row -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 2 -select * from t1 where b1=3; -pk a1 b1 c1 -1 3 3 First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 2 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 2 -select * from t1 where b1=3; -pk a1 b1 c1 -1 3 3 First row -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 3 -delete from t1 where c1='Fourth row'; -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 0 -select * from t1 where b1=3; -pk a1 b1 c1 -1 3 3 First row -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 3 -use test; -select * from t1 order by pk desc; -pk a1 b1 c1 -2 7 8 Second row -1 3 3 First row -select * from t1 where b1=3; -pk a1 b1 c1 -1 3 3 First row -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 4 -update t1 set a1=4 where b1=3; -use test; -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 0 -select * from t1 order by pk desc; -pk a1 b1 c1 -2 7 8 Second row -1 4 3 First row -select * from t1 order by pk desc; -pk a1 b1 c1 -2 7 8 Second row -1 4 3 First row -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 7 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 5 -select * from t1 order by pk desc; -pk a1 b1 c1 -2 7 8 Second row -1 4 3 First row -select * from t1 order by pk desc; -pk a1 b1 c1 -2 7 8 Second row -1 4 3 First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 7 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 7 -select * from t2; -pk a2 b2 -1 2 3 -select * from t3; -pk a3 b3 c3 d3 -1 2 3 4 3 - First row -select * from t4; -a4 b4 c4 -2 3 4 - First row -select * from t5; -pk a5 b5 c5 -1 2 3 5 - First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 5 -flush status; -begin; -update t1 set a1=5 where pk=1; -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 4 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 0 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -select * from t1 order by pk desc; -pk a1 b1 c1 -2 7 8 Second row -1 4 3 First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 5 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -commit; -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 5 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -select * from t1 order by pk desc; -pk a1 b1 c1 -2 7 8 Second row -1 5 3 First row -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 2 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -select * from t1 order by pk desc; -pk a1 b1 c1 -2 7 8 Second row -1 5 3 First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 5 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 2 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 1 -flush status; -begin; -update t1 set a1=6 where pk=1; -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 4 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 0 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -select * from t1 order by pk desc; -pk a1 b1 c1 -2 7 8 Second row -1 5 3 First row -select * from t1 order by pk desc; -pk a1 b1 c1 -2 7 8 Second row -1 5 3 First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 5 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 1 -select * from t1 order by pk desc; -pk a1 b1 c1 -2 7 8 Second row -1 6 3 First row -select * from t1 order by pk desc; -pk a1 b1 c1 -2 7 8 Second row -1 6 3 First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 5 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 1 -commit; -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 5 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 1 -select * from t1 order by pk desc; -pk a1 b1 c1 -2 7 8 Second row -1 6 3 First row -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 2 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 1 -select * from t1 order by pk desc; -pk a1 b1 c1 -2 7 8 Second row -1 6 3 First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 5 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 2 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 2 -flush status; -begin; -insert into t1 set pk=5, a1=6, b1=3, c1="New row"; -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 4 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 0 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -select * from t1 where pk=5; -pk a1 b1 c1 -select * from t1 order by pk desc; -pk a1 b1 c1 -2 7 8 Second row -1 6 3 First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 6 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 2 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -select * from t1 where pk=5; -pk a1 b1 c1 -5 6 3 New row -select * from t1 where pk=5; -pk a1 b1 c1 -5 6 3 New row -select * from t1 order by pk desc; -pk a1 b1 c1 -5 6 3 New row -2 7 8 Second row -1 6 3 First row -select * from t1 order by pk desc; -pk a1 b1 c1 -5 6 3 New row -2 7 8 Second row -1 6 3 First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 6 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 2 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -commit; -select * from t1 order by pk desc; -pk a1 b1 c1 -5 6 3 New row -2 7 8 Second row -1 6 3 First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 5 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 3 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -flush status; -begin; -delete from t1 where pk=2; -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 4 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 0 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -select * from t1 where pk=2; -pk a1 b1 c1 -2 7 8 Second row -select * from t1 order by pk desc; -pk a1 b1 c1 -5 6 3 New row -2 7 8 Second row -1 6 3 First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 6 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 2 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -select * from t1 where pk=2; -pk a1 b1 c1 -select * from t1 order by pk desc; -pk a1 b1 c1 -5 6 3 New row -1 6 3 First row -select * from t1 order by pk desc; -pk a1 b1 c1 -5 6 3 New row -1 6 3 First row -select * from t1 where pk=2; -pk a1 b1 c1 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 6 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 2 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -commit; -select * from t1 order by pk desc; -pk a1 b1 c1 -5 6 3 New row -1 6 3 First row -select * from t1 where pk=2; -pk a1 b1 c1 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 6 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 4 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -flush status; -begin; -update t1 set a1=9 where pk=1; -update t2 set a2=9 where pk=1; -update t3 set a3=9 where pk=1; -update t4 set a4=9 where a4=2; -update t5 set a5=9 where pk=1; -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 0 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 0 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -select * from t1 order by pk desc; -pk a1 b1 c1 -5 6 3 New row -1 6 3 First row -select * from t2; -pk a2 b2 -1 2 3 -select * from t3; -pk a3 b3 c3 d3 -1 2 3 4 3 - First row -select * from t4; -a4 b4 c4 -2 3 4 - First row -select * from t5; -pk a5 b5 c5 -1 2 3 5 - First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 5 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 5 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -select * from t1 order by pk desc; -pk a1 b1 c1 -5 6 3 New row -1 9 3 First row -select * from t1 order by pk desc; -pk a1 b1 c1 -5 6 3 New row -1 9 3 First row -select * from t2; -pk a2 b2 -1 9 3 -select * from t3; -pk a3 b3 c3 d3 -1 9 3 4 3 - First row -select * from t4; -a4 b4 c4 -9 3 4 - First row -select * from t5; -pk a5 b5 c5 -1 9 3 5 - First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 5 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 5 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -commit; -select * from t1 order by pk desc; -pk a1 b1 c1 -5 6 3 New row -1 9 3 First row -select * from t2; -pk a2 b2 -1 9 3 -select * from t3; -pk a3 b3 c3 d3 -1 9 3 4 3 - First row -select * from t4; -a4 b4 c4 -9 3 4 - First row -select * from t5; -pk a5 b5 c5 -1 9 3 5 - First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 5 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 10 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -select * from t1 order by pk desc; -pk a1 b1 c1 -5 6 3 New row -1 9 3 First row -select * from t2; -pk a2 b2 -1 9 3 -select * from t3; -pk a3 b3 c3 d3 -1 9 3 4 3 - First row -select * from t4; -a4 b4 c4 -9 3 4 - First row -select * from t5; -pk a5 b5 c5 -1 9 3 5 - First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 5 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 10 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 5 -select * from t1 order by pk desc; -pk a1 b1 c1 -5 6 3 New row -1 9 3 First row -select * from t2; -pk a2 b2 -1 9 3 -select * from t3; -pk a3 b3 c3 d3 -1 9 3 4 3 - First row -select * from t4; -a4 b4 c4 -9 3 4 - First row -select * from t5; -pk a5 b5 c5 -1 9 3 5 - First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 5 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 10 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 10 -select * from t1 order by pk desc; -pk a1 b1 c1 -5 6 3 New row -1 9 3 First row -select * from t2; -pk a2 b2 -1 9 3 -select * from t3; -pk a3 b3 c3 d3 -1 9 3 4 3 - First row -select * from t4; -a4 b4 c4 -9 3 4 - First row -select * from t5; -pk a5 b5 c5 -1 9 3 5 - First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 5 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 10 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 15 -drop table t1, t2, t3, t4, t5; -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 0 -SET GLOBAL query_cache_size=0; -SET GLOBAL ndb_cache_check_time=0; diff --git a/mysql-test/suite/ndb/r/ndb_cache_multi.result b/mysql-test/suite/ndb/r/ndb_cache_multi.result deleted file mode 100644 index 388131ec30a..00000000000 --- a/mysql-test/suite/ndb/r/ndb_cache_multi.result +++ /dev/null @@ -1,74 +0,0 @@ -drop table if exists t1, t2; -set GLOBAL query_cache_type=on; -set GLOBAL query_cache_size=1355776; -reset query cache; -flush status; -set GLOBAL query_cache_type=on; -set GLOBAL query_cache_size=1355776; -reset query cache; -flush status; -create table t1 (a int) engine=ndbcluster; -create table t2 (a int) engine=ndbcluster; -insert into t1 value (2); -insert into t2 value (3); -select * from t1; -a -2 -select * from t2; -a -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 2 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 2 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 0 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 0 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -select * from t1; -a -2 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -update t1 set a=3 where a=2; -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 2 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 2 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -select * from t1; -a -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 2 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 3 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -drop table t1, t2; -set GLOBAL query_cache_size=0; -set GLOBAL query_cache_size=0; diff --git a/mysql-test/suite/ndb/r/ndb_cache_multi2.result b/mysql-test/suite/ndb/r/ndb_cache_multi2.result deleted file mode 100644 index 53767bb6d3c..00000000000 --- a/mysql-test/suite/ndb/r/ndb_cache_multi2.result +++ /dev/null @@ -1,75 +0,0 @@ -drop table if exists t1, t2; -== Connected to server1 == -set GLOBAL query_cache_type=on; -set GLOBAL query_cache_size=1355776; -set GLOBAL ndb_cache_check_time=1; -reset query cache; -flush status; -== Connected to server2 == -set GLOBAL query_cache_type=on; -set GLOBAL query_cache_size=1355776; -set GLOBAL ndb_cache_check_time=1; -reset query cache; -flush status; -== Connected to server1 == -create table t1 (a int) engine=ndbcluster; -create table t2 (a int) engine=ndbcluster; -insert into t1 value (2); -insert into t2 value (3); -select * from t1; -a -2 -select a != 3 from t1; -a != 3 -1 -select * from t2; -a -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 3 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 3 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -== Connected to server2 == -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 0 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 0 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -select * from t1; -a -2 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -update t1 set a=3 where a=2; -== Connected to server1 == -select * from t1; -a -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 3 -drop table t1, t2; -set GLOBAL query_cache_size=0; -set GLOBAL ndb_cache_check_time=0; -reset query cache; -flush status; -set GLOBAL query_cache_size=0; -set GLOBAL ndb_cache_check_time=0; -reset query cache; -flush status; diff --git a/mysql-test/suite/ndb/r/ndb_charset.result b/mysql-test/suite/ndb/r/ndb_charset.result deleted file mode 100644 index e84c906dd7e..00000000000 --- a/mysql-test/suite/ndb/r/ndb_charset.result +++ /dev/null @@ -1,320 +0,0 @@ -drop table if exists t1; -create table t1 ( -a char(3) character set latin1 collate latin1_bin primary key -) engine=ndb; -insert into t1 values('aAa'); -insert into t1 values('aaa'); -insert into t1 values('AAA'); -select * from t1 order by a; -a -AAA -aAa -aaa -select * from t1 where a = 'aAa'; -a -aAa -select * from t1 where a = 'aaa'; -a -aaa -select * from t1 where a = 'AaA'; -a -select * from t1 where a = 'AAA'; -a -AAA -drop table t1; -create table t1 ( -a char(3) character set latin1 collate latin1_swedish_ci primary key -) engine=ndb; -insert into t1 values('aAa'); -insert into t1 values('aaa'); -ERROR 23000: Duplicate entry 'aaa' for key 'PRIMARY' -insert into t1 values('AAA'); -ERROR 23000: Duplicate entry 'AAA' for key 'PRIMARY' -select * from t1 order by a; -a -aAa -select * from t1 where a = 'aAa'; -a -aAa -select * from t1 where a = 'aaa'; -a -aAa -select * from t1 where a = 'AaA'; -a -aAa -select * from t1 where a = 'AAA'; -a -aAa -drop table t1; -create table t1 ( -a varchar(20) character set latin1 collate latin1_swedish_ci primary key -) engine=ndb; -insert into t1 values ('A'),('b '),('C '),('d '),('E'),('f'); -insert into t1 values('b'); -ERROR 23000: Duplicate entry 'b' for key 'PRIMARY' -insert into t1 values('a '); -ERROR 23000: Duplicate entry 'a ' for key 'PRIMARY' -select a,length(a) from t1 order by a; -a length(a) -A 1 -b 2 -C 3 -d 7 -E 1 -f 1 -select a,length(a) from t1 order by a desc; -a length(a) -f 1 -E 1 -d 7 -C 3 -b 2 -A 1 -select * from t1 where a = 'a'; -a -A -select * from t1 where a = 'a '; -a -A -select * from t1 where a = 'd'; -a -d -drop table t1; -create table t1 ( -p int primary key, -a char(3) character set latin1 collate latin1_bin not null, -unique key(a) -) engine=ndb; -insert into t1 values(1, 'aAa'); -insert into t1 values(2, 'aaa'); -insert into t1 values(3, 'AAA'); -select * from t1 order by p; -p a -1 aAa -2 aaa -3 AAA -select * from t1 where a = 'aAa'; -p a -1 aAa -select * from t1 where a = 'aaa'; -p a -2 aaa -select * from t1 where a = 'AaA'; -p a -select * from t1 where a = 'AAA'; -p a -3 AAA -drop table t1; -create table t1 ( -p int primary key, -a char(3) character set latin1 collate latin1_swedish_ci not null, -unique key(a) -) engine=ndb; -insert into t1 values(1, 'aAa'); -insert into t1 values(2, 'aaa'); -ERROR 23000: Duplicate entry 'aaa' for key 'a' -insert into t1 values(3, 'AAA'); -ERROR 23000: Duplicate entry 'AAA' for key 'a' -select * from t1 order by p; -p a -1 aAa -select * from t1 where a = 'aAa'; -p a -1 aAa -select * from t1 where a = 'aaa'; -p a -1 aAa -select * from t1 where a = 'AaA'; -p a -1 aAa -select * from t1 where a = 'AAA'; -p a -1 aAa -drop table t1; -create table t1 ( -p int primary key, -a varchar(20) character set latin1 collate latin1_swedish_ci not null, -unique key(a) -) engine=ndb; -insert into t1 values (1,'A'),(2,'b '),(3,'C '),(4,'d '),(5,'E'),(6,'f'); -insert into t1 values(99,'b'); -ERROR 23000: Duplicate entry 'b' for key 'a' -insert into t1 values(99,'a '); -ERROR 23000: Duplicate entry 'a ' for key 'a' -select a,length(a) from t1 order by a; -a length(a) -A 1 -b 2 -C 3 -d 7 -E 1 -f 1 -select a,length(a) from t1 order by a desc; -a length(a) -f 1 -E 1 -d 7 -C 3 -b 2 -A 1 -select * from t1 where a = 'a'; -p a -1 A -select * from t1 where a = 'a '; -p a -1 A -select * from t1 where a = 'd'; -p a -4 d -drop table t1; -create table t1 ( -p int primary key, -a char(3) character set latin1 collate latin1_bin not null, -index(a) -) engine=ndb; -insert into t1 values(1, 'aAa'); -insert into t1 values(2, 'aaa'); -insert into t1 values(3, 'AAA'); -insert into t1 values(4, 'aAa'); -insert into t1 values(5, 'aaa'); -insert into t1 values(6, 'AAA'); -select * from t1 order by p; -p a -1 aAa -2 aaa -3 AAA -4 aAa -5 aaa -6 AAA -select * from t1 where a = 'aAa' order by p; -p a -1 aAa -4 aAa -select * from t1 where a = 'aaa' order by p; -p a -2 aaa -5 aaa -select * from t1 where a = 'AaA' order by p; -p a -select * from t1 where a = 'AAA' order by p; -p a -3 AAA -6 AAA -drop table t1; -create table t1 ( -p int primary key, -a char(3) character set latin1 collate latin1_swedish_ci not null, -index(a) -) engine=ndb; -insert into t1 values(1, 'aAa'); -insert into t1 values(2, 'aaa'); -insert into t1 values(3, 'AAA'); -insert into t1 values(4, 'aAa'); -insert into t1 values(5, 'aaa'); -insert into t1 values(6, 'AAA'); -select * from t1 order by p; -p a -1 aAa -2 aaa -3 AAA -4 aAa -5 aaa -6 AAA -select * from t1 where a = 'aAa' order by p; -p a -1 aAa -2 aaa -3 AAA -4 aAa -5 aaa -6 AAA -select * from t1 where a = 'aaa' order by p; -p a -1 aAa -2 aaa -3 AAA -4 aAa -5 aaa -6 AAA -select * from t1 where a = 'AaA' order by p; -p a -1 aAa -2 aaa -3 AAA -4 aAa -5 aaa -6 AAA -select * from t1 where a = 'AAA' order by p; -p a -1 aAa -2 aaa -3 AAA -4 aAa -5 aaa -6 AAA -drop table t1; -create table t1 ( -p int primary key, -a varchar(20) character set latin1 collate latin1_swedish_ci not null, -index(a, p) -) engine=ndb; -insert into t1 values (1,'A'),(2,'b '),(3,'C '),(4,'d '),(5,'E'),(6,'f'); -insert into t1 values (7,'a'),(8,'B '),(9,'c '),(10,'D'),(11,'e'),(12,'F '); -select p,a,length(a) from t1 order by a, p; -p a length(a) -1 A 1 -7 a 1 -2 b 2 -8 B 2 -3 C 3 -9 c 3 -4 d 7 -10 D 1 -5 E 1 -11 e 1 -6 f 1 -12 F 3 -select * from t1 where a = 'a ' order by a desc, p desc; -p a -7 a -1 A -select * from t1 where a >= 'D' order by a, p; -p a -4 d -10 D -5 E -11 e -6 f -12 F -select * from t1 where a < 'D' order by a, p; -p a -1 A -7 a -2 b -8 B -3 C -9 c -select count(*) from t1 x, t1 y, t1 z where x.a = y.a and y.a = z.a; -count(*) -48 -drop table t1; -create table t1 ( -a char(10) primary key -) engine=ndbcluster default charset=latin1; -insert into t1 values ('aaabb'); -select * from t1; -a -aaabb -replace into t1 set a = 'AAABB'; -select * from t1; -a -AAABB -replace into t1 set a = 'aAaBb'; -select * from t1; -a -aAaBb -replace into t1 set a = 'aaabb'; -select * from t1; -a -aaabb -drop table t1; diff --git a/mysql-test/suite/ndb/r/ndb_condition_pushdown.result b/mysql-test/suite/ndb/r/ndb_condition_pushdown.result deleted file mode 100644 index f2b5b882f10..00000000000 --- a/mysql-test/suite/ndb/r/ndb_condition_pushdown.result +++ /dev/null @@ -1,1920 +0,0 @@ -DROP TABLE IF EXISTS t1,t2,t3,t4; -CREATE TABLE t1 ( -auto int(5) unsigned NOT NULL auto_increment, -string char(10), -vstring varchar(10), -bin binary(2), -vbin varbinary(7), -tiny tinyint(4) DEFAULT '0' NOT NULL , -short smallint(6) DEFAULT '1' NOT NULL , -medium mediumint(8) DEFAULT '0' NOT NULL, -long_int int(11) DEFAULT '0' NOT NULL, -longlong bigint(13) DEFAULT '0' NOT NULL, -real_float float(13,1) DEFAULT 0.0 NOT NULL, -real_double double(16,4), -real_decimal decimal(16,4), -utiny tinyint(3) unsigned DEFAULT '0' NOT NULL, -ushort smallint(5) unsigned zerofill DEFAULT '00000' NOT NULL, -umedium mediumint(8) unsigned DEFAULT '0' NOT NULL, -ulong int(11) unsigned DEFAULT '0' NOT NULL, -ulonglong bigint(13) unsigned DEFAULT '0' NOT NULL, -bits bit(3), -options enum('zero','one','two','three','four') not null, -flags set('zero','one','two','three','four') not null, -date_field date, -year_field year, -time_field time, -date_time datetime, -time_stamp timestamp, -PRIMARY KEY (auto) -) engine=ndb; -insert into t1 values -(NULL,"aaaa","aaaa",0xAAAA,0xAAAA,-1,-1,-1,-1,-1,1.1,1.1,1.1,1,1,1,1,1, -b'001','one','one', -'1901-01-01','1901', -'01:01:01','1901-01-01 01:01:01',NULL), -(NULL,"bbbb","bbbb",0xBBBB,0xBBBB,-2,-2,-2,-2,-2,2.2,2.2,2.2,2,2,2,2,2, -b'010','two','one,two', -'1902-02-02','1902', -'02:02:02','1902-02-02 02:02:02',NULL), -(NULL,"cccc","cccc",0xCCCC,0xCCCC,-3,-3,-3,-3,-3,3.3,3.3,3.3,3,3,3,3,3, -b'011','three','one,two,three', -'1903-03-03','1903', -'03:03:03','1903-03-03 03:03:03',NULL), -(NULL,"dddd","dddd",0xDDDD,0xDDDD,-4,-4,-4,-4,-4,4.4,4.4,4.4,4,4,4,4,4, -b'100','four','one,two,three,four', -'1904-04-04','1904', -'04:04:04','1904-04-04 04:04:04',NULL); -CREATE TABLE t2 (pk1 int unsigned NOT NULL PRIMARY KEY, attr1 int unsigned NOT NULL, attr2 int unsigned, attr3 VARCHAR(10) ) ENGINE=ndbcluster; -insert into t2 values (0,0,0, "a"),(1,1,1,"b"),(2,2,NULL,NULL),(3,3,3,"d"),(4,4,4,"e"),(5,5,5,"f"); -CREATE TABLE t3 (pk1 int unsigned NOT NULL PRIMARY KEY, attr1 int unsigned NOT NULL, attr2 bigint unsigned, attr3 tinyint unsigned, attr4 VARCHAR(10) ) ENGINE=ndbcluster; -insert into t3 values (0,0,0,0,"a"),(1,1,9223372036854775803,1,"b"),(2,2,9223372036854775804,2,"c"),(3,3,9223372036854775805,3,"d"),(4,4,9223372036854775806,4,"e"),(5,5,9223372036854775807,5,"f"); -CREATE TABLE t4 (pk1 int unsigned NOT NULL PRIMARY KEY, attr1 int unsigned NOT NULL, attr2 bigint unsigned, attr3 tinyint unsigned, attr4 VARCHAR(10) , KEY (attr1)) ENGINE=ndbcluster; -insert into t4 values (0,0,0,0,"a"),(1,1,9223372036854775803,1,"b"),(2,2,9223372036854775804,2,"c"),(3,3,9223372036854775805,3,"d"),(4,4,9223372036854775806,4,"e"),(5,5,9223372036854775807,5,"f"); -set @old_optimizer_switch = @@session.optimizer_switch; -set optimizer_switch = "engine_condition_pushdown=off"; -select auto from t1 where -string = "aaaa" and -vstring = "aaaa" and -bin = 0xAAAA and -vbin = 0xAAAA and -tiny = -1 and -short = -1 and -medium = -1 and -long_int = -1 and -longlong = -1 and -real_float > 1.0 and real_float < 2.0 and -real_double > 1.0 and real_double < 2.0 and -real_decimal > 1.0 and real_decimal < 2.0 and -utiny = 1 and -ushort = 1 and -umedium = 1 and -ulong = 1 and -ulonglong = 1 and -bits = b'001' and -options = 'one' and -flags = 'one' and -date_field = '1901-01-01' and -year_field = '1901' and -time_field = '01:01:01' and -date_time = '1901-01-01 01:01:01' -order by auto; -auto -1 -select auto from t1 where -string != "aaaa" and -vstring != "aaaa" and -bin != 0xAAAA and -vbin != 0xAAAA and -tiny != -1 and -short != -1 and -medium != -1 and -long_int != -1 and -longlong != -1 and -(real_float < 1.0 or real_float > 2.0) and -(real_double < 1.0 or real_double > 2.0) and -(real_decimal < 1.0 or real_decimal > 2.0) and -utiny != 1 and -ushort != 1 and -umedium != 1 and -ulong != 1 and -ulonglong != 1 and -bits != b'001' and -options != 'one' and -flags != 'one' and -date_field != '1901-01-01' and -year_field != '1901' and -time_field != '01:01:01' and -date_time != '1901-01-01 01:01:01' -order by auto; -auto -2 -3 -4 -select auto from t1 where -string > "aaaa" and -vstring > "aaaa" and -bin > 0xAAAA and -vbin > 0xAAAA and -tiny < -1 and -short < -1 and -medium < -1 and -long_int < -1 and -longlong < -1 and -real_float > 1.1 and -real_double > 1.1 and -real_decimal > 1.1 and -utiny > 1 and -ushort > 1 and -umedium > 1 and -ulong > 1 and -ulonglong > 1 and -bits > b'001' and -(options = 'two' or options = 'three' or options = 'four') and -(flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field > '1901-01-01' and -year_field > '1901' and -time_field > '01:01:01' and -date_time > '1901-01-01 01:01:01' -order by auto; -auto -2 -3 -4 -select auto from t1 where -string >= "aaaa" and -vstring >= "aaaa" and -bin >= 0xAAAA and -vbin >= 0xAAAA and -tiny <= -1 and -short <= -1 and -medium <= -1 and -long_int <= -1 and -longlong <= -1 and -real_float >= 1.0 and -real_double >= 1.0 and -real_decimal >= 1.0 and -utiny >= 1 and -ushort >= 1 and -umedium >= 1 and -ulong >= 1 and -ulonglong >= 1 and -bits >= b'001' and -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field >= '1901-01-01' and -year_field >= '1901' and -time_field >= '01:01:01' and -date_time >= '1901-01-01 01:01:01' -order by auto; -auto -1 -2 -3 -4 -select auto from t1 where -string < "dddd" and -vstring < "dddd" and -bin < 0xDDDD and -vbin < 0xDDDD and -tiny > -4 and -short > -4 and -medium > -4 and -long_int > -4 and -longlong > -4 and -real_float < 4.4 and -real_double < 4.4 and -real_decimal < 4.4 and -utiny < 4 and -ushort < 4 and -umedium < 4 and -ulong < 4 and -ulonglong < 4 and -bits < b'100' and -(options = 'one' or options = 'two' or options = 'three') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three') and -date_field < '1904-01-01' and -year_field < '1904' and -time_field < '04:04:04' and -date_time < '1904-04-04 04:04:04' -order by auto; -auto -1 -2 -3 -select auto from t1 where -string <= "dddd" and -vstring <= "dddd" and -bin <= 0xDDDD and -vbin <= 0xDDDD and -tiny >= -4 and -short >= -4 and -medium >= -4 and -long_int >= -4 and -longlong >= -4 and -real_float <= 4.5 and -real_double <= 4.5 and -real_decimal <= 4.5 and -utiny <= 4 and -ushort <= 4 and -umedium <= 4 and -ulong <= 4 and -ulonglong <= 4 and -bits <= b'100' and -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field <= '1904-04-04' and -year_field <= '1904' and -time_field <= '04:04:04' and -date_time <= '1904-04-04 04:04:04' -order by auto; -auto -1 -2 -3 -4 -select auto from t1 where -string like "b%" and -vstring like "b%" and -bin like concat(0xBB, '%') and -vbin like concat(0xBB, '%') -order by auto; -auto -2 -select auto from t1 where -string not like "b%" and -vstring not like "b%" and -bin not like concat(0xBB, '%') and -vbin not like concat(0xBB, '%') -order by auto; -auto -1 -3 -4 -select auto from t1 where -(string between "aaaa" and "cccc") and -(vstring between "aaaa" and "cccc") and -(bin between 0xAAAA and 0xCCCC) and -(vbin between 0xAAAA and 0xCCCC) and -(tiny between -3 and -1) and -(short between -3 and -1) and -(medium between -3 and -1) and -(long_int between -3 and -1) and -(longlong between -3 and -1) and -(utiny between 1 and 3) and -(ushort between 1 and 3) and -(umedium between 1 and 3) and -(ulong between 1 and 3) and -(ulonglong between 1 and 3) and -(bits between b'001' and b'011') and -(options between 'one' and 'three') and -(flags between 'one' and 'one,two,three') and -(date_field between '1901-01-01' and '1903-03-03') and -(year_field between '1901' and '1903') and -(time_field between '01:01:01' and '03:03:03') and -(date_time between '1901-01-01 01:01:01' and '1903-03-03 03:03:03') -order by auto; -auto -1 -3 -select auto from t1 where -("aaaa" between string and string) and -("aaaa" between vstring and vstring) and -(0xAAAA between bin and bin) and -(0xAAAA between vbin and vbin) and -(-1 between tiny and tiny) and -(-1 between short and short) and -(-1 between medium and medium) and -(-1 between long_int and long_int) and -(-1 between longlong and longlong) and -(1 between utiny and utiny) and -(1 between ushort and ushort) and -(1 between umedium and umedium) and -(1 between ulong and ulong) and -(1 between ulonglong and ulonglong) and -(b'001' between bits and bits) and -('one' between options and options) and -('one' between flags and flags) and -('1901-01-01' between date_field and date_field) and -('1901' between year_field and year_field) and -('01:01:01' between time_field and time_field) and -('1901-01-01 01:01:01' between date_time and date_time) -order by auto; -auto -1 -select auto from t1 where -(string not between "aaaa" and "cccc") and -(vstring not between "aaaa" and "cccc") and -(bin not between 0xAAAA and 0xCCCC) and -(vbin not between 0xAAAA and 0xCCCC) and -(tiny not between -3 and -1) and -(short not between -3 and -1) and -(medium not between -3 and -1) and -(long_int not between -3 and -1) and -(longlong not between -3 and -1) and -(utiny not between 1 and 3) and -(ushort not between 1 and 3) and -(umedium not between 1 and 3) and -(ulong not between 1 and 3) and -(ulonglong not between 1 and 3) and -(bits not between b'001' and b'011') and -(options not between 'one' and 'three') and -(flags not between 'one' and 'one,two,three') and -(date_field not between '1901-01-01' and '1903-03-03') and -(year_field not between '1901' and '1903') and -(time_field not between '01:01:01' and '03:03:03') and -(date_time not between '1901-01-01 01:01:01' and '1903-03-03 03:03:03') -order by auto; -auto -4 -select auto from t1 where -("aaaa" not between string and string) and -("aaaa" not between vstring and vstring) and -(0xAAAA not between bin and bin) and -(0xAAAA not between vbin and vbin) and -(-1 not between tiny and tiny) and -(-1 not between short and short) and -(-1 not between medium and medium) and -(-1 not between long_int and long_int) and -(-1 not between longlong and longlong) and -(1 not between utiny and utiny) and -(1 not between ushort and ushort) and -(1 not between umedium and umedium) and -(1 not between ulong and ulong) and -(1 not between ulonglong and ulonglong) and -(b'001' not between bits and bits) and -('one' not between options and options) and -('one' not between flags and flags) and -('1901-01-01' not between date_field and date_field) and -('1901' not between year_field and year_field) and -('01:01:01' not between time_field and time_field) and -('1901-01-01 01:01:01' not between date_time and date_time) -order by auto; -auto -2 -3 -4 -select auto from t1 where -string in("aaaa","cccc") and -vstring in("aaaa","cccc") and -bin in(0xAAAA,0xCCCC) and -vbin in(0xAAAA,0xCCCC) and -tiny in(-1,-3) and -short in(-1,-3) and -medium in(-1,-3) and -long_int in(-1,-3) and -longlong in(-1,-3) and -utiny in(1,3) and -ushort in(1,3) and -umedium in(1,3) and -ulong in(1,3) and -ulonglong in(1,3) and -bits in(b'001',b'011') and -options in('one','three') and -flags in('one','one,two,three') and -date_field in('1901-01-01','1903-03-03') and -year_field in('1901','1903') and -time_field in('01:01:01','03:03:03') and -date_time in('1901-01-01 01:01:01','1903-03-03 03:03:03') -order by auto; -auto -1 -3 -select auto from t1 where -"aaaa" in(string) and -"aaaa" in(vstring) and -0xAAAA in(bin) and -0xAAAA in(vbin) and -(-1 in(tiny)) and -(-1 in(short)) and -(-1 in(medium)) and -(-1 in(long_int)) and -(-1 in(longlong)) and -1 in(utiny) and -1 in(ushort) and -1 in(umedium) and -1 in(ulong) and -1 in(ulonglong) and -b'001' in(bits) and -'one' in(options) and -'one' in(flags) and -'1901-01-01' in(date_field) and -'1901' in(year_field) and -'01:01:01' in(time_field) and -'1901-01-01 01:01:01' in(date_time) -order by auto; -auto -1 -select auto from t1 where -string not in("aaaa","cccc") and -vstring not in("aaaa","cccc") and -bin not in(0xAAAA,0xCCCC) and -vbin not in(0xAAAA,0xCCCC) and -tiny not in(-1,-3) and -short not in(-1,-3) and -medium not in(-1,-3) and -long_int not in(-1,-3) and -longlong not in(-1,-3) and -utiny not in(1,3) and -ushort not in(1,3) and -umedium not in(1,3) and -ulong not in(1,3) and -ulonglong not in(1,3) and -bits not in(b'001',b'011') and -options not in('one','three') and -flags not in('one','one,two,three') and -date_field not in('1901-01-01','1903-03-03') and -year_field not in('1901','1903') and -time_field not in('01:01:01','03:03:03') and -date_time not in('1901-01-01 01:01:01','1903-03-03 03:03:03') -order by auto; -auto -2 -4 -select auto from t1 where -"aaaa" not in(string) and -"aaaa" not in(vstring) and -0xAAAA not in(bin) and -0xAAAA not in(vbin) and -(-1 not in(tiny)) and -(-1 not in(short)) and -(-1 not in(medium)) and -(-1 not in(long_int)) and -(-1 not in(longlong)) and -1 not in(utiny) and -1 not in(ushort) and -1 not in(umedium) and -1 not in(ulong) and -1 not in(ulonglong) and -b'001' not in(bits) and -'one' not in(options) and -'one' not in(flags) and -'1901-01-01' not in(date_field) and -'1901' not in(year_field) and -'01:01:01' not in(time_field) and -'1901-01-01 01:01:01' not in(date_time) -order by auto; -auto -2 -3 -4 -select * from t2 where attr3 is null or attr1 > 2 and pk1= 3 order by pk1; -pk1 attr1 attr2 attr3 -2 2 NULL NULL -3 3 3 d -select * from t2 where attr3 is not null and attr1 > 2 order by pk1; -pk1 attr1 attr2 attr3 -3 3 3 d -4 4 4 e -5 5 5 f -select * from t3 where attr2 > 9223372036854775803 and attr3 != 3 order by pk1; -pk1 attr1 attr2 attr3 attr4 -2 2 9223372036854775804 2 c -4 4 9223372036854775806 4 e -5 5 9223372036854775807 5 f -select * from t2,t3 where t2.attr1 < 1 and t2.attr2 = t3.attr2 and t3.attr1 < 5 order by t2.pk1; -pk1 attr1 attr2 attr3 pk1 attr1 attr2 attr3 attr4 -0 0 0 a 0 0 0 0 a -select * from t4 where attr1 < 5 and attr2 > 9223372036854775803 and attr3 != 3 order by t4.pk1; -pk1 attr1 attr2 attr3 attr4 -2 2 9223372036854775804 2 c -4 4 9223372036854775806 4 e -select * from t3,t4 where t4.attr1 > 1 and t4.attr2 = t3.attr2 and t4.attr3 < 5 order by t4.pk1; -pk1 attr1 attr2 attr3 attr4 pk1 attr1 attr2 attr3 attr4 -2 2 9223372036854775804 2 c 2 2 9223372036854775804 2 c -3 3 9223372036854775805 3 d 3 3 9223372036854775805 3 d -4 4 9223372036854775806 4 e 4 4 9223372036854775806 4 e -set optimizer_switch = "engine_condition_pushdown=on"; -explain -select auto from t1 where -string = "aaaa" and -vstring = "aaaa" and -bin = 0xAAAA and -vbin = 0xAAAA and -tiny = -1 and -short = -1 and -medium = -1 and -long_int = -1 and -longlong = -1 and -real_float > 1.0 and real_float < 2.0 and -real_double > 1.0 and real_double < 2.0 and -real_decimal > 1.0 and real_decimal < 2.0 and -utiny = 1 and -ushort = 1 and -umedium = 1 and -ulong = 1 and -ulonglong = 1 and -/* bits = b'001' and */ -options = 'one' and -flags = 'one' and -date_field = '1901-01-01' and -year_field = '1901' and -time_field = '01:01:01' and -date_time = '1901-01-01 01:01:01' -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL # Using where with pushed condition; Using filesort -select auto from t1 where -string = "aaaa" and -vstring = "aaaa" and -bin = 0xAAAA and -vbin = 0xAAAA and -tiny = -1 and -short = -1 and -medium = -1 and -long_int = -1 and -longlong = -1 and -real_float > 1.0 and real_float < 2.0 and -real_double > 1.0 and real_double < 2.0 and -real_decimal > 1.0 and real_decimal < 2.0 and -utiny = 1 and -ushort = 1 and -umedium = 1 and -ulong = 1 and -ulonglong = 1 and -/* bits = b'001' and */ -options = 'one' and -flags = 'one' and -date_field = '1901-01-01' and -year_field = '1901' and -time_field = '01:01:01' and -date_time = '1901-01-01 01:01:01' -order by auto; -auto -1 -explain -select auto from t1 where -string != "aaaa" and -vstring != "aaaa" and -bin != 0xAAAA and -vbin != 0xAAAA and -tiny != -1 and -short != -1 and -medium != -1 and -long_int != -1 and -longlong != -1 and -(real_float < 1.0 or real_float > 2.0) and -(real_double < 1.0 or real_double > 2.0) and -(real_decimal < 1.0 or real_decimal > 2.0) and -utiny != 1 and -ushort != 1 and -umedium != 1 and -ulong != 1 and -ulonglong != 1 and -/* bits != b'001' and */ -options != 'one' and -flags != 'one' and -date_field != '1901-01-01' and -year_field != '1901' and -time_field != '01:01:01' and -date_time != '1901-01-01 01:01:01' -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL # Using where with pushed condition; Using filesort -select auto from t1 where -string != "aaaa" and -vstring != "aaaa" and -bin != 0xAAAA and -vbin != 0xAAAA and -tiny != -1 and -short != -1 and -medium != -1 and -long_int != -1 and -longlong != -1 and -(real_float < 1.0 or real_float > 2.0) and -(real_double < 1.0 or real_double > 2.0) and -(real_decimal < 1.0 or real_decimal > 2.0) and -utiny != 1 and -ushort != 1 and -umedium != 1 and -ulong != 1 and -ulonglong != 1 and -/* bits != b'001' and */ -options != 'one' and -flags != 'one' and -date_field != '1901-01-01' and -year_field != '1901' and -time_field != '01:01:01' and -date_time != '1901-01-01 01:01:01' -order by auto; -auto -2 -3 -4 -explain -select auto from t1 where -string > "aaaa" and -vstring > "aaaa" and -bin > 0xAAAA and -vbin > 0xAAAA and -tiny < -1 and -short < -1 and -medium < -1 and -long_int < -1 and -longlong < -1 and -real_float > 1.1 and -real_double > 1.1 and -real_decimal > 1.1 and -utiny > 1 and -ushort > 1 and -umedium > 1 and -ulong > 1 and -ulonglong > 1 and -/* bits > b'001' and */ -(options = 'two' or options = 'three' or options = 'four') and -(flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field > '1901-01-01' and -year_field > '1901' and -time_field > '01:01:01' and -date_time > '1901-01-01 01:01:01' -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL # Using where with pushed condition; Using filesort -select auto from t1 where -string > "aaaa" and -vstring > "aaaa" and -bin > 0xAAAA and -vbin > 0xAAAA and -tiny < -1 and -short < -1 and -medium < -1 and -long_int < -1 and -longlong < -1 and -real_float > 1.1 and -real_double > 1.1 and -real_decimal > 1.1 and -utiny > 1 and -ushort > 1 and -umedium > 1 and -ulong > 1 and -ulonglong > 1 and -/* bits > b'001' and */ -(options = 'two' or options = 'three' or options = 'four') and -(flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field > '1901-01-01' and -year_field > '1901' and -time_field > '01:01:01' and -date_time > '1901-01-01 01:01:01' -order by auto; -auto -2 -3 -4 -explain -select auto from t1 where -string >= "aaaa" and -vstring >= "aaaa" and -bin >= 0xAAAA and -vbin >= 0xAAAA and -tiny <= -1 and -short <= -1 and -medium <= -1 and -long_int <= -1 and -longlong <= -1 and -real_float >= 1.0 and -real_double >= 1.0 and -real_decimal >= 1.0 and -utiny >= 1 and -ushort >= 1 and -umedium >= 1 and -ulong >= 1 and -ulonglong >= 1 and -/* bits >= b'001' and */ -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field >= '1901-01-01' and -year_field >= '1901' and -time_field >= '01:01:01' and -date_time >= '1901-01-01 01:01:01' -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL # Using where with pushed condition; Using filesort -select auto from t1 where -string >= "aaaa" and -vstring >= "aaaa" and -bin >= 0xAAAA and -vbin >= 0xAAAA and -tiny <= -1 and -short <= -1 and -medium <= -1 and -long_int <= -1 and -longlong <= -1 and -real_float >= 1.0 and -real_double >= 1.0 and -real_decimal >= 1.0 and -utiny >= 1 and -ushort >= 1 and -umedium >= 1 and -ulong >= 1 and -ulonglong >= 1 and -/* bits >= b'001' and */ -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field >= '1901-01-01' and -year_field >= '1901' and -time_field >= '01:01:01' and -date_time >= '1901-01-01 01:01:01' -order by auto; -auto -1 -2 -3 -4 -explain -select auto from t1 where -string < "dddd" and -vstring < "dddd" and -bin < 0xDDDD and -vbin < 0xDDDD and -tiny > -4 and -short > -4 and -medium > -4 and -long_int > -4 and -longlong > -4 and -real_float < 4.4 and -real_double < 4.4 and -real_decimal < 4.4 and -utiny < 4 and -ushort < 4 and -umedium < 4 and -ulong < 4 and -ulonglong < 4 and -/* bits < b'100' and */ -(options = 'one' or options = 'two' or options = 'three') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three') and -date_field < '1904-01-01' and -year_field < '1904' and -time_field < '04:04:04' and -date_time < '1904-04-04 04:04:04' -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL # Using where with pushed condition; Using filesort -select auto from t1 where -string < "dddd" and -vstring < "dddd" and -bin < 0xDDDD and -vbin < 0xDDDD and -tiny > -4 and -short > -4 and -medium > -4 and -long_int > -4 and -longlong > -4 and -real_float < 4.4 and -real_double < 4.4 and -real_decimal < 4.4 and -utiny < 4 and -ushort < 4 and -umedium < 4 and -ulong < 4 and -ulonglong < 4 and -/* bits < b'100' and */ -(options = 'one' or options = 'two' or options = 'three') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three') and -date_field < '1904-01-01' and -year_field < '1904' and -time_field < '04:04:04' and -date_time < '1904-04-04 04:04:04' -order by auto; -auto -1 -2 -3 -explain -select auto from t1 where -string <= "dddd" and -vstring <= "dddd" and -bin <= 0xDDDD and -vbin <= 0xDDDD and -tiny >= -4 and -short >= -4 and -medium >= -4 and -long_int >= -4 and -longlong >= -4 and -real_float <= 4.5 and -real_double <= 4.5 and -real_decimal <= 4.5 and -utiny <= 4 - 1 + 1 and /* Checking function composition */ -ushort <= 4 and -umedium <= 4 and -ulong <= 4 and -ulonglong <= 4 and -/* bits <= b'100' and */ -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field <= '1904-04-04' and -year_field <= '1904' and -time_field <= '04:04:04' and -date_time <= '1904-04-04 04:04:04' -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL # Using where with pushed condition; Using filesort -select auto from t1 where -string <= "dddd" and -vstring <= "dddd" and -bin <= 0xDDDD and -vbin <= 0xDDDD and -tiny >= -4 and -short >= -4 and -medium >= -4 and -long_int >= -4 and -longlong >= -4 and -real_float <= 4.5 and -real_double <= 4.5 and -real_decimal <= 4.5 and -utiny <= 4 - 1 + 1 and /* Checking function composition */ -ushort <= 4 and -umedium <= 4 and -ulong <= 4 and -ulonglong <= 4 and -/* bits <= b'100' and */ -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field <= '1904-04-04' and -year_field <= '1904' and -time_field <= '04:04:04' and -date_time <= '1904-04-04 04:04:04' -order by auto; -auto -1 -2 -3 -4 -create index medium_index on t1(medium); -explain -select auto from t1 where -string = "aaaa" and -vstring = "aaaa" and -bin = 0xAAAA and -vbin = 0xAAAA and -tiny = -1 and -short = -1 and -medium = -1 and -long_int = -1 and -longlong = -1 and -real_float > 1.0 and real_float < 2.0 and -real_double > 1.0 and real_double < 2.0 and -real_decimal > 1.0 and real_decimal < 2.0 and -utiny = 1 and -ushort = 1 and -umedium = 1 and -ulong = 1 and -ulonglong = 1 and -/* bits = b'001' and */ -options = 'one' and -flags = 'one' and -date_field = '1901-01-01' and -year_field = '1901' and -time_field = '01:01:01' and -date_time = '1901-01-01 01:01:01' -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref medium_index medium_index 3 const # Using where with pushed condition; Using filesort -select auto from t1 where -string = "aaaa" and -vstring = "aaaa" and -bin = 0xAAAA and -vbin = 0xAAAA and -tiny = -1 and -short = -1 and -medium = -1 and -long_int = -1 and -longlong = -1 and -real_float > 1.0 and real_float < 2.0 and -real_double > 1.0 and real_double < 2.0 and -real_decimal > 1.0 and real_decimal < 2.0 and -utiny = 1 and -ushort = 1 and -umedium = 1 and -ulong = 1 and -ulonglong = 1 and -/* bits = b'001' and */ -options = 'one' and -flags = 'one' and -date_field = '1901-01-01' and -year_field = '1901' and -time_field = '01:01:01' and -date_time = '1901-01-01 01:01:01' -order by auto; -auto -1 -explain -select auto from t1 where -string != "aaaa" and -vstring != "aaaa" and -bin != 0xAAAA and -vbin != 0xAAAA and -tiny != -1 and -short != -1 and -medium != -1 and -long_int != -1 and -longlong != -1 and -(real_float < 1.0 or real_float > 2.0) and -(real_double < 1.0 or real_double > 2.0) and -(real_decimal < 1.0 or real_decimal > 2.0) and -utiny != 1 and -ushort != 1 and -umedium != 1 and -ulong != 1 and -ulonglong != 1 and -/* bits != b'001' and */ -options != 'one' and -flags != 'one' and -date_field != '1901-01-01' and -year_field != '1901' and -time_field != '01:01:01' and -date_time != '1901-01-01 01:01:01' -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range medium_index medium_index 3 NULL # Using where with pushed condition; Using filesort -select auto from t1 where -string != "aaaa" and -vstring != "aaaa" and -bin != 0xAAAA and -vbin != 0xAAAA and -tiny != -1 and -short != -1 and -medium != -1 and -long_int != -1 and -longlong != -1 and -(real_float < 1.0 or real_float > 2.0) and -(real_double < 1.0 or real_double > 2.0) and -(real_decimal < 1.0 or real_decimal > 2.0) and -utiny != 1 and -ushort != 1 and -umedium != 1 and -ulong != 1 and -ulonglong != 1 and -/* bits != b'001' and */ -options != 'one' and -flags != 'one' and -date_field != '1901-01-01' and -year_field != '1901' and -time_field != '01:01:01' and -date_time != '1901-01-01 01:01:01' -order by auto; -auto -2 -3 -4 -explain -select auto from t1 where -string > "aaaa" and -vstring > "aaaa" and -bin > 0xAAAA and -vbin > 0xAAAA and -tiny < -1 and -short < -1 and -medium < -1 and -long_int < -1 and -longlong < -1 and -real_float > 1.1 and -real_double > 1.1 and -real_decimal > 1.1 and -utiny > 1 and -ushort > 1 and -umedium > 1 and -ulong > 1 and -ulonglong > 1 and -/* bits > b'001' and */ -(options = 'two' or options = 'three' or options = 'four') and -(flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field > '1901-01-01' and -year_field > '1901' and -time_field > '01:01:01' and -date_time > '1901-01-01 01:01:01' -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range medium_index medium_index 3 NULL # Using where with pushed condition; Using filesort -select auto from t1 where -string > "aaaa" and -vstring > "aaaa" and -bin > 0xAAAA and -vbin > 0xAAAA and -tiny < -1 and -short < -1 and -medium < -1 and -long_int < -1 and -longlong < -1 and -real_float > 1.1 and -real_double > 1.1 and -real_decimal > 1.1 and -utiny > 1 and -ushort > 1 and -umedium > 1 and -ulong > 1 and -ulonglong > 1 and -/* bits > b'001' and */ -(options = 'two' or options = 'three' or options = 'four') and -(flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field > '1901-01-01' and -year_field > '1901' and -time_field > '01:01:01' and -date_time > '1901-01-01 01:01:01' -order by auto; -auto -2 -3 -4 -explain -select auto from t1 where -string >= "aaaa" and -vstring >= "aaaa" and -bin >= 0xAAAA and -vbin >= 0xAAAA and -tiny <= -1 and -short <= -1 and -medium <= -1 and -long_int <= -1 and -longlong <= -1 and -real_float >= 1.0 and -real_double >= 1.0 and -real_decimal >= 1.0 and -utiny >= 1 and -ushort >= 1 and -umedium >= 1 and -ulong >= 1 and -ulonglong >= 1 and -/* bits >= b'001' and */ -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field >= '1901-01-01' and -year_field >= '1901' and -time_field >= '01:01:01' and -date_time >= '1901-01-01 01:01:01' -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range medium_index medium_index 3 NULL # Using where with pushed condition; Using filesort -select auto from t1 where -string >= "aaaa" and -vstring >= "aaaa" and -bin >= 0xAAAA and -vbin >= 0xAAAA and -tiny <= -1 and -short <= -1 and -medium <= -1 and -long_int <= -1 and -longlong <= -1 and -real_float >= 1.0 and -real_double >= 1.0 and -real_decimal >= 1.0 and -utiny >= 1 and -ushort >= 1 and -umedium >= 1 and -ulong >= 1 and -ulonglong >= 1 and -/* bits >= b'001' and */ -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field >= '1901-01-01' and -year_field >= '1901' and -time_field >= '01:01:01' and -date_time >= '1901-01-01 01:01:01' -order by auto; -auto -1 -2 -3 -4 -explain -select auto from t1 where -string < "dddd" and -vstring < "dddd" and -bin < 0xDDDD and -vbin < 0xDDDD and -tiny > -4 and -short > -4 and -medium > -4 and -long_int > -4 and -longlong > -4 and -real_float < 4.4 and -real_double < 4.4 and -real_decimal < 4.4 and -utiny < 4 and -ushort < 4 and -umedium < 4 and -ulong < 4 and -ulonglong < 4 and -/* bits < b'100' and */ -(options = 'one' or options = 'two' or options = 'three') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three') and -date_field < '1904-01-01' and -year_field < '1904' and -time_field < '04:04:04' and -date_time < '1904-04-04 04:04:04' -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range medium_index medium_index 3 NULL # Using where with pushed condition; Using filesort -select auto from t1 where -string < "dddd" and -vstring < "dddd" and -bin < 0xDDDD and -vbin < 0xDDDD and -tiny > -4 and -short > -4 and -medium > -4 and -long_int > -4 and -longlong > -4 and -real_float < 4.4 and -real_double < 4.4 and -real_decimal < 4.4 and -utiny < 4 and -ushort < 4 and -umedium < 4 and -ulong < 4 and -ulonglong < 4 and -/* bits < b'100' and */ -(options = 'one' or options = 'two' or options = 'three') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three') and -date_field < '1904-01-01' and -year_field < '1904' and -time_field < '04:04:04' and -date_time < '1904-04-04 04:04:04' -order by auto; -auto -1 -2 -3 -explain -select auto from t1 where -string <= "dddd" and -vstring <= "dddd" and -bin <= 0xDDDD and -vbin <= 0xDDDD and -tiny >= -4 and -short >= -4 and -medium >= -4 and -long_int >= -4 and -longlong >= -4 and -real_float <= 4.5 and -real_double <= 4.5 and -real_decimal <= 4.5 and -utiny <= 4 - 1 + 1 and /* Checking function composition */ -ushort <= 4 and -umedium <= 4 and -ulong <= 4 and -ulonglong <= 4 and -/* bits <= b'100' and */ -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field <= '1904-04-04' and -year_field <= '1904' and -time_field <= '04:04:04' and -date_time <= '1904-04-04 04:04:04' -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range medium_index medium_index 3 NULL # Using where with pushed condition; Using filesort -select auto from t1 where -string <= "dddd" and -vstring <= "dddd" and -bin <= 0xDDDD and -vbin <= 0xDDDD and -tiny >= -4 and -short >= -4 and -medium >= -4 and -long_int >= -4 and -longlong >= -4 and -real_float <= 4.5 and -real_double <= 4.5 and -real_decimal <= 4.5 and -utiny <= 4 - 1 + 1 and /* Checking function composition */ -ushort <= 4 and -umedium <= 4 and -ulong <= 4 and -ulonglong <= 4 and -/* bits <= b'100' and */ -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field <= '1904-04-04' and -year_field <= '1904' and -time_field <= '04:04:04' and -date_time <= '1904-04-04 04:04:04' -order by auto; -auto -1 -2 -3 -4 -explain -select auto from t1 where -string like "b%" and -vstring like "b%" and -bin like concat(0xBB, '%') and -vbin like concat(0xBB, '%') -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL # Using where with pushed condition; Using filesort -select auto from t1 where -string like "b%" and -vstring like "b%" and -bin like concat(0xBB, '%') and -vbin like concat(0xBB, '%') -order by auto; -auto -2 -explain -select auto from t1 where -string not like "b%" and -vstring not like "b%" and -bin not like concat(0xBB, '%') and -vbin not like concat(0xBB, '%') -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL # Using where with pushed condition; Using filesort -select auto from t1 where -string not like "b%" and -vstring not like "b%" and -bin not like concat(0xBB, '%') and -vbin not like concat(0xBB, '%') -order by auto; -auto -1 -3 -4 -explain -select auto from t1 where -(string between "aaaa" and "cccc") and -(vstring between "aaaa" and "cccc") and -(bin between 0xAAAA and 0xCCCC) and -(vbin between 0xAAAA and 0xCCCC) and -(tiny between -3 and -1) and -(short between -3 and -1) and -(medium between -3 and -1) and -(long_int between -3 and -1) and -(longlong between -3 and -1) and -(utiny between 1 and 3) and -(ushort between 1 and 3) and -(umedium between 1 and 3) and -(ulong between 1 and 3) and -(ulonglong between 1 and 3) and -/* (bits between b'001' and b'011') and */ -(options between 'one' and 'three') and -(flags between 'one' and 'one,two,three') and -(date_field between '1901-01-01' and '1903-03-03') and -(year_field between '1901' and '1903') and -(time_field between '01:01:01' and '03:03:03') and -(date_time between '1901-01-01 01:01:01' and '1903-03-03 03:03:03') -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range medium_index medium_index 3 NULL # Using where with pushed condition; Using filesort -select auto from t1 where -(string between "aaaa" and "cccc") and -(vstring between "aaaa" and "cccc") and -(bin between 0xAAAA and 0xCCCC) and -(vbin between 0xAAAA and 0xCCCC) and -(tiny between -3 and -1) and -(short between -3 and -1) and -(medium between -3 and -1) and -(long_int between -3 and -1) and -(longlong between -3 and -1) and -(utiny between 1 and 3) and -(ushort between 1 and 3) and -(umedium between 1 and 3) and -(ulong between 1 and 3) and -(ulonglong between 1 and 3) and -/* (bits between b'001' and b'011') and */ -(options between 'one' and 'three') and -(flags between 'one' and 'one,two,three') and -(date_field between '1901-01-01' and '1903-03-03') and -(year_field between '1901' and '1903') and -(time_field between '01:01:01' and '03:03:03') and -(date_time between '1901-01-01 01:01:01' and '1903-03-03 03:03:03') -order by auto; -auto -1 -3 -explain -select auto from t1 where -("aaaa" between string and string) and -("aaaa" between vstring and vstring) and -(0xAAAA between bin and bin) and -(0xAAAA between vbin and vbin) and -(-1 between tiny and tiny) and -(-1 between short and short) and -(-1 between medium and medium) and -(-1 between long_int and long_int) and -(-1 between longlong and longlong) and -(1 between utiny and utiny) and -(1 between ushort and ushort) and -(1 between umedium and umedium) and -(1 between ulong and ulong) and -(1 between ulonglong and ulonglong) and -/* (b'001' between bits and bits) and */ -('one' between options and options) and -('one' between flags and flags) and -('1901-01-01' between date_field and date_field) and -('1901' between year_field and year_field) and -('01:01:01' between time_field and time_field) and -('1901-01-01 01:01:01' between date_time and date_time) -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range medium_index medium_index 3 NULL # Using where with pushed condition; Using filesort -select auto from t1 where -("aaaa" between string and string) and -("aaaa" between vstring and vstring) and -(0xAAAA between bin and bin) and -(0xAAAA between vbin and vbin) and -(-1 between tiny and tiny) and -(-1 between short and short) and -(-1 between medium and medium) and -(-1 between long_int and long_int) and -(-1 between longlong and longlong) and -(1 between utiny and utiny) and -(1 between ushort and ushort) and -(1 between umedium and umedium) and -(1 between ulong and ulong) and -(1 between ulonglong and ulonglong) and -/* (b'001' between bits and bits) and */ -('one' between options and options) and -('one' between flags and flags) and -('1901-01-01' between date_field and date_field) and -('1901' between year_field and year_field) and -('01:01:01' between time_field and time_field) and -('1901-01-01 01:01:01' between date_time and date_time) -order by auto; -auto -1 -explain -select auto from t1 where -(string not between "aaaa" and "cccc") and -(vstring not between "aaaa" and "cccc") and -(bin not between 0xAAAA and 0xCCCC) and -(vbin not between 0xAAAA and 0xCCCC) and -(tiny not between -3 and -1) and -(short not between -3 and -1) and -(medium not between -3 and -1) and -(long_int not between -3 and -1) and -(longlong not between -3 and -1) and -(utiny not between 1 and 3) and -(ushort not between 1 and 3) and -(umedium not between 1 and 3) and -(ulong not between 1 and 3) and -(ulonglong not between 1 and 3) and -/* (bits not between b'001' and b'011') and */ -(options not between 'one' and 'three') and -(flags not between 'one' and 'one,two,three') and -(date_field not between '1901-01-01' and '1903-03-03') and -(year_field not between '1901' and '1903') and -(time_field not between '01:01:01' and '03:03:03') and -(date_time not between '1901-01-01 01:01:01' and '1903-03-03 03:03:03') -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range medium_index medium_index 3 NULL # Using where with pushed condition; Using filesort -select auto from t1 where -(string not between "aaaa" and "cccc") and -(vstring not between "aaaa" and "cccc") and -(bin not between 0xAAAA and 0xCCCC) and -(vbin not between 0xAAAA and 0xCCCC) and -(tiny not between -3 and -1) and -(short not between -3 and -1) and -(medium not between -3 and -1) and -(long_int not between -3 and -1) and -(longlong not between -3 and -1) and -(utiny not between 1 and 3) and -(ushort not between 1 and 3) and -(umedium not between 1 and 3) and -(ulong not between 1 and 3) and -(ulonglong not between 1 and 3) and -/* (bits not between b'001' and b'011') and */ -(options not between 'one' and 'three') and -(flags not between 'one' and 'one,two,three') and -(date_field not between '1901-01-01' and '1903-03-03') and -(year_field not between '1901' and '1903') and -(time_field not between '01:01:01' and '03:03:03') and -(date_time not between '1901-01-01 01:01:01' and '1903-03-03 03:03:03') -order by auto; -auto -4 -explain -select auto from t1 where -("aaaa" not between string and string) and -("aaaa" not between vstring and vstring) and -(0xAAAA not between bin and bin) and -(0xAAAA not between vbin and vbin) and -(-1 not between tiny and tiny) and -(-1 not between short and short) and -(-1 not between medium and medium) and -(-1 not between long_int and long_int) and -(-1 not between longlong and longlong) and -(1 not between utiny and utiny) and -(1 not between ushort and ushort) and -(1 not between umedium and umedium) and -(1 not between ulong and ulong) and -(1 not between ulonglong and ulonglong) and -/* (b'001' not between bits and bits) and */ -('one' not between options and options) and -('one' not between flags and flags) and -('1901-01-01' not between date_field and date_field) and -('1901' not between year_field and year_field) and -('01:01:01' not between time_field and time_field) and -('1901-01-01 01:01:01' not between date_time and date_time) -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range medium_index medium_index 3 NULL # Using where with pushed condition; Using filesort -select auto from t1 where -("aaaa" not between string and string) and -("aaaa" not between vstring and vstring) and -(0xAAAA not between bin and bin) and -(0xAAAA not between vbin and vbin) and -(-1 not between tiny and tiny) and -(-1 not between short and short) and -(-1 not between medium and medium) and -(-1 not between long_int and long_int) and -(-1 not between longlong and longlong) and -(1 not between utiny and utiny) and -(1 not between ushort and ushort) and -(1 not between umedium and umedium) and -(1 not between ulong and ulong) and -(1 not between ulonglong and ulonglong) and -/* (b'001' not between bits and bits) and */ -('one' not between options and options) and -('one' not between flags and flags) and -('1901-01-01' not between date_field and date_field) and -('1901' not between year_field and year_field) and -('01:01:01' not between time_field and time_field) and -('1901-01-01 01:01:01' not between date_time and date_time) -order by auto; -auto -2 -3 -4 -explain -select auto from t1 where -string in("aaaa","cccc") and -vstring in("aaaa","cccc") and -bin in(0xAAAA,0xCCCC) and -vbin in(0xAAAA,0xCCCC) and -tiny in(-1,-3) and -short in(-1,-3) and -medium in(-1,-3) and -long_int in(-1,-3) and -longlong in(-1,-3) and -utiny in(1,3) and -ushort in(1,3) and -umedium in(1,3) and -ulong in(1,3) and -ulonglong in(1,3) and -/* bits in(b'001',b'011') and */ -options in('one','three') and -flags in('one','one,two,three') and -date_field in('1901-01-01','1903-03-03') and -year_field in('1901','1903') and -time_field in('01:01:01','03:03:03') and -date_time in('1901-01-01 01:01:01','1903-03-03 03:03:03') -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range medium_index medium_index 3 NULL # Using where with pushed condition; Using filesort -select auto from t1 where -string in("aaaa","cccc") and -vstring in("aaaa","cccc") and -bin in(0xAAAA,0xCCCC) and -vbin in(0xAAAA,0xCCCC) and -tiny in(-1,-3) and -short in(-1,-3) and -medium in(-1,-3) and -long_int in(-1,-3) and -longlong in(-1,-3) and -utiny in(1,3) and -ushort in(1,3) and -umedium in(1,3) and -ulong in(1,3) and -ulonglong in(1,3) and -/* bits in(b'001',b'011') and */ -options in('one','three') and -flags in('one','one,two,three') and -date_field in('1901-01-01','1903-03-03') and -year_field in('1901','1903') and -time_field in('01:01:01','03:03:03') and -date_time in('1901-01-01 01:01:01','1903-03-03 03:03:03') -order by auto; -auto -1 -3 -explain -select auto from t1 where -"aaaa" in(string) and -"aaaa" in(vstring) and -0xAAAA in(bin) and -0xAAAA in(vbin) and -(-1 in(tiny)) and -(-1 in (short)) and -(-1 in(medium)) and -(-1 in(long_int)) and -(-1 in(longlong)) and -1 in(utiny) and -1 in(ushort) and -1 in(umedium) and -1 in(ulong) and -1 in(ulonglong) and -/* b'001' in(bits) and */ -'one' in(options) and -'one' in(flags) and -'1901-01-01' in(date_field) and -'1901' in(year_field) and -'01:01:01' in(time_field) and -'1901-01-01 01:01:01' in(date_time) -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref medium_index medium_index 3 const # Using where with pushed condition; Using filesort -select auto from t1 where -"aaaa" in(string) and -"aaaa" in(vstring) and -0xAAAA in(bin) and -0xAAAA in(vbin) and -(-1 in(tiny)) and -(-1 in (short)) and -(-1 in(medium)) and -(-1 in(long_int)) and -(-1 in(longlong)) and -1 in(utiny) and -1 in(ushort) and -1 in(umedium) and -1 in(ulong) and -1 in(ulonglong) and -/* b'001' in(bits) and */ -'one' in(options) and -'one' in(flags) and -'1901-01-01' in(date_field) and -'1901' in(year_field) and -'01:01:01' in(time_field) and -'1901-01-01 01:01:01' in(date_time) -order by auto; -auto -1 -explain -select auto from t1 where -string not in("aaaa","cccc") and -vstring not in("aaaa","cccc") and -bin not in(0xAAAA,0xCCCC) and -vbin not in(0xAAAA,0xCCCC) and -tiny not in(-1,-3) and -short not in(-1,-3) and -medium not in(-1,-3) and -long_int not in(-1,-3) and -longlong not in(-1,-3) and -utiny not in(1,3) and -ushort not in(1,3) and -umedium not in(1,3) and -ulong not in(1,3) and -ulonglong not in(1,3) and -/* bits not in(b'001',b'011') and */ -options not in('one','three') and -flags not in('one','one,two,three') and -date_field not in('1901-01-01','1903-03-03') and -year_field not in('1901','1903') and -time_field not in('01:01:01','03:03:03') and -date_time not in('1901-01-01 01:01:01','1903-03-03 03:03:03') -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range medium_index medium_index 3 NULL # Using where with pushed condition; Using filesort -select auto from t1 where -string not in("aaaa","cccc") and -vstring not in("aaaa","cccc") and -bin not in(0xAAAA,0xCCCC) and -vbin not in(0xAAAA,0xCCCC) and -tiny not in(-1,-3) and -short not in(-1,-3) and -medium not in(-1,-3) and -long_int not in(-1,-3) and -longlong not in(-1,-3) and -utiny not in(1,3) and -ushort not in(1,3) and -umedium not in(1,3) and -ulong not in(1,3) and -ulonglong not in(1,3) and -/* bits not in(b'001',b'011') and */ -options not in('one','three') and -flags not in('one','one,two,three') and -date_field not in('1901-01-01','1903-03-03') and -year_field not in('1901','1903') and -time_field not in('01:01:01','03:03:03') and -date_time not in('1901-01-01 01:01:01','1903-03-03 03:03:03') -order by auto; -auto -2 -4 -explain -select auto from t1 where -"aaaa" not in(string) and -"aaaa" not in(vstring) and -0xAAAA not in(bin) and -0xAAAA not in(vbin) and -(-1 not in(tiny)) and -(-1 not in(short)) and -(-1 not in(medium)) and -(-1 not in(long_int)) and -(-1 not in(longlong)) and -1 not in(utiny) and -1 not in(ushort) and -1 not in(umedium) and -1 not in(ulong) and -1 not in(ulonglong) and -/* b'001' not in(bits) and */ -'one' not in(options) and -'one' not in(flags) and -'1901-01-01' not in(date_field) and -'1901' not in(year_field) and -'01:01:01' not in(time_field) and -'1901-01-01 01:01:01' not in(date_time) -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL # Using where with pushed condition; Using filesort -select auto from t1 where -"aaaa" not in(string) and -"aaaa" not in(vstring) and -0xAAAA not in(bin) and -0xAAAA not in(vbin) and -(-1 not in(tiny)) and -(-1 not in(short)) and -(-1 not in(medium)) and -(-1 not in(long_int)) and -(-1 not in(longlong)) and -1 not in(utiny) and -1 not in(ushort) and -1 not in(umedium) and -1 not in(ulong) and -1 not in(ulonglong) and -/* b'001' not in(bits) and */ -'one' not in(options) and -'one' not in(flags) and -'1901-01-01' not in(date_field) and -'1901' not in(year_field) and -'01:01:01' not in(time_field) and -'1901-01-01 01:01:01' not in(date_time) -order by auto; -auto -2 -3 -4 -update t1 -set medium = 17 -where -string = "aaaa" and -vstring = "aaaa" and -bin = 0xAAAA and -vbin = 0xAAAA and -tiny = -1 and -short = -1 and -medium = -1 and -long_int = -1 and -longlong = -1 and -real_float > 1.0 and real_float < 2.0 and -real_double > 1.0 and real_double < 2.0 and -real_decimal > 1.0 and real_decimal < 2.0 and -utiny = 1 and -ushort = 1 and -umedium = 1 and -ulong = 1 and -ulonglong = 1 and -/* bits = b'001' and */ -options = 'one' and -flags = 'one' and -date_field = '1901-01-01' and -year_field = '1901' and -time_field = '01:01:01' and -date_time = '1901-01-01 01:01:01'; -delete from t1 -where -string = "aaaa" and -vstring = "aaaa" and -bin = 0xAAAA and -vbin = 0xAAAA and -tiny = -1 and -short = -1 and -medium = 17 and -long_int = -1 and -longlong = -1 and -real_float > 1.0 and real_float < 2.0 and -real_double > 1.0 and real_double < 2.0 and -real_decimal > 1.0 and real_decimal < 2.0 and -utiny = 1 and -ushort = 1 and -umedium = 1 and -ulong = 1 and -ulonglong = 1 and -/* bits = b'001' and */ -options = 'one' and -flags = 'one' and -date_field = '1901-01-01' and -year_field = '1901' and -time_field = '01:01:01' and -date_time = '1901-01-01 01:01:01'; -select count(*) from t1; -count(*) -3 -explain -select * from t2 where attr3 is null or attr1 > 2 and pk1= 3 order by pk1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL PRIMARY NULL NULL NULL # Using where with pushed condition; Using filesort -select * from t2 where attr3 is null or attr1 > 2 and pk1= 3 order by pk1; -pk1 attr1 attr2 attr3 -2 2 NULL NULL -3 3 3 d -explain -select * from t2 where attr3 is not null and attr1 > 2 order by pk1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL # Using where with pushed condition; Using filesort -select * from t2 where attr3 is not null and attr1 > 2 order by pk1; -pk1 attr1 attr2 attr3 -3 3 3 d -4 4 4 e -5 5 5 f -explain -select * from t3 where attr2 > 9223372036854775803 and attr3 != 3 order by pk1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 ALL NULL NULL NULL NULL # Using where with pushed condition; Using filesort -select * from t3 where attr2 > 9223372036854775803 and attr3 != 3 order by pk1; -pk1 attr1 attr2 attr3 attr4 -2 2 9223372036854775804 2 c -4 4 9223372036854775806 4 e -5 5 9223372036854775807 5 f -explain -select * from t2,t3 where t2.attr1 < 1 and t2.attr2 = t3.attr2 and t3.attr1 < 5 order by t2.pk1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL # Using where with pushed condition; Using temporary; Using filesort -1 SIMPLE t3 ALL NULL NULL NULL NULL # Using where with pushed condition; Using join buffer -select * from t2,t3 where t2.attr1 < 1 and t2.attr2 = t3.attr2 and t3.attr1 < 5 order by t2.pk1; -pk1 attr1 attr2 attr3 pk1 attr1 attr2 attr3 attr4 -0 0 0 a 0 0 0 0 a -explain -select * from t4 where attr1 < 5 and attr2 > 9223372036854775803 and attr3 != 3 order by t4.pk1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t4 range attr1 attr1 4 NULL # Using where with pushed condition; Using filesort -select * from t4 where attr1 < 5 and attr2 > 9223372036854775803 and attr3 != 3 order by t4.pk1; -pk1 attr1 attr2 attr3 attr4 -2 2 9223372036854775804 2 c -4 4 9223372036854775806 4 e -explain -select * from t3,t4 where t4.attr1 > 1 and t4.attr2 = t3.attr2 and t4.attr3 < 5 order by t4.pk1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t4 range attr1 attr1 4 NULL # Using where with pushed condition; Using temporary; Using filesort -1 SIMPLE t3 ALL NULL NULL NULL NULL # Using where; Using join buffer -select * from t3,t4 where t4.attr1 > 1 and t4.attr2 = t3.attr2 and t4.attr3 < 5 order by t4.pk1; -pk1 attr1 attr2 attr3 attr4 pk1 attr1 attr2 attr3 attr4 -2 2 9223372036854775804 2 c 2 2 9223372036854775804 2 c -3 3 9223372036854775805 3 d 3 3 9223372036854775805 3 d -4 4 9223372036854775806 4 e 4 4 9223372036854775806 4 e -explain -select auto from t1 where string = "aaaa" collate latin1_general_ci order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL # Using where; Using filesort -explain -select * from t2 where (attr1 < 2) = (attr2 < 2) order by pk1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL # Using where; Using filesort -explain -select * from t3 left join t4 on t4.attr2 = t3.attr2 where t4.attr1 > 1 and t4.attr3 < 5 or t4.attr1 is null order by t4.pk1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 ALL NULL NULL NULL NULL # Using temporary; Using filesort -1 SIMPLE t4 ALL NULL NULL NULL NULL # Using where -create table t5 (a int primary key auto_increment, b tinytext not null) -engine = ndb; -insert into t5 (b) values ('jonas'), ('jensing'), ('johan'); -set optimizer_switch = "engine_condition_pushdown=off"; -select * from t5 where b like '%jo%' order by a; -a b -1 jonas -3 johan -set optimizer_switch = "engine_condition_pushdown=on"; -explain select * from t5 where b like '%jo%'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t5 ALL NULL NULL NULL NULL # Using where -select * from t5 where b like '%jo%' order by a; -a b -1 jonas -3 johan -set optimizer_switch = "engine_condition_pushdown=off"; -select auto from t1 where date_time like '1902-02-02 %' order by auto; -auto -2 -select auto from t1 where date_time not like '1902-02-02 %' order by auto; -auto -3 -4 -set optimizer_switch = "engine_condition_pushdown=on"; -explain select auto from t1 where date_time like '1902-02-02 %'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL # Using where -select auto from t1 where date_time like '1902-02-02 %' order by auto; -auto -2 -explain select auto from t1 where date_time not like '1902-02-02 %'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL # Using where -select auto from t1 where date_time not like '1902-02-02 %' order by auto; -auto -3 -4 -drop table t1; -create table t1 (a int, b varchar(3), primary key using hash(a)) -engine=ndb; -insert into t1 values (1,'a'), (2,'ab'), (3,'abc'); -set optimizer_switch = "engine_condition_pushdown=off"; -select * from t1 where b like 'ab'; -a b -2 ab -select * from t1 where b like 'ab' or b like 'ab'; -a b -2 ab -select * from t1 where b like 'abc'; -a b -3 abc -select * from t1 where b like 'abc' or b like 'abc'; -a b -3 abc -set optimizer_switch = "engine_condition_pushdown=on"; -select * from t1 where b like 'ab'; -a b -2 ab -select * from t1 where b like 'ab' or b like 'ab'; -a b -2 ab -select * from t1 where b like 'abc'; -a b -3 abc -select * from t1 where b like 'abc' or b like 'abc'; -a b -3 abc -drop table t1; -create table t1 (a int, b char(3), primary key using hash(a)) -engine=ndb; -insert into t1 values (1,'a'), (2,'ab'), (3,'abc'); -set optimizer_switch = "engine_condition_pushdown=off"; -select * from t1 where b like 'ab'; -a b -2 ab -select * from t1 where b like 'ab' or b like 'ab'; -a b -2 ab -select * from t1 where b like 'abc'; -a b -3 abc -select * from t1 where b like 'abc' or b like 'abc'; -a b -3 abc -set optimizer_switch = "engine_condition_pushdown=on"; -select * from t1 where b like 'ab'; -a b -2 ab -select * from t1 where b like 'ab' or b like 'ab'; -a b -2 ab -select * from t1 where b like 'abc'; -a b -3 abc -select * from t1 where b like 'abc' or b like 'abc'; -a b -3 abc -drop table t1; -create table t1 ( fname varchar(255), lname varchar(255) ) -engine=ndbcluster; -insert into t1 values ("Young","Foo"); -set optimizer_switch = "engine_condition_pushdown=off"; -SELECT fname, lname FROM t1 WHERE (fname like 'Y%') or (lname like 'F%'); -fname lname -Young Foo -set optimizer_switch = "engine_condition_pushdown=on"; -SELECT fname, lname FROM t1 WHERE (fname like 'Y%') or (lname like 'F%'); -fname lname -Young Foo -insert into t1 values ("aaa", "aaa"); -insert into t1 values ("bbb", "bbb"); -insert into t1 values ("ccc", "ccc"); -insert into t1 values ("ddd", "ddd"); -set optimizer_switch = "engine_condition_pushdown=off"; -SELECT fname, lname FROM t1 WHERE (fname like 'Y%') or (lname like 'F%'); -fname lname -Young Foo -set optimizer_switch = "engine_condition_pushdown=on"; -SELECT fname, lname FROM t1 WHERE (fname like 'Y%') or (lname like 'F%'); -fname lname -Young Foo -drop table t1; -create table t1 (a int, b int, c int, d int, primary key using hash(a)) -engine=ndbcluster; -insert into t1 values (10,1,100,0+0x1111); -insert into t1 values (20,2,200,0+0x2222); -insert into t1 values (30,3,300,0+0x3333); -insert into t1 values (40,4,400,0+0x4444); -insert into t1 values (50,5,500,0+0x5555); -set optimizer_switch = "engine_condition_pushdown=on"; -select a,b,d from t1 -where b in (0,1,2,5) -order by b; -a b d -10 1 4369 -20 2 8738 -50 5 21845 --- big filter just below limit -a b d -10 1 4369 -20 2 8738 -50 5 21845 --- big filter just above limit -a b d -10 1 4369 -20 2 8738 -50 5 21845 -Warnings: -Warning 4294 Scan filter is too large, discarded -set optimizer_switch = @old_optimizer_switch; -DROP TABLE t1,t2,t3,t4,t5; diff --git a/mysql-test/suite/ndb/r/ndb_config.result b/mysql-test/suite/ndb/r/ndb_config.result deleted file mode 100644 index e12741212d6..00000000000 --- a/mysql-test/suite/ndb/r/ndb_config.result +++ /dev/null @@ -1,14 +0,0 @@ -ndbd,1,localhost ndbd,2,localhost ndb_mgmd,3,localhost mysqld,4,localhost mysqld,5,localhost mysqld,6,localhost -1,localhost,20971520,1048576 2,localhost,20971520,1048576 -1 localhost 20971520 1048576 -2 localhost 20971520 1048576 -1 2 -ndbd,1,localhost ndbd,2,localhost ndb_mgmd,3,localhost mysqld,4, mysqld,5, mysqld,6, mysqld,7, mysqld,8, mysqld,9, mysqld,10, mysqld,11, -ndbd,1,localhost,52428800,26214400 ndbd,2,localhost,52428800,36700160 ndbd,3,localhost,52428800,52428800 ndbd,4,localhost,52428800,52428800 ndb_mgmd,5,localhost,, mysqld,6,localhost,, -ndbd,1,localhost ndbd,2,localhost ndbd,3,localhost ndbd,4,localhost ndb_mgmd,5,localhost mysqld,6, mysqld,7, mysqld,8, mysqld,9, mysqld,10, -ndbd,2,localhost ndbd,3,localhost ndbd,4,localhost ndbd,5,localhost ndb_mgmd,6,localhost mysqld,1, mysqld,7, mysqld,8, mysqld,9, mysqld,10, -ndbd,3,localhost ndbd,4,localhost ndbd,5,localhost ndbd,6,localhost ndb_mgmd,1,localhost ndb_mgmd,2,localhost mysqld,11, mysqld,12, mysqld,13, mysqld,14, mysqld,15, -shm,3,4,35,3 shm,3,5,35,3 shm,3,6,35,3 shm,4,5,35,4 shm,4,6,35,4 shm,5,6,35,5 tcp,11,3,55,3 tcp,11,4,55,4 tcp,11,5,55,5 tcp,11,6,55,6 tcp,12,3,55,3 tcp,12,4,55,4 tcp,12,5,55,5 tcp,12,6,55,6 tcp,13,3,55,3 tcp,13,4,55,4 tcp,13,5,55,5 tcp,13,6,55,6 tcp,14,3,55,3 tcp,14,4,55,4 tcp,14,5,55,5 tcp,14,6,55,6 tcp,15,3,55,3 tcp,15,4,55,4 tcp,15,5,55,5 tcp,15,6,55,6 tcp,1,3,55,1 tcp,1,4,55,1 tcp,1,5,55,1 tcp,1,6,55,1 tcp,2,3,55,2 tcp,2,4,55,2 tcp,2,5,55,2 tcp,2,6,55,2 -1 2 3 - -1 2 3 diff --git a/mysql-test/suite/ndb/r/ndb_config2.result b/mysql-test/suite/ndb/r/ndb_config2.result deleted file mode 100644 index cfd012933c4..00000000000 --- a/mysql-test/suite/ndb/r/ndb_config2.result +++ /dev/null @@ -1 +0,0 @@ -shm,3,4,35,3 shm,3,5,35,3 shm,3,6,35,3 shm,4,5,35,4 shm,4,6,35,4 shm,5,6,35,5 tcp,11,3,55,3 tcp,11,4,55,4 tcp,11,5,55,5 tcp,11,6,55,6 tcp,12,3,55,3 tcp,12,4,55,4 tcp,12,5,55,5 tcp,12,6,55,6 tcp,13,3,55,3 tcp,13,4,55,4 tcp,13,5,55,5 tcp,13,6,55,6 tcp,14,3,55,3 tcp,14,4,55,4 tcp,14,5,55,5 tcp,14,6,55,6 tcp,15,3,55,3 tcp,15,4,55,4 tcp,15,5,55,5 tcp,15,6,55,6 tcp,1,3,55,1 tcp,1,4,55,1 tcp,1,5,55,1 tcp,1,6,55,1 tcp,2,3,55,2 tcp,2,4,55,2 tcp,2,5,55,2 tcp,2,6,55,2 diff --git a/mysql-test/suite/ndb/r/ndb_cursor.result b/mysql-test/suite/ndb/r/ndb_cursor.result deleted file mode 100644 index 3e6f207e153..00000000000 --- a/mysql-test/suite/ndb/r/ndb_cursor.result +++ /dev/null @@ -1,42 +0,0 @@ -drop table if exists t1; -drop table if exists t2; -create table t1 ( -a int not null primary key, -b int not null -) engine=ndb; -create table t2 ( -a int not null primary key, -b int not null -) engine=ndb; -insert into t1 values (1,10), (2,20), (3,30), (4, 40); -create procedure test_cursor () -begin -declare done int default 0; -declare temp_a int; -declare temp_b int; -declare cur1 cursor for select a,b from t1; -declare continue handler for sqlstate '02000' set done = 1; -open cur1; -repeat -fetch cur1 into temp_a, temp_b; -if not done then -insert into t2 values (temp_a, temp_b); -end if; -until done end repeat; -close cur1; -end; -// -select * from t2 order by a; -a b -call test_cursor(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed -select * from t2 order by a; -a b -1 10 -2 20 -3 30 -4 40 -drop procedure test_cursor; -drop table t1,t2; -end of 5.1 tests diff --git a/mysql-test/suite/ndb/r/ndb_database.result b/mysql-test/suite/ndb/r/ndb_database.result deleted file mode 100644 index e3da4af0265..00000000000 --- a/mysql-test/suite/ndb/r/ndb_database.result +++ /dev/null @@ -1,13 +0,0 @@ -drop database if exists mysqltest; -create database mysqltest; -create table mysqltest.t1 (a int primary key, b int) engine=ndb; -use mysqltest; -show tables; -Tables_in_mysqltest -t1 -drop database mysqltest; -create database mysqltest; -use mysqltest; -show tables; -Tables_in_mysqltest -drop database mysqltest; diff --git a/mysql-test/suite/ndb/r/ndb_dd_alter.result b/mysql-test/suite/ndb/r/ndb_dd_alter.result deleted file mode 100644 index 7ebbb24c84f..00000000000 --- a/mysql-test/suite/ndb/r/ndb_dd_alter.result +++ /dev/null @@ -1,560 +0,0 @@ -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -**** Test Setup Section **** -CREATE LOGFILE GROUP lg -ADD UNDOFILE './lg_group/undofile.dat' - INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; -CREATE TABLESPACE ts -ADD DATAFILE './table_space/datafile.dat' - USE LOGFILE GROUP lg -INITIAL_SIZE 12M -ENGINE NDB; -CREATE TABLE test.t1 ( -a1 smallint NOT NULL, -a2 int NOT NULL, -a3 bigint NOT NULL, -a4 char(10), -a5 decimal(5,1), -a6 time, -a7 date, -a8 datetime, -a9 VARCHAR(255), -a10 blob, -PRIMARY KEY(a1) -) ENGINE=InnoDB; -SHOW CREATE TABLE test.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a1` smallint(6) NOT NULL, - `a2` int(11) NOT NULL, - `a3` bigint(20) NOT NULL, - `a4` char(10) DEFAULT NULL, - `a5` decimal(5,1) DEFAULT NULL, - `a6` time DEFAULT NULL, - `a7` date DEFAULT NULL, - `a8` datetime DEFAULT NULL, - `a9` varchar(255) DEFAULT NULL, - `a10` blob, - PRIMARY KEY (`a1`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -SELECT * FROM test.t1 ORDER BY a1; -a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 -1 2 2000000001 aaa1 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb1 binary data -2 3 2000000002 aaa2 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb2 binary data -3 4 2000000003 aaa3 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb3 binary data -4 5 2000000004 aaa4 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb4 binary data -5 6 2000000005 aaa5 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb5 binary data -6 7 2000000006 aaa6 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb6 binary data -7 8 2000000007 aaa7 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb7 binary data -8 9 2000000008 aaa8 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb8 binary data -9 10 2000000009 aaa9 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb9 binary data -10 11 2000000010 aaa10 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb10 binary data -11 12 2000000011 aaa11 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb11 binary data -12 13 2000000012 aaa12 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb12 binary data -13 14 2000000013 aaa13 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb13 binary data -14 15 2000000014 aaa14 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb14 binary data -15 16 2000000015 aaa15 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb15 binary data -16 17 2000000016 aaa16 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb16 binary data -17 18 2000000017 aaa17 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb17 binary data -18 19 2000000018 aaa18 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb18 binary data -19 20 2000000019 aaa19 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb19 binary data -20 21 2000000020 aaa20 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb20 binary data -ALTER TABLE test.t1 TABLESPACE ts STORAGE DISK ENGINE=NDB; -SHOW CREATE TABLE test.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a1` smallint(6) NOT NULL, - `a2` int(11) NOT NULL, - `a3` bigint(20) NOT NULL, - `a4` char(10) DEFAULT NULL, - `a5` decimal(5,1) DEFAULT NULL, - `a6` time DEFAULT NULL, - `a7` date DEFAULT NULL, - `a8` datetime DEFAULT NULL, - `a9` varchar(255) DEFAULT NULL, - `a10` blob, - PRIMARY KEY (`a1`) -) /*!50100 TABLESPACE ts STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -a1 Smallint PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY -a2 Int NOT NULL AT=FIXED ST=DISK -a3 Bigint NOT NULL AT=FIXED ST=DISK -a4 Char(10;latin1_swedish_ci) NULL AT=FIXED ST=DISK -a5 Decimal(5,1) NULL AT=FIXED ST=DISK -a6 Time NULL AT=FIXED ST=DISK -a7 Date NULL AT=FIXED ST=DISK -a8 Datetime NULL AT=FIXED ST=DISK -a9 Varchar(255;latin1_swedish_ci) NULL AT=FIXED ST=DISK -a10 Blob(256,2000;16) NULL AT=FIXED ST=MEMORY -SELECT * FROM test.t1 ORDER BY a1; -a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 -1 2 2000000001 aaa1 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb1 binary data -2 3 2000000002 aaa2 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb2 binary data -3 4 2000000003 aaa3 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb3 binary data -4 5 2000000004 aaa4 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb4 binary data -5 6 2000000005 aaa5 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb5 binary data -6 7 2000000006 aaa6 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb6 binary data -7 8 2000000007 aaa7 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb7 binary data -8 9 2000000008 aaa8 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb8 binary data -9 10 2000000009 aaa9 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb9 binary data -10 11 2000000010 aaa10 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb10 binary data -11 12 2000000011 aaa11 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb11 binary data -12 13 2000000012 aaa12 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb12 binary data -13 14 2000000013 aaa13 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb13 binary data -14 15 2000000014 aaa14 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb14 binary data -15 16 2000000015 aaa15 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb15 binary data -16 17 2000000016 aaa16 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb16 binary data -17 18 2000000017 aaa17 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb17 binary data -18 19 2000000018 aaa18 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb18 binary data -19 20 2000000019 aaa19 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb19 binary data -20 21 2000000020 aaa20 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb20 binary data -DROP TABLE test.t1; -CREATE TABLE test.t1 ( -a1 smallint NOT NULL, -a2 int NOT NULL, -a3 bigint NOT NULL, -a4 char(10), -a5 decimal(5,1), -a6 time, -a7 date, -a8 datetime, -a9 VARCHAR(255), -a10 blob, -PRIMARY KEY(a1) -) ENGINE=MyISAM; -SHOW CREATE TABLE test.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a1` smallint(6) NOT NULL, - `a2` int(11) NOT NULL, - `a3` bigint(20) NOT NULL, - `a4` char(10) DEFAULT NULL, - `a5` decimal(5,1) DEFAULT NULL, - `a6` time DEFAULT NULL, - `a7` date DEFAULT NULL, - `a8` datetime DEFAULT NULL, - `a9` varchar(255) DEFAULT NULL, - `a10` blob, - PRIMARY KEY (`a1`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -SELECT * FROM test.t1 ORDER BY a1; -a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 -1 2 2000000001 aaa1 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb1 binary data -2 3 2000000002 aaa2 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb2 binary data -3 4 2000000003 aaa3 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb3 binary data -4 5 2000000004 aaa4 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb4 binary data -5 6 2000000005 aaa5 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb5 binary data -6 7 2000000006 aaa6 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb6 binary data -7 8 2000000007 aaa7 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb7 binary data -8 9 2000000008 aaa8 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb8 binary data -9 10 2000000009 aaa9 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb9 binary data -10 11 2000000010 aaa10 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb10 binary data -11 12 2000000011 aaa11 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb11 binary data -12 13 2000000012 aaa12 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb12 binary data -13 14 2000000013 aaa13 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb13 binary data -14 15 2000000014 aaa14 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb14 binary data -15 16 2000000015 aaa15 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb15 binary data -16 17 2000000016 aaa16 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb16 binary data -17 18 2000000017 aaa17 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb17 binary data -18 19 2000000018 aaa18 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb18 binary data -19 20 2000000019 aaa19 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb19 binary data -20 21 2000000020 aaa20 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb20 binary data -ALTER TABLE test.t1 TABLESPACE ts STORAGE DISK ENGINE=NDB; -SHOW CREATE TABLE test.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a1` smallint(6) NOT NULL, - `a2` int(11) NOT NULL, - `a3` bigint(20) NOT NULL, - `a4` char(10) DEFAULT NULL, - `a5` decimal(5,1) DEFAULT NULL, - `a6` time DEFAULT NULL, - `a7` date DEFAULT NULL, - `a8` datetime DEFAULT NULL, - `a9` varchar(255) DEFAULT NULL, - `a10` blob, - PRIMARY KEY (`a1`) -) /*!50100 TABLESPACE ts STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -a1 Smallint PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY -a2 Int NOT NULL AT=FIXED ST=DISK -a3 Bigint NOT NULL AT=FIXED ST=DISK -a4 Char(10;latin1_swedish_ci) NULL AT=FIXED ST=DISK -a5 Decimal(5,1) NULL AT=FIXED ST=DISK -a6 Time NULL AT=FIXED ST=DISK -a7 Date NULL AT=FIXED ST=DISK -a8 Datetime NULL AT=FIXED ST=DISK -a9 Varchar(255;latin1_swedish_ci) NULL AT=FIXED ST=DISK -a10 Blob(256,2000;16) NULL AT=FIXED ST=MEMORY -SELECT * FROM test.t1 ORDER BY a1; -a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 -1 2 2000000001 aaa1 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb1 binary data -2 3 2000000002 aaa2 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb2 binary data -3 4 2000000003 aaa3 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb3 binary data -4 5 2000000004 aaa4 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb4 binary data -5 6 2000000005 aaa5 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb5 binary data -6 7 2000000006 aaa6 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb6 binary data -7 8 2000000007 aaa7 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb7 binary data -8 9 2000000008 aaa8 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb8 binary data -9 10 2000000009 aaa9 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb9 binary data -10 11 2000000010 aaa10 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb10 binary data -11 12 2000000011 aaa11 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb11 binary data -12 13 2000000012 aaa12 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb12 binary data -13 14 2000000013 aaa13 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb13 binary data -14 15 2000000014 aaa14 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb14 binary data -15 16 2000000015 aaa15 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb15 binary data -16 17 2000000016 aaa16 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb16 binary data -17 18 2000000017 aaa17 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb17 binary data -18 19 2000000018 aaa18 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb18 binary data -19 20 2000000019 aaa19 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb19 binary data -20 21 2000000020 aaa20 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb20 binary data -ALTER TABLE test.t1 ENGINE=InnoDB; -SHOW CREATE TABLE test.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a1` smallint(6) NOT NULL, - `a2` int(11) NOT NULL, - `a3` bigint(20) NOT NULL, - `a4` char(10) DEFAULT NULL, - `a5` decimal(5,1) DEFAULT NULL, - `a6` time DEFAULT NULL, - `a7` date DEFAULT NULL, - `a8` datetime DEFAULT NULL, - `a9` varchar(255) DEFAULT NULL, - `a10` blob, - PRIMARY KEY (`a1`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -SELECT * FROM test.t1 ORDER BY a1; -a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 -1 2 2000000001 aaa1 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb1 binary data -2 3 2000000002 aaa2 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb2 binary data -3 4 2000000003 aaa3 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb3 binary data -4 5 2000000004 aaa4 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb4 binary data -5 6 2000000005 aaa5 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb5 binary data -6 7 2000000006 aaa6 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb6 binary data -7 8 2000000007 aaa7 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb7 binary data -8 9 2000000008 aaa8 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb8 binary data -9 10 2000000009 aaa9 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb9 binary data -10 11 2000000010 aaa10 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb10 binary data -11 12 2000000011 aaa11 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb11 binary data -12 13 2000000012 aaa12 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb12 binary data -13 14 2000000013 aaa13 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb13 binary data -14 15 2000000014 aaa14 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb14 binary data -15 16 2000000015 aaa15 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb15 binary data -16 17 2000000016 aaa16 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb16 binary data -17 18 2000000017 aaa17 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb17 binary data -18 19 2000000018 aaa18 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb18 binary data -19 20 2000000019 aaa19 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb19 binary data -20 21 2000000020 aaa20 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb20 binary data -ALTER TABLE test.t1 TABLESPACE ts STORAGE DISK ENGINE=NDB; -SHOW CREATE TABLE test.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a1` smallint(6) NOT NULL, - `a2` int(11) NOT NULL, - `a3` bigint(20) NOT NULL, - `a4` char(10) DEFAULT NULL, - `a5` decimal(5,1) DEFAULT NULL, - `a6` time DEFAULT NULL, - `a7` date DEFAULT NULL, - `a8` datetime DEFAULT NULL, - `a9` varchar(255) DEFAULT NULL, - `a10` blob, - PRIMARY KEY (`a1`) -) /*!50100 TABLESPACE ts STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -a1 Smallint PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY -a2 Int NOT NULL AT=FIXED ST=DISK -a3 Bigint NOT NULL AT=FIXED ST=DISK -a4 Char(10;latin1_swedish_ci) NULL AT=FIXED ST=DISK -a5 Decimal(5,1) NULL AT=FIXED ST=DISK -a6 Time NULL AT=FIXED ST=DISK -a7 Date NULL AT=FIXED ST=DISK -a8 Datetime NULL AT=FIXED ST=DISK -a9 Varchar(255;latin1_swedish_ci) NULL AT=FIXED ST=DISK -a10 Blob(256,2000;16) NULL AT=FIXED ST=MEMORY -ALTER TABLE test.t1 ENGINE=MyISAM; -SHOW CREATE TABLE test.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a1` smallint(6) NOT NULL, - `a2` int(11) NOT NULL, - `a3` bigint(20) NOT NULL, - `a4` char(10) DEFAULT NULL, - `a5` decimal(5,1) DEFAULT NULL, - `a6` time DEFAULT NULL, - `a7` date DEFAULT NULL, - `a8` datetime DEFAULT NULL, - `a9` varchar(255) DEFAULT NULL, - `a10` blob, - PRIMARY KEY (`a1`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -DROP TABLE test.t1; -CREATE TABLE test.t1 (a1 INT PRIMARY KEY) TABLESPACE ts STORAGE DISK ENGINE=NDB; -SELECT * FROM test.t1 ORDER BY a1; -a1 -1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -SELECT * FROM information_schema.partitions WHERE table_name= 't1' AND partition_name = 'p0'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -def test t1 p0 NULL 1 NULL KEY NULL NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default ts -ALTER TABLE test.t1 ADD a2 FLOAT, ADD a3 DOUBLE; -SELECT * FROM information_schema.partitions WHERE table_name= 't1' AND partition_name = 'p0'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -def test t1 p0 NULL 1 NULL KEY NULL NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default ts -SELECT * FROM test.t1 ORDER BY a1; -a1 a2 a3 -1 2.2345 20000001 -2 3.2345 20000002 -3 4.2345 20000003 -4 5.2345 20000004 -5 6.2345 20000005 -6 7.2345 20000006 -7 8.2345 20000007 -8 9.2345 20000008 -9 10.2345 20000009 -10 11.2345 20000010 -11 12.2345 20000011 -12 13.2345 20000012 -13 14.2345 20000013 -14 15.2345 20000014 -15 16.2345 20000015 -16 17.2345 20000016 -17 18.2345 20000017 -18 19.2345 20000018 -19 20.2345 20000019 -20 21.2345 20000020 -ALTER TABLE test.t1 ADD a4 BIT, ADD a5 TINYINT, ADD a6 BIGINT, ADD a7 DATE, ADD a8 TIME; -SELECT a1,a2,a3,hex(a4), a5,a6,a7,a8 FROM test.t1 ORDER BY a1; -a1 a2 a3 hex(a4) a5 a6 a7 a8 -1 2.2345 20000001 0 1 23457 2006-01-01 07:04:00 -2 3.2345 20000002 0 1 23458 2006-01-01 07:04:00 -3 4.2345 20000003 0 1 23459 2006-01-01 07:04:00 -4 5.2345 20000004 0 1 23460 2006-01-01 07:04:00 -5 6.2345 20000005 0 1 23461 2006-01-01 07:04:00 -6 7.2345 20000006 0 1 23462 2006-01-01 07:04:00 -7 8.2345 20000007 0 1 23463 2006-01-01 07:04:00 -8 9.2345 20000008 0 1 23464 2006-01-01 07:04:00 -9 10.2345 20000009 0 1 23465 2006-01-01 07:04:00 -10 11.2345 20000010 0 1 23466 2006-01-01 07:04:00 -11 12.2345 20000011 0 1 23467 2006-01-01 07:04:00 -12 13.2345 20000012 0 1 23468 2006-01-01 07:04:00 -13 14.2345 20000013 0 1 23469 2006-01-01 07:04:00 -14 15.2345 20000014 0 1 23470 2006-01-01 07:04:00 -15 16.2345 20000015 0 1 23471 2006-01-01 07:04:00 -16 17.2345 20000016 0 1 23472 2006-01-01 07:04:00 -17 18.2345 20000017 0 1 23473 2006-01-01 07:04:00 -18 19.2345 20000018 0 1 23474 2006-01-01 07:04:00 -19 20.2345 20000019 0 1 23475 2006-01-01 07:04:00 -20 21.2345 20000020 0 1 23476 2006-01-01 07:04:00 -ALTER TABLE test.t1 ADD a9 DATETIME, ADD a10 TINYTEXT, ADD a11 MEDIUMTEXT, ADD a12 LONGTEXT, ADD a13 TEXT, ADD a14 BLOB; -SHOW CREATE TABLE test.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a1` int(11) NOT NULL, - `a2` float DEFAULT NULL, - `a3` double DEFAULT NULL, - `a4` bit(1) DEFAULT NULL, - `a5` tinyint(4) DEFAULT NULL, - `a6` bigint(20) DEFAULT NULL, - `a7` date DEFAULT NULL, - `a8` time DEFAULT NULL, - `a9` datetime DEFAULT NULL, - `a10` tinytext, - `a11` mediumtext, - `a12` longtext, - `a13` text, - `a14` blob, - PRIMARY KEY (`a1`) -) /*!50100 TABLESPACE ts STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -a1 Int PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY -a2 Float NULL AT=FIXED ST=DISK -a3 Double NULL AT=FIXED ST=DISK -a4 Bit(1) NULL AT=FIXED ST=DISK -a5 Tinyint NULL AT=FIXED ST=DISK -a6 Bigint NULL AT=FIXED ST=DISK -a7 Date NULL AT=FIXED ST=DISK -a8 Time NULL AT=FIXED ST=DISK -a9 Datetime NULL AT=FIXED ST=DISK -a10 Text(256,0;0;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY -a11 Text(256,4000;8;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY -a12 Text(256,8000;4;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY -a13 Text(256,2000;16;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY -a14 Blob(256,2000;16) NULL AT=FIXED ST=MEMORY -SELECT a1, a2,a3,hex(a4),a5,a6,a7,a8,a9,a10,a11,a12,a13 FROM test.t1 ORDER BY a1; -a1 a2 a3 hex(a4) a5 a6 a7 a8 a9 a10 a11 a12 a13 -1 2.2345 20000001 0 1 23457 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field -2 3.2345 20000002 0 1 23458 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field -3 4.2345 20000003 0 1 23459 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field -4 5.2345 20000004 0 1 23460 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field -5 6.2345 20000005 0 1 23461 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field -6 7.2345 20000006 0 1 23462 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field -7 8.2345 20000007 0 1 23463 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field -8 9.2345 20000008 0 1 23464 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field -9 10.2345 20000009 0 1 23465 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field -10 11.2345 20000010 0 1 23466 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field -11 12.2345 20000011 0 1 23467 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field -12 13.2345 20000012 0 1 23468 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field -13 14.2345 20000013 0 1 23469 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field -14 15.2345 20000014 0 1 23470 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field -15 16.2345 20000015 0 1 23471 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field -16 17.2345 20000016 0 1 23472 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field -17 18.2345 20000017 0 1 23473 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field -18 19.2345 20000018 0 1 23474 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field -19 20.2345 20000019 0 1 23475 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field -20 21.2345 20000020 0 1 23476 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field -ALTER TABLE test.t1 ADD INDEX a2_i (a2), ADD INDEX a3_i (a3); -SHOW CREATE TABLE test.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a1` int(11) NOT NULL, - `a2` float DEFAULT NULL, - `a3` double DEFAULT NULL, - `a4` bit(1) DEFAULT NULL, - `a5` tinyint(4) DEFAULT NULL, - `a6` bigint(20) DEFAULT NULL, - `a7` date DEFAULT NULL, - `a8` time DEFAULT NULL, - `a9` datetime DEFAULT NULL, - `a10` tinytext, - `a11` mediumtext, - `a12` longtext, - `a13` text, - `a14` blob, - PRIMARY KEY (`a1`), - KEY `a2_i` (`a2`), - KEY `a3_i` (`a3`) -) /*!50100 TABLESPACE ts STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -a1 Int PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY -a2 Float NULL AT=FIXED ST=MEMORY -a3 Double NULL AT=FIXED ST=MEMORY -a4 Bit(1) NULL AT=FIXED ST=DISK -a5 Tinyint NULL AT=FIXED ST=DISK -a6 Bigint NULL AT=FIXED ST=DISK -a7 Date NULL AT=FIXED ST=DISK -a8 Time NULL AT=FIXED ST=DISK -a9 Datetime NULL AT=FIXED ST=DISK -a10 Text(256,0;0;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY -a11 Text(256,4000;8;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY -a12 Text(256,8000;4;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY -a13 Text(256,2000;16;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY -a14 Blob(256,2000;16) NULL AT=FIXED ST=MEMORY -ALTER TABLE test.t1 DROP INDEX a2_i; -SHOW CREATE TABLE test.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a1` int(11) NOT NULL, - `a2` float DEFAULT NULL, - `a3` double DEFAULT NULL, - `a4` bit(1) DEFAULT NULL, - `a5` tinyint(4) DEFAULT NULL, - `a6` bigint(20) DEFAULT NULL, - `a7` date DEFAULT NULL, - `a8` time DEFAULT NULL, - `a9` datetime DEFAULT NULL, - `a10` tinytext, - `a11` mediumtext, - `a12` longtext, - `a13` text, - `a14` blob, - PRIMARY KEY (`a1`), - KEY `a3_i` (`a3`) -) /*!50100 TABLESPACE ts STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -a1 Int PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY -a2 Float NULL AT=FIXED ST=DISK -a3 Double NULL AT=FIXED ST=MEMORY -a4 Bit(1) NULL AT=FIXED ST=DISK -a5 Tinyint NULL AT=FIXED ST=DISK -a6 Bigint NULL AT=FIXED ST=DISK -a7 Date NULL AT=FIXED ST=DISK -a8 Time NULL AT=FIXED ST=DISK -a9 Datetime NULL AT=FIXED ST=DISK -a10 Text(256,0;0;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY -a11 Text(256,4000;8;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY -a12 Text(256,8000;4;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY -a13 Text(256,2000;16;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY -a14 Blob(256,2000;16) NULL AT=FIXED ST=MEMORY -TRUNCATE TABLE test.t1; -SHOW CREATE TABLE test.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a1` int(11) NOT NULL, - `a2` float DEFAULT NULL, - `a3` double DEFAULT NULL, - `a4` bit(1) DEFAULT NULL, - `a5` tinyint(4) DEFAULT NULL, - `a6` bigint(20) DEFAULT NULL, - `a7` date DEFAULT NULL, - `a8` time DEFAULT NULL, - `a9` datetime DEFAULT NULL, - `a10` tinytext, - `a11` mediumtext, - `a12` longtext, - `a13` text, - `a14` blob, - PRIMARY KEY (`a1`), - KEY `a3_i` (`a3`) -) /*!50100 TABLESPACE ts STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -a1 Int PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY -a2 Float NULL AT=FIXED ST=DISK -a3 Double NULL AT=FIXED ST=MEMORY -a4 Bit(1) NULL AT=FIXED ST=DISK -a5 Tinyint NULL AT=FIXED ST=DISK -a6 Bigint NULL AT=FIXED ST=DISK -a7 Date NULL AT=FIXED ST=DISK -a8 Time NULL AT=FIXED ST=DISK -a9 Datetime NULL AT=FIXED ST=DISK -a10 Text(256,0;0;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY -a11 Text(256,4000;8;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY -a12 Text(256,8000;4;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY -a13 Text(256,2000;16;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY -a14 Blob(256,2000;16) NULL AT=FIXED ST=MEMORY -ALTER TABLE test.t1 DROP a14; -ALTER TABLE test.t1 DROP a13; -ALTER TABLE test.t1 DROP a12; -ALTER TABLE test.t1 DROP a11; -ALTER TABLE test.t1 DROP a10; -ALTER TABLE test.t1 DROP a9; -ALTER TABLE test.t1 DROP a8; -ALTER TABLE test.t1 DROP a7; -ALTER TABLE test.t1 DROP a6; -ALTER TABLE test.t1 DROP PRIMARY KEY; -SHOW CREATE TABLE test.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a1` int(11) NOT NULL, - `a2` float DEFAULT NULL, - `a3` double DEFAULT NULL, - `a4` bit(1) DEFAULT NULL, - `a5` tinyint(4) DEFAULT NULL, - KEY `a3_i` (`a3`) -) /*!50100 TABLESPACE ts STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -a1 Int NOT NULL AT=FIXED ST=DISK -a2 Float NULL AT=FIXED ST=DISK -a3 Double NULL AT=FIXED ST=MEMORY -a4 Bit(1) NULL AT=FIXED ST=DISK -a5 Tinyint NULL AT=FIXED ST=DISK -$PK Bigunsigned PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY -DROP TABLE test.t1; -ALTER TABLESPACE ts -DROP DATAFILE './table_space/datafile.dat' - ENGINE NDB; -DROP TABLESPACE ts ENGINE NDB; -DROP LOGFILE GROUP lg ENGINE=NDB; diff --git a/mysql-test/suite/ndb/r/ndb_dd_basic.result b/mysql-test/suite/ndb/r/ndb_dd_basic.result deleted file mode 100644 index e56c18c5d95..00000000000 --- a/mysql-test/suite/ndb/r/ndb_dd_basic.result +++ /dev/null @@ -1,535 +0,0 @@ -select count(*) from information_schema.columns; -count(*) -# -DROP TABLE IF EXISTS t1; -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=MYISAM; -Warnings: -Warning 1478 Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP' -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE = 4M -ENGINE=XYZ; -Warnings: -Warning 1286 Unknown storage engine 'XYZ' -Warning 1478 Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP' -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M; -Warnings: -Warning 1478 Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP' -set storage_engine=ndb; -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M; -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE = 4M -ENGINE=NDB; -set storage_engine=myisam; -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE NDB; -ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile02.dat' -INITIAL_SIZE = 4M -ENGINE=NDB; -CREATE TABLE t1 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE ts1 STORAGE DISK -ENGINE=NDB; -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `pk1` int(11) NOT NULL, - `b` int(11) NOT NULL, - `c` int(11) NOT NULL, - PRIMARY KEY (`pk1`) -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -INSERT INTO t1 VALUES (0, 0, 0); -SELECT * FROM t1; -pk1 b c -0 0 0 -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10), -(11,11,11),(12,12,12),(13,13,13),(14,14,14),(15,15,15), -(16,16,16),(17,17,17),(18,18,18),(19,19,19),(20,20,20), -(21,21,21),(22,22,22),(23,23,23),(24,24,24),(25,25,25), -(26,26,26),(27,27,27),(28,28,28),(29,29,29),(30,30,30), -(31,31,31),(32,32,32),(33,33,33),(34,34,34),(35,35,35), -(36,36,36),(37,37,37),(38,38,38),(39,39,39),(40,40,40), -(41,41,41),(42,42,42),(43,43,43),(44,44,44),(45,45,45), -(46,46,46),(47,47,47),(48,48,48),(49,49,49),(50,50,50), -(51,51,51),(52,52,52),(53,53,53),(54,54,54),(55,55,55), -(56,56,56),(57,57,57),(58,58,58),(59,59,59),(60,60,60), -(61,61,61),(62,62,62),(63,63,63),(64,64,64),(65,65,65), -(66,66,66),(67,67,67),(68,68,68),(69,69,69),(70,70,70), -(71,71,71),(72,72,72),(73,73,73),(74,74,74),(75,75,75), -(76,76,76),(77,77,77),(78,78,78),(79,79,79),(80,80,80), -(81,81,81),(82,82,82),(83,83,83),(84,84,84),(85,85,85), -(86,86,86),(87,87,87),(88,88,88),(89,89,89),(90,90,90), -(91,91,91),(92,92,92),(93,93,93),(94,94,94),(95,95,95), -(96,96,96),(97,97,97),(98,98,98),(99,99,99),(100,100,100), -(101,101,101),(102,102,102),(103,103,103),(104,104,104),(105,105,105), -(106,106,106),(107,107,107),(108,108,108),(109,109,109),(110,110,110), -(111,111,111),(112,112,112),(113,113,113),(114,114,114),(115,115,115), -(116,116,116),(117,117,117),(118,118,118),(119,119,119),(120,120,120), -(121,121,121),(122,122,122),(123,123,123),(124,124,124),(125,125,125), -(126,126,126),(127,127,127),(128,128,128),(129,129,129),(130,130,130), -(131,131,131),(132,132,132),(133,133,133),(134,134,134),(135,135,135), -(136,136,136),(137,137,137),(138,138,138),(139,139,139),(140,140,140), -(141,141,141),(142,142,142),(143,143,143),(144,144,144),(145,145,145), -(146,146,146),(147,147,147),(148,148,148),(149,149,149),(150,150,150), -(151,151,151),(152,152,152),(153,153,153),(154,154,154),(155,155,155), -(156,156,156),(157,157,157),(158,158,158),(159,159,159),(160,160,160), -(161,161,161),(162,162,162),(163,163,163),(164,164,164),(165,165,165), -(166,166,166),(167,167,167),(168,168,168),(169,169,169),(170,170,170), -(171,171,171),(172,172,172),(173,173,173),(174,174,174),(175,175,175), -(176,176,176),(177,177,177),(178,178,178),(179,179,179),(180,180,180), -(181,181,181),(182,182,182),(183,183,183),(184,184,184),(185,185,185), -(186,186,186),(187,187,187),(188,188,188),(189,189,189),(190,190,190), -(191,191,191),(192,192,192),(193,193,193),(194,194,194),(195,195,195), -(196,196,196),(197,197,197),(198,198,198),(199,199,199),(200,200,200), -(201,201,201),(202,202,202),(203,203,203),(204,204,204),(205,205,205), -(206,206,206),(207,207,207),(208,208,208),(209,209,209),(210,210,210), -(211,211,211),(212,212,212),(213,213,213),(214,214,214),(215,215,215), -(216,216,216),(217,217,217),(218,218,218),(219,219,219),(220,220,220), -(221,221,221),(222,222,222),(223,223,223),(224,224,224),(225,225,225), -(226,226,226),(227,227,227),(228,228,228),(229,229,229),(230,230,230), -(231,231,231),(232,232,232),(233,233,233),(234,234,234),(235,235,235), -(236,236,236),(237,237,237),(238,238,238),(239,239,239),(240,240,240), -(241,241,241),(242,242,242),(243,243,243),(244,244,244),(245,245,245), -(246,246,246),(247,247,247),(248,248,248),(249,249,249),(250,250,250), -(251,251,251),(252,252,252),(253,253,253),(254,254,254),(255,255,255), -(256,256,256),(257,257,257),(258,258,258),(259,259,259),(260,260,260), -(261,261,261),(262,262,262),(263,263,263),(264,264,264),(265,265,265), -(266,266,266),(267,267,267),(268,268,268),(269,269,269),(270,270,270), -(271,271,271),(272,272,272),(273,273,273),(274,274,274),(275,275,275), -(276,276,276),(277,277,277),(278,278,278),(279,279,279),(280,280,280), -(281,281,281),(282,282,282),(283,283,283),(284,284,284),(285,285,285), -(286,286,286),(287,287,287),(288,288,288),(289,289,289),(290,290,290), -(291,291,291),(292,292,292),(293,293,293),(294,294,294),(295,295,295), -(296,296,296),(297,297,297),(298,298,298),(299,299,299),(300,300,300), -(301,301,301),(302,302,302),(303,303,303),(304,304,304),(305,305,305), -(306,306,306),(307,307,307),(308,308,308),(309,309,309),(310,310,310), -(311,311,311),(312,312,312),(313,313,313),(314,314,314),(315,315,315), -(316,316,316),(317,317,317),(318,318,318),(319,319,319),(320,320,320), -(321,321,321),(322,322,322),(323,323,323),(324,324,324),(325,325,325), -(326,326,326),(327,327,327),(328,328,328),(329,329,329),(330,330,330), -(331,331,331),(332,332,332),(333,333,333),(334,334,334),(335,335,335), -(336,336,336),(337,337,337),(338,338,338),(339,339,339),(340,340,340), -(341,341,341),(342,342,342),(343,343,343),(344,344,344),(345,345,345), -(346,346,346),(347,347,347),(348,348,348),(349,349,349),(350,350,350), -(351,351,351),(352,352,352),(353,353,353),(354,354,354),(355,355,355), -(356,356,356),(357,357,357),(358,358,358),(359,359,359),(360,360,360), -(361,361,361),(362,362,362),(363,363,363),(364,364,364),(365,365,365), -(366,366,366),(367,367,367),(368,368,368),(369,369,369),(370,370,370), -(371,371,371),(372,372,372),(373,373,373),(374,374,374),(375,375,375), -(376,376,376),(377,377,377),(378,378,378),(379,379,379),(380,380,380), -(381,381,381),(382,382,382),(383,383,383),(384,384,384),(385,385,385), -(386,386,386),(387,387,387),(388,388,388),(389,389,389),(390,390,390), -(391,391,391),(392,392,392),(393,393,393),(394,394,394),(395,395,395), -(396,396,396),(397,397,397),(398,398,398),(399,399,399),(400,400,400), -(401,401,401),(402,402,402),(403,403,403),(404,404,404),(405,405,405), -(406,406,406),(407,407,407),(408,408,408),(409,409,409),(410,410,410), -(411,411,411),(412,412,412),(413,413,413),(414,414,414),(415,415,415), -(416,416,416),(417,417,417),(418,418,418),(419,419,419),(420,420,420), -(421,421,421),(422,422,422),(423,423,423),(424,424,424),(425,425,425), -(426,426,426),(427,427,427),(428,428,428),(429,429,429),(430,430,430), -(431,431,431),(432,432,432),(433,433,433),(434,434,434),(435,435,435), -(436,436,436),(437,437,437),(438,438,438),(439,439,439),(440,440,440), -(441,441,441),(442,442,442),(443,443,443),(444,444,444),(445,445,445), -(446,446,446),(447,447,447),(448,448,448),(449,449,449),(450,450,450), -(451,451,451),(452,452,452),(453,453,453),(454,454,454),(455,455,455), -(456,456,456),(457,457,457),(458,458,458),(459,459,459),(460,460,460), -(461,461,461),(462,462,462),(463,463,463),(464,464,464),(465,465,465), -(466,466,466),(467,467,467),(468,468,468),(469,469,469),(470,470,470), -(471,471,471),(472,472,472),(473,473,473),(474,474,474),(475,475,475), -(476,476,476),(477,477,477),(478,478,478),(479,479,479),(480,480,480), -(481,481,481),(482,482,482),(483,483,483),(484,484,484),(485,485,485), -(486,486,486),(487,487,487),(488,488,488),(489,489,489),(490,490,490), -(491,491,491),(492,492,492),(493,493,493),(494,494,494),(495,495,495), -(496,496,496),(497,497,497),(498,498,498),(499,499,499),(500, 500, 500); -SELECT COUNT(*) FROM t1; -COUNT(*) -501 -CREATE LOGFILE GROUP lg2 -ADD UNDOFILE 'x.dat' -INITIAL_SIZE 10y -ENGINE = NDB; -ERROR HY000: A size parameter was incorrectly specified, either number or on the form 10M -CREATE LOGFILE GROUP lg2 -ADD UNDOFILE 'x.dat' -INITIAL_SIZE 10MB -ENGINE = NDB; -ERROR HY000: A size parameter was incorrectly specified, either number or on the form 10M -CREATE LOGFILE GROUP lg2 -ADD UNDOFILE 'x.dat' -INITIAL_SIZE 10 MB -ENGINE = NDB; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'MB -ENGINE = NDB' at line 3 -CREATE LOGFILE GROUP lg2 -ADD UNDOFILE 'x.dat' -INITIAL_SIZE 10 M -ENGINE = NDB; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'M -ENGINE = NDB' at line 3 -CREATE LOGFILE GROUP lg2 -ADD UNDOFILE 'x.dat' -INITIAL_SIZE 1000000000000K -ENGINE = NDB; -ERROR HY000: The size number was correct but we don't allow the digit part to be more than 2 billion -DROP TABLE t1; -create tablespace ts2 -add datafile 'datafile2_1.dat' -use logfile group lg1 -initial_size 12M -engine ndb; -CREATE TABLE City ( -ID int(11) NOT NULL AUTO_INCREMENT, -Name char(35) NOT NULL, -CountryCode char(3) NOT NULL, -District char(20) NOT NULL, -Population int(11) NOT NULL, -PRIMARY KEY (ID) -) ENGINE=ndbcluster -tablespace ts2 -storage disk; -alter tablespace ts2 -drop datafile 'datafile2_1.dat' -engine ndb; -insert -into City (Name,CountryCode,District,Population) -values ('BeiJing','CN','Beijing',2000); -ERROR HY000: Got error 1602 'No datafile in tablespace' from NDBCLUSTER -drop tablespace ts2 -engine ndb; -ERROR HY000: Failed to drop TABLESPACE -drop table City; -drop tablespace ts2 -engine ndb; -CREATE TABLE t1 (a INT PRIMARY KEY, b CHAR(4) NOT NULL, c CHAR(4) NOT NULL, KEY(b)) TABLESPACE ts1 STORAGE DISK ENGINE = NDB; -INSERT INTO t1 VALUES (1,'1','1'), (2,'2','2'), (3,'3','3'); -BEGIN; -UPDATE t1 SET b = '2' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -b -2 -SELECT * FROM t1 WHERE a = 1; -a b c -1 2 1 -UPDATE t1 SET c = '2' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -b -2 -SELECT * FROM t1 WHERE a = 1; -a b c -1 2 2 -UPDATE t1 SET b = '3' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -b -3 -SELECT * FROM t1 WHERE a = 1; -a b c -1 3 2 -COMMIT; -SELECT * FROM t1 ORDER BY 1; -a b c -1 3 2 -2 2 2 -3 3 3 -BEGIN; -UPDATE t1 SET c = '3' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -b -3 -SELECT * FROM t1 WHERE a = 1; -a b c -1 3 3 -UPDATE t1 SET b = '4' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -b -4 -SELECT * FROM t1 WHERE a = 1; -a b c -1 4 3 -UPDATE t1 SET c = '4' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -b -4 -SELECT * FROM t1 WHERE a = 1; -a b c -1 4 4 -COMMIT; -SELECT * FROM t1 ORDER BY 1; -a b c -1 4 4 -2 2 2 -3 3 3 -UPDATE t1 SET b = '5' WHERE a = 1; -SELECT * FROM t1 ORDER BY 1; -a b c -1 5 4 -2 2 2 -3 3 3 -UPDATE t1 SET b = '6' WHERE b = '5'; -SELECT * FROM t1 ORDER BY 1; -a b c -1 6 4 -2 2 2 -3 3 3 -UPDATE t1 SET b = '7'WHERE c = '4'; -SELECT * FROM t1 ORDER BY 1; -a b c -1 7 4 -2 2 2 -3 3 3 -UPDATE t1 SET c = '5' WHERE a = 1; -SELECT * FROM t1 ORDER BY 1; -a b c -1 7 5 -2 2 2 -3 3 3 -UPDATE t1 SET c = '6' WHERE b = '7'; -SELECT * FROM t1 ORDER BY 1; -a b c -1 7 6 -2 2 2 -3 3 3 -UPDATE t1 SET c = '7' WHERE c = '6'; -SELECT * FROM t1 ORDER BY 1; -a b c -1 7 7 -2 2 2 -3 3 3 -DROP TABLE t1; -CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(4) NOT NULL, c CHAR(4) NOT NULL, KEY(b)) TABLESPACE ts1 STORAGE DISK ENGINE NDB; -INSERT INTO t1 VALUE (1,'1','1'), (2,'2','2'), (3,'3','3'); -BEGIN; -UPDATE t1 SET b = '2' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -b -2 -SELECT * FROM t1 WHERE a = 1; -a b c -1 2 1 -UPDATE t1 SET c = '2' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -b -2 -SELECT * FROM t1 WHERE a = 1; -a b c -1 2 2 -UPDATE t1 SET b = '3' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -b -3 -SELECT * FROM t1 WHERE a = 1; -a b c -1 3 2 -COMMIT; -SELECT * FROM t1 ORDER BY 1; -a b c -1 3 2 -2 2 2 -3 3 3 -BEGIN; -UPDATE t1 SET c = '3' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -b -3 -SELECT * FROM t1 WHERE a = 1; -a b c -1 3 3 -UPDATE t1 SET b = '4' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -b -4 -SELECT * FROM t1 WHERE a = 1; -a b c -1 4 3 -UPDATE t1 SET c = '4' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -b -4 -SELECT * FROM t1 WHERE a = 1; -a b c -1 4 4 -COMMIT; -SELECT * FROM t1 ORDER BY 1; -a b c -1 4 4 -2 2 2 -3 3 3 -UPDATE t1 SET b = '5' WHERE a = 1; -SELECT * FROM t1 ORDER BY 1; -a b c -1 5 4 -2 2 2 -3 3 3 -UPDATE t1 SET b = '6' WHERE b = '5'; -SELECT * FROM t1 ORDER BY 1; -a b c -1 6 4 -2 2 2 -3 3 3 -UPDATE t1 SET b = '7' WHERE c = '4'; -SELECT * FROM t1 ORDER BY 1; -a b c -1 7 4 -2 2 2 -3 3 3 -UPDATE t1 SET c = '5' WHERE a = 1; -SELECT * FROM t1 ORDER BY 1; -a b c -1 7 5 -2 2 2 -3 3 3 -UPDATE t1 SET c = '6' WHERE b = '7'; -SELECT * FROM t1 ORDER BY 1; -a b c -1 7 6 -2 2 2 -3 3 3 -UPDATE t1 SET c = '7' WHERE c = '6'; -SELECT * FROM t1 ORDER BY 1; -a b c -1 7 7 -2 2 2 -3 3 3 -DELETE FROM t1; -INSERT INTO t1 VALUES (3,'1','1'); -BEGIN; -UPDATE t1 SET b = b + 2 WHERE A = 3; -DELETE FROM t1 WHERE A = 3; -INSERT INTO t1 VALUES (3,'0','0'); -COMMIT; -SELECT * from t1 ORDER BY 1; -a b c -3 0 0 -DROP TABLE t1; -CREATE TABLE t1 ( -a INT NOT NULL PRIMARY KEY, -b TEXT NOT NULL -) TABLESPACE ts1 STORAGE DISK ENGINE=NDBCLUSTER; -set @x0 = '01234567012345670123456701234567'; -set @x0 = concat(@x0,@x0,@x0,@x0,@x0,@x0,@x0,@x0); -set @b1 = 'b1'; -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@x0); -set @b2 = 'b2'; -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -INSERT INTO t1 VALUES(1,@b1); -INSERT INTO t1 VALUES(2,@b2); -SELECT a,length(b),substr(b,1+2*900,2) FROM t1 WHERE a=1; -a length(b) substr(b,1+2*900,2) -1 2256 b1 -SELECT a,length(b),substr(b,1+2*9000,2) FROM t1 WHERE a=2; -a length(b) substr(b,1+2*9000,2) -2 20000 b2 -UPDATE t1 SET b=@b2 WHERE a=1; -UPDATE t1 SET b=@b1 WHERE a=2; -SELECT a,length(b),substr(b,1+2*9000,2) FROM t1 WHERE a=1; -a length(b) substr(b,1+2*9000,2) -1 20000 b2 -SELECT a,length(b),substr(b,1+2*900,2) FROM t1 WHERE a=2; -a length(b) substr(b,1+2*900,2) -2 2256 b1 -UPDATE t1 SET b=concat(b,b) WHERE a=1; -UPDATE t1 SET b=concat(b,b) WHERE a=2; -SELECT a,length(b),substr(b,1+4*9000,2) FROM t1 WHERE a=1; -a length(b) substr(b,1+4*9000,2) -1 40000 b2 -SELECT a,length(b),substr(b,1+4*900,2) FROM t1 WHERE a=2; -a length(b) substr(b,1+4*900,2) -2 4512 b1 -DELETE FROM t1 WHERE a=1; -DELETE FROM t1 WHERE a=2; -SELECT COUNT(*) FROM t1; -COUNT(*) -0 -DROP TABLE t1; -CREATE TABLE t1 ( -a int NOT NULL, -b varchar(4000), -- must use 2 pages undo -PRIMARY KEY using hash (a) -) -TABLESPACE ts1 STORAGE DISK ENGINE=NDBCLUSTER; -set autocommit = 0; -insert into t1 values(0,'x'); -insert into t1 values(1,'x'); -insert into t1 values(2,'x'); -insert into t1 values(3,'x'); -insert into t1 values(4,'x'); -insert into t1 values(5,'x'); -insert into t1 values(6,'x'); -insert into t1 values(7,'x'); -insert into t1 values(8,'x'); -delete from t1 where a = 0; -commit; -delete from t1; -begin; -insert into t1 values (1, 'x'); -select * from t1; -a b -1 x -rollback; -set autocommit = 1; -drop table t1; -create table test.t1 (f1 varchar(50) primary key, f2 text,f3 int) -TABLESPACE ts1 STORAGE DISK engine=NDB; -insert into test.t1 (f1,f2,f3)VALUES("111111","aaaaaa",1); -insert into test.t1 (f1,f2,f3)VALUES("222222","bbbbbb",2); -select * from test.t1 order by f1; -f1 f2 f3 -111111 aaaaaa 1 -222222 bbbbbb 2 -select f1,f2 from test.t1 order by f2; -f1 f2 -111111 aaaaaa -222222 bbbbbb -select f2 from test.t1 order by f2; -f2 -aaaaaa -bbbbbb -select f1,f2 from test.t1 order by f1; -f1 f2 -111111 aaaaaa -222222 bbbbbb -drop table test.t1; -CREATE TABLE t1 ( -id int unsigned NOT NULL, -c1 int unsigned NOT NULL, -c2 int DEFAULT NULL, -PRIMARY KEY using hash (id), -UNIQUE KEY c1 using hash (c1)) -TABLESPACE ts1 STORAGE DISK ENGINE=ndbcluster; -insert into t1 values(1, 1, 3); -insert into t1 values(2, 2, 3); -update t1 set c1 = 1 where id = 2; -ERROR 23000: Duplicate entry '1' for key 'c1' -drop table t1; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE = NDB; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile02.dat' -ENGINE = NDB; -DROP TABLESPACE ts1 -ENGINE = NDB; -DROP LOGFILE GROUP lg1 -ENGINE =NDB; diff --git a/mysql-test/suite/ndb/r/ndb_dd_ddl.result b/mysql-test/suite/ndb/r/ndb_dd_ddl.result deleted file mode 100644 index 35516efb48c..00000000000 --- a/mysql-test/suite/ndb/r/ndb_dd_ddl.result +++ /dev/null @@ -1,315 +0,0 @@ -DROP TABLE IF EXISTS t1; -DROP DATABASE IF EXISTS mysqltest; -CREATE DATABASE mysqltest; -**** Begin Duplicate Statement Testing **** -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 1M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; -CREATE LOGFILE GROUP lg2 -ADD UNDOFILE 'undofile2.dat' -INITIAL_SIZE 1M -UNDO_BUFFER_SIZE 1M -ENGINE NDB; -ERROR HY000: Failed to create LOGFILE GROUP -SHOW WARNINGS; -Level Code Message -Warning 1296 Got error 1514 'Currently there is a limit of one logfile group' from NDB -Error 1528 Failed to create LOGFILE GROUP -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 1M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; -ERROR HY000: Failed to create LOGFILE GROUP -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE 1M ENGINE NDB; -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE 1M ENGINE=NDB; -ERROR HY000: Failed to alter: CREATE UNDOFILE -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 1M -ENGINE NDB; -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 1M -ENGINE NDB; -ERROR HY000: Failed to create TABLESPACE -ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile2.dat' -INITIAL_SIZE 1M -ENGINE=NDB; -ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile2.dat' -INITIAL_SIZE 1M -ENGINE=NDB; -ERROR HY000: Failed to alter: CREATE DATAFILE -CREATE TABLE mysqltest.t1 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE ts1 STORAGE DISK -ENGINE=NDB; -CREATE TABLE mysqltest.t1 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE ts1 STORAGE DISK -ENGINE=NDB; -ERROR 42S01: Table 't1' already exists -CREATE TABLE mysqltest.t1 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -ENGINE=NDB; -ERROR 42S01: Table 't1' already exists -DROP TABLE mysqltest.t1; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile2.dat' -ENGINE=NDB; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile2.dat' -ENGINE=NDB; -ERROR HY000: Failed to alter: NO SUCH FILE -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE=NDB; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE=NDB; -ERROR HY000: Failed to alter: NO SUCH FILE -DROP TABLESPACE ts1 -ENGINE=NDB; -DROP TABLESPACE ts1 -ENGINE=NDB; -ERROR HY000: Failed to drop TABLESPACE -DROP LOGFILE GROUP lg1 -ENGINE=NDB; -DROP LOGFILE GROUP lg1 -ENGINE=NDB; -ERROR HY000: Failed to drop LOGFILE GROUP -DROP DATABASE IF EXISTS mysqltest; -**** End Duplicate Statement Testing **** - -**** Begin Statment CaSe Testing **** -creaTE LOgfilE GrOuP lg1 -adD undoFILE 'undofile.dat' -initiAL_siZE 1M -UnDo_BuFfEr_SiZe = 1M -ENGInE=NDb; -altER LOgFiLE GrOUp lg1 -AdD UnDOfILe 'uNdOfiLe02.daT' -INItIAl_SIzE 1M ENgINE nDB; -CrEAtE TABLEspaCE ts1 -ADD DATAfilE 'datafile.dat' -UsE LoGFiLE GRoUP lg1 -INITiaL_SizE 1M -ENGiNe NDb; -AlTeR tAbLeSpAcE ts1 -AdD DaTaFiLe 'dAtAfiLe2.daT' -InItIaL_SiZe 1M -EnGiNe=NDB; -CREATE TABLE t1 -(pk1 int not null primary key, b int not null, c int not null) -TABLEspace ts1 storAGE dISk -ENGine nDb; -DROP TABLE t1; -AlteR TAblespaCE ts1 -droP DATAfile 'dAtAfiLe2.daT' -ENGINE=NDB; -ALter tablesPACE ts1 -dROp dAtAfIlE 'datafile.dat' -ENGine=Ndb; -DrOp TaBleSpAcE ts1 -engINE=ndB; -DrOp lOgFiLe GrOuP lg1 -EnGiNe=nDb; -**** End Statment CaSe Testing **** - -**** Begin = And No = Testing **** -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE=1M -UNDO_BUFFER_SIZE=1M -ENGINE=NDB; -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE=1M -ENGINE=NDB; -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE=1M -ENGINE=NDB; -ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile2.dat' -INITIAL_SIZE=1M -ENGINE=NDB; -CREATE TABLE t1 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE ts1 STORAGE DISK -ENGINE=NDB; -DROP TABLE t1; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile2.dat' -ENGINE=NDB; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE=NDB; -DROP TABLESPACE ts1 -ENGINE=NDB; -DROP LOGFILE GROUP lg1 -ENGINE=NDB; - -**** End of = **** - -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 1M -UNDO_BUFFER_SIZE 1M -ENGINE NDB; -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE 1M -ENGINE NDB; -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 1M -ENGINE NDB; -ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile2.dat' -INITIAL_SIZE 1M -ENGINE NDB; -CREATE TABLE t1 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE ts1 STORAGE MEMORY -ENGINE NDB; -ERROR HY000: Can't create table 'test.t1' (errno: 138) -CREATE TABLE t1 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE ts1 STORAGE DISK -ENGINE NDB; -CREATE INDEX b_i on t1(b); -CREATE INDEX bc_i on t1(b, c); -DROP TABLE t1; -CREATE TABLESPACE ts2 -ADD DATAFILE 'datafile3.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 1M -ENGINE NDB; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile3.dat' -ENGINE NDB; -ERROR HY000: Failed to alter: NO SUCH FILE -ALTER TABLESPACE ts2 -DROP DATAFILE 'datafile2.dat' -ENGINE NDB; -ERROR HY000: Failed to alter: NO SUCH FILE -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile2.dat' -ENGINE NDB; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE NDB; -DROP TABLESPACE ts1 -ENGINE NDB; -ALTER TABLESPACE ts2 -DROP DATAFILE 'datafile3.dat' -ENGINE NDB; -DROP TABLESPACE ts2 -ENGINE NDB; -DROP LOGFILE GROUP lg1 -ENGINE NDB; -**** End = And No = **** -create logfile group lg1 add undofile 'MYSQLTEST_VARDIR/tmp/t1.frm' initial_size 1M undo_buffer_size = 1M engine=ndb;; -ERROR HY000: Failed to create UNDOFILE -create logfile group lg1 -add undofile 'undofile.dat' -initial_size 1M -undo_buffer_size = 1M -engine=ndb; -create tablespace ts1 add datafile 'MYSQLTEST_VARDIR/tmp/t1.frm' use logfile group lg1 initial_size 1M engine ndb;; -ERROR HY000: Failed to create DATAFILE -drop tablespace ts1 -engine ndb; -ERROR HY000: Failed to drop TABLESPACE -drop logfile group lg1 -engine ndb; - -# ----------------------------------------------------------------- -# End 5.1 test -# ----------------------------------------------------------------- - -# -- -# -- WL#4300: Define privileges for tablespaces. -# -- -GRANT CREATE TABLESPACE ON *.* TO mysqltest_u1@localhost; - -DROP DATABASE IF EXISTS mysqltest2; -CREATE DATABASE mysqltest2; -GRANT ALL PRIVILEGES ON mysqltest2.* TO mysqltest_u2@localhost; - -# -- Connection: mysqltest_u1@localhost - -# -- Grants for mysqltest_u1@localhost: -SHOW GRANTS; -Grants for mysqltest_u1@localhost -GRANT CREATE TABLESPACE ON *.* TO 'mysqltest_u1'@'localhost' - -# -- Check CREATE LOGFILE GROUP... -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 1M -UNDO_BUFFER_SIZE = 1M -ENGINE = NDB; - -# -- Check ALTER LOGFILE GROUP... -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE 1M -ENGINE = NDB; - -# -- Check CREATE TABLESPACE... -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 1M -ENGINE = NDB; - -# -- Check ALTER TABLESPACE... -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -INITIAL_SIZE 1M -ENGINE = NDB; - -# -- Connection: mysqltest_u2@localhost - -# -- Grants for mysqltest_u2@localhost: -SHOW GRANTS; -Grants for mysqltest_u2@localhost -GRANT USAGE ON *.* TO 'mysqltest_u2'@'localhost' -GRANT ALL PRIVILEGES ON `mysqltest2`.* TO 'mysqltest_u2'@'localhost' -CREATE TABLE t1(c INT) TABLESPACE ts1; -DROP TABLE t1; - -# -- Connection: mysqltest_u1@localhost - - -# -- Check DROP TABLESPACE... -DROP TABLESPACE ts1 -ENGINE = NDB; - -# -- Check DROP LOGFILE GROUP... -DROP LOGFILE GROUP lg1 -ENGINE = NDB; - -# -- Connection: root@localhost - -DROP USER mysqltest_u1@localhost; -DROP USER mysqltest_u2@localhost; -DROP DATABASE mysqltest2; - -# ----------------------------------------------------------------- -# End 6.0 test -# ----------------------------------------------------------------- diff --git a/mysql-test/suite/ndb/r/ndb_dd_disk2memory.result b/mysql-test/suite/ndb/r/ndb_dd_disk2memory.result deleted file mode 100644 index 46661f36d1b..00000000000 --- a/mysql-test/suite/ndb/r/ndb_dd_disk2memory.result +++ /dev/null @@ -1,505 +0,0 @@ -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -**** Test Setup Section **** -CREATE LOGFILE GROUP log_group1 -ADD UNDOFILE './log_group1/undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; -CREATE TABLESPACE table_space1 -ADD DATAFILE './table_space1/datafile.dat' -USE LOGFILE GROUP log_group1 -INITIAL_SIZE 12M -ENGINE NDB; -CREATE TABLE test.t1 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE table_space1 STORAGE DISK -ENGINE=NDB; -CREATE TABLE test.t2 -(pk2 INT NOT NULL PRIMARY KEY, b2 INT NOT NULL, c2 INT NOT NULL) -ENGINE=NDB; - -**** Data load for first test **** -INSERT INTO test.t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10), -(11,11,11),(12,12,12),(13,13,13),(14,14,14),(15,15,15), -(16,16,16),(17,17,17),(18,18,18),(19,19,19),(20,20,20), -(21,21,21),(22,22,22),(23,23,23),(24,24,24),(25,25,25), -(26,26,26),(27,27,27),(28,28,28),(29,29,29),(30,30,30), -(31,31,31),(32,32,32),(33,33,33),(34,34,34),(35,35,35), -(36,36,36),(37,37,37),(38,38,38),(39,39,39),(40,40,40), -(41,41,41),(42,42,42),(43,43,43),(44,44,44),(45,45,45), -(46,46,46),(47,47,47),(48,48,48),(49,49,49),(50,50,50), -(51,51,51),(52,52,52),(53,53,53),(54,54,54),(55,55,55), -(56,56,56),(57,57,57),(58,58,58),(59,59,59),(60,60,60), -(61,61,61),(62,62,62),(63,63,63),(64,64,64),(65,65,65), -(66,66,66),(67,67,67),(68,68,68),(69,69,69),(70,70,70), -(71,71,71),(72,72,72),(73,73,73),(74,74,74),(75,75,75); -INSERT INTO test.t2 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10), -(11,11,11),(12,12,12),(13,13,13),(14,14,14),(15,15,15), -(16,16,16),(17,17,17),(18,18,18),(19,19,19),(20,20,20), -(21,21,21),(22,22,22),(23,23,23),(24,24,24),(25,25,25), -(26,26,26),(27,27,27),(28,28,28),(29,29,29),(30,30,30), -(31,31,31),(32,32,32),(33,33,33),(34,34,34),(35,35,35), -(36,36,36),(37,37,37),(38,38,38),(39,39,39),(40,40,40), -(41,41,41),(42,42,42),(43,43,43),(44,44,44),(45,45,45), -(46,46,46),(47,47,47),(48,48,48),(49,49,49),(50,50,50), -(51,51,51),(52,52,52),(53,53,53),(54,54,54),(55,55,55), -(56,56,56),(57,57,57),(58,58,58),(59,59,59),(60,60,60), -(61,61,61),(62,62,62),(63,63,63),(64,64,64),(65,65,65), -(66,66,66),(67,67,67),(68,68,68),(69,69,69),(70,70,70), -(71,71,71),(72,72,72),(73,73,73),(74,74,74),(75,75,75); - -*** Test 1 Section Begins *** -SELECT COUNT(*) FROM test.t2 LEFT JOIN test.t1 ON pk2=pk1 WHERE b2 IN (4); -COUNT(*) -1 -SELECT * FROM test.t2 LEFT JOIN test.t1 ON pk2=pk1 WHERE b2 IN (4); -pk2 b2 c2 pk1 b c -4 4 4 4 4 4 -SELECT COUNT(*) FROM test.t1 LEFT JOIN test.t2 ON pk1=pk2 WHERE b IN (4); -COUNT(*) -1 -SELECT COUNT(*) FROM test.t1 LEFT JOIN test.t2 ON b=b2 WHERE pk1 IN (75); -COUNT(*) -1 -SELECT b, c FROM test.t1 LEFT JOIN test.t2 ON pk1=pk2 ORDER BY b; -b c -1 1 -2 2 -3 3 -4 4 -5 5 -6 6 -7 7 -8 8 -9 9 -10 10 -11 11 -12 12 -13 13 -14 14 -15 15 -16 16 -17 17 -18 18 -19 19 -20 20 -21 21 -22 22 -23 23 -24 24 -25 25 -26 26 -27 27 -28 28 -29 29 -30 30 -31 31 -32 32 -33 33 -34 34 -35 35 -36 36 -37 37 -38 38 -39 39 -40 40 -41 41 -42 42 -43 43 -44 44 -45 45 -46 46 -47 47 -48 48 -49 49 -50 50 -51 51 -52 52 -53 53 -54 54 -55 55 -56 56 -57 57 -58 58 -59 59 -60 60 -61 61 -62 62 -63 63 -64 64 -65 65 -66 66 -67 67 -68 68 -69 69 -70 70 -71 71 -72 72 -73 73 -74 74 -75 75 - -*** Setup for test 2 **** -DELETE FROM test.t1; -INSERT INTO test.t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10), -(11,11,11),(12,12,12),(13,13,13),(14,14,14),(15,15,15), -(16,16,16),(17,17,17),(18,18,18),(19,19,19),(20,20,20), -(21,21,21),(22,22,22),(23,23,23),(24,24,24),(25,25,25), -(26,26,26),(27,27,27),(28,28,28),(29,29,29),(30,30,30), -(31,31,31),(32,32,32),(33,33,33),(34,34,34),(35,35,35), -(36,36,36),(37,37,37),(38,38,38),(39,39,39),(40,40,40), -(41,41,41),(42,42,42),(43,43,43),(44,44,44),(45,45,45); - -**** Test Section 2 **** -SELECT b, c FROM test.t1 LEFT JOIN test.t2 ON pk1=pk2 ORDER BY b; -b c -1 1 -2 2 -3 3 -4 4 -5 5 -6 6 -7 7 -8 8 -9 9 -10 10 -11 11 -12 12 -13 13 -14 14 -15 15 -16 16 -17 17 -18 18 -19 19 -20 20 -21 21 -22 22 -23 23 -24 24 -25 25 -26 26 -27 27 -28 28 -29 29 -30 30 -31 31 -32 32 -33 33 -34 34 -35 35 -36 36 -37 37 -38 38 -39 39 -40 40 -41 41 -42 42 -43 43 -44 44 -45 45 -SELECT COUNT(*) FROM test.t1 LEFT JOIN test.t2 ON b=b2; -COUNT(*) -45 -SELECT COUNT(*) FROM test.t1 RIGHT JOIN test.t2 ON b=b2; -COUNT(*) -75 -SHOW CREATE TABLE test.t2; -Table Create Table -t2 CREATE TABLE `t2` ( - `pk2` int(11) NOT NULL, - `b2` int(11) NOT NULL, - `c2` int(11) NOT NULL, - PRIMARY KEY (`pk2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -SHOW CREATE TABLE test.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `pk1` int(11) NOT NULL, - `b` int(11) NOT NULL, - `c` int(11) NOT NULL, - PRIMARY KEY (`pk1`) -) /*!50100 TABLESPACE table_space1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -ALTER TABLE test.t2 TABLESPACE table_space1 STORAGE DISK -ENGINE=NDB; -SHOW CREATE TABLE test.t2; -Table Create Table -t2 CREATE TABLE `t2` ( - `pk2` int(11) NOT NULL, - `b2` int(11) NOT NULL, - `c2` int(11) NOT NULL, - PRIMARY KEY (`pk2`) -) /*!50100 TABLESPACE table_space1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -ALTER TABLE test.t1 STORAGE MEMORY ENGINE=NDBCLUSTER; -SHOW CREATE TABLE test.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `pk1` int(11) NOT NULL, - `b` int(11) NOT NULL, - `c` int(11) NOT NULL, - PRIMARY KEY (`pk1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -DROP TABLE test.t1; -DROP TABLE test.t2; -*** Setup for Test Section 3 *** -CREATE TABLE test.t1 ( -usr_id INT unsigned NOT NULL, -uniq_id INT unsigned NOT NULL AUTO_INCREMENT, -start_num INT unsigned NOT NULL DEFAULT 1, -increment INT unsigned NOT NULL DEFAULT 1, -PRIMARY KEY (uniq_id), -INDEX usr_uniq_idx (usr_id, uniq_id), -INDEX uniq_usr_idx (uniq_id, usr_id)) -TABLESPACE table_space1 STORAGE DISK -ENGINE=NDB; -CREATE TABLE test.t2 ( -id INT unsigned NOT NULL DEFAULT 0, -usr2_id INT unsigned NOT NULL DEFAULT 0, -max INT unsigned NOT NULL DEFAULT 0, -c_amount INT unsigned NOT NULL DEFAULT 0, -d_max INT unsigned NOT NULL DEFAULT 0, -d_num INT unsigned NOT NULL DEFAULT 0, -orig_time INT unsigned NOT NULL DEFAULT 0, -c_time INT unsigned NOT NULL DEFAULT 0, -active ENUM ("no","yes") NOT NULL, -PRIMARY KEY (id,usr2_id), -INDEX id_idx (id), -INDEX usr2_idx (usr2_id)) -ENGINE=NDB; -INSERT INTO test.t1 VALUES (3,NULL,0,50),(3,NULL,0,200),(3,NULL,0,25),(3,NULL,0,84676),(3,NULL,0,235),(3,NULL,0,10),(3,NULL,0,3098),(3,NULL,0,2947),(3,NULL,0,8987),(3,NULL,0,8347654),(3,NULL,0,20398),(3,NULL,0,8976),(3,NULL,0,500),(3,NULL,0,198); - -**** Test Section 3 **** -SELECT test.t1.usr_id,test.t1.uniq_id,test.t1.increment, -test.t2.usr2_id,test.t2.c_amount,test.t2.max -FROM test.t1 -LEFT JOIN test.t2 ON test.t2.id = test.t1.uniq_id -WHERE test.t1.uniq_id = 4 -ORDER BY test.t2.c_amount; -usr_id uniq_id increment usr2_id c_amount max -3 4 84676 NULL NULL NULL -INSERT INTO test.t2 VALUES (2,3,3000,6000,0,0,746584,837484,'yes'); -INSERT INTO test.t2 VALUES (4,3,3000,6000,0,0,746584,837484,'yes'); -INSERT INTO test.t2 VALUES (7,3,1000,2000,0,0,746294,937484,'yes'); -SELECT test.t1.usr_id,test.t1.uniq_id,test.t1.increment, -test.t2.usr2_id,test.t2.c_amount,test.t2.max -FROM test.t1 -LEFT JOIN test.t2 ON test.t2.id = test.t1.uniq_id -WHERE test.t1.uniq_id = 4 -ORDER BY test.t2.c_amount; -usr_id uniq_id increment usr2_id c_amount max -3 4 84676 3 6000 3000 - -DROP TABLE test.t1; -DROP TABLE test.t2; -CREATE TABLE test.t1 ( -a1 smallint NOT NULL, -a2 int NOT NULL, -a3 bigint NOT NULL, -a4 char(10), -a5 decimal(5,1), -a6 time, -a7 date, -a8 datetime, -a9 VARCHAR(255), -a10 blob, -PRIMARY KEY(a1) -) TABLESPACE table_space1 STORAGE DISK ENGINE=NDB; -CREATE TABLE test.t2 ( -b1 smallint NOT NULL, -b2 int NOT NULL, -b3 bigint NOT NULL, -b4 char(10), -b5 decimal(5,1), -b6 time, -b7 date, -b8 datetime, -b9 VARCHAR(255), -b10 blob, -PRIMARY KEY(b1) -) ENGINE=NDB; -Table Create Table -t1 CREATE TABLE `t1` ( - `a1` smallint(6) NOT NULL, - `a2` int(11) NOT NULL, - `a3` bigint(20) NOT NULL, - `a4` char(10) DEFAULT NULL, - `a5` decimal(5,1) DEFAULT NULL, - `a6` time DEFAULT NULL, - `a7` date DEFAULT NULL, - `a8` datetime DEFAULT NULL, - `a9` varchar(255) DEFAULT NULL, - `a10` blob, - PRIMARY KEY (`a1`), - KEY `a2` (`a2`), - KEY `a3` (`a3`), - KEY `a8` (`a8`) -) /*!50100 TABLESPACE table_space1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -Table Create Table -t2 CREATE TABLE `t2` ( - `b1` smallint(6) NOT NULL, - `b2` int(11) NOT NULL, - `b3` bigint(20) NOT NULL, - `b4` char(10) DEFAULT NULL, - `b5` decimal(5,1) DEFAULT NULL, - `b6` time DEFAULT NULL, - `b7` date DEFAULT NULL, - `b8` datetime DEFAULT NULL, - `b9` varchar(255) DEFAULT NULL, - `b10` blob, - PRIMARY KEY (`b1`), - KEY `b2` (`b2`), - KEY `b3` (`b3`), - KEY `b8` (`b8`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 -1 2 2000000001 aaa1 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb1 binary data -2 3 2000000002 aaa2 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb2 binary data -3 4 2000000003 aaa3 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb3 binary data -4 5 2000000004 aaa4 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb4 binary data -5 6 2000000005 aaa5 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb5 binary data -6 7 2000000006 aaa6 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb6 binary data -7 8 2000000007 aaa7 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb7 binary data -8 9 2000000008 aaa8 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb8 binary data -9 10 2000000009 aaa9 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb9 binary data -10 11 2000000010 aaa10 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb10 binary data -11 12 2000000011 aaa11 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb11 binary data -12 13 2000000012 aaa12 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb12 binary data -13 14 2000000013 aaa13 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb13 binary data -14 15 2000000014 aaa14 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb14 binary data -15 16 2000000015 aaa15 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb15 binary data -16 17 2000000016 aaa16 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb16 binary data -17 18 2000000017 aaa17 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb17 binary data -18 19 2000000018 aaa18 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb18 binary data -19 20 2000000019 aaa19 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb19 binary data -20 21 2000000020 aaa20 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb20 binary data -b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 -3 4 3000000001 aaa1 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb1 binary data -4 5 3000000002 aaa2 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb2 binary data -5 6 3000000003 aaa3 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb3 binary data -6 7 3000000004 aaa4 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb4 binary data -7 8 3000000005 aaa5 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb5 binary data -8 9 3000000006 aaa6 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb6 binary data -9 10 3000000007 aaa7 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb7 binary data -10 11 3000000008 aaa8 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb8 binary data -11 12 3000000009 aaa9 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb9 binary data -12 13 3000000010 aaa10 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb10 binary data -13 14 3000000011 aaa11 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb11 binary data -14 15 3000000012 aaa12 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb12 binary data -15 16 3000000013 aaa13 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb13 binary data -16 17 3000000014 aaa14 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb14 binary data -17 18 3000000015 aaa15 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb15 binary data -18 19 3000000016 aaa16 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb16 binary data -19 20 3000000017 aaa17 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb17 binary data -20 21 3000000018 aaa18 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb18 binary data -21 22 3000000019 aaa19 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb19 binary data -22 23 3000000020 aaa20 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb20 binary data -COUNT(a1) a1 COUNT(a1)*a1 -1 1 1 -1 2 2 -1 3 3 -1 4 4 -1 5 5 -1 6 6 -1 7 7 -1 8 8 -1 9 9 -1 10 10 -1 11 11 -1 12 12 -1 13 13 -1 14 14 -1 15 15 -1 16 16 -1 17 17 -1 18 18 -1 19 19 -1 20 20 -COUNT(a2) (a2+1) COUNT(a2)*(a2+0) -1 3 2 -1 4 3 -1 5 4 -1 6 5 -1 7 6 -1 8 7 -1 9 8 -1 10 9 -1 11 10 -1 12 11 -1 13 12 -1 14 13 -1 15 14 -1 16 15 -1 17 16 -1 18 17 -1 19 18 -1 20 19 -1 21 20 -1 22 21 -a -8 -7 -6 -5 -a c -8 Clavin -7 Serge -6 Jeb -5 Stewart -4 Martin -3 Pekka -a -2 -3 -4 -5 -6 -7 -8 -a c -4 Martin -5 Stewart -6 Jeb -7 Serge -8 Clavin -a -1 -1 -1 -2 -2 -3 -3 -a -3 -2 -1 -a -3 -2 -1 -a -1 -2 -3 -email shipcode -test1@testdomain.com Z001 -test2@testdomain.com R002 -test2@testdomain.com Z001 -test3@testdomain.com Z001 -email -test1@testdomain.com -test2@testdomain.com -test3@testdomain.com -email shipcode -test1@testdomain.com Z001 -test2@testdomain.com Z001 -test2@testdomain.com R002 -test3@testdomain.com Z001 diff --git a/mysql-test/suite/ndb/r/ndb_dd_dump.result b/mysql-test/suite/ndb/r/ndb_dd_dump.result deleted file mode 100644 index b48073df1fd..00000000000 --- a/mysql-test/suite/ndb/r/ndb_dd_dump.result +++ /dev/null @@ -1,452 +0,0 @@ -DROP TABLE IF EXISTS t1, t2, t3; -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile_lg1_01.dat' -INITIAL_SIZE 2M -UNDO_BUFFER_SIZE = 1M -ENGINE NDB; -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile_lg1_02.dat' -INITIAL_SIZE = 4M -ENGINE NDB; -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile_ts1_01.dat' -USE LOGFILE GROUP lg1 -EXTENT_SIZE 1M -INITIAL_SIZE 2M -ENGINE NDB; -ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile_ts1_02.dat' -INITIAL_SIZE = 1M -ENGINE=NDB; -CREATE TABLESPACE ts2 -ADD DATAFILE 'datafile_ts2_01.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 2M -ENGINE NDB; -CREATE TABLESPACE ts3 -ADD DATAFILE 'datafile_ts3_01.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 4M -ENGINE NDB; -CREATE TABLE t1 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE ts1 STORAGE DISK -ENGINE=NDB; -CREATE TABLE t2 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE ts2 STORAGE DISK -ENGINE=NDB; -CREATE TABLE t3 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE ts3 STORAGE DISK -ENGINE=NDB; -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10), -(11,11,11),(12,12,12),(13,13,13),(14,14,14),(15,15,15), -(16,16,16),(17,17,17),(18,18,18),(19,19,19),(20,20,20), -(21,21,21),(22,22,22),(23,23,23),(24,24,24),(25,25,25), -(26,26,26),(27,27,27),(28,28,28),(29,29,29),(30,30,30), -(31,31,31),(32,32,32),(33,33,33),(34,34,34),(35,35,35), -(36,36,36),(37,37,37),(38,38,38),(39,39,39),(40,40,40), -(41,41,41),(42,42,42),(43,43,43),(44,44,44),(45,45,45), -(46,46,46),(47,47,47),(48,48,48),(49,49,49),(50,50,50), -(51,51,51),(52,52,52),(53,53,53),(54,54,54),(55,55,55), -(56,56,56),(57,57,57),(58,58,58),(59,59,59),(60,60,60), -(61,61,61),(62,62,62),(63,63,63),(64,64,64),(65,65,65), -(66,66,66),(67,67,67),(68,68,68),(69,69,69),(70,70,70), -(71,71,71),(72,72,72),(73,73,73),(74,74,74),(75,75,75), -(76,76,76),(77,77,77),(78,78,78),(79,79,79),(80,80,80), -(81,81,81),(82,82,82),(83,83,83),(84,84,84),(85,85,85), -(86,86,86),(87,87,87),(88,88,88),(89,89,89),(90,90,90), -(91,91,91),(92,92,92),(93,93,93),(94,94,94),(95,95,95), -(96,96,96),(97,97,97),(98,98,98),(99,99,99),(100,100,100), -(101,101,101),(102,102,102),(103,103,103),(104,104,104),(105,105,105), -(106,106,106),(107,107,107),(108,108,108),(109,109,109),(110,110,110), -(111,111,111),(112,112,112),(113,113,113),(114,114,114),(115,115,115), -(116,116,116),(117,117,117),(118,118,118),(119,119,119),(120,120,120), -(121,121,121),(122,122,122),(123,123,123),(124,124,124),(125,125,125), -(126,126,126),(127,127,127),(128,128,128),(129,129,129),(130,130,130), -(131,131,131),(132,132,132),(133,133,133),(134,134,134),(135,135,135), -(136,136,136),(137,137,137),(138,138,138),(139,139,139),(140,140,140), -(141,141,141),(142,142,142),(143,143,143),(144,144,144),(145,145,145), -(146,146,146),(147,147,147),(148,148,148),(149,149,149),(150,150,150), -(151,151,151),(152,152,152),(153,153,153),(154,154,154),(155,155,155), -(156,156,156),(157,157,157),(158,158,158),(159,159,159),(160,160,160), -(161,161,161),(162,162,162),(163,163,163),(164,164,164),(165,165,165), -(166,166,166),(167,167,167),(168,168,168),(169,169,169),(170,170,170), -(171,171,171),(172,172,172),(173,173,173),(174,174,174),(175,175,175), -(176,176,176),(177,177,177),(178,178,178),(179,179,179),(180,180,180), -(181,181,181),(182,182,182),(183,183,183),(184,184,184),(185,185,185), -(186,186,186),(187,187,187),(188,188,188),(189,189,189),(190,190,190), -(191,191,191),(192,192,192),(193,193,193),(194,194,194),(195,195,195), -(196,196,196),(197,197,197),(198,198,198),(199,199,199),(200,200,200), -(201,201,201),(202,202,202),(203,203,203),(204,204,204),(205,205,205), -(206,206,206),(207,207,207),(208,208,208),(209,209,209),(210,210,210), -(211,211,211),(212,212,212),(213,213,213),(214,214,214),(215,215,215), -(216,216,216),(217,217,217),(218,218,218),(219,219,219),(220,220,220), -(221,221,221),(222,222,222),(223,223,223),(224,224,224),(225,225,225), -(226,226,226),(227,227,227),(228,228,228),(229,229,229),(230,230,230), -(231,231,231),(232,232,232),(233,233,233),(234,234,234),(235,235,235), -(236,236,236),(237,237,237),(238,238,238),(239,239,239),(240,240,240), -(241,241,241),(242,242,242),(243,243,243),(244,244,244),(245,245,245), -(246,246,246),(247,247,247),(248,248,248),(249,249,249),(250,250,250), -(251,251,251),(252,252,252),(253,253,253),(254,254,254),(255,255,255), -(256,256,256),(257,257,257),(258,258,258),(259,259,259),(260,260,260), -(261,261,261),(262,262,262),(263,263,263),(264,264,264),(265,265,265), -(266,266,266),(267,267,267),(268,268,268),(269,269,269),(270,270,270), -(271,271,271),(272,272,272),(273,273,273),(274,274,274),(275,275,275), -(276,276,276),(277,277,277),(278,278,278),(279,279,279),(280,280,280), -(281,281,281),(282,282,282),(283,283,283),(284,284,284),(285,285,285), -(286,286,286),(287,287,287),(288,288,288),(289,289,289),(290,290,290), -(291,291,291),(292,292,292),(293,293,293),(294,294,294),(295,295,295), -(296,296,296),(297,297,297),(298,298,298),(299,299,299),(300,300,300), -(301,301,301),(302,302,302),(303,303,303),(304,304,304),(305,305,305), -(306,306,306),(307,307,307),(308,308,308),(309,309,309),(310,310,310), -(311,311,311),(312,312,312),(313,313,313),(314,314,314),(315,315,315), -(316,316,316),(317,317,317),(318,318,318),(319,319,319),(320,320,320), -(321,321,321),(322,322,322),(323,323,323),(324,324,324),(325,325,325), -(326,326,326),(327,327,327),(328,328,328),(329,329,329),(330,330,330), -(331,331,331),(332,332,332),(333,333,333),(334,334,334),(335,335,335), -(336,336,336),(337,337,337),(338,338,338),(339,339,339),(340,340,340), -(341,341,341),(342,342,342),(343,343,343),(344,344,344),(345,345,345), -(346,346,346),(347,347,347),(348,348,348),(349,349,349),(350,350,350), -(351,351,351),(352,352,352),(353,353,353),(354,354,354),(355,355,355), -(356,356,356),(357,357,357),(358,358,358),(359,359,359),(360,360,360), -(361,361,361),(362,362,362),(363,363,363),(364,364,364),(365,365,365), -(366,366,366),(367,367,367),(368,368,368),(369,369,369),(370,370,370), -(371,371,371),(372,372,372),(373,373,373),(374,374,374),(375,375,375), -(376,376,376),(377,377,377),(378,378,378),(379,379,379),(380,380,380), -(381,381,381),(382,382,382),(383,383,383),(384,384,384),(385,385,385), -(386,386,386),(387,387,387),(388,388,388),(389,389,389),(390,390,390), -(391,391,391),(392,392,392),(393,393,393),(394,394,394),(395,395,395), -(396,396,396),(397,397,397),(398,398,398),(399,399,399),(400,400,400), -(401,401,401),(402,402,402),(403,403,403),(404,404,404),(405,405,405), -(406,406,406),(407,407,407),(408,408,408),(409,409,409),(410,410,410), -(411,411,411),(412,412,412),(413,413,413),(414,414,414),(415,415,415), -(416,416,416),(417,417,417),(418,418,418),(419,419,419),(420,420,420), -(421,421,421),(422,422,422),(423,423,423),(424,424,424),(425,425,425), -(426,426,426),(427,427,427),(428,428,428),(429,429,429),(430,430,430), -(431,431,431),(432,432,432),(433,433,433),(434,434,434),(435,435,435), -(436,436,436),(437,437,437),(438,438,438),(439,439,439),(440,440,440), -(441,441,441),(442,442,442),(443,443,443),(444,444,444),(445,445,445), -(446,446,446),(447,447,447),(448,448,448),(449,449,449),(450,450,450), -(451,451,451),(452,452,452),(453,453,453),(454,454,454),(455,455,455), -(456,456,456),(457,457,457),(458,458,458),(459,459,459),(460,460,460), -(461,461,461),(462,462,462),(463,463,463),(464,464,464),(465,465,465), -(466,466,466),(467,467,467),(468,468,468),(469,469,469),(470,470,470), -(471,471,471),(472,472,472),(473,473,473),(474,474,474),(475,475,475), -(476,476,476),(477,477,477),(478,478,478),(479,479,479),(480,480,480), -(481,481,481),(482,482,482),(483,483,483),(484,484,484),(485,485,485), -(486,486,486),(487,487,487),(488,488,488),(489,489,489),(490,490,490), -(491,491,491),(492,492,492),(493,493,493),(494,494,494),(495,495,495), -(496,496,496),(497,497,497),(498,498,498),(499,499,499),(500, 500, 500); -INSERT INTO t2 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5); -INSERT INTO t3 VALUES -(1,1,1); -DROP TABLE t1; -DROP TABLE t2; -DROP TABLE t3; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile_ts1_01.dat' -ENGINE = NDB; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile_ts1_02.dat' -ENGINE = NDB; -ALTER TABLESPACE ts2 -DROP DATAFILE 'datafile_ts2_01.dat' -ENGINE = NDB; -ALTER TABLESPACE ts3 -DROP DATAFILE 'datafile_ts3_01.dat' -ENGINE = NDB; -DROP TABLESPACE ts1 ENGINE = NDB; -DROP TABLESPACE ts2 ENGINE = NDB; -DROP TABLESPACE ts3 ENGINE = NDB; -DROP LOGFILE GROUP lg1 ENGINE = NDB; -SELECT DISTINCT -LOGFILE_GROUP_NAME, -FILE_NAME, -TOTAL_EXTENTS, -INITIAL_SIZE, -ENGINE -FROM INFORMATION_SCHEMA.FILES WHERE FILE_TYPE="UNDO LOG" ORDER BY FILE_NAME; -LOGFILE_GROUP_NAME FILE_NAME TOTAL_EXTENTS INITIAL_SIZE ENGINE -lg1 NULL NULL NULL ndbcluster -lg1 undofile_lg1_01.dat 524288 2097152 ndbcluster -lg1 undofile_lg1_02.dat 1048576 4194304 ndbcluster -SELECT DISTINCT -TABLESPACE_NAME, -LOGFILE_GROUP_NAME, -FILE_NAME, -EXTENT_SIZE, -INITIAL_SIZE, -ENGINE -FROM INFORMATION_SCHEMA.FILES WHERE FILE_TYPE="DATAFILE" ORDER BY FILE_NAME; -TABLESPACE_NAME LOGFILE_GROUP_NAME FILE_NAME EXTENT_SIZE INITIAL_SIZE ENGINE -ts1 lg1 datafile_ts1_01.dat 1048576 2097152 ndbcluster -ts1 lg1 datafile_ts1_02.dat 1048576 1048576 ndbcluster -ts2 lg1 datafile_ts2_01.dat 1048576 2097152 ndbcluster -ts3 lg1 datafile_ts3_01.dat 1048576 4194304 ndbcluster -SELECT COUNT(*) FROM t1; -COUNT(*) -500 -SELECT COUNT(*) FROM t2; -COUNT(*) -5 -SELECT COUNT(*) FROM t3; -COUNT(*) -1 -DROP TABLE t1; -DROP TABLE t2; -DROP TABLE t3; -CREATE TABLE test.t ( -a smallint NOT NULL, -b int NOT NULL, -c bigint NOT NULL, -d char(10), -e TEXT, -f VARCHAR(255), -PRIMARY KEY(a) -) TABLESPACE ts1 STORAGE DISK ENGINE=NDB; -ALTER TABLE test.t ADD INDEX (d), ADD INDEX (f); -SHOW CREATE TABLE test.t; -Table Create Table -t CREATE TABLE `t` ( - `a` smallint(6) NOT NULL, - `b` int(11) NOT NULL, - `c` bigint(20) NOT NULL, - `d` char(10) DEFAULT NULL, - `e` text, - `f` varchar(255) DEFAULT NULL, - PRIMARY KEY (`a`), - KEY `d` (`d`), - KEY `f` (`f`) -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -SELECT * FROM test.t order by a; -a b c d e f -1 2 3 aaa1 bbb1 ccccc1 -2 3 4 aaa2 bbb2 ccccc2 -3 4 5 aaa3 bbb3 ccccc3 -4 5 6 aaa4 bbb4 ccccc4 -5 6 7 aaa5 bbb5 ccccc5 -6 7 8 aaa6 bbb6 ccccc6 -7 8 9 aaa7 bbb7 ccccc7 -8 9 10 aaa8 bbb8 ccccc8 -9 10 11 aaa9 bbb9 ccccc9 -10 11 12 aaa10 bbb10 ccccc10 -11 12 13 aaa11 bbb11 ccccc11 -12 13 14 aaa12 bbb12 ccccc12 -13 14 15 aaa13 bbb13 ccccc13 -14 15 16 aaa14 bbb14 ccccc14 -15 16 17 aaa15 bbb15 ccccc15 -16 17 18 aaa16 bbb16 ccccc16 -17 18 19 aaa17 bbb17 ccccc17 -18 19 20 aaa18 bbb18 ccccc18 -19 20 21 aaa19 bbb19 ccccc19 -20 21 22 aaa20 bbb20 ccccc20 -21 22 23 aaa21 bbb21 ccccc21 -22 23 24 aaa22 bbb22 ccccc22 -23 24 25 aaa23 bbb23 ccccc23 -24 25 26 aaa24 bbb24 ccccc24 -25 26 27 aaa25 bbb25 ccccc25 -26 27 28 aaa26 bbb26 ccccc26 -27 28 29 aaa27 bbb27 ccccc27 -28 29 30 aaa28 bbb28 ccccc28 -29 30 31 aaa29 bbb29 ccccc29 -30 31 32 aaa30 bbb30 ccccc30 -31 32 33 aaa31 bbb31 ccccc31 -32 33 34 aaa32 bbb32 ccccc32 -33 34 35 aaa33 bbb33 ccccc33 -34 35 36 aaa34 bbb34 ccccc34 -35 36 37 aaa35 bbb35 ccccc35 -36 37 38 aaa36 bbb36 ccccc36 -37 38 39 aaa37 bbb37 ccccc37 -38 39 40 aaa38 bbb38 ccccc38 -39 40 41 aaa39 bbb39 ccccc39 -40 41 42 aaa40 bbb40 ccccc40 -41 42 43 aaa41 bbb41 ccccc41 -42 43 44 aaa42 bbb42 ccccc42 -43 44 45 aaa43 bbb43 ccccc43 -44 45 46 aaa44 bbb44 ccccc44 -45 46 47 aaa45 bbb45 ccccc45 -46 47 48 aaa46 bbb46 ccccc46 -47 48 49 aaa47 bbb47 ccccc47 -48 49 50 aaa48 bbb48 ccccc48 -49 50 51 aaa49 bbb49 ccccc49 -50 51 52 aaa50 bbb50 ccccc50 -51 52 53 aaa51 bbb51 ccccc51 -52 53 54 aaa52 bbb52 ccccc52 -53 54 55 aaa53 bbb53 ccccc53 -54 55 56 aaa54 bbb54 ccccc54 -55 56 57 aaa55 bbb55 ccccc55 -56 57 58 aaa56 bbb56 ccccc56 -57 58 59 aaa57 bbb57 ccccc57 -58 59 60 aaa58 bbb58 ccccc58 -59 60 61 aaa59 bbb59 ccccc59 -60 61 62 aaa60 bbb60 ccccc60 -61 62 63 aaa61 bbb61 ccccc61 -62 63 64 aaa62 bbb62 ccccc62 -63 64 65 aaa63 bbb63 ccccc63 -64 65 66 aaa64 bbb64 ccccc64 -65 66 67 aaa65 bbb65 ccccc65 -66 67 68 aaa66 bbb66 ccccc66 -67 68 69 aaa67 bbb67 ccccc67 -68 69 70 aaa68 bbb68 ccccc68 -69 70 71 aaa69 bbb69 ccccc69 -70 71 72 aaa70 bbb70 ccccc70 -71 72 73 aaa71 bbb71 ccccc71 -72 73 74 aaa72 bbb72 ccccc72 -73 74 75 aaa73 bbb73 ccccc73 -74 75 76 aaa74 bbb74 ccccc74 -75 76 77 aaa75 bbb75 ccccc75 -76 77 78 aaa76 bbb76 ccccc76 -77 78 79 aaa77 bbb77 ccccc77 -78 79 80 aaa78 bbb78 ccccc78 -79 80 81 aaa79 bbb79 ccccc79 -80 81 82 aaa80 bbb80 ccccc80 -81 82 83 aaa81 bbb81 ccccc81 -82 83 84 aaa82 bbb82 ccccc82 -83 84 85 aaa83 bbb83 ccccc83 -84 85 86 aaa84 bbb84 ccccc84 -85 86 87 aaa85 bbb85 ccccc85 -86 87 88 aaa86 bbb86 ccccc86 -87 88 89 aaa87 bbb87 ccccc87 -88 89 90 aaa88 bbb88 ccccc88 -89 90 91 aaa89 bbb89 ccccc89 -90 91 92 aaa90 bbb90 ccccc90 -91 92 93 aaa91 bbb91 ccccc91 -92 93 94 aaa92 bbb92 ccccc92 -93 94 95 aaa93 bbb93 ccccc93 -94 95 96 aaa94 bbb94 ccccc94 -95 96 97 aaa95 bbb95 ccccc95 -96 97 98 aaa96 bbb96 ccccc96 -97 98 99 aaa97 bbb97 ccccc97 -98 99 100 aaa98 bbb98 ccccc98 -99 100 101 aaa99 bbb99 ccccc99 -100 101 102 aaa100 bbb100 ccccc100 -SELECT * INTO OUTFILE 't_backup' FROM test.t; -TRUNCATE test.t; -SELECT count(*) FROM test.t; -count(*) -0 -LOAD DATA INFILE 't_backup' INTO TABLE test.t; -SELECT * FROM test.t order by a; -a b c d e f -1 2 3 aaa1 bbb1 ccccc1 -2 3 4 aaa2 bbb2 ccccc2 -3 4 5 aaa3 bbb3 ccccc3 -4 5 6 aaa4 bbb4 ccccc4 -5 6 7 aaa5 bbb5 ccccc5 -6 7 8 aaa6 bbb6 ccccc6 -7 8 9 aaa7 bbb7 ccccc7 -8 9 10 aaa8 bbb8 ccccc8 -9 10 11 aaa9 bbb9 ccccc9 -10 11 12 aaa10 bbb10 ccccc10 -11 12 13 aaa11 bbb11 ccccc11 -12 13 14 aaa12 bbb12 ccccc12 -13 14 15 aaa13 bbb13 ccccc13 -14 15 16 aaa14 bbb14 ccccc14 -15 16 17 aaa15 bbb15 ccccc15 -16 17 18 aaa16 bbb16 ccccc16 -17 18 19 aaa17 bbb17 ccccc17 -18 19 20 aaa18 bbb18 ccccc18 -19 20 21 aaa19 bbb19 ccccc19 -20 21 22 aaa20 bbb20 ccccc20 -21 22 23 aaa21 bbb21 ccccc21 -22 23 24 aaa22 bbb22 ccccc22 -23 24 25 aaa23 bbb23 ccccc23 -24 25 26 aaa24 bbb24 ccccc24 -25 26 27 aaa25 bbb25 ccccc25 -26 27 28 aaa26 bbb26 ccccc26 -27 28 29 aaa27 bbb27 ccccc27 -28 29 30 aaa28 bbb28 ccccc28 -29 30 31 aaa29 bbb29 ccccc29 -30 31 32 aaa30 bbb30 ccccc30 -31 32 33 aaa31 bbb31 ccccc31 -32 33 34 aaa32 bbb32 ccccc32 -33 34 35 aaa33 bbb33 ccccc33 -34 35 36 aaa34 bbb34 ccccc34 -35 36 37 aaa35 bbb35 ccccc35 -36 37 38 aaa36 bbb36 ccccc36 -37 38 39 aaa37 bbb37 ccccc37 -38 39 40 aaa38 bbb38 ccccc38 -39 40 41 aaa39 bbb39 ccccc39 -40 41 42 aaa40 bbb40 ccccc40 -41 42 43 aaa41 bbb41 ccccc41 -42 43 44 aaa42 bbb42 ccccc42 -43 44 45 aaa43 bbb43 ccccc43 -44 45 46 aaa44 bbb44 ccccc44 -45 46 47 aaa45 bbb45 ccccc45 -46 47 48 aaa46 bbb46 ccccc46 -47 48 49 aaa47 bbb47 ccccc47 -48 49 50 aaa48 bbb48 ccccc48 -49 50 51 aaa49 bbb49 ccccc49 -50 51 52 aaa50 bbb50 ccccc50 -51 52 53 aaa51 bbb51 ccccc51 -52 53 54 aaa52 bbb52 ccccc52 -53 54 55 aaa53 bbb53 ccccc53 -54 55 56 aaa54 bbb54 ccccc54 -55 56 57 aaa55 bbb55 ccccc55 -56 57 58 aaa56 bbb56 ccccc56 -57 58 59 aaa57 bbb57 ccccc57 -58 59 60 aaa58 bbb58 ccccc58 -59 60 61 aaa59 bbb59 ccccc59 -60 61 62 aaa60 bbb60 ccccc60 -61 62 63 aaa61 bbb61 ccccc61 -62 63 64 aaa62 bbb62 ccccc62 -63 64 65 aaa63 bbb63 ccccc63 -64 65 66 aaa64 bbb64 ccccc64 -65 66 67 aaa65 bbb65 ccccc65 -66 67 68 aaa66 bbb66 ccccc66 -67 68 69 aaa67 bbb67 ccccc67 -68 69 70 aaa68 bbb68 ccccc68 -69 70 71 aaa69 bbb69 ccccc69 -70 71 72 aaa70 bbb70 ccccc70 -71 72 73 aaa71 bbb71 ccccc71 -72 73 74 aaa72 bbb72 ccccc72 -73 74 75 aaa73 bbb73 ccccc73 -74 75 76 aaa74 bbb74 ccccc74 -75 76 77 aaa75 bbb75 ccccc75 -76 77 78 aaa76 bbb76 ccccc76 -77 78 79 aaa77 bbb77 ccccc77 -78 79 80 aaa78 bbb78 ccccc78 -79 80 81 aaa79 bbb79 ccccc79 -80 81 82 aaa80 bbb80 ccccc80 -81 82 83 aaa81 bbb81 ccccc81 -82 83 84 aaa82 bbb82 ccccc82 -83 84 85 aaa83 bbb83 ccccc83 -84 85 86 aaa84 bbb84 ccccc84 -85 86 87 aaa85 bbb85 ccccc85 -86 87 88 aaa86 bbb86 ccccc86 -87 88 89 aaa87 bbb87 ccccc87 -88 89 90 aaa88 bbb88 ccccc88 -89 90 91 aaa89 bbb89 ccccc89 -90 91 92 aaa90 bbb90 ccccc90 -91 92 93 aaa91 bbb91 ccccc91 -92 93 94 aaa92 bbb92 ccccc92 -93 94 95 aaa93 bbb93 ccccc93 -94 95 96 aaa94 bbb94 ccccc94 -95 96 97 aaa95 bbb95 ccccc95 -96 97 98 aaa96 bbb96 ccccc96 -97 98 99 aaa97 bbb97 ccccc97 -98 99 100 aaa98 bbb98 ccccc98 -99 100 101 aaa99 bbb99 ccccc99 -100 101 102 aaa100 bbb100 ccccc100 -DROP TABLE test.t; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile_ts1_01.dat' -ENGINE = NDB; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile_ts1_02.dat' -ENGINE = NDB; -ALTER TABLESPACE ts2 -DROP DATAFILE 'datafile_ts2_01.dat' -ENGINE = NDB; -ALTER TABLESPACE ts3 -DROP DATAFILE 'datafile_ts3_01.dat' -ENGINE = NDB; -DROP TABLESPACE ts1 ENGINE = NDB; -DROP TABLESPACE ts2 ENGINE = NDB; -DROP TABLESPACE ts3 ENGINE = NDB; -DROP LOGFILE GROUP lg1 ENGINE = NDB; diff --git a/mysql-test/suite/ndb/r/ndb_dd_sql_features.result b/mysql-test/suite/ndb/r/ndb_dd_sql_features.result deleted file mode 100644 index 135250fe7e8..00000000000 --- a/mysql-test/suite/ndb/r/ndb_dd_sql_features.result +++ /dev/null @@ -1,599 +0,0 @@ -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -DROP TABLE IF EXISTS test.t3; -***** -**** Copy data from table in one table space to table -**** in different table space -***** -CREATE LOGFILE GROUP lg -ADD UNDOFILE './lg_group/undofile.dat' - INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; -CREATE TABLESPACE ts1 -ADD DATAFILE './table_space1/datafile.dat' - USE LOGFILE GROUP lg -INITIAL_SIZE 25M -ENGINE NDB; -CREATE TABLESPACE ts2 -ADD DATAFILE './table_space2/datafile.dat' - USE LOGFILE GROUP lg -INITIAL_SIZE 20M -ENGINE NDB; -CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), a3 BLOB) -TABLESPACE ts1 STORAGE DISK ENGINE=NDB; -CREATE TABLE test.t2 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), a3 BLOB) -TABLESPACE ts2 STORAGE DISK ENGINE=NDB; -SHOW CREATE TABLE test.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a1` int(11) NOT NULL, - `a2` varchar(256) DEFAULT NULL, - `a3` blob, - PRIMARY KEY (`a1`) -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -SHOW CREATE TABLE test.t2; -Table Create Table -t2 CREATE TABLE `t2` ( - `a1` int(11) NOT NULL, - `a2` varchar(256) DEFAULT NULL, - `a3` blob, - PRIMARY KEY (`a1`) -) /*!50100 TABLESPACE ts2 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -INSERT INTO test.t1 VALUES (1,'111111','aaaaaaaa'); -INSERT INTO test.t1 VALUES (2,'222222','bbbbbbbb'); -SELECT * FROM test.t1 ORDER BY a1; -a1 a2 a3 -1 111111 aaaaaaaa -2 222222 bbbbbbbb -INSERT INTO test.t2(a1,a2,a3) SELECT * FROM test.t1; -SELECT * FROM test.t2 ORDER BY a1; -a1 a2 a3 -1 111111 aaaaaaaa -2 222222 bbbbbbbb -DROP TABLE test.t1, test.t2; -set @vc1 = repeat('a', 200); -set @vc2 = repeat('b', 500); -set @vc3 = repeat('c', 1000); -set @vc4 = repeat('d', 4000); -set @x0 = '01234567012345670123456701234567'; -set @x0 = concat(@x0,@x0,@x0,@x0,@x0,@x0,@x0,@x0); -set @b1 = 'b1'; -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@x0); -set @d1 = 'dd1'; -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @b2 = 'b2'; -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @d2 = 'dd2'; -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -select length(@x0),length(@b1),length(@d1) from dual; -length(@x0) length(@b1) length(@d1) -256 2256 3000 -select length(@x0),length(@b2),length(@d2) from dual; -length(@x0) length(@b2) length(@d2) -256 20000 30000 -CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(5000), a3 BLOB) -TABLESPACE ts1 STORAGE DISK ENGINE=NDB; -CREATE TABLE test.t2 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(5000), a3 BLOB) -TABLESPACE ts2 STORAGE DISK ENGINE=NDB; -SHOW CREATE TABLE test.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a1` int(11) NOT NULL, - `a2` varchar(5000) DEFAULT NULL, - `a3` blob, - PRIMARY KEY (`a1`) -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -SHOW CREATE TABLE test.t2; -Table Create Table -t2 CREATE TABLE `t2` ( - `a1` int(11) NOT NULL, - `a2` varchar(5000) DEFAULT NULL, - `a3` blob, - PRIMARY KEY (`a1`) -) /*!50100 TABLESPACE ts2 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -INSERT INTO test.t1 VALUES (1,@vc1,@d1); -INSERT INTO test.t1 VALUES (2,@vc2,@b1); -INSERT INTO test.t1 VALUES (3,@vc3,@d2); -INSERT INTO test.t1 VALUES (4,@vc4,@b2); -SELECT a1,length(a2),substr(a2,180,2),length(a3),substr(a3,1+3*900,3) -FROM test.t1 WHERE a1=1; -a1 length(a2) substr(a2,180,2) length(a3) substr(a3,1+3*900,3) -1 200 aa 3000 dd1 -SELECT a1,length(a2),substr(a2,480,2),length(a3),substr(a3,1+2*900,3) -FROM test.t1 where a1=2; -a1 length(a2) substr(a2,480,2) length(a3) substr(a3,1+2*900,3) -2 500 bb 2256 b1b -INSERT INTO test.t2(a1,a2,a3) SELECT * FROM test.t1; -SELECT a1,length(a2),substr(a2,180,2),length(a3),substr(a3,1+3*900,3) -FROM test.t2 WHERE a1=1; -a1 length(a2) substr(a2,180,2) length(a3) substr(a3,1+3*900,3) -1 200 aa 3000 dd1 -SELECT a1,length(a2),substr(a2,480,2),length(a3),substr(a3,1+2*900,3) -FROM test.t2 where a1=2; -a1 length(a2) substr(a2,480,2) length(a3) substr(a3,1+2*900,3) -2 500 bb 2256 b1b -DROP TABLE test.t1, test.t2; -***** -**** Insert, Update, Delete from NDB table with BLOB fields -***** -set @vc1 = repeat('a', 200); -set @vc2 = repeat('b', 500); -set @vc3 = repeat('c', 1000); -set @vc4 = repeat('d', 4000); -set @vc5 = repeat('d', 5000); -set @bb1 = repeat('1', 2000); -set @bb2 = repeat('2', 5000); -set @bb3 = repeat('3', 10000); -set @bb4 = repeat('4', 40000); -set @bb5 = repeat('5', 50000); -select length(@vc1),length(@vc2),length(@vc3),length(@vc4),length(@vc5) -from dual; -length(@vc1) length(@vc2) length(@vc3) length(@vc4) length(@vc5) -200 500 1000 4000 5000 -select length(@bb1),length(@bb2),length(@bb3),length(@bb4),length(@bb5) -from dual; -length(@bb1) length(@bb2) length(@bb3) length(@bb4) length(@bb5) -2000 5000 10000 40000 50000 -CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(5000), a3 BLOB) -TABLESPACE ts1 STORAGE DISK ENGINE=NDB; -INSERT INTO test.t1 VALUES (1,@vc1,@bb1); -INSERT INTO test.t1 VALUES (2,@vc2,@bb2); -INSERT INTO test.t1 VALUES (3,@vc3,@bb3); -INSERT INTO test.t1 VALUES (4,@vc4,@bb4); -INSERT INTO test.t1 VALUES (5,@vc5,@bb5); -UPDATE test.t1 SET a2=@vc5, a3=@bb5 WHERE a1=1; -SELECT a1,length(a2),substr(a2,4998,2),length(a3),substr(a3,49997,3) -FROM test.t1 WHERE a1=1; -a1 length(a2) substr(a2,4998,2) length(a3) substr(a3,49997,3) -1 5000 dd 50000 555 -UPDATE test.t1 SET a2=@vc4, a3=@bb4 WHERE a1=2; -SELECT a1,length(a2),substr(a2,3998,2),length(a3),substr(a3,39997,3) -FROM test.t1 WHERE a1=2; -a1 length(a2) substr(a2,3998,2) length(a3) substr(a3,39997,3) -2 4000 dd 40000 444 -UPDATE test.t1 SET a2=@vc2, a3=@bb2 WHERE a1=3; -SELECT a1,length(a2),substr(a2,498,2),length(a3),substr(a3,3997,3) -FROM test.t1 WHERE a1=3; -a1 length(a2) substr(a2,498,2) length(a3) substr(a3,3997,3) -3 500 bb 5000 222 -UPDATE test.t1 SET a2=@vc3, a3=@bb3 WHERE a1=4; -SELECT a1,length(a2),substr(a2,998,2),length(a3),substr(a3,9997,3) -FROM test.t1 WHERE a1=4; -a1 length(a2) substr(a2,998,2) length(a3) substr(a3,9997,3) -4 1000 cc 10000 333 -UPDATE test.t1 SET a2=@vc1, a3=@bb1 WHERE a1=5; -SELECT a1,length(a2),substr(a2,198,2),length(a3),substr(a3,1997,3) -FROM test.t1 WHERE a1=5; -a1 length(a2) substr(a2,198,2) length(a3) substr(a3,1997,3) -5 200 aa 2000 111 -DELETE FROM test.t1 where a1=5; -SELECT count(*) from test.t1; -count(*) -4 -DELETE FROM test.t1 where a1=4; -SELECT count(*) from test.t1; -count(*) -3 -DELETE FROM test.t1 where a1=3; -SELECT count(*) from test.t1; -count(*) -2 -DELETE FROM test.t1 where a1=2; -SELECT count(*) from test.t1; -count(*) -1 -DELETE FROM test.t1 where a1=1; -SELECT count(*) from test.t1; -count(*) -0 -DROP TABLE test.t1; -***** -**** Create Stored procedures that use disk based tables -***** -CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), a3 BLOB) -TABLESPACE ts1 STORAGE DISK ENGINE=NDB// -CREATE PROCEDURE test.sp1() -BEGIN -INSERT INTO test.t1 values (1,'111111','aaaaaaaa'); -END// -CALL test.sp1(); -SELECT * FROM test.t1; -a1 a2 a3 -1 111111 aaaaaaaa -CREATE PROCEDURE test.sp2(n INT, vc VARCHAR(256), blb BLOB) -BEGIN -UPDATE test.t1 SET a2=vc, a3=blb where a1=n; -END// -CALL test.sp2(1,'222222','bbbbbbbb'); -SELECT * FROM test.t1; -a1 a2 a3 -1 222222 bbbbbbbb -DELETE FROM test.t1; -DROP PROCEDURE test.sp1; -DROP PROCEDURE test.sp2; -DROP TABLE test.t1; -***** -***** Create function that operate on disk based tables -***** -CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), a3 BLOB) -TABLESPACE ts1 STORAGE DISK ENGINE=NDB; -CREATE FUNCTION test.fn1(n INT) RETURNS INT -BEGIN -DECLARE v INT; -SELECT a1 INTO v FROM test.t1 WHERE a1=n; -RETURN v; -END// -CREATE FUNCTION test.fn2(n INT, blb BLOB) RETURNS BLOB -BEGIN -DECLARE vv BLOB; -UPDATE test.t1 SET a3=blb where a1=n; -SELECT a3 INTO vv FROM test.t1 WHERE a1=n; -RETURN vv; -END// -SELECT test.fn1(10) FROM DUAL; -test.fn1(10) -10 -SELECT test.fn2(50, 'new BLOB content') FROM DUAL; -test.fn2(50, 'new BLOB content') -new BLOB content -DELETE FROM test.t1; -DROP FUNCTION test.fn1; -DROP FUNCTION test.fn2; -DROP TABLE test.t1; -***** -***** Create triggers that operate on disk based tables -***** -CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), a3 BLOB) -TABLESPACE ts1 STORAGE DISK ENGINE=NDB; -CREATE TRIGGER test.trg1 BEFORE INSERT ON test.t1 FOR EACH ROW -BEGIN -if isnull(new.a2) then -set new.a2:= 'trg1 works on a2 field'; -end if; -if isnull(new.a3) then -set new.a3:= 'trg1 works on a3 field'; -end if; -end// -insert into test.t1 (a1) values (1)// -insert into test.t1 (a1,a2) values (2, 'ccccccc')// -select * from test.t1 order by a1// -a1 a2 a3 -1 trg1 works on a2 field trg1 works on a3 field -2 ccccccc trg1 works on a3 field -DELETE FROM test.t1; -DROP TRIGGER test.trg1; -DROP TABLE test.t1; -***** -***** Create, update views that operate on disk based tables -***** -CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), a3 BLOB) -TABLESPACE ts1 STORAGE DISK ENGINE=NDB; -CREATE VIEW test.v1 AS SELECT * FROM test.t1; -SELECT * FROM test.v1 order by a1; -a1 a2 a3 -1 aaaaa1 bbbbb1 -2 aaaaa2 bbbbb2 -3 aaaaa3 bbbbb3 -4 aaaaa4 bbbbb4 -5 aaaaa5 bbbbb5 -6 aaaaa6 bbbbb6 -7 aaaaa7 bbbbb7 -8 aaaaa8 bbbbb8 -9 aaaaa9 bbbbb9 -10 aaaaa10 bbbbb10 -CHECK TABLE test.v1, test.t1; -Table Op Msg_type Msg_text -test.v1 check status OK -test.t1 check note The storage engine for the table doesn't support check -UPDATE test.v1 SET a2='zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz' WHERE a1=5; -SELECT * FROM test.v1 order by a1; -a1 a2 a3 -1 aaaaa1 bbbbb1 -2 aaaaa2 bbbbb2 -3 aaaaa3 bbbbb3 -4 aaaaa4 bbbbb4 -5 zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz bbbbb5 -6 aaaaa6 bbbbb6 -7 aaaaa7 bbbbb7 -8 aaaaa8 bbbbb8 -9 aaaaa9 bbbbb9 -10 aaaaa10 bbbbb10 -DROP VIEW test.v1; -DELETE FROM test.t1; -DROP TABLE test.t1; -***** -***** Create and use disk based table that use auto inc -***** -CREATE TABLE test.t1 (a1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, -a2 VARCHAR(256), a3 BLOB) -TABLESPACE ts1 STORAGE DISK ENGINE=NDB; -SELECT * FROM test.t1 ORDER BY a1; -a1 a2 a3 -1 aaaaa10 bbbbb10 -2 aaaaa9 bbbbb9 -3 aaaaa8 bbbbb8 -4 aaaaa7 bbbbb7 -5 aaaaa6 bbbbb6 -6 aaaaa5 bbbbb5 -7 aaaaa4 bbbbb4 -8 aaaaa3 bbbbb3 -9 aaaaa2 bbbbb2 -10 aaaaa1 bbbbb1 -DELETE FROM test.t1; -DROP TABLE test.t1; -***** -***** Create test that use transaction (commit, rollback) -***** -SET AUTOCOMMIT=0; -CREATE TABLE test.t1 (a1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, -a2 VARCHAR(256), a3 BLOB) -TABLESPACE ts1 STORAGE DISK ENGINE=NDB; -INSERT INTO test.t1 VALUES(NULL, "aaaaa1", "bbbbb1"); -COMMIT; -SELECT * FROM test.t1 ORDER BY a1; -a1 a2 a3 -1 aaaaa1 bbbbb1 -INSERT INTO test.t1 VALUES(NULL, "aaaaa2", "bbbbb2"); -ROLLBACK; -SELECT * FROM test.t1 ORDER BY a1; -a1 a2 a3 -1 aaaaa1 bbbbb1 -DELETE FROM test.t1; -DROP TABLE test.t1; -SET AUTOCOMMIT=1; -CREATE TABLE test.t1 (a1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, -a2 VARCHAR(256), a3 BLOB) -TABLESPACE ts1 STORAGE DISK ENGINE=NDB; -START TRANSACTION; -INSERT INTO test.t1 VALUES(NULL, "aaaaa1", "bbbbb1"); -COMMIT; -SELECT * FROM test.t1 ORDER BY a1; -a1 a2 a3 -1 aaaaa1 bbbbb1 -START TRANSACTION; -INSERT INTO test.t1 VALUES(NULL, "aaaaa2", "bbbbb2"); -ROLLBACK; -SELECT * FROM test.t1 ORDER BY a1; -a1 a2 a3 -1 aaaaa1 bbbbb1 -DELETE FROM test.t1; -DROP TABLE test.t1; -***** -***** Create test that uses locks -***** -drop table if exists test.t1; -CREATE TABLE test.t1 (a1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, -a2 VARCHAR(256), a3 BLOB) -TABLESPACE ts1 STORAGE DISK ENGINE=NDB; -LOCK TABLES test.t1 write; -INSERT INTO test.t1 VALUES(NULL, "aaaaa1", "bbbbb1"); -INSERT INTO test.t1 VALUES(NULL, "aaaaa2", "bbbbb2"); -SELECT * FROM test.t1 ORDER BY a1; -a1 a2 a3 -1 aaaaa1 bbbbb1 -2 aaaaa2 bbbbb2 -SELECT * FROM test.t1 ORDER BY a1; -a1 a2 a3 -1 aaaaa1 bbbbb1 -2 aaaaa2 bbbbb2 -INSERT INTO test.t1 VALUES(NULL, "aaaaa3", "bbbbb3"); -UNLOCK TABLES; -INSERT INTO test.t1 VALUES(NULL, "aaaaa3", "bbbbb3"); -SELECT * FROM test.t1 ORDER BY a1; -a1 a2 a3 -1 aaaaa1 bbbbb1 -2 aaaaa2 bbbbb2 -3 aaaaa3 bbbbb3 -4 aaaaa3 bbbbb3 -DELETE FROM test.t1; -DROP TABLE test.t1; -***** -***** Create large disk base table, do random queries, check cache hits -***** -set @vc1 = repeat('a', 200); -SELECT @vc1 FROM DUAL; -@vc1 -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -set @vc2 = repeat('b', 500); -set @vc3 = repeat('b', 998); -set @x0 = '01234567012345670123456701234567'; -set @x0 = concat(@x0,@x0,@x0,@x0,@x0,@x0,@x0,@x0); -set @b1 = 'b1'; -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@x0); -set @d1 = 'dd1'; -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @b2 = 'b2'; -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @d2 = 'dd2'; -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -select length(@x0),length(@b1),length(@d1) from dual; -length(@x0) length(@b1) length(@d1) -256 2256 3000 -select length(@x0),length(@b2),length(@d2) from dual; -length(@x0) length(@b2) length(@d2) -256 20000 30000 -CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(1000), a3 BLOB) -TABLESPACE ts1 STORAGE DISK ENGINE=NDB; -INSERT INTO test.t1 values(1,@vc1,@d1); -INSERT INTO test.t1 values(2,@vc2,@d2); -explain SELECT * from test.t1 WHERE a1 = 1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 const PRIMARY PRIMARY 4 const # -SELECT a1,length(a2),substr(a2,1+2*900,2),length(a3),substr(a3,1+3*900,3) -FROM test.t1 WHERE a1=1 ORDER BY a1; -a1 length(a2) substr(a2,1+2*900,2) length(a3) substr(a3,1+3*900,3) -1 200 3000 dd1 -SELECT a1,length(a2),substr(a2,1+2*9000,2),length(a3),substr(a3,1+3*9000,3) -FROM test.t1 where a1=2 ORDER BY a1; -a1 length(a2) substr(a2,1+2*9000,2) length(a3) substr(a3,1+3*9000,3) -2 500 30000 dd2 -UPDATE test.t1 set a2=@vc2,a3=@d2 where a1=1; -UPDATE test.t1 set a2=@vc1,a3=@d1 where a1=2; -SELECT a1,length(a2),substr(a2,1+2*9000,2),length(a3),substr(a3,1+3*9000,3) -FROM test.t1 where a1=1; -a1 length(a2) substr(a2,1+2*9000,2) length(a3) substr(a3,1+3*9000,3) -1 500 30000 dd2 -SELECT a1,length(a2),substr(a2,1+2*900,2),length(a3),substr(a3,1+3*900,3) -FROM test.t1 where a1=2; -a1 length(a2) substr(a2,1+2*900,2) length(a3) substr(a3,1+3*900,3) -2 200 3000 dd1 -DELETE FROM test.t1; -DROP TABLE test.t1; -***** -***** Create test that uses COUNT(), SUM(), MAX(), MIN(), NOW(), -***** USER(), TRUNCATE -***** -CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), -a3 BLOB, a4 DATE, a5 CHAR(250)) -TABLESPACE ts1 STORAGE DISK ENGINE=NDB; -SELECT COUNT(*) from test.t1; -COUNT(*) -100 -SELECT SUM(a1) from test.t1; -SUM(a1) -5050 -SELECT MIN(a1) from test.t1; -MIN(a1) -1 -SELECT MAX(a1) from test.t1; -MAX(a1) -100 -SELECT a5 from test.t1 where a1=50; -a5 -root@localhost -SELECT * from test.t1 order by a1; -a1 a2 a3 a4 a5 -1 aaaaaaaaaaaaaaaa1 bbbbbbbbbbbbbbbbbb1 2006-06-20 root@localhost -2 aaaaaaaaaaaaaaaa2 bbbbbbbbbbbbbbbbbb2 2006-06-20 root@localhost -3 aaaaaaaaaaaaaaaa3 bbbbbbbbbbbbbbbbbb3 2006-06-20 root@localhost -4 aaaaaaaaaaaaaaaa4 bbbbbbbbbbbbbbbbbb4 2006-06-20 root@localhost -5 aaaaaaaaaaaaaaaa5 bbbbbbbbbbbbbbbbbb5 2006-06-20 root@localhost -6 aaaaaaaaaaaaaaaa6 bbbbbbbbbbbbbbbbbb6 2006-06-20 root@localhost -7 aaaaaaaaaaaaaaaa7 bbbbbbbbbbbbbbbbbb7 2006-06-20 root@localhost -8 aaaaaaaaaaaaaaaa8 bbbbbbbbbbbbbbbbbb8 2006-06-20 root@localhost -9 aaaaaaaaaaaaaaaa9 bbbbbbbbbbbbbbbbbb9 2006-06-20 root@localhost -10 aaaaaaaaaaaaaaaa10 bbbbbbbbbbbbbbbbbb10 2006-06-20 root@localhost -11 aaaaaaaaaaaaaaaa11 bbbbbbbbbbbbbbbbbb11 2006-06-20 root@localhost -12 aaaaaaaaaaaaaaaa12 bbbbbbbbbbbbbbbbbb12 2006-06-20 root@localhost -13 aaaaaaaaaaaaaaaa13 bbbbbbbbbbbbbbbbbb13 2006-06-20 root@localhost -14 aaaaaaaaaaaaaaaa14 bbbbbbbbbbbbbbbbbb14 2006-06-20 root@localhost -15 aaaaaaaaaaaaaaaa15 bbbbbbbbbbbbbbbbbb15 2006-06-20 root@localhost -16 aaaaaaaaaaaaaaaa16 bbbbbbbbbbbbbbbbbb16 2006-06-20 root@localhost -17 aaaaaaaaaaaaaaaa17 bbbbbbbbbbbbbbbbbb17 2006-06-20 root@localhost -18 aaaaaaaaaaaaaaaa18 bbbbbbbbbbbbbbbbbb18 2006-06-20 root@localhost -19 aaaaaaaaaaaaaaaa19 bbbbbbbbbbbbbbbbbb19 2006-06-20 root@localhost -20 aaaaaaaaaaaaaaaa20 bbbbbbbbbbbbbbbbbb20 2006-06-20 root@localhost -21 aaaaaaaaaaaaaaaa21 bbbbbbbbbbbbbbbbbb21 2006-06-20 root@localhost -22 aaaaaaaaaaaaaaaa22 bbbbbbbbbbbbbbbbbb22 2006-06-20 root@localhost -23 aaaaaaaaaaaaaaaa23 bbbbbbbbbbbbbbbbbb23 2006-06-20 root@localhost -24 aaaaaaaaaaaaaaaa24 bbbbbbbbbbbbbbbbbb24 2006-06-20 root@localhost -25 aaaaaaaaaaaaaaaa25 bbbbbbbbbbbbbbbbbb25 2006-06-20 root@localhost -26 aaaaaaaaaaaaaaaa26 bbbbbbbbbbbbbbbbbb26 2006-06-20 root@localhost -27 aaaaaaaaaaaaaaaa27 bbbbbbbbbbbbbbbbbb27 2006-06-20 root@localhost -28 aaaaaaaaaaaaaaaa28 bbbbbbbbbbbbbbbbbb28 2006-06-20 root@localhost -29 aaaaaaaaaaaaaaaa29 bbbbbbbbbbbbbbbbbb29 2006-06-20 root@localhost -30 aaaaaaaaaaaaaaaa30 bbbbbbbbbbbbbbbbbb30 2006-06-20 root@localhost -31 aaaaaaaaaaaaaaaa31 bbbbbbbbbbbbbbbbbb31 2006-06-20 root@localhost -32 aaaaaaaaaaaaaaaa32 bbbbbbbbbbbbbbbbbb32 2006-06-20 root@localhost -33 aaaaaaaaaaaaaaaa33 bbbbbbbbbbbbbbbbbb33 2006-06-20 root@localhost -34 aaaaaaaaaaaaaaaa34 bbbbbbbbbbbbbbbbbb34 2006-06-20 root@localhost -35 aaaaaaaaaaaaaaaa35 bbbbbbbbbbbbbbbbbb35 2006-06-20 root@localhost -36 aaaaaaaaaaaaaaaa36 bbbbbbbbbbbbbbbbbb36 2006-06-20 root@localhost -37 aaaaaaaaaaaaaaaa37 bbbbbbbbbbbbbbbbbb37 2006-06-20 root@localhost -38 aaaaaaaaaaaaaaaa38 bbbbbbbbbbbbbbbbbb38 2006-06-20 root@localhost -39 aaaaaaaaaaaaaaaa39 bbbbbbbbbbbbbbbbbb39 2006-06-20 root@localhost -40 aaaaaaaaaaaaaaaa40 bbbbbbbbbbbbbbbbbb40 2006-06-20 root@localhost -41 aaaaaaaaaaaaaaaa41 bbbbbbbbbbbbbbbbbb41 2006-06-20 root@localhost -42 aaaaaaaaaaaaaaaa42 bbbbbbbbbbbbbbbbbb42 2006-06-20 root@localhost -43 aaaaaaaaaaaaaaaa43 bbbbbbbbbbbbbbbbbb43 2006-06-20 root@localhost -44 aaaaaaaaaaaaaaaa44 bbbbbbbbbbbbbbbbbb44 2006-06-20 root@localhost -45 aaaaaaaaaaaaaaaa45 bbbbbbbbbbbbbbbbbb45 2006-06-20 root@localhost -46 aaaaaaaaaaaaaaaa46 bbbbbbbbbbbbbbbbbb46 2006-06-20 root@localhost -47 aaaaaaaaaaaaaaaa47 bbbbbbbbbbbbbbbbbb47 2006-06-20 root@localhost -48 aaaaaaaaaaaaaaaa48 bbbbbbbbbbbbbbbbbb48 2006-06-20 root@localhost -49 aaaaaaaaaaaaaaaa49 bbbbbbbbbbbbbbbbbb49 2006-06-20 root@localhost -50 aaaaaaaaaaaaaaaa50 bbbbbbbbbbbbbbbbbb50 2006-06-20 root@localhost -51 aaaaaaaaaaaaaaaa51 bbbbbbbbbbbbbbbbbb51 2006-06-20 root@localhost -52 aaaaaaaaaaaaaaaa52 bbbbbbbbbbbbbbbbbb52 2006-06-20 root@localhost -53 aaaaaaaaaaaaaaaa53 bbbbbbbbbbbbbbbbbb53 2006-06-20 root@localhost -54 aaaaaaaaaaaaaaaa54 bbbbbbbbbbbbbbbbbb54 2006-06-20 root@localhost -55 aaaaaaaaaaaaaaaa55 bbbbbbbbbbbbbbbbbb55 2006-06-20 root@localhost -56 aaaaaaaaaaaaaaaa56 bbbbbbbbbbbbbbbbbb56 2006-06-20 root@localhost -57 aaaaaaaaaaaaaaaa57 bbbbbbbbbbbbbbbbbb57 2006-06-20 root@localhost -58 aaaaaaaaaaaaaaaa58 bbbbbbbbbbbbbbbbbb58 2006-06-20 root@localhost -59 aaaaaaaaaaaaaaaa59 bbbbbbbbbbbbbbbbbb59 2006-06-20 root@localhost -60 aaaaaaaaaaaaaaaa60 bbbbbbbbbbbbbbbbbb60 2006-06-20 root@localhost -61 aaaaaaaaaaaaaaaa61 bbbbbbbbbbbbbbbbbb61 2006-06-20 root@localhost -62 aaaaaaaaaaaaaaaa62 bbbbbbbbbbbbbbbbbb62 2006-06-20 root@localhost -63 aaaaaaaaaaaaaaaa63 bbbbbbbbbbbbbbbbbb63 2006-06-20 root@localhost -64 aaaaaaaaaaaaaaaa64 bbbbbbbbbbbbbbbbbb64 2006-06-20 root@localhost -65 aaaaaaaaaaaaaaaa65 bbbbbbbbbbbbbbbbbb65 2006-06-20 root@localhost -66 aaaaaaaaaaaaaaaa66 bbbbbbbbbbbbbbbbbb66 2006-06-20 root@localhost -67 aaaaaaaaaaaaaaaa67 bbbbbbbbbbbbbbbbbb67 2006-06-20 root@localhost -68 aaaaaaaaaaaaaaaa68 bbbbbbbbbbbbbbbbbb68 2006-06-20 root@localhost -69 aaaaaaaaaaaaaaaa69 bbbbbbbbbbbbbbbbbb69 2006-06-20 root@localhost -70 aaaaaaaaaaaaaaaa70 bbbbbbbbbbbbbbbbbb70 2006-06-20 root@localhost -71 aaaaaaaaaaaaaaaa71 bbbbbbbbbbbbbbbbbb71 2006-06-20 root@localhost -72 aaaaaaaaaaaaaaaa72 bbbbbbbbbbbbbbbbbb72 2006-06-20 root@localhost -73 aaaaaaaaaaaaaaaa73 bbbbbbbbbbbbbbbbbb73 2006-06-20 root@localhost -74 aaaaaaaaaaaaaaaa74 bbbbbbbbbbbbbbbbbb74 2006-06-20 root@localhost -75 aaaaaaaaaaaaaaaa75 bbbbbbbbbbbbbbbbbb75 2006-06-20 root@localhost -76 aaaaaaaaaaaaaaaa76 bbbbbbbbbbbbbbbbbb76 2006-06-20 root@localhost -77 aaaaaaaaaaaaaaaa77 bbbbbbbbbbbbbbbbbb77 2006-06-20 root@localhost -78 aaaaaaaaaaaaaaaa78 bbbbbbbbbbbbbbbbbb78 2006-06-20 root@localhost -79 aaaaaaaaaaaaaaaa79 bbbbbbbbbbbbbbbbbb79 2006-06-20 root@localhost -80 aaaaaaaaaaaaaaaa80 bbbbbbbbbbbbbbbbbb80 2006-06-20 root@localhost -81 aaaaaaaaaaaaaaaa81 bbbbbbbbbbbbbbbbbb81 2006-06-20 root@localhost -82 aaaaaaaaaaaaaaaa82 bbbbbbbbbbbbbbbbbb82 2006-06-20 root@localhost -83 aaaaaaaaaaaaaaaa83 bbbbbbbbbbbbbbbbbb83 2006-06-20 root@localhost -84 aaaaaaaaaaaaaaaa84 bbbbbbbbbbbbbbbbbb84 2006-06-20 root@localhost -85 aaaaaaaaaaaaaaaa85 bbbbbbbbbbbbbbbbbb85 2006-06-20 root@localhost -86 aaaaaaaaaaaaaaaa86 bbbbbbbbbbbbbbbbbb86 2006-06-20 root@localhost -87 aaaaaaaaaaaaaaaa87 bbbbbbbbbbbbbbbbbb87 2006-06-20 root@localhost -88 aaaaaaaaaaaaaaaa88 bbbbbbbbbbbbbbbbbb88 2006-06-20 root@localhost -89 aaaaaaaaaaaaaaaa89 bbbbbbbbbbbbbbbbbb89 2006-06-20 root@localhost -90 aaaaaaaaaaaaaaaa90 bbbbbbbbbbbbbbbbbb90 2006-06-20 root@localhost -91 aaaaaaaaaaaaaaaa91 bbbbbbbbbbbbbbbbbb91 2006-06-20 root@localhost -92 aaaaaaaaaaaaaaaa92 bbbbbbbbbbbbbbbbbb92 2006-06-20 root@localhost -93 aaaaaaaaaaaaaaaa93 bbbbbbbbbbbbbbbbbb93 2006-06-20 root@localhost -94 aaaaaaaaaaaaaaaa94 bbbbbbbbbbbbbbbbbb94 2006-06-20 root@localhost -95 aaaaaaaaaaaaaaaa95 bbbbbbbbbbbbbbbbbb95 2006-06-20 root@localhost -96 aaaaaaaaaaaaaaaa96 bbbbbbbbbbbbbbbbbb96 2006-06-20 root@localhost -97 aaaaaaaaaaaaaaaa97 bbbbbbbbbbbbbbbbbb97 2006-06-20 root@localhost -98 aaaaaaaaaaaaaaaa98 bbbbbbbbbbbbbbbbbb98 2006-06-20 root@localhost -99 aaaaaaaaaaaaaaaa99 bbbbbbbbbbbbbbbbbb99 2006-06-20 root@localhost -100 aaaaaaaaaaaaaaaa100 bbbbbbbbbbbbbbbbbb100 2006-06-20 root@localhost -DROP TABLE test.t1; -ALTER TABLESPACE ts1 -DROP DATAFILE './table_space1/datafile.dat' - ENGINE=NDB; -DROP TABLESPACE ts1 ENGINE=NDB; -ALTER TABLESPACE ts2 -DROP DATAFILE './table_space2/datafile.dat' - ENGINE=NDB; -DROP TABLESPACE ts2 ENGINE=NDB; -DROP LOGFILE GROUP lg -ENGINE=NDB; diff --git a/mysql-test/suite/ndb/r/ndb_gis.result b/mysql-test/suite/ndb/r/ndb_gis.result deleted file mode 100644 index 76a53804d8f..00000000000 --- a/mysql-test/suite/ndb/r/ndb_gis.result +++ /dev/null @@ -1,1100 +0,0 @@ -SET storage_engine=ndbcluster; -DROP TABLE IF EXISTS t1, gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry; -CREATE TABLE gis_point (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g POINT); -CREATE TABLE gis_line (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g LINESTRING); -CREATE TABLE gis_polygon (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g POLYGON); -CREATE TABLE gis_multi_point (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g MULTIPOINT); -CREATE TABLE gis_multi_line (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g MULTILINESTRING); -CREATE TABLE gis_multi_polygon (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g MULTIPOLYGON); -CREATE TABLE gis_geometrycollection (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g GEOMETRYCOLLECTION); -CREATE TABLE gis_geometry (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g GEOMETRY); -SHOW CREATE TABLE gis_point; -Table Create Table -gis_point CREATE TABLE `gis_point` ( - `fid` int(11) NOT NULL AUTO_INCREMENT, - `g` point DEFAULT NULL, - PRIMARY KEY (`fid`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -SHOW FIELDS FROM gis_point; -Field Type Null Key Default Extra -fid int(11) NO PRI NULL auto_increment -g point YES NULL -SHOW FIELDS FROM gis_line; -Field Type Null Key Default Extra -fid int(11) NO PRI NULL auto_increment -g linestring YES NULL -SHOW FIELDS FROM gis_polygon; -Field Type Null Key Default Extra -fid int(11) NO PRI NULL auto_increment -g polygon YES NULL -SHOW FIELDS FROM gis_multi_point; -Field Type Null Key Default Extra -fid int(11) NO PRI NULL auto_increment -g multipoint YES NULL -SHOW FIELDS FROM gis_multi_line; -Field Type Null Key Default Extra -fid int(11) NO PRI NULL auto_increment -g multilinestring YES NULL -SHOW FIELDS FROM gis_multi_polygon; -Field Type Null Key Default Extra -fid int(11) NO PRI NULL auto_increment -g multipolygon YES NULL -SHOW FIELDS FROM gis_geometrycollection; -Field Type Null Key Default Extra -fid int(11) NO PRI NULL auto_increment -g geometrycollection YES NULL -SHOW FIELDS FROM gis_geometry; -Field Type Null Key Default Extra -fid int(11) NO PRI NULL auto_increment -g geometry YES NULL -INSERT INTO gis_point VALUES -(101, PointFromText('POINT(10 10)')), -(102, PointFromText('POINT(20 10)')), -(103, PointFromText('POINT(20 20)')), -(104, PointFromWKB(AsWKB(PointFromText('POINT(10 20)')))); -INSERT INTO gis_line VALUES -(105, LineFromText('LINESTRING(0 0,0 10,10 0)')), -(106, LineStringFromText('LINESTRING(10 10,20 10,20 20,10 20,10 10)')), -(107, LineStringFromWKB(LineString(Point(10, 10), Point(40, 10)))); -INSERT INTO gis_polygon VALUES -(108, PolygonFromText('POLYGON((10 10,20 10,20 20,10 20,10 10))')), -(109, PolyFromText('POLYGON((0 0,50 0,50 50,0 50,0 0), (10 10,20 10,20 20,10 20,10 10))')), -(110, PolyFromWKB(Polygon(LineString(Point(0, 0), Point(30, 0), Point(30, 30), Point(0, 0))))); -INSERT INTO gis_multi_point VALUES -(111, MultiPointFromText('MULTIPOINT(0 0,10 10,10 20,20 20)')), -(112, MPointFromText('MULTIPOINT(1 1,11 11,11 21,21 21)')), -(113, MPointFromWKB(MultiPoint(Point(3, 6), Point(4, 10)))); -INSERT INTO gis_multi_line VALUES -(114, MultiLineStringFromText('MULTILINESTRING((10 48,10 21,10 0),(16 0,16 23,16 48))')), -(115, MLineFromText('MULTILINESTRING((10 48,10 21,10 0))')), -(116, MLineFromWKB(MultiLineString(LineString(Point(1, 2), Point(3, 5)), LineString(Point(2, 5), Point(5, 8), Point(21, 7))))); -INSERT INTO gis_multi_polygon VALUES -(117, MultiPolygonFromText('MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))')), -(118, MPolyFromText('MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))')), -(119, MPolyFromWKB(MultiPolygon(Polygon(LineString(Point(0, 3), Point(3, 3), Point(3, 0), Point(0, 3)))))); -INSERT INTO gis_geometrycollection VALUES -(120, GeomCollFromText('GEOMETRYCOLLECTION(POINT(0 0), LINESTRING(0 0,10 10))')), -(121, GeometryFromWKB(GeometryCollection(Point(44, 6), LineString(Point(3, 6), Point(7, 9))))); -INSERT into gis_geometry SELECT * FROM gis_point; -INSERT into gis_geometry SELECT * FROM gis_line; -INSERT into gis_geometry SELECT * FROM gis_polygon; -INSERT into gis_geometry SELECT * FROM gis_multi_point; -INSERT into gis_geometry SELECT * FROM gis_multi_line; -INSERT into gis_geometry SELECT * FROM gis_multi_polygon; -INSERT into gis_geometry SELECT * FROM gis_geometrycollection; -SELECT fid, AsText(g) FROM gis_point ORDER by fid; -fid AsText(g) -101 POINT(10 10) -102 POINT(20 10) -103 POINT(20 20) -104 POINT(10 20) -SELECT fid, AsText(g) FROM gis_line ORDER by fid; -fid AsText(g) -105 LINESTRING(0 0,0 10,10 0) -106 LINESTRING(10 10,20 10,20 20,10 20,10 10) -107 LINESTRING(10 10,40 10) -SELECT fid, AsText(g) FROM gis_polygon ORDER by fid; -fid AsText(g) -108 POLYGON((10 10,20 10,20 20,10 20,10 10)) -109 POLYGON((0 0,50 0,50 50,0 50,0 0),(10 10,20 10,20 20,10 20,10 10)) -110 POLYGON((0 0,30 0,30 30,0 0)) -SELECT fid, AsText(g) FROM gis_multi_point ORDER by fid; -fid AsText(g) -111 MULTIPOINT(0 0,10 10,10 20,20 20) -112 MULTIPOINT(1 1,11 11,11 21,21 21) -113 MULTIPOINT(3 6,4 10) -SELECT fid, AsText(g) FROM gis_multi_line ORDER by fid; -fid AsText(g) -114 MULTILINESTRING((10 48,10 21,10 0),(16 0,16 23,16 48)) -115 MULTILINESTRING((10 48,10 21,10 0)) -116 MULTILINESTRING((1 2,3 5),(2 5,5 8,21 7)) -SELECT fid, AsText(g) FROM gis_multi_polygon ORDER by fid; -fid AsText(g) -117 MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18))) -118 MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18))) -119 MULTIPOLYGON(((0 3,3 3,3 0,0 3))) -SELECT fid, AsText(g) FROM gis_geometrycollection ORDER by fid; -fid AsText(g) -120 GEOMETRYCOLLECTION(POINT(0 0),LINESTRING(0 0,10 10)) -121 GEOMETRYCOLLECTION(POINT(44 6),LINESTRING(3 6,7 9)) -SELECT fid, AsText(g) FROM gis_geometry ORDER by fid; -fid AsText(g) -101 POINT(10 10) -102 POINT(20 10) -103 POINT(20 20) -104 POINT(10 20) -105 LINESTRING(0 0,0 10,10 0) -106 LINESTRING(10 10,20 10,20 20,10 20,10 10) -107 LINESTRING(10 10,40 10) -108 POLYGON((10 10,20 10,20 20,10 20,10 10)) -109 POLYGON((0 0,50 0,50 50,0 50,0 0),(10 10,20 10,20 20,10 20,10 10)) -110 POLYGON((0 0,30 0,30 30,0 0)) -111 MULTIPOINT(0 0,10 10,10 20,20 20) -112 MULTIPOINT(1 1,11 11,11 21,21 21) -113 MULTIPOINT(3 6,4 10) -114 MULTILINESTRING((10 48,10 21,10 0),(16 0,16 23,16 48)) -115 MULTILINESTRING((10 48,10 21,10 0)) -116 MULTILINESTRING((1 2,3 5),(2 5,5 8,21 7)) -117 MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18))) -118 MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18))) -119 MULTIPOLYGON(((0 3,3 3,3 0,0 3))) -120 GEOMETRYCOLLECTION(POINT(0 0),LINESTRING(0 0,10 10)) -121 GEOMETRYCOLLECTION(POINT(44 6),LINESTRING(3 6,7 9)) -SELECT fid, Dimension(g) FROM gis_geometry ORDER by fid; -fid Dimension(g) -101 0 -102 0 -103 0 -104 0 -105 1 -106 1 -107 1 -108 2 -109 2 -110 2 -111 0 -112 0 -113 0 -114 1 -115 1 -116 1 -117 2 -118 2 -119 2 -120 1 -121 1 -SELECT fid, GeometryType(g) FROM gis_geometry ORDER by fid; -fid GeometryType(g) -101 POINT -102 POINT -103 POINT -104 POINT -105 LINESTRING -106 LINESTRING -107 LINESTRING -108 POLYGON -109 POLYGON -110 POLYGON -111 MULTIPOINT -112 MULTIPOINT -113 MULTIPOINT -114 MULTILINESTRING -115 MULTILINESTRING -116 MULTILINESTRING -117 MULTIPOLYGON -118 MULTIPOLYGON -119 MULTIPOLYGON -120 GEOMETRYCOLLECTION -121 GEOMETRYCOLLECTION -SELECT fid, IsEmpty(g) FROM gis_geometry ORDER by fid; -fid IsEmpty(g) -101 0 -102 0 -103 0 -104 0 -105 0 -106 0 -107 0 -108 0 -109 0 -110 0 -111 0 -112 0 -113 0 -114 0 -115 0 -116 0 -117 0 -118 0 -119 0 -120 0 -121 0 -SELECT fid, AsText(Envelope(g)) FROM gis_geometry ORDER by fid; -fid AsText(Envelope(g)) -101 POLYGON((10 10,10 10,10 10,10 10,10 10)) -102 POLYGON((20 10,20 10,20 10,20 10,20 10)) -103 POLYGON((20 20,20 20,20 20,20 20,20 20)) -104 POLYGON((10 20,10 20,10 20,10 20,10 20)) -105 POLYGON((0 0,10 0,10 10,0 10,0 0)) -106 POLYGON((10 10,20 10,20 20,10 20,10 10)) -107 POLYGON((10 10,40 10,40 10,10 10,10 10)) -108 POLYGON((10 10,20 10,20 20,10 20,10 10)) -109 POLYGON((0 0,50 0,50 50,0 50,0 0)) -110 POLYGON((0 0,30 0,30 30,0 30,0 0)) -111 POLYGON((0 0,20 0,20 20,0 20,0 0)) -112 POLYGON((1 1,21 1,21 21,1 21,1 1)) -113 POLYGON((3 6,4 6,4 10,3 10,3 6)) -114 POLYGON((10 0,16 0,16 48,10 48,10 0)) -115 POLYGON((10 0,10 0,10 48,10 48,10 0)) -116 POLYGON((1 2,21 2,21 8,1 8,1 2)) -117 POLYGON((28 0,84 0,84 42,28 42,28 0)) -118 POLYGON((28 0,84 0,84 42,28 42,28 0)) -119 POLYGON((0 0,3 0,3 3,0 3,0 0)) -120 POLYGON((0 0,10 0,10 10,0 10,0 0)) -121 POLYGON((3 6,44 6,44 9,3 9,3 6)) -explain extended select Dimension(g), GeometryType(g), IsEmpty(g), AsText(Envelope(g)) from gis_geometry; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_geometry ALL NULL NULL NULL NULL 21 100.00 -Warnings: -Note 1003 select dimension(`test`.`gis_geometry`.`g`) AS `Dimension(g)`,geometrytype(`test`.`gis_geometry`.`g`) AS `GeometryType(g)`,isempty(`test`.`gis_geometry`.`g`) AS `IsEmpty(g)`,astext(envelope(`test`.`gis_geometry`.`g`)) AS `AsText(Envelope(g))` from `test`.`gis_geometry` -SELECT fid, X(g) FROM gis_point ORDER by fid; -fid X(g) -101 10 -102 20 -103 20 -104 10 -SELECT fid, Y(g) FROM gis_point ORDER by fid; -fid Y(g) -101 10 -102 10 -103 20 -104 20 -explain extended select X(g),Y(g) FROM gis_point; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_point ALL NULL NULL NULL NULL 4 100.00 -Warnings: -Note 1003 select x(`test`.`gis_point`.`g`) AS `X(g)`,y(`test`.`gis_point`.`g`) AS `Y(g)` from `test`.`gis_point` -SELECT fid, AsText(StartPoint(g)) FROM gis_line ORDER by fid; -fid AsText(StartPoint(g)) -105 POINT(0 0) -106 POINT(10 10) -107 POINT(10 10) -SELECT fid, AsText(EndPoint(g)) FROM gis_line ORDER by fid; -fid AsText(EndPoint(g)) -105 POINT(10 0) -106 POINT(10 10) -107 POINT(40 10) -SELECT fid, GLength(g) FROM gis_line ORDER by fid; -fid GLength(g) -105 24.14213562373095 -106 40 -107 30 -SELECT fid, NumPoints(g) FROM gis_line ORDER by fid; -fid NumPoints(g) -105 3 -106 5 -107 2 -SELECT fid, AsText(PointN(g, 2)) FROM gis_line ORDER by fid; -fid AsText(PointN(g, 2)) -105 POINT(0 10) -106 POINT(20 10) -107 POINT(40 10) -SELECT fid, IsClosed(g) FROM gis_line ORDER by fid; -fid IsClosed(g) -105 0 -106 1 -107 0 -explain extended select AsText(StartPoint(g)),AsText(EndPoint(g)),GLength(g),NumPoints(g),AsText(PointN(g, 2)),IsClosed(g) FROM gis_line; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_line ALL NULL NULL NULL NULL 3 100.00 -Warnings: -Note 1003 select astext(startpoint(`test`.`gis_line`.`g`)) AS `AsText(StartPoint(g))`,astext(endpoint(`test`.`gis_line`.`g`)) AS `AsText(EndPoint(g))`,glength(`test`.`gis_line`.`g`) AS `GLength(g)`,numpoints(`test`.`gis_line`.`g`) AS `NumPoints(g)`,astext(pointn(`test`.`gis_line`.`g`,2)) AS `AsText(PointN(g, 2))`,isclosed(`test`.`gis_line`.`g`) AS `IsClosed(g)` from `test`.`gis_line` -SELECT fid, AsText(Centroid(g)) FROM gis_polygon ORDER by fid; -fid AsText(Centroid(g)) -108 POINT(15 15) -109 POINT(25.416666666666668 25.416666666666668) -110 POINT(20 10) -SELECT fid, Area(g) FROM gis_polygon ORDER by fid; -fid Area(g) -108 100 -109 2400 -110 450 -SELECT fid, AsText(ExteriorRing(g)) FROM gis_polygon ORDER by fid; -fid AsText(ExteriorRing(g)) -108 LINESTRING(10 10,20 10,20 20,10 20,10 10) -109 LINESTRING(0 0,50 0,50 50,0 50,0 0) -110 LINESTRING(0 0,30 0,30 30,0 0) -SELECT fid, NumInteriorRings(g) FROM gis_polygon ORDER by fid; -fid NumInteriorRings(g) -108 0 -109 1 -110 0 -SELECT fid, AsText(InteriorRingN(g, 1)) FROM gis_polygon ORDER by fid; -fid AsText(InteriorRingN(g, 1)) -108 NULL -109 LINESTRING(10 10,20 10,20 20,10 20,10 10) -110 NULL -explain extended select AsText(Centroid(g)),Area(g),AsText(ExteriorRing(g)),NumInteriorRings(g),AsText(InteriorRingN(g, 1)) FROM gis_polygon; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_polygon ALL NULL NULL NULL NULL 3 100.00 -Warnings: -Note 1003 select astext(centroid(`test`.`gis_polygon`.`g`)) AS `AsText(Centroid(g))`,area(`test`.`gis_polygon`.`g`) AS `Area(g)`,astext(exteriorring(`test`.`gis_polygon`.`g`)) AS `AsText(ExteriorRing(g))`,numinteriorrings(`test`.`gis_polygon`.`g`) AS `NumInteriorRings(g)`,astext(interiorringn(`test`.`gis_polygon`.`g`,1)) AS `AsText(InteriorRingN(g, 1))` from `test`.`gis_polygon` -SELECT fid, IsClosed(g) FROM gis_multi_line ORDER by fid; -fid IsClosed(g) -114 0 -115 0 -116 0 -SELECT fid, AsText(Centroid(g)) FROM gis_multi_polygon ORDER by fid; -fid AsText(Centroid(g)) -117 POINT(55.58852775304245 17.426536064113982) -118 POINT(55.58852775304245 17.426536064113982) -119 POINT(2 2) -SELECT fid, Area(g) FROM gis_multi_polygon ORDER by fid; -fid Area(g) -117 1684.5 -118 1684.5 -119 4.5 -SELECT fid, NumGeometries(g) from gis_multi_point ORDER by fid; -fid NumGeometries(g) -111 4 -112 4 -113 2 -SELECT fid, NumGeometries(g) from gis_multi_line ORDER by fid; -fid NumGeometries(g) -114 2 -115 1 -116 2 -SELECT fid, NumGeometries(g) from gis_multi_polygon ORDER by fid; -fid NumGeometries(g) -117 2 -118 2 -119 1 -SELECT fid, NumGeometries(g) from gis_geometrycollection ORDER by fid; -fid NumGeometries(g) -120 2 -121 2 -explain extended SELECT fid, NumGeometries(g) from gis_multi_point; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_multi_point ALL NULL NULL NULL NULL 3 100.00 -Warnings: -Note 1003 select `test`.`gis_multi_point`.`fid` AS `fid`,numgeometries(`test`.`gis_multi_point`.`g`) AS `NumGeometries(g)` from `test`.`gis_multi_point` -SELECT fid, AsText(GeometryN(g, 2)) from gis_multi_point ORDER by fid; -fid AsText(GeometryN(g, 2)) -111 POINT(10 10) -112 POINT(11 11) -113 POINT(4 10) -SELECT fid, AsText(GeometryN(g, 2)) from gis_multi_line ORDER by fid; -fid AsText(GeometryN(g, 2)) -114 LINESTRING(16 0,16 23,16 48) -115 NULL -116 LINESTRING(2 5,5 8,21 7) -SELECT fid, AsText(GeometryN(g, 2)) from gis_multi_polygon ORDER by fid; -fid AsText(GeometryN(g, 2)) -117 POLYGON((59 18,67 18,67 13,59 13,59 18)) -118 POLYGON((59 18,67 18,67 13,59 13,59 18)) -119 NULL -SELECT fid, AsText(GeometryN(g, 2)) from gis_geometrycollection ORDER by fid; -fid AsText(GeometryN(g, 2)) -120 LINESTRING(0 0,10 10) -121 LINESTRING(3 6,7 9) -SELECT fid, AsText(GeometryN(g, 1)) from gis_geometrycollection ORDER by fid; -fid AsText(GeometryN(g, 1)) -120 POINT(0 0) -121 POINT(44 6) -explain extended SELECT fid, AsText(GeometryN(g, 2)) from gis_multi_point; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_multi_point ALL NULL NULL NULL NULL 3 100.00 -Warnings: -Note 1003 select `test`.`gis_multi_point`.`fid` AS `fid`,astext(geometryn(`test`.`gis_multi_point`.`g`,2)) AS `AsText(GeometryN(g, 2))` from `test`.`gis_multi_point` -SELECT g1.fid as first, g2.fid as second, -Within(g1.g, g2.g) as w, Contains(g1.g, g2.g) as c, Overlaps(g1.g, g2.g) as o, -Equals(g1.g, g2.g) as e, Disjoint(g1.g, g2.g) as d, Touches(g1.g, g2.g) as t, -Intersects(g1.g, g2.g) as i, Crosses(g1.g, g2.g) as r -FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second; -first second w c o e d t i r -120 120 1 1 0 1 0 0 1 0 -120 121 0 0 1 0 0 0 1 0 -121 120 0 0 1 0 0 0 1 0 -121 121 1 1 0 1 0 0 1 0 -explain extended SELECT g1.fid as first, g2.fid as second, -Within(g1.g, g2.g) as w, Contains(g1.g, g2.g) as c, Overlaps(g1.g, g2.g) as o, -Equals(g1.g, g2.g) as e, Disjoint(g1.g, g2.g) as d, Touches(g1.g, g2.g) as t, -Intersects(g1.g, g2.g) as i, Crosses(g1.g, g2.g) as r -FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE g1 ALL NULL NULL NULL NULL 2 100.00 Using temporary; Using filesort -1 SIMPLE g2 ALL NULL NULL NULL NULL 2 100.00 Using join buffer -Warnings: -Note 1003 select `test`.`g1`.`fid` AS `first`,`test`.`g2`.`fid` AS `second`,within(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `w`,contains(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `c`,overlaps(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `o`,equals(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `e`,disjoint(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `d`,touches(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `t`,intersects(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `i`,crosses(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `r` from `test`.`gis_geometrycollection` `g1` join `test`.`gis_geometrycollection` `g2` order by `test`.`g1`.`fid`,`test`.`g2`.`fid` -DROP TABLE gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry; -CREATE TABLE t1 ( -a INTEGER PRIMARY KEY AUTO_INCREMENT, -gp point, -ln linestring, -pg polygon, -mp multipoint, -mln multilinestring, -mpg multipolygon, -gc geometrycollection, -gm geometry -); -SHOW FIELDS FROM t1; -Field Type Null Key Default Extra -a int(11) NO PRI NULL auto_increment -gp point YES NULL -ln linestring YES NULL -pg polygon YES NULL -mp multipoint YES NULL -mln multilinestring YES NULL -mpg multipolygon YES NULL -gc geometrycollection YES NULL -gm geometry YES NULL -ALTER TABLE t1 ADD fid INT; -SHOW FIELDS FROM t1; -Field Type Null Key Default Extra -a int(11) NO PRI NULL auto_increment -gp point YES NULL -ln linestring YES NULL -pg polygon YES NULL -mp multipoint YES NULL -mln multilinestring YES NULL -mpg multipolygon YES NULL -gc geometrycollection YES NULL -gm geometry YES NULL -fid int(11) YES NULL -DROP TABLE t1; -create table t1 (pk integer primary key auto_increment, a geometry not null); -insert into t1 (a) values (GeomFromText('Point(1 2)')); -insert into t1 (a) values ('Garbage'); -ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field -insert IGNORE into t1 (a) values ('Garbage'); -ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field -drop table t1; -create table t1 (pk integer primary key auto_increment, fl geometry not null); -insert into t1 (fl) values (1); -ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field -insert into t1 (fl) values (1.11); -ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field -insert into t1 (fl) values ("qwerty"); -ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field -insert into t1 (fl) values (pointfromtext('point(1,1)')); -ERROR 23000: Column 'fl' cannot be null -drop table t1; -End of 4.1 tests -CREATE TABLE t1 (name VARCHAR(100), square GEOMETRY); -Warnings: -Warning 1478 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' -INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); -INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); -INSERT INTO t1 VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); -INSERT INTO t1 VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))')); -INSERT INTO t1 VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))')); -INSERT INTO t1 VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))')); -INSERT INTO t1 VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))')); -INSERT INTO t1 VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))')); -INSERT INTO t1 VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))')); -INSERT INTO t1 VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))')); -INSERT INTO t1 VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))')); -INSERT INTO t1 VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))')); -INSERT INTO t1 VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))')); -INSERT INTO t1 VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))')); -INSERT INTO t1 VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))')); -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrcontains FROM t1 a1 JOIN t1 a2 ON MBRContains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -mbrcontains -center,small -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrdisjoint FROM t1 a1 JOIN t1 a2 ON MBRDisjoint( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -mbrdisjoint -down3,left3,right3,up3 -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrequal FROM t1 a1 JOIN t1 a2 ON MBREqual( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -mbrequal -center -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrintersect FROM t1 a1 JOIN t1 a2 ON MBRIntersects( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -mbrintersect -big,center,down,down2,left,left2,right,right2,small,up,up2 -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbroverlaps FROM t1 a1 JOIN t1 a2 ON MBROverlaps( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -mbroverlaps -down,left,right,up -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrtouches FROM t1 a1 JOIN t1 a2 ON MBRTouches( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -mbrtouches -down2,left2,right2,up2 -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrwithin FROM t1 a1 JOIN t1 a2 ON MBRWithin( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -mbrwithin -big,center -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS contains FROM t1 a1 JOIN t1 a2 ON Contains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -contains -center,small -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS disjoint FROM t1 a1 JOIN t1 a2 ON Disjoint( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -disjoint -down3,left3,right3,up3 -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS equals FROM t1 a1 JOIN t1 a2 ON Equals( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -equals -center -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS intersect FROM t1 a1 JOIN t1 a2 ON Intersects( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -intersect -big,center,down,down2,left,left2,right,right2,small,up,up2 -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS overlaps FROM t1 a1 JOIN t1 a2 ON Overlaps( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -overlaps -down,left,right,up -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS touches FROM t1 a1 JOIN t1 a2 ON Touches( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -touches -down2,left2,right2,up2 -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS within FROM t1 a1 JOIN t1 a2 ON Within( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -within -big,center -SET @vert1 = GeomFromText('POLYGON ((0 -2, 0 2, 0 -2))'); -SET @horiz1 = GeomFromText('POLYGON ((-2 0, 2 0, -2 0))'); -SET @horiz2 = GeomFromText('POLYGON ((-1 0, 3 0, -1 0))'); -SET @horiz3 = GeomFromText('POLYGON ((2 0, 3 0, 2 0))'); -SET @point1 = GeomFromText('POLYGON ((0 0))'); -SET @point2 = GeomFromText('POLYGON ((-2 0))'); -SELECT GROUP_CONCAT(a1.name ORDER BY a1.name) AS overlaps FROM t1 a1 WHERE Overlaps(a1.square, @vert1) GROUP BY a1.name; -overlaps -SELECT GROUP_CONCAT(a1.name ORDER BY a1.name) AS overlaps FROM t1 a1 WHERE Overlaps(a1.square, @horiz1) GROUP BY a1.name; -overlaps -SELECT Overlaps(@horiz1, @vert1) FROM DUAL; -Overlaps(@horiz1, @vert1) -0 -SELECT Overlaps(@horiz1, @horiz2) FROM DUAL; -Overlaps(@horiz1, @horiz2) -1 -SELECT Overlaps(@horiz1, @horiz3) FROM DUAL; -Overlaps(@horiz1, @horiz3) -0 -SELECT Overlaps(@horiz1, @point1) FROM DUAL; -Overlaps(@horiz1, @point1) -0 -SELECT Overlaps(@horiz1, @point2) FROM DUAL; -Overlaps(@horiz1, @point2) -0 -DROP TABLE t1; -End of 5.0 tests -set optimizer_switch = "engine_condition_pushdown=on"; -DROP TABLE IF EXISTS t1, gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry; -CREATE TABLE gis_point (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g POINT); -CREATE TABLE gis_line (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g LINESTRING); -CREATE TABLE gis_polygon (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g POLYGON); -CREATE TABLE gis_multi_point (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g MULTIPOINT); -CREATE TABLE gis_multi_line (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g MULTILINESTRING); -CREATE TABLE gis_multi_polygon (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g MULTIPOLYGON); -CREATE TABLE gis_geometrycollection (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g GEOMETRYCOLLECTION); -CREATE TABLE gis_geometry (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g GEOMETRY); -SHOW CREATE TABLE gis_point; -Table Create Table -gis_point CREATE TABLE `gis_point` ( - `fid` int(11) NOT NULL AUTO_INCREMENT, - `g` point DEFAULT NULL, - PRIMARY KEY (`fid`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -SHOW FIELDS FROM gis_point; -Field Type Null Key Default Extra -fid int(11) NO PRI NULL auto_increment -g point YES NULL -SHOW FIELDS FROM gis_line; -Field Type Null Key Default Extra -fid int(11) NO PRI NULL auto_increment -g linestring YES NULL -SHOW FIELDS FROM gis_polygon; -Field Type Null Key Default Extra -fid int(11) NO PRI NULL auto_increment -g polygon YES NULL -SHOW FIELDS FROM gis_multi_point; -Field Type Null Key Default Extra -fid int(11) NO PRI NULL auto_increment -g multipoint YES NULL -SHOW FIELDS FROM gis_multi_line; -Field Type Null Key Default Extra -fid int(11) NO PRI NULL auto_increment -g multilinestring YES NULL -SHOW FIELDS FROM gis_multi_polygon; -Field Type Null Key Default Extra -fid int(11) NO PRI NULL auto_increment -g multipolygon YES NULL -SHOW FIELDS FROM gis_geometrycollection; -Field Type Null Key Default Extra -fid int(11) NO PRI NULL auto_increment -g geometrycollection YES NULL -SHOW FIELDS FROM gis_geometry; -Field Type Null Key Default Extra -fid int(11) NO PRI NULL auto_increment -g geometry YES NULL -INSERT INTO gis_point VALUES -(101, PointFromText('POINT(10 10)')), -(102, PointFromText('POINT(20 10)')), -(103, PointFromText('POINT(20 20)')), -(104, PointFromWKB(AsWKB(PointFromText('POINT(10 20)')))); -INSERT INTO gis_line VALUES -(105, LineFromText('LINESTRING(0 0,0 10,10 0)')), -(106, LineStringFromText('LINESTRING(10 10,20 10,20 20,10 20,10 10)')), -(107, LineStringFromWKB(LineString(Point(10, 10), Point(40, 10)))); -INSERT INTO gis_polygon VALUES -(108, PolygonFromText('POLYGON((10 10,20 10,20 20,10 20,10 10))')), -(109, PolyFromText('POLYGON((0 0,50 0,50 50,0 50,0 0), (10 10,20 10,20 20,10 20,10 10))')), -(110, PolyFromWKB(Polygon(LineString(Point(0, 0), Point(30, 0), Point(30, 30), Point(0, 0))))); -INSERT INTO gis_multi_point VALUES -(111, MultiPointFromText('MULTIPOINT(0 0,10 10,10 20,20 20)')), -(112, MPointFromText('MULTIPOINT(1 1,11 11,11 21,21 21)')), -(113, MPointFromWKB(MultiPoint(Point(3, 6), Point(4, 10)))); -INSERT INTO gis_multi_line VALUES -(114, MultiLineStringFromText('MULTILINESTRING((10 48,10 21,10 0),(16 0,16 23,16 48))')), -(115, MLineFromText('MULTILINESTRING((10 48,10 21,10 0))')), -(116, MLineFromWKB(MultiLineString(LineString(Point(1, 2), Point(3, 5)), LineString(Point(2, 5), Point(5, 8), Point(21, 7))))); -INSERT INTO gis_multi_polygon VALUES -(117, MultiPolygonFromText('MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))')), -(118, MPolyFromText('MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))')), -(119, MPolyFromWKB(MultiPolygon(Polygon(LineString(Point(0, 3), Point(3, 3), Point(3, 0), Point(0, 3)))))); -INSERT INTO gis_geometrycollection VALUES -(120, GeomCollFromText('GEOMETRYCOLLECTION(POINT(0 0), LINESTRING(0 0,10 10))')), -(121, GeometryFromWKB(GeometryCollection(Point(44, 6), LineString(Point(3, 6), Point(7, 9))))); -INSERT into gis_geometry SELECT * FROM gis_point; -INSERT into gis_geometry SELECT * FROM gis_line; -INSERT into gis_geometry SELECT * FROM gis_polygon; -INSERT into gis_geometry SELECT * FROM gis_multi_point; -INSERT into gis_geometry SELECT * FROM gis_multi_line; -INSERT into gis_geometry SELECT * FROM gis_multi_polygon; -INSERT into gis_geometry SELECT * FROM gis_geometrycollection; -SELECT fid, AsText(g) FROM gis_point ORDER by fid; -fid AsText(g) -101 POINT(10 10) -102 POINT(20 10) -103 POINT(20 20) -104 POINT(10 20) -SELECT fid, AsText(g) FROM gis_line ORDER by fid; -fid AsText(g) -105 LINESTRING(0 0,0 10,10 0) -106 LINESTRING(10 10,20 10,20 20,10 20,10 10) -107 LINESTRING(10 10,40 10) -SELECT fid, AsText(g) FROM gis_polygon ORDER by fid; -fid AsText(g) -108 POLYGON((10 10,20 10,20 20,10 20,10 10)) -109 POLYGON((0 0,50 0,50 50,0 50,0 0),(10 10,20 10,20 20,10 20,10 10)) -110 POLYGON((0 0,30 0,30 30,0 0)) -SELECT fid, AsText(g) FROM gis_multi_point ORDER by fid; -fid AsText(g) -111 MULTIPOINT(0 0,10 10,10 20,20 20) -112 MULTIPOINT(1 1,11 11,11 21,21 21) -113 MULTIPOINT(3 6,4 10) -SELECT fid, AsText(g) FROM gis_multi_line ORDER by fid; -fid AsText(g) -114 MULTILINESTRING((10 48,10 21,10 0),(16 0,16 23,16 48)) -115 MULTILINESTRING((10 48,10 21,10 0)) -116 MULTILINESTRING((1 2,3 5),(2 5,5 8,21 7)) -SELECT fid, AsText(g) FROM gis_multi_polygon ORDER by fid; -fid AsText(g) -117 MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18))) -118 MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18))) -119 MULTIPOLYGON(((0 3,3 3,3 0,0 3))) -SELECT fid, AsText(g) FROM gis_geometrycollection ORDER by fid; -fid AsText(g) -120 GEOMETRYCOLLECTION(POINT(0 0),LINESTRING(0 0,10 10)) -121 GEOMETRYCOLLECTION(POINT(44 6),LINESTRING(3 6,7 9)) -SELECT fid, AsText(g) FROM gis_geometry ORDER by fid; -fid AsText(g) -101 POINT(10 10) -102 POINT(20 10) -103 POINT(20 20) -104 POINT(10 20) -105 LINESTRING(0 0,0 10,10 0) -106 LINESTRING(10 10,20 10,20 20,10 20,10 10) -107 LINESTRING(10 10,40 10) -108 POLYGON((10 10,20 10,20 20,10 20,10 10)) -109 POLYGON((0 0,50 0,50 50,0 50,0 0),(10 10,20 10,20 20,10 20,10 10)) -110 POLYGON((0 0,30 0,30 30,0 0)) -111 MULTIPOINT(0 0,10 10,10 20,20 20) -112 MULTIPOINT(1 1,11 11,11 21,21 21) -113 MULTIPOINT(3 6,4 10) -114 MULTILINESTRING((10 48,10 21,10 0),(16 0,16 23,16 48)) -115 MULTILINESTRING((10 48,10 21,10 0)) -116 MULTILINESTRING((1 2,3 5),(2 5,5 8,21 7)) -117 MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18))) -118 MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18))) -119 MULTIPOLYGON(((0 3,3 3,3 0,0 3))) -120 GEOMETRYCOLLECTION(POINT(0 0),LINESTRING(0 0,10 10)) -121 GEOMETRYCOLLECTION(POINT(44 6),LINESTRING(3 6,7 9)) -SELECT fid, Dimension(g) FROM gis_geometry ORDER by fid; -fid Dimension(g) -101 0 -102 0 -103 0 -104 0 -105 1 -106 1 -107 1 -108 2 -109 2 -110 2 -111 0 -112 0 -113 0 -114 1 -115 1 -116 1 -117 2 -118 2 -119 2 -120 1 -121 1 -SELECT fid, GeometryType(g) FROM gis_geometry ORDER by fid; -fid GeometryType(g) -101 POINT -102 POINT -103 POINT -104 POINT -105 LINESTRING -106 LINESTRING -107 LINESTRING -108 POLYGON -109 POLYGON -110 POLYGON -111 MULTIPOINT -112 MULTIPOINT -113 MULTIPOINT -114 MULTILINESTRING -115 MULTILINESTRING -116 MULTILINESTRING -117 MULTIPOLYGON -118 MULTIPOLYGON -119 MULTIPOLYGON -120 GEOMETRYCOLLECTION -121 GEOMETRYCOLLECTION -SELECT fid, IsEmpty(g) FROM gis_geometry ORDER by fid; -fid IsEmpty(g) -101 0 -102 0 -103 0 -104 0 -105 0 -106 0 -107 0 -108 0 -109 0 -110 0 -111 0 -112 0 -113 0 -114 0 -115 0 -116 0 -117 0 -118 0 -119 0 -120 0 -121 0 -SELECT fid, AsText(Envelope(g)) FROM gis_geometry ORDER by fid; -fid AsText(Envelope(g)) -101 POLYGON((10 10,10 10,10 10,10 10,10 10)) -102 POLYGON((20 10,20 10,20 10,20 10,20 10)) -103 POLYGON((20 20,20 20,20 20,20 20,20 20)) -104 POLYGON((10 20,10 20,10 20,10 20,10 20)) -105 POLYGON((0 0,10 0,10 10,0 10,0 0)) -106 POLYGON((10 10,20 10,20 20,10 20,10 10)) -107 POLYGON((10 10,40 10,40 10,10 10,10 10)) -108 POLYGON((10 10,20 10,20 20,10 20,10 10)) -109 POLYGON((0 0,50 0,50 50,0 50,0 0)) -110 POLYGON((0 0,30 0,30 30,0 30,0 0)) -111 POLYGON((0 0,20 0,20 20,0 20,0 0)) -112 POLYGON((1 1,21 1,21 21,1 21,1 1)) -113 POLYGON((3 6,4 6,4 10,3 10,3 6)) -114 POLYGON((10 0,16 0,16 48,10 48,10 0)) -115 POLYGON((10 0,10 0,10 48,10 48,10 0)) -116 POLYGON((1 2,21 2,21 8,1 8,1 2)) -117 POLYGON((28 0,84 0,84 42,28 42,28 0)) -118 POLYGON((28 0,84 0,84 42,28 42,28 0)) -119 POLYGON((0 0,3 0,3 3,0 3,0 0)) -120 POLYGON((0 0,10 0,10 10,0 10,0 0)) -121 POLYGON((3 6,44 6,44 9,3 9,3 6)) -explain extended select Dimension(g), GeometryType(g), IsEmpty(g), AsText(Envelope(g)) from gis_geometry; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_geometry ALL NULL NULL NULL NULL 21 100.00 -Warnings: -Note 1003 select dimension(`test`.`gis_geometry`.`g`) AS `Dimension(g)`,geometrytype(`test`.`gis_geometry`.`g`) AS `GeometryType(g)`,isempty(`test`.`gis_geometry`.`g`) AS `IsEmpty(g)`,astext(envelope(`test`.`gis_geometry`.`g`)) AS `AsText(Envelope(g))` from `test`.`gis_geometry` -SELECT fid, X(g) FROM gis_point ORDER by fid; -fid X(g) -101 10 -102 20 -103 20 -104 10 -SELECT fid, Y(g) FROM gis_point ORDER by fid; -fid Y(g) -101 10 -102 10 -103 20 -104 20 -explain extended select X(g),Y(g) FROM gis_point; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_point ALL NULL NULL NULL NULL 4 100.00 -Warnings: -Note 1003 select x(`test`.`gis_point`.`g`) AS `X(g)`,y(`test`.`gis_point`.`g`) AS `Y(g)` from `test`.`gis_point` -SELECT fid, AsText(StartPoint(g)) FROM gis_line ORDER by fid; -fid AsText(StartPoint(g)) -105 POINT(0 0) -106 POINT(10 10) -107 POINT(10 10) -SELECT fid, AsText(EndPoint(g)) FROM gis_line ORDER by fid; -fid AsText(EndPoint(g)) -105 POINT(10 0) -106 POINT(10 10) -107 POINT(40 10) -SELECT fid, GLength(g) FROM gis_line ORDER by fid; -fid GLength(g) -105 24.14213562373095 -106 40 -107 30 -SELECT fid, NumPoints(g) FROM gis_line ORDER by fid; -fid NumPoints(g) -105 3 -106 5 -107 2 -SELECT fid, AsText(PointN(g, 2)) FROM gis_line ORDER by fid; -fid AsText(PointN(g, 2)) -105 POINT(0 10) -106 POINT(20 10) -107 POINT(40 10) -SELECT fid, IsClosed(g) FROM gis_line ORDER by fid; -fid IsClosed(g) -105 0 -106 1 -107 0 -explain extended select AsText(StartPoint(g)),AsText(EndPoint(g)),GLength(g),NumPoints(g),AsText(PointN(g, 2)),IsClosed(g) FROM gis_line; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_line ALL NULL NULL NULL NULL 3 100.00 -Warnings: -Note 1003 select astext(startpoint(`test`.`gis_line`.`g`)) AS `AsText(StartPoint(g))`,astext(endpoint(`test`.`gis_line`.`g`)) AS `AsText(EndPoint(g))`,glength(`test`.`gis_line`.`g`) AS `GLength(g)`,numpoints(`test`.`gis_line`.`g`) AS `NumPoints(g)`,astext(pointn(`test`.`gis_line`.`g`,2)) AS `AsText(PointN(g, 2))`,isclosed(`test`.`gis_line`.`g`) AS `IsClosed(g)` from `test`.`gis_line` -SELECT fid, AsText(Centroid(g)) FROM gis_polygon ORDER by fid; -fid AsText(Centroid(g)) -108 POINT(15 15) -109 POINT(25.416666666666668 25.416666666666668) -110 POINT(20 10) -SELECT fid, Area(g) FROM gis_polygon ORDER by fid; -fid Area(g) -108 100 -109 2400 -110 450 -SELECT fid, AsText(ExteriorRing(g)) FROM gis_polygon ORDER by fid; -fid AsText(ExteriorRing(g)) -108 LINESTRING(10 10,20 10,20 20,10 20,10 10) -109 LINESTRING(0 0,50 0,50 50,0 50,0 0) -110 LINESTRING(0 0,30 0,30 30,0 0) -SELECT fid, NumInteriorRings(g) FROM gis_polygon ORDER by fid; -fid NumInteriorRings(g) -108 0 -109 1 -110 0 -SELECT fid, AsText(InteriorRingN(g, 1)) FROM gis_polygon ORDER by fid; -fid AsText(InteriorRingN(g, 1)) -108 NULL -109 LINESTRING(10 10,20 10,20 20,10 20,10 10) -110 NULL -explain extended select AsText(Centroid(g)),Area(g),AsText(ExteriorRing(g)),NumInteriorRings(g),AsText(InteriorRingN(g, 1)) FROM gis_polygon; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_polygon ALL NULL NULL NULL NULL 3 100.00 -Warnings: -Note 1003 select astext(centroid(`test`.`gis_polygon`.`g`)) AS `AsText(Centroid(g))`,area(`test`.`gis_polygon`.`g`) AS `Area(g)`,astext(exteriorring(`test`.`gis_polygon`.`g`)) AS `AsText(ExteriorRing(g))`,numinteriorrings(`test`.`gis_polygon`.`g`) AS `NumInteriorRings(g)`,astext(interiorringn(`test`.`gis_polygon`.`g`,1)) AS `AsText(InteriorRingN(g, 1))` from `test`.`gis_polygon` -SELECT fid, IsClosed(g) FROM gis_multi_line ORDER by fid; -fid IsClosed(g) -114 0 -115 0 -116 0 -SELECT fid, AsText(Centroid(g)) FROM gis_multi_polygon ORDER by fid; -fid AsText(Centroid(g)) -117 POINT(55.58852775304245 17.426536064113982) -118 POINT(55.58852775304245 17.426536064113982) -119 POINT(2 2) -SELECT fid, Area(g) FROM gis_multi_polygon ORDER by fid; -fid Area(g) -117 1684.5 -118 1684.5 -119 4.5 -SELECT fid, NumGeometries(g) from gis_multi_point ORDER by fid; -fid NumGeometries(g) -111 4 -112 4 -113 2 -SELECT fid, NumGeometries(g) from gis_multi_line ORDER by fid; -fid NumGeometries(g) -114 2 -115 1 -116 2 -SELECT fid, NumGeometries(g) from gis_multi_polygon ORDER by fid; -fid NumGeometries(g) -117 2 -118 2 -119 1 -SELECT fid, NumGeometries(g) from gis_geometrycollection ORDER by fid; -fid NumGeometries(g) -120 2 -121 2 -explain extended SELECT fid, NumGeometries(g) from gis_multi_point; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_multi_point ALL NULL NULL NULL NULL 3 100.00 -Warnings: -Note 1003 select `test`.`gis_multi_point`.`fid` AS `fid`,numgeometries(`test`.`gis_multi_point`.`g`) AS `NumGeometries(g)` from `test`.`gis_multi_point` -SELECT fid, AsText(GeometryN(g, 2)) from gis_multi_point ORDER by fid; -fid AsText(GeometryN(g, 2)) -111 POINT(10 10) -112 POINT(11 11) -113 POINT(4 10) -SELECT fid, AsText(GeometryN(g, 2)) from gis_multi_line ORDER by fid; -fid AsText(GeometryN(g, 2)) -114 LINESTRING(16 0,16 23,16 48) -115 NULL -116 LINESTRING(2 5,5 8,21 7) -SELECT fid, AsText(GeometryN(g, 2)) from gis_multi_polygon ORDER by fid; -fid AsText(GeometryN(g, 2)) -117 POLYGON((59 18,67 18,67 13,59 13,59 18)) -118 POLYGON((59 18,67 18,67 13,59 13,59 18)) -119 NULL -SELECT fid, AsText(GeometryN(g, 2)) from gis_geometrycollection ORDER by fid; -fid AsText(GeometryN(g, 2)) -120 LINESTRING(0 0,10 10) -121 LINESTRING(3 6,7 9) -SELECT fid, AsText(GeometryN(g, 1)) from gis_geometrycollection ORDER by fid; -fid AsText(GeometryN(g, 1)) -120 POINT(0 0) -121 POINT(44 6) -explain extended SELECT fid, AsText(GeometryN(g, 2)) from gis_multi_point; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_multi_point ALL NULL NULL NULL NULL 3 100.00 -Warnings: -Note 1003 select `test`.`gis_multi_point`.`fid` AS `fid`,astext(geometryn(`test`.`gis_multi_point`.`g`,2)) AS `AsText(GeometryN(g, 2))` from `test`.`gis_multi_point` -SELECT g1.fid as first, g2.fid as second, -Within(g1.g, g2.g) as w, Contains(g1.g, g2.g) as c, Overlaps(g1.g, g2.g) as o, -Equals(g1.g, g2.g) as e, Disjoint(g1.g, g2.g) as d, Touches(g1.g, g2.g) as t, -Intersects(g1.g, g2.g) as i, Crosses(g1.g, g2.g) as r -FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second; -first second w c o e d t i r -120 120 1 1 0 1 0 0 1 0 -120 121 0 0 1 0 0 0 1 0 -121 120 0 0 1 0 0 0 1 0 -121 121 1 1 0 1 0 0 1 0 -explain extended SELECT g1.fid as first, g2.fid as second, -Within(g1.g, g2.g) as w, Contains(g1.g, g2.g) as c, Overlaps(g1.g, g2.g) as o, -Equals(g1.g, g2.g) as e, Disjoint(g1.g, g2.g) as d, Touches(g1.g, g2.g) as t, -Intersects(g1.g, g2.g) as i, Crosses(g1.g, g2.g) as r -FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE g1 ALL NULL NULL NULL NULL 2 100.00 Using temporary; Using filesort -1 SIMPLE g2 ALL NULL NULL NULL NULL 2 100.00 Using join buffer -Warnings: -Note 1003 select `test`.`g1`.`fid` AS `first`,`test`.`g2`.`fid` AS `second`,within(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `w`,contains(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `c`,overlaps(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `o`,equals(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `e`,disjoint(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `d`,touches(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `t`,intersects(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `i`,crosses(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `r` from `test`.`gis_geometrycollection` `g1` join `test`.`gis_geometrycollection` `g2` order by `test`.`g1`.`fid`,`test`.`g2`.`fid` -DROP TABLE gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry; -CREATE TABLE t1 ( -a INTEGER PRIMARY KEY AUTO_INCREMENT, -gp point, -ln linestring, -pg polygon, -mp multipoint, -mln multilinestring, -mpg multipolygon, -gc geometrycollection, -gm geometry -); -SHOW FIELDS FROM t1; -Field Type Null Key Default Extra -a int(11) NO PRI NULL auto_increment -gp point YES NULL -ln linestring YES NULL -pg polygon YES NULL -mp multipoint YES NULL -mln multilinestring YES NULL -mpg multipolygon YES NULL -gc geometrycollection YES NULL -gm geometry YES NULL -ALTER TABLE t1 ADD fid INT; -SHOW FIELDS FROM t1; -Field Type Null Key Default Extra -a int(11) NO PRI NULL auto_increment -gp point YES NULL -ln linestring YES NULL -pg polygon YES NULL -mp multipoint YES NULL -mln multilinestring YES NULL -mpg multipolygon YES NULL -gc geometrycollection YES NULL -gm geometry YES NULL -fid int(11) YES NULL -DROP TABLE t1; -create table t1 (pk integer primary key auto_increment, a geometry not null); -insert into t1 (a) values (GeomFromText('Point(1 2)')); -insert into t1 (a) values ('Garbage'); -ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field -insert IGNORE into t1 (a) values ('Garbage'); -ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field -drop table t1; -create table t1 (pk integer primary key auto_increment, fl geometry not null); -insert into t1 (fl) values (1); -ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field -insert into t1 (fl) values (1.11); -ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field -insert into t1 (fl) values ("qwerty"); -ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field -insert into t1 (fl) values (pointfromtext('point(1,1)')); -ERROR 23000: Column 'fl' cannot be null -drop table t1; -End of 4.1 tests -CREATE TABLE t1 (name VARCHAR(100), square GEOMETRY); -Warnings: -Warning 1478 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' -INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); -INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); -INSERT INTO t1 VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); -INSERT INTO t1 VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))')); -INSERT INTO t1 VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))')); -INSERT INTO t1 VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))')); -INSERT INTO t1 VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))')); -INSERT INTO t1 VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))')); -INSERT INTO t1 VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))')); -INSERT INTO t1 VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))')); -INSERT INTO t1 VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))')); -INSERT INTO t1 VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))')); -INSERT INTO t1 VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))')); -INSERT INTO t1 VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))')); -INSERT INTO t1 VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))')); -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrcontains FROM t1 a1 JOIN t1 a2 ON MBRContains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -mbrcontains -center,small -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrdisjoint FROM t1 a1 JOIN t1 a2 ON MBRDisjoint( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -mbrdisjoint -down3,left3,right3,up3 -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrequal FROM t1 a1 JOIN t1 a2 ON MBREqual( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -mbrequal -center -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrintersect FROM t1 a1 JOIN t1 a2 ON MBRIntersects( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -mbrintersect -big,center,down,down2,left,left2,right,right2,small,up,up2 -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbroverlaps FROM t1 a1 JOIN t1 a2 ON MBROverlaps( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -mbroverlaps -down,left,right,up -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrtouches FROM t1 a1 JOIN t1 a2 ON MBRTouches( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -mbrtouches -down2,left2,right2,up2 -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrwithin FROM t1 a1 JOIN t1 a2 ON MBRWithin( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -mbrwithin -big,center -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS contains FROM t1 a1 JOIN t1 a2 ON Contains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -contains -center,small -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS disjoint FROM t1 a1 JOIN t1 a2 ON Disjoint( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -disjoint -down3,left3,right3,up3 -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS equals FROM t1 a1 JOIN t1 a2 ON Equals( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -equals -center -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS intersect FROM t1 a1 JOIN t1 a2 ON Intersects( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -intersect -big,center,down,down2,left,left2,right,right2,small,up,up2 -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS overlaps FROM t1 a1 JOIN t1 a2 ON Overlaps( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -overlaps -down,left,right,up -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS touches FROM t1 a1 JOIN t1 a2 ON Touches( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -touches -down2,left2,right2,up2 -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS within FROM t1 a1 JOIN t1 a2 ON Within( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -within -big,center -SET @vert1 = GeomFromText('POLYGON ((0 -2, 0 2, 0 -2))'); -SET @horiz1 = GeomFromText('POLYGON ((-2 0, 2 0, -2 0))'); -SET @horiz2 = GeomFromText('POLYGON ((-1 0, 3 0, -1 0))'); -SET @horiz3 = GeomFromText('POLYGON ((2 0, 3 0, 2 0))'); -SET @point1 = GeomFromText('POLYGON ((0 0))'); -SET @point2 = GeomFromText('POLYGON ((-2 0))'); -SELECT GROUP_CONCAT(a1.name ORDER BY a1.name) AS overlaps FROM t1 a1 WHERE Overlaps(a1.square, @vert1) GROUP BY a1.name; -overlaps -SELECT GROUP_CONCAT(a1.name ORDER BY a1.name) AS overlaps FROM t1 a1 WHERE Overlaps(a1.square, @horiz1) GROUP BY a1.name; -overlaps -SELECT Overlaps(@horiz1, @vert1) FROM DUAL; -Overlaps(@horiz1, @vert1) -0 -SELECT Overlaps(@horiz1, @horiz2) FROM DUAL; -Overlaps(@horiz1, @horiz2) -1 -SELECT Overlaps(@horiz1, @horiz3) FROM DUAL; -Overlaps(@horiz1, @horiz3) -0 -SELECT Overlaps(@horiz1, @point1) FROM DUAL; -Overlaps(@horiz1, @point1) -0 -SELECT Overlaps(@horiz1, @point2) FROM DUAL; -Overlaps(@horiz1, @point2) -0 -DROP TABLE t1; -End of 5.0 tests diff --git a/mysql-test/suite/ndb/r/ndb_grant.result b/mysql-test/suite/ndb/r/ndb_grant.result deleted file mode 100644 index 6192a7cace5..00000000000 --- a/mysql-test/suite/ndb/r/ndb_grant.result +++ /dev/null @@ -1,444 +0,0 @@ -drop table if exists t1; -SET NAMES binary; -use mysql; -alter table columns_priv engine=ndb; -alter table db engine=ndb; -alter table func engine=ndb; -alter table help_category engine=ndb; -alter table help_keyword engine=ndb; -alter table help_relation engine=ndb; -alter table help_topic engine=ndb; -alter table host engine=ndb; -alter table tables_priv engine=ndb; -alter table time_zone engine=ndb; -alter table time_zone_leap_second engine=ndb; -alter table time_zone_name engine=ndb; -alter table time_zone_transition engine=ndb; -alter table time_zone_transition_type engine=ndb; -alter table user engine=ndb; -use test; -delete from mysql.user where user='mysqltest_1'; -delete from mysql.db where user='mysqltest_1'; -flush privileges; -begin; -grant select on mysqltest.* to mysqltest_1@localhost require cipher "EDH-RSA-DES-CBC3-SHA"; -commit; -show grants for mysqltest_1@localhost; -Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' REQUIRE CIPHER 'EDH-RSA-DES-CBC3-SHA' -GRANT SELECT ON `mysqltest`.* TO 'mysqltest_1'@'localhost' -begin; -grant delete on mysqltest.* to mysqltest_1@localhost; -commit; -select * from mysql.user where user="mysqltest_1"; -Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections -localhost mysqltest_1 N N N N N N N N N N N N N N N N N N N N N 0 0 0 -show grants for mysqltest_1@localhost; -Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' REQUIRE CIPHER 'EDH-RSA-DES-CBC3-SHA' -GRANT SELECT, DELETE ON `mysqltest`.* TO 'mysqltest_1'@'localhost' -begin; -revoke delete on mysqltest.* from mysqltest_1@localhost; -commit; -show grants for mysqltest_1@localhost; -Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' REQUIRE CIPHER 'EDH-RSA-DES-CBC3-SHA' -GRANT SELECT ON `mysqltest`.* TO 'mysqltest_1'@'localhost' -begin; -grant select on mysqltest.* to mysqltest_1@localhost require NONE; -commit; -show grants for mysqltest_1@localhost; -Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' -GRANT SELECT ON `mysqltest`.* TO 'mysqltest_1'@'localhost' -begin; -grant USAGE on mysqltest.* to mysqltest_1@localhost require cipher "EDH-RSA-DES-CBC3-SHA" AND SUBJECT "testsubject" ISSUER "MySQL AB"; -commit; -show grants for mysqltest_1@localhost; -Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' REQUIRE ISSUER 'MySQL AB' SUBJECT 'testsubject' CIPHER 'EDH-RSA-DES-CBC3-SHA' -GRANT SELECT ON `mysqltest`.* TO 'mysqltest_1'@'localhost' -begin; -revoke all privileges on mysqltest.* from mysqltest_1@localhost; -commit; -show grants for mysqltest_1@localhost; -Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' REQUIRE ISSUER 'MySQL AB' SUBJECT 'testsubject' CIPHER 'EDH-RSA-DES-CBC3-SHA' -delete from mysql.user where user='mysqltest_1'; -flush privileges; -begin; -grant CREATE TEMPORARY TABLES, LOCK TABLES on mysqltest.* to mysqltest_1@localhost; -commit; -show grants for mysqltest_1@localhost; -Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' -GRANT CREATE TEMPORARY TABLES, LOCK TABLES ON `mysqltest`.* TO 'mysqltest_1'@'localhost' -flush privileges; -show grants for mysqltest_1@localhost; -Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' -GRANT CREATE TEMPORARY TABLES, LOCK TABLES ON `mysqltest`.* TO 'mysqltest_1'@'localhost' -begin; -revoke CREATE TEMPORARY TABLES on mysqltest.* from mysqltest_1@localhost; -commit; -show grants for mysqltest_1@localhost; -Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' -GRANT LOCK TABLES ON `mysqltest`.* TO 'mysqltest_1'@'localhost' -begin; -grant ALL PRIVILEGES on mysqltest.* to mysqltest_1@localhost with GRANT OPTION; -commit; -flush privileges; -show grants for mysqltest_1@localhost; -Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' -GRANT ALL PRIVILEGES ON `mysqltest`.* TO 'mysqltest_1'@'localhost' WITH GRANT OPTION -begin; -revoke LOCK TABLES, ALTER on mysqltest.* from mysqltest_1@localhost; -commit; -show grants for mysqltest_1@localhost; -Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' -GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, CREATE TEMPORARY TABLES, CREATE VIEW, SHOW VIEW ON `mysqltest`.* TO 'mysqltest_1'@'localhost' WITH GRANT OPTION -begin; -revoke all privileges on mysqltest.* from mysqltest_1@localhost; -commit; -delete from mysql.user where user='mysqltest_1'; -flush privileges; -begin; -grant usage on test.* to mysqltest_1@localhost with grant option; -commit; -show grants for mysqltest_1@localhost; -Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' -GRANT USAGE ON `mysqltest`.* TO 'mysqltest_1'@'localhost' WITH GRANT OPTION -GRANT USAGE ON `test`.* TO 'mysqltest_1'@'localhost' WITH GRANT OPTION -delete from mysql.user where user='mysqltest_1'; -delete from mysql.db where user='mysqltest_1'; -delete from mysql.tables_priv where user='mysqltest_1'; -delete from mysql.columns_priv where user='mysqltest_1'; -flush privileges; -show grants for mysqltest_1@localhost; -ERROR 42000: There is no such grant defined for user 'mysqltest_1' on host 'localhost' -create table t1 (a int); -begin; -GRANT select,update,insert on t1 to mysqltest_1@localhost; -GRANT select (a), update (a),insert(a), references(a) on t1 to mysqltest_1@localhost; -commit; -show grants for mysqltest_1@localhost; -Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' -GRANT SELECT, SELECT (a), INSERT, INSERT (a), UPDATE, UPDATE (a), REFERENCES (a) ON `test`.`t1` TO 'mysqltest_1'@'localhost' -select table_priv,column_priv from mysql.tables_priv where user="mysqltest_1"; -table_priv column_priv -Select,Insert,Update Select,Insert,Update,References -begin; -REVOKE select (a), update on t1 from mysqltest_1@localhost; -commit; -show grants for mysqltest_1@localhost; -Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' -GRANT SELECT, INSERT, INSERT (a), REFERENCES (a) ON `test`.`t1` TO 'mysqltest_1'@'localhost' -begin; -REVOKE select,update,insert,insert (a) on t1 from mysqltest_1@localhost; -commit; -show grants for mysqltest_1@localhost; -Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' -GRANT REFERENCES (a) ON `test`.`t1` TO 'mysqltest_1'@'localhost' -begin; -GRANT select,references on t1 to mysqltest_1@localhost; -commit; -select table_priv,column_priv from mysql.tables_priv where user="mysqltest_1"; -table_priv column_priv -Select,References References -begin; -grant all on test.* to mysqltest_3@localhost with grant option; -revoke all on test.* from mysqltest_3@localhost; -commit; -show grants for mysqltest_3@localhost; -Grants for mysqltest_3@localhost -GRANT USAGE ON *.* TO 'mysqltest_3'@'localhost' -GRANT USAGE ON `test`.* TO 'mysqltest_3'@'localhost' WITH GRANT OPTION -begin; -revoke grant option on test.* from mysqltest_3@localhost; -commit; -show grants for mysqltest_3@localhost; -Grants for mysqltest_3@localhost -GRANT USAGE ON *.* TO 'mysqltest_3'@'localhost' -begin; -grant all on test.t1 to mysqltest_2@localhost with grant option; -revoke all on test.t1 from mysqltest_2@localhost; -commit; -show grants for mysqltest_2@localhost; -Grants for mysqltest_2@localhost -GRANT USAGE ON *.* TO 'mysqltest_2'@'localhost' -GRANT USAGE ON `test`.`t1` TO 'mysqltest_2'@'localhost' WITH GRANT OPTION -begin; -revoke grant option on test.t1 from mysqltest_2@localhost; -commit; -show grants for mysqltest_2@localhost; -Grants for mysqltest_2@localhost -GRANT USAGE ON *.* TO 'mysqltest_2'@'localhost' -delete from mysql.user where user='mysqltest_1' or user="mysqltest_2" or user="mysqltest_3"; -delete from mysql.db where user='mysqltest_1' or user="mysqltest_2" or user="mysqltest_3"; -delete from mysql.tables_priv where user='mysqltest_1' or user="mysqltest_2" or user="mysqltest_3"; -delete from mysql.columns_priv where user='mysqltest_1' or user="mysqltest_2" or user="mysqltest_3"; -flush privileges; -drop table t1; -begin; -GRANT FILE on mysqltest.* to mysqltest_1@localhost; -ERROR HY000: Incorrect usage of DB GRANT and GLOBAL PRIVILEGES -commit; -select 1; -1 -1 -create database mysqltest1; -begin; -grant usage on mysqltest1.* to test6123 identified by 'magic123'; -commit; -select host,db,user,select_priv,insert_priv from mysql.db where db="mysqltest1"; -host db user select_priv insert_priv -delete from mysql.user where user='test6123'; -drop database mysqltest1; -create table t1 (a int); -begin; -grant ALL PRIVILEGES on *.* to drop_user2@localhost with GRANT OPTION; -commit; -show grants for drop_user2@localhost; -Grants for drop_user2@localhost -GRANT ALL PRIVILEGES ON *.* TO 'drop_user2'@'localhost' WITH GRANT OPTION -begin; -revoke all privileges, grant option from drop_user2@localhost; -commit; -drop user drop_user2@localhost; -begin; -grant ALL PRIVILEGES on *.* to drop_user@localhost with GRANT OPTION; -grant ALL PRIVILEGES on test.* to drop_user@localhost with GRANT OPTION; -grant select(a) on test.t1 to drop_user@localhost; -commit; -show grants for drop_user@localhost; -Grants for drop_user@localhost -GRANT ALL PRIVILEGES ON *.* TO 'drop_user'@'localhost' WITH GRANT OPTION -GRANT ALL PRIVILEGES ON `test`.* TO 'drop_user'@'localhost' WITH GRANT OPTION -GRANT SELECT (a) ON `test`.`t1` TO 'drop_user'@'localhost' -set sql_mode=ansi_quotes; -show grants for drop_user@localhost; -Grants for drop_user@localhost -GRANT ALL PRIVILEGES ON *.* TO 'drop_user'@'localhost' WITH GRANT OPTION -GRANT ALL PRIVILEGES ON "test".* TO 'drop_user'@'localhost' WITH GRANT OPTION -GRANT SELECT (a) ON "test"."t1" TO 'drop_user'@'localhost' -set sql_mode=default; -set sql_quote_show_create=0; -show grants for drop_user@localhost; -Grants for drop_user@localhost -GRANT ALL PRIVILEGES ON *.* TO 'drop_user'@'localhost' WITH GRANT OPTION -GRANT ALL PRIVILEGES ON test.* TO 'drop_user'@'localhost' WITH GRANT OPTION -GRANT SELECT (a) ON test.t1 TO 'drop_user'@'localhost' -set sql_mode="ansi_quotes"; -show grants for drop_user@localhost; -Grants for drop_user@localhost -GRANT ALL PRIVILEGES ON *.* TO 'drop_user'@'localhost' WITH GRANT OPTION -GRANT ALL PRIVILEGES ON test.* TO 'drop_user'@'localhost' WITH GRANT OPTION -GRANT SELECT (a) ON test.t1 TO 'drop_user'@'localhost' -set sql_quote_show_create=1; -show grants for drop_user@localhost; -Grants for drop_user@localhost -GRANT ALL PRIVILEGES ON *.* TO 'drop_user'@'localhost' WITH GRANT OPTION -GRANT ALL PRIVILEGES ON "test".* TO 'drop_user'@'localhost' WITH GRANT OPTION -GRANT SELECT (a) ON "test"."t1" TO 'drop_user'@'localhost' -set sql_mode=""; -show grants for drop_user@localhost; -Grants for drop_user@localhost -GRANT ALL PRIVILEGES ON *.* TO 'drop_user'@'localhost' WITH GRANT OPTION -GRANT ALL PRIVILEGES ON `test`.* TO 'drop_user'@'localhost' WITH GRANT OPTION -GRANT SELECT (a) ON `test`.`t1` TO 'drop_user'@'localhost' -revoke all privileges, grant option from drop_user@localhost; -show grants for drop_user@localhost; -Grants for drop_user@localhost -GRANT USAGE ON *.* TO 'drop_user'@'localhost' -drop user drop_user@localhost; -begin; -revoke all privileges, grant option from drop_user@localhost; -ERROR HY000: Can't revoke all privileges, grant for one or more of the requested users -commit; -begin; -grant select(a) on test.t1 to drop_user1@localhost; -commit; -flush privileges; -begin; -grant select on test.t1 to drop_user2@localhost; -grant select on test.* to drop_user3@localhost; -grant select on *.* to drop_user4@localhost; -commit; -flush privileges; -drop user drop_user1@localhost, drop_user2@localhost, drop_user3@localhost, -drop_user4@localhost; -begin; -revoke all privileges, grant option from drop_user1@localhost, drop_user2@localhost, -drop_user3@localhost, drop_user4@localhost; -ERROR HY000: Can't revoke all privileges, grant for one or more of the requested users -commit; -flush privileges; -drop user drop_user1@localhost, drop_user2@localhost, drop_user3@localhost, -drop_user4@localhost; -drop table t1; -begin; -grant usage on *.* to mysqltest_1@localhost identified by "password"; -grant select, update, insert on test.* to mysqltest_1@localhost; -commit; -show grants for mysqltest_1@localhost; -Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' IDENTIFIED BY PASSWORD '*2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19' -GRANT SELECT, INSERT, UPDATE ON `test`.* TO 'mysqltest_1'@'localhost' -drop user mysqltest_1@localhost; -SET NAMES koi8r; -CREATE DATABASE ÂÄ; -USE ÂÄ; -CREATE TABLE ÔÁ (ËÏÌ int); -begin; -GRANT SELECT ON ÂÄ.* TO ÀÚÅÒ@localhost; -commit; -SHOW GRANTS FOR ÀÚÅÒ@localhost; -Grants for ÀÚÅÒ@localhost -GRANT USAGE ON *.* TO 'ÀÚÅÒ'@'localhost' -GRANT SELECT ON `ÂÄ`.* TO 'ÀÚÅÒ'@'localhost' -begin; -REVOKE SELECT ON ÂÄ.* FROM ÀÚÅÒ@localhost; -commit; -begin; -GRANT SELECT ON ÂÄ.ÔÁ TO ÀÚÅÒ@localhost; -commit; -SHOW GRANTS FOR ÀÚÅÒ@localhost; -Grants for ÀÚÅÒ@localhost -GRANT USAGE ON *.* TO 'ÀÚÅÒ'@'localhost' -GRANT SELECT ON `ÂÄ`.`ÔÁÂ` TO 'ÀÚÅÒ'@'localhost' -begin; -REVOKE SELECT ON ÂÄ.ÔÁ FROM ÀÚÅÒ@localhost; -commit; -begin; -GRANT SELECT (ËÏÌ) ON ÂÄ.ÔÁ TO ÀÚÅÒ@localhost; -commit; -SHOW GRANTS FOR ÀÚÅÒ@localhost; -Grants for ÀÚÅÒ@localhost -GRANT USAGE ON *.* TO 'ÀÚÅÒ'@'localhost' -GRANT SELECT (ËÏÌ) ON `ÂÄ`.`ÔÁÂ` TO 'ÀÚÅÒ'@'localhost' -begin; -REVOKE SELECT (ËÏÌ) ON ÂÄ.ÔÁ FROM ÀÚÅÒ@localhost; -commit; -DROP DATABASE ÂÄ; -SET NAMES latin1; -USE test; -CREATE TABLE t1 (a int ); -CREATE TABLE t2 LIKE t1; -CREATE TABLE t3 LIKE t1; -CREATE TABLE t4 LIKE t1; -CREATE TABLE t5 LIKE t1; -CREATE TABLE t6 LIKE t1; -CREATE TABLE t7 LIKE t1; -CREATE TABLE t8 LIKE t1; -CREATE TABLE t9 LIKE t1; -CREATE TABLE t10 LIKE t1; -CREATE DATABASE testdb1; -CREATE DATABASE testdb2; -CREATE DATABASE testdb3; -CREATE DATABASE testdb4; -CREATE DATABASE testdb5; -CREATE DATABASE testdb6; -CREATE DATABASE testdb7; -CREATE DATABASE testdb8; -CREATE DATABASE testdb9; -CREATE DATABASE testdb10; -begin; -GRANT ALL ON testdb1.* TO testuser@localhost; -GRANT ALL ON testdb2.* TO testuser@localhost; -GRANT ALL ON testdb3.* TO testuser@localhost; -GRANT ALL ON testdb4.* TO testuser@localhost; -GRANT ALL ON testdb5.* TO testuser@localhost; -GRANT ALL ON testdb6.* TO testuser@localhost; -GRANT ALL ON testdb7.* TO testuser@localhost; -GRANT ALL ON testdb8.* TO testuser@localhost; -GRANT ALL ON testdb9.* TO testuser@localhost; -GRANT ALL ON testdb10.* TO testuser@localhost; -GRANT SELECT ON test.t1 TO testuser@localhost; -GRANT SELECT ON test.t2 TO testuser@localhost; -GRANT SELECT ON test.t3 TO testuser@localhost; -GRANT SELECT ON test.t4 TO testuser@localhost; -GRANT SELECT ON test.t5 TO testuser@localhost; -GRANT SELECT ON test.t6 TO testuser@localhost; -GRANT SELECT ON test.t7 TO testuser@localhost; -GRANT SELECT ON test.t8 TO testuser@localhost; -GRANT SELECT ON test.t9 TO testuser@localhost; -GRANT SELECT ON test.t10 TO testuser@localhost; -GRANT SELECT (a) ON test.t1 TO testuser@localhost; -GRANT SELECT (a) ON test.t2 TO testuser@localhost; -GRANT SELECT (a) ON test.t3 TO testuser@localhost; -GRANT SELECT (a) ON test.t4 TO testuser@localhost; -GRANT SELECT (a) ON test.t5 TO testuser@localhost; -GRANT SELECT (a) ON test.t6 TO testuser@localhost; -GRANT SELECT (a) ON test.t7 TO testuser@localhost; -GRANT SELECT (a) ON test.t8 TO testuser@localhost; -GRANT SELECT (a) ON test.t9 TO testuser@localhost; -GRANT SELECT (a) ON test.t10 TO testuser@localhost; -commit; -begin; -REVOKE ALL PRIVILEGES, GRANT OPTION FROM testuser@localhost; -commit; -SHOW GRANTS FOR testuser@localhost; -Grants for testuser@localhost -GRANT USAGE ON *.* TO 'testuser'@'localhost' -DROP USER testuser@localhost; -DROP TABLE t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; -DROP DATABASE testdb1; -DROP DATABASE testdb2; -DROP DATABASE testdb3; -DROP DATABASE testdb4; -DROP DATABASE testdb5; -DROP DATABASE testdb6; -DROP DATABASE testdb7; -DROP DATABASE testdb8; -DROP DATABASE testdb9; -DROP DATABASE testdb10; -SHOW PRIVILEGES; -Privilege Context Comment -Alter Tables To alter the table -Create Databases,Tables,Indexes To create new databases and tables -Create temporary tables Databases To use CREATE TEMPORARY TABLE -Create view Tables To create new views -Delete Tables To delete existing rows -Drop Databases,Tables To drop databases, tables, and views -File File access on server To read and write files on the server -Grant option Databases,Tables To give to other users those privileges you possess -Index Tables To create or drop indexes -Insert Tables To insert data into tables -Lock tables Databases To use LOCK TABLES (together with SELECT privilege) -Process Server Admin To view the plain text of currently executing queries -References Databases,Tables To have references on tables -Reload Server Admin To reload or refresh tables, logs and privileges -Replication client Server Admin To ask where the slave or master servers are -Replication slave Server Admin To read binary log events from the master -Select Tables To retrieve rows from table -Show databases Server Admin To see all databases with SHOW DATABASES -Show view Tables To see views with SHOW CREATE VIEW -Shutdown Server Admin To shut down the server -Super Server Admin To use KILL thread, SET GLOBAL, CHANGE MASTER, etc. -Update Tables To update existing rows -Usage Server Admin No privileges - allow connect only -use mysql; -alter table columns_priv engine=myisam; -alter table db engine=myisam; -alter table func engine=myisam; -alter table help_category engine=myisam; -alter table help_keyword engine=myisam; -alter table help_relation engine=myisam; -alter table help_topic engine=myisam; -alter table host engine=myisam; -alter table tables_priv engine=myisam; -alter table time_zone engine=myisam; -alter table time_zone_leap_second engine=myisam; -alter table time_zone_name engine=myisam; -alter table time_zone_transition engine=myisam; -alter table time_zone_transition_type engine=myisam; -alter table user engine=myisam; -use test; -flush privileges; diff --git a/mysql-test/suite/ndb/r/ndb_index.result b/mysql-test/suite/ndb/r/ndb_index.result deleted file mode 100644 index 5702552b0b5..00000000000 --- a/mysql-test/suite/ndb/r/ndb_index.result +++ /dev/null @@ -1,154 +0,0 @@ -drop table if exists t1; -CREATE TABLE t1 ( -PORT varchar(16) NOT NULL, -ACCESSNODE varchar(16) NOT NULL, -POP varchar(48) NOT NULL, -ACCESSTYPE int unsigned NOT NULL, -CUSTOMER_ID varchar(20) collate latin1_bin NOT NULL, -PROVIDER varchar(16), -TEXPIRE int unsigned, -NUM_IP int unsigned, -LEASED_NUM_IP int unsigned, -LOCKED_IP int unsigned, -STATIC_DNS int unsigned, -SUSPENDED_SERVICE int unsigned, -SUSPENDED_REASON int unsigned, -BGP_COMMUNITY int unsigned, -INDEX CUSTOMER_ID_INDEX(CUSTOMER_ID), -INDEX FQPN_INDEX(POP,ACCESSNODE,PORT), -PRIMARY KEY(POP,ACCESSNODE,PORT,ACCESSTYPE) -) engine=ndbcluster; -INSERT INTO t1 VALUES ('port67', 'node78', 'pop98', 1, 'kllopmn', 'pr_43', 121212, 1, 2, 3, 8, NULL, NULL, NULL); -INSERT INTO t1 VALUES ('port67', 'node78', 'pop99', 2, 'klkighh', 'pr_44', 121213, 3, 3, 6, 7, NULL, NULL, NULL); -INSERT INTO t1 VALUES ('port79', 'node79', 'pop79', 2, 'kpongfaa', 'pr_44', 981213, 2, 4, 10, 11, 2, 99, 1278); -select port, accessnode, pop, accesstype from t1 where port='port67' order by accesstype; -port accessnode pop accesstype -port67 node78 pop98 1 -port67 node78 pop99 2 -select port, accessnode, pop, accesstype from t1 where port='foo'; -port accessnode pop accesstype -select port, accessnode, pop, accesstype from t1 where accessnode='node78' order by accesstype; -port accessnode pop accesstype -port67 node78 pop98 1 -port67 node78 pop99 2 -select port, accessnode, pop, accesstype from t1 where accessnode='foo'; -port accessnode pop accesstype -select port, accessnode, pop, accesstype from t1 where pop='pop98'; -port accessnode pop accesstype -port67 node78 pop98 1 -select port, accessnode, pop, accesstype from t1 where pop='pop98'; -port accessnode pop accesstype -port67 node78 pop98 1 -select port, accessnode, pop, accesstype from t1 where pop='pop98'; -port accessnode pop accesstype -port67 node78 pop98 1 -select port, accessnode, pop, accesstype from t1 where pop='pop98' order by accesstype; -port accessnode pop accesstype -port67 node78 pop98 1 -select port, accessnode, pop, accesstype from t1 where pop='foo'; -port accessnode pop accesstype -select port, accessnode, pop, accesstype from t1 where accesstype=1; -port accessnode pop accesstype -port67 node78 pop98 1 -select port, accessnode, pop, accesstype from t1 where accesstype=2 order by port; -port accessnode pop accesstype -port67 node78 pop99 2 -port79 node79 pop79 2 -select port, accessnode, pop, accesstype from t1 where accesstype=98 order by port; -port accessnode pop accesstype -select port, accessnode, pop, accesstype from t1 where customer_id='kllopmn'; -port accessnode pop accesstype -port67 node78 pop98 1 -select port, accessnode, pop, accesstype from t1 where customer_id='KLLOPMN'; -port accessnode pop accesstype -select port, accessnode, pop, accesstype from t1 where customer_id='kLLoPMn'; -port accessnode pop accesstype -select port, accessnode, pop, accesstype from t1 where customer_id='foo'; -port accessnode pop accesstype -select port, accessnode, pop, accesstype from t1 where provider='pr_43'; -port accessnode pop accesstype -port67 node78 pop98 1 -select port, accessnode, pop, accesstype from t1 where provider='foo'; -port accessnode pop accesstype -select port, accessnode from t1 where texpire=121212; -port accessnode -port67 node78 -select port, accessnode from t1 where texpire=2323; -port accessnode -select port, accessnode, pop, accesstype from t1 where num_ip=1; -port accessnode pop accesstype -port67 node78 pop98 1 -select port, accessnode, pop, accesstype from t1 where num_ip=89; -port accessnode pop accesstype -select port, accessnode, pop, accesstype from t1 where leased_num_ip=2; -port accessnode pop accesstype -port67 node78 pop98 1 -select port, accessnode, pop, accesstype from t1 where leased_num_ip=89; -port accessnode pop accesstype -select port, accessnode, pop, accesstype from t1 where locked_ip=3; -port accessnode pop accesstype -port67 node78 pop98 1 -select port, accessnode, pop, accesstype from t1 where locked_ip=89; -port accessnode pop accesstype -select port, accessnode, pop, accesstype from t1 where static_dns=8; -port accessnode pop accesstype -port67 node78 pop98 1 -select port, accessnode, pop, accesstype from t1 where static_dns=89; -port accessnode pop accesstype -select port, accessnode, pop, accesstype from t1 where suspended_service=8; -port accessnode pop accesstype -select port, accessnode, pop, accesstype from t1 where suspended_service=89; -port accessnode pop accesstype -select port, accessnode, pop, accesstype from t1 where suspended_reason=NULL; -port accessnode pop accesstype -select port, accessnode, pop, accesstype from t1 where suspended_reason=89; -port accessnode pop accesstype -select port, accessnode, pop, accesstype from t1 where suspended_reason=0; -port accessnode pop accesstype -select port, accessnode, pop, accesstype from t1 where bgp_community=NULL; -port accessnode pop accesstype -select port, accessnode, pop, accesstype from t1 where bgp_community=89; -port accessnode pop accesstype -select port, accessnode, pop, accesstype from t1 where bgp_community=0; -port accessnode pop accesstype -select port, accessnode, pop, accesstype from t1 where port='port67' and accessnode='node78' and pop='pop98' and accesstype=1; -port accessnode pop accesstype -port67 node78 pop98 1 -select port, accessnode, pop, accesstype from t1 where port='port67' and accesstype=1 and accessnode='node78' and pop='pop98'; -port accessnode pop accesstype -port67 node78 pop98 1 -select port, accessnode, pop, accesstype from t1 where pop='pop98' and port='port67' and accesstype=1 and accessnode='node78'; -port accessnode pop accesstype -port67 node78 pop98 1 -select port, accessnode from t1 where port='foo' and accessnode='foo' and pop='foo' and accesstype=99; -port accessnode -select port, accessnode, pop, accesstype from t1 where port='port67' and pop='pop98' and accesstype=1; -port accessnode pop accesstype -port67 node78 pop98 1 -select port, accessnode, pop, accesstype from t1 where accesstype=1 and accessnode='node78' and pop='pop98'; -port accessnode pop accesstype -port67 node78 pop98 1 -select port, accessnode, pop, accesstype from t1 where port='port67' and accesstype=1 and accessnode='node78'; -port accessnode pop accesstype -port67 node78 pop98 1 -select port, accessnode from t1 where port='foo' and accessnode='foo' and pop='foo'; -port accessnode -select port, accessnode, pop, accesstype from t1 where customer_id='kllopmn'; -port accessnode pop accesstype -port67 node78 pop98 1 -select port, accessnode, pop, accesstype from t1 where customer_id='kllopmn' and accesstype=1; -port accessnode pop accesstype -port67 node78 pop98 1 -select port, accessnode, pop, accesstype from t1 where customer_id='kllopmn' and accesstype=2; -port accessnode pop accesstype -select port, accessnode, pop, accesstype from t1 where accesstype=2 and customer_id='kllopmn'; -port accessnode pop accesstype -select port, accessnode, pop, accesstype from t1 where pop='pop98' and accessnode='node78' and port='port67'; -port accessnode pop accesstype -port67 node78 pop98 1 -select port, accessnode, pop, accesstype from t1 where pop='pop98' and accessnode='node78' and port='port67' and customer_id='kllopmn'; -port accessnode pop accesstype -port67 node78 pop98 1 -select port, accessnode, pop, accesstype from t1 where pop='pop98' and accessnode='node78' and port='port67' and customer_id='foo'; -port accessnode pop accesstype -drop table t1; diff --git a/mysql-test/suite/ndb/r/ndb_index_ordered.result b/mysql-test/suite/ndb/r/ndb_index_ordered.result deleted file mode 100644 index c99db354314..00000000000 --- a/mysql-test/suite/ndb/r/ndb_index_ordered.result +++ /dev/null @@ -1,839 +0,0 @@ -drop table if exists t1, test1, test2; -CREATE TABLE t1 ( -a int unsigned NOT NULL PRIMARY KEY, -b int unsigned not null, -c int unsigned, -KEY(b) -) engine=ndbcluster; -insert t1 values(1, 2, 3), (2,3, 5), (3, 4, 6), (4, 5, 8), (5,6, 2), (6,7, 2); -select * from t1 order by b; -a b c -1 2 3 -2 3 5 -3 4 6 -4 5 8 -5 6 2 -6 7 2 -select * from t1 where b >= 4 order by b; -a b c -3 4 6 -4 5 8 -5 6 2 -6 7 2 -select * from t1 where b = 4 order by b; -a b c -3 4 6 -select * from t1 where b > 4 order by b; -a b c -4 5 8 -5 6 2 -6 7 2 -select * from t1 where b < 4 order by b; -a b c -1 2 3 -2 3 5 -select * from t1 where b <= 4 order by b; -a b c -1 2 3 -2 3 5 -3 4 6 -select tt1.* from t1 as tt1, t1 as tt2 use index(b) where tt1.b = tt2.b order by tt1.b; -a b c -1 2 3 -2 3 5 -3 4 6 -4 5 8 -5 6 2 -6 7 2 -select a, b, c from t1 where a!=2 and c=6; -a b c -3 4 6 -select a, b, c from t1 where a!=2 order by a; -a b c -1 2 3 -3 4 6 -4 5 8 -5 6 2 -6 7 2 -update t1 set c = 3 where b = 3; -select * from t1 order by a; -a b c -1 2 3 -2 3 3 -3 4 6 -4 5 8 -5 6 2 -6 7 2 -update t1 set c = 10 where b >= 6; -select * from t1 order by a; -a b c -1 2 3 -2 3 3 -3 4 6 -4 5 8 -5 6 10 -6 7 10 -update t1 set c = 11 where b < 5; -select * from t1 order by a; -a b c -1 2 11 -2 3 11 -3 4 11 -4 5 8 -5 6 10 -6 7 10 -update t1 set c = 12 where b > 0; -select * from t1 order by a; -a b c -1 2 12 -2 3 12 -3 4 12 -4 5 12 -5 6 12 -6 7 12 -update t1 set c = 13 where b <= 3; -select * from t1 order by a; -a b c -1 2 13 -2 3 13 -3 4 12 -4 5 12 -5 6 12 -6 7 12 -update t1 set b = b + 1 where b > 4 and b < 7; -select * from t1 order by a; -a b c -1 2 13 -2 3 13 -3 4 12 -4 6 12 -5 7 12 -6 7 12 -update t1 set a = a + 10 where b > 1 and b < 7; -select * from t1 order by a; -a b c -5 7 12 -6 7 12 -11 2 13 -12 3 13 -13 4 12 -14 6 12 -drop table t1; -CREATE TABLE t1 ( -a int unsigned NOT NULL PRIMARY KEY, -b int unsigned not null, -c int unsigned, -KEY(b) -) engine=ndbcluster; -insert t1 values(1, 2, 13), (2,3, 13), (3, 4, 12), (4, 5, 12), (5,6, 12), (6,7, 12); -delete from t1 where b = 3; -select * from t1 order by a; -a b c -1 2 13 -3 4 12 -4 5 12 -5 6 12 -6 7 12 -delete from t1 where b >= 6; -select * from t1 order by a; -a b c -1 2 13 -3 4 12 -4 5 12 -delete from t1 where b < 4; -select * from t1 order by a; -a b c -3 4 12 -4 5 12 -delete from t1 where b > 5; -select * from t1 order by a; -a b c -3 4 12 -4 5 12 -delete from t1 where b <= 4; -select * from t1 order by a; -a b c -4 5 12 -drop table t1; -CREATE TABLE t1 ( -a int unsigned NOT NULL PRIMARY KEY, -b int unsigned not null, -c int unsigned not null -) engine = ndb; -create index a1 on t1 (b, c); -insert into t1 values (1, 2, 13); -insert into t1 values (2,3, 13); -insert into t1 values (3, 4, 12); -insert into t1 values (4, 5, 12); -insert into t1 values (5,6, 12); -insert into t1 values (6,7, 12); -insert into t1 values (7, 2, 1); -insert into t1 values (8,3, 6); -insert into t1 values (9, 4, 12); -insert into t1 values (14, 5, 4); -insert into t1 values (15,5,5); -insert into t1 values (16,5, 6); -insert into t1 values (17,4,4); -insert into t1 values (18,1, 7); -select * from t1 order by a; -a b c -1 2 13 -2 3 13 -3 4 12 -4 5 12 -5 6 12 -6 7 12 -7 2 1 -8 3 6 -9 4 12 -14 5 4 -15 5 5 -16 5 6 -17 4 4 -18 1 7 -select * from t1 where b<=5 order by a; -a b c -1 2 13 -2 3 13 -3 4 12 -4 5 12 -7 2 1 -8 3 6 -9 4 12 -14 5 4 -15 5 5 -16 5 6 -17 4 4 -18 1 7 -select * from t1 where b<=5 and c=0; -a b c -insert into t1 values (19,4, 0); -select * from t1 where b<=5 and c=0; -a b c -19 4 0 -select * from t1 where b=4 and c<=5 order by a; -a b c -17 4 4 -19 4 0 -select * from t1 where b<=4 and c<=5 order by a; -a b c -7 2 1 -17 4 4 -19 4 0 -select * from t1 where b<=5 and c=0 or b<=5 and c=2; -a b c -19 4 0 -select count(*) from t1 where b = 0; -count(*) -0 -select count(*) from t1 where b = 1; -count(*) -1 -drop table t1; -CREATE TABLE t1 ( -a int unsigned NOT NULL PRIMARY KEY, -b int unsigned, -c int unsigned, -KEY bc(b,c) -) engine = ndb; -insert into t1 values(1,1,1),(2,NULL,2),(3,NULL,NULL),(4,4,NULL); -select * from t1 use index (bc) where b IS NULL order by a; -a b c -2 NULL 2 -3 NULL NULL -select * from t1 use index (bc)order by a; -a b c -1 1 1 -2 NULL 2 -3 NULL NULL -4 4 NULL -select * from t1 use index (bc) order by a; -a b c -1 1 1 -2 NULL 2 -3 NULL NULL -4 4 NULL -select * from t1 use index (PRIMARY) where b IS NULL order by a; -a b c -2 NULL 2 -3 NULL NULL -select * from t1 use index (bc) where b IS NULL order by a; -a b c -2 NULL 2 -3 NULL NULL -select * from t1 use index (bc) where b IS NULL and c IS NULL order by a; -a b c -3 NULL NULL -select * from t1 use index (bc) where b IS NULL and c = 2 order by a; -a b c -2 NULL 2 -select * from t1 use index (bc) where b < 4 order by a; -a b c -1 1 1 -select * from t1 use index (bc) where b IS NOT NULL order by a; -a b c -1 1 1 -4 4 NULL -drop table t1; -create table t1 ( -a int unsigned primary key, -b int unsigned, -c char(10), -key bc (b, c) -) engine=ndb; -insert into t1 values(1,1,'a'),(2,2,'b'),(3,3,'c'),(4,4,'d'),(5,5,'e'); -insert into t1 select a*7,10*b,'f' from t1; -insert into t1 select a*13,10*b,'g' from t1; -insert into t1 select a*17,10*b,'h' from t1; -insert into t1 select a*19,10*b,'i' from t1; -insert into t1 select a*23,10*b,'j' from t1; -insert into t1 select a*29,10*b,'k' from t1; -select b, c from t1 where b <= 10 and c <'f' order by b, c; -b c -1 a -2 b -3 c -4 d -5 e -select b, c from t1 where b <= 10 and c <'f' order by b desc, c desc; -b c -5 e -4 d -3 c -2 b -1 a -select b, c from t1 where b=4000 and c<'k' order by b, c; -b c -4000 h -4000 i -4000 i -4000 i -4000 j -4000 j -4000 j -4000 j -4000 j -4000 j -select b, c from t1 where b=4000 and c<'k' order by b desc, c desc; -b c -4000 j -4000 j -4000 j -4000 j -4000 j -4000 j -4000 i -4000 i -4000 i -4000 h -select b, c from t1 where 1000<=b and b<=100000 and c<'j' order by b, c; -b c -1000 h -1000 i -1000 i -1000 i -2000 h -2000 i -2000 i -2000 i -3000 h -3000 i -3000 i -3000 i -4000 h -4000 i -4000 i -4000 i -5000 h -5000 i -5000 i -5000 i -10000 i -20000 i -30000 i -40000 i -50000 i -select b, c from t1 where 1000<=b and b<=100000 and c<'j' order by b desc, c desc; -b c -50000 i -40000 i -30000 i -20000 i -10000 i -5000 i -5000 i -5000 i -5000 h -4000 i -4000 i -4000 i -4000 h -3000 i -3000 i -3000 i -3000 h -2000 i -2000 i -2000 i -2000 h -1000 i -1000 i -1000 i -1000 h -select min(b), max(b) from t1; -min(b) max(b) -1 5000000 -drop table t1; -CREATE TABLE test1 ( -SubscrID int(11) NOT NULL auto_increment, -UsrID int(11) NOT NULL default '0', -PRIMARY KEY (SubscrID), -KEY idx_usrid (UsrID) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO test1 VALUES (2,224),(3,224),(1,224); -CREATE TABLE test2 ( -SbclID int(11) NOT NULL auto_increment, -SbcrID int(11) NOT NULL default '0', -PRIMARY KEY (SbclID), -KEY idx_sbcrid (SbcrID) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO test2 VALUES (3,2),(1,1),(2,1),(4,2); -select * from test1 order by 1; -SubscrID UsrID -1 224 -2 224 -3 224 -select * from test2 order by 1; -SbclID SbcrID -1 1 -2 1 -3 2 -4 2 -SELECT s.SubscrID,l.SbclID FROM test1 s left JOIN test2 l ON -l.SbcrID=s.SubscrID WHERE s.UsrID=224 order by 1, 2; -SubscrID SbclID -1 1 -1 2 -2 3 -2 4 -3 NULL -drop table test1; -drop table test2; -create table t1 ( -pk int primary key, -dt datetime not null, -da date not null, -ye year not null, -ti time not null, -ts timestamp not null, -index(dt), -index(da), -index(ye), -index(ti), -index(ts) -) engine=ndb; -insert into t1 (pk,dt,da,ye,ti,ts) values -(1, '1901-05-05 23:00:59', '1901-05-05', '1901', '23:00:59', '2001-01-01 23:00:59'), -(2, '1912-09-05 13:00:59', '1912-09-05', '1912', '13:00:59', '2001-01-01 13:00:59'), -(3, '1945-12-31 00:00:00', '1945-12-31', '1945', '00:00:00', '2001-01-01 00:00:00'), -(4, '1955-12-31 00:00:00', '1955-12-31', '1955', '00:00:00', '2001-01-01 00:00:00'), -(5, '1963-06-06 06:06:06', '1963-06-06', '1963', '06:06:06', '2001-01-01 06:06:06'), -(6, '1993-06-06 06:06:06', '1993-06-06', '1993', '06:06:06', '2001-01-01 06:06:06'), -(7, '2001-01-01 10:11:10', '2001-01-01', '2001', '10:11:10', '2001-01-01 10:11:10'), -(8, '2001-01-01 10:11:11', '2001-01-01', '2001', '10:11:11', '2001-01-01 10:11:11'), -(9, '2005-01-31 23:59:59', '2005-01-31', '2005', '23:59:59', '2001-01-01 23:59:59'); -select count(*)-9 from t1 use index (dt) where dt > '1900-01-01 00:00:00'; -count(*)-9 -0 -select count(*)-6 from t1 use index (dt) where dt >= '1955-12-31 00:00:00'; -count(*)-6 -0 -select count(*)-5 from t1 use index (dt) where dt > '1955-12-31 00:00:00'; -count(*)-5 -0 -select count(*)-5 from t1 use index (dt) where dt < '1970-03-03 22:22:22'; -count(*)-5 -0 -select count(*)-7 from t1 use index (dt) where dt < '2001-01-01 10:11:11'; -count(*)-7 -0 -select count(*)-8 from t1 use index (dt) where dt <= '2001-01-01 10:11:11'; -count(*)-8 -0 -select count(*)-9 from t1 use index (dt) where dt <= '2055-01-01 00:00:00'; -count(*)-9 -0 -select count(*)-9 from t1 use index (da) where da > '1900-01-01'; -count(*)-9 -0 -select count(*)-6 from t1 use index (da) where da >= '1955-12-31'; -count(*)-6 -0 -select count(*)-5 from t1 use index (da) where da > '1955-12-31'; -count(*)-5 -0 -select count(*)-5 from t1 use index (da) where da < '1970-03-03'; -count(*)-5 -0 -select count(*)-6 from t1 use index (da) where da < '2001-01-01'; -count(*)-6 -0 -select count(*)-8 from t1 use index (da) where da <= '2001-01-02'; -count(*)-8 -0 -select count(*)-9 from t1 use index (da) where da <= '2055-01-01'; -count(*)-9 -0 -select count(*)-9 from t1 use index (ye) where ye > '1900'; -count(*)-9 -0 -select count(*)-6 from t1 use index (ye) where ye >= '1955'; -count(*)-6 -0 -select count(*)-5 from t1 use index (ye) where ye > '1955'; -count(*)-5 -0 -select count(*)-5 from t1 use index (ye) where ye < '1970'; -count(*)-5 -0 -select count(*)-6 from t1 use index (ye) where ye < '2001'; -count(*)-6 -0 -select count(*)-8 from t1 use index (ye) where ye <= '2001'; -count(*)-8 -0 -select count(*)-9 from t1 use index (ye) where ye <= '2055'; -count(*)-9 -0 -select count(*)-9 from t1 use index (ti) where ti >= '00:00:00'; -count(*)-9 -0 -select count(*)-7 from t1 use index (ti) where ti > '00:00:00'; -count(*)-7 -0 -select count(*)-7 from t1 use index (ti) where ti > '05:05:05'; -count(*)-7 -0 -select count(*)-5 from t1 use index (ti) where ti > '06:06:06'; -count(*)-5 -0 -select count(*)-5 from t1 use index (ti) where ti < '10:11:11'; -count(*)-5 -0 -select count(*)-6 from t1 use index (ti) where ti <= '10:11:11'; -count(*)-6 -0 -select count(*)-8 from t1 use index (ti) where ti < '23:59:59'; -count(*)-8 -0 -select count(*)-9 from t1 use index (ti) where ti <= '23:59:59'; -count(*)-9 -0 -select count(*)-9 from t1 use index (ts) where ts >= '2001-01-01 00:00:00'; -count(*)-9 -0 -select count(*)-7 from t1 use index (ts) where ts > '2001-01-01 00:00:00'; -count(*)-7 -0 -select count(*)-7 from t1 use index (ts) where ts > '2001-01-01 05:05:05'; -count(*)-7 -0 -select count(*)-5 from t1 use index (ts) where ts > '2001-01-01 06:06:06'; -count(*)-5 -0 -select count(*)-5 from t1 use index (ts) where ts < '2001-01-01 10:11:11'; -count(*)-5 -0 -select count(*)-6 from t1 use index (ts) where ts <= '2001-01-01 10:11:11'; -count(*)-6 -0 -select count(*)-8 from t1 use index (ts) where ts < '2001-01-01 23:59:59'; -count(*)-8 -0 -select count(*)-9 from t1 use index (ts) where ts <= '2001-01-01 23:59:59'; -count(*)-9 -0 -drop table t1; -create table t1 ( -a int primary key, -s decimal(12), -t decimal(12, 5), -u decimal(12) unsigned, -v decimal(12, 5) unsigned, -key (s), -key (t), -key (u), -key (v) -) engine=ndb; -insert into t1 values -( 0, -000000000007, -0000061.00003, 000000000061, 0000965.00042), -( 1, -000000000007, -0000061.00042, 000000000061, 0000965.00003), -( 2, -071006035767, 4210253.00024, 000000000001, 0000001.84488), -( 3, 000000007115, 0000000.77607, 000077350625, 0000018.00013), -( 4, -000000068391, -0346486.00000, 000000005071, 0005334.00002), -( 5, -521579890459, -1936874.00001, 000000000154, 0000003.00018), -( 6, -521579890459, -1936874.00018, 000000000154, 0000003.00001), -( 7, 000000000333, 0000051.39140, 000000907958, 0788643.08374), -( 8, 000042731229, 0000009.00000, 000000000009, 6428667.00000), -( 9, -000008159769, 0000918.00004, 000096951421, 7607730.00008); -select count(*)- 5 from t1 use index (s) where s < -000000000007; -count(*)- 5 -0 -select count(*)- 7 from t1 use index (s) where s <= -000000000007; -count(*)- 7 -0 -select count(*)- 2 from t1 use index (s) where s = -000000000007; -count(*)- 2 -0 -select count(*)- 5 from t1 use index (s) where s >= -000000000007; -count(*)- 5 -0 -select count(*)- 3 from t1 use index (s) where s > -000000000007; -count(*)- 3 -0 -select count(*)- 4 from t1 use index (t) where t < -0000061.00003; -count(*)- 4 -0 -select count(*)- 5 from t1 use index (t) where t <= -0000061.00003; -count(*)- 5 -0 -select count(*)- 1 from t1 use index (t) where t = -0000061.00003; -count(*)- 1 -0 -select count(*)- 6 from t1 use index (t) where t >= -0000061.00003; -count(*)- 6 -0 -select count(*)- 5 from t1 use index (t) where t > -0000061.00003; -count(*)- 5 -0 -select count(*)- 2 from t1 use index (u) where u < 000000000061; -count(*)- 2 -0 -select count(*)- 4 from t1 use index (u) where u <= 000000000061; -count(*)- 4 -0 -select count(*)- 2 from t1 use index (u) where u = 000000000061; -count(*)- 2 -0 -select count(*)- 8 from t1 use index (u) where u >= 000000000061; -count(*)- 8 -0 -select count(*)- 6 from t1 use index (u) where u > 000000000061; -count(*)- 6 -0 -select count(*)- 5 from t1 use index (v) where v < 0000965.00042; -count(*)- 5 -0 -select count(*)- 6 from t1 use index (v) where v <= 0000965.00042; -count(*)- 6 -0 -select count(*)- 1 from t1 use index (v) where v = 0000965.00042; -count(*)- 1 -0 -select count(*)- 5 from t1 use index (v) where v >= 0000965.00042; -count(*)- 5 -0 -select count(*)- 4 from t1 use index (v) where v > 0000965.00042; -count(*)- 4 -0 -drop table t1; -create table t1 (a int, c varchar(10), -primary key using hash (a), index(c)) engine=ndb; -insert into t1 (a, c) values (1,'aaa'),(3,'bbb'); -select count(*) from t1 where c<'bbb'; -count(*) -1 -drop table t1; -set autocommit=1; -show session variables like 'ndb_index_stat_%'; -Variable_name Value -ndb_index_stat_cache_entries 32 -ndb_index_stat_enable OFF -ndb_index_stat_update_freq 20 -set ndb_index_stat_enable = off; -show session variables like 'ndb_index_stat_%'; -Variable_name Value -ndb_index_stat_cache_entries 32 -ndb_index_stat_enable OFF -ndb_index_stat_update_freq 20 -create table t1 (a int, b int, c varchar(10) not null, -primary key using hash (a), index(b,c)) engine=ndb; -insert into t1 values -(1,10,'aaa'),(2,10,'bbb'),(3,10,'ccc'), -(4,20,'aaa'),(5,20,'bbb'),(6,20,'ccc'), -(7,30,'aaa'),(8,30,'bbb'),(9,30,'ccc'); -select count(*) from t1 where b < 10; -count(*) -0 -select count(*) from t1 where b >= 10 and c >= 'bbb'; -count(*) -6 -select count(*) from t1 where b > 10; -count(*) -6 -select count(*) from t1 where b <= 20 and c < 'ccc'; -count(*) -4 -select count(*) from t1 where b = 20 and c = 'ccc'; -count(*) -1 -select count(*) from t1 where b > 20; -count(*) -3 -select count(*) from t1 where b = 30 and c > 'aaa'; -count(*) -2 -select count(*) from t1 where b <= 20; -count(*) -6 -select count(*) from t1 where b >= 20 and c > 'aaa'; -count(*) -4 -drop table t1; -set ndb_index_stat_enable = on; -set ndb_index_stat_cache_entries = 0; -show session variables like 'ndb_index_stat_%'; -Variable_name Value -ndb_index_stat_cache_entries 0 -ndb_index_stat_enable ON -ndb_index_stat_update_freq 20 -create table t1 (a int, b int, c varchar(10) not null, -primary key using hash (a), index(b,c)) engine=ndb; -insert into t1 values -(1,10,'aaa'),(2,10,'bbb'),(3,10,'ccc'), -(4,20,'aaa'),(5,20,'bbb'),(6,20,'ccc'), -(7,30,'aaa'),(8,30,'bbb'),(9,30,'ccc'); -select count(*) from t1 where b < 10; -count(*) -0 -select count(*) from t1 where b >= 10 and c >= 'bbb'; -count(*) -6 -select count(*) from t1 where b > 10; -count(*) -6 -select count(*) from t1 where b <= 20 and c < 'ccc'; -count(*) -4 -select count(*) from t1 where b = 20 and c = 'ccc'; -count(*) -1 -select count(*) from t1 where b > 20; -count(*) -3 -select count(*) from t1 where b = 30 and c > 'aaa'; -count(*) -2 -select count(*) from t1 where b <= 20; -count(*) -6 -select count(*) from t1 where b >= 20 and c > 'aaa'; -count(*) -4 -drop table t1; -set ndb_index_stat_enable = on; -set ndb_index_stat_cache_entries = 4; -set ndb_index_stat_update_freq = 2; -show session variables like 'ndb_index_stat_%'; -Variable_name Value -ndb_index_stat_cache_entries 4 -ndb_index_stat_enable ON -ndb_index_stat_update_freq 2 -create table t1 (a int, b int, c varchar(10) not null, -primary key using hash (a), index(b,c)) engine=ndb; -insert into t1 values -(1,10,'aaa'),(2,10,'bbb'),(3,10,'ccc'), -(4,20,'aaa'),(5,20,'bbb'),(6,20,'ccc'), -(7,30,'aaa'),(8,30,'bbb'),(9,30,'ccc'); -select count(*) from t1 where b < 10; -count(*) -0 -select count(*) from t1 where b >= 10 and c >= 'bbb'; -count(*) -6 -select count(*) from t1 where b > 10; -count(*) -6 -select count(*) from t1 where b <= 20 and c < 'ccc'; -count(*) -4 -select count(*) from t1 where b = 20 and c = 'ccc'; -count(*) -1 -select count(*) from t1 where b > 20; -count(*) -3 -select count(*) from t1 where b = 30 and c > 'aaa'; -count(*) -2 -select count(*) from t1 where b <= 20; -count(*) -6 -select count(*) from t1 where b >= 20 and c > 'aaa'; -count(*) -4 -drop table t1; -set ndb_index_stat_enable = @@global.ndb_index_stat_enable; -set ndb_index_stat_cache_entries = @@global.ndb_index_stat_cache_entries; -set ndb_index_stat_update_freq = @@global.ndb_index_stat_update_freq; -show session variables like 'ndb_index_stat_%'; -Variable_name Value -ndb_index_stat_cache_entries 32 -ndb_index_stat_enable OFF -ndb_index_stat_update_freq 20 -create table t1 (a int primary key) engine = ndb; -insert into t1 values (1), (2), (3); -begin; -delete from t1 where a > 1; -rollback; -select * from t1 order by a; -a -1 -2 -3 -begin; -delete from t1 where a > 1; -rollback; -begin; -select * from t1 order by a; -a -1 -2 -3 -delete from t1 where a > 2; -select * from t1 order by a; -a -1 -2 -delete from t1 where a > 1; -select * from t1 order by a; -a -1 -delete from t1 where a > 0; -select * from t1 order by a; -a -rollback; -select * from t1 order by a; -a -1 -2 -3 -delete from t1; -drop table t1; -create table nationaldish (DishID int(10) unsigned NOT NULL AUTO_INCREMENT, -CountryCode char(3) NOT NULL, -DishTitle varchar(64) NOT NULL, -calories smallint(5) unsigned DEFAULT NULL, -PRIMARY KEY (DishID), -INDEX i USING HASH (countrycode,calories) -) ENGINE=ndbcluster; -ERROR HY000: Can't create table 'test.nationaldish' (errno: 138) -create table nationaldish (DishID int(10) unsigned NOT NULL AUTO_INCREMENT, -CountryCode char(3) NOT NULL, -DishTitle varchar(64) NOT NULL, -calories smallint(5) unsigned DEFAULT NULL, -PRIMARY KEY (DishID) -) ENGINE=ndbcluster; -create index i on nationaldish(countrycode,calories) using hash; -ERROR 42000: Table 'nationaldish' uses an extension that doesn't exist in this MySQL version -drop table nationaldish; diff --git a/mysql-test/suite/ndb/r/ndb_index_unique.result b/mysql-test/suite/ndb/r/ndb_index_unique.result deleted file mode 100644 index 5d0f4038211..00000000000 --- a/mysql-test/suite/ndb/r/ndb_index_unique.result +++ /dev/null @@ -1,692 +0,0 @@ -drop table if exists t1, t2, t3, t4, t5, t6, t7, t8; -CREATE TABLE t1 ( -a int NOT NULL PRIMARY KEY, -b int not null, -c int, -UNIQUE ib(b) -) engine=ndbcluster; -insert t1 values(1, 2, 3), (2, 3, 5), (3, 4, 6), (4, 5, 8), (5,6, 2), (6,7, 2); -select * from t1 order by b; -a b c -1 2 3 -2 3 5 -3 4 6 -4 5 8 -5 6 2 -6 7 2 -select * from t1 where b = 4 order by b; -a b c -3 4 6 -insert into t1 values(7,8,3); -select * from t1 where b = 4 order by a; -a b c -3 4 6 -insert into t1 values(8, 2, 3); -ERROR 23000: Duplicate entry '2' for key 'ib' -select * from t1 order by a; -a b c -1 2 3 -2 3 5 -3 4 6 -4 5 8 -5 6 2 -6 7 2 -7 8 3 -delete from t1 where a = 1; -insert into t1 values(8, 2, 3); -select * from t1 order by a; -a b c -2 3 5 -3 4 6 -4 5 8 -5 6 2 -6 7 2 -7 8 3 -8 2 3 -alter table t1 drop index ib; -insert into t1 values(1, 2, 3); -create unique index ib on t1(b); -ERROR 23000: Can't write, because of unique constraint, to table 't1' -drop table t1; -CREATE TABLE t1 ( -a int unsigned NOT NULL PRIMARY KEY, -b int unsigned, -c int unsigned, -UNIQUE bc(b,c) -) engine = ndb; -insert into t1 values(1,1,1),(2,NULL,2),(3,NULL,NULL),(4,4,NULL); -select * from t1 use index (bc) where b IS NULL order by a; -a b c -2 NULL 2 -3 NULL NULL -select * from t1 use index (bc)order by a; -a b c -1 1 1 -2 NULL 2 -3 NULL NULL -4 4 NULL -select * from t1 use index (bc) order by a; -a b c -1 1 1 -2 NULL 2 -3 NULL NULL -4 4 NULL -select * from t1 use index (PRIMARY) where b IS NULL order by a; -a b c -2 NULL 2 -3 NULL NULL -select * from t1 use index (bc) where b IS NULL order by a; -a b c -2 NULL 2 -3 NULL NULL -select * from t1 use index (bc) where b IS NULL and c IS NULL order by a; -a b c -3 NULL NULL -select * from t1 use index (bc) where b IS NULL and c = 2 order by a; -a b c -2 NULL 2 -select * from t1 use index (bc) where b < 4 order by a; -a b c -1 1 1 -select * from t1 use index (bc) where b IS NOT NULL order by a; -a b c -1 1 1 -4 4 NULL -insert into t1 values(5,1,1); -ERROR 23000: Duplicate entry '1-1' for key 'bc' -drop table t1; -CREATE TABLE t2 ( -a int unsigned NOT NULL PRIMARY KEY, -b int unsigned not null, -c int unsigned not null, -UNIQUE (b, c) USING HASH -) engine=ndbcluster; -insert t2 values(1, 2, 3), (2, 3, 5), (3, 4, 6), (4, 5, 8), (5,6, 2), (6,7, 2); -select * from t2 where a = 3; -a b c -3 4 6 -select * from t2 where b = 4; -a b c -3 4 6 -select * from t2 where c = 6; -a b c -3 4 6 -insert into t2 values(7,8,3); -select * from t2 where b = 4 order by a; -a b c -3 4 6 -insert into t2 values(8, 2, 3); -ERROR 23000: Duplicate entry '2-3' for key 'b' -select * from t2 order by a; -a b c -1 2 3 -2 3 5 -3 4 6 -4 5 8 -5 6 2 -6 7 2 -7 8 3 -delete from t2 where a = 1; -insert into t2 values(8, 2, 3); -select * from t2 order by a; -a b c -2 3 5 -3 4 6 -4 5 8 -5 6 2 -6 7 2 -7 8 3 -8 2 3 -create unique index bi using hash on t2(b); -insert into t2 values(9, 3, 1); -ERROR 23000: Duplicate entry '3' for key 'bi' -alter table t2 drop index bi; -insert into t2 values(9, 3, 1); -select * from t2 order by a; -a b c -2 3 5 -3 4 6 -4 5 8 -5 6 2 -6 7 2 -7 8 3 -8 2 3 -9 3 1 -drop table t2; -CREATE TABLE t2 ( -a int unsigned NOT NULL PRIMARY KEY, -b int unsigned not null, -c int unsigned, -UNIQUE (b, c) USING HASH -) engine=ndbcluster; -Warnings: -Warning 1121 Ndb does not support unique index on NULL valued attributes, index access with NULL value will become full table scan -insert t2 values(1,1,NULL),(2,2,2),(3,3,NULL),(4,4,4),(5,5,NULL),(6,6,6),(7,7,NULL),(8,3,NULL),(9,3,NULL); -select * from t2 where c IS NULL order by a; -a b c -1 1 NULL -3 3 NULL -5 5 NULL -7 7 NULL -8 3 NULL -9 3 NULL -select * from t2 where b = 3 AND c IS NULL order by a; -a b c -3 3 NULL -8 3 NULL -9 3 NULL -select * from t2 where (b = 3 OR b = 5) AND c IS NULL order by a; -a b c -3 3 NULL -5 5 NULL -8 3 NULL -9 3 NULL -set @old_optimizer_switch = @@session.optimizer_switch; -set optimizer_switch = "engine_condition_pushdown=on"; -explain select * from t2 where (b = 3 OR b = 5) AND c IS NULL AND a < 9 order by a; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 range PRIMARY,b PRIMARY 4 NULL 1 Using where with pushed condition -select * from t2 where (b = 3 OR b = 5) AND c IS NULL AND a < 9 order by a; -a b c -3 3 NULL -5 5 NULL -8 3 NULL -set optimizer_switch = @old_optimizer_switch; -drop table t2; -CREATE TABLE t3 ( -a int unsigned NOT NULL, -b int unsigned not null, -c int unsigned, -PRIMARY KEY (a, b) USING HASH -) engine=ndbcluster; -insert t3 values(1, 2, 3), (2, 3, 5), (3, 4, 6), (4, 5, 8), (5,6, 2), (6,7, 2); -select * from t3 where a = 3; -a b c -3 4 6 -select * from t3 where b = 4; -a b c -3 4 6 -select * from t3 where c = 6; -a b c -3 4 6 -insert into t3 values(7,8,3); -select * from t3 where b = 4 order by a; -a b c -3 4 6 -drop table t3; -CREATE TABLE t1 ( -pk int NOT NULL PRIMARY KEY, -a int unsigned, -UNIQUE KEY (a) -) engine=ndbcluster; -insert into t1 values (-1,NULL), (0,0), (1,NULL),(2,2),(3,NULL),(4,4); -select * from t1 order by pk; -pk a --1 NULL -0 0 -1 NULL -2 2 -3 NULL -4 4 -insert into t1 values (5,0); -ERROR 23000: Duplicate entry '0' for key 'a' -select * from t1 order by pk; -pk a --1 NULL -0 0 -1 NULL -2 2 -3 NULL -4 4 -delete from t1 where a = 0; -insert into t1 values (5,0); -select * from t1 order by pk; -pk a --1 NULL -1 NULL -2 2 -3 NULL -4 4 -5 0 -CREATE TABLE t2 ( -pk int NOT NULL PRIMARY KEY, -a int unsigned, -b tinyint NOT NULL, -c VARCHAR(10), -UNIQUE KEY si(a, c) -) engine=ndbcluster; -insert into t2 values (-1,1,17,NULL),(0,NULL,18,NULL),(1,3,19,'abc'); -select * from t2 order by pk; -pk a b c --1 1 17 NULL -0 NULL 18 NULL -1 3 19 abc -insert into t2 values(2,3,19,'abc'); -ERROR 23000: Duplicate entry '3-abc' for key 'si' -select * from t2 order by pk; -pk a b c --1 1 17 NULL -0 NULL 18 NULL -1 3 19 abc -delete from t2 where c IS NOT NULL; -insert into t2 values(2,3,19,'abc'); -select * from t2 order by pk; -pk a b c --1 1 17 NULL -0 NULL 18 NULL -2 3 19 abc -drop table t1, t2; -CREATE TABLE t1 ( -cid smallint(5) unsigned NOT NULL default '0', -cv varchar(250) NOT NULL default '', -PRIMARY KEY (cid), -UNIQUE KEY cv (cv) -) engine=ndbcluster; -INSERT INTO t1 VALUES (8,'dummy'); -CREATE TABLE t2 ( -cid bigint(20) unsigned NOT NULL auto_increment, -cap varchar(255) NOT NULL default '', -PRIMARY KEY (cid), -UNIQUE KEY (cid, cap) -) engine=ndbcluster; -INSERT INTO t2 VALUES (NULL,'another dummy'); -CREATE TABLE t3 ( -gid bigint(20) unsigned NOT NULL auto_increment, -gn varchar(255) NOT NULL default '', -must tinyint(4) default NULL, -PRIMARY KEY (gid) -) engine=ndbcluster; -INSERT INTO t3 VALUES (1,'V1',NULL); -CREATE TABLE t4 ( -uid bigint(20) unsigned NOT NULL default '0', -gid bigint(20) unsigned NOT NULL, -rid bigint(20) unsigned NOT NULL, -cid bigint(20) unsigned NOT NULL, -UNIQUE KEY m (uid,gid,rid,cid) -) engine=ndbcluster; -INSERT INTO t4 VALUES (1,1,2,4); -INSERT INTO t4 VALUES (1,1,2,3); -INSERT INTO t4 VALUES (1,1,5,7); -INSERT INTO t4 VALUES (1,1,10,8); -CREATE TABLE t5 ( -rid bigint(20) unsigned NOT NULL auto_increment, -rl varchar(255) NOT NULL default '', -PRIMARY KEY (rid) -) engine=ndbcluster; -CREATE TABLE t6 ( -uid bigint(20) unsigned NOT NULL auto_increment, -un varchar(250) NOT NULL default '', -uc smallint(5) unsigned NOT NULL default '0', -PRIMARY KEY (uid), -UNIQUE KEY nc (un,uc) -) engine=ndbcluster; -INSERT INTO t6 VALUES (1,'test',8); -INSERT INTO t6 VALUES (2,'test2',9); -INSERT INTO t6 VALUES (3,'tre',3); -CREATE TABLE t7 ( -mid bigint(20) unsigned NOT NULL PRIMARY KEY, -uid bigint(20) unsigned NOT NULL default '0', -gid bigint(20) unsigned NOT NULL, -rid bigint(20) unsigned NOT NULL, -cid bigint(20) unsigned NOT NULL, -UNIQUE KEY m (uid,gid,rid,cid) -) engine=ndbcluster; -INSERT INTO t7 VALUES(1, 1, 1, 1, 1); -INSERT INTO t7 VALUES(2, 2, 1, 1, 1); -INSERT INTO t7 VALUES(3, 3, 1, 1, 1); -INSERT INTO t7 VALUES(4, 4, 1, 1, 1); -INSERT INTO t7 VALUES(5, 5, 1, 1, 1); -INSERT INTO t7 VALUES(6, 1, 1, 1, 6); -INSERT INTO t7 VALUES(7, 2, 1, 1, 7); -INSERT INTO t7 VALUES(8, 3, 1, 1, 8); -INSERT INTO t7 VALUES(9, 4, 1, 1, 9); -INSERT INTO t7 VALUES(10, 5, 1, 1, 10); -select * from t1 where cv = 'dummy'; -cid cv -8 dummy -select * from t1 where cv = 'test'; -cid cv -select * from t2 where cap = 'another dummy'; -cid cap -1 another dummy -select * from t4 where uid = 1 and gid=1 and rid=2 and cid=4; -uid gid rid cid -1 1 2 4 -select * from t4 where uid = 1 and gid=1 and rid=1 and cid=4; -uid gid rid cid -select * from t4 where uid = 1 order by cid; -uid gid rid cid -1 1 2 3 -1 1 2 4 -1 1 5 7 -1 1 10 8 -select * from t4 where rid = 2 order by cid; -uid gid rid cid -1 1 2 3 -1 1 2 4 -select * from t6 where un='test' and uc=8; -uid un uc -1 test 8 -select * from t6 where un='test' and uc=7; -uid un uc -select * from t6 where un='test'; -uid un uc -1 test 8 -select * from t7 where mid = 8; -mid uid gid rid cid -8 3 1 1 8 -select * from t7 where uid = 8; -mid uid gid rid cid -select * from t7 where uid = 1 order by mid; -mid uid gid rid cid -1 1 1 1 1 -6 1 1 1 6 -select * from t7 where uid = 4 order by mid; -mid uid gid rid cid -4 4 1 1 1 -9 4 1 1 9 -select * from t7 where gid = 4; -mid uid gid rid cid -select * from t7 where gid = 1 order by mid; -mid uid gid rid cid -1 1 1 1 1 -2 2 1 1 1 -3 3 1 1 1 -4 4 1 1 1 -5 5 1 1 1 -6 1 1 1 6 -7 2 1 1 7 -8 3 1 1 8 -9 4 1 1 9 -10 5 1 1 10 -select * from t7 where cid = 4; -mid uid gid rid cid -select * from t7 where cid = 8; -mid uid gid rid cid -8 3 1 1 8 -select * from t4 where uid = 1 and gid=1 and rid=2 and cid=4; -uid gid rid cid -1 1 2 4 -select * from t4 where uid = 1 and gid=1 and rid=1 and cid=4; -uid gid rid cid -select * from t4 where uid = 1 order by gid,cid; -uid gid rid cid -1 1 2 3 -1 1 2 4 -1 1 5 7 -1 1 10 8 -1 1 5 12 -1 2 5 12 -1 3 9 11 -1 3 5 12 -1 4 5 12 -1 5 5 12 -1 6 5 12 -1 7 5 12 -1 8 5 12 -1 9 5 12 -1 10 5 12 -1 11 5 12 -1 12 5 12 -1 13 5 12 -1 14 5 12 -1 15 5 12 -1 16 5 12 -1 17 5 12 -1 18 5 12 -1 19 5 12 -1 20 5 12 -1 21 5 12 -1 22 5 12 -1 23 5 12 -1 24 5 12 -1 25 5 12 -1 26 5 12 -1 27 5 12 -1 28 5 12 -1 29 5 12 -1 30 5 12 -1 31 5 12 -1 32 5 12 -1 33 5 12 -1 34 5 12 -1 35 5 12 -1 36 5 12 -1 37 5 12 -1 38 5 12 -1 39 5 12 -1 40 5 12 -1 41 5 12 -1 42 5 12 -1 43 5 12 -1 44 5 12 -1 45 5 12 -1 46 5 12 -1 47 5 12 -1 48 5 12 -1 49 5 12 -1 50 5 12 -1 51 5 12 -1 52 5 12 -1 53 5 12 -1 54 5 12 -1 55 5 12 -1 56 5 12 -1 57 5 12 -1 58 5 12 -1 59 5 12 -1 60 5 12 -1 61 5 12 -1 62 5 12 -1 63 5 12 -1 64 5 12 -1 65 5 12 -1 66 5 12 -1 67 5 12 -1 68 5 12 -1 69 5 12 -1 70 5 12 -1 71 5 12 -1 72 5 12 -1 73 5 12 -1 74 5 12 -1 75 5 12 -1 76 5 12 -1 77 5 12 -1 78 5 12 -1 79 5 12 -1 80 5 12 -1 81 5 12 -1 82 5 12 -1 83 5 12 -1 84 5 12 -1 85 5 12 -1 86 5 12 -1 87 5 12 -1 88 5 12 -1 89 5 12 -1 90 5 12 -1 91 5 12 -1 92 5 12 -1 93 5 12 -1 94 5 12 -1 95 5 12 -1 96 5 12 -1 97 5 12 -1 98 5 12 -1 99 5 12 -1 100 5 12 -select * from t4 where uid = 1 order by gid,cid; -uid gid rid cid -1 1 2 3 -1 1 2 4 -1 1 5 7 -1 1 10 8 -1 1 5 12 -1 2 5 12 -1 3 9 11 -1 3 5 12 -1 4 5 12 -1 5 5 12 -1 6 5 12 -1 7 5 12 -1 8 5 12 -1 9 5 12 -1 10 5 12 -1 11 5 12 -1 12 5 12 -1 13 5 12 -1 14 5 12 -1 15 5 12 -1 16 5 12 -1 17 5 12 -1 18 5 12 -1 19 5 12 -1 20 5 12 -1 21 5 12 -1 22 5 12 -1 23 5 12 -1 24 5 12 -1 25 5 12 -1 26 5 12 -1 27 5 12 -1 28 5 12 -1 29 5 12 -1 30 5 12 -1 31 5 12 -1 32 5 12 -1 33 5 12 -1 34 5 12 -1 35 5 12 -1 36 5 12 -1 37 5 12 -1 38 5 12 -1 39 5 12 -1 40 5 12 -1 41 5 12 -1 42 5 12 -1 43 5 12 -1 44 5 12 -1 45 5 12 -1 46 5 12 -1 47 5 12 -1 48 5 12 -1 49 5 12 -1 50 5 12 -1 51 5 12 -1 52 5 12 -1 53 5 12 -1 54 5 12 -1 55 5 12 -1 56 5 12 -1 57 5 12 -1 58 5 12 -1 59 5 12 -1 60 5 12 -1 61 5 12 -1 62 5 12 -1 63 5 12 -1 64 5 12 -1 65 5 12 -1 66 5 12 -1 67 5 12 -1 68 5 12 -1 69 5 12 -1 70 5 12 -1 71 5 12 -1 72 5 12 -1 73 5 12 -1 74 5 12 -1 75 5 12 -1 76 5 12 -1 77 5 12 -1 78 5 12 -1 79 5 12 -1 80 5 12 -1 81 5 12 -1 82 5 12 -1 83 5 12 -1 84 5 12 -1 85 5 12 -1 86 5 12 -1 87 5 12 -1 88 5 12 -1 89 5 12 -1 90 5 12 -1 91 5 12 -1 92 5 12 -1 93 5 12 -1 94 5 12 -1 95 5 12 -1 96 5 12 -1 97 5 12 -1 98 5 12 -1 99 5 12 -1 100 5 12 -select * from t4 where rid = 2 order by cid; -uid gid rid cid -1 1 2 3 -1 1 2 4 -drop table t1,t2,t3,t4,t5,t6,t7; -CREATE TABLE t1 ( -a int unsigned NOT NULL PRIMARY KEY, -b int unsigned, -c int unsigned, -UNIQUE bc(b,c) ) engine = ndb; -insert into t1 values(1,1,1),(2,NULL,2),(3,NULL,NULL),(4,4,NULL); -select * from t1 where b=1 and c=1; -a b c -1 1 1 -select * from t1 where b is null and c is null; -a b c -3 NULL NULL -select * from t1 where b is null and c = 2; -a b c -2 NULL 2 -select * from t1 where b = 4 and c is null; -a b c -4 4 NULL -create table t8 as -select * from t1 where (b = 1 and c = 1) -or (b is null and c is null) -or (b is null and c = 2) -or (b = 4 and c is null); -select * from t8 order by a; -a b c -1 1 1 -2 NULL 2 -3 NULL NULL -4 4 NULL -select * from t1 order by a; -a b c -1 1 1 -2 NULL 2 -3 NULL NULL -4 4 NULL -drop table t1, t8; -create table t1( -id integer not null auto_increment, -month integer not null, -year integer not null, -code varchar( 2) not null, -primary key ( id), -unique idx_t1( month, code, year) -) engine=ndb; -INSERT INTO t1 (month, year, code) VALUES (4,2004,'12'); -INSERT INTO t1 (month, year, code) VALUES (5,2004,'12'); -select * from t1 where code = '12' and month = 4 and year = 2004 ; -id month year code -1 4 2004 12 -drop table t1; -create table t1 (a int primary key, b varchar(1000) not null, unique key (b)) -engine=ndb charset=utf8; -insert into t1 values (1, repeat(_utf8 0xe288ab6474, 200)); -insert into t1 values (2, repeat(_utf8 0xe288ab6474, 200)); -ERROR 23000: Duplicate entry '\222Bdt\222Bdt\222Bdt\222Bdt\222Bdt\222Bdt\222Bdt\222Bdt\222Bdt\222Bdt\222Bdt\222Bdt\222Bd' for key 'b' -select a, sha1(b) from t1; -a sha1(b) -1 08f5d02c8b8bc244f275bdfc22c42c5cab0d9d7d -drop table t1; -create table t1(id int not null) engine = NDB; -alter table t1 add constraint uk_test unique (id) using hash; -drop table t1; diff --git a/mysql-test/suite/ndb/r/ndb_insert.result b/mysql-test/suite/ndb/r/ndb_insert.result deleted file mode 100644 index 7551dc71823..00000000000 --- a/mysql-test/suite/ndb/r/ndb_insert.result +++ /dev/null @@ -1,659 +0,0 @@ -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -pk1 INT NOT NULL PRIMARY KEY, -b INT NOT NULL, -c INT NOT NULL -) ENGINE=ndbcluster; -INSERT INTO t1 VALUES (0, 0, 0); -SELECT * FROM t1; -pk1 b c -0 0 0 -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10), -(11,11,11),(12,12,12),(13,13,13),(14,14,14),(15,15,15), -(16,16,16),(17,17,17),(18,18,18),(19,19,19),(20,20,20), -(21,21,21),(22,22,22),(23,23,23),(24,24,24),(25,25,25), -(26,26,26),(27,27,27),(28,28,28),(29,29,29),(30,30,30), -(31,31,31),(32,32,32),(33,33,33),(34,34,34),(35,35,35), -(36,36,36),(37,37,37),(38,38,38),(39,39,39),(40,40,40), -(41,41,41),(42,42,42),(43,43,43),(44,44,44),(45,45,45), -(46,46,46),(47,47,47),(48,48,48),(49,49,49),(50,50,50), -(51,51,51),(52,52,52),(53,53,53),(54,54,54),(55,55,55), -(56,56,56),(57,57,57),(58,58,58),(59,59,59),(60,60,60), -(61,61,61),(62,62,62),(63,63,63),(64,64,64),(65,65,65), -(66,66,66),(67,67,67),(68,68,68),(69,69,69),(70,70,70), -(71,71,71),(72,72,72),(73,73,73),(74,74,74),(75,75,75), -(76,76,76),(77,77,77),(78,78,78),(79,79,79),(80,80,80), -(81,81,81),(82,82,82),(83,83,83),(84,84,84),(85,85,85), -(86,86,86),(87,87,87),(88,88,88),(89,89,89),(90,90,90), -(91,91,91),(92,92,92),(93,93,93),(94,94,94),(95,95,95), -(96,96,96),(97,97,97),(98,98,98),(99,99,99),(100,100,100), -(101,101,101),(102,102,102),(103,103,103),(104,104,104),(105,105,105), -(106,106,106),(107,107,107),(108,108,108),(109,109,109),(110,110,110), -(111,111,111),(112,112,112),(113,113,113),(114,114,114),(115,115,115), -(116,116,116),(117,117,117),(118,118,118),(119,119,119),(120,120,120), -(121,121,121),(122,122,122),(123,123,123),(124,124,124),(125,125,125), -(126,126,126),(127,127,127),(128,128,128),(129,129,129),(130,130,130), -(131,131,131),(132,132,132),(133,133,133),(134,134,134),(135,135,135), -(136,136,136),(137,137,137),(138,138,138),(139,139,139),(140,140,140), -(141,141,141),(142,142,142),(143,143,143),(144,144,144),(145,145,145), -(146,146,146),(147,147,147),(148,148,148),(149,149,149),(150,150,150), -(151,151,151),(152,152,152),(153,153,153),(154,154,154),(155,155,155), -(156,156,156),(157,157,157),(158,158,158),(159,159,159),(160,160,160), -(161,161,161),(162,162,162),(163,163,163),(164,164,164),(165,165,165), -(166,166,166),(167,167,167),(168,168,168),(169,169,169),(170,170,170), -(171,171,171),(172,172,172),(173,173,173),(174,174,174),(175,175,175), -(176,176,176),(177,177,177),(178,178,178),(179,179,179),(180,180,180), -(181,181,181),(182,182,182),(183,183,183),(184,184,184),(185,185,185), -(186,186,186),(187,187,187),(188,188,188),(189,189,189),(190,190,190), -(191,191,191),(192,192,192),(193,193,193),(194,194,194),(195,195,195), -(196,196,196),(197,197,197),(198,198,198),(199,199,199),(200,200,200), -(201,201,201),(202,202,202),(203,203,203),(204,204,204),(205,205,205), -(206,206,206),(207,207,207),(208,208,208),(209,209,209),(210,210,210), -(211,211,211),(212,212,212),(213,213,213),(214,214,214),(215,215,215), -(216,216,216),(217,217,217),(218,218,218),(219,219,219),(220,220,220), -(221,221,221),(222,222,222),(223,223,223),(224,224,224),(225,225,225), -(226,226,226),(227,227,227),(228,228,228),(229,229,229),(230,230,230), -(231,231,231),(232,232,232),(233,233,233),(234,234,234),(235,235,235), -(236,236,236),(237,237,237),(238,238,238),(239,239,239),(240,240,240), -(241,241,241),(242,242,242),(243,243,243),(244,244,244),(245,245,245), -(246,246,246),(247,247,247),(248,248,248),(249,249,249),(250,250,250), -(251,251,251),(252,252,252),(253,253,253),(254,254,254),(255,255,255), -(256,256,256),(257,257,257),(258,258,258),(259,259,259),(260,260,260), -(261,261,261),(262,262,262),(263,263,263),(264,264,264),(265,265,265), -(266,266,266),(267,267,267),(268,268,268),(269,269,269),(270,270,270), -(271,271,271),(272,272,272),(273,273,273),(274,274,274),(275,275,275), -(276,276,276),(277,277,277),(278,278,278),(279,279,279),(280,280,280), -(281,281,281),(282,282,282),(283,283,283),(284,284,284),(285,285,285), -(286,286,286),(287,287,287),(288,288,288),(289,289,289),(290,290,290), -(291,291,291),(292,292,292),(293,293,293),(294,294,294),(295,295,295), -(296,296,296),(297,297,297),(298,298,298),(299,299,299),(300,300,300), -(301,301,301),(302,302,302),(303,303,303),(304,304,304),(305,305,305), -(306,306,306),(307,307,307),(308,308,308),(309,309,309),(310,310,310), -(311,311,311),(312,312,312),(313,313,313),(314,314,314),(315,315,315), -(316,316,316),(317,317,317),(318,318,318),(319,319,319),(320,320,320), -(321,321,321),(322,322,322),(323,323,323),(324,324,324),(325,325,325), -(326,326,326),(327,327,327),(328,328,328),(329,329,329),(330,330,330), -(331,331,331),(332,332,332),(333,333,333),(334,334,334),(335,335,335), -(336,336,336),(337,337,337),(338,338,338),(339,339,339),(340,340,340), -(341,341,341),(342,342,342),(343,343,343),(344,344,344),(345,345,345), -(346,346,346),(347,347,347),(348,348,348),(349,349,349),(350,350,350), -(351,351,351),(352,352,352),(353,353,353),(354,354,354),(355,355,355), -(356,356,356),(357,357,357),(358,358,358),(359,359,359),(360,360,360), -(361,361,361),(362,362,362),(363,363,363),(364,364,364),(365,365,365), -(366,366,366),(367,367,367),(368,368,368),(369,369,369),(370,370,370), -(371,371,371),(372,372,372),(373,373,373),(374,374,374),(375,375,375), -(376,376,376),(377,377,377),(378,378,378),(379,379,379),(380,380,380), -(381,381,381),(382,382,382),(383,383,383),(384,384,384),(385,385,385), -(386,386,386),(387,387,387),(388,388,388),(389,389,389),(390,390,390), -(391,391,391),(392,392,392),(393,393,393),(394,394,394),(395,395,395), -(396,396,396),(397,397,397),(398,398,398),(399,399,399),(400,400,400), -(401,401,401),(402,402,402),(403,403,403),(404,404,404),(405,405,405), -(406,406,406),(407,407,407),(408,408,408),(409,409,409),(410,410,410), -(411,411,411),(412,412,412),(413,413,413),(414,414,414),(415,415,415), -(416,416,416),(417,417,417),(418,418,418),(419,419,419),(420,420,420), -(421,421,421),(422,422,422),(423,423,423),(424,424,424),(425,425,425), -(426,426,426),(427,427,427),(428,428,428),(429,429,429),(430,430,430), -(431,431,431),(432,432,432),(433,433,433),(434,434,434),(435,435,435), -(436,436,436),(437,437,437),(438,438,438),(439,439,439),(440,440,440), -(441,441,441),(442,442,442),(443,443,443),(444,444,444),(445,445,445), -(446,446,446),(447,447,447),(448,448,448),(449,449,449),(450,450,450), -(451,451,451),(452,452,452),(453,453,453),(454,454,454),(455,455,455), -(456,456,456),(457,457,457),(458,458,458),(459,459,459),(460,460,460), -(461,461,461),(462,462,462),(463,463,463),(464,464,464),(465,465,465), -(466,466,466),(467,467,467),(468,468,468),(469,469,469),(470,470,470), -(471,471,471),(472,472,472),(473,473,473),(474,474,474),(475,475,475), -(476,476,476),(477,477,477),(478,478,478),(479,479,479),(480,480,480), -(481,481,481),(482,482,482),(483,483,483),(484,484,484),(485,485,485), -(486,486,486),(487,487,487),(488,488,488),(489,489,489),(490,490,490), -(491,491,491),(492,492,492),(493,493,493),(494,494,494),(495,495,495), -(496,496,496),(497,497,497),(498,498,498),(499,499,499),(500, 500, 500); -SELECT COUNT(*) FROM t1; -COUNT(*) -501 -INSERT INTO t1 VALUES -(501,501,501),(502,502,502),(503,503,503),(504,504,504),(505,505,505), -(506,506,506),(507,507,507),(508,508,508),(509,509,509),(510,510,510), -(511,511,511),(512,512,512),(513,513,513),(514,514,514),(515,515,515), -(516,516,516),(517,517,517),(518,518,518),(519,519,519),(520,520,520), -(521,521,521),(522,522,522),(523,523,523),(524,524,524),(525,525,525), -(526,526,526),(527,527,527),(528,528,528),(529,529,529),(530,530,530), -(531,531,531),(532,532,532),(533,533,533),(534,534,534),(535,535,535), -(536,536,536),(537,537,537),(538,538,538),(539,539,539),(540,540,540), -(541,541,541),(542,542,542),(543,543,543),(544,544,544),(545,545,545), -(546,546,546),(547,547,547),(548,548,548),(549,549,549),(550,550,550), -(551,551,551),(552,552,552),(553,553,553),(554,554,554),(555,555,555), -(556,556,556),(557,557,557),(558,558,558),(559,559,559),(560,560,560), -(561,561,561),(562,562,562),(563,563,563),(564,564,564),(565,565,565), -(566,566,566),(567,567,567),(568,568,568),(569,569,569),(570,570,570), -(571,571,571),(572,572,572),(573,573,573),(574,574,574),(575,575,575), -(576,576,576),(577,577,577),(578,578,578),(579,579,579),(580,580,580), -(581,581,581),(582,582,582),(583,583,583),(584,584,584),(585,585,585), -(586,586,586),(587,587,587),(588,588,588),(589,589,589),(590,590,590), -(591,591,591),(592,592,592),(593,593,593),(594,594,594),(595,595,595), -(596,596,596),(597,597,597),(598,598,598),(599,599,599),(600,600,600), -(601,601,601),(602,602,602),(603,603,603),(604,604,604),(605,605,605), -(606,606,606),(607,607,607),(608,608,608),(609,609,609),(610,610,610), -(611,611,611),(612,612,612),(613,613,613),(614,614,614),(615,615,615), -(616,616,616),(617,617,617),(618,618,618),(619,619,619),(620,620,620), -(621,621,621),(622,622,622),(623,623,623),(624,624,624),(625,625,625), -(626,626,626),(627,627,627),(628,628,628),(629,629,629),(630,630,630), -(631,631,631),(632,632,632),(633,633,633),(634,634,634),(635,635,635), -(636,636,636),(637,637,637),(638,638,638),(639,639,639),(640,640,640), -(641,641,641),(642,642,642),(643,643,643),(644,644,644),(645,645,645), -(646,646,646),(647,647,647),(648,648,648),(649,649,649),(650,650,650), -(651,651,651),(652,652,652),(653,653,653),(654,654,654),(655,655,655), -(656,656,656),(657,657,657),(658,658,658),(659,659,659),(660,660,660), -(661,661,661),(662,662,662),(663,663,663),(664,664,664),(665,665,665), -(666,666,666),(667,667,667),(668,668,668),(669,669,669),(670,670,670), -(671,671,671),(672,672,672),(673,673,673),(674,674,674),(675,675,675), -(676,676,676),(677,677,677),(678,678,678),(679,679,679),(680,680,680), -(681,681,681),(682,682,682),(683,683,683),(684,684,684),(685,685,685), -(686,686,686),(687,687,687),(688,688,688),(689,689,689),(690,690,690), -(691,691,691),(692,692,692),(693,693,693),(694,694,694),(695,695,695), -(696,696,696),(697,697,697),(698,698,698),(699,699,699),(700,700,700), -(701,701,701),(702,702,702),(703,703,703),(704,704,704),(705,705,705), -(706,706,706),(707,707,707),(708,708,708),(709,709,709),(710,710,710), -(711,711,711),(712,712,712),(713,713,713),(714,714,714),(715,715,715), -(716,716,716),(717,717,717),(718,718,718),(719,719,719),(720,720,720), -(721,721,721),(722,722,722),(723,723,723),(724,724,724),(725,725,725), -(726,726,726),(727,727,727),(728,728,728),(729,729,729),(730,730,730), -(731,731,731),(732,732,732),(733,733,733),(734,734,734),(735,735,735), -(736,736,736),(737,737,737),(738,738,738),(739,739,739),(740,740,740), -(741,741,741),(742,742,742),(743,743,743),(744,744,744),(745,745,745), -(746,746,746),(747,747,747),(748,748,748),(749,749,749),(750,750,750), -(751,751,751),(752,752,752),(753,753,753),(754,754,754),(755,755,755), -(756,756,756),(757,757,757),(758,758,758),(759,759,759),(760,760,760), -(761,761,761),(762,762,762),(763,763,763),(764,764,764),(765,765,765), -(766,766,766),(767,767,767),(768,768,768),(769,769,769),(770,770,770), -(771,771,771),(772,772,772),(773,773,773),(774,774,774),(775,775,775), -(776,776,776),(777,777,777),(778,778,778),(779,779,779),(780,780,780), -(781,781,781),(782,782,782),(783,783,783),(784,784,784),(785,785,785), -(786,786,786),(787,787,787),(788,788,788),(789,789,789),(790,790,790), -(791,791,791),(792,792,792),(793,793,793),(794,794,794),(795,795,795), -(796,796,796),(797,797,797),(798,798,798),(799,799,799),(800,800,800), -(801,801,801),(802,802,802),(803,803,803),(804,804,804),(805,805,805), -(806,806,806),(807,807,807),(808,808,808),(809,809,809),(810,810,810), -(811,811,811),(812,812,812),(813,813,813),(814,814,814),(815,815,815), -(816,816,816),(817,817,817),(818,818,818),(819,819,819),(820,820,820), -(821,821,821),(822,822,822),(823,823,823),(824,824,824),(825,825,825), -(826,826,826),(827,827,827),(828,828,828),(829,829,829),(830,830,830), -(831,831,831),(832,832,832),(833,833,833),(834,834,834),(835,835,835), -(836,836,836),(837,837,837),(838,838,838),(839,839,839),(840,840,840), -(841,841,841),(842,842,842),(843,843,843),(844,844,844),(845,845,845), -(846,846,846),(847,847,847),(848,848,848),(849,849,849),(850,850,850), -(851,851,851),(852,852,852),(853,853,853),(854,854,854),(855,855,855), -(856,856,856),(857,857,857),(858,858,858),(859,859,859),(860,860,860), -(861,861,861),(862,862,862),(863,863,863),(864,864,864),(865,865,865), -(866,866,866),(867,867,867),(868,868,868),(869,869,869),(870,870,870), -(871,871,871),(872,872,872),(873,873,873),(874,874,874),(875,875,875), -(876,876,876),(877,877,877),(878,878,878),(879,879,879),(880,880,880), -(881,881,881),(882,882,882),(883,883,883),(884,884,884),(885,885,885), -(886,886,886),(887,887,887),(888,888,888),(889,889,889),(890,890,890), -(891,891,891),(892,892,892),(893,893,893),(894,894,894),(895,895,895), -(896,896,896),(897,897,897),(898,898,898),(899,899,899),(900,900,900), -(901,901,901),(902,902,902),(903,903,903),(904,904,904),(905,905,905), -(906,906,906),(907,907,907),(908,908,908),(909,909,909),(910,910,910), -(911,911,911),(912,912,912),(913,913,913),(914,914,914),(915,915,915), -(916,916,916),(917,917,917),(918,918,918),(919,919,919),(920,920,920), -(921,921,921),(922,922,922),(923,923,923),(924,924,924),(925,925,925), -(926,926,926),(927,927,927),(928,928,928),(929,929,929),(930,930,930), -(931,931,931),(932,932,932),(933,933,933),(934,934,934),(935,935,935), -(936,936,936),(937,937,937),(938,938,938),(939,939,939),(940,940,940), -(941,941,941),(942,942,942),(943,943,943),(944,944,944),(945,945,945), -(946,946,946),(947,947,947),(948,948,948),(949,949,949),(950,950,950), -(951,951,951),(952,952,952),(953,953,953),(954,954,954),(955,955,955), -(956,956,956),(957,957,957),(958,958,958),(959,959,959),(960,960,960), -(961,961,961),(962,962,962),(963,963,963),(964,964,964),(965,965,965), -(966,966,966),(967,967,967),(968,968,968),(969,969,969),(970,970,970), -(971,971,971),(972,972,972),(973,973,973),(974,974,974),(975,975,975), -(976,976,976),(977,977,977),(978,978,978),(979,979,979),(980,980,980), -(981,981,981),(982,982,982),(983,983,983),(984,984,984),(985,985,985), -(986,986,986),(987,987,987),(988,988,988),(989,989,989),(990,990,990), -(991,991,991),(992,992,992),(993,993,993),(994,994,994),(995,995,995), -(996,996,996),(997,997,997),(998,998,998),(999,999,999),(1000,1000,1000), -(1001,1001,1001),(1002,1002,1002),(1003,1003,1003),(1004,1004,1004),(1005,1005,1005), -(1006,1006,1006),(1007,1007,1007),(1008,1008,1008),(1009,1009,1009),(1010,1010,1010), -(1011,1011,1011),(1012,1012,1012),(1013,1013,1013),(1014,1014,1014),(1015,1015,1015), -(1016,1016,1016),(1017,1017,1017),(1018,1018,1018),(1019,1019,1019),(1020,1020,1020), -(1021,1021,1021),(1022,1022,1022),(1023,1023,1023),(1024,1024,1024),(1025,1025,1025), -(1026,1026,1026),(1027,1027,1027),(1028,1028,1028),(1029,1029,1029),(1030,1030,1030), -(1031,1031,1031),(1032,1032,1032),(1033,1033,1033),(1034,1034,1034),(1035,1035,1035), -(1036,1036,1036),(1037,1037,1037),(1038,1038,1038),(1039,1039,1039),(1040,1040,1040), -(1041,1041,1041),(1042,1042,1042),(1043,1043,1043),(1044,1044,1044),(1045,1045,1045), -(1046,1046,1046),(1047,1047,1047),(1048,1048,1048),(1049,1049,1049),(1050,1050,1050), -(1051,1051,1051),(1052,1052,1052),(1053,1053,1053),(1054,1054,1054),(1055,1055,1055), -(1056,1056,1056),(1057,1057,1057),(1058,1058,1058),(1059,1059,1059),(1060,1060,1060), -(1061,1061,1061),(1062,1062,1062),(1063,1063,1063),(1064,1064,1064),(1065,1065,1065), -(1066,1066,1066),(1067,1067,1067),(1068,1068,1068),(1069,1069,1069),(1070,1070,1070), -(1071,1071,1071),(1072,1072,1072),(1073,1073,1073),(1074,1074,1074),(1075,1075,1075), -(1076,1076,1076),(1077,1077,1077),(1078,1078,1078),(1079,1079,1079),(1080,1080,1080), -(1081,1081,1081),(1082,1082,1082),(1083,1083,1083),(1084,1084,1084),(1085,1085,1085), -(1086,1086,1086),(1087,1087,1087),(1088,1088,1088),(1089,1089,1089),(1090,1090,1090), -(1091,1091,1091),(1092,1092,1092),(1093,1093,1093),(1094,1094,1094),(1095,1095,1095), -(1096,1096,1096),(1097,1097,1097),(1098,1098,1098),(1099,1099,1099),(1100,1100,1100), -(1101,1101,1101),(1102,1102,1102),(1103,1103,1103),(1104,1104,1104),(1105,1105,1105), -(1106,1106,1106),(1107,1107,1107),(1108,1108,1108),(1109,1109,1109),(1110,1110,1110), -(1111,1111,1111),(1112,1112,1112),(1113,1113,1113),(1114,1114,1114),(1115,1115,1115), -(1116,1116,1116),(1117,1117,1117),(1118,1118,1118),(1119,1119,1119),(1120,1120,1120), -(1121,1121,1121),(1122,1122,1122),(1123,1123,1123),(1124,1124,1124),(1125,1125,1125), -(1126,1126,1126),(1127,1127,1127),(1128,1128,1128),(1129,1129,1129),(1130,1130,1130), -(1131,1131,1131),(1132,1132,1132),(1133,1133,1133),(1134,1134,1134),(1135,1135,1135), -(1136,1136,1136),(1137,1137,1137),(1138,1138,1138),(1139,1139,1139),(1140,1140,1140), -(1141,1141,1141),(1142,1142,1142),(1143,1143,1143),(1144,1144,1144),(1145,1145,1145), -(1146,1146,1146),(1147,1147,1147),(1148,1148,1148),(1149,1149,1149),(1150,1150,1150), -(1151,1151,1151),(1152,1152,1152),(1153,1153,1153),(1154,1154,1154),(1155,1155,1155), -(1156,1156,1156),(1157,1157,1157),(1158,1158,1158),(1159,1159,1159),(1160,1160,1160), -(1161,1161,1161),(1162,1162,1162),(1163,1163,1163),(1164,1164,1164),(1165,1165,1165), -(1166,1166,1166),(1167,1167,1167),(1168,1168,1168),(1169,1169,1169),(1170,1170,1170), -(1171,1171,1171),(1172,1172,1172),(1173,1173,1173),(1174,1174,1174),(1175,1175,1175), -(1176,1176,1176),(1177,1177,1177),(1178,1178,1178),(1179,1179,1179),(1180,1180,1180), -(1181,1181,1181),(1182,1182,1182),(1183,1183,1183),(1184,1184,1184),(1185,1185,1185), -(1186,1186,1186),(1187,1187,1187),(1188,1188,1188),(1189,1189,1189),(1190,1190,1190), -(1191,1191,1191),(1192,1192,1192),(1193,1193,1193),(1194,1194,1194),(1195,1195,1195), -(1196,1196,1196),(1197,1197,1197),(1198,1198,1198),(1199,1199,1199),(1200,1200,1200), -(1201,1201,1201),(1202,1202,1202),(1203,1203,1203),(1204,1204,1204),(1205,1205,1205), -(1206,1206,1206),(1207,1207,1207),(1208,1208,1208),(1209,1209,1209),(1210,1210,1210), -(1211,1211,1211),(1212,1212,1212),(1213,1213,1213),(1214,1214,1214),(1215,1215,1215), -(1216,1216,1216),(1217,1217,1217),(1218,1218,1218),(1219,1219,1219),(1220,1220,1220), -(1221,1221,1221),(1222,1222,1222),(1223,1223,1223),(1224,1224,1224),(1225,1225,1225), -(1226,1226,1226),(1227,1227,1227),(1228,1228,1228),(1229,1229,1229),(1230,1230,1230), -(1231,1231,1231),(1232,1232,1232),(1233,1233,1233),(1234,1234,1234),(1235,1235,1235), -(1236,1236,1236),(1237,1237,1237),(1238,1238,1238),(1239,1239,1239),(1240,1240,1240), -(1241,1241,1241),(1242,1242,1242),(1243,1243,1243),(1244,1244,1244),(1245,1245,1245), -(1246,1246,1246),(1247,1247,1247),(1248,1248,1248),(1249,1249,1249),(1250,1250,1250), -(1251,1251,1251),(1252,1252,1252),(1253,1253,1253),(1254,1254,1254),(1255,1255,1255), -(1256,1256,1256),(1257,1257,1257),(1258,1258,1258),(1259,1259,1259),(1260,1260,1260), -(1261,1261,1261),(1262,1262,1262),(1263,1263,1263),(1264,1264,1264),(1265,1265,1265), -(1266,1266,1266),(1267,1267,1267),(1268,1268,1268),(1269,1269,1269),(1270,1270,1270), -(1271,1271,1271),(1272,1272,1272),(1273,1273,1273),(1274,1274,1274),(1275,1275,1275), -(1276,1276,1276),(1277,1277,1277),(1278,1278,1278),(1279,1279,1279),(1280,1280,1280), -(1281,1281,1281),(1282,1282,1282),(1283,1283,1283),(1284,1284,1284),(1285,1285,1285), -(1286,1286,1286),(1287,1287,1287),(1288,1288,1288),(1289,1289,1289),(1290,1290,1290), -(1291,1291,1291),(1292,1292,1292),(1293,1293,1293),(1294,1294,1294),(1295,1295,1295), -(1296,1296,1296),(1297,1297,1297),(1298,1298,1298),(1299,1299,1299),(1300,1300,1300), -(1301,1301,1301),(1302,1302,1302),(1303,1303,1303),(1304,1304,1304),(1305,1305,1305), -(1306,1306,1306),(1307,1307,1307),(1308,1308,1308),(1309,1309,1309),(1310,1310,1310), -(1311,1311,1311),(1312,1312,1312),(1313,1313,1313),(1314,1314,1314),(1315,1315,1315), -(1316,1316,1316),(1317,1317,1317),(1318,1318,1318),(1319,1319,1319),(1320,1320,1320), -(1321,1321,1321),(1322,1322,1322),(1323,1323,1323),(1324,1324,1324),(1325,1325,1325), -(1326,1326,1326),(1327,1327,1327),(1328,1328,1328),(1329,1329,1329),(1330,1330,1330), -(1331,1331,1331),(1332,1332,1332),(1333,1333,1333),(1334,1334,1334),(1335,1335,1335), -(1336,1336,1336),(1337,1337,1337),(1338,1338,1338),(1339,1339,1339),(1340,1340,1340), -(1341,1341,1341),(1342,1342,1342),(1343,1343,1343),(1344,1344,1344),(1345,1345,1345), -(1346,1346,1346),(1347,1347,1347),(1348,1348,1348),(1349,1349,1349),(1350,1350,1350), -(1351,1351,1351),(1352,1352,1352),(1353,1353,1353),(1354,1354,1354),(1355,1355,1355), -(1356,1356,1356),(1357,1357,1357),(1358,1358,1358),(1359,1359,1359),(1360,1360,1360), -(1361,1361,1361),(1362,1362,1362),(1363,1363,1363),(1364,1364,1364),(1365,1365,1365), -(1366,1366,1366),(1367,1367,1367),(1368,1368,1368),(1369,1369,1369),(1370,1370,1370), -(1371,1371,1371),(1372,1372,1372),(1373,1373,1373),(1374,1374,1374),(1375,1375,1375), -(1376,1376,1376),(1377,1377,1377),(1378,1378,1378),(1379,1379,1379),(1380,1380,1380), -(1381,1381,1381),(1382,1382,1382),(1383,1383,1383),(1384,1384,1384),(1385,1385,1385), -(1386,1386,1386),(1387,1387,1387),(1388,1388,1388),(1389,1389,1389),(1390,1390,1390), -(1391,1391,1391),(1392,1392,1392),(1393,1393,1393),(1394,1394,1394),(1395,1395,1395), -(1396,1396,1396),(1397,1397,1397),(1398,1398,1398),(1399,1399,1399),(1400,1400,1400), -(1401,1401,1401),(1402,1402,1402),(1403,1403,1403),(1404,1404,1404),(1405,1405,1405), -(1406,1406,1406),(1407,1407,1407),(1408,1408,1408),(1409,1409,1409),(1410,1410,1410), -(1411,1411,1411),(1412,1412,1412),(1413,1413,1413),(1414,1414,1414),(1415,1415,1415), -(1416,1416,1416),(1417,1417,1417),(1418,1418,1418),(1419,1419,1419),(1420,1420,1420), -(1421,1421,1421),(1422,1422,1422),(1423,1423,1423),(1424,1424,1424),(1425,1425,1425), -(1426,1426,1426),(1427,1427,1427),(1428,1428,1428),(1429,1429,1429),(1430,1430,1430), -(1431,1431,1431),(1432,1432,1432),(1433,1433,1433),(1434,1434,1434),(1435,1435,1435), -(1436,1436,1436),(1437,1437,1437),(1438,1438,1438),(1439,1439,1439),(1440,1440,1440), -(1441,1441,1441),(1442,1442,1442),(1443,1443,1443),(1444,1444,1444),(1445,1445,1445), -(1446,1446,1446),(1447,1447,1447),(1448,1448,1448),(1449,1449,1449),(1450,1450,1450), -(1451,1451,1451),(1452,1452,1452),(1453,1453,1453),(1454,1454,1454),(1455,1455,1455), -(1456,1456,1456),(1457,1457,1457),(1458,1458,1458),(1459,1459,1459),(1460,1460,1460), -(1461,1461,1461),(1462,1462,1462),(1463,1463,1463),(1464,1464,1464),(1465,1465,1465), -(1466,1466,1466),(1467,1467,1467),(1468,1468,1468),(1469,1469,1469),(1470,1470,1470), -(1471,1471,1471),(1472,1472,1472),(1473,1473,1473),(1474,1474,1474),(1475,1475,1475), -(1476,1476,1476),(1477,1477,1477),(1478,1478,1478),(1479,1479,1479),(1480,1480,1480), -(1481,1481,1481),(1482,1482,1482),(1483,1483,1483),(1484,1484,1484),(1485,1485,1485), -(1486,1486,1486),(1487,1487,1487),(1488,1488,1488),(1489,1489,1489),(1490,1490,1490), -(1491,1491,1491),(1492,1492,1492),(1493,1493,1493),(1494,1494,1494),(1495,1495,1495), -(1496,1496,1496),(1497,1497,1497),(1498,1498,1498),(1499,1499,1499),(1500,1500,1500), -(1501,1501,1501),(1502,1502,1502),(1503,1503,1503),(1504,1504,1504),(1505,1505,1505), -(1506,1506,1506),(1507,1507,1507),(1508,1508,1508),(1509,1509,1509),(1510,1510,1510), -(1511,1511,1511),(1512,1512,1512),(1513,1513,1513),(1514,1514,1514),(1515,1515,1515), -(1516,1516,1516),(1517,1517,1517),(1518,1518,1518),(1519,1519,1519),(1520,1520,1520), -(1521,1521,1521),(1522,1522,1522),(1523,1523,1523),(1524,1524,1524),(1525,1525,1525), -(1526,1526,1526),(1527,1527,1527),(1528,1528,1528),(1529,1529,1529),(1530,1530,1530), -(1531,1531,1531),(1532,1532,1532),(1533,1533,1533),(1534,1534,1534),(1535,1535,1535), -(1536,1536,1536),(1537,1537,1537),(1538,1538,1538),(1539,1539,1539),(1540,1540,1540), -(1541,1541,1541),(1542,1542,1542),(1543,1543,1543),(1544,1544,1544),(1545,1545,1545), -(1546,1546,1546),(1547,1547,1547),(1548,1548,1548),(1549,1549,1549),(1550,1550,1550), -(1551,1551,1551),(1552,1552,1552),(1553,1553,1553),(1554,1554,1554),(1555,1555,1555), -(1556,1556,1556),(1557,1557,1557),(1558,1558,1558),(1559,1559,1559),(1560,1560,1560), -(1561,1561,1561),(1562,1562,1562),(1563,1563,1563),(1564,1564,1564),(1565,1565,1565), -(1566,1566,1566),(1567,1567,1567),(1568,1568,1568),(1569,1569,1569),(1570,1570,1570), -(1571,1571,1571),(1572,1572,1572),(1573,1573,1573),(1574,1574,1574),(1575,1575,1575), -(1576,1576,1576),(1577,1577,1577),(1578,1578,1578),(1579,1579,1579),(1580,1580,1580), -(1581,1581,1581),(1582,1582,1582),(1583,1583,1583),(1584,1584,1584),(1585,1585,1585), -(1586,1586,1586),(1587,1587,1587),(1588,1588,1588),(1589,1589,1589),(1590,1590,1590), -(1591,1591,1591),(1592,1592,1592),(1593,1593,1593),(1594,1594,1594),(1595,1595,1595), -(1596,1596,1596),(1597,1597,1597),(1598,1598,1598),(1599,1599,1599),(1600,1600,1600), -(1601,1601,1601),(1602,1602,1602),(1603,1603,1603),(1604,1604,1604),(1605,1605,1605), -(1606,1606,1606),(1607,1607,1607),(1608,1608,1608),(1609,1609,1609),(1610,1610,1610), -(1611,1611,1611),(1612,1612,1612),(1613,1613,1613),(1614,1614,1614),(1615,1615,1615), -(1616,1616,1616),(1617,1617,1617),(1618,1618,1618),(1619,1619,1619),(1620,1620,1620), -(1621,1621,1621),(1622,1622,1622),(1623,1623,1623),(1624,1624,1624),(1625,1625,1625), -(1626,1626,1626),(1627,1627,1627),(1628,1628,1628),(1629,1629,1629),(1630,1630,1630), -(1631,1631,1631),(1632,1632,1632),(1633,1633,1633),(1634,1634,1634),(1635,1635,1635), -(1636,1636,1636),(1637,1637,1637),(1638,1638,1638),(1639,1639,1639),(1640,1640,1640), -(1641,1641,1641),(1642,1642,1642),(1643,1643,1643),(1644,1644,1644),(1645,1645,1645), -(1646,1646,1646),(1647,1647,1647),(1648,1648,1648),(1649,1649,1649),(1650,1650,1650), -(1651,1651,1651),(1652,1652,1652),(1653,1653,1653),(1654,1654,1654),(1655,1655,1655), -(1656,1656,1656),(1657,1657,1657),(1658,1658,1658),(1659,1659,1659),(1660,1660,1660), -(1661,1661,1661),(1662,1662,1662),(1663,1663,1663),(1664,1664,1664),(1665,1665,1665), -(1666,1666,1666),(1667,1667,1667),(1668,1668,1668),(1669,1669,1669),(1670,1670,1670), -(1671,1671,1671),(1672,1672,1672),(1673,1673,1673),(1674,1674,1674),(1675,1675,1675), -(1676,1676,1676),(1677,1677,1677),(1678,1678,1678),(1679,1679,1679),(1680,1680,1680), -(1681,1681,1681),(1682,1682,1682),(1683,1683,1683),(1684,1684,1684),(1685,1685,1685), -(1686,1686,1686),(1687,1687,1687),(1688,1688,1688),(1689,1689,1689),(1690,1690,1690), -(1691,1691,1691),(1692,1692,1692),(1693,1693,1693),(1694,1694,1694),(1695,1695,1695), -(1696,1696,1696),(1697,1697,1697),(1698,1698,1698),(1699,1699,1699),(1700,1700,1700), -(1701,1701,1701),(1702,1702,1702),(1703,1703,1703),(1704,1704,1704),(1705,1705,1705), -(1706,1706,1706),(1707,1707,1707),(1708,1708,1708),(1709,1709,1709),(1710,1710,1710), -(1711,1711,1711),(1712,1712,1712),(1713,1713,1713),(1714,1714,1714),(1715,1715,1715), -(1716,1716,1716),(1717,1717,1717),(1718,1718,1718),(1719,1719,1719),(1720,1720,1720), -(1721,1721,1721),(1722,1722,1722),(1723,1723,1723),(1724,1724,1724),(1725,1725,1725), -(1726,1726,1726),(1727,1727,1727),(1728,1728,1728),(1729,1729,1729),(1730,1730,1730), -(1731,1731,1731),(1732,1732,1732),(1733,1733,1733),(1734,1734,1734),(1735,1735,1735), -(1736,1736,1736),(1737,1737,1737),(1738,1738,1738),(1739,1739,1739),(1740,1740,1740), -(1741,1741,1741),(1742,1742,1742),(1743,1743,1743),(1744,1744,1744),(1745,1745,1745), -(1746,1746,1746),(1747,1747,1747),(1748,1748,1748),(1749,1749,1749),(1750,1750,1750), -(1751,1751,1751),(1752,1752,1752),(1753,1753,1753),(1754,1754,1754),(1755,1755,1755), -(1756,1756,1756),(1757,1757,1757),(1758,1758,1758),(1759,1759,1759),(1760,1760,1760), -(1761,1761,1761),(1762,1762,1762),(1763,1763,1763),(1764,1764,1764),(1765,1765,1765), -(1766,1766,1766),(1767,1767,1767),(1768,1768,1768),(1769,1769,1769),(1770,1770,1770), -(1771,1771,1771),(1772,1772,1772),(1773,1773,1773),(1774,1774,1774),(1775,1775,1775), -(1776,1776,1776),(1777,1777,1777),(1778,1778,1778),(1779,1779,1779),(1780,1780,1780), -(1781,1781,1781),(1782,1782,1782),(1783,1783,1783),(1784,1784,1784),(1785,1785,1785), -(1786,1786,1786),(1787,1787,1787),(1788,1788,1788),(1789,1789,1789),(1790,1790,1790), -(1791,1791,1791),(1792,1792,1792),(1793,1793,1793),(1794,1794,1794),(1795,1795,1795), -(1796,1796,1796),(1797,1797,1797),(1798,1798,1798),(1799,1799,1799),(1800,1800,1800), -(1801,1801,1801),(1802,1802,1802),(1803,1803,1803),(1804,1804,1804),(1805,1805,1805), -(1806,1806,1806),(1807,1807,1807),(1808,1808,1808),(1809,1809,1809),(1810,1810,1810), -(1811,1811,1811),(1812,1812,1812),(1813,1813,1813),(1814,1814,1814),(1815,1815,1815), -(1816,1816,1816),(1817,1817,1817),(1818,1818,1818),(1819,1819,1819),(1820,1820,1820), -(1821,1821,1821),(1822,1822,1822),(1823,1823,1823),(1824,1824,1824),(1825,1825,1825), -(1826,1826,1826),(1827,1827,1827),(1828,1828,1828),(1829,1829,1829),(1830,1830,1830), -(1831,1831,1831),(1832,1832,1832),(1833,1833,1833),(1834,1834,1834),(1835,1835,1835), -(1836,1836,1836),(1837,1837,1837),(1838,1838,1838),(1839,1839,1839),(1840,1840,1840), -(1841,1841,1841),(1842,1842,1842),(1843,1843,1843),(1844,1844,1844),(1845,1845,1845), -(1846,1846,1846),(1847,1847,1847),(1848,1848,1848),(1849,1849,1849),(1850,1850,1850), -(1851,1851,1851),(1852,1852,1852),(1853,1853,1853),(1854,1854,1854),(1855,1855,1855), -(1856,1856,1856),(1857,1857,1857),(1858,1858,1858),(1859,1859,1859),(1860,1860,1860), -(1861,1861,1861),(1862,1862,1862),(1863,1863,1863),(1864,1864,1864),(1865,1865,1865), -(1866,1866,1866),(1867,1867,1867),(1868,1868,1868),(1869,1869,1869),(1870,1870,1870), -(1871,1871,1871),(1872,1872,1872),(1873,1873,1873),(1874,1874,1874),(1875,1875,1875), -(1876,1876,1876),(1877,1877,1877),(1878,1878,1878),(1879,1879,1879),(1880,1880,1880), -(1881,1881,1881),(1882,1882,1882),(1883,1883,1883),(1884,1884,1884),(1885,1885,1885), -(1886,1886,1886),(1887,1887,1887),(1888,1888,1888),(1889,1889,1889),(1890,1890,1890), -(1891,1891,1891),(1892,1892,1892),(1893,1893,1893),(1894,1894,1894),(1895,1895,1895), -(1896,1896,1896),(1897,1897,1897),(1898,1898,1898),(1899,1899,1899),(1900,1900,1900), -(1901,1901,1901),(1902,1902,1902),(1903,1903,1903),(1904,1904,1904),(1905,1905,1905), -(1906,1906,1906),(1907,1907,1907),(1908,1908,1908),(1909,1909,1909),(1910,1910,1910), -(1911,1911,1911),(1912,1912,1912),(1913,1913,1913),(1914,1914,1914),(1915,1915,1915), -(1916,1916,1916),(1917,1917,1917),(1918,1918,1918),(1919,1919,1919),(1920,1920,1920), -(1921,1921,1921),(1922,1922,1922),(1923,1923,1923),(1924,1924,1924),(1925,1925,1925), -(1926,1926,1926),(1927,1927,1927),(1928,1928,1928),(1929,1929,1929),(1930,1930,1930), -(1931,1931,1931),(1932,1932,1932),(1933,1933,1933),(1934,1934,1934),(1935,1935,1935), -(1936,1936,1936),(1937,1937,1937),(1938,1938,1938),(1939,1939,1939),(1940,1940,1940), -(1941,1941,1941),(1942,1942,1942),(1943,1943,1943),(1944,1944,1944),(1945,1945,1945), -(1946,1946,1946),(1947,1947,1947),(1948,1948,1948),(1949,1949,1949),(1950,1950,1950), -(1951,1951,1951),(1952,1952,1952),(1953,1953,1953),(1954,1954,1954),(1955,1955,1955), -(1956,1956,1956),(1957,1957,1957),(1958,1958,1958),(1959,1959,1959),(1960,1960,1960), -(1961,1961,1961),(1962,1962,1962),(1963,1963,1963),(1964,1964,1964),(1965,1965,1965), -(1966,1966,1966),(1967,1967,1967),(1968,1968,1968),(1969,1969,1969),(1970,1970,1970), -(1971,1971,1971),(1972,1972,1972),(1973,1973,1973),(1974,1974,1974),(1975,1975,1975), -(1976,1976,1976),(1977,1977,1977),(1978,1978,1978),(1979,1979,1979),(1980,1980,1980), -(1981,1981,1981),(1982,1982,1982),(1983,1983,1983),(1984,1984,1984),(1985,1985,1985), -(1986,1986,1986),(1987,1987,1987),(1988,1988,1988),(1989,1989,1989),(1990,1990,1990), -(1991,1991,1991),(1992,1992,1992),(1993,1993,1993),(1994,1994,1994),(1995,1995,1995), -(1996,1996,1996),(1997,1997,1997),(1998,1998,1998),(1999,1999,1999); -SELECT COUNT(*) FROM t1; -COUNT(*) -2000 -INSERT INTO t1 VALUES (1,1,1); -ERROR 23000: Duplicate entry '1' for key 'PRIMARY' -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10); -ERROR 23000: Can't write; duplicate key in table 't1' -select count(*) from t1; -count(*) -2000 -begin; -SELECT COUNT(*) FROM t1; -COUNT(*) -2000 -INSERT INTO t1 VALUES -(2001,2001,2001),(2002,2002,2002),(2003,2003,2003),(2004,2004,2004),(2005,2005,2005); -SELECT COUNT(*) FROM t1; -COUNT(*) -2005 -rollback; -begin; -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10); -ERROR 23000: Can't write; duplicate key in table 't1' -commit; -ERROR HY000: Got error 4350 'Transaction already aborted' from NDBCLUSTER -select * from t1 where pk1=1; -pk1 b c -1 1 1 -select * from t1 where pk1=10; -pk1 b c -10 10 10 -select count(*) from t1 where pk1 <= 10 order by pk1; -count(*) -11 -select count(*) from t1; -count(*) -2000 -begin; -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10); -ERROR 23000: Can't write; duplicate key in table 't1' -rollback; -select * from t1 where pk1=1; -pk1 b c -1 1 1 -select * from t1 where pk1=10; -pk1 b c -10 10 10 -select count(*) from t1 where pk1 <= 10 order by pk1; -count(*) -11 -select count(*) from t1; -count(*) -2000 -begin; -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10); -ERROR 23000: Can't write; duplicate key in table 't1' -SELECT * FROM t1 WHERE pk1=10; -ERROR HY000: Got error 4350 'Transaction already aborted' from NDBCLUSTER -rollback; -select * from t1 where pk1=1; -pk1 b c -1 1 1 -select * from t1 where pk1=10; -pk1 b c -10 10 10 -select count(*) from t1 where pk1 <= 10 order by pk1; -count(*) -11 -select count(*) from t1; -count(*) -2000 -begin; -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10); -ERROR 23000: Can't write; duplicate key in table 't1' -SELECT * FROM t1 WHERE pk1=10; -ERROR HY000: Got error 4350 'Transaction already aborted' from NDBCLUSTER -SELECT * FROM t1 WHERE pk1=10; -ERROR HY000: Got error 4350 'Transaction already aborted' from NDBCLUSTER -commit; -ERROR HY000: Got error 4350 'Transaction already aborted' from NDBCLUSTER -select * from t1 where pk1=1; -pk1 b c -1 1 1 -select * from t1 where pk1=10; -pk1 b c -10 10 10 -select count(*) from t1 where pk1 <= 10 order by pk1; -count(*) -11 -select count(*) from t1; -count(*) -2000 -begin; -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10); -ERROR 23000: Can't write; duplicate key in table 't1' -INSERT INTO t1 values (4000, 40, 44); -ERROR HY000: Got error 4350 'Transaction already aborted' from NDBCLUSTER -rollback; -select * from t1 where pk1=1; -pk1 b c -1 1 1 -select * from t1 where pk1=10; -pk1 b c -10 10 10 -select count(*) from t1 where pk1 <= 10 order by pk1; -count(*) -11 -select count(*) from t1; -count(*) -2000 -insert into t1 select * from t1 where b < 10 order by pk1; -ERROR 23000: Can't write; duplicate key in table 't1' -DELETE FROM t1 WHERE pk1=2; -begin; -INSERT IGNORE INTO t1 VALUES(1,2,3),(2,3,4); -select * from t1 where pk1 < 3 order by pk1; -pk1 b c -0 0 0 -1 1 1 -2 3 4 -rollback; -INSERT IGNORE INTO t1 VALUES(1,2,3),(2,3,4); -select * from t1 where pk1 < 3 order by pk1; -pk1 b c -0 0 0 -1 1 1 -2 3 4 -REPLACE INTO t1 values(1, 78, 3); -select * from t1 where pk1=1; -pk1 b c -1 78 3 -INSERT INTO t1 VALUES(1,1,1),(3,4,5) ON DUPLICATE KEY UPDATE b=79; -select * from t1 where pk1 < 4 order by pk1; -pk1 b c -0 0 0 -1 79 3 -2 3 4 -3 79 3 -INSERT INTO t1 VALUES(1,1,1),(3,4,5) ON DUPLICATE KEY UPDATE b=pk1+c; -select * from t1 where pk1 < 4 order by pk1; -pk1 b c -0 0 0 -1 4 3 -2 3 4 -3 6 3 -DELETE FROM t1 WHERE pk1 = 2 OR pk1 = 4 OR pk1 = 6; -INSERT INTO t1 VALUES(1,1,1),(2,2,17),(3,4,5) ON DUPLICATE KEY UPDATE pk1=b; -select * from t1 where pk1 = b and b != c order by pk1; -pk1 b c -2 2 17 -4 4 3 -6 6 3 -DELETE FROM t1; -CREATE UNIQUE INDEX bi ON t1(b); -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10); -INSERT INTO t1 VALUES(0,1,0),(21,21,21) ON DUPLICATE KEY UPDATE pk1=b+10,b=b+10; -select * from t1 order by pk1; -pk1 b c -2 2 2 -3 3 3 -4 4 4 -5 5 5 -6 6 6 -7 7 7 -8 8 8 -9 9 9 -10 10 10 -11 11 1 -21 21 21 -DROP TABLE t1; -CREATE TABLE t1(a INT) ENGINE=ndb; -INSERT IGNORE INTO t1 VALUES (1); -INSERT IGNORE INTO t1 VALUES (1); -INSERT IGNORE INTO t1 SELECT a FROM t1; -INSERT IGNORE INTO t1 SELECT a FROM t1; -INSERT IGNORE INTO t1 SELECT a FROM t1; -INSERT IGNORE INTO t1 VALUES (1); -INSERT IGNORE INTO t1 VALUES (1); -SELECT * FROM t1 ORDER BY a; -a -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -DELETE FROM t1; -CREATE UNIQUE INDEX ai ON t1(a); -INSERT IGNORE INTO t1 VALUES (1); -INSERT IGNORE INTO t1 VALUES (1); -INSERT IGNORE INTO t1 VALUES (NULL),(2); -SELECT * FROM t1 ORDER BY a; -a -NULL -1 -2 -DROP TABLE t1; -CREATE TABLE t1(pk INT NOT NULL PRIMARY KEY, a INT, UNIQUE (a)) ENGINE=ndb; -INSERT IGNORE INTO t1 VALUES (1,1),(2,2),(3,3); -INSERT IGNORE INTO t1 VALUES (4,NULL),(5,NULL),(6,NULL),(7,4); -SELECT * FROM t1 ORDER BY pk; -pk a -1 1 -2 2 -3 3 -4 NULL -5 NULL -6 NULL -7 4 -DROP TABLE t1; -create table t1(a int primary key, b int, unique key(b)) engine=ndb; -insert ignore into t1 values (1,0), (2,0), (2,null), (3,null); -select * from t1 order by a; -a b -1 0 -2 NULL -3 NULL -drop table t1; diff --git a/mysql-test/suite/ndb/r/ndb_limit.result b/mysql-test/suite/ndb/r/ndb_limit.result deleted file mode 100644 index da1ec3b61c3..00000000000 --- a/mysql-test/suite/ndb/r/ndb_limit.result +++ /dev/null @@ -1,72 +0,0 @@ -DROP TABLE IF EXISTS t2; -CREATE TABLE t2 ( -a bigint unsigned NOT NULL PRIMARY KEY, -b int unsigned not null, -c int unsigned -) engine=ndbcluster; -select count(*) from t2; -count(*) -10000 -delete from t2 limit 1; -select count(*) from t2; -count(*) -9999 -delete from t2 limit 100; -select count(*) from t2; -count(*) -9899 -delete from t2 limit 1000; -select count(*) from t2; -count(*) -8899 -update t2 set c=12345678 limit 100; -select count(*) from t2 where c=12345678; -count(*) -100 -select count(*) from t2 where c=12345678 limit 1000; -count(*) -100 -select * from t2 limit 0; -a b c -drop table t2; -CREATE TABLE `t2` ( -`views` int(11) NOT NULL default '0', -`clicks` int(11) NOT NULL default '0', -`day` date NOT NULL default '0000-00-00', -`hour` tinyint(4) NOT NULL default '0', -`bannerid` smallint(6) NOT NULL default '0', -`zoneid` smallint(6) NOT NULL default '0', -`source` varchar(50) NOT NULL default '', -PRIMARY KEY (`day`,`hour`,`bannerid`,`zoneid`,`source`), -KEY `bannerid_day` (`bannerid`,`day`), -KEY `zoneid` (`zoneid`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t2` VALUES -( 1,0,'2004-09-17', 5,100,100,''), -( 1,0,'2004-09-18', 7,100,100,''), -( 17,0,'2004-09-27',20,132,100,''), -( 4,0,'2004-09-16',23,132,100,''), -( 86,0,'2004-09-18', 7,196,196,''), -( 11,0,'2004-09-16',16,132,100,''), -(140,0,'2004-09-18', 0,100,164,''), -( 2,0,'2004-09-17', 7,132,100,''), -(846,0,'2004-09-27',11,132,164,''), -( 1,0,'2004-09-18', 8,132,100,''), -( 22,0,'2004-09-27', 9,164,132,''), -(711,0,'2004-09-27', 9,100,164,''), -( 11,0,'2004-09-18', 0,196,132,''), -( 41,0,'2004-09-27',15,196,132,''), -( 57,0,'2004-09-18', 2,164,196,''); -SELECT DATE_FORMAT(day, '%Y%m%d') as date, DATE_FORMAT(day, '%d-%m-%Y') -as date_formatted FROM t2 GROUP BY day ORDER BY day DESC; -date date_formatted -20040927 27-09-2004 -20040918 18-09-2004 -20040917 17-09-2004 -20040916 16-09-2004 -SELECT DATE_FORMAT(day, '%Y%m%d') as date, DATE_FORMAT(day, '%d-%m-%Y') -as date_formatted FROM t2 GROUP BY day ORDER BY day DESC LIMIT 2; -date date_formatted -20040927 27-09-2004 -20040918 18-09-2004 -drop table t2; diff --git a/mysql-test/suite/ndb/r/ndb_load.result b/mysql-test/suite/ndb/r/ndb_load.result deleted file mode 100644 index f990b12e735..00000000000 --- a/mysql-test/suite/ndb/r/ndb_load.result +++ /dev/null @@ -1,80 +0,0 @@ -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 (word CHAR(20) NOT NULL PRIMARY KEY) ENGINE=NDB; -LOAD DATA INFILE '../../../std_data/words.dat' INTO TABLE t1 ; -ERROR 23000: Can't write; duplicate key in table 't1' -DROP TABLE t1; -CREATE TABLE t1 (word CHAR(20) NOT NULL) ENGINE=NDB; -LOAD DATA INFILE '../../../std_data/words.dat' INTO TABLE t1 ; -SELECT * FROM t1 ORDER BY word; -word -Aarhus -Aarhus -Aaron -Aaron -Ababa -Ababa -aback -aback -abaft -abaft -abandon -abandon -abandoned -abandoned -abandoning -abandoning -abandonment -abandonment -abandons -abandons -abase -abased -abasement -abasements -abases -abash -abashed -abashes -abashing -abasing -abate -abated -abatement -abatements -abater -abates -abating -Abba -abbe -abbey -abbeys -abbot -abbots -Abbott -abbreviate -abbreviated -abbreviates -abbreviating -abbreviation -abbreviations -Abby -abdomen -abdomens -abdominal -abduct -abducted -abduction -abductions -abductor -abductors -abducts -Abe -abed -Abel -Abelian -Abelson -Aberdeen -Abernathy -aberrant -aberration -DROP TABLE t1; diff --git a/mysql-test/suite/ndb/r/ndb_loaddatalocal.result b/mysql-test/suite/ndb/r/ndb_loaddatalocal.result deleted file mode 100644 index 71d1b143089..00000000000 --- a/mysql-test/suite/ndb/r/ndb_loaddatalocal.result +++ /dev/null @@ -1,46 +0,0 @@ -DROP TABLE IF EXISTS t1; -create table t1(a int) engine=myisam; -select * into outfile 'MYSQLD_DATADIR/ndb_loaddatalocal.select_outfile' from t1; -drop table t1; -create table t1(a int) engine=ndb; -load data local infile 'MYSQLD_DATADIR/ndb_loaddatalocal.select_outfile' into table t1; -select count(*) from t1; -count(*) -10000 -drop table t1; -create table t1(a int) engine=myisam; -insert into t1 values (1), (2), (2), (3); -select * into outfile 'MYSQLD_DATADIR/ndb_loaddatalocal.select_outfile' from t1; -drop table t1; -create table t1(a int primary key) engine=ndb; -load data local infile 'MYSQLD_DATADIR/ndb_loaddatalocal.select_outfile' into table t1; -select * from t1 order by a; -a -1 -2 -3 -drop table t1; -create table t1(a int) engine=myisam; -insert into t1 values (1), (1), (2), (3); -select * into outfile 'MYSQLD_DATADIR/ndb_loaddatalocal.select_outfile' from t1; -drop table t1; -create table t1(a int primary key) engine=ndb; -load data local infile 'MYSQLD_DATADIR/ndb_loaddatalocal.select_outfile' into table t1; -select * from t1 order by a; -a -1 -2 -3 -drop table t1; -create table t1(a int) engine=myisam; -insert into t1 values (1), (2), (3), (3); -select * into outfile 'MYSQLD_DATADIR/ndb_loaddatalocal.select_outfile' from t1; -drop table t1; -create table t1(a int primary key) engine=ndb; -load data local infile 'MYSQLD_DATADIR/ndb_loaddatalocal.select_outfile' into table t1; -select * from t1 order by a; -a -1 -2 -3 -drop table t1; diff --git a/mysql-test/suite/ndb/r/ndb_lock.result b/mysql-test/suite/ndb/r/ndb_lock.result deleted file mode 100644 index 9057731c3f4..00000000000 --- a/mysql-test/suite/ndb/r/ndb_lock.result +++ /dev/null @@ -1,200 +0,0 @@ -DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; -create table t1 (x integer not null primary key, y varchar(32)) engine = ndb; -insert into t1 values (1,'one'), (2,'two'); -select * from t1 order by x; -x y -1 one -2 two -select * from t1 order by x; -x y -1 one -2 two -start transaction; -insert into t1 values (3,'three'); -select * from t1 order by x; -x y -1 one -2 two -3 three -start transaction; -select * from t1 order by x; -x y -1 one -2 two -commit; -select * from t1 order by x; -x y -1 one -2 two -3 three -commit; -drop table t1; -create table t1 (pk integer not null primary key, u int not null, o int not null, -unique(u), key(o)) engine = ndb; -insert into t1 values (1,1,1), (2,2,2), (3,3,3), (4,4,4), (5,5,5); -lock tables t1 write; -delete from t1 where pk = 1; -unlock tables; -select * from t1 order by pk; -pk u o -2 2 2 -3 3 3 -4 4 4 -5 5 5 -insert into t1 values (1,1,1); -lock tables t1 write; -delete from t1 where u = 1; -unlock tables; -select * from t1 order by pk; -pk u o -2 2 2 -3 3 3 -4 4 4 -5 5 5 -insert into t1 values (1,1,1); -lock tables t1 write; -delete from t1 where o = 1; -unlock tables; -select * from t1 order by pk; -pk u o -2 2 2 -3 3 3 -4 4 4 -5 5 5 -insert into t1 values (1,1,1); -drop table t1; -create table t1 (x integer not null primary key, y varchar(32), z integer, key(z)) engine = ndb; -insert into t1 values (1,'one',1); -begin; -select * from t1 where x = 1 for update; -x y z -1 one 1 -begin; -select * from t1 where x = 1 for update; -ERROR HY000: Lock wait timeout exceeded; try restarting transaction -rollback; -rollback; -insert into t1 values (2,'two',2),(3,"three",3); -begin; -select * from t1 where x = 1 for update; -x y z -1 one 1 -select * from t1 where x = 1 for update; -ERROR HY000: Lock wait timeout exceeded; try restarting transaction -select * from t1 where x = 2 for update; -x y z -2 two 2 -rollback; -commit; -begin; -select * from t1 where y = 'one' or y = 'three' for update; -x y z -# # # -# # # -begin; -select * from t1 where x = 2 for update; -x y z -2 two 2 -select * from t1 where x = 1 for update; -ERROR HY000: Lock wait timeout exceeded; try restarting transaction -rollback; -commit; -begin; -select * from t1 where y = 'one' or y = 'three' order by x for update; -x y z -1 one 1 -3 three 3 -begin; -select * from t1 where x = 2 for update; -x y z -2 two 2 -select * from t1 where x = 1 for update; -ERROR HY000: Lock wait timeout exceeded; try restarting transaction -rollback; -commit; -begin; -select * from t1 where z > 1 and z < 3 for update; -x y z -2 two 2 -begin; -select * from t1 where x = 1 for update; -x y z -1 one 1 -select * from t1 where x = 2 for update; -Got one of the listed errors -rollback; -commit; -begin; -select * from t1 where x = 1 lock in share mode; -x y z -1 one 1 -begin; -select * from t1 where x = 1 lock in share mode; -x y z -1 one 1 -select * from t1 where x = 2 for update; -x y z -2 two 2 -select * from t1 where x = 1 for update; -ERROR HY000: Lock wait timeout exceeded; try restarting transaction -rollback; -commit; -begin; -select * from t1 where y = 'one' or y = 'three' lock in share mode; -x y z -# # # -# # # -begin; -select * from t1 where y = 'one' lock in share mode; -x y z -1 one 1 -select * from t1 where x = 2 for update; -x y z -2 two 2 -select * from t1 where x = 1 for update; -ERROR HY000: Lock wait timeout exceeded; try restarting transaction -rollback; -commit; -begin; -select * from t1 where y = 'one' or y = 'three' order by x lock in share mode; -x y z -1 one 1 -3 three 3 -begin; -select * from t1 where y = 'one' lock in share mode; -x y z -1 one 1 -select * from t1 where x = 2 for update; -x y z -2 two 2 -select * from t1 where x = 1 for update; -ERROR HY000: Lock wait timeout exceeded; try restarting transaction -rollback; -commit; -begin; -select * from t1 where z > 1 and z < 3 lock in share mode; -x y z -2 two 2 -begin; -select * from t1 where z = 1 lock in share mode; -x y z -1 one 1 -select * from t1 where x = 1 for update; -x y z -1 one 1 -select * from t1 where x = 2 for update; -ERROR HY000: Lock wait timeout exceeded; try restarting transaction -rollback; -commit; -drop table t1; -create table t3 (id2 int) engine=ndb; -lock tables t3 write; -unlock tables; -drop table t3; -create table t2 (id int, j int) engine=ndb; -insert into t2 values (2, 2); -create table t3 (id int) engine=ndb; -lock tables t3 read; -delete t2 from t2, t3 where t2.id = t3.id; -unlock tables; -drop table t2, t3; diff --git a/mysql-test/suite/ndb/r/ndb_lock_table.result b/mysql-test/suite/ndb/r/ndb_lock_table.result deleted file mode 100644 index a0550273e1a..00000000000 --- a/mysql-test/suite/ndb/r/ndb_lock_table.result +++ /dev/null @@ -1,11 +0,0 @@ -drop table if exists t1; -create table t1 (a int) engine ndb; -set autocommit=1; -lock table t1 write; -set autocommit=0; -insert into t1 values (0); -rollback; -select * from t1; -a -unlock tables; -drop table t1; diff --git a/mysql-test/suite/ndb/r/ndb_minmax.result b/mysql-test/suite/ndb/r/ndb_minmax.result deleted file mode 100644 index cc0c238ac6e..00000000000 --- a/mysql-test/suite/ndb/r/ndb_minmax.result +++ /dev/null @@ -1,120 +0,0 @@ -drop table if exists t1, t2; -CREATE TABLE t1 ( -a int PRIMARY KEY -) engine = ndb; -INSERT INTO t1 VALUES (1); -INSERT INTO t1 VALUES (2); -INSERT INTO t1 VALUES (3); -INSERT INTO t1 VALUES (4); -INSERT INTO t1 VALUES (5); -INSERT INTO t1 VALUES (6); -select MAX(a) from t1; -MAX(a) -6 -select MAX(a) from t1; -MAX(a) -6 -select MAX(a) from t1; -MAX(a) -6 -select MAX(a) from t1; -MAX(a) -6 -select MIN(a) from t1; -MIN(a) -1 -select MIN(a) from t1; -MIN(a) -1 -select MIN(a) from t1; -MIN(a) -1 -select * from t1 order by a; -a -1 -2 -3 -4 -5 -6 -select MIN(a) from t1; -MIN(a) -1 -select MAX(a) from t1; -MAX(a) -6 -select MAX(a) from t1; -MAX(a) -6 -select * from t1 order by a; -a -1 -2 -3 -4 -5 -6 -drop table t1; -CREATE TABLE t2 ( -a int PRIMARY KEY, -b int not null, -c int not null, -KEY(b), -UNIQUE(c) -) engine = ndb; -INSERT INTO t2 VALUES (1, 5, 1); -INSERT INTO t2 VALUES (2, 2, 7); -INSERT INTO t2 VALUES (3, 3, 3); -INSERT INTO t2 VALUES (4, 4, 4); -INSERT INTO t2 VALUES (5, 5, 5); -INSERT INTO t2 VALUES (6, 6, 6); -INSERT INTO t2 VALUES (7, 2, 10); -INSERT INTO t2 VALUES (8, 10, 2); -select MAX(a) from t2; -MAX(a) -8 -select MAX(b) from t2; -MAX(b) -10 -select MAX(c) from t2; -MAX(c) -10 -select MIN(a) from t2; -MIN(a) -1 -select MIN(b) from t2; -MIN(b) -2 -select MIN(c) from t2; -MIN(c) -1 -select * from t2 order by a; -a b c -1 5 1 -2 2 7 -3 3 3 -4 4 4 -5 5 5 -6 6 6 -7 2 10 -8 10 2 -select MIN(b) from t2; -MIN(b) -2 -select MAX(a) from t2; -MAX(a) -8 -select MAX(c) from t2; -MAX(c) -10 -select * from t2 order by a; -a b c -1 5 1 -2 2 7 -3 3 3 -4 4 4 -5 5 5 -6 6 6 -7 2 10 -8 10 2 -drop table t2; diff --git a/mysql-test/suite/ndb/r/ndb_multi.result b/mysql-test/suite/ndb/r/ndb_multi.result deleted file mode 100644 index 40483887919..00000000000 --- a/mysql-test/suite/ndb/r/ndb_multi.result +++ /dev/null @@ -1,145 +0,0 @@ -drop table if exists t1, t2, t3, t4; -flush status; -drop table if exists t1, t2, t3, t4; -flush status; -create table t1 (a int) engine=ndbcluster; -create table t2 (a int) engine=ndbcluster; -insert into t1 value (2); -insert into t2 value (3); -select * from t1; -a -2 -select * from t2; -a -3 -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 0 -select * from t1; -a -2 -drop table t1; -create table t1 (a int) engine=ndbcluster; -insert into t1 value (2); -select * from t1; -a -2 -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 0 -drop table t1; -create table t1 (a int) engine=ndbcluster; -insert into t1 value (2); -select * from t1; -a -2 -select * from t1; -a -2 -flush status; -select * from t1; -a -2 -update t1 set a=3 where a=2; -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 0 -create table t3 (a int not null primary key, b varchar(22), -c int, last_col text) engine=ndb; -insert into t3 values(1, 'Hi!', 89, 'Longtext column'); -create table t4 (pk int primary key, b int) engine=ndb; -select * from t1; -a -3 -select * from t3; -a b c last_col -1 Hi! 89 Longtext column -show tables like 't4'; -Tables_in_test (t4) -t4 -show tables; -Tables_in_test -t1 -t2 -t3 -t4 -drop table t1, t2, t3, t4; -create table t1(c1 int key)ENGINE=MyISAM; -insert into t1 values(1),(3),(5); -select * from t1 order by c1; -c1 -1 -3 -5 -show tables; -Tables_in_test -create table t1(c1 int key)ENGINE=MyISAM; -insert into t1 values(100),(344),(533); -select * from t1 order by c1; -c1 -100 -344 -533 -alter table t1 engine=ndb; -show tables; -Tables_in_test -t1 -Warnings: -Warning 1050 Local table test.t1 shadows ndb table -select * from t1 order by c1; -c1 -100 -344 -533 -drop table t1; -select * from t1 order by c1; -c1 -1 -3 -5 -drop table t1; -create database db; -use db; -create table t1(x int) engine=ndb; -use db; -show tables; -Tables_in_db -t1 -drop database db; -show tables; -ERROR 42000: Unknown database 'db' -create database db; -use db; -create table t1(x int) engine=ndb; -use db; -create table t2(x int) engine=myisam; -show tables; -Tables_in_db -t1 -t2 -drop database db; -show tables; -Tables_in_db -t2 -drop database db; -use test; -create table `test`.`t1$EX` - (server_id int unsigned, -master_server_id int unsigned, -master_epoch bigint unsigned, -count int unsigned, -primary key(server_id, master_server_id, -master_epoch, count)) -engine ndb; -show tables like '%$%'; -Tables_in_test (%$%) -t1$ex -use test; -show tables like '%$%'; -Tables_in_test (%$%) -t1$ex -drop table `test`.`t1$EX`; -show tables like '%$%'; -Tables_in_test (%$%) -show tables like '%$%'; -Tables_in_test (%$%) diff --git a/mysql-test/suite/ndb/r/ndb_multi_row.result b/mysql-test/suite/ndb/r/ndb_multi_row.result deleted file mode 100644 index 96986490d23..00000000000 --- a/mysql-test/suite/ndb/r/ndb_multi_row.result +++ /dev/null @@ -1,68 +0,0 @@ -drop table if exists t1, t2, t3, t4; -flush status; -drop table if exists t1, t2, t3, t4; -flush status; -create table t1 (a int) engine=ndbcluster; -create table t2 (a int) engine=ndbcluster; -insert into t1 value (2); -insert into t2 value (3); -select * from t1; -a -2 -select * from t2; -a -3 -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 0 -select * from t1; -a -2 -drop table t1; -create table t1 (a int) engine=ndbcluster; -insert into t1 value (2); -select * from t1; -a -2 -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 0 -drop table t1; -create table t1 (a int) engine=ndbcluster; -insert into t1 value (2); -select * from t1; -a -2 -flush status; -select * from t1; -a -2 -update t1 set a=3 where a=2; -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 0 -create table t3 (a int not null primary key, b varchar(22), -c int, last_col text) engine=ndb; -insert into t3 values(1, 'Hi!', 89, 'Longtext column'); -create table t4 (pk int primary key, b int) engine=ndb; -select * from t1; -a -3 -select * from t3; -a b c last_col -1 Hi! 89 Longtext column -show tables like 't4'; -Tables_in_test (t4) -t4 -show tables; -Tables_in_test -t1 -t2 -t3 -t4 -drop table t1, t2, t3, t4; -drop table if exists t1, t3, t4; -Warnings: -Warning 155 Table 'test.t1' doesn't exist -Warning 155 Table 'test.t3' doesn't exist -Warning 155 Table 'test.t4' doesn't exist diff --git a/mysql-test/suite/ndb/r/ndb_partition_error.result b/mysql-test/suite/ndb/r/ndb_partition_error.result deleted file mode 100644 index df2db5c5f06..00000000000 --- a/mysql-test/suite/ndb/r/ndb_partition_error.result +++ /dev/null @@ -1,47 +0,0 @@ -drop table if exists t1; -CREATE TABLE t1 ( -a int not null, -b int not null, -c int not null, -primary key(a,b), -index (a)) -engine = ndb -partition by range (a) -partitions 3 -(partition x1 values less than (5) nodegroup 12, -partition x2 values less than (10) nodegroup 13, -partition x3 values less than (20) nodegroup 14); -ERROR HY000: Can't create table 'test.t1' (errno: 140) -show warnings; -Level Code Message -Warning 1296 Got error 771 'Given NODEGROUP doesn't exist in this cluster' from NDB -Error 1005 Can't create table 'test.t1' (errno: 140) -CREATE TABLE t1 ( -a int not null, -b int not null, -c int not null, -primary key(a)) -engine = ndb -partition by range (a) -partitions 3 -(partition x1 values less than (5), -partition x2 values less than (10), -partition x3 values less than (20)); -drop table t1; -CREATE TABLE t1 (id INT) ENGINE=NDB -PARTITION BY LIST(id) -(PARTITION p0 VALUES IN (2, 4), -PARTITION p1 VALUES IN (42, 142)); -INSERT INTO t1 VALUES (2); -UPDATE t1 SET id=5 WHERE id=2; -ERROR HY000: Table has no partition for value 5 -DROP TABLE t1; -create table t1 (a int,b int, c int) -engine = ndb -partition by list(a) -partitions 2 -(partition x123 values in (11, 12), -partition x234 values in (5, 1)); -insert into t1 values (NULL,1,1); -ERROR HY000: Table has no partition for value NULL -drop table t1; diff --git a/mysql-test/suite/ndb/r/ndb_partition_error2.result b/mysql-test/suite/ndb/r/ndb_partition_error2.result deleted file mode 100644 index a739ef3923c..00000000000 --- a/mysql-test/suite/ndb/r/ndb_partition_error2.result +++ /dev/null @@ -1,3 +0,0 @@ -drop table if exists t1; -create table t1 (s1 int) engine=ndbcluster; -ERROR HY000: For the partitioned engine it is necessary to define all partitions diff --git a/mysql-test/suite/ndb/r/ndb_partition_key.result b/mysql-test/suite/ndb/r/ndb_partition_key.result deleted file mode 100644 index bc15fd30413..00000000000 --- a/mysql-test/suite/ndb/r/ndb_partition_key.result +++ /dev/null @@ -1,312 +0,0 @@ -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 (a int, b int, c int, d int, PRIMARY KEY(a,b,c)) -ENGINE = NDB -PARTITION BY KEY (a,b); -insert into t1 values (1,1,1,1); -select * from t1; -a b c d -1 1 1 1 -update t1 set d = 2 where a = 1 and b = 1 and c = 1; -select * from t1; -a b c d -1 1 1 2 -delete from t1; -select * from t1; -a b c d -drop table t1; -CREATE TABLE t1 (a int, b int, c int, d int, PRIMARY KEY(a,b)) -ENGINE = NDB -PARTITION BY KEY (c); -ERROR HY000: A PRIMARY KEY must include all columns in the table's partitioning function -CREATE TABLE t1 (a int, b int, c int, PRIMARY KEY(a,b)) -ENGINE = NDB -PARTITION BY KEY (a); -insert into t1 values -(1,1,3),(1,2,3),(1,3,3),(1,4,3),(1,5,3),(1,6,3), -(1,7,3),(1,8,3),(1,9,3),(1,10,3),(1,11,3),(1,12,3); -select * from t1 order by b; -a b c -1 1 3 -1 2 3 -1 3 3 -1 4 3 -1 5 3 -1 6 3 -1 7 3 -1 8 3 -1 9 3 -1 10 3 -1 11 3 -1 12 3 -select max(b) from t1 where a = 1; -max(b) -12 -select b from t1 where a = 1 order by b desc; -b -12 -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 -DROP TABLE t1; -CREATE TABLE t1 (a INT, b CHAR(10) COLLATE latin1_bin, c INT, d INT, -PRIMARY KEY (a,b,c) USING HASH) -ENGINE=NDB -DEFAULT CHARSET=latin1 -PARTITION BY KEY (b); -insert into t1 values (1,"a",1,1),(2,"a",1,1),(3,"a",1,1); --- t1 -- - -Fragment type: 5 -K Value: 6 -Min load factor: 78 -Max load factor: 80 -Temporary table: no -Number of attributes: 4 -Number of primary keys: 3 -Length of frm data: # -Row Checksum: 1 -Row GCI: 1 -SingleUserMode: 0 -ForceVarPart: 1 -TableStatus: Retrieved --- Attributes -- -a Int PRIMARY KEY AT=FIXED ST=MEMORY -b Char(10;latin1_bin) PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY -c Int PRIMARY KEY AT=FIXED ST=MEMORY -d Int NULL AT=FIXED ST=MEMORY - --- Indexes -- -PRIMARY KEY(a, b, c) - UniqueHashIndex - - -NDBT_ProgramExit: 0 - OK - -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) NOT NULL DEFAULT '0', - `b` char(10) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '', - `c` int(11) NOT NULL DEFAULT '0', - `d` int(11) DEFAULT NULL, - PRIMARY KEY (`a`,`b`,`c`) USING HASH -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (b) */ -DROP TABLE t1; -CREATE TABLE t1 (a int not null primary key) -PARTITION BY KEY(a) -(PARTITION p0 ENGINE = NDB, PARTITION p1 ENGINE = NDB); -drop table t1; -CREATE TABLE t1 (a int not null primary key); -ALTER TABLE t1 -ENGINE = NDB -PARTITION BY KEY(a) -(PARTITION p0 ENGINE = NDB, PARTITION p1 ENGINE = NDB); -drop table t1; -CREATE TABLE t1 (a int not null primary key) ENGINE = NDB; -ALTER TABLE t1 -PARTITION BY KEY(a) -(PARTITION p0 ENGINE = NDB, PARTITION p1 ENGINE = NDB); -drop table t1; -create table t1 (a int) -engine=ndb -partition by key(a) -(partition p0, partition p1); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) -(PARTITION p0 ENGINE = ndbcluster, - PARTITION p1 ENGINE = ndbcluster) */ -alter table t1 engine=heap; -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL -) ENGINE=MEMORY DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) -(PARTITION p0 ENGINE = MEMORY, - PARTITION p1 ENGINE = MEMORY) */ -alter table t1 engine=ndb; -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) -(PARTITION p0 ENGINE = ndbcluster, - PARTITION p1 ENGINE = ndbcluster) */ -alter table t1 engine=heap remove partitioning; -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL -) ENGINE=MEMORY DEFAULT CHARSET=latin1 -alter table t1 engine=ndb -partition by key(a) -(partition p0, partition p1 engine = ndb); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) -(PARTITION p0 ENGINE = ndbcluster, - PARTITION p1 ENGINE = ndbcluster) */ -alter table t1 -partition by key (a) -(partition p0 engine=ndb, partition p1 engine=ndb); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) -(PARTITION p0 ENGINE = ndbcluster, - PARTITION p1 ENGINE = ndbcluster) */ -alter table t1 remove partitioning; -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -alter table t1 -partition by key(a) -(partition p0 engine=ndb, partition p1); -alter table t1 -engine=ndb -partition by key(a) -(partition p0 engine=ndb, partition p1 engine = ndb); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) -(PARTITION p0 ENGINE = ndbcluster, - PARTITION p1 ENGINE = ndbcluster) */ -drop table t1; -CREATE TABLE t1 ( -c1 MEDIUMINT NOT NULL AUTO_INCREMENT, -c2 TEXT NOT NULL, -c3 INT NOT NULL, -c4 BIT NOT NULL, -c5 FLOAT, -c6 VARCHAR(255), -c7 TIMESTAMP, -PRIMARY KEY(c1,c3)) -ENGINE=NDB -PARTITION BY KEY(c3) PARTITIONS 5; -ALTER TABLE t1 COALESCE PARTITION 4; -DROP TABLE t1; -CREATE TABLE t1 (a int primary key) -ENGINE=NDB -PARTITION BY KEY(a); -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -REPAIR TABLE t1; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -ALTER TABLE t1 OPTIMIZE PARTITION p0; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -ALTER TABLE t1 CHECK PARTITION p0; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -ALTER TABLE t1 REPAIR PARTITION p0; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -ALTER TABLE t1 ANALYZE PARTITION p0; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -ALTER TABLE t1 REBUILD PARTITION p0; -ERROR HY000: Table storage engine for 't1' doesn't have this option -DROP TABLE t1; -CREATE TABLE t1 ( -c1 MEDIUMINT NOT NULL AUTO_INCREMENT, -c2 TEXT NOT NULL, -c3 INT NOT NULL, -PRIMARY KEY(c1,c3)) -ENGINE=NDB -PARTITION BY KEY(c3) PARTITIONS 5; -ALTER TABLE t1 ADD COLUMN c4 INT AFTER c1; -DROP TABLE t1; -CREATE TABLE t1 ( -c1 MEDIUMINT NOT NULL AUTO_INCREMENT, -c2 TEXT NOT NULL, -c3 INT NOT NULL, -PRIMARY KEY(c1,c3)) -ENGINE=NDB -PARTITION BY KEY(c3) -(PARTITION p0 NODEGROUP 0, PARTITION p1 NODEGROUP 0); -ALTER TABLE t1 ADD COLUMN c4 INT AFTER c1; -SELECT NODEGROUP,PARTITION_NAME FROM information_schema.partitions WHERE -table_name = "t1"; -NODEGROUP PARTITION_NAME -0 p0 -0 p1 -DROP TABLE t1; -CREATE TABLE t1 ( -a tinyint unsigned NOT NULL, -b bigint(20) unsigned NOT NULL, -c char(12), -PRIMARY KEY (a,b) -) ENGINE ndb DEFAULT CHARSET=latin1 PARTITION BY KEY (a); -insert into t1 values(1,1,'1'), (2,2,'2'), (3,3,'3'), (4,4,'4'), (5,5,'5'); -select * from t1 where a = 1; -a b c -1 1 1 -select * from t1 where a = 2; -a b c -2 2 2 -select * from t1 where a = 3; -a b c -3 3 3 -select * from t1 where a = 4; -a b c -4 4 4 -select * from t1 where a = 5; -a b c -5 5 5 -delete from t1 where a = 1; -select * from t1 order by 1; -a b c -2 2 2 -3 3 3 -4 4 4 -5 5 5 -delete from t1 where a = 2; -select * from t1 order by 1; -a b c -3 3 3 -4 4 4 -5 5 5 -delete from t1 where a = 3; -select * from t1 order by 1; -a b c -4 4 4 -5 5 5 -delete from t1 where a = 4; -select * from t1 order by 1; -a b c -5 5 5 -delete from t1 where a = 5; -select * from t1 order by 1; -a b c -drop table t1; diff --git a/mysql-test/suite/ndb/r/ndb_partition_list.result b/mysql-test/suite/ndb/r/ndb_partition_list.result deleted file mode 100644 index ce2574ddcc4..00000000000 --- a/mysql-test/suite/ndb/r/ndb_partition_list.result +++ /dev/null @@ -1,51 +0,0 @@ -drop table if exists t1; -CREATE TABLE t1 ( f_int1 INTEGER NOT NULL, f_int2 INTEGER NOT NULL, -f_char1 CHAR(10), -f_char2 CHAR(10), f_charbig VARCHAR(1000), -PRIMARY KEY (f_int1,f_int2)) -ENGINE = NDB -PARTITION BY LIST(MOD(f_int1 + f_int2,4)) -(PARTITION part_3 VALUES IN (-3), -PARTITION part_2 VALUES IN (-2), -PARTITION part_1 VALUES IN (-1), -PARTITION part0 VALUES IN (0), -PARTITION part1 VALUES IN (1), -PARTITION part2 VALUES IN (2), -PARTITION part3 VALUES IN (3,4,5)); -INSERT INTO t1 SET f_int1 = -2, f_int2 = 20, f_char1 = '20', f_char2 = '20', f_charbig = '===20==='; -INSERT INTO t1 SET f_int1 = 1, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; -INSERT INTO t1 SET f_int1 = 2, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; -INSERT INTO t1 SET f_int1 = 3, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; -INSERT INTO t1 SET f_int1 = 4, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; -INSERT INTO t1 SET f_int1 = 5, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; -INSERT INTO t1 SET f_int1 = 20, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; -SELECT * FROM t1 ORDER BY f_int1; -f_int1 f_int2 f_char1 f_char2 f_charbig --2 20 20 20 ===20=== -1 1 1 1 ===1=== -2 1 1 1 ===1=== -3 1 1 1 ===1=== -4 1 1 1 ===1=== -5 1 1 1 ===1=== -20 1 1 1 ===1=== -DROP TABLE t1; -CREATE TABLE t1 ( f_int1 INTEGER, f_int2 INTEGER, f_char1 CHAR(10), -f_char2 CHAR(10), f_charbig VARCHAR(1000)) -ENGINE = NDB -PARTITION BY LIST(f_int1) -(PARTITION part_1 VALUES IN (-1), -PARTITION part0 VALUES IN (0,1), -PARTITION part1 VALUES IN (2)); -INSERT INTO t1 SET f_int1 = -1, f_int2 = 20, f_char1 = '20', f_char2 = '20', f_charbig = '===20==='; -INSERT INTO t1 SET f_int1 = 0, f_int2 = 20, f_char1 = '20', f_char2 = '20', f_charbig = '===20==='; -INSERT INTO t1 SET f_int1 = 1, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; -INSERT INTO t1 SET f_int1 = 2, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; -INSERT INTO t1 SET f_int1 = 20, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; -ERROR HY000: Table has no partition for value 20 -SELECT * FROM t1 ORDER BY f_int1; -f_int1 f_int2 f_char1 f_char2 f_charbig --1 20 20 20 ===20=== -0 20 20 20 ===20=== -1 1 1 1 ===1=== -2 1 1 1 ===1=== -DROP TABLE t1; diff --git a/mysql-test/suite/ndb/r/ndb_partition_range.result b/mysql-test/suite/ndb/r/ndb_partition_range.result deleted file mode 100644 index fbaec81984d..00000000000 --- a/mysql-test/suite/ndb/r/ndb_partition_range.result +++ /dev/null @@ -1,275 +0,0 @@ -drop table if exists t1; -CREATE TABLE t1 ( -a int not null, -b int not null, -c int not null, -primary key(a,b), -index (a)) -engine = ndb -partition by range (a) -partitions 3 -(partition x1 values less than (5), -partition x2 values less than (10), -partition x3 values less than (20)); -INSERT into t1 values (1, 1, 1); -INSERT into t1 values (6, 1, 1); -INSERT into t1 values (10, 1, 1); -INSERT into t1 values (15, 1, 1); -select * from information_schema.partitions where table_name= 't1'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -def test t1 x1 NULL 1 NULL RANGE NULL a NULL 5 0 0 0 # 0 0 # # NULL NULL default NULL -def test t1 x2 NULL 2 NULL RANGE NULL a NULL 10 0 0 0 # 0 0 # # NULL NULL default NULL -def test t1 x3 NULL 3 NULL RANGE NULL a NULL 20 0 0 0 # 0 0 # # NULL NULL default NULL -select * from t1 order by a; -a b c -1 1 1 -6 1 1 -10 1 1 -15 1 1 -select * from t1 where a=1 order by a; -a b c -1 1 1 -select * from t1 where a=15 and b=1 order by a; -a b c -15 1 1 -select * from t1 where a=21 and b=1 order by a; -a b c -select * from t1 where a=21 order by a; -a b c -select * from t1 where a in (1,6,10,21) order by a; -a b c -1 1 1 -6 1 1 -10 1 1 -select * from t1 where b=1 and a in (1,6,10,21) order by a; -a b c -1 1 1 -6 1 1 -10 1 1 -INSERT into t1 values (1, 2, 2); -select max(b) from t1 where a = 1; -max(b) -2 -select b from t1 where a = 1 order by b desc; -b -2 -1 -drop table t1; -CREATE TABLE t1 ( -a int not null, -b int not null, -c int not null, -primary key(b), -unique (a)) -engine = ndb -partition by range (b) -partitions 3 -(partition x1 values less than (5), -partition x2 values less than (10), -partition x3 values less than (20)); -INSERT into t1 values (1, 1, 1); -INSERT into t1 values (2, 6, 1); -INSERT into t1 values (3, 10, 1); -INSERT into t1 values (4, 15, 1); -select * from t1 order by a; -a b c -1 1 1 -2 6 1 -3 10 1 -4 15 1 -UPDATE t1 set a = 5 WHERE b = 15; -select * from t1 order by a; -a b c -1 1 1 -2 6 1 -3 10 1 -5 15 1 -UPDATE t1 set a = 6 WHERE a = 5; -select * from t1 order by a; -a b c -1 1 1 -2 6 1 -3 10 1 -6 15 1 -select * from t1 where b=1 order by b; -a b c -1 1 1 -select * from t1 where b=15 and a=1 order by b; -a b c -select * from t1 where b=21 and a=1 order by b; -a b c -select * from t1 where b=21 order by b; -a b c -select * from t1 where b in (1,6,10,21) order by b; -a b c -1 1 1 -2 6 1 -3 10 1 -select * from t1 where a in (1,2,5,6) order by b; -a b c -1 1 1 -2 6 1 -6 15 1 -select * from t1 where a=1 and b in (1,6,10,21) order by b; -a b c -1 1 1 -DELETE from t1 WHERE b = 6; -DELETE from t1 WHERE a = 6; -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) NOT NULL, - `b` int(11) NOT NULL, - `c` int(11) NOT NULL, - PRIMARY KEY (`b`), - UNIQUE KEY `a` (`a`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (b) -(PARTITION x1 VALUES LESS THAN (5) ENGINE = ndbcluster, - PARTITION x2 VALUES LESS THAN (10) ENGINE = ndbcluster, - PARTITION x3 VALUES LESS THAN (20) ENGINE = ndbcluster) */ -drop table t1; -CREATE TABLE t1 -(id MEDIUMINT NOT NULL, -b1 BIT(8), -vc VARCHAR(255), -bc CHAR(255), -d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, -total BIGINT UNSIGNED, -y YEAR, -t DATE) ENGINE=NDB -PARTITION BY RANGE (YEAR(t)) -(PARTITION p0 VALUES LESS THAN (1901), -PARTITION p1 VALUES LESS THAN (1946), -PARTITION p2 VALUES LESS THAN (1966), -PARTITION p3 VALUES LESS THAN (1986), -PARTITION p4 VALUES LESS THAN (2005), -PARTITION p5 VALUES LESS THAN MAXVALUE); -INSERT INTO t1 VALUES (0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); -SELECT * FROM t1; -id b1 vc bc d f total y t -0 NULL NULL NULL NULL NULL NULL NULL NULL -ALTER TABLE t1 ENGINE=MYISAM; -SELECT * FROM t1; -id b1 vc bc d f total y t -0 NULL NULL NULL NULL NULL NULL NULL NULL -DROP TABLE t1; -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' - INITIAL_SIZE 16M -UNDO_BUFFER_SIZE=1M -ENGINE=NDB; -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' - USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE NDB; -CREATE TABLE test.t1 ( -a1 INT, -a2 TEXT NOT NULL, -a3 BIT NOT NULL, -a4 DECIMAL(8,3), -a5 INT NOT NULL, -a6 INT, -PRIMARY KEY(a1)) -TABLESPACE ts1 STORAGE DISK ENGINE=NDB -PARTITION BY LIST (a1) -(PARTITION p0 VALUES IN (1,2,3,4,5), -PARTITION p1 VALUES IN (6,7,8,9, 10), -PARTITION p2 VALUES IN (11, 12, 13, 14, 15)); -ALTER TABLE test.t1 DROP COLUMN a6; -ALTER TABLE test.t1 ADD COLUMN a6 VARCHAR(255); -SELECT COUNT(*) FROM test.t1; -COUNT(*) -15 -ALTER TABLE test.t1 DROP COLUMN a4; -SELECT COUNT(*) FROM test.t1; -COUNT(*) -15 -DROP TABLE t1; -CREATE TABLE test.t1 ( -a1 INT, -a2 TEXT NOT NULL, -a3 BIT NOT NULL, -a4 DECIMAL(8,3), -a5 INT NOT NULL, -a6 VARCHAR(255), -PRIMARY KEY(a1)) -TABLESPACE ts1 STORAGE DISK ENGINE=NDB -PARTITION BY HASH(a1) -PARTITIONS 4; -SELECT COUNT(*) FROM test.t1; -COUNT(*) -15 -ALTER TABLE test.t1 DROP COLUMN a4; -SELECT COUNT(*) FROM test.t1; -COUNT(*) -15 -DROP TABLE t1; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE=NDB; -DROP TABLESPACE ts1 ENGINE=NDB; -DROP LOGFILE GROUP lg1 ENGINE=NDB; -CREATE TABLE t1 -(id MEDIUMINT NOT NULL, -b1 BIT(8), -vc VARCHAR(255), -bc CHAR(255), -d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, -total BIGINT UNSIGNED, -y YEAR, -t DATE) ENGINE=NDB -PARTITION BY LIST(id) -(PARTITION p0 VALUES IN (2, 4), -PARTITION p1 VALUES IN (42, 142)); -INSERT INTO t1 VALUES (2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); -SELECT * FROM t1; -id b1 vc bc d f total y t -2 NULL NULL NULL NULL NULL NULL NULL NULL -ALTER TABLE t1 ADD PARTITION -(PARTITION p2 VALUES IN (412)); -SELECT * FROM t1; -id b1 vc bc d f total y t -2 NULL NULL NULL NULL NULL NULL NULL NULL -DROP TABLE t1; -CREATE TABLE t1 ( -a int not null, -b int not null, -c int not null) -partition by list(a) -partitions 2 -(partition x123 values in (1,5,6), -partition x234 values in (4,7,8)); -INSERT into t1 VALUES (5,1,1); -select * from t1; -a b c -5 1 1 -UPDATE t1 SET a=8 WHERE a=5 AND b=1; -select * from t1; -a b c -8 1 1 -drop table t1; -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) engine=ndb -PARTITION BY RANGE(f1) -( PARTITION part1 VALUES LESS THAN (2), -PARTITION part2 VALUES LESS THAN (1000)); -INSERT INTO t1 VALUES(1, '---1---'); -INSERT INTO t1 VALUES(2, '---2---'); -select * from t1 order by f1; -f1 f2 -1 ---1--- -2 ---2--- -UPDATE t1 SET f1 = f1 + 4 WHERE f1 = 2; -select * from t1 order by f1; -f1 f2 -1 ---1--- -6 ---2--- -UPDATE t1 SET f1 = f1 + 4 WHERE f1 = 1; -select * from t1 order by f1; -f1 f2 -5 ---1--- -6 ---2--- -drop table t1; diff --git a/mysql-test/suite/ndb/r/ndb_read_multi_range.result b/mysql-test/suite/ndb/r/ndb_read_multi_range.result deleted file mode 100644 index 113fb28bb78..00000000000 --- a/mysql-test/suite/ndb/r/ndb_read_multi_range.result +++ /dev/null @@ -1,494 +0,0 @@ -DROP TABLE IF EXISTS t1, t2, r1; -create table t1 ( -a int primary key, -b int not null, -c int not null, -index(b), unique index using hash(c) -) engine = ndb; -insert into t1 values -(1,2,1),(2,3,2),(3,4,3),(4,5,4), -(5,2,12),(6,3,11),(7,4,10),(8,5,9), -(9,2,8),(10,3,7),(11,4,6),(12,5,5); -create table r1 as select * from t1 where a in (2,8,12); -select * from r1 order by a; -a b c -2 3 2 -8 5 9 -12 5 5 -drop table r1; -create table r1 as select * from t1 where b in (1,2,5); -select * from r1 order by a; -a b c -1 2 1 -4 5 4 -5 2 12 -8 5 9 -9 2 8 -12 5 5 -drop table r1; -create table r1 as select * from t1 where c in (2,8,12); -select * from r1 order by a; -a b c -2 3 2 -5 2 12 -9 2 8 -drop table r1; -create table r1 as select * from t1 where a in (2,8) or (a > 11) or (a <= 1); -select * from r1 order by a; -a b c -1 2 1 -2 3 2 -8 5 9 -12 5 5 -drop table r1; -create table r1 as select * from t1 where a in (33,8,12); -select * from r1 order by a; -a b c -8 5 9 -12 5 5 -drop table r1; -create table r1 as select * from t1 where a in (2,33,8,12,34); -select * from r1 order by a; -a b c -2 3 2 -8 5 9 -12 5 5 -drop table r1; -create table r1 as select * from t1 where b in (1,33,5); -select * from r1 order by a; -a b c -4 5 4 -8 5 9 -12 5 5 -drop table r1; -select * from t1 where b in (1,33,5) order by a; -a b c -4 5 4 -8 5 9 -12 5 5 -create table r1 as select * from t1 where b in (45,1,33,5,44); -select * from r1 order by a; -a b c -4 5 4 -8 5 9 -12 5 5 -drop table r1; -select * from t1 where b in (45,22) order by a; -a b c -create table r1 as select * from t1 where c in (2,8,33); -select * from r1 order by a; -a b c -2 3 2 -9 2 8 -drop table r1; -create table r1 as select * from t1 where c in (13,2,8,33,12); -select * from r1 order by a; -a b c -2 3 2 -5 2 12 -9 2 8 -drop table r1; -select * from t1 where a in (33,8,12) order by a; -a b c -8 5 9 -12 5 5 -select * from t1 where a in (33,34,35) order by a; -a b c -select * from t1 where a in (2,8) or (a > 11) or (a <= 1) order by a; -a b c -1 2 1 -2 3 2 -8 5 9 -12 5 5 -select * from t1 where b in (6,7) or (b <= 5) or (b >= 10) order by b,a; -a b c -1 2 1 -5 2 12 -9 2 8 -2 3 2 -6 3 11 -10 3 7 -3 4 3 -7 4 10 -11 4 6 -4 5 4 -8 5 9 -12 5 5 -select * from t1 where c in (13,2,8,33,12) order by c,a; -a b c -2 3 2 -9 2 8 -5 2 12 -drop table t1; -create table t1 ( -a int not null, -b int not null, -c int not null, -d int not null, -e int not null, -primary key (a,b,c,d), index (d) -) engine = ndb; -insert into t1 values -(1,2,1,1,1),(2,3,2,3,1),(3,4,3,1,1),(4,5,4,7,1), -(5,2,12,12,1),(6,3,11,1,1),(7,4,10,3,1),(8,5,9,5,1), -(9,2,8,6,1),(10,3,7,5,1),(11,4,6,3,1),(12,5,5,2,1), -(1,2,1,2,1), -(1,2,1,3,1), -(1,2,1,4,1), -(1,2,1,5,1); -create table r1 as select * from t1 -where a=1 and b=2 and c=1 and d in (1,4,3,2); -select * from r1 order by a,b,c,d; -a b c d e -1 2 1 1 1 -1 2 1 2 1 -1 2 1 3 1 -1 2 1 4 1 -drop table r1; -update t1 set e = 100 -where d in (12,6,7); -select * from t1 where d in (12,6,7) order by a,b,c,d; -a b c d e -4 5 4 7 100 -5 2 12 12 100 -9 2 8 6 100 -select * from t1 where d not in (12,6,7) and e = 100; -a b c d e -update t1 -set e = 101 -where a=1 and -b=2 and -c=1 and -d in (1,4,3,2); -select * -from t1 -where a=1 and b=2 and c=1 and d in (1,4,3,2) -order by a,b,c,d; -a b c d e -1 2 1 1 101 -1 2 1 2 101 -1 2 1 3 101 -1 2 1 4 101 -select * -from t1 -where not (a=1 and b=2 and c=1 and d in (1,4,3,2)) -and e=101; -a b c d e -update t1 -set e = -(case d -when 12 then 112 -when 6 then 106 -when 7 then 107 -end) -where d in (12,6,7); -select * from t1 where d in (12,6,7) order by a,b,c,d; -a b c d e -4 5 4 7 107 -5 2 12 12 112 -9 2 8 6 106 -update t1 -set e = -(case d -when 1 then 111 -when 4 then 444 -when 3 then 333 -when 2 then 222 -end) -where a=1 and -b=2 and -c=1 and -d in (1,4,3,2); -select * -from t1 -where a=1 and b=2 and c=1 and d in (1,4,3,2) -order by a,b,c,d; -a b c d e -1 2 1 1 111 -1 2 1 2 222 -1 2 1 3 333 -1 2 1 4 444 -delete from t1 where d in (12,6,7); -select * from t1 where d in (12,6,7); -a b c d e -drop table t1; -create table t1 ( -a int not null primary key, -b int, -c int, -d int, -unique index (b), -index(c) -) engine = ndb; -insert into t1 values -(1,null,1,1), -(2,2,2,2), -(3,null,null,3), -(4,4,null,4), -(5,null,5,null), -(6,6,6,null), -(7,null,null,null), -(8,8,null,null), -(9,null,9,9), -(10,10,10,10), -(11,null,null,11), -(12,12,null,12), -(13,null,13,null), -(14,14,14,null), -(15,null,null,null), -(16,16,null,null); -create table t2 as select * from t1 where a in (5,6,7,8,9,10); -select * from t2 order by a; -a b c d -5 NULL 5 NULL -6 6 6 NULL -7 NULL NULL NULL -8 8 NULL NULL -9 NULL 9 9 -10 10 10 10 -drop table t2; -create table t2 as select * from t1 where b in (5,6,7,8,9,10); -select * from t2 order by a; -a b c d -6 6 6 NULL -8 8 NULL NULL -10 10 10 10 -drop table t2; -create table t2 as select * from t1 where c in (5,6,7,8,9,10); -select * from t2 order by a; -a b c d -5 NULL 5 NULL -6 6 6 NULL -9 NULL 9 9 -10 10 10 10 -drop table t2; -drop table t1; -CREATE TABLE t1 ( -a int(11) NOT NULL, -b int(11) NOT NULL, -c datetime default NULL, -PRIMARY KEY (a), -KEY idx_bc (b,c) -) ENGINE=ndbcluster; -INSERT INTO t1 VALUES -(406989,67,'2006-02-23 17:08:46'), (150078,67,'2005-10-26 11:17:45'), -(406993,67,'2006-02-27 11:20:57'), (245655,67,'2005-12-08 15:59:08'), -(406994,67,'2006-02-27 11:26:46'), (256,67,NULL), -(398341,67,'2006-02-20 04:48:44'), (254,67,NULL),(1120,67,NULL), -(406988,67,'2006-02-23 17:07:22'), (255,67,NULL), -(398340,67,'2006-02-20 04:38:53'),(406631,67,'2006-02-23 10:49:42'), -(245653,67,'2005-12-08 15:59:07'),(406992,67,'2006-02-24 16:47:18'), -(245654,67,'2005-12-08 15:59:08'),(406995,67,'2006-02-28 11:55:00'), -(127261,67,'2005-10-13 12:17:58'),(406991,67,'2006-02-24 16:42:32'), -(245652,67,'2005-12-08 15:58:27'),(398545,67,'2006-02-20 04:53:13'), -(154504,67,'2005-10-28 11:53:01'),(9199,67,NULL),(1,67,'2006-02-23 15:01:35'), -(223456,67,NULL),(4101,67,NULL),(1133,67,NULL), -(406990,67,'2006-02-23 18:01:45'),(148815,67,'2005-10-25 15:34:17'), -(148812,67,'2005-10-25 15:30:01'),(245651,67,'2005-12-08 15:58:27'), -(154503,67,'2005-10-28 11:52:38'); -create table t11 engine = ndbcluster select * from t1 where b = 67 AND (c IS NULL OR c > NOW()) order by 3 asc; -create table t12 engine = ndbcluster select * from t1 where b = 67 AND (c IS NULL OR c > NOW()) order by 3 desc; -create table t21 select * from t1 where b = 67 AND (c IS NULL OR c > '2005-12-08') order by 3 asc; -create table t22 engine = ndbcluster select * from t1 where b = 67 AND (c IS NULL OR c > '2005-12-08') order by 3 desc; -select * from t11 order by 1,2,3; -a b c -254 67 NULL -255 67 NULL -256 67 NULL -1120 67 NULL -1133 67 NULL -4101 67 NULL -9199 67 NULL -223456 67 NULL -select * from t12 order by 1,2,3; -a b c -254 67 NULL -255 67 NULL -256 67 NULL -1120 67 NULL -1133 67 NULL -4101 67 NULL -9199 67 NULL -223456 67 NULL -select * from t21 order by 1,2,3; -a b c -1 67 2006-02-23 15:01:35 -254 67 NULL -255 67 NULL -256 67 NULL -1120 67 NULL -1133 67 NULL -4101 67 NULL -9199 67 NULL -223456 67 NULL -245651 67 2005-12-08 15:58:27 -245652 67 2005-12-08 15:58:27 -245653 67 2005-12-08 15:59:07 -245654 67 2005-12-08 15:59:08 -245655 67 2005-12-08 15:59:08 -398340 67 2006-02-20 04:38:53 -398341 67 2006-02-20 04:48:44 -398545 67 2006-02-20 04:53:13 -406631 67 2006-02-23 10:49:42 -406988 67 2006-02-23 17:07:22 -406989 67 2006-02-23 17:08:46 -406990 67 2006-02-23 18:01:45 -406991 67 2006-02-24 16:42:32 -406992 67 2006-02-24 16:47:18 -406993 67 2006-02-27 11:20:57 -406994 67 2006-02-27 11:26:46 -406995 67 2006-02-28 11:55:00 -select * from t22 order by 1,2,3; -a b c -1 67 2006-02-23 15:01:35 -254 67 NULL -255 67 NULL -256 67 NULL -1120 67 NULL -1133 67 NULL -4101 67 NULL -9199 67 NULL -223456 67 NULL -245651 67 2005-12-08 15:58:27 -245652 67 2005-12-08 15:58:27 -245653 67 2005-12-08 15:59:07 -245654 67 2005-12-08 15:59:08 -245655 67 2005-12-08 15:59:08 -398340 67 2006-02-20 04:38:53 -398341 67 2006-02-20 04:48:44 -398545 67 2006-02-20 04:53:13 -406631 67 2006-02-23 10:49:42 -406988 67 2006-02-23 17:07:22 -406989 67 2006-02-23 17:08:46 -406990 67 2006-02-23 18:01:45 -406991 67 2006-02-24 16:42:32 -406992 67 2006-02-24 16:47:18 -406993 67 2006-02-27 11:20:57 -406994 67 2006-02-27 11:26:46 -406995 67 2006-02-28 11:55:00 -select t12.a from t11, t12 where t11.a in(255,256) and t11.a = t12.a and t11.c is null order by t12.a; -a -255 -256 -update t22 set c = '2005-12-08 15:58:27' where a = 255; -select * from t22 order by 1,2,3; -a b c -1 67 2006-02-23 15:01:35 -254 67 NULL -255 67 2005-12-08 15:58:27 -256 67 NULL -1120 67 NULL -1133 67 NULL -4101 67 NULL -9199 67 NULL -223456 67 NULL -245651 67 2005-12-08 15:58:27 -245652 67 2005-12-08 15:58:27 -245653 67 2005-12-08 15:59:07 -245654 67 2005-12-08 15:59:08 -245655 67 2005-12-08 15:59:08 -398340 67 2006-02-20 04:38:53 -398341 67 2006-02-20 04:48:44 -398545 67 2006-02-20 04:53:13 -406631 67 2006-02-23 10:49:42 -406988 67 2006-02-23 17:07:22 -406989 67 2006-02-23 17:08:46 -406990 67 2006-02-23 18:01:45 -406991 67 2006-02-24 16:42:32 -406992 67 2006-02-24 16:47:18 -406993 67 2006-02-27 11:20:57 -406994 67 2006-02-27 11:26:46 -406995 67 2006-02-28 11:55:00 -select t21.* from t21,t22 where t21.a = t22.a and -t22.a in (select t12.a from t11, t12 where t11.a in(255,256) and t11.a = t12.a and t11.c is null) and t22.c is null order by t21.a; -a b c -256 67 NULL -delete from t22 where a > 245651; -update t22 set b = a + 1; -select * from t22 order by 1,2,3; -a b c -1 2 2006-02-23 15:01:35 -254 255 NULL -255 256 2005-12-08 15:58:27 -256 257 NULL -1120 1121 NULL -1133 1134 NULL -4101 4102 NULL -9199 9200 NULL -223456 223457 NULL -245651 245652 2005-12-08 15:58:27 -select t21.c, count(*) -from t21 -inner join t22 using (a) -where t22.b in (2,256,257,1121,1134,4102,9200,223457,245652) -group by t21.c -order by t21.c; -c count(*) -NULL 7 -2005-12-08 15:58:27 1 -2006-02-23 15:01:35 1 -DROP TABLE t1, t11, t12, t21, t22; -CREATE TABLE t1 (id varchar(255) NOT NULL, -tag int(11) NOT NULL, -doc text NOT NULL, -type varchar(150) NOT NULL, -modified timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, -PRIMARY KEY (id) -) ENGINE=ndbcluster; -INSERT INTO t1 VALUES ('sakila',1,'Some text goes here','text',CURRENT_TIMESTAMP); -SELECT id, tag, doc, type FROM t1 WHERE id IN ('flipper','orka'); -id tag doc type -SELECT id, tag, doc, type FROM t1 WHERE id IN ('flipper','sakila'); -id tag doc type -sakila 1 Some text goes here text -DROP TABLE t1; -CREATE TABLE t1 ( -var1 int(2) NOT NULL, -var2 int(2) NOT NULL, -PRIMARY KEY (var1) -) ENGINE=ndbcluster DEFAULT CHARSET=ascii CHECKSUM=1; -CREATE TABLE t2 ( -var1 int(2) NOT NULL, -var2 int(2) NOT NULL, -PRIMARY KEY (var1) -) ENGINE=ndbcluster DEFAULT CHARSET=ascii CHECKSUM=1; -CREATE TRIGGER testtrigger -AFTER UPDATE ON t1 FOR EACH ROW BEGIN -REPLACE INTO t2 SELECT * FROM t1 WHERE t1.var1 = NEW.var1;END| -INSERT INTO t1 VALUES (1,1),(2,2),(3,3); -UPDATE t1 SET var2 = 9 WHERE var1 IN(1,2,3); -DROP TRIGGER testtrigger; -DROP TABLE t1, t2; -create table t1 (a int, b int, primary key (a), key ab (a,b)) engine=ndbcluster; -insert into t1 values (1,1), (10,10); -select * from t1 use index (ab) where a in(1,10) order by a; -a b -1 1 -10 10 -create table t2 (a int, b int, primary key (a,b)) engine=ndbcluster -partition by key(a); -insert into t2 values (1,1), (10,10); -select * from t2 where a in (1,10) order by a; -a b -1 1 -10 10 -drop table t1, t2; -create table t1 (id int primary key) engine ndb; -insert into t1 values (1), (2), (3); -create table t2 (id int primary key) engine ndb; -insert into t2 select id from t1; -create trigger kaboom after delete on t1 -for each row begin -delete from t2 where id=old.id; -end| -select * from t1 order by id; -id -1 -2 -3 -delete from t1 where id in (1,2); -select * from t2 order by id; -id -3 -drop trigger kaboom; -drop table t1, t2; diff --git a/mysql-test/suite/ndb/r/ndb_rename.result b/mysql-test/suite/ndb/r/ndb_rename.result deleted file mode 100644 index 2cc2dfb3ff1..00000000000 --- a/mysql-test/suite/ndb/r/ndb_rename.result +++ /dev/null @@ -1,24 +0,0 @@ -DROP TABLE IF EXISTS t1,t2; -drop database if exists mysqltest; -CREATE TABLE t1 ( -pk1 INT NOT NULL PRIMARY KEY, -attr1 INT NOT NULL, -attr2 INT, -attr3 VARCHAR(10), -INDEX i1(attr1) -) ENGINE=ndbcluster; -INSERT INTO t1 VALUES (0,0,0,"zero"),(1,1,1,"one"),(2,2,2,"two"); -SELECT * FROM t1 WHERE attr1 = 1; -pk1 attr1 attr2 attr3 -1 1 1 one -alter table t1 rename t2; -SELECT * FROM t2 WHERE attr1 = 1; -pk1 attr1 attr2 attr3 -1 1 1 one -create database ndbtest; -alter table t2 rename ndbtest.t2; -SELECT * FROM ndbtest.t2 WHERE attr1 = 1; -pk1 attr1 attr2 attr3 -1 1 1 one -drop table ndbtest.t2; -drop database ndbtest; diff --git a/mysql-test/suite/ndb/r/ndb_replace.result b/mysql-test/suite/ndb/r/ndb_replace.result deleted file mode 100644 index ba78017ef7b..00000000000 --- a/mysql-test/suite/ndb/r/ndb_replace.result +++ /dev/null @@ -1,99 +0,0 @@ -drop table if exists t1,t2; -CREATE TABLE t1 ( -gesuchnr int(11) DEFAULT '0' NOT NULL, -benutzer_id int(11) DEFAULT '0' NOT NULL, -PRIMARY KEY (gesuchnr,benutzer_id) -) engine=ndbcluster; -replace into t1 (gesuchnr,benutzer_id) values (2,1); -replace into t1 (gesuchnr,benutzer_id) values (1,1); -replace into t1 (gesuchnr,benutzer_id) values (1,1); -insert into t1 (gesuchnr, benutzer_id) value (3,2); -replace into t1 (gesuchnr,benutzer_id) values (1,1); -replace into t1 (gesuchnr,benutzer_id) values (1,1); -insert into t1 (gesuchnr,benutzer_id) values (1,1); -ERROR 23000: Duplicate entry '1-1' for key 'PRIMARY' -replace into t1 (gesuchnr,benutzer_id) values (1,1); -select * from t1 order by gesuchnr; -gesuchnr benutzer_id -1 1 -2 1 -3 2 -drop table t1; -CREATE TABLE t1(i INT PRIMARY KEY AUTO_INCREMENT, -j INT, -k INT, -UNIQUE INDEX(j) -) ENGINE = ndb; -INSERT INTO t1 VALUES (1,1,23),(2,2,24); -REPLACE INTO t1 (j,k) VALUES (1,42); -REPLACE INTO t1 (i,j) VALUES (17,2); -SELECT * from t1 ORDER BY i; -i j k -3 1 42 -17 2 NULL -DROP TABLE t1; -CREATE TABLE t2 (a INT(11) NOT NULL, -b INT(11) NOT NULL, -c INT(11) NOT NULL, -x TEXT, -y TEXT, -z TEXT, -id INT(10) unsigned NOT NULL AUTO_INCREMENT, -i INT(11) DEFAULT NULL, -PRIMARY KEY (id), -UNIQUE KEY a (a,b,c) -) ENGINE=ndbcluster; -REPLACE INTO t2 (a,b,c,x,y,z,i) VALUES (1,1,1,'a','a','a',1),(1,1,1,'b','b','b',2), (1,1,1,'c','c','c',3); -SELECT * FROM t2 ORDER BY id; -a b c x y z id i -1 1 1 c c c 3 3 -REPLACE INTO t2(a,b,c,x,y,z,i) values (1,1,1,'a','a','a',1); -REPLACE INTO t2(a,b,c,x,y,z,i) values (1,1,1,'b','b','b',2); -SELECT * FROM t2 ORDER BY id; -a b c x y z id i -1 1 1 b b b 5 2 -DROP TABLE t2; -drop table if exists t1; -create table t1 (pk int primary key, apk int unique, data int) engine=ndbcluster; -insert into t1 values (1, 1, 1), (2, 2, 2), (3, 3, 3); -replace into t1 (pk, apk) values (4, 1), (5, 2); -select * from t1 order by pk; -pk apk data -3 3 3 -4 1 NULL -5 2 NULL -delete from t1; -insert into t1 values (1, 1, 1), (2, 2, 2), (3, 3, 3); -replace into t1 (pk, apk) values (1, 4), (2, 5); -select * from t1 order by pk; -pk apk data -1 4 NULL -2 5 NULL -3 3 3 -delete from t1; -insert into t1 values (1, 1, 1), (4, 4, 4), (6, 6, 6); -load data infile '../../../std_data/loaddata5.dat' replace into table t1 fields terminated by '' enclosed by '' ignore 1 lines (pk, apk); -select * from t1 order by pk; -pk apk data -1 1 1 -3 4 NULL -5 6 NULL -delete from t1; -insert into t1 values (1, 1, 1), (3, 3, 3), (5, 5, 5); -load data infile '../../../std_data/loaddata5.dat' replace into table t1 fields terminated by '' enclosed by '' ignore 1 lines (pk, apk); -select * from t1 order by pk; -pk apk data -1 1 1 -3 4 NULL -5 6 NULL -delete from t1; -insert into t1 values (1, 1, 1), (2, 2, 2), (3, 3, 3); -replace into t1 (pk, apk) select 4, 1; -replace into t1 (pk, apk) select 2, 4; -select * from t1 order by pk; -pk apk data -2 4 NULL -3 3 3 -4 1 NULL -drop table t1; -End of 5.0 tests. diff --git a/mysql-test/suite/ndb/r/ndb_restore.result b/mysql-test/suite/ndb/r/ndb_restore.result deleted file mode 100644 index 186cbb71f5e..00000000000 --- a/mysql-test/suite/ndb/r/ndb_restore.result +++ /dev/null @@ -1,501 +0,0 @@ -use test; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; -drop table if exists t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c; -CREATE TABLE `t1_c` ( -`capgoaledatta` mediumint(5) unsigned NOT NULL auto_increment, -`goaledatta` char(2) NOT NULL default '', -`maturegarbagefa` varchar(32) NOT NULL default '', -PRIMARY KEY (`capgoaledatta`,`goaledatta`,`maturegarbagefa`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t1_c` VALUES (2,'3','q3plus.qt'),(400,'4','q3plus.qt'),(1,'3','q3.net'),(3,'4','q3.net'),(3000,'20','threetrees.qt'); -CREATE TABLE `t2_c` ( -`capgotod` smallint(5) unsigned NOT NULL auto_increment, -`gotod` smallint(5) unsigned NOT NULL default '0', -`goaledatta` char(2) default NULL, -`maturegarbagefa` varchar(32) default NULL, -`descrpooppo` varchar(64) default NULL, -`svcutonsa` varchar(64) NOT NULL default '', -PRIMARY KEY (`capgotod`), -KEY `i quadaddsvr` (`gotod`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t2_c` VALUES (500,4,'','q3.net','addavp:MK_CASELECTOR=1','postorod rattoaa'),(2,1,'4','','addavp:MK_BRANDTAD=345','REDS Brandtad'),(3,2,'4','q3.net','execorder','fixedRatediPO REDS'),(1,1,'3','','addavp:MK_BRANDTAD=123','TEST Brandtad'),(6,5,'','told.q3.net','addavp:MK_BRANDTAD=123','Brandtad Toldzone'),(4,3,'3','q3.net','addavp:MK_POOLHINT=2','ratedi PO TEST'),(5,0,'',NULL,NULL,''); -CREATE TABLE `t3_c` ( -`CapGoaledatta` smallint(5) unsigned NOT NULL default '0', -`capgotod` smallint(5) unsigned NOT NULL default '0', -PRIMARY KEY (`capgotod`,`CapGoaledatta`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 ROW_FORMAT=FIXED; -INSERT INTO `t3_c` VALUES (5,3),(2,4),(5,4),(1,3); -CREATE TABLE `t4_c` ( -`capfa` bigint(20) unsigned NOT NULL auto_increment, -`realm` varchar(32) NOT NULL default '', -`authpwchap` varchar(32) default NULL, -`fa` varchar(32) NOT NULL default '', -`payyingatta` tinyint(4) NOT NULL default '0', -`status` char(1) default NULL, -PRIMARY KEY (`fa`,`realm`), -KEY `capfa` (`capfa`), -KEY `i_quadentity` (`fa`,`realm`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t4_c` VALUES (18,'john.smith','q3.net','dessjohn.smith',0,NULL),(21,'quad_katt_with_brandtad','q3.net','acne',0,NULL),(2200,'quad_katt_carattoaa','q3.net','acne',0,NULL),(26,'436462612809','sqasdt.q3.net','N/A',0,'6'),(19,'john','smith.qt','dessjohn',0,NULL),(33,'436643196120','sqasdt.q3.net','N/A',1,'6'),(28,'436642900019','sqasdt.q3.net','N/A',0,'6'),(30,'436462900209','sqasdt.q3.net','N/A',0,'6'),(16,'436640006666','sqasdt.q3.net','',0,NULL),(19,'dette','el-redun.com','dessdette',0,NULL),(12,'quad_kattPP','q3.net','acne',2,NULL),(14,'436640008888','sqasdt.q3.net','',0,NULL),(29,'463624900028','sqasdt.q3.net','N/A',0,'6'),(15,'436640099099','sqasdt.q3.net','',0,NULL),(13,'pap','q3plus.qt','acne',1,NULL),(19,'436642612091','sqasdt.q3.net','N/A',0,'6'),(12,'quad_katt','q3.net','acne',0,NULL),(11,'quad_kattVK','q3.net','acne',1,NULL),(32000,'463641969502','sqasdt.q3.net','N/A',1,'6'),(20,'joe','q3.net','joedesswd',0,NULL),(290000000,'436642900034','sqasdt.q3.net','N/A',0,'6'),(25,'contind','armerde.qt','acne',1,NULL); -CREATE TABLE `t5_c` ( -`capfa` bigint(20) unsigned NOT NULL default '0', -`gotod` smallint(5) unsigned NOT NULL default '0', -`orderutonsa` varchar(64) NOT NULL default '', -PRIMARY KEY (`capfa`,`gotod`,`orderutonsa`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t5_c` VALUES (21,2,''),(21,1,''),(22,4,''); -CREATE TABLE `t6_c` ( -`capfa_parent` bigint(20) unsigned NOT NULL default '0', -`capfa_child` bigint(20) unsigned NOT NULL default '0', -`relatta` smallint(5) unsigned NOT NULL default '0', -PRIMARY KEY (`capfa_child`,`capfa_parent`,`relatta`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t6_c` VALUES (15,16,0),(19,20,0),(18326932092909551615,30,0),(26,29,0),(18326932092909551615,29,0),(19,18,0),(26,28,0),(12,14,0); -CREATE TABLE `t7_c` ( -`dardpo` char(15) NOT NULL default '', -`dardtestard` tinyint(3) unsigned NOT NULL auto_increment, -`FastFA` char(5) NOT NULL default '', -`FastCode` char(6) NOT NULL default '', -`Fastca` char(1) NOT NULL default '', -`Fastmag` char(1) NOT NULL default '', -`Beareratta` char(2) NOT NULL default '', -PRIMARY KEY (`dardpo`,`dardtestard`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t7_c` VALUES ('2.6.2.4',24,'CECHP','54545','0','0','5'),('2.2.5.4',26,'CANFA','33223','1','1','4'),('4.3.2.4',28,'ITALD','54222','1','0','5'),('129..0.0.eins',28,'G','99999','1','1','5'),('1.1.1.1',24,'AUTPT','32323','0','1','3'); -CREATE TABLE `t8_c` ( -`kattjame` varchar(32) NOT NULL default '', -`realm` varchar(32) NOT NULL default '', -`realm_entered` varchar(32) NOT NULL default '', -`maturegarbagefa` varchar(32) NOT NULL default '', -`hunderaaarbagefa_parent` varchar(32) NOT NULL default '', -`kattjame_entered` varchar(32) NOT NULL default '', -`hunderaaarbagefa` varchar(32) NOT NULL default '', -`gest` varchar(16) default NULL, -`hassetino` varchar(16) NOT NULL default '', -`aaaproxysessfa` varchar(255) default NULL, -`autologonallowed` char(1) default NULL, -`squardporoot` varchar(15) NOT NULL default '', -`naspo` varchar(15) default NULL, -`beareratta` char(2) default NULL, -`fastCode` varchar(6) default NULL, -`fastFA` varchar(5) default NULL, -`fastca` char(1) default NULL, -`fastmag` char(1) default NULL, -`lastupdate` datetime default NULL, -`hassetistart` datetime NOT NULL default '0000-00-00 00:00:00', -`accthassetitime` int(10) unsigned default NULL, -`acctoutputoctets` bigint(20) unsigned default NULL, -`acctinputoctets` bigint(20) unsigned default NULL, -PRIMARY KEY (`kattjame`,`hunderaaarbagefa`,`hassetistart`,`hassetino`), -KEY `squardporoot` (`squardporoot`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t8_c` VALUES ('4tt45345235','pap','q3plus.qt','q3plus.qt','q3.net','436643196120','436643196929','8956234534568968','5524595699','uxasmt21.net.acne.qt/481889229462692422','','1.1.1.1','2.2.4.6','4','86989','34','x','x','2012-03-12 12:55:34','2012-12-05 11:20:04',3223433,3369,9565),('4545435545','john','q3.net','q3.net','acne.li','436643196120','436643196929','45345234568968','995696699','uxasmt21.net.acne.qt/481889229462692423','','1.1.1.1','2.2.9.8','2','86989','34','x','x','2012-03-12 11:35:03','2012-12-05 08:50:04',8821923,169,3565),('versteckter_q3net_katt','joe','q3.net','elredun.com','q3.net','436643196120','436643196939','91341234568968','695595699','uxasmt21.net.acne.qt/481889229462692421','','1.1.1.1','2.5.2.5','3','86989','34','x','x','2012-03-12 18:35:04','2012-12-05 12:35:04',1923123,9569,6565); -CREATE TABLE `t9_c` ( -`kattjame` varchar(32) NOT NULL default '', -`kattjame_entered` varchar(32) NOT NULL default '', -`realm` varchar(32) NOT NULL default '', -`realm_entered` varchar(32) NOT NULL default '', -`maturegarbagefa` varchar(32) NOT NULL default '', -`hunderaaarbagefa` varchar(32) NOT NULL default '', -`hunderaaarbagefa_parent` varchar(32) NOT NULL default '', -`gest` varchar(16) default NULL, -`hassetino` varchar(16) NOT NULL default '', -`squardporoot` varchar(15) NOT NULL default '', -`naspo` varchar(15) default NULL, -`beareratta` char(2) default NULL, -`fastCode` varchar(6) default NULL, -`fastFA` varchar(5) default NULL, -`fastca` char(1) default NULL, -`fastmag` char(1) default NULL, -`lastupdate` datetime default NULL, -`hassetistart` datetime NOT NULL default '0000-00-00 00:00:00', -`accthassetitime` int(10) unsigned default NULL, -`actcoutpuocttets` bigint(20) unsigned default NULL, -`actinputocctets` bigint(20) unsigned default NULL, -`terminateraste` tinyint(3) unsigned default NULL, -PRIMARY KEY (`kattjame`,`hunderaaarbagefa`,`hassetistart`,`hassetino`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t9_c` VALUES ('3g4jh8gar2t','joe','q3.net','elredun.com','q3.net','436643316120','436643316939','91341234568968','695595699','1.1.1.1','2.2.6.2','3','86989','34','x','x','2012-03-12 18:35:04','2012-12-05 12:35:04',3123123,9569,6565,1),('4tt45345235','pap','q3plus.qt','q3plus.qt','q3.net','436643316120','436643316939','8956234534568968','5254595969','1.1.1.1','8.6.2.2','4','86989','34','x','x','2012-03-12 12:55:34','2012-12-05 11:20:04',3223433,3369,9565,2),('4545435545','john','q3.net','q3.net','acne.li','436643316120','436643316939','45345234568968','995696699','1.1.1.1','2.9.9.2','2','86998','34','x','x','2012-03-12 11:35:03','2012-12-05 08:50:04',8823123,169,3565,3); -CREATE TABLE t10_c (a INT AUTO_INCREMENT KEY) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO t10_c VALUES (1),(2),(3); -insert into t10_c values (10000),(2000),(3000); -create table t1 engine=myisam as select * from t1_c; -create table t2 engine=myisam as select * from t2_c; -create table t3 engine=myisam as select * from t3_c; -create table t4 engine=myisam as select * from t4_c; -create table t5 engine=myisam as select * from t5_c; -create table t6 engine=myisam as select * from t6_c; -create table t7 engine=myisam as select * from t7_c; -create table t8 engine=myisam as select * from t8_c; -create table t9 engine=myisam as select * from t9_c; -create table t10 engine=myisam as select * from t10_c; -ForceVarPart: 0 -ForceVarPart: 1 -CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info -(id INT, backup_id INT) ENGINE = MEMORY; -LOAD DATA INFILE '/tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; -DROP TABLE test.backup_info; -drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c; -ForceVarPart: 0 -ForceVarPart: 1 -select * from information_schema.columns where table_name = "t1_c"; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -def test t1_c capgoaledatta 1 NULL NO mediumint NULL NULL 7 0 NULL NULL mediumint(5) unsigned PRI auto_increment select,insert,update,references -def test t1_c goaledatta 2 NO char 2 2 NULL NULL latin1 latin1_swedish_ci char(2) PRI select,insert,update,references -def test t1_c maturegarbagefa 3 NO varchar 32 32 NULL NULL latin1 latin1_swedish_ci varchar(32) PRI select,insert,update,references -select count(*) from t1; -count(*) -5 -select count(*) from t1_c; -count(*) -5 -select count(*) -from (select * from t1 union -select * from t1_c) a; -count(*) -5 -select count(*) from t2; -count(*) -7 -select count(*) from t2_c; -count(*) -7 -select count(*) -from (select * from t2 union -select * from t2_c) a; -count(*) -7 -select count(*) from t3; -count(*) -4 -select count(*) from t3_c; -count(*) -4 -select count(*) -from (select * from t3 union -select * from t3_c) a; -count(*) -4 -select count(*) from t4; -count(*) -22 -select count(*) from t4_c; -count(*) -22 -select count(*) -from (select * from t4 union -select * from t4_c) a; -count(*) -22 -select count(*) from t5; -count(*) -3 -select count(*) from t5_c; -count(*) -3 -select count(*) -from (select * from t5 union -select * from t5_c) a; -count(*) -3 -select count(*) from t6; -count(*) -8 -select count(*) from t6_c; -count(*) -8 -select count(*) -from (select * from t6 union -select * from t6_c) a; -count(*) -8 -select count(*) from t7; -count(*) -5 -select count(*) from t7_c; -count(*) -5 -select count(*) -from (select * from t7 union -select * from t7_c) a; -count(*) -5 -select count(*) from t8; -count(*) -3 -select count(*) from t8_c; -count(*) -3 -select count(*) -from (select * from t8 union -select * from t8_c) a; -count(*) -3 -select count(*) from t9; -count(*) -3 -select count(*) from t9_c; -count(*) -3 -select count(*) -from (select * from t9 union -select * from t9_c) a; -count(*) -3 -select * from t10_c order by a; -a -1 -2 -3 -2000 -3000 -10000 -select max(capgoaledatta) from t1_c; -max(capgoaledatta) -3000 -select auto_increment from information_schema.tables -where table_name = 't1_c'; -auto_increment -3001 -select max(capgotod) from t2_c; -max(capgotod) -500 -select auto_increment from information_schema.tables -where table_name = 't2_c'; -auto_increment -501 -select max(capfa) from t4_c; -max(capfa) -290000000 -select auto_increment from information_schema.tables -where table_name = 't4_c'; -auto_increment -290000001 -select max(dardtestard) from t7_c; -max(dardtestard) -28 -select auto_increment from information_schema.tables -where table_name = 't7_c'; -auto_increment -29 -select max(a) from t10_c; -max(a) -10000 -select auto_increment from information_schema.tables -where table_name = 't10_c'; -auto_increment -10001 -ALTER TABLE t7_c -PARTITION BY LINEAR KEY (`dardtestard`); -CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info -(id INT, backup_id INT) ENGINE = MEMORY; -LOAD DATA INFILE '/tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; -DROP TABLE test.backup_info; -drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c; -select count(*) from t1; -count(*) -5 -select count(*) from t1_c; -count(*) -5 -select count(*) -from (select * from t1 union -select * from t1_c) a; -count(*) -5 -select count(*) from t2; -count(*) -7 -select count(*) from t2_c; -count(*) -7 -select count(*) -from (select * from t2 union -select * from t2_c) a; -count(*) -7 -select count(*) from t3; -count(*) -4 -select count(*) from t3_c; -count(*) -4 -select count(*) -from (select * from t3 union -select * from t3_c) a; -count(*) -4 -select count(*) from t4; -count(*) -22 -select count(*) from t4_c; -count(*) -22 -select count(*) -from (select * from t4 union -select * from t4_c) a; -count(*) -22 -select count(*) from t5; -count(*) -3 -select count(*) from t5_c; -count(*) -3 -select count(*) -from (select * from t5 union -select * from t5_c) a; -count(*) -3 -select count(*) from t6; -count(*) -8 -select count(*) from t6_c; -count(*) -8 -select count(*) -from (select * from t6 union -select * from t6_c) a; -count(*) -8 -select count(*) from t7; -count(*) -5 -select count(*) from t7_c; -count(*) -5 -select count(*) -from (select * from t7 union -select * from t7_c) a; -count(*) -5 -select count(*) from t8; -count(*) -3 -select count(*) from t8_c; -count(*) -3 -select count(*) -from (select * from t8 union -select * from t8_c) a; -count(*) -3 -select count(*) from t9; -count(*) -3 -select count(*) from t9_c; -count(*) -3 -select count(*) -from (select * from t9 union -select * from t9_c) a; -count(*) -3 -drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c; -select count(*) from t1; -count(*) -5 -select count(*) from t1_c; -count(*) -5 -select count(*) -from (select * from t1 union -select * from t1_c) a; -count(*) -5 -select count(*) from t2; -count(*) -7 -select count(*) from t2_c; -count(*) -7 -select count(*) -from (select * from t2 union -select * from t2_c) a; -count(*) -7 -select count(*) from t3; -count(*) -4 -select count(*) from t3_c; -count(*) -4 -select count(*) -from (select * from t3 union -select * from t3_c) a; -count(*) -4 -select count(*) from t4; -count(*) -22 -select count(*) from t4_c; -count(*) -22 -select count(*) -from (select * from t4 union -select * from t4_c) a; -count(*) -22 -select count(*) from t5; -count(*) -3 -select count(*) from t5_c; -count(*) -3 -select count(*) -from (select * from t5 union -select * from t5_c) a; -count(*) -3 -select count(*) from t6; -count(*) -8 -select count(*) from t6_c; -count(*) -8 -select count(*) -from (select * from t6 union -select * from t6_c) a; -count(*) -8 -select count(*) from t7; -count(*) -5 -select count(*) from t7_c; -count(*) -5 -select count(*) -from (select * from t7 union -select * from t7_c) a; -count(*) -5 -select count(*) from t8; -count(*) -3 -select count(*) from t8_c; -count(*) -3 -select count(*) -from (select * from t8 union -select * from t8_c) a; -count(*) -3 -select count(*) from t9; -count(*) -3 -select count(*) from t9_c; -count(*) -3 -select count(*) -from (select * from t9 union -select * from t9_c) a; -count(*) -3 -drop table t1_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c; -CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info -(id INT, backup_id INT) ENGINE = MEMORY; -LOAD DATA INFILE '/tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; -DROP TABLE test.backup_info; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; -drop table if exists t2_c; -520093696, diff --git a/mysql-test/suite/ndb/r/ndb_restore_compat.result b/mysql-test/suite/ndb/r/ndb_restore_compat.result deleted file mode 100644 index f2630573220..00000000000 --- a/mysql-test/suite/ndb/r/ndb_restore_compat.result +++ /dev/null @@ -1,119 +0,0 @@ -DROP DATABASE IF EXISTS BANK; -CREATE DATABASE BANK default charset=latin1 default collate=latin1_bin; -USE BANK; -SHOW TABLES; -Tables_in_BANK -ACCOUNT -GL -ACCOUNT_TYPE -TRANSACTION -SYSTEM_VALUES -SELECT * FROM GL ORDER BY TIME,ACCOUNT_TYPE; -TIME ACCOUNT_TYPE BALANCE DEPOSIT_COUNT DEPOSIT_SUM WITHDRAWAL_COUNT WITHDRAWAL_SUM PURGED -0 0 10000000 0 0 0 0 1 -0 1 30000 0 0 0 0 1 -0 2 20000 0 0 0 0 1 -0 3 20000 0 0 0 0 1 -0 4 20000 0 0 0 0 1 -1 0 10000000 0 0 0 0 0 -1 1 30000 0 0 0 0 0 -1 2 20000 0 0 0 0 0 -1 3 20000 0 0 0 0 0 -1 4 20000 0 0 0 0 0 -2 0 9981761 17 80457 19 98696 0 -2 1 17823 55 203688 46 215865 0 -2 2 47056 33 159275 33 132219 0 -2 3 15719 26 126833 29 131114 0 -2 4 27641 32 133459 36 125818 0 -SELECT * FROM ACCOUNT ORDER BY ACCOUNT_ID; -ACCOUNT_ID OWNER BALANCE ACCOUNT_TYPE -0 0 9863546 0 -1 3001 12885 1 -2 3002 11012 2 -3 3003 32789 3 -4 3004 10992 4 -5 3005 2247 1 -6 3006 3170 1 -7 3007 60321 2 -8 3008 30508 3 -9 3009 62530 4 -SELECT COUNT(*) FROM TRANSACTION; -COUNT(*) -3444 -SELECT * FROM SYSTEM_VALUES ORDER BY SYSTEM_VALUES_ID; -SYSTEM_VALUES_ID VALUE -0 2039 -1 3 -SELECT * FROM mysql.ndb_apply_status WHERE server_id=0; -server_id epoch log_name start_pos end_pos -0 151 0 0 -ForceVarPart: 1 -ForceVarPart: 1 -ForceVarPart: 1 -ForceVarPart: 1 -ForceVarPart: 1 -TRUNCATE GL; -TRUNCATE ACCOUNT; -TRUNCATE TRANSACTION; -TRUNCATE SYSTEM_VALUES; -TRUNCATE ACCOUNT_TYPE; -ForceVarPart: 1 -ForceVarPart: 1 -ForceVarPart: 1 -ForceVarPart: 1 -ForceVarPart: 1 -SELECT * FROM GL ORDER BY TIME,ACCOUNT_TYPE; -TIME ACCOUNT_TYPE BALANCE DEPOSIT_COUNT DEPOSIT_SUM WITHDRAWAL_COUNT WITHDRAWAL_SUM PURGED -0 0 10000000 0 0 0 0 1 -0 1 30000 0 0 0 0 1 -0 2 20000 0 0 0 0 1 -0 3 20000 0 0 0 0 1 -0 4 20000 0 0 0 0 1 -1 0 10000000 0 0 0 0 1 -1 1 30000 0 0 0 0 1 -1 2 20000 0 0 0 0 1 -1 3 20000 0 0 0 0 1 -1 4 20000 0 0 0 0 1 -2 0 10000000 0 0 0 0 1 -2 1 30000 0 0 0 0 1 -2 2 20000 0 0 0 0 1 -2 3 20000 0 0 0 0 1 -2 4 20000 0 0 0 0 1 -3 0 9963591 14 59111 19 95520 0 -3 1 44264 49 255559 53 241295 0 -3 2 25515 39 177806 36 172291 0 -3 3 16779 26 129200 29 132421 0 -3 4 39851 43 182771 34 162920 0 -4 0 9733661 141 632616 162 862546 0 -4 1 63853 426 2005337 415 1985748 0 -4 2 140473 314 1548632 297 1433674 0 -4 3 13481 310 1528043 324 1531341 0 -4 4 138532 316 1540206 309 1441525 0 -SELECT * FROM ACCOUNT ORDER BY ACCOUNT_ID; -ACCOUNT_ID OWNER BALANCE ACCOUNT_TYPE -0 0 9679579 0 -1 3001 18130 1 -2 3002 12318 2 -3 3003 3049 3 -4 3004 39517 4 -5 3005 37051 1 -6 3006 144497 1 -7 3007 130670 2 -8 3008 13747 3 -9 3009 11442 4 -SELECT COUNT(*) FROM TRANSACTION; -COUNT(*) -4056 -SELECT * FROM SYSTEM_VALUES ORDER BY SYSTEM_VALUES_ID; -SYSTEM_VALUES_ID VALUE -0 2297 -1 5 -SELECT * FROM mysql.ndb_apply_status WHERE server_id=0; -server_id epoch log_name start_pos end_pos -0 331 0 0 -SELECT * FROM DESCRIPTION ORDER BY USERNAME; -USERNAME ADDRESS -Guangbao Ni Suite 503, 5F NCI Tower, A12 Jianguomenwai Avenue Chaoyang District, Beijing, 100022 PRC -USERNAME Varchar(255;latin1_swedish_ci) NULL AT=SHORT_VAR ST=MEMORY -ADDRESS Longvarchar(2002;latin1_swedish_ci) NULL AT=MEDIUM_VAR ST=MEMORY -DROP DATABASE BANK; diff --git a/mysql-test/suite/ndb/r/ndb_restore_different_endian_data.result b/mysql-test/suite/ndb/r/ndb_restore_different_endian_data.result deleted file mode 100644 index b101c93d156..00000000000 --- a/mysql-test/suite/ndb/r/ndb_restore_different_endian_data.result +++ /dev/null @@ -1,200 +0,0 @@ -USE test; -DROP TABLE IF EXISTS t_num,t_datetime,t_string_1,t_string_2,t_gis; -SHOW TABLES; -Tables_in_test -t_gis -t_string_1 -t_datetime -t_num -t_string_2 -SHOW CREATE TABLE t_num; -Table Create Table -t_num CREATE TABLE `t_num` ( - `t_pk` int(11) NOT NULL, - `t_bit` bit(64) DEFAULT NULL, - `t_tinyint` tinyint(4) DEFAULT NULL, - `t_bool` tinyint(1) DEFAULT NULL, - `t_smallint` smallint(6) DEFAULT NULL, - `t_mediumint` mediumint(9) DEFAULT NULL, - `t_int` int(11) DEFAULT NULL, - `t_bigint` bigint(20) DEFAULT NULL, - `t_float` float DEFAULT NULL, - `t_double` double DEFAULT NULL, - `t_decimal` decimal(37,16) DEFAULT NULL, - PRIMARY KEY (`t_pk`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -SHOW CREATE TABLE t_datetime; -Table Create Table -t_datetime CREATE TABLE `t_datetime` ( - `t_pk` int(11) NOT NULL, - `t_date` date DEFAULT NULL, - `t_datetime` datetime DEFAULT NULL, - `t_timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `t_time` time DEFAULT NULL, - `t_year` year(4) DEFAULT NULL, - PRIMARY KEY (`t_pk`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -SHOW CREATE TABLE t_string_1; -Table Create Table -t_string_1 CREATE TABLE `t_string_1` ( - `t_pk` int(11) NOT NULL, - `t_char` char(255) DEFAULT NULL, - `t_varchar` varchar(655) DEFAULT NULL, - `t_binary` binary(255) DEFAULT NULL, - `t_varbinary` varbinary(6553) DEFAULT NULL, - PRIMARY KEY (`t_pk`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -SHOW CREATE TABLE t_string_2; -Table Create Table -t_string_2 CREATE TABLE `t_string_2` ( - `t_pk` int(11) NOT NULL, - `t_tinyblob` tinyblob, - `t_tinytext` tinytext, - `t_blob` blob, - `t_text` text, - `t_mediumblob` mediumblob, - `t_mediumtext` mediumtext, - `t_longblob` longblob, - `t_longtext` longtext, - `t_enum` enum('001001','001004','001010','001018','001019','001020','001021','001027','001028','001029','001030','001031','001100','002003','002004','002005','002007') NOT NULL DEFAULT '001001', - `t_set` set('a','B') DEFAULT NULL, - PRIMARY KEY (`t_pk`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -SHOW CREATE TABLE t_gis; -Table Create Table -t_gis CREATE TABLE `t_gis` ( - `t_pk` int(11) NOT NULL, - `t_point` point DEFAULT NULL, - `t_linestring` linestring DEFAULT NULL, - `t_polygon` polygon DEFAULT NULL, - `t_multipoint` multipoint DEFAULT NULL, - `t_multilinestring` multilinestring DEFAULT NULL, - `t_multipolygon` multipolygon DEFAULT NULL, - `t_geometrycollection` geometrycollection DEFAULT NULL, - `t_geometry` geometry DEFAULT NULL, - PRIMARY KEY (`t_pk`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -SELECT * FROM t_datetime; -t_pk t_date t_datetime t_timestamp t_time t_year -1 1998-01-01 2006-08-10 10:11:12 2002-10-29 16:51:06 19:38:34 2155 -SELECT t_pk,hex(t_bit),t_tinyint,t_bool,t_smallint,t_mediumint,t_int,t_bigint,t_float,t_double,t_decimal FROM t_num; -t_pk hex(t_bit) t_tinyint t_bool t_smallint t_mediumint t_int t_bigint t_float t_double t_decimal -1 AAAAAAAAAAAAAAAA 125 1 32765 8388606 2147483647 9223372036854775807 1e20 1e150 331.0000000000000000 -SELECT t_pk,t_char,t_varchar,hex(t_binary),hex(t_varbinary) FROM t_string_1; -t_pk t_char t_varchar hex(t_binary) hex(t_varbinary) -1 abcdefghijklmn abcdefghijklmnabcdefghijklmnabcdefghijklmnabcdefghijklmn 612020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 4100 -SELECT * FROM t_string_2; -t_pk t_tinyblob t_tinytext t_blob t_text t_mediumblob t_mediumtext t_longblob t_longtext t_enum t_set -1 abcdefghijklmnabcdefghijklmn abcdefghijklmnabcdefghijklmn a123456789b123456789c123456789d123456789e123456789f123456789g123456789 a123456789b123456789c123456789d123456789e123456789f123456789g123456789 a123456789b123456789c123456789d123456789e123456789f123456789g123456789 a123456789b123456789c123456789d123456789e123456789f123456789g123456789 a123456789b123456789c123456789d123456789e123456789f123456789g123456789 a123456789b123456789c123456789d123456789e123456789f123456789g123456789 001001 a -SELECT AsText(t_point), AsText(t_linestring),AsText(t_polygon) FROM t_gis ORDER by t_pk; -AsText(t_point) AsText(t_linestring) AsText(t_polygon) -POINT(10 10) LINESTRING(10 10,20 10,20 20,10 20,10 10) POLYGON((0 0,50 0,50 50,0 50,0 0),(10 10,20 10,20 20,10 20,10 10)) -POINT(10 20) LINESTRING(10 10,40 10) POLYGON((0 0,30 0,30 30,0 0)) -SELECT AsText(t_multipoint), AsText(t_multilinestring),AsText(t_multipolygon) FROM t_gis ORDER by t_pk; -AsText(t_multipoint) AsText(t_multilinestring) AsText(t_multipolygon) -MULTIPOINT(1 1,11 11,11 21,21 21) MULTILINESTRING((10 48,10 21,10 0)) MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18))) -MULTIPOINT(3 6,4 10) MULTILINESTRING((1 2,3 5),(2 5,5 8,21 7)) MULTIPOLYGON(((0 3,3 3,3 0,0 3))) -SELECT AsText(t_geometrycollection), AsText(t_geometry) FROM t_gis ORDER by t_pk; -AsText(t_geometrycollection) AsText(t_geometry) -GEOMETRYCOLLECTION(POINT(0 0),LINESTRING(0 0,10 10)) MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18))) -GEOMETRYCOLLECTION(POINT(44 6),LINESTRING(3 6,7 9)) GEOMETRYCOLLECTION(POINT(44 6),LINESTRING(3 6,7 9)) -DROP TABLE t_num,t_datetime,t_string_1,t_string_2,t_gis; -SHOW TABLES; -Tables_in_test -t_gis -t_string_1 -t_datetime -t_num -t_string_2 -SHOW CREATE TABLE t_num; -Table Create Table -t_num CREATE TABLE `t_num` ( - `t_pk` int(11) NOT NULL, - `t_bit` bit(64) DEFAULT NULL, - `t_tinyint` tinyint(4) DEFAULT NULL, - `t_bool` tinyint(1) DEFAULT NULL, - `t_smallint` smallint(6) DEFAULT NULL, - `t_mediumint` mediumint(9) DEFAULT NULL, - `t_int` int(11) DEFAULT NULL, - `t_bigint` bigint(20) DEFAULT NULL, - `t_float` float DEFAULT NULL, - `t_double` double DEFAULT NULL, - `t_decimal` decimal(37,16) DEFAULT NULL, - PRIMARY KEY (`t_pk`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -SHOW CREATE TABLE t_datetime; -Table Create Table -t_datetime CREATE TABLE `t_datetime` ( - `t_pk` int(11) NOT NULL, - `t_date` date DEFAULT NULL, - `t_datetime` datetime DEFAULT NULL, - `t_timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `t_time` time DEFAULT NULL, - `t_year` year(4) DEFAULT NULL, - PRIMARY KEY (`t_pk`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -SHOW CREATE TABLE t_string_1; -Table Create Table -t_string_1 CREATE TABLE `t_string_1` ( - `t_pk` int(11) NOT NULL, - `t_char` char(255) DEFAULT NULL, - `t_varchar` varchar(655) DEFAULT NULL, - `t_binary` binary(255) DEFAULT NULL, - `t_varbinary` varbinary(6553) DEFAULT NULL, - PRIMARY KEY (`t_pk`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -SHOW CREATE TABLE t_string_2; -Table Create Table -t_string_2 CREATE TABLE `t_string_2` ( - `t_pk` int(11) NOT NULL, - `t_tinyblob` tinyblob, - `t_tinytext` tinytext, - `t_blob` blob, - `t_text` text, - `t_mediumblob` mediumblob, - `t_mediumtext` mediumtext, - `t_longblob` longblob, - `t_longtext` longtext, - `t_enum` enum('001001','001004','001010','001018','001019','001020','001021','001027','001028','001029','001030','001031','001100','002003','002004','002005','002007') NOT NULL DEFAULT '001001', - `t_set` set('a','B') DEFAULT NULL, - PRIMARY KEY (`t_pk`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -SHOW CREATE TABLE t_gis; -Table Create Table -t_gis CREATE TABLE `t_gis` ( - `t_pk` int(11) NOT NULL, - `t_point` point DEFAULT NULL, - `t_linestring` linestring DEFAULT NULL, - `t_polygon` polygon DEFAULT NULL, - `t_multipoint` multipoint DEFAULT NULL, - `t_multilinestring` multilinestring DEFAULT NULL, - `t_multipolygon` multipolygon DEFAULT NULL, - `t_geometrycollection` geometrycollection DEFAULT NULL, - `t_geometry` geometry DEFAULT NULL, - PRIMARY KEY (`t_pk`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -SELECT * FROM t_datetime; -t_pk t_date t_datetime t_timestamp t_time t_year -1 1998-01-01 2006-08-10 10:11:12 2002-10-29 16:51:06 19:38:34 2155 -SELECT t_pk,hex(t_bit),t_tinyint,t_bool,t_smallint,t_mediumint,t_int,t_bigint,t_float,t_double,t_decimal FROM t_num; -t_pk hex(t_bit) t_tinyint t_bool t_smallint t_mediumint t_int t_bigint t_float t_double t_decimal -1 AAAAAAAAAAAAAAAA 125 1 32765 8388606 2147483647 9223372036854775807 1e20 1e150 331.0000000000000000 -SELECT t_pk,t_char,t_varchar,hex(t_binary),hex(t_varbinary) FROM t_string_1; -t_pk t_char t_varchar hex(t_binary) hex(t_varbinary) -1 abcdefghijklmn abcdefghijklmnabcdefghijklmnabcdefghijklmnabcdefghijklmn 612020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 4100 -SELECT * FROM t_string_2; -t_pk t_tinyblob t_tinytext t_blob t_text t_mediumblob t_mediumtext t_longblob t_longtext t_enum t_set -1 abcdefghijklmnabcdefghijklmn abcdefghijklmnabcdefghijklmn a123456789b123456789c123456789d123456789e123456789f123456789g123456789 a123456789b123456789c123456789d123456789e123456789f123456789g123456789 a123456789b123456789c123456789d123456789e123456789f123456789g123456789 a123456789b123456789c123456789d123456789e123456789f123456789g123456789 a123456789b123456789c123456789d123456789e123456789f123456789g123456789 a123456789b123456789c123456789d123456789e123456789f123456789g123456789 001001 a -SELECT AsText(t_point), AsText(t_linestring),AsText(t_polygon) FROM t_gis ORDER by t_pk; -AsText(t_point) AsText(t_linestring) AsText(t_polygon) -POINT(10 10) LINESTRING(10 10,20 10,20 20,10 20,10 10) POLYGON((0 0,50 0,50 50,0 50,0 0),(10 10,20 10,20 20,10 20,10 10)) -POINT(10 20) LINESTRING(10 10,40 10) POLYGON((0 0,30 0,30 30,0 0)) -SELECT AsText(t_multipoint), AsText(t_multilinestring),AsText(t_multipolygon) FROM t_gis ORDER by t_pk; -AsText(t_multipoint) AsText(t_multilinestring) AsText(t_multipolygon) -MULTIPOINT(1 1,11 11,11 21,21 21) MULTILINESTRING((10 48,10 21,10 0)) MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18))) -MULTIPOINT(3 6,4 10) MULTILINESTRING((1 2,3 5),(2 5,5 8,21 7)) MULTIPOLYGON(((0 3,3 3,3 0,0 3))) -SELECT AsText(t_geometrycollection), AsText(t_geometry) FROM t_gis ORDER by t_pk; -AsText(t_geometrycollection) AsText(t_geometry) -GEOMETRYCOLLECTION(POINT(0 0),LINESTRING(0 0,10 10)) MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18))) -GEOMETRYCOLLECTION(POINT(44 6),LINESTRING(3 6,7 9)) GEOMETRYCOLLECTION(POINT(44 6),LINESTRING(3 6,7 9)) -DROP TABLE t_num,t_datetime,t_string_1,t_string_2,t_gis; diff --git a/mysql-test/suite/ndb/r/ndb_restore_partition.result b/mysql-test/suite/ndb/r/ndb_restore_partition.result deleted file mode 100644 index b984c76a91d..00000000000 --- a/mysql-test/suite/ndb/r/ndb_restore_partition.result +++ /dev/null @@ -1,460 +0,0 @@ -use test; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -drop table if exists t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c; -CREATE TABLE `t1_c` ( -`capgoaledatta` smallint(5) unsigned NOT NULL auto_increment, -`goaledatta` char(2) NOT NULL default '', -`maturegarbagefa` varchar(32) NOT NULL default '', -PRIMARY KEY (`capgoaledatta`,`goaledatta`,`maturegarbagefa`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t1_c` VALUES (2,'3','q3plus.qt'),(4,'4','q3plus.qt'),(1,'3','q3.net'),(3,'4','q3.net'),(3,'20','threetrees.qt'); -CREATE TABLE `t2_c` ( -`capgotod` smallint(5) unsigned NOT NULL auto_increment, -`gotod` smallint(5) unsigned NOT NULL default '0', -`goaledatta` char(2) default NULL, -`maturegarbagefa` varchar(32) default NULL, -`descrpooppo` varchar(64) default NULL, -`svcutonsa` varchar(64) NOT NULL default '', -PRIMARY KEY (`capgotod`), -KEY `i_quadaddsvr` (`gotod`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t2_c` VALUES (5,4,'','q3.net','addavp:MK_CASELECTOR=1','postorod rattoaa'),(2,1,'4','','addavp:MK_BRANDTAD=345','REDS Brandtad'),(3,2,'4','q3.net','execorder','fixedRatediPO REDS'),(1,1,'3','','addavp:MK_BRANDTAD=123','TEST Brandtad'),(6,5,'','told.q3.net','addavp:MK_BRANDTAD=123','Brandtad Toldzone'),(4,3,'3','q3.net','addavp:MK_POOLHINT=2','ratedi PO TEST'); -CREATE TABLE `t3_c` ( -`CapGoaledatta` smallint(5) unsigned NOT NULL default '0', -`capgotod` smallint(5) unsigned NOT NULL default '0', -PRIMARY KEY (`capgotod`,`CapGoaledatta`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t3_c` VALUES (5,3),(2,4),(5,4),(1,3); -CREATE TABLE `t4_c` ( -`capfa` bigint(20) unsigned NOT NULL auto_increment, -`realm` varchar(32) NOT NULL default '', -`authpwchap` varchar(32) default NULL, -`fa` varchar(32) NOT NULL default '', -`payyingatta` tinyint(4) NOT NULL default '0', -`status` char(1) default NULL, -PRIMARY KEY (`fa`,`realm`), -KEY `capfa` (`capfa`), -KEY `i_quadentity` (`fa`,`realm`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t4_c` VALUES (18,'john.smith','q3.net','dessjohn.smith',0,NULL),(21,'quad_katt_with_brandtad','q3.net','acne',0,NULL),(22,'quad_katt_carattoaa','q3.net','acne',0,NULL),(26,'436462612809','sqasdt.q3.net','N/A',0,'6'),(19,'john','smith.qt','dessjohn',0,NULL),(33,'436643196120','sqasdt.q3.net','N/A',1,'6'),(28,'436642900019','sqasdt.q3.net','N/A',0,'6'),(30,'436462900209','sqasdt.q3.net','N/A',0,'6'),(16,'436640006666','sqasdt.q3.net','',0,NULL),(19,'dette','el-redun.com','dessdette',0,NULL),(12,'quad_kattPP','q3.net','acne',2,NULL),(14,'436640008888','sqasdt.q3.net','',0,NULL),(29,'463624900028','sqasdt.q3.net','N/A',0,'6'),(15,'436640099099','sqasdt.q3.net','',0,NULL),(13,'pap','q3plus.qt','acne',1,NULL),(19,'436642612091','sqasdt.q3.net','N/A',0,'6'),(12,'quad_katt','q3.net','acne',0,NULL),(11,'quad_kattVK','q3.net','acne',1,NULL),(32,'463641969502','sqasdt.q3.net','N/A',1,'6'),(20,'joe','q3.net','joedesswd',0,NULL),(29,'436642900034','sqasdt.q3.net','N/A',0,'6'),(25,'contind','armerde.qt','acne',1,NULL); -CREATE TABLE `t5_c` ( -`capfa` bigint(20) unsigned NOT NULL default '0', -`gotod` smallint(5) unsigned NOT NULL default '0', -`orderutonsa` varchar(64) NOT NULL default '', -PRIMARY KEY (`capfa`,`gotod`,`orderutonsa`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t5_c` VALUES (21,2,''),(21,1,''),(22,4,''); -CREATE TABLE `t6_c` ( -`capfa_parent` bigint(20) unsigned NOT NULL default '0', -`capfa_child` bigint(20) unsigned NOT NULL default '0', -`relatta` smallint(5) unsigned NOT NULL default '0', -PRIMARY KEY (`capfa_child`,`capfa_parent`,`relatta`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t6_c` VALUES (15,16,0),(19,20,0),(18326932092909551615,30,0),(26,29,0),(18326932092909551615,29,0),(19,18,0),(26,28,0),(12,14,0); -CREATE TABLE `t7_c` ( -`dardpo` char(15) NOT NULL default '', -`dardtestard` tinyint(3) unsigned NOT NULL default '0', -`FastFA` char(5) NOT NULL default '', -`FastCode` char(6) NOT NULL default '', -`Fastca` char(1) NOT NULL default '', -`Fastmag` char(1) NOT NULL default '', -`Beareratta` char(2) NOT NULL default '', -PRIMARY KEY (`dardpo`,`dardtestard`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t7_c` VALUES ('2.6.2.4',24,'CECHP','54545','0','0','5'),('2.2.5.4',26,'CANFA','33223','1','1','4'),('4.3.2.4',28,'ITALD','54222','1','0','5'),('129..0.0.eins',28,'G','99999','1','1','5'),('1.1.1.1',24,'AUTPT','32323','0','1','3'); -CREATE TABLE `t8_c` ( -`kattjame` varchar(32) NOT NULL default '', -`realm` varchar(32) NOT NULL default '', -`realm_entered` varchar(32) NOT NULL default '', -`maturegarbagefa` varchar(32) NOT NULL default '', -`hunderaaarbagefa_parent` varchar(32) NOT NULL default '', -`kattjame_entered` varchar(32) NOT NULL default '', -`hunderaaarbagefa` varchar(32) NOT NULL default '', -`gest` varchar(16) default NULL, -`hassetino` varchar(16) NOT NULL default '', -`aaaproxysessfa` varchar(255) default NULL, -`autologonallowed` char(1) default NULL, -`squardporoot` varchar(15) NOT NULL default '', -`naspo` varchar(15) default NULL, -`beareratta` char(2) default NULL, -`fastCode` varchar(6) default NULL, -`fastFA` varchar(5) default NULL, -`fastca` char(1) default NULL, -`fastmag` char(1) default NULL, -`lastupdate` datetime default NULL, -`hassetistart` datetime NOT NULL default '0000-00-00 00:00:00', -`accthassetitime` int(10) unsigned default NULL, -`acctoutputoctets` bigint(20) unsigned default NULL, -`acctinputoctets` bigint(20) unsigned default NULL, -PRIMARY KEY (`kattjame`,`hunderaaarbagefa`,`hassetistart`,`hassetino`), -KEY `squardporoot` (`squardporoot`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t8_c` VALUES ('4tt45345235','pap','q3plus.qt','q3plus.qt','q3.net','436643196120','436643196929','8956234534568968','5524595699','uxasmt21.net.acne.qt/481889229462692422','','1.1.1.1','2.2.4.6','4','86989','34','x','x','2012-03-12 12:55:34','2012-12-05 11:20:04',3223433,3369,9565),('4545435545','john','q3.net','q3.net','acne.li','436643196120','436643196929','45345234568968','995696699','uxasmt21.net.acne.qt/481889229462692423','','1.1.1.1','2.2.9.8','2','86989','34','x','x','2012-03-12 11:35:03','2012-12-05 08:50:04',8821923,169,3565),('versteckter_q3net_katt','joe','q3.net','elredun.com','q3.net','436643196120','436643196939','91341234568968','695595699','uxasmt21.net.acne.qt/481889229462692421','','1.1.1.1','2.5.2.5','3','86989','34','x','x','2012-03-12 18:35:04','2012-12-05 12:35:04',1923123,9569,6565); -CREATE TABLE `t9_c` ( -`kattjame` varchar(32) NOT NULL default '', -`kattjame_entered` varchar(32) NOT NULL default '', -`realm` varchar(32) NOT NULL default '', -`realm_entered` varchar(32) NOT NULL default '', -`maturegarbagefa` varchar(32) NOT NULL default '', -`hunderaaarbagefa` varchar(32) NOT NULL default '', -`hunderaaarbagefa_parent` varchar(32) NOT NULL default '', -`gest` varchar(16) default NULL, -`hassetino` varchar(16) NOT NULL default '', -`squardporoot` varchar(15) NOT NULL default '', -`naspo` varchar(15) default NULL, -`beareratta` char(2) default NULL, -`fastCode` varchar(6) default NULL, -`fastFA` varchar(5) default NULL, -`fastca` char(1) default NULL, -`fastmag` char(1) default NULL, -`lastupdate` datetime default NULL, -`hassetistart` datetime NOT NULL default '0000-00-00 00:00:00', -`accthassetitime` int(10) unsigned default NULL, -`actcoutpuocttets` bigint(20) unsigned default NULL, -`actinputocctets` bigint(20) unsigned default NULL, -`terminateraste` tinyint(3) unsigned default NULL, -PRIMARY KEY (`kattjame`,`hunderaaarbagefa`,`hassetistart`,`hassetino`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t9_c` VALUES ('3g4jh8gar2t','joe','q3.net','elredun.com','q3.net','436643316120','436643316939','91341234568968','695595699','1.1.1.1','2.2.6.2','3','86989','34','x','x','2012-03-12 18:35:04','2012-12-05 12:35:04',3123123,9569,6565,1),('4tt45345235','pap','q3plus.qt','q3plus.qt','q3.net','436643316120','436643316939','8956234534568968','5254595969','1.1.1.1','8.6.2.2','4','86989','34','x','x','2012-03-12 12:55:34','2012-12-05 11:20:04',3223433,3369,9565,2),('4545435545','john','q3.net','q3.net','acne.li','436643316120','436643316939','45345234568968','995696699','1.1.1.1','2.9.9.2','2','86998','34','x','x','2012-03-12 11:35:03','2012-12-05 08:50:04',8823123,169,3565,3); -create table t1 engine=myisam as select * from t1_c; -create table t2 engine=myisam as select * from t2_c; -create table t3 engine=myisam as select * from t3_c; -create table t4 engine=myisam as select * from t4_c; -create table t5 engine=myisam as select * from t5_c; -create table t6 engine=myisam as select * from t6_c; -create table t7 engine=myisam as select * from t7_c; -create table t8 engine=myisam as select * from t8_c; -create table t9 engine=myisam as select * from t9_c; -CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info -(id INT, backup_id INT) ENGINE = MEMORY; -LOAD DATA INFILE '/tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; -DROP TABLE test.backup_info; -drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c; -select count(*) from t1; -count(*) -5 -select count(*) from t1_c; -count(*) -5 -select count(*) -from (select * from t1 union -select * from t1_c) a; -count(*) -5 -select count(*) from t2; -count(*) -6 -select count(*) from t2_c; -count(*) -6 -select count(*) -from (select * from t2 union -select * from t2_c) a; -count(*) -6 -select count(*) from t3; -count(*) -4 -select count(*) from t3_c; -count(*) -4 -select count(*) -from (select * from t3 union -select * from t3_c) a; -count(*) -4 -select count(*) from t4; -count(*) -22 -select count(*) from t4_c; -count(*) -22 -select count(*) -from (select * from t4 union -select * from t4_c) a; -count(*) -22 -select count(*) from t5; -count(*) -3 -select count(*) from t5_c; -count(*) -3 -select count(*) -from (select * from t5 union -select * from t5_c) a; -count(*) -3 -select count(*) from t6; -count(*) -8 -select count(*) from t6_c; -count(*) -8 -select count(*) -from (select * from t6 union -select * from t6_c) a; -count(*) -8 -select count(*) from t7; -count(*) -5 -select count(*) from t7_c; -count(*) -5 -select count(*) -from (select * from t7 union -select * from t7_c) a; -count(*) -5 -select count(*) from t8; -count(*) -3 -select count(*) from t8_c; -count(*) -3 -select count(*) -from (select * from t8 union -select * from t8_c) a; -count(*) -3 -select count(*) from t9; -count(*) -3 -select count(*) from t9_c; -count(*) -3 -select count(*) -from (select * from t9 union -select * from t9_c) a; -count(*) -3 -ALTER TABLE t1_c -PARTITION BY RANGE (`capgoaledatta`) -(PARTITION p0 VALUES LESS THAN MAXVALUE); -ALTER TABLE t2_c -PARTITION BY LIST(`capgotod`) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6)); -ALTER TABLE t3_c -PARTITION BY HASH (`CapGoaledatta`); -ALTER TABLE t5_c -PARTITION BY HASH (`capfa`) -PARTITIONS 4; -ALTER TABLE t6_c -PARTITION BY LINEAR HASH (`relatta`) -PARTITIONS 4; -ALTER TABLE t7_c -PARTITION BY LINEAR KEY (`dardtestard`); -CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info -(id INT, backup_id INT) ENGINE = MEMORY; -LOAD DATA INFILE '/tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; -DROP TABLE test.backup_info; -drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c; -select count(*) from t1; -count(*) -5 -select count(*) from t1_c; -count(*) -5 -select count(*) -from (select * from t1 union -select * from t1_c) a; -count(*) -5 -select count(*) from t2; -count(*) -6 -select count(*) from t2_c; -count(*) -6 -select count(*) -from (select * from t2 union -select * from t2_c) a; -count(*) -6 -select count(*) from t3; -count(*) -4 -select count(*) from t3_c; -count(*) -4 -select count(*) -from (select * from t3 union -select * from t3_c) a; -count(*) -4 -select count(*) from t4; -count(*) -22 -select count(*) from t4_c; -count(*) -22 -select count(*) -from (select * from t4 union -select * from t4_c) a; -count(*) -22 -select count(*) from t5; -count(*) -3 -select count(*) from t5_c; -count(*) -3 -select count(*) -from (select * from t5 union -select * from t5_c) a; -count(*) -3 -select count(*) from t6; -count(*) -8 -select count(*) from t6_c; -count(*) -8 -select count(*) -from (select * from t6 union -select * from t6_c) a; -count(*) -8 -select count(*) from t7; -count(*) -5 -select count(*) from t7_c; -count(*) -5 -select count(*) -from (select * from t7 union -select * from t7_c) a; -count(*) -5 -select count(*) from t8; -count(*) -3 -select count(*) from t8_c; -count(*) -3 -select count(*) -from (select * from t8 union -select * from t8_c) a; -count(*) -3 -select count(*) from t9; -count(*) -3 -select count(*) from t9_c; -count(*) -3 -select count(*) -from (select * from t9 union -select * from t9_c) a; -count(*) -3 -drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c; -select count(*) from t1; -count(*) -5 -select count(*) from t1_c; -count(*) -5 -select count(*) -from (select * from t1 union -select * from t1_c) a; -count(*) -5 -select count(*) from t2; -count(*) -6 -select count(*) from t2_c; -count(*) -6 -select count(*) -from (select * from t2 union -select * from t2_c) a; -count(*) -6 -select count(*) from t3; -count(*) -4 -select count(*) from t3_c; -count(*) -4 -select count(*) -from (select * from t3 union -select * from t3_c) a; -count(*) -4 -select count(*) from t4; -count(*) -22 -select count(*) from t4_c; -count(*) -22 -select count(*) -from (select * from t4 union -select * from t4_c) a; -count(*) -22 -select count(*) from t5; -count(*) -3 -select count(*) from t5_c; -count(*) -3 -select count(*) -from (select * from t5 union -select * from t5_c) a; -count(*) -3 -select count(*) from t6; -count(*) -8 -select count(*) from t6_c; -count(*) -8 -select count(*) -from (select * from t6 union -select * from t6_c) a; -count(*) -8 -select count(*) from t7; -count(*) -5 -select count(*) from t7_c; -count(*) -5 -select count(*) -from (select * from t7 union -select * from t7_c) a; -count(*) -5 -select count(*) from t8; -count(*) -3 -select count(*) from t8_c; -count(*) -3 -select count(*) -from (select * from t8 union -select * from t8_c) a; -count(*) -3 -select count(*) from t9; -count(*) -3 -select count(*) from t9_c; -count(*) -3 -select count(*) -from (select * from t9 union -select * from t9_c) a; -count(*) -3 -drop table t1_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c; -CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info -(id INT, backup_id INT) ENGINE = MEMORY; -LOAD DATA INFILE '/tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; -DROP TABLE test.backup_info; -Create table test/def/t2_c failed: Translate frm error -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -drop table if exists t2_c; -520093696, diff --git a/mysql-test/suite/ndb/r/ndb_restore_print.result b/mysql-test/suite/ndb/r/ndb_restore_print.result deleted file mode 100644 index fa52513e7d0..00000000000 --- a/mysql-test/suite/ndb/r/ndb_restore_print.result +++ /dev/null @@ -1,312 +0,0 @@ -use test; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; -create table t1 -(pk int key -,a1 BIT(1), a2 BIT(5), a3 BIT(33), a4 BIT(63), a5 BIT(64) -,b1 TINYINT, b2 TINYINT UNSIGNED -,c1 SMALLINT, c2 SMALLINT UNSIGNED -,d1 INT, d2 INT UNSIGNED -,e1 BIGINT, e2 BIGINT UNSIGNED -,f1 CHAR(1) BINARY, f2 CHAR(32) BINARY, f3 CHAR(255) BINARY -,g1 VARCHAR(32) BINARY, g2 VARCHAR(255) BINARY, g3 VARCHAR(1000) BINARY -,h1 BINARY(1), h2 BINARY(8), h3 BINARY(255) -,i1 VARBINARY(32), i2 VARBINARY(255), i3 VARBINARY(1000) -) engine myisam; -insert into t1 values -(1 -,0x1, 0x17, 0x789a, 0x789abcde, 0xfedc0001 -,127, 255 -,32767, 65535 -,2147483647, 4294967295 -,9223372036854775807, 18446744073709551615 -,'1','12345678901234567890123456789012','123456789' - ,'1','12345678901234567890123456789012','123456789' - ,0x12,0x123456789abcdef0, 0x012345 -,0x12,0x123456789abcdef0, 0x00123450 -); -insert into t1 values -(2 -,0, 0, 0, 0, 0 -,-128, 0 -,-32768, 0 -,-2147483648, 0 -,-9223372036854775808, 0 -,'','','' - ,'','','' - ,0x0,0x0,0x0 -,0x0,0x0,0x0 -); -insert into t1 values -(3 -,NULL,NULL,NULL,NULL,NULL -,NULL,NULL -,NULL,NULL -,NULL,NULL -,NULL,NULL -,NULL,NULL,NULL -,NULL,NULL,NULL -,NULL,NULL,NULL -,NULL,NULL,NULL -); -select pk -,hex(a1), hex(a2), hex(a3), hex(a4), hex(a5) -,b1, b2 -,c1 , c2 -,d1 , d2 -,e1 , e2 -,f1 , f2, f3 -,g1 , g2, g3 -,hex(h1), hex(h2), hex(h3) -,hex(i1), hex(i2), hex(i3) -from t1 order by pk; -pk 1 -hex(a1) 1 -hex(a2) 17 -hex(a3) 789A -hex(a4) 789ABCDE -hex(a5) FEDC0001 -b1 127 -b2 255 -c1 32767 -c2 65535 -d1 2147483647 -d2 4294967295 -e1 9223372036854775807 -e2 18446744073709551615 -f1 1 -f2 12345678901234567890123456789012 -f3 123456789 -g1 1 -g2 12345678901234567890123456789012 -g3 123456789 -hex(h1) 12 -hex(h2) 123456789ABCDEF0 -hex(h3) 012345000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -hex(i1) 12 -hex(i2) 123456789ABCDEF0 -hex(i3) 00123450 -pk 2 -hex(a1) 0 -hex(a2) 0 -hex(a3) 0 -hex(a4) 0 -hex(a5) 0 -b1 -128 -b2 0 -c1 -32768 -c2 0 -d1 -2147483648 -d2 0 -e1 -9223372036854775808 -e2 0 -f1 -f2 -f3 -g1 -g2 -g3 -hex(h1) 00 -hex(h2) 0000000000000000 -hex(h3) 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -hex(i1) 00 -hex(i2) 00 -hex(i3) 00 -pk 3 -hex(a1) NULL -hex(a2) NULL -hex(a3) NULL -hex(a4) NULL -hex(a5) NULL -b1 NULL -b2 NULL -c1 NULL -c2 NULL -d1 NULL -d2 NULL -e1 NULL -e2 NULL -f1 NULL -f2 NULL -f3 NULL -g1 NULL -g2 NULL -g3 NULL -hex(h1) NULL -hex(h2) NULL -hex(h3) NULL -hex(i1) NULL -hex(i2) NULL -hex(i3) NULL -alter table t1 engine ndb; -select pk -,hex(a1), hex(a2), hex(a3), hex(a4), hex(a5) -,b1, b2 -,c1 , c2 -,d1 , d2 -,e1 , e2 -,f1 , f2, f3 -,g1 , g2, g3 -,hex(h1), hex(h2), hex(h3) -,hex(i1), hex(i2), hex(i3) -from t1 order by pk; -pk 1 -hex(a1) 1 -hex(a2) 17 -hex(a3) 789A -hex(a4) 789ABCDE -hex(a5) FEDC0001 -b1 127 -b2 255 -c1 32767 -c2 65535 -d1 2147483647 -d2 4294967295 -e1 9223372036854775807 -e2 18446744073709551615 -f1 1 -f2 12345678901234567890123456789012 -f3 123456789 -g1 1 -g2 12345678901234567890123456789012 -g3 123456789 -hex(h1) 12 -hex(h2) 123456789ABCDEF0 -hex(h3) 012345000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -hex(i1) 12 -hex(i2) 123456789ABCDEF0 -hex(i3) 00123450 -pk 2 -hex(a1) 0 -hex(a2) 0 -hex(a3) 0 -hex(a4) 0 -hex(a5) 0 -b1 -128 -b2 0 -c1 -32768 -c2 0 -d1 -2147483648 -d2 0 -e1 -9223372036854775808 -e2 0 -f1 -f2 -f3 -g1 -g2 -g3 -hex(h1) 00 -hex(h2) 0000000000000000 -hex(h3) 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -hex(i1) 00 -hex(i2) 00 -hex(i3) 00 -pk 3 -hex(a1) NULL -hex(a2) NULL -hex(a3) NULL -hex(a4) NULL -hex(a5) NULL -b1 NULL -b2 NULL -c1 NULL -c2 NULL -d1 NULL -d2 NULL -e1 NULL -e2 NULL -f1 NULL -f2 NULL -f3 NULL -g1 NULL -g2 NULL -g3 NULL -hex(h1) NULL -hex(h2) NULL -hex(h3) NULL -hex(i1) NULL -hex(i2) NULL -hex(i3) NULL -CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info -(id INT, backup_id INT) ENGINE = MEMORY; -LOAD DATA INFILE '/tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; -DROP TABLE test.backup_info; -1;0x1;0x17;0x789A;0x789ABCDE;0xFEDC0001;127;255;32767;65535;2147483647;4294967295;9223372036854775807;18446744073709551615;1;12345678901234567890123456789012;123456789;1;12345678901234567890123456789012;123456789;0x12;0x123456789ABCDEF0;0x012345;0x12;0x123456789ABCDEF0;0x00123450 -2;0x0;0x0;0x0;0x0;0x0;-128;0;-32768;0;-2147483648;0;-9223372036854775808;0;;;;;;;0x0;0x0;0x0;0x0;0x0;0x0 -3;\N;\N;\N;\N;\N;\N;\N;\N;\N;\N;\N;\N;\N;\N;\N;\N;\N;\N;\N;\N;\N;\N;\N;\N;\N -1,0x1,0x17,0x789A,0x789ABCDE,0xFEDC0001,127,255,32767,65535,2147483647,4294967295,9223372036854775807,18446744073709551615,'1','12345678901234567890123456789012','123456789','1','12345678901234567890123456789012','123456789',0x12,0x123456789ABCDEF0,0x012345,0x12,0x123456789ABCDEF0,0x00123450 -2,0x0,0x0,0x0,0x0,0x0,-128,0,-32768,0,-2147483648,0,-9223372036854775808,0,'','','','','','',0x0,0x0,0x0,0x0,0x0,0x0 -3,,,,,,,,,,,,,,,,,,,,,,,,, -drop table t1; -create table t1 -(pk int key -,f1 CHAR(1) BINARY, f2 CHAR(32) BINARY, f3 CHAR(255) BINARY -,g1 VARCHAR(32) BINARY, g2 VARCHAR(255) BINARY, g3 VARCHAR(1000) BINARY -,h1 BINARY(1), h2 BINARY(9), h3 BINARY(255) -,i1 VARBINARY(32), i2 VARBINARY(255), i3 VARBINARY(1000) -) engine ndb; -insert into t1 values -(1 -,'1','12345678901234567890123456789012','123456789 ' - ,'1 ','12345678901234567890123456789012 ','123456789 ' - ,0x20,0x123456789abcdef020, 0x012345000020 -,0x1200000020,0x123456789abcdef000000020, 0x00123450000020 -); -create table t2 (pk int key, a int) engine ndb; -create table t3 (pk int key, a int) engine ndb; -create table t4 (pk int key, a int) engine ndb; -insert into t2 values (1,11),(2,12),(3,13),(4,14),(5,15); -insert into t3 values (1,21),(2,22),(3,23),(4,24),(5,25); -insert into t4 values (1,31),(2,32),(3,33),(4,34),(5,35); -CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info -(id INT, backup_id INT) ENGINE = MEMORY; -LOAD DATA INFILE '/tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; -DROP TABLE test.backup_info; -'1' '1' '12345678901234567890123456789012' '123456789' '1' '12345678901234567890123456789012' '123456789' '0x20' '0x123456789ABCDEF020' '0x012345000020' '0x1200000020' '0x123456789ABCDEF000000020' '0x00123450000020' - -t1 --- -1 1 12345678901234567890123456789012 123456789 1 12345678901234567890123456789012 123456789 0x20 0x123456789ABCDEF020 0x012345000020 0x1200000020 0x123456789ABCDEF000000020 0x00123450000020 - -t2 --- -1 11 -2 12 -3 13 -4 14 -5 15 - -t3 --- -1 21 -2 22 -3 23 -4 24 -5 25 - -t4 --- -1 31 -2 32 -3 33 -4 34 -5 35 -drop table t1; -create table t1 -(pk int key -,a1 MEDIUMINT, a2 MEDIUMINT UNSIGNED -) engine ndb; -insert into t1 values(1, 8388607, 16777215); -insert into t1 values(2, -8388608, 0); -insert into t1 values(3, -1, 1); -CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info -(id INT, backup_id INT) ENGINE = MEMORY; -LOAD DATA INFILE '/tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; -DROP TABLE test.backup_info; -1;8388607;16777215 -2;-8388608;0 -3;-1;1 -drop table t1; -drop table t2; -drop table t3; -drop table t4; diff --git a/mysql-test/suite/ndb/r/ndb_row_format.result b/mysql-test/suite/ndb/r/ndb_row_format.result deleted file mode 100644 index 48a314c2fe9..00000000000 --- a/mysql-test/suite/ndb/r/ndb_row_format.result +++ /dev/null @@ -1,65 +0,0 @@ -DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; -drop database if exists mysqltest; -CREATE TABLE t1 -( a INT KEY, -b VARCHAR(10) ) -ROW_FORMAT=FIXED -ENGINE=NDB; -ERROR HY000: Can't create table 'test.t1' (errno: 138) -SHOW WARNINGS; -Level Code Message -Warning 1478 Table storage engine 'ndbcluster' does not support the create option 'Row format FIXED incompatible with variable sized attribute' -Error 1005 Can't create table 'test.t1' (errno: 138) -CREATE TABLE t1 -( a INT KEY, -b INT ) -ENGINE=NDB; -ForceVarPart: 1 -DROP TABLE t1; -CREATE TABLE t1 -( a INT KEY, -b INT ) -ROW_FORMAT=DEFAULT -ENGINE=NDB; -ForceVarPart: 1 -DROP TABLE t1; -CREATE TABLE t1 -( a INT KEY, -b INT ) -ROW_FORMAT=FIXED -ENGINE=NDB; -ForceVarPart: 0 -DROP TABLE t1; -CREATE TABLE t1 -( a INT KEY, -b INT ) -ROW_FORMAT=DYNAMIC -ENGINE=NDB; -ForceVarPart: 1 -DROP TABLE t1; -create table t1 (a int auto_increment primary key, b varchar(1000)) engine = ndb; -insert into t1(b) values ('0123456789'); -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -select count(*) from t1; -count(*) -1024 -begin; -update t1 set b = concat(b,b); -update t1 set b = concat(b,b); -update t1 set b = concat(b,b); -update t1 set b = concat(b,b); -update t1 set b = concat(b,b); -rollback; -select count(*),b from t1 group by b; -count(*) b -1024 0123456789 -drop table t1; diff --git a/mysql-test/suite/ndb/r/ndb_single_user.result b/mysql-test/suite/ndb/r/ndb_single_user.result deleted file mode 100644 index 1d5f3041adb..00000000000 --- a/mysql-test/suite/ndb/r/ndb_single_user.result +++ /dev/null @@ -1,119 +0,0 @@ -drop table if exists t1,t2; -create table t1 (a int key, b int unique, c int) engine ndb; -ERROR HY000: Can't create table 'test.t1' (errno: 299) -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; -ERROR HY000: Failed to create LOGFILE GROUP -show warnings; -Level Code Message -Warning 1296 Got error 299 'Operation not allowed or aborted due to single user mode' from NDB -Error 1528 Failed to create LOGFILE GROUP -create table t1 (a int key, b int unique, c int) engine ndb; -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE NDB; -ERROR HY000: Failed to create TABLESPACE -show warnings; -Level Code Message -Warning 1296 Got error 299 'Operation not allowed or aborted due to single user mode' from NDB -Error 1528 Failed to create TABLESPACE -DROP LOGFILE GROUP lg1 -ENGINE =NDB; -ERROR HY000: Failed to drop LOGFILE GROUP -show warnings; -Level Code Message -Warning 1296 Got error 299 'Operation not allowed or aborted due to single user mode' from NDB -Error 1529 Failed to drop LOGFILE GROUP -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE NDB; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE NDB; -ERROR HY000: Failed to alter: DROP DATAFILE -show warnings; -Level Code Message -Warning 1296 Got error 299 'Operation not allowed or aborted due to single user mode' from NDB -Error 1533 Failed to alter: DROP DATAFILE -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE NDB; -DROP TABLESPACE ts1 -ENGINE NDB; -ERROR HY000: Failed to drop TABLESPACE -show warnings; -Level Code Message -Warning 1296 Got error 299 'Operation not allowed or aborted due to single user mode' from NDB -Error 1529 Failed to drop TABLESPACE -DROP TABLESPACE ts1 -ENGINE NDB; -DROP LOGFILE GROUP lg1 -ENGINE =NDB; -insert into t1 values (1,1,0),(2,2,0),(3,3,0),(4,4,0),(5,5,0),(6,6,0),(7,7,0),(8,8,0),(9,9,0),(10,10,0); -create table t2 as select * from t1; -select * from t1 where a = 1; -a b c -1 1 0 -select * from t1 where b = 4; -a b c -4 4 0 -select * from t1 where a > 4 order by a; -a b c -5 5 0 -6 6 0 -7 7 0 -8 8 0 -9 9 0 -10 10 0 -update t1 set b=102 where a = 2; -update t1 set b=103 where b = 3; -update t1 set b=b+100; -update t1 set b=b+100 where a > 7; -delete from t1; -insert into t1 select * from t2; -create unique index new_index on t1 (b,c); -drop table t2; -drop table t1; -ERROR 42S02: Unknown table 't1' -create index new_index_fail on t1 (c); -ERROR HY000: Got error 299 'Operation not allowed or aborted due to single user mode' from NDBCLUSTER -insert into t1 values (21,21,0),(22,22,0),(23,23,0),(24,24,0),(25,25,0),(26,26,0),(27,27,0),(28,28,0),(29,29,0),(210,210,0); -ERROR HY000: Got error 299 'Operation not allowed or aborted due to single user mode' from NDBCLUSTER -select * from t1 where a = 1; -ERROR HY000: Got error 299 'Operation not allowed or aborted due to single user mode' from NDBCLUSTER -select * from t1 where b = 4; -ERROR HY000: Got error 299 'Operation not allowed or aborted due to single user mode' from NDBCLUSTER -update t1 set b=102 where a = 2; -ERROR HY000: Got error 299 'Operation not allowed or aborted due to single user mode' from NDBCLUSTER -update t1 set b=103 where b = 3; -ERROR HY000: Got error 299 'Operation not allowed or aborted due to single user mode' from NDBCLUSTER -update t1 set b=b+100; -ERROR HY000: Got error 299 'Operation not allowed or aborted due to single user mode' from NDBCLUSTER -update t1 set b=b+100 where a > 7; -ERROR HY000: Got error 299 'Operation not allowed or aborted due to single user mode' from NDBCLUSTER -BEGIN; -update t1 set b=b+100 where a=1; -BEGIN; -update t1 set b=b+100 where a=2; -update t1 set b=b+100 where a=3; -COMMIT; -update t1 set b=b+100 where a=4; -ERROR HY000: Got error 299 'Operation not allowed or aborted due to single user mode' from NDBCLUSTER -COMMIT; -ERROR HY000: Got error 4350 'Transaction already aborted' from NDBCLUSTER -create table t2 (a int) engine myisam; -alter table t2 add column (b int); -drop table t2; -drop table t1; diff --git a/mysql-test/suite/ndb/r/ndb_sp.result b/mysql-test/suite/ndb/r/ndb_sp.result deleted file mode 100644 index dbd0325044d..00000000000 --- a/mysql-test/suite/ndb/r/ndb_sp.result +++ /dev/null @@ -1,44 +0,0 @@ -drop table if exists t1; -create table t1 ( -a int not null primary key, -b int not null -) engine=ndb; -insert into t1 values (1,10), (2,20), (3,100), (4, 100); -create procedure test_proc1 (in var_in int) -begin -select * from t1 where a = var_in; -end; -create procedure test_proc2 (out var_out int) -begin -select b from t1 where a = 1 into var_out; -end; -create procedure test_proc3 (inout var_inout int) -begin -select b from t1 where a = var_inout into var_inout; -end; -// -call test_proc1(1); -a b -1 10 -call test_proc2(@test_var); -select @test_var; -@test_var -10 -set @test_var = 1; -call test_proc3(@test_var); -select @test_var; -@test_var -10 -alter procedure test_proc1 comment 'new comment'; -show create procedure test_proc1; -Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation -test_proc1 CREATE DEFINER=`root`@`localhost` PROCEDURE `test_proc1`(in var_in int) - COMMENT 'new comment' -begin -select * from t1 where a = var_in; -end latin1 latin1_swedish_ci latin1_swedish_ci -drop procedure test_proc1; -drop procedure test_proc2; -drop procedure test_proc3; -drop table t1; -End of 5.1 tests diff --git a/mysql-test/suite/ndb/r/ndb_subquery.result b/mysql-test/suite/ndb/r/ndb_subquery.result deleted file mode 100644 index 45662882d3a..00000000000 --- a/mysql-test/suite/ndb/r/ndb_subquery.result +++ /dev/null @@ -1,92 +0,0 @@ -drop table if exists t1, t2, t3, t4; -create table t1 (p int not null primary key, u int not null, o int not null, -unique (u), key(o)) engine=ndb; -create table t2 (p int not null primary key, u int not null, o int not null, -unique (u), key(o)) engine=ndb; -create table t3 (a int not null primary key, b int not null) engine=ndb; -create table t4 (c int not null primary key, d int not null) engine=ndb; -insert into t1 values (1,1,1),(2,2,2),(3,3,3); -insert into t2 values (1,1,1),(2,2,2),(3,3,3), (4,4,4), (5,5,5); -insert into t3 values (1,10), (2,10), (3,30), (4, 30); -insert into t4 values (1,10), (2,10), (3,30), (4, 30); -explain select * from t2 where p NOT IN (select p from t1); -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t2 ALL NULL NULL NULL NULL # Using where -2 DEPENDENT SUBQUERY t1 unique_subquery PRIMARY PRIMARY 4 func # -select * from t2 where p NOT IN (select p from t1) order by p; -p u o -4 4 4 -5 5 5 -explain select * from t2 where p NOT IN (select u from t1); -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t2 ALL NULL NULL NULL NULL # Using where -2 DEPENDENT SUBQUERY t1 unique_subquery u u 4 func # -select * from t2 where p NOT IN (select u from t1) order by p; -p u o -4 4 4 -5 5 5 -explain select * from t2 where p NOT IN (select o from t1); -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t2 ALL NULL NULL NULL NULL # Using where -2 DEPENDENT SUBQUERY t1 index_subquery o o 4 func # -select * from t2 where p NOT IN (select o from t1) order by p; -p u o -4 4 4 -5 5 5 -explain select * from t2 where p NOT IN (select p+0 from t1); -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t2 ALL NULL NULL NULL NULL # Using where -2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL # Using where -select * from t2 where p NOT IN (select p+0 from t1) order by p; -p u o -4 4 4 -5 5 5 -drop table t1; -drop table t2; -create table t1 (p int not null primary key, u int not null) engine=ndb; -insert into t1 values (1,1),(2,2),(3,3); -create table t2 as -select t1.* -from t1 as t1, t1 as t2, t1 as t3, t1 as t4, t1 as t5, t1 as t6, t1 as t7, t1 as t8 -where t1.u = t2.u -and t2.u = t3.u -and t3.u = t4.u -and t4.u = t5.u -and t5.u = t6.u -and t6.u = t7.u -and t7.u = t8.u; -select * from t2 order by 1; -p u -1 1 -2 2 -3 3 -select * from t3 where a = any (select c from t4 where c = 1) order by a; -a b -1 10 -select * from t3 where a in (select c from t4 where c = 1) order by a; -a b -1 10 -select * from t3 where a <> some (select c from t4 where c = 1) order by a; -a b -2 10 -3 30 -4 30 -select * from t3 where a > all (select c from t4 where c = 1) order by a; -a b -2 10 -3 30 -4 30 -select * from t3 where row(1,10) = (select c,d from t4 where c = 1) order by a; -a b -1 10 -2 10 -3 30 -4 30 -select * from t3 where exists (select * from t4 where c = 1) order by a; -a b -1 10 -2 10 -3 30 -4 30 -drop table if exists t1, t2, t3, t4; -End of 5.1 tests diff --git a/mysql-test/suite/ndb/r/ndb_temporary.result b/mysql-test/suite/ndb/r/ndb_temporary.result deleted file mode 100644 index 7b7740003af..00000000000 --- a/mysql-test/suite/ndb/r/ndb_temporary.result +++ /dev/null @@ -1,21 +0,0 @@ -DROP TABLE IF EXISTS t1; -create temporary table t1 (a int key) engine=ndb; -ERROR HY000: Table storage engine 'ndbcluster' does not support the create option 'TEMPORARY' -create temporary table t1 (a int key) engine=myisam; -alter table t1 engine=ndb; -ERROR HY000: Table storage engine 'ndbcluster' does not support the create option 'TEMPORARY' -drop table t1; -SET SESSION storage_engine=NDBCLUSTER; -create table t1 (a int key); -select engine from information_schema.tables where table_name = 't1'; -engine -ndbcluster -drop table t1; -create temporary table t1 (a int key); -show create table t1; -Table Create Table -t1 CREATE TEMPORARY TABLE `t1` ( - `a` int(11) NOT NULL, - PRIMARY KEY (`a`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -drop table t1; diff --git a/mysql-test/suite/ndb/r/ndb_tmp_table_and_DDL.result b/mysql-test/suite/ndb/r/ndb_tmp_table_and_DDL.result deleted file mode 100644 index 1b0f718ad65..00000000000 --- a/mysql-test/suite/ndb/r/ndb_tmp_table_and_DDL.result +++ /dev/null @@ -1,90 +0,0 @@ -CREATE TEMPORARY TABLE t1 (a INT); -CREATE TABLE t2 (a INT, b INT) ENGINE= NDB; -INSERT INTO t1 VALUES (1); -CREATE EVENT e1 ON SCHEDULE EVERY 10 HOUR DO SELECT 1; -INSERT INTO t1 VALUES (1); -ALTER EVENT e1 ON SCHEDULE EVERY 20 HOUR DO SELECT 1; -INSERT INTO t1 VALUES (1); -DROP EVENT IF EXISTS e1; -INSERT INTO t1 VALUES (1); -CREATE PROCEDURE p1() SELECT 1; -INSERT INTO t1 VALUES (1); -ALTER PROCEDURE p1 SQL SECURITY INVOKER; -INSERT INTO t1 VALUES (1); -CREATE FUNCTION f1() RETURNS INT RETURN 123; -INSERT INTO t1 VALUES (1); -ALTER FUNCTION f1 SQL SECURITY INVOKER; -INSERT INTO t1 VALUES (1); -CREATE DATABASE mysqltest1; -INSERT INTO t1 VALUES (1); -DROP DATABASE mysqltest1; -INSERT INTO t1 VALUES (1); -CREATE USER test_1@localhost; -INSERT INTO t1 VALUES (1); -GRANT SELECT ON t2 TO test_1@localhost; -INSERT INTO t1 VALUES (1); -GRANT ALL ON f1 TO test_1@localhost; -INSERT INTO t1 VALUES (1); -GRANT ALL ON p1 TO test_1@localhost; -INSERT INTO t1 VALUES (1); -GRANT USAGE ON *.* TO test_1@localhost; -INSERT INTO t1 VALUES (1); -REVOKE ALL PRIVILEGES ON f1 FROM test_1@localhost; -INSERT INTO t1 VALUES (1); -REVOKE ALL PRIVILEGES ON p1 FROM test_1@localhost; -INSERT INTO t1 VALUES (1); -REVOKE ALL PRIVILEGES ON t2 FROM test_1@localhost; -INSERT INTO t1 VALUES (1); -REVOKE USAGE ON *.* FROM test_1@localhost; -INSERT INTO t1 VALUES (1); -RENAME USER test_1@localhost TO test_2@localhost; -INSERT INTO t1 VALUES (1); -DROP USER test_2@localhost; -INSERT INTO t1 VALUES (1); -CREATE PROCEDURE p2() -BEGIN -# CREATE USER when a temporary table is open. -CREATE TEMPORARY TABLE t3 (a INT); -CREATE USER test_2@localhost; -INSERT INTO t1 VALUES (1); -# GRANT select on table to user when a temporary table is open. -GRANT SELECT ON t2 TO test_2@localhost; -INSERT INTO t1 VALUES (1); -# GRANT all on function to user when a temporary table is open. -GRANT ALL ON f1 TO test_2@localhost; -INSERT INTO t1 VALUES (1); -# GRANT all on procedure to user when a temporary table is open. -GRANT ALL ON p1 TO test_2@localhost; -INSERT INTO t1 VALUES (1); -# GRANT usage on *.* to user when a temporary table is open. -GRANT USAGE ON *.* TO test_2@localhost; -INSERT INTO t1 VALUES (1); -# REVOKE ALL PRIVILEGES on function to user when a temporary table is open. -REVOKE ALL PRIVILEGES ON f1 FROM test_2@localhost; -INSERT INTO t1 VALUES (1); -# REVOKE ALL PRIVILEGES on procedure to user when a temporary table is open. -REVOKE ALL PRIVILEGES ON p1 FROM test_2@localhost; -INSERT INTO t1 VALUES (1); -# REVOKE ALL PRIVILEGES on table to user when a temporary table is open. -REVOKE ALL PRIVILEGES ON t2 FROM test_2@localhost; -INSERT INTO t1 VALUES (1); -# REVOKE usage on *.* from user when a temporary table is open. -REVOKE USAGE ON *.* FROM test_2@localhost; -INSERT INTO t1 VALUES (1); -# RENAME USER when a temporary table is open. -RENAME USER test_2@localhost TO test_3@localhost; -INSERT INTO t1 VALUES (1); -# DROP USER when a temporary table is open. -DROP USER test_3@localhost; -INSERT INTO t1 VALUES (1); -DROP TEMPORARY TABLE t3; -END | -DROP PROCEDURE p1; -INSERT INTO t1 VALUES (1); -DROP PROCEDURE p2; -INSERT INTO t1 VALUES (1); -DROP FUNCTION f1; -INSERT INTO t1 VALUES (1); -DROP TABLE t2; -INSERT INTO t1 VALUES (1); -DROP TEMPORARY TABLE t1; diff --git a/mysql-test/suite/ndb/r/ndb_transaction.result b/mysql-test/suite/ndb/r/ndb_transaction.result deleted file mode 100644 index 691b91b1d36..00000000000 --- a/mysql-test/suite/ndb/r/ndb_transaction.result +++ /dev/null @@ -1,257 +0,0 @@ -DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; -drop database if exists mysqltest; -CREATE TABLE t1 ( -pk1 INT NOT NULL PRIMARY KEY, -attr1 INT NOT NULL -) ENGINE=ndbcluster; -begin; -insert into t1 values(1,1); -insert into t1 values(2,2); -select count(*) from t1; -count(*) -2 -select * from t1 where pk1 = 1; -pk1 attr1 -1 1 -select t1.attr1 from t1, t1 as t1x where t1.pk1 = t1x.pk1 + 1; -attr1 -2 -rollback; -select count(*) from t1; -count(*) -0 -select * from t1 where pk1 = 1; -pk1 attr1 -select t1.attr1 from t1, t1 as t1x where t1.pk1 = t1x.pk1 + 1; -attr1 -begin; -insert into t1 values(1,1); -insert into t1 values(2,2); -commit; -select count(*) from t1; -count(*) -2 -select * from t1 where pk1 = 1; -pk1 attr1 -1 1 -select t1.attr1 from t1, t1 as t1x where t1.pk1 = t1x.pk1 + 1; -attr1 -2 -begin; -update t1 set attr1 = attr1 * 2; -select count(*) from t1; -count(*) -2 -select * from t1 where pk1 = 1; -pk1 attr1 -1 2 -select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; -pk1 attr1 pk1 attr1 -2 4 1 2 -rollback; -select count(*) from t1; -count(*) -2 -select * from t1 where pk1 = 1; -pk1 attr1 -1 1 -select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; -pk1 attr1 pk1 attr1 -begin; -update t1 set attr1 = attr1 * 2; -commit; -select count(*) from t1; -count(*) -2 -select * from t1 where pk1 = 1; -pk1 attr1 -1 2 -select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; -pk1 attr1 pk1 attr1 -2 4 1 2 -begin; -delete from t1 where attr1 = 2; -select count(*) from t1; -count(*) -1 -select * from t1 where pk1 = 1; -pk1 attr1 -select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; -pk1 attr1 pk1 attr1 -rollback; -select count(*) from t1; -count(*) -2 -select * from t1 where pk1 = 1; -pk1 attr1 -1 2 -select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; -pk1 attr1 pk1 attr1 -2 4 1 2 -begin; -delete from t1 where attr1 = 2; -commit; -select count(*) from t1; -count(*) -1 -select * from t1 where pk1 = 1; -pk1 attr1 -select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; -pk1 attr1 pk1 attr1 -DROP TABLE t1; -CREATE TABLE t1 (id INT, id2 int) engine=ndbcluster; -begin; -insert into t1 values(1,1); -insert into t1 values(2,2); -select sum(id) from t1; -sum(id) -3 -select * from t1 where id = 1; -id id2 -1 1 -select t1.id from t1, t1 as t1x where t1.id2 = t1x.id2 + 1; -id -2 -rollback; -select sum(id) from t1; -sum(id) -NULL -select * from t1 where id = 1; -id id2 -select t1.id from t1, t1 as t1x where t1.id2 = t1x.id2 + 1; -id -begin; -insert into t1 values(1,1); -insert into t1 values(2,2); -commit; -select sum(id) from t1; -sum(id) -3 -select * from t1 where id = 1; -id id2 -1 1 -select t1.id from t1, t1 as t1x where t1.id2 = t1x.id2 + 1; -id -2 -begin; -update t1 set id = id * 2; -select sum(id) from t1; -sum(id) -6 -select * from t1 where id = 2; -id id2 -2 1 -select * from t1, t1 as t1x where t1x.id = t1.id - 2; -id id2 id id2 -4 2 2 1 -rollback; -select sum(id) from t1; -sum(id) -3 -select * from t1 where id = 2; -id id2 -2 2 -select * from t1, t1 as t1x where t1x.id = t1.id - 2; -id id2 id id2 -begin; -update t1 set id = id * 2; -commit; -select sum(id) from t1; -sum(id) -6 -select * from t1 where id = 2; -id id2 -2 1 -select * from t1, t1 as t1x where t1x.id = t1.id - 2; -id id2 id id2 -4 2 2 1 -DROP TABLE t1; -CREATE TABLE t2 ( -a bigint unsigned NOT NULL PRIMARY KEY, -b int unsigned not null, -c int unsigned -) engine=ndbcluster; -CREATE TABLE t3 ( -a bigint unsigned NOT NULL, -b bigint unsigned not null, -c bigint unsigned, -PRIMARY KEY(a) -) engine=ndbcluster; -CREATE TABLE t4 ( -a bigint unsigned NOT NULL, -b bigint unsigned not null, -c bigint unsigned NOT NULL, -d int unsigned, -PRIMARY KEY(a, b, c) -) engine=ndbcluster; -select count(*) from t2; -count(*) -0 -select count(*) from t3; -count(*) -0 -select count(*) from t4; -count(*) -0 -select count(*) from t2; -count(*) -100 -select count(*) from t3; -count(*) -100 -select count(*) from t4; -count(*) -100 -begin; -begin; -drop table t2; -drop table t3; -drop table t4; -CREATE TABLE t1 ( -pk1 INT NOT NULL PRIMARY KEY, -attr1 INT NOT NULL -) ENGINE=ndbcluster; -create database mysqltest; -use mysqltest; -CREATE TABLE t2 ( -a bigint unsigned NOT NULL PRIMARY KEY, -b int unsigned not null, -c int unsigned -) engine=ndbcluster; -begin; -insert into test.t1 values(1,1); -insert into t2 values(1,1,1); -insert into test.t1 values(2,2); -insert into t2 values(2,2,2); -select count(*) from test.t1; -count(*) -2 -select count(*) from t2; -count(*) -2 -select * from test.t1 where pk1 = 1; -pk1 attr1 -1 1 -select * from t2 where a = 1; -a b c -1 1 1 -select test.t1.attr1 -from test.t1, test.t1 as t1x where test.t1.pk1 = t1x.pk1 + 1; -attr1 -2 -select t2.a -from t2, t2 as t2x where t2.a = t2x.a + 1; -a -2 -select test.t1.pk1, a from test.t1,t2 where b > test.t1.attr1; -pk1 a -1 2 -rollback; -select count(*) from test.t1; -count(*) -0 -select count(*) from t2; -count(*) -0 -drop table test.t1, t2; -drop database mysqltest; diff --git a/mysql-test/suite/ndb/r/ndb_trigger.result b/mysql-test/suite/ndb/r/ndb_trigger.result deleted file mode 100644 index cc3e27df852..00000000000 --- a/mysql-test/suite/ndb/r/ndb_trigger.result +++ /dev/null @@ -1,315 +0,0 @@ -drop table if exists t1, t2, t3, t4, t5; -create table t1 (id int primary key, a int not null, b decimal (63,30) default 0) engine=ndb; -create table t2 (op char(1), a int not null, b decimal (63,30)) engine=ndb; -create table t3 engine=ndb select 1 as i; -create table t4 (a int not null primary key, b int) engine=ndb; -create table t5 (a int not null primary key, b int) engine=ndb; -create trigger t1_bu before update on t1 for each row -begin -insert into t2 values ("u", old.a, old.b); -set new.b = old.b + 10; -end;// -create trigger t1_bd before delete on t1 for each row -begin -insert into t2 values ("d", old.a, old.b); -end;// -create trigger t4_au after update on t4 -for each row begin -update t5 set b = b+1; -end; -// -create trigger t4_ad after delete on t4 -for each row begin -update t5 set b = b+1; -end; -// -insert into t1 values (1, 1, 1.05), (2, 2, 2.05), (3, 3, 3.05), (4, 4, 4.05); -insert into t4 values (1,1), (2,2), (3,3), (4, 4); -insert into t5 values (1,0); -update t1 set a=5 where a != 3; -select * from t1 order by id; -id a b -1 5 11.050000000000000000000000000000 -2 5 12.050000000000000000000000000000 -3 3 3.050000000000000000000000000000 -4 5 14.050000000000000000000000000000 -select * from t2 order by op, a, b; -op a b -u 1 1.050000000000000000000000000000 -u 2 2.050000000000000000000000000000 -u 4 4.050000000000000000000000000000 -delete from t2; -update t1, t3 set a=6 where a = 5; -select * from t1 order by id; -id a b -1 6 21.050000000000000000000000000000 -2 6 22.050000000000000000000000000000 -3 3 3.050000000000000000000000000000 -4 6 24.050000000000000000000000000000 -select * from t2 order by op, a, b; -op a b -u 5 11.050000000000000000000000000000 -u 5 12.050000000000000000000000000000 -u 5 14.050000000000000000000000000000 -delete from t2; -delete from t1 where a != 3; -select * from t1 order by id; -id a b -3 3 3.050000000000000000000000000000 -select * from t2 order by op, a, b; -op a b -d 6 21.050000000000000000000000000000 -d 6 22.050000000000000000000000000000 -d 6 24.050000000000000000000000000000 -delete from t2; -insert into t1 values (1, 1, 1.05), (2, 2, 2.05), (4, 4, 4.05); -delete t1 from t1, t3 where a != 3; -select * from t1 order by id; -id a b -3 3 3.050000000000000000000000000000 -select * from t2 order by op, a, b; -op a b -d 1 1.050000000000000000000000000000 -d 2 2.050000000000000000000000000000 -d 4 4.050000000000000000000000000000 -delete from t2; -insert into t1 values (4, 4, 4.05); -insert into t1 (id, a) values (4, 1), (3, 1) on duplicate key update a= a + 1; -select * from t1 order by id; -id a b -3 4 13.050000000000000000000000000000 -4 5 14.050000000000000000000000000000 -select * from t2 order by op, a, b; -op a b -u 3 3.050000000000000000000000000000 -u 4 4.050000000000000000000000000000 -delete from t2; -delete from t3; -insert into t3 values (4), (3); -insert into t1 (id, a) (select i, 1 from t3) on duplicate key update a= a + 1; -select * from t1 order by id; -id a b -3 5 23.050000000000000000000000000000 -4 6 24.050000000000000000000000000000 -select * from t2 order by op, a, b; -op a b -u 4 13.050000000000000000000000000000 -u 5 14.050000000000000000000000000000 -delete from t2; -replace into t1 (id, a) values (4, 1), (3, 1); -select * from t1 order by id; -id a b -3 1 0.000000000000000000000000000000 -4 1 0.000000000000000000000000000000 -select * from t2 order by op, a, b; -op a b -d 5 23.050000000000000000000000000000 -d 6 24.050000000000000000000000000000 -delete from t1; -delete from t2; -insert into t1 values (3, 1, 1.05), (4, 1, 2.05); -replace into t1 (id, a) (select i, 2 from t3); -select * from t1 order by id; -id a b -3 2 0.000000000000000000000000000000 -4 2 0.000000000000000000000000000000 -select * from t2 order by op, a, b; -op a b -d 1 1.050000000000000000000000000000 -d 1 2.050000000000000000000000000000 -delete from t1; -delete from t2; -insert into t1 values (3, 1, 1.05), (5, 2, 2.05); -load data infile '../../../std_data/loaddata5.dat' replace into table t1 fields terminated by '' enclosed by '' ignore 1 lines (id, a); -select * from t1 order by id; -id a b -3 4 0.000000000000000000000000000000 -5 6 0.000000000000000000000000000000 -select * from t2 order by op, a, b; -op a b -d 1 1.050000000000000000000000000000 -d 2 2.050000000000000000000000000000 -update t4 set b = 10 where a = 1; -select * from t5 order by a; -a b -1 1 -update t5 set b = 0; -delete from t4 where a = 1; -select * from t5 order by a; -a b -1 1 -drop trigger t4_au; -drop trigger t4_ad; -drop table t1, t2, t3, t4, t5; -CREATE TABLE t1 ( -id INT NOT NULL PRIMARY KEY, -xy INT -) ENGINE=ndbcluster; -INSERT INTO t1 VALUES (1, 0); -CREATE TRIGGER t1_update AFTER UPDATE ON t1 FOR EACH ROW BEGIN REPLACE INTO t2 SELECT * FROM t1 WHERE t1.id = NEW.id; END // -CREATE TABLE t2 ( -id INT NOT NULL PRIMARY KEY, -xy INT -) ENGINE=ndbcluster; -INSERT INTO t2 VALUES (2, 0); -CREATE TABLE t3 (id INT NOT NULL PRIMARY KEY) ENGINE=ndbcluster; -INSERT INTO t3 VALUES (1); -CREATE TABLE t4 LIKE t1; -CREATE TRIGGER t4_update AFTER UPDATE ON t4 FOR EACH ROW BEGIN REPLACE INTO t5 SELECT * FROM t4 WHERE t4.id = NEW.id; END // -CREATE TABLE t5 LIKE t2; -UPDATE t1 SET xy = 3 WHERE id = 1; -SELECT xy FROM t1 where id = 1; -xy -3 -SELECT xy FROM t2 where id = 1; -xy -3 -UPDATE t1 SET xy = 4 WHERE id IN (SELECT id FROM t3 WHERE id = 1); -SELECT xy FROM t1 where id = 1; -xy -4 -SELECT xy FROM t2 where id = 1; -xy -4 -INSERT INTO t4 SELECT * FROM t1; -INSERT INTO t5 SELECT * FROM t2; -UPDATE t1,t4 SET t1.xy = 3, t4.xy = 3 WHERE t1.id = 1 AND t4.id = 1; -SELECT xy FROM t1 where id = 1; -xy -3 -SELECT xy FROM t2 where id = 1; -xy -3 -SELECT xy FROM t4 where id = 1; -xy -3 -SELECT xy FROM t5 where id = 1; -xy -3 -UPDATE t1,t4 SET t1.xy = 4, t4.xy = 4 WHERE t1.id IN (SELECT id FROM t3 WHERE id = 1) AND t4.id IN (SELECT id FROM t3 WHERE id = 1); -SELECT xy FROM t1 where id = 1; -xy -4 -SELECT xy FROM t2 where id = 1; -xy -4 -SELECT xy FROM t4 where id = 1; -xy -4 -SELECT xy FROM t5 where id = 1; -xy -4 -INSERT INTO t1 VALUES (1,0) ON DUPLICATE KEY UPDATE xy = 5; -SELECT xy FROM t1 where id = 1; -xy -5 -SELECT xy FROM t2 where id = 1; -xy -5 -DROP TRIGGER t1_update; -DROP TRIGGER t4_update; -CREATE TRIGGER t1_delete AFTER DELETE ON t1 FOR EACH ROW BEGIN REPLACE INTO t2 SELECT * FROM t1 WHERE t1.id > 4; END // -CREATE TRIGGER t4_delete AFTER DELETE ON t4 FOR EACH ROW BEGIN REPLACE INTO t5 SELECT * FROM t4 WHERE t4.id > 4; END // -INSERT INTO t1 VALUES (5, 0),(6,0); -INSERT INTO t2 VALUES (5, 1),(6,1); -INSERT INTO t3 VALUES (5); -SELECT * FROM t1 order by id; -id xy -1 5 -5 0 -6 0 -SELECT * FROM t2 order by id; -id xy -1 5 -2 0 -5 1 -6 1 -DELETE FROM t1 WHERE id IN (SELECT id FROM t3 WHERE id = 5); -SELECT * FROM t1 order by id; -id xy -1 5 -6 0 -SELECT * FROM t2 order by id; -id xy -1 5 -2 0 -5 1 -6 0 -INSERT INTO t1 VALUES (5,0); -UPDATE t2 SET xy = 1 WHERE id = 6; -TRUNCATE t4; -INSERT INTO t4 SELECT * FROM t1; -TRUNCATE t5; -INSERT INTO t5 SELECT * FROM t2; -SELECT * FROM t1 order by id; -id xy -1 5 -5 0 -6 0 -SELECT * FROM t2 order by id; -id xy -1 5 -2 0 -5 1 -6 1 -SELECT * FROM t4 order by id; -id xy -1 5 -5 0 -6 0 -SELECT * FROM t5 order by id; -id xy -1 5 -2 0 -5 1 -6 1 -DELETE FROM t1,t4 USING t1,t3,t4 WHERE t1.id IN (SELECT id FROM t3 WHERE id = 5) AND t4.id IN (SELECT id FROM t3 WHERE id = 5); -SELECT * FROM t1 order by id; -id xy -1 5 -6 0 -SELECT * FROM t2 order by id; -id xy -1 5 -2 0 -5 1 -6 0 -SELECT * FROM t4 order by id; -id xy -1 5 -6 0 -SELECT * FROM t5 order by id; -id xy -1 5 -2 0 -5 1 -6 0 -INSERT INTO t1 VALUES (5, 0); -REPLACE INTO t2 VALUES (6,1); -SELECT * FROM t1 order by id; -id xy -1 5 -5 0 -6 0 -SELECT * FROM t2 order by id; -id xy -1 5 -2 0 -5 1 -6 1 -REPLACE INTO t1 VALUES (5, 1); -SELECT * FROM t1 order by id; -id xy -1 5 -5 1 -6 0 -SELECT * FROM t2 order by id; -id xy -1 5 -2 0 -5 1 -6 0 -DROP TRIGGER t1_delete; -DROP TRIGGER t4_delete; -DROP TABLE t1, t2, t3, t4, t5; -End of 5.1 tests diff --git a/mysql-test/suite/ndb/r/ndb_truncate.result b/mysql-test/suite/ndb/r/ndb_truncate.result deleted file mode 100644 index 811e5e3afeb..00000000000 --- a/mysql-test/suite/ndb/r/ndb_truncate.result +++ /dev/null @@ -1,23 +0,0 @@ -DROP TABLE IF EXISTS t1, t2; -CREATE TABLE t1 ( -a bigint unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY, -b int unsigned not null, -c int unsigned -) engine=ndbcluster; -select count(*) from t1; -count(*) -5000 -select * from t1 order by a limit 2; -a b c -1 509 2500 -2 510 7 -truncate table t1; -select count(*) from t1; -count(*) -0 -insert into t1 values(NULL,1,1),(NULL,2,2); -select * from t1 order by a; -a b c -1 1 1 -2 2 2 -drop table t1; diff --git a/mysql-test/suite/ndb/r/ndb_types.result b/mysql-test/suite/ndb/r/ndb_types.result deleted file mode 100644 index ec2858d818a..00000000000 --- a/mysql-test/suite/ndb/r/ndb_types.result +++ /dev/null @@ -1,76 +0,0 @@ -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -auto int(5) unsigned NOT NULL auto_increment, -string char(10) default "hello", -vstring varchar(10) default "hello", -bin binary(2), -vbin varbinary(7), -tiny tinyint(4) DEFAULT '0' NOT NULL , -short smallint(6) DEFAULT '1' NOT NULL , -medium mediumint(8) DEFAULT '0' NOT NULL, -long_int int(11) DEFAULT '0' NOT NULL, -longlong bigint(13) DEFAULT '0' NOT NULL, -real_float float(13,1) DEFAULT 0.0 NOT NULL, -real_double double(16,4), -real_decimal decimal(16,4), -utiny tinyint(3) unsigned DEFAULT '0' NOT NULL, -ushort smallint(5) unsigned zerofill DEFAULT '00000' NOT NULL, -umedium mediumint(8) unsigned DEFAULT '0' NOT NULL, -ulong int(11) unsigned DEFAULT '0' NOT NULL, -ulonglong bigint(13) unsigned DEFAULT '0' NOT NULL, -bits bit(3), -options enum('one','two','tree') not null, -flags set('one','two','tree') not null, -date_field date, -year_field year, -time_field time, -date_time datetime, -time_stamp timestamp not null default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -PRIMARY KEY (auto), -KEY (utiny), -KEY (tiny), -KEY (short), -KEY any_name (medium), -KEY (longlong), -KEY (real_float), -KEY (ushort), -KEY (umedium), -KEY (ulong), -KEY (ulonglong,ulong), -KEY (options,flags) -); -set @now = now(); -insert into t1 -(string,vstring,bin,vbin,tiny,short,medium,long_int,longlong, -real_float,real_double, real_decimal,utiny, ushort, umedium,ulong,ulonglong, -bits,options,flags,date_field,year_field,time_field,date_time) -values -("aaaa","aaaa",0xAAAA,0xAAAA,-1,-1,-1,-1,-1,1.1,1.1,1.1,1,1,1,1,1, -b'001','one','one', '1901-01-01','1901','01:01:01','1901-01-01 01:01:01'); -select auto,string,vstring,bin,vbin,tiny,short,medium,long_int,longlong, -real_float,real_double,real_decimal,utiny,ushort,umedium,ulong,ulonglong, -bits,options,flags,date_field,year_field,time_field,date_time -from t1; -auto string vstring bin vbin tiny short medium long_int longlong real_float real_double real_decimal utiny ushort umedium ulong ulonglong bits options flags date_field year_field time_field date_time -1 aaaa aaaa ªª ªª -1 -1 -1 -1 -1 1.1 1.1000 1.1000 1 00001 1 1 1  one one 1901-01-01 1901 01:01:01 1901-01-01 01:01:01 -select time_stamp>@now from t1; -time_stamp>@now -1 -set @now = now(); -update t1 set string="bbbb",vstring="bbbb",bin=0xBBBB,vbin=0xBBBB, -tiny=-2,short=-2,medium=-2,long_int=-2,longlong=-2,real_float=2.2, -real_double=2.2,real_decimal=2.2,utiny=2,ushort=2,umedium=2,ulong=2, -ulonglong=2, bits=b'010', -options='one',flags='one', date_field='1902-02-02',year_field='1902', -time_field='02:02:02',date_time='1902-02-02 02:02:02' where auto=1; -select auto,string,vstring,bin,vbin,tiny,short,medium,long_int,longlong, -real_float,real_double,real_decimal,utiny,ushort,umedium,ulong,ulonglong, -bits,options,flags,date_field,year_field,time_field,date_time -from t1; -auto string vstring bin vbin tiny short medium long_int longlong real_float real_double real_decimal utiny ushort umedium ulong ulonglong bits options flags date_field year_field time_field date_time -1 bbbb bbbb »» »» -2 -2 -2 -2 -2 2.2 2.2000 2.2000 2 00002 2 2 2  one one 1902-02-02 1902 02:02:02 1902-02-02 02:02:02 -select time_stamp>@now from t1; -time_stamp>@now -1 -drop table t1; -End of 4.1 tests diff --git a/mysql-test/suite/ndb/r/ndb_update.result b/mysql-test/suite/ndb/r/ndb_update.result deleted file mode 100644 index fa083587956..00000000000 --- a/mysql-test/suite/ndb/r/ndb_update.result +++ /dev/null @@ -1,96 +0,0 @@ -DROP TABLE IF EXISTS t1; -DROP TABLE IF EXISTS t2; -DROP TABLE IF EXISTS t3; -CREATE TABLE t1 ( -pk1 INT NOT NULL PRIMARY KEY, -b INT NOT NULL, -c INT NOT NULL UNIQUE -) ENGINE=ndbcluster; -INSERT INTO t1 VALUES (0, 1, 0),(1,2,1),(2,3,2); -UPDATE t1 set b = c; -select * from t1 order by pk1; -pk1 b c -0 0 0 -1 1 1 -2 2 2 -UPDATE t1 set pk1 = 4 where pk1 = 1; -select * from t1 order by pk1; -pk1 b c -0 0 0 -2 2 2 -4 1 1 -UPDATE t1 set pk1 = 4 where pk1 = 2; -ERROR 23000: Duplicate entry '4' for key 'PRIMARY' -UPDATE IGNORE t1 set pk1 = 4 where pk1 = 2; -select * from t1 order by pk1; -pk1 b c -0 0 0 -2 2 2 -4 1 1 -UPDATE t1 set pk1 = 1, c = 2 where pk1 = 4; -ERROR 23000: Duplicate entry '2' for key 'c' -UPDATE IGNORE t1 set pk1 = 1, c = 2 where pk1 = 4; -select * from t1 order by pk1; -pk1 b c -0 0 0 -2 2 2 -4 1 1 -UPDATE t1 set pk1 = pk1 + 10; -select * from t1 order by pk1; -pk1 b c -10 0 0 -12 2 2 -14 1 1 -create unique index ib on t1(b); -update t1 set c = 4 where pk1 = 12; -update ignore t1 set b = 55 where pk1 = 14; -select * from t1 order by pk1; -pk1 b c -10 0 0 -12 2 4 -14 55 1 -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 (a int, b int, KEY (a, b)) ENGINE=ndbcluster; -CREATE TABLE t2 (a int, b int, UNIQUE KEY (a, b)) ENGINE=ndbcluster; -CREATE TABLE t3 (a int, b int, PRIMARY KEY (a, b)) ENGINE=ndbcluster; -INSERT INTO t1 VALUES (1, 2); -INSERT INTO t1 VALUES (2, 2); -INSERT INTO t2 VALUES (1, 2); -INSERT INTO t2 VALUES (2, 2); -INSERT INTO t3 VALUES (1, 2); -INSERT INTO t3 VALUES (2, 2); -UPDATE t1 SET a = 1; -UPDATE t1 SET a = 1 ORDER BY a; -UPDATE t2 SET a = 1; -ERROR 23000: Duplicate entry '1-2' for key 'a' -UPDATE t2 SET a = 1 ORDER BY a; -ERROR 23000: Duplicate entry '1-2' for key 'a' -UPDATE t3 SET a = 1; -ERROR 23000: Duplicate entry '1-2' for key 'PRIMARY' -UPDATE t3 SET a = 1 ORDER BY a; -ERROR 23000: Duplicate entry '1-2' for key 'PRIMARY' -SELECT count(*) FROM t1; -count(*) -2 -SELECT count(*) FROM t2; -count(*) -2 -SELECT count(*) FROM t3; -count(*) -2 -SELECT * FROM t1 ORDER by a; -a b -1 2 -1 2 -SELECT * FROM t2 ORDER by a; -a b -1 2 -2 2 -SELECT * FROM t3 ORDER by a; -a b -1 2 -2 2 -DROP TABLE IF EXISTS t1; -DROP TABLE IF EXISTS t2; -DROP TABLE IF EXISTS t3; -End of 5.1 tests diff --git a/mysql-test/suite/ndb/r/ndb_update_no_read.result b/mysql-test/suite/ndb/r/ndb_update_no_read.result deleted file mode 100644 index 4373800d338..00000000000 --- a/mysql-test/suite/ndb/r/ndb_update_no_read.result +++ /dev/null @@ -1,75 +0,0 @@ -DROP TABLE IF EXISTS t1; -create table t1 (a int not null primary key, b int not null, c int, -unique index_b (b) using hash) -engine ndb; -insert into t1 values (1,10,1),(2,9,1),(3,8,1),(4,7,1),(5,6,1),(6,5,2),(7,4,2),(8,3,2), -(9,2,2),(10,1,2); -update t1 set c = 111, b = 20 where a = 1; -select * from t1 where a = 1 order by a; -a b c -1 20 111 -delete from t1 where a = 1; -select * from t1 where a = 1 order by a; -a b c -update t1 set c = 12, b = 19 where b = 2; -select * from t1 where b = 2 order by a; -a b c -delete from t1 where b = 19; -select * from t1 where b = 19 order by a; -a b c -update t1 set c = 22 where a = 10 or a >= 10; -select * from t1 order by a; -a b c -2 9 1 -3 8 1 -4 7 1 -5 6 1 -6 5 2 -7 4 2 -8 3 2 -10 1 22 -update t1 set c = 23 where a in (8,10); -select * from t1 order by a; -a b c -2 9 1 -3 8 1 -4 7 1 -5 6 1 -6 5 2 -7 4 2 -8 3 23 -10 1 23 -update t1 set c = 23 where a in (7,8) or a >= 10; -select * from t1 order by a; -a b c -2 9 1 -3 8 1 -4 7 1 -5 6 1 -6 5 2 -7 4 23 -8 3 23 -10 1 23 -update t1 set c = 11 where a = 3 or b = 7; -select * from t1 where a = 3 or b = 7 order by a; -a b c -3 8 11 -4 7 11 -update t1 set a = 13, b = 20 where a = 3; -select * from t1 where a = 13 order by a; -a b c -13 20 11 -update t1 set a = 12, b = 19 where b = 7; -select * from t1 where b = 19 order by a; -a b c -12 19 11 -select * from t1 where b = 7 order by a; -a b c -update t1 set c = 12, b = 29 where a = 5 and b = 6; -select * from t1 where b = 19 order by a; -a b c -12 19 11 -delete from t1 where b = 6 and c = 12; -select * from t1 where b = 6 order by a; -a b c -drop table t1; diff --git a/mysql-test/suite/ndb/r/ndb_view.result b/mysql-test/suite/ndb/r/ndb_view.result deleted file mode 100644 index b7d1b6860c8..00000000000 --- a/mysql-test/suite/ndb/r/ndb_view.result +++ /dev/null @@ -1,24 +0,0 @@ -DROP TABLE IF EXISTS t1,t2,t3; -DROP VIEW IF EXISTS v1,v2,v3; -create table t1 (a int, b int, c int, d int) engine=ndb; -insert into t1 values (1,2,3,4),(5,6,7,8); -create view v1 as select t1.c as a, t1.a as b, t1.d as c, t1.a+t1.b+t1.c as d from t1; -select * from v1 order by a,b,c; -a b c d -3 1 4 6 -7 5 8 18 -update v1 set a=a+100 where b=1; -select * from v1 order by a,b,c; -a b c d -7 5 8 18 -103 1 4 106 -drop view v1; -create view v1 as select t1.c as a from t1; -insert into v1 values (200); -select * from t1 order by a,b,c,d; -a b c d -NULL NULL 200 NULL -1 2 103 4 -5 6 7 8 -drop view v1; -drop table t1; diff --git a/mysql-test/suite/ndb/r/ndbapi.result b/mysql-test/suite/ndb/r/ndbapi.result deleted file mode 100644 index 8e680391a81..00000000000 --- a/mysql-test/suite/ndb/r/ndbapi.result +++ /dev/null @@ -1,22 +0,0 @@ -DROP TABLE IF EXISTS t0; -drop database if exists mysqltest; -Running ndbapi_simple -Running ndbapi_simple_index -Running ndbapi_scan -Running ndbapi_retries -Running ndbapi_async -Running ndbapi_async1 -use TEST_DB; -create table t0(c0 int, c1 int, c2 char(4), c3 char(4), c4 text, -primary key(c0, c2)) engine ndb charset latin1; -insert into t0 values (1, 2, 'a', 'b', null); -insert into t0 values (3, 4, 'c', 'd', null); -update t0 set c3 = 'e' where c0 = 1 and c2 = 'a'; -update t0 set c3 = 'f'; -update t0 set c3 = 'F'; -update t0 set c2 = 'g' where c0 = 1; -update t0 set c2 = 'G' where c0 = 1; -update t0 set c0 = 5, c2 = 'H' where c0 = 3; -delete from t0; -drop table t0; -Running mgmapi_logevent diff --git a/mysql-test/suite/ndb/r/ps_7ndb.result b/mysql-test/suite/ndb/r/ps_7ndb.result deleted file mode 100644 index cab660e391c..00000000000 --- a/mysql-test/suite/ndb/r/ps_7ndb.result +++ /dev/null @@ -1,3128 +0,0 @@ -use test; -drop table if exists t1, t9 ; -create table t1 -( -a int, b varchar(30), -primary key(a) -) engine = 'NDB' ; -create table t9 -( -c1 tinyint, c2 smallint, c3 mediumint, c4 int, -c5 integer, c6 bigint, c7 float, c8 double, -c9 double precision, c10 real, c11 decimal(7, 4), c12 numeric(8, 4), -c13 date, c14 datetime, c15 timestamp, c16 time, -c17 year, c18 tinyint, c19 bool, c20 char, -c21 char(10), c22 varchar(30), c23 tinyblob, c24 tinytext, -c25 blob, c26 text, c27 mediumblob, c28 mediumtext, -c29 longblob, c30 longtext, c31 enum('one', 'two', 'three'), -c32 set('monday', 'tuesday', 'wednesday'), -primary key(c1) -) engine = 'NDB' ; -delete from t1 ; -insert into t1 values (1,'one'); -insert into t1 values (2,'two'); -insert into t1 values (3,'three'); -insert into t1 values (4,'four'); -commit ; -delete from t9 ; -insert into t9 -set c1= 1, c2= 1, c3= 1, c4= 1, c5= 1, c6= 1, c7= 1, c8= 1, c9= 1, -c10= 1, c11= 1, c12 = 1, -c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11', -c16= '11:11:11', c17= '2004', -c18= 1, c19=true, c20= 'a', c21= '123456789a', -c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext', -c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext', -c29= 'longblob', c30= 'longtext', c31='one', c32= 'monday'; -insert into t9 -set c1= 9, c2= 9, c3= 9, c4= 9, c5= 9, c6= 9, c7= 9, c8= 9, c9= 9, -c10= 9, c11= 9, c12 = 9, -c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11', -c16= '11:11:11', c17= '2004', -c18= 1, c19=false, c20= 'a', c21= '123456789a', -c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext', -c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext', -c29= 'longblob', c30= 'longtext', c31='two', c32= 'tuesday'; -commit ; -test_sequence ------- simple select tests ------ -prepare stmt1 from ' select * from t9 order by c1 ' ; -execute stmt1; -Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def test t9 t9 c1 c1 1 4 1 N 49155 0 63 -def test t9 t9 c2 c2 2 6 1 Y 32768 0 63 -def test t9 t9 c3 c3 9 9 1 Y 32768 0 63 -def test t9 t9 c4 c4 3 11 1 Y 32768 0 63 -def test t9 t9 c5 c5 3 11 1 Y 32768 0 63 -def test t9 t9 c6 c6 8 20 1 Y 32768 0 63 -def test t9 t9 c7 c7 4 12 1 Y 32768 31 63 -def test t9 t9 c8 c8 5 22 1 Y 32768 31 63 -def test t9 t9 c9 c9 5 22 1 Y 32768 31 63 -def test t9 t9 c10 c10 5 22 1 Y 32768 31 63 -def test t9 t9 c11 c11 246 9 6 Y 32768 4 63 -def test t9 t9 c12 c12 246 10 6 Y 32768 4 63 -def test t9 t9 c13 c13 10 10 10 Y 128 0 63 -def test t9 t9 c14 c14 12 19 19 Y 128 0 63 -def test t9 t9 c15 c15 7 19 19 N 9441 0 63 -def test t9 t9 c16 c16 11 8 8 Y 128 0 63 -def test t9 t9 c17 c17 13 4 4 Y 32864 0 63 -def test t9 t9 c18 c18 1 4 1 Y 32768 0 63 -def test t9 t9 c19 c19 1 1 1 Y 32768 0 63 -def test t9 t9 c20 c20 254 1 1 Y 0 0 8 -def test t9 t9 c21 c21 254 10 10 Y 0 0 8 -def test t9 t9 c22 c22 253 30 30 Y 0 0 8 -def test t9 t9 c23 c23 252 255 8 Y 144 0 63 -def test t9 t9 c24 c24 252 255 8 Y 16 0 8 -def test t9 t9 c25 c25 252 65535 4 Y 144 0 63 -def test t9 t9 c26 c26 252 65535 4 Y 16 0 8 -def test t9 t9 c27 c27 252 16777215 10 Y 144 0 63 -def test t9 t9 c28 c28 252 16777215 10 Y 16 0 8 -def test t9 t9 c29 c29 252 4294967295 8 Y 144 0 63 -def test t9 t9 c30 c30 252 4294967295 8 Y 16 0 8 -def test t9 t9 c31 c31 254 5 3 Y 256 0 8 -def test t9 t9 c32 c32 254 24 7 Y 2048 0 8 -c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13 c14 c15 c16 c17 c18 c19 c20 c21 c22 c23 c24 c25 c26 c27 c28 c29 c30 c31 c32 -1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday -9 9 9 9 9 9 9 9 9 9 9.0000 9.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 0 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext two tuesday -set @arg00='SELECT' ; -@arg00 a from t1 where a=1; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@arg00 a from t1 where a=1' at line 1 -prepare stmt1 from ' ? a from t1 where a=1 '; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '? a from t1 where a=1' at line 1 -set @arg00=1 ; -select @arg00, b from t1 where a=1 ; -@arg00 b -1 one -prepare stmt1 from ' select ?, b from t1 where a=1 ' ; -execute stmt1 using @arg00 ; -? b -1 one -set @arg00='lion' ; -select @arg00, b from t1 where a=1 ; -@arg00 b -lion one -prepare stmt1 from ' select ?, b from t1 where a=1 ' ; -execute stmt1 using @arg00 ; -? b -lion one -set @arg00=NULL ; -select @arg00, b from t1 where a=1 ; -@arg00 b -NULL one -prepare stmt1 from ' select ?, b from t1 where a=1 ' ; -execute stmt1 using @arg00 ; -? b -NULL one -set @arg00=1 ; -select b, a - @arg00 from t1 where a=1 ; -b a - @arg00 -one 0 -prepare stmt1 from ' select b, a - ? from t1 where a=1 ' ; -execute stmt1 using @arg00 ; -b a - ? -one 0 -set @arg00=null ; -select @arg00 as my_col ; -my_col -NULL -prepare stmt1 from ' select ? as my_col'; -execute stmt1 using @arg00 ; -my_col -NULL -select @arg00 + 1 as my_col ; -my_col -NULL -prepare stmt1 from ' select ? + 1 as my_col'; -execute stmt1 using @arg00 ; -my_col -NULL -select 1 + @arg00 as my_col ; -my_col -NULL -prepare stmt1 from ' select 1 + ? as my_col'; -execute stmt1 using @arg00 ; -my_col -NULL -set @arg00='MySQL' ; -select substr(@arg00,1,2) from t1 where a=1 ; -substr(@arg00,1,2) -My -prepare stmt1 from ' select substr(?,1,2) from t1 where a=1 ' ; -execute stmt1 using @arg00 ; -substr(?,1,2) -My -set @arg00=3 ; -select substr('MySQL',@arg00,5) from t1 where a=1 ; -substr('MySQL',@arg00,5) -SQL -prepare stmt1 from ' select substr(''MySQL'',?,5) from t1 where a=1 ' ; -execute stmt1 using @arg00 ; -substr('MySQL',?,5) -SQL -select substr('MySQL',1,@arg00) from t1 where a=1 ; -substr('MySQL',1,@arg00) -MyS -prepare stmt1 from ' select substr(''MySQL'',1,?) from t1 where a=1 ' ; -execute stmt1 using @arg00 ; -substr('MySQL',1,?) -MyS -set @arg00='MySQL' ; -select a , concat(@arg00,b) from t1 order by a; -a concat(@arg00,b) -1 MySQLone -2 MySQLtwo -3 MySQLthree -4 MySQLfour -prepare stmt1 from ' select a , concat(?,b) from t1 order by a ' ; -execute stmt1 using @arg00; -a concat(?,b) -1 MySQLone -2 MySQLtwo -3 MySQLthree -4 MySQLfour -select a , concat(b,@arg00) from t1 order by a ; -a concat(b,@arg00) -1 oneMySQL -2 twoMySQL -3 threeMySQL -4 fourMySQL -prepare stmt1 from ' select a , concat(b,?) from t1 order by a ' ; -execute stmt1 using @arg00; -a concat(b,?) -1 oneMySQL -2 twoMySQL -3 threeMySQL -4 fourMySQL -set @arg00='MySQL' ; -select group_concat(@arg00,b order by a) from t1 -group by 'a' ; -group_concat(@arg00,b order by a) -MySQLone,MySQLtwo,MySQLthree,MySQLfour -prepare stmt1 from ' select group_concat(?,b order by a) from t1 -group by ''a'' ' ; -execute stmt1 using @arg00; -group_concat(?,b order by a) -MySQLone,MySQLtwo,MySQLthree,MySQLfour -select group_concat(b,@arg00 order by a) from t1 -group by 'a' ; -group_concat(b,@arg00 order by a) -oneMySQL,twoMySQL,threeMySQL,fourMySQL -prepare stmt1 from ' select group_concat(b,? order by a) from t1 -group by ''a'' ' ; -execute stmt1 using @arg00; -group_concat(b,? order by a) -oneMySQL,twoMySQL,threeMySQL,fourMySQL -set @arg00='first' ; -set @arg01='second' ; -set @arg02=NULL; -select @arg00, @arg01 from t1 where a=1 ; -@arg00 @arg01 -first second -prepare stmt1 from ' select ?, ? from t1 where a=1 ' ; -execute stmt1 using @arg00, @arg01 ; -? ? -first second -execute stmt1 using @arg02, @arg01 ; -? ? -NULL second -execute stmt1 using @arg00, @arg02 ; -? ? -first NULL -execute stmt1 using @arg02, @arg02 ; -? ? -NULL NULL -drop table if exists t5 ; -create table t5 (id1 int(11) not null default '0', -value2 varchar(100), value1 varchar(100)) ; -insert into t5 values (1,'hh','hh'),(2,'hh','hh'), -(1,'ii','ii'),(2,'ii','ii') ; -prepare stmt1 from ' select id1,value1 from t5 where id1=? or value1=? order by id1,value1 ' ; -set @arg00=1 ; -set @arg01='hh' ; -execute stmt1 using @arg00, @arg01 ; -id1 value1 -1 hh -1 ii -2 hh -drop table t5 ; -drop table if exists t5 ; -create table t5(session_id char(9) not null) ; -insert into t5 values ('abc') ; -prepare stmt1 from ' select * from t5 -where ?=''1111'' and session_id = ''abc'' ' ; -set @arg00='abc' ; -execute stmt1 using @arg00 ; -session_id -set @arg00='1111' ; -execute stmt1 using @arg00 ; -session_id -abc -set @arg00='abc' ; -execute stmt1 using @arg00 ; -session_id -drop table t5 ; -set @arg00='FROM' ; -select a @arg00 t1 where a=1 ; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@arg00 t1 where a=1' at line 1 -prepare stmt1 from ' select a ? t1 where a=1 ' ; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '? t1 where a=1' at line 1 -set @arg00='t1' ; -select a from @arg00 where a=1 ; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@arg00 where a=1' at line 1 -prepare stmt1 from ' select a from ? where a=1 ' ; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '? where a=1' at line 1 -set @arg00='WHERE' ; -select a from t1 @arg00 a=1 ; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@arg00 a=1' at line 1 -prepare stmt1 from ' select a from t1 ? a=1 ' ; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '? a=1' at line 1 -set @arg00=1 ; -select a FROM t1 where a=@arg00 ; -a -1 -prepare stmt1 from ' select a FROM t1 where a=? ' ; -execute stmt1 using @arg00 ; -a -1 -set @arg00=1000 ; -execute stmt1 using @arg00 ; -a -set @arg00=NULL ; -select a FROM t1 where a=@arg00 ; -a -prepare stmt1 from ' select a FROM t1 where a=? ' ; -execute stmt1 using @arg00 ; -a -set @arg00=4 ; -select a FROM t1 where a=sqrt(@arg00) ; -a -2 -prepare stmt1 from ' select a FROM t1 where a=sqrt(?) ' ; -execute stmt1 using @arg00 ; -a -2 -set @arg00=NULL ; -select a FROM t1 where a=sqrt(@arg00) ; -a -prepare stmt1 from ' select a FROM t1 where a=sqrt(?) ' ; -execute stmt1 using @arg00 ; -a -set @arg00=2 ; -set @arg01=3 ; -select a FROM t1 where a in (@arg00,@arg01) order by a; -a -2 -3 -prepare stmt1 from ' select a FROM t1 where a in (?,?) order by a '; -execute stmt1 using @arg00, @arg01; -a -2 -3 -set @arg00= 'one' ; -set @arg01= 'two' ; -set @arg02= 'five' ; -prepare stmt1 from ' select b FROM t1 where b in (?,?,?) order by b ' ; -execute stmt1 using @arg00, @arg01, @arg02 ; -b -one -two -prepare stmt1 from ' select b FROM t1 where b like ? '; -set @arg00='two' ; -execute stmt1 using @arg00 ; -b -two -set @arg00='tw%' ; -execute stmt1 using @arg00 ; -b -two -set @arg00='%wo' ; -execute stmt1 using @arg00 ; -b -two -set @arg00=null ; -insert into t9 set c1= 0, c5 = NULL ; -select c5 from t9 where c5 > NULL ; -c5 -prepare stmt1 from ' select c5 from t9 where c5 > ? '; -execute stmt1 using @arg00 ; -c5 -select c5 from t9 where c5 < NULL ; -c5 -prepare stmt1 from ' select c5 from t9 where c5 < ? '; -execute stmt1 using @arg00 ; -c5 -select c5 from t9 where c5 = NULL ; -c5 -prepare stmt1 from ' select c5 from t9 where c5 = ? '; -execute stmt1 using @arg00 ; -c5 -select c5 from t9 where c5 <=> NULL ; -c5 -NULL -prepare stmt1 from ' select c5 from t9 where c5 <=> ? '; -execute stmt1 using @arg00 ; -c5 -NULL -delete from t9 where c1= 0 ; -set @arg00='>' ; -select a FROM t1 where a @arg00 1 ; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@arg00 1' at line 1 -prepare stmt1 from ' select a FROM t1 where a ? 1 ' ; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '? 1' at line 1 -set @arg00=1 ; -select a,b FROM t1 where a is not NULL -AND b is not NULL group by a - @arg00 ; -a b -1 one -2 two -3 three -4 four -prepare stmt1 from ' select a,b FROM t1 where a is not NULL -AND b is not NULL group by a - ? ' ; -execute stmt1 using @arg00 ; -a b -1 one -2 two -3 three -4 four -set @arg00='two' ; -select a,b FROM t1 where a is not NULL -AND b is not NULL having b <> @arg00 order by a ; -a b -1 one -3 three -4 four -prepare stmt1 from ' select a,b FROM t1 where a is not NULL -AND b is not NULL having b <> ? order by a ' ; -execute stmt1 using @arg00 ; -a b -1 one -3 three -4 four -set @arg00=1 ; -select a,b FROM t1 where a is not NULL -AND b is not NULL order by a - @arg00 ; -a b -1 one -2 two -3 three -4 four -prepare stmt1 from ' select a,b FROM t1 where a is not NULL -AND b is not NULL order by a - ? ' ; -execute stmt1 using @arg00 ; -a b -1 one -2 two -3 three -4 four -set @arg00=2 ; -select a,b from t1 order by 2 ; -a b -4 four -1 one -3 three -2 two -prepare stmt1 from ' select a,b from t1 -order by ? '; -execute stmt1 using @arg00; -a b -4 four -1 one -3 three -2 two -set @arg00=1 ; -execute stmt1 using @arg00; -a b -1 one -2 two -3 three -4 four -set @arg00=0 ; -execute stmt1 using @arg00; -ERROR 42S22: Unknown column '?' in 'order clause' -set @arg00=1; -prepare stmt1 from ' select a,b from t1 order by a -limit 1 '; -execute stmt1 ; -a b -1 one -prepare stmt1 from ' select a,b from t1 order by a limit ? '; -execute stmt1 using @arg00; -a b -1 one -set @arg00='b' ; -set @arg01=0 ; -set @arg02=2 ; -set @arg03=2 ; -select sum(a), @arg00 from t1 where a > @arg01 -and b is not null group by substr(b,@arg02) -having sum(a) <> @arg03 ; -sum(a) @arg00 -3 b -1 b -4 b -prepare stmt1 from ' select sum(a), ? from t1 where a > ? -and b is not null group by substr(b,?) -having sum(a) <> ? '; -execute stmt1 using @arg00, @arg01, @arg02, @arg03; -sum(a) ? -3 b -1 b -4 b -test_sequence ------- join tests ------ -select first.a as a1, second.a as a2 -from t1 first, t1 second -where first.a = second.a order by a1 ; -a1 a2 -1 1 -2 2 -3 3 -4 4 -prepare stmt1 from ' select first.a as a1, second.a as a2 - from t1 first, t1 second - where first.a = second.a order by a1 '; -execute stmt1 ; -a1 a2 -1 1 -2 2 -3 3 -4 4 -set @arg00='ABC'; -set @arg01='two'; -set @arg02='one'; -select first.a, @arg00, second.a FROM t1 first, t1 second -where @arg01 = first.b or first.a = second.a or second.b = @arg02 -order by second.a, first.a; -a @arg00 a -1 ABC 1 -2 ABC 1 -3 ABC 1 -4 ABC 1 -2 ABC 2 -2 ABC 3 -3 ABC 3 -2 ABC 4 -4 ABC 4 -prepare stmt1 from ' select first.a, ?, second.a FROM t1 first, t1 second - where ? = first.b or first.a = second.a or second.b = ? - order by second.a, first.a'; -execute stmt1 using @arg00, @arg01, @arg02; -a ? a -1 ABC 1 -2 ABC 1 -3 ABC 1 -4 ABC 1 -2 ABC 2 -2 ABC 3 -3 ABC 3 -2 ABC 4 -4 ABC 4 -drop table if exists t2 ; -create table t2 as select * from t1 ; -set @query1= 'SELECT * FROM t2 join t1 on (t1.a=t2.a) order by t2.a ' ; -set @query2= 'SELECT * FROM t2 natural join t1 order by t2.a ' ; -set @query3= 'SELECT * FROM t2 join t1 using(a) order by t2.a ' ; -set @query4= 'SELECT * FROM t2 left join t1 on(t1.a=t2.a) order by t2.a ' ; -set @query5= 'SELECT * FROM t2 natural left join t1 order by t2.a ' ; -set @query6= 'SELECT * FROM t2 left join t1 using(a) order by t2.a ' ; -set @query7= 'SELECT * FROM t2 right join t1 on(t1.a=t2.a) order by t2.a ' ; -set @query8= 'SELECT * FROM t2 natural right join t1 order by t2.a ' ; -set @query9= 'SELECT * FROM t2 right join t1 using(a) order by t2.a ' ; -the join statement is: -SELECT * FROM t2 right join t1 using(a) order by t2.a -prepare stmt1 from @query9 ; -execute stmt1 ; -a b b -1 one one -2 two two -3 three three -4 four four -execute stmt1 ; -a b b -1 one one -2 two two -3 three three -4 four four -execute stmt1 ; -a b b -1 one one -2 two two -3 three three -4 four four -the join statement is: -SELECT * FROM t2 natural right join t1 order by t2.a -prepare stmt1 from @query8 ; -execute stmt1 ; -a b -1 one -2 two -3 three -4 four -execute stmt1 ; -a b -1 one -2 two -3 three -4 four -execute stmt1 ; -a b -1 one -2 two -3 three -4 four -the join statement is: -SELECT * FROM t2 right join t1 on(t1.a=t2.a) order by t2.a -prepare stmt1 from @query7 ; -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -the join statement is: -SELECT * FROM t2 left join t1 using(a) order by t2.a -prepare stmt1 from @query6 ; -execute stmt1 ; -a b b -1 one one -2 two two -3 three three -4 four four -execute stmt1 ; -a b b -1 one one -2 two two -3 three three -4 four four -execute stmt1 ; -a b b -1 one one -2 two two -3 three three -4 four four -the join statement is: -SELECT * FROM t2 natural left join t1 order by t2.a -prepare stmt1 from @query5 ; -execute stmt1 ; -a b -1 one -2 two -3 three -4 four -execute stmt1 ; -a b -1 one -2 two -3 three -4 four -execute stmt1 ; -a b -1 one -2 two -3 three -4 four -the join statement is: -SELECT * FROM t2 left join t1 on(t1.a=t2.a) order by t2.a -prepare stmt1 from @query4 ; -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -the join statement is: -SELECT * FROM t2 join t1 using(a) order by t2.a -prepare stmt1 from @query3 ; -execute stmt1 ; -a b b -1 one one -2 two two -3 three three -4 four four -execute stmt1 ; -a b b -1 one one -2 two two -3 three three -4 four four -execute stmt1 ; -a b b -1 one one -2 two two -3 three three -4 four four -the join statement is: -SELECT * FROM t2 natural join t1 order by t2.a -prepare stmt1 from @query2 ; -execute stmt1 ; -a b -1 one -2 two -3 three -4 four -execute stmt1 ; -a b -1 one -2 two -3 three -4 four -execute stmt1 ; -a b -1 one -2 two -3 three -4 four -the join statement is: -SELECT * FROM t2 join t1 on (t1.a=t2.a) order by t2.a -prepare stmt1 from @query1 ; -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -drop table t2 ; -test_sequence ------- subquery tests ------ -prepare stmt1 from ' select a, b FROM t1 outer_table where - a = (select a from t1 where b = ''two'') '; -execute stmt1 ; -a b -2 two -set @arg00='two' ; -select a, b FROM t1 outer_table where -a = (select a from t1 where b = 'two' ) and b=@arg00 ; -a b -2 two -prepare stmt1 from ' select a, b FROM t1 outer_table where - a = (select a from t1 where b = ''two'') and b=? '; -execute stmt1 using @arg00; -a b -2 two -set @arg00='two' ; -select a, b FROM t1 outer_table where -a = (select a from t1 where b = @arg00 ) and b='two' ; -a b -2 two -prepare stmt1 from ' select a, b FROM t1 outer_table where - a = (select a from t1 where b = ? ) and b=''two'' ' ; -execute stmt1 using @arg00; -a b -2 two -set @arg00=3 ; -set @arg01='three' ; -select a,b FROM t1 where (a,b) in (select 3, 'three'); -a b -3 three -select a FROM t1 where (a,b) in (select @arg00,@arg01); -a -3 -prepare stmt1 from ' select a FROM t1 where (a,b) in (select ?, ?) '; -execute stmt1 using @arg00, @arg01; -a -3 -set @arg00=1 ; -set @arg01='two' ; -set @arg02=2 ; -set @arg03='two' ; -select a, @arg00, b FROM t1 outer_table where -b=@arg01 and a = (select @arg02 from t1 where b = @arg03 ) ; -a @arg00 b -2 1 two -prepare stmt1 from ' select a, ?, b FROM t1 outer_table where - b=? and a = (select ? from t1 where b = ? ) ' ; -execute stmt1 using @arg00, @arg01, @arg02, @arg03 ; -a ? b -2 1 two -prepare stmt1 from 'select c4 FROM t9 where - c13 = (select MAX(b) from t1 where a = ?) and c22 = ? ' ; -execute stmt1 using @arg01, @arg02; -c4 -prepare stmt1 from ' select a, b FROM t1 outer_table where - a = (select a from t1 where b = outer_table.b ) order by a '; -execute stmt1 ; -a b -1 one -2 two -3 three -4 four -prepare stmt1 from ' SELECT a as ccc from t1 outr where a+1= - (SELECT 1+outr.a from t1 where outr.a+1=a+1 and a=1) '; -execute stmt1 ; -ccc -1 -deallocate prepare stmt1 ; -prepare stmt1 from ' SELECT a as ccc from t1 outr where a+1= - (SELECT 1+outr.a from t1 where outr.a+1=a+1 and a=1) '; -execute stmt1 ; -ccc -1 -deallocate prepare stmt1 ; -prepare stmt1 from ' SELECT a as ccc from t1 outr where a+1= - (SELECT 1+outr.a from t1 where outr.a+1=a+1 and a=1) '; -execute stmt1 ; -ccc -1 -deallocate prepare stmt1 ; -set @arg00='two' ; -select a, b FROM t1 outer_table where -a = (select a from t1 where b = outer_table.b ) and b=@arg00 ; -a b -2 two -prepare stmt1 from ' select a, b FROM t1 outer_table where - a = (select a from t1 where b = outer_table.b) and b=? '; -execute stmt1 using @arg00; -a b -2 two -set @arg00=2 ; -select a, b FROM t1 outer_table where -a = (select a from t1 where a = @arg00 and b = outer_table.b) and b='two' ; -a b -2 two -prepare stmt1 from ' select a, b FROM t1 outer_table where - a = (select a from t1 where a = ? and b = outer_table.b) and b=''two'' ' ; -execute stmt1 using @arg00; -a b -2 two -set @arg00=2 ; -select a, b FROM t1 outer_table where -a = (select a from t1 where outer_table.a = @arg00 and a=2) and b='two' ; -a b -2 two -prepare stmt1 from ' select a, b FROM t1 outer_table where - a = (select a from t1 where outer_table.a = ? and a=2) and b=''two'' ' ; -execute stmt1 using @arg00; -a b -2 two -set @arg00=1 ; -set @arg01='two' ; -set @arg02=2 ; -set @arg03='two' ; -select a, @arg00, b FROM t1 outer_table where -b=@arg01 and a = (select @arg02 from t1 where outer_table.b = @arg03 -and outer_table.a=a ) ; -a @arg00 b -2 1 two -prepare stmt1 from ' select a, ?, b FROM t1 outer_table where - b=? and a = (select ? from t1 where outer_table.b = ? - and outer_table.a=a ) ' ; -execute stmt1 using @arg00, @arg01, @arg02, @arg03 ; -a ? b -2 1 two -set @arg00=1 ; -set @arg01=0 ; -select a, @arg00 -from ( select a - @arg00 as a from t1 where a=@arg00 ) as t2 -where a=@arg01; -a @arg00 -0 1 -prepare stmt1 from ' select a, ? - from ( select a - ? as a from t1 where a=? ) as t2 - where a=? '; -execute stmt1 using @arg00, @arg00, @arg00, @arg01 ; -a ? -0 1 -drop table if exists t2 ; -create table t2 as select * from t1; -prepare stmt1 from ' select a in (select a from t2) from t1 ' ; -execute stmt1 ; -a in (select a from t2) -1 -1 -1 -1 -drop table if exists t5, t6, t7 ; -create table t5 (a int , b int) ; -create table t6 like t5 ; -create table t7 like t5 ; -insert into t5 values (0, 100), (1, 2), (1, 3), (2, 2), (2, 7), -(2, -1), (3, 10) ; -insert into t6 values (0, 0), (1, 1), (2, 1), (3, 1), (4, 1) ; -insert into t7 values (3, 3), (2, 2), (1, 1) ; -prepare stmt1 from ' select a, (select count(distinct t5.b) as sum from t5, t6 - where t5.a=t6.a and t6.b > 0 and t5.a <= t7.b - group by t5.a order by sum limit 1) from t7 ' ; -execute stmt1 ; -a (select count(distinct t5.b) as sum from t5, t6 - where t5.a=t6.a and t6.b > 0 and t5.a <= t7.b - group by t5.a order by sum limit 1) -3 1 -2 2 -1 2 -execute stmt1 ; -a (select count(distinct t5.b) as sum from t5, t6 - where t5.a=t6.a and t6.b > 0 and t5.a <= t7.b - group by t5.a order by sum limit 1) -3 1 -2 2 -1 2 -execute stmt1 ; -a (select count(distinct t5.b) as sum from t5, t6 - where t5.a=t6.a and t6.b > 0 and t5.a <= t7.b - group by t5.a order by sum limit 1) -3 1 -2 2 -1 2 -drop table t5, t6, t7 ; -drop table if exists t2 ; -create table t2 as select * from t9; -set @stmt= ' SELECT - (SELECT SUM(c1 + c12 + 0.0) FROM t2 - where (t9.c2 - 0e-3) = t2.c2 - GROUP BY t9.c15 LIMIT 1) as scalar_s, - exists (select 1.0e+0 from t2 - where t2.c3 * 9.0000000000 = t9.c4) as exists_s, - c5 * 4 in (select c6 + 0.3e+1 from t2) as in_s, - (c7 - 4, c8 - 4) in (select c9 + 4.0, c10 + 40e-1 from t2) as in_row_s -FROM t9, -(select c25 x, c32 y from t2) tt WHERE x = c25 ' ; -prepare stmt1 from @stmt ; -execute stmt1 ; -execute stmt1 ; -set @stmt= concat('explain ',@stmt); -prepare stmt1 from @stmt ; -execute stmt1 ; -execute stmt1 ; -set @stmt= ' SELECT - (SELECT SUM(c1+c12+?) FROM t2 where (t9.c2-?)=t2.c2 - GROUP BY t9.c15 LIMIT 1) as scalar_s, - exists (select ? from t2 - where t2.c3*?=t9.c4) as exists_s, - c5*? in (select c6+? from t2) as in_s, - (c7-?, c8-?) in (select c9+?, c10+? from t2) as in_row_s -FROM t9, -(select c25 x, c32 y from t2) tt WHERE x =c25 ' ; -set @arg00= 0.0 ; -set @arg01= 0e-3 ; -set @arg02= 1.0e+0 ; -set @arg03= 9.0000000000 ; -set @arg04= 4 ; -set @arg05= 0.3e+1 ; -set @arg06= 4 ; -set @arg07= 4 ; -set @arg08= 4.0 ; -set @arg09= 40e-1 ; -prepare stmt1 from @stmt ; -execute stmt1 using @arg00, @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, -@arg07, @arg08, @arg09 ; -execute stmt1 using @arg00, @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, -@arg07, @arg08, @arg09 ; -set @stmt= concat('explain ',@stmt); -prepare stmt1 from @stmt ; -execute stmt1 using @arg00, @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, -@arg07, @arg08, @arg09 ; -execute stmt1 using @arg00, @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, -@arg07, @arg08, @arg09 ; -drop table t2 ; -select 1 < (select a from t1) ; -ERROR 21000: Subquery returns more than 1 row -prepare stmt1 from ' select 1 < (select a from t1) ' ; -execute stmt1 ; -ERROR 21000: Subquery returns more than 1 row -select 1 as my_col ; -my_col -1 -test_sequence ------- union tests ------ -prepare stmt1 from ' select a FROM t1 where a=1 - union distinct - select a FROM t1 where a=1 '; -execute stmt1 ; -a -1 -execute stmt1 ; -a -1 -prepare stmt1 from ' select a FROM t1 where a=1 - union all - select a FROM t1 where a=1 '; -execute stmt1 ; -a -1 -1 -prepare stmt1 from ' SELECT 1, 2 union SELECT 1 ' ; -ERROR 21000: The used SELECT statements have a different number of columns -prepare stmt1 from ' SELECT 1 union SELECT 1, 2 ' ; -ERROR 21000: The used SELECT statements have a different number of columns -prepare stmt1 from ' SELECT * from t1 union SELECT 1 ' ; -ERROR 21000: The used SELECT statements have a different number of columns -prepare stmt1 from ' SELECT 1 union SELECT * from t1 ' ; -ERROR 21000: The used SELECT statements have a different number of columns -set @arg00=1 ; -select @arg00 FROM t1 where a=1 -union distinct -select 1 FROM t1 where a=1; -@arg00 -1 -prepare stmt1 from ' select ? FROM t1 where a=1 - union distinct - select 1 FROM t1 where a=1 ' ; -execute stmt1 using @arg00; -? -1 -set @arg00=1 ; -select 1 FROM t1 where a=1 -union distinct -select @arg00 FROM t1 where a=1; -1 -1 -prepare stmt1 from ' select 1 FROM t1 where a=1 - union distinct - select ? FROM t1 where a=1 ' ; -execute stmt1 using @arg00; -1 -1 -set @arg00='a' ; -select @arg00 FROM t1 where a=1 -union distinct -select @arg00 FROM t1 where a=1; -@arg00 -a -prepare stmt1 from ' select ? FROM t1 where a=1 - union distinct - select ? FROM t1 where a=1 '; -execute stmt1 using @arg00, @arg00; -? -a -prepare stmt1 from ' select ? - union distinct - select ? '; -execute stmt1 using @arg00, @arg00; -? -a -set @arg00='a' ; -set @arg01=1 ; -set @arg02='a' ; -set @arg03=2 ; -select @arg00 FROM t1 where a=@arg01 -union distinct -select @arg02 FROM t1 where a=@arg03; -@arg00 -a -prepare stmt1 from ' select ? FROM t1 where a=? - union distinct - select ? FROM t1 where a=? ' ; -execute stmt1 using @arg00, @arg01, @arg02, @arg03; -? -a -set @arg00=1 ; -prepare stmt1 from ' select sum(a) + 200, ? from t1 -union distinct -select sum(a) + 200, 1 from t1 -group by b ' ; -execute stmt1 using @arg00; -sum(a) + 200 ? -210 1 -204 1 -201 1 -203 1 -202 1 -set @Oporto='Oporto' ; -set @Lisboa='Lisboa' ; -set @0=0 ; -set @1=1 ; -set @2=2 ; -set @3=3 ; -set @4=4 ; -select @Oporto,@Lisboa,@0,@1,@2,@3,@4 ; -@Oporto @Lisboa @0 @1 @2 @3 @4 -Oporto Lisboa 0 1 2 3 4 -select sum(a) + 200 as the_sum, @Oporto as the_town from t1 -group by b -union distinct -select sum(a) + 200, @Lisboa from t1 -group by b ; -the_sum the_town -204 Oporto -201 Oporto -203 Oporto -202 Oporto -204 Lisboa -201 Lisboa -203 Lisboa -202 Lisboa -prepare stmt1 from ' select sum(a) + 200 as the_sum, ? as the_town from t1 - group by b - union distinct - select sum(a) + 200, ? from t1 - group by b ' ; -execute stmt1 using @Oporto, @Lisboa; -the_sum the_town -204 Oporto -201 Oporto -203 Oporto -202 Oporto -204 Lisboa -201 Lisboa -203 Lisboa -202 Lisboa -select sum(a) + 200 as the_sum, @Oporto as the_town from t1 -where a > @1 -group by b -union distinct -select sum(a) + 200, @Lisboa from t1 -where a > @2 -group by b ; -the_sum the_town -204 Oporto -203 Oporto -202 Oporto -204 Lisboa -203 Lisboa -prepare stmt1 from ' select sum(a) + 200 as the_sum, ? as the_town from t1 - where a > ? - group by b - union distinct - select sum(a) + 200, ? from t1 - where a > ? - group by b ' ; -execute stmt1 using @Oporto, @1, @Lisboa, @2; -the_sum the_town -204 Oporto -203 Oporto -202 Oporto -204 Lisboa -203 Lisboa -select sum(a) + 200 as the_sum, @Oporto as the_town from t1 -where a > @1 -group by b -having avg(a) > @2 -union distinct -select sum(a) + 200, @Lisboa from t1 -where a > @2 -group by b -having avg(a) > @3; -the_sum the_town -204 Oporto -203 Oporto -204 Lisboa -prepare stmt1 from ' select sum(a) + 200 as the_sum, ? as the_town from t1 - where a > ? - group by b - having avg(a) > ? - union distinct - select sum(a) + 200, ? from t1 - where a > ? - group by b - having avg(a) > ? '; -execute stmt1 using @Oporto, @1, @2, @Lisboa, @2, @3; -the_sum the_town -204 Oporto -203 Oporto -204 Lisboa -test_sequence ------- explain select tests ------ -prepare stmt1 from ' explain select * from t9 ' ; -execute stmt1; -Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def id 8 3 1 N 32929 0 63 -def select_type 253 19 6 N 1 31 8 -def table 253 64 2 Y 0 31 8 -def type 253 10 3 Y 0 31 8 -def possible_keys 253 4096 0 Y 0 31 8 -def key 253 64 0 Y 0 31 8 -def key_len 253 4096 0 Y 0 31 8 -def ref 253 1024 0 Y 0 31 8 -def rows 8 10 1 Y 32928 0 63 -def Extra 253 255 0 N 1 31 8 -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t9 ALL NULL NULL NULL NULL 2 -test_sequence ------- delete tests ------ -delete from t1 ; -insert into t1 values (1,'one'); -insert into t1 values (2,'two'); -insert into t1 values (3,'three'); -insert into t1 values (4,'four'); -commit ; -delete from t9 ; -insert into t9 -set c1= 1, c2= 1, c3= 1, c4= 1, c5= 1, c6= 1, c7= 1, c8= 1, c9= 1, -c10= 1, c11= 1, c12 = 1, -c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11', -c16= '11:11:11', c17= '2004', -c18= 1, c19=true, c20= 'a', c21= '123456789a', -c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext', -c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext', -c29= 'longblob', c30= 'longtext', c31='one', c32= 'monday'; -insert into t9 -set c1= 9, c2= 9, c3= 9, c4= 9, c5= 9, c6= 9, c7= 9, c8= 9, c9= 9, -c10= 9, c11= 9, c12 = 9, -c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11', -c16= '11:11:11', c17= '2004', -c18= 1, c19=false, c20= 'a', c21= '123456789a', -c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext', -c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext', -c29= 'longblob', c30= 'longtext', c31='two', c32= 'tuesday'; -commit ; -prepare stmt1 from 'delete from t1 where a=2' ; -execute stmt1; -select a,b from t1 where a=2; -a b -execute stmt1; -insert into t1 values(0,NULL); -set @arg00=NULL; -prepare stmt1 from 'delete from t1 where b=?' ; -execute stmt1 using @arg00; -select a,b from t1 where b is NULL ; -a b -0 NULL -set @arg00='one'; -execute stmt1 using @arg00; -select a,b from t1 where b=@arg00; -a b -prepare stmt1 from 'truncate table t1' ; -test_sequence ------- update tests ------ -delete from t1 ; -insert into t1 values (1,'one'); -insert into t1 values (2,'two'); -insert into t1 values (3,'three'); -insert into t1 values (4,'four'); -commit ; -delete from t9 ; -insert into t9 -set c1= 1, c2= 1, c3= 1, c4= 1, c5= 1, c6= 1, c7= 1, c8= 1, c9= 1, -c10= 1, c11= 1, c12 = 1, -c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11', -c16= '11:11:11', c17= '2004', -c18= 1, c19=true, c20= 'a', c21= '123456789a', -c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext', -c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext', -c29= 'longblob', c30= 'longtext', c31='one', c32= 'monday'; -insert into t9 -set c1= 9, c2= 9, c3= 9, c4= 9, c5= 9, c6= 9, c7= 9, c8= 9, c9= 9, -c10= 9, c11= 9, c12 = 9, -c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11', -c16= '11:11:11', c17= '2004', -c18= 1, c19=false, c20= 'a', c21= '123456789a', -c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext', -c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext', -c29= 'longblob', c30= 'longtext', c31='two', c32= 'tuesday'; -commit ; -prepare stmt1 from 'update t1 set b=''a=two'' where a=2' ; -execute stmt1; -select a,b from t1 where a=2; -a b -2 a=two -execute stmt1; -select a,b from t1 where a=2; -a b -2 a=two -set @arg00=NULL; -prepare stmt1 from 'update t1 set b=? where a=2' ; -execute stmt1 using @arg00; -select a,b from t1 where a=2; -a b -2 NULL -set @arg00='two'; -execute stmt1 using @arg00; -select a,b from t1 where a=2; -a b -2 two -set @arg00=2; -prepare stmt1 from 'update t1 set b=NULL where a=?' ; -execute stmt1 using @arg00; -select a,b from t1 where a=@arg00; -a b -2 NULL -update t1 set b='two' where a=@arg00; -set @arg00=2000; -execute stmt1 using @arg00; -select a,b from t1 where a=@arg00; -a b -set @arg00=2; -set @arg01=22; -prepare stmt1 from 'update t1 set a=? where a=?' ; -execute stmt1 using @arg00, @arg00; -select a,b from t1 where a=@arg00; -a b -2 two -execute stmt1 using @arg01, @arg00; -select a,b from t1 where a=@arg01; -a b -22 two -execute stmt1 using @arg00, @arg01; -select a,b from t1 where a=@arg00; -a b -2 two -set @arg00=NULL; -set @arg01=2; -execute stmt1 using @arg00, @arg01; -Warnings: -Warning 1048 Column 'a' cannot be null -select a,b from t1 order by a; -a b -0 two -1 one -3 three -4 four -set @arg00=0; -execute stmt1 using @arg01, @arg00; -select a,b from t1 order by a; -a b -1 one -2 two -3 three -4 four -set @arg00=23; -set @arg01='two'; -set @arg02=2; -set @arg03='two'; -set @arg04=2; -drop table if exists t2; -create table t2 as select a,b from t1 ; -prepare stmt1 from 'update t1 set a=? where b=? - and a in (select ? from t2 - where b = ? or a = ?)'; -execute stmt1 using @arg00, @arg01, @arg02, @arg03, @arg04 ; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -select a,b from t1 where a = @arg00 ; -a b -23 two -prepare stmt1 from 'update t1 set a=? where b=? - and a not in (select ? from t2 - where b = ? or a = ?)'; -execute stmt1 using @arg04, @arg01, @arg02, @arg03, @arg00 ; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -select a,b from t1 order by a ; -a b -1 one -2 two -3 three -4 four -drop table t2 ; -create table t2 -( -a int, b varchar(30), -primary key(a) -) engine = 'NDB' ; -insert into t2(a,b) select a, b from t1 ; -prepare stmt1 from 'update t1 set a=? where b=? - and a in (select ? from t2 - where b = ? or a = ?)'; -execute stmt1 using @arg00, @arg01, @arg02, @arg03, @arg04 ; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -select a,b from t1 where a = @arg00 ; -a b -23 two -prepare stmt1 from 'update t1 set a=? where b=? - and a not in (select ? from t2 - where b = ? or a = ?)'; -execute stmt1 using @arg04, @arg01, @arg02, @arg03, @arg00 ; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -select a,b from t1 order by a ; -a b -1 one -2 two -3 three -4 four -drop table t2 ; -set @arg00=1; -prepare stmt1 from 'update t1 set b=''bla'' -where a=2 -limit 1'; -execute stmt1 ; -select a,b from t1 where b = 'bla' ; -a b -2 bla -prepare stmt1 from 'update t1 set b=''bla'' where a=2 limit ?'; -execute stmt1 using @arg00; -test_sequence ------- insert tests ------ -delete from t1 ; -insert into t1 values (1,'one'); -insert into t1 values (2,'two'); -insert into t1 values (3,'three'); -insert into t1 values (4,'four'); -commit ; -delete from t9 ; -insert into t9 -set c1= 1, c2= 1, c3= 1, c4= 1, c5= 1, c6= 1, c7= 1, c8= 1, c9= 1, -c10= 1, c11= 1, c12 = 1, -c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11', -c16= '11:11:11', c17= '2004', -c18= 1, c19=true, c20= 'a', c21= '123456789a', -c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext', -c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext', -c29= 'longblob', c30= 'longtext', c31='one', c32= 'monday'; -insert into t9 -set c1= 9, c2= 9, c3= 9, c4= 9, c5= 9, c6= 9, c7= 9, c8= 9, c9= 9, -c10= 9, c11= 9, c12 = 9, -c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11', -c16= '11:11:11', c17= '2004', -c18= 1, c19=false, c20= 'a', c21= '123456789a', -c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext', -c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext', -c29= 'longblob', c30= 'longtext', c31='two', c32= 'tuesday'; -commit ; -prepare stmt1 from 'insert into t1 values(5, ''five'' )'; -execute stmt1; -select a,b from t1 where a = 5; -a b -5 five -set @arg00='six' ; -prepare stmt1 from 'insert into t1 values(6, ? )'; -execute stmt1 using @arg00; -select a,b from t1 where b = @arg00; -a b -6 six -execute stmt1 using @arg00; -ERROR 23000: Duplicate entry '6' for key 'PRIMARY' -set @arg00=NULL ; -prepare stmt1 from 'insert into t1 values(0, ? )'; -execute stmt1 using @arg00; -select a,b from t1 where b is NULL; -a b -0 NULL -set @arg00=8 ; -set @arg01='eight' ; -prepare stmt1 from 'insert into t1 values(?, ? )'; -execute stmt1 using @arg00, @arg01 ; -select a,b from t1 where b = @arg01; -a b -8 eight -set @NULL= null ; -set @arg00= 'abc' ; -execute stmt1 using @NULL, @NULL ; -ERROR 23000: Column 'a' cannot be null -execute stmt1 using @NULL, @NULL ; -ERROR 23000: Column 'a' cannot be null -execute stmt1 using @NULL, @arg00 ; -ERROR 23000: Column 'a' cannot be null -execute stmt1 using @NULL, @arg00 ; -ERROR 23000: Column 'a' cannot be null -set @arg01= 10000 + 2 ; -execute stmt1 using @arg01, @arg00 ; -set @arg01= 10000 + 1 ; -execute stmt1 using @arg01, @arg00 ; -select * from t1 where a > 10000 order by a ; -a b -10001 abc -10002 abc -delete from t1 where a > 10000 ; -set @arg01= 10000 + 2 ; -execute stmt1 using @arg01, @NULL ; -set @arg01= 10000 + 1 ; -execute stmt1 using @arg01, @NULL ; -select * from t1 where a > 10000 order by a ; -a b -10001 NULL -10002 NULL -delete from t1 where a > 10000 ; -set @arg01= 10000 + 10 ; -execute stmt1 using @arg01, @arg01 ; -set @arg01= 10000 + 9 ; -execute stmt1 using @arg01, @arg01 ; -set @arg01= 10000 + 8 ; -execute stmt1 using @arg01, @arg01 ; -set @arg01= 10000 + 7 ; -execute stmt1 using @arg01, @arg01 ; -set @arg01= 10000 + 6 ; -execute stmt1 using @arg01, @arg01 ; -set @arg01= 10000 + 5 ; -execute stmt1 using @arg01, @arg01 ; -set @arg01= 10000 + 4 ; -execute stmt1 using @arg01, @arg01 ; -set @arg01= 10000 + 3 ; -execute stmt1 using @arg01, @arg01 ; -set @arg01= 10000 + 2 ; -execute stmt1 using @arg01, @arg01 ; -set @arg01= 10000 + 1 ; -execute stmt1 using @arg01, @arg01 ; -select * from t1 where a > 10000 order by a ; -a b -10001 10001 -10002 10002 -10003 10003 -10004 10004 -10005 10005 -10006 10006 -10007 10007 -10008 10008 -10009 10009 -10010 10010 -delete from t1 where a > 10000 ; -set @arg00=81 ; -set @arg01='8-1' ; -set @arg02=82 ; -set @arg03='8-2' ; -prepare stmt1 from 'insert into t1 values(?,?),(?,?)'; -execute stmt1 using @arg00, @arg01, @arg02, @arg03 ; -select a,b from t1 where a in (@arg00,@arg02) ; -a b -81 8-1 -82 8-2 -set @arg00=9 ; -set @arg01='nine' ; -prepare stmt1 from 'insert into t1 set a=?, b=? '; -execute stmt1 using @arg00, @arg01 ; -select a,b from t1 where a = @arg00 ; -a b -9 nine -set @arg00=6 ; -set @arg01=1 ; -prepare stmt1 from 'insert into t1 set a=?, b=''sechs'' - on duplicate key update a=a + ?, b=concat(b,''modified'') '; -execute stmt1 using @arg00, @arg01; -select * from t1 order by a; -a b -0 NULL -1 one -2 two -3 three -4 four -5 five -7 sixmodified -8 eight -9 nine -81 8-1 -82 8-2 -set @arg00=81 ; -set @arg01=1 ; -execute stmt1 using @arg00, @arg01; -ERROR 23000: Duplicate entry '82' for key 'PRIMARY' -drop table if exists t2 ; -create table t2 (id int auto_increment primary key) -ENGINE= 'NDB' ; -prepare stmt1 from ' select last_insert_id() ' ; -insert into t2 values (NULL) ; -execute stmt1 ; -last_insert_id() -1 -insert into t2 values (NULL) ; -execute stmt1 ; -last_insert_id() -2 -drop table t2 ; -set @1000=1000 ; -set @x1000_2="x1000_2" ; -set @x1000_3="x1000_3" ; -set @x1000="x1000" ; -set @1100=1100 ; -set @x1100="x1100" ; -set @100=100 ; -set @updated="updated" ; -insert into t1 values(1000,'x1000_1') ; -insert into t1 values(@1000,@x1000_2),(@1000,@x1000_3) -on duplicate key update a = a + @100, b = concat(b,@updated) ; -select a,b from t1 where a >= 1000 order by a ; -a b -1000 x1000_3 -1100 x1000_1updated -delete from t1 where a >= 1000 ; -insert into t1 values(1000,'x1000_1') ; -prepare stmt1 from ' insert into t1 values(?,?),(?,?) - on duplicate key update a = a + ?, b = concat(b,?) '; -execute stmt1 using @1000, @x1000_2, @1000, @x1000_3, @100, @updated ; -select a,b from t1 where a >= 1000 order by a ; -a b -1000 x1000_3 -1100 x1000_1updated -delete from t1 where a >= 1000 ; -insert into t1 values(1000,'x1000_1') ; -execute stmt1 using @1000, @x1000_2, @1100, @x1000_3, @100, @updated ; -select a,b from t1 where a >= 1000 order by a ; -a b -1200 x1000_1updatedupdated -delete from t1 where a >= 1000 ; -prepare stmt1 from ' replace into t1 (a,b) select 100, ''hundred'' '; -execute stmt1; -execute stmt1; -execute stmt1; -test_sequence ------- multi table tests ------ -delete from t1 ; -delete from t9 ; -insert into t1(a,b) values (1, 'one'), (2, 'two'), (3, 'three') ; -insert into t9 (c1,c21) -values (1, 'one'), (2, 'two'), (3, 'three') ; -prepare stmt_delete from " delete t1, t9 - from t1, t9 where t1.a=t9.c1 and t1.b='updated' "; -prepare stmt_update from " update t1, t9 - set t1.b='updated', t9.c21='updated' - where t1.a=t9.c1 and t1.a=? "; -prepare stmt_select1 from " select a, b from t1 order by a" ; -prepare stmt_select2 from " select c1, c21 from t9 order by c1" ; -set @arg00= 1 ; -execute stmt_update using @arg00 ; -execute stmt_delete ; -execute stmt_select1 ; -a b -2 two -3 three -execute stmt_select2 ; -c1 c21 -2 two -3 three -set @arg00= @arg00 + 1 ; -execute stmt_update using @arg00 ; -execute stmt_delete ; -execute stmt_select1 ; -a b -3 three -execute stmt_select2 ; -c1 c21 -3 three -set @arg00= @arg00 + 1 ; -execute stmt_update using @arg00 ; -execute stmt_delete ; -execute stmt_select1 ; -a b -execute stmt_select2 ; -c1 c21 -set @arg00= @arg00 + 1 ; -delete from t1 ; -insert into t1 values (1,'one'); -insert into t1 values (2,'two'); -insert into t1 values (3,'three'); -insert into t1 values (4,'four'); -commit ; -delete from t9 ; -insert into t9 -set c1= 1, c2= 1, c3= 1, c4= 1, c5= 1, c6= 1, c7= 1, c8= 1, c9= 1, -c10= 1, c11= 1, c12 = 1, -c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11', -c16= '11:11:11', c17= '2004', -c18= 1, c19=true, c20= 'a', c21= '123456789a', -c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext', -c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext', -c29= 'longblob', c30= 'longtext', c31='one', c32= 'monday'; -insert into t9 -set c1= 9, c2= 9, c3= 9, c4= 9, c5= 9, c6= 9, c7= 9, c8= 9, c9= 9, -c10= 9, c11= 9, c12 = 9, -c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11', -c16= '11:11:11', c17= '2004', -c18= 1, c19=false, c20= 'a', c21= '123456789a', -c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext', -c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext', -c29= 'longblob', c30= 'longtext', c31='two', c32= 'tuesday'; -commit ; -insert into t1 values(0,NULL) ; -set @duplicate='duplicate ' ; -set @1000=1000 ; -set @5=5 ; -select a,b from t1 where a < 5 order by a ; -a b -0 NULL -1 one -2 two -3 three -4 four -insert into t1 select a + @1000, concat(@duplicate,b) from t1 -where a < @5 ; -affected rows: 5 -info: Records: 5 Duplicates: 0 Warnings: 0 -select a,b from t1 where a >= 1000 order by a ; -a b -1000 NULL -1001 duplicate one -1002 duplicate two -1003 duplicate three -1004 duplicate four -delete from t1 where a >= 1000 ; -prepare stmt1 from ' insert into t1 select a + ?, concat(?,b) from t1 -where a < ? ' ; -execute stmt1 using @1000, @duplicate, @5; -affected rows: 5 -info: Records: 5 Duplicates: 0 Warnings: 0 -select a,b from t1 where a >= 1000 order by a ; -a b -1000 NULL -1001 duplicate one -1002 duplicate two -1003 duplicate three -1004 duplicate four -delete from t1 where a >= 1000 ; -set @1=1 ; -set @2=2 ; -set @100=100 ; -set @float=1.00; -set @five='five' ; -drop table if exists t2; -create table t2 like t1 ; -insert into t2 (b,a) -select @duplicate, sum(first.a) from t1 first, t1 second -where first.a <> @5 and second.b = first.b -and second.b <> @five -group by second.b -having sum(second.a) > @2 -union -select b, a + @100 from t1 -where (a,b) in ( select sqrt(a+@1)+CAST(@float AS signed),b -from t1); -affected rows: 3 -info: Records: 3 Duplicates: 0 Warnings: 0 -select a,b from t2 order by a ; -a b -3 duplicate -4 duplicate -103 three -delete from t2 ; -prepare stmt1 from ' insert into t2 (b,a) -select ?, sum(first.a) - from t1 first, t1 second - where first.a <> ? and second.b = first.b and second.b <> ? - group by second.b - having sum(second.a) > ? -union -select b, a + ? from t1 - where (a,b) in ( select sqrt(a+?)+CAST(? AS signed),b - from t1 ) ' ; -execute stmt1 using @duplicate, @5, @five, @2, @100, @1, @float ; -affected rows: 3 -info: Records: 3 Duplicates: 0 Warnings: 0 -select a,b from t2 order by a ; -a b -3 duplicate -4 duplicate -103 three -drop table t2; -drop table if exists t5 ; -set @arg01= 8; -set @arg02= 8.0; -set @arg03= 80.00000000000e-1; -set @arg04= 'abc' ; -set @arg05= CAST('abc' as binary) ; -set @arg06= '1991-08-05' ; -set @arg07= CAST('1991-08-05' as date); -set @arg08= '1991-08-05 01:01:01' ; -set @arg09= CAST('1991-08-05 01:01:01' as datetime) ; -set @arg10= unix_timestamp('1991-01-01 01:01:01'); -set @arg11= YEAR('1991-01-01 01:01:01'); -set @arg12= 8 ; -set @arg12= NULL ; -set @arg13= 8.0 ; -set @arg13= NULL ; -set @arg14= 'abc'; -set @arg14= NULL ; -set @arg15= CAST('abc' as binary) ; -set @arg15= NULL ; -create table t5 as select -8 as const01, @arg01 as param01, -8.0 as const02, @arg02 as param02, -80.00000000000e-1 as const03, @arg03 as param03, -'abc' as const04, @arg04 as param04, -CAST('abc' as binary) as const05, @arg05 as param05, -'1991-08-05' as const06, @arg06 as param06, -CAST('1991-08-05' as date) as const07, @arg07 as param07, -'1991-08-05 01:01:01' as const08, @arg08 as param08, -CAST('1991-08-05 01:01:01' as datetime) as const09, @arg09 as param09, -unix_timestamp('1991-01-01 01:01:01') as const10, @arg10 as param10, -YEAR('1991-01-01 01:01:01') as const11, @arg11 as param11, -NULL as const12, @arg12 as param12, -@arg13 as param13, -@arg14 as param14, -@arg15 as param15; -show create table t5 ; -Table Create Table -t5 CREATE TABLE `t5` ( - `const01` int(1) NOT NULL DEFAULT '0', - `param01` bigint(20) DEFAULT NULL, - `const02` decimal(2,1) NOT NULL DEFAULT '0.0', - `param02` decimal(65,30) DEFAULT NULL, - `const03` double NOT NULL DEFAULT '0', - `param03` double DEFAULT NULL, - `const04` varchar(3) NOT NULL DEFAULT '', - `param04` longtext, - `const05` varbinary(3) NOT NULL DEFAULT '', - `param05` longblob, - `const06` varchar(10) NOT NULL DEFAULT '', - `param06` longtext, - `const07` date DEFAULT NULL, - `param07` longtext, - `const08` varchar(19) NOT NULL DEFAULT '', - `param08` longtext, - `const09` datetime DEFAULT NULL, - `param09` longtext, - `const10` int(10) NOT NULL DEFAULT '0', - `param10` bigint(20) DEFAULT NULL, - `const11` int(4) DEFAULT NULL, - `param11` bigint(20) DEFAULT NULL, - `const12` binary(0) DEFAULT NULL, - `param12` bigint(20) DEFAULT NULL, - `param13` decimal(65,30) DEFAULT NULL, - `param14` longtext, - `param15` longblob -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -select * from t5 ; -Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def test t5 t5 const01 const01 3 1 1 N 32769 0 63 -def test t5 t5 param01 param01 8 20 1 Y 32768 0 63 -def test t5 t5 const02 const02 246 4 3 N 32769 1 63 -def test t5 t5 param02 param02 246 67 32 Y 32768 30 63 -def test t5 t5 const03 const03 5 17 1 N 32769 31 63 -def test t5 t5 param03 param03 5 23 1 Y 32768 31 63 -def test t5 t5 const04 const04 253 3 3 N 1 0 8 -def test t5 t5 param04 param04 252 4294967295 3 Y 16 0 8 -def test t5 t5 const05 const05 253 3 3 N 129 0 63 -def test t5 t5 param05 param05 252 4294967295 3 Y 144 0 63 -def test t5 t5 const06 const06 253 10 10 N 1 0 8 -def test t5 t5 param06 param06 252 4294967295 10 Y 16 0 8 -def test t5 t5 const07 const07 10 10 10 Y 128 0 63 -def test t5 t5 param07 param07 252 4294967295 10 Y 16 0 8 -def test t5 t5 const08 const08 253 19 19 N 1 0 8 -def test t5 t5 param08 param08 252 4294967295 19 Y 16 0 8 -def test t5 t5 const09 const09 12 19 19 Y 128 0 63 -def test t5 t5 param09 param09 252 4294967295 19 Y 16 0 8 -def test t5 t5 const10 const10 3 10 9 N 32769 0 63 -def test t5 t5 param10 param10 8 20 9 Y 32768 0 63 -def test t5 t5 const11 const11 3 4 4 Y 32768 0 63 -def test t5 t5 param11 param11 8 20 4 Y 32768 0 63 -def test t5 t5 const12 const12 254 0 0 Y 128 0 63 -def test t5 t5 param12 param12 8 20 0 Y 32768 0 63 -def test t5 t5 param13 param13 246 67 0 Y 32768 30 63 -def test t5 t5 param14 param14 252 4294967295 0 Y 16 0 8 -def test t5 t5 param15 param15 252 4294967295 0 Y 144 0 63 -const01 8 -param01 8 -const02 8.0 -param02 8.000000000000000000000000000000 -const03 8 -param03 8 -const04 abc -param04 abc -const05 abc -param05 abc -const06 1991-08-05 -param06 1991-08-05 -const07 1991-08-05 -param07 1991-08-05 -const08 1991-08-05 01:01:01 -param08 1991-08-05 01:01:01 -const09 1991-08-05 01:01:01 -param09 1991-08-05 01:01:01 -const10 662680861 -param10 662680861 -const11 1991 -param11 1991 -const12 NULL -param12 NULL -param13 NULL -param14 NULL -param15 NULL -drop table t5 ; -test_sequence ------- data type conversion tests ------ -delete from t1 ; -insert into t1 values (1,'one'); -insert into t1 values (2,'two'); -insert into t1 values (3,'three'); -insert into t1 values (4,'four'); -commit ; -delete from t9 ; -insert into t9 -set c1= 1, c2= 1, c3= 1, c4= 1, c5= 1, c6= 1, c7= 1, c8= 1, c9= 1, -c10= 1, c11= 1, c12 = 1, -c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11', -c16= '11:11:11', c17= '2004', -c18= 1, c19=true, c20= 'a', c21= '123456789a', -c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext', -c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext', -c29= 'longblob', c30= 'longtext', c31='one', c32= 'monday'; -insert into t9 -set c1= 9, c2= 9, c3= 9, c4= 9, c5= 9, c6= 9, c7= 9, c8= 9, c9= 9, -c10= 9, c11= 9, c12 = 9, -c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11', -c16= '11:11:11', c17= '2004', -c18= 1, c19=false, c20= 'a', c21= '123456789a', -c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext', -c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext', -c29= 'longblob', c30= 'longtext', c31='two', c32= 'tuesday'; -commit ; -insert into t9 set c1= 0, c15= '1991-01-01 01:01:01' ; -select * from t9 order by c1 ; -c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13 c14 c15 c16 c17 c18 c19 c20 c21 c22 c23 c24 c25 c26 c27 c28 c29 c30 c31 c32 -0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday -9 9 9 9 9 9 9 9 9 9 9.0000 9.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 0 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext two tuesday -test_sequence ------- select @parameter:= column ------ -prepare full_info from "select @arg01, @arg02, @arg03, @arg04, - @arg05, @arg06, @arg07, @arg08, - @arg09, @arg10, @arg11, @arg12, - @arg13, @arg14, @arg15, @arg16, - @arg17, @arg18, @arg19, @arg20, - @arg21, @arg22, @arg23, @arg24, - @arg25, @arg26, @arg27, @arg28, - @arg29, @arg30, @arg31, @arg32" ; -select @arg01:= c1, @arg02:= c2, @arg03:= c3, @arg04:= c4, -@arg05:= c5, @arg06:= c6, @arg07:= c7, @arg08:= c8, -@arg09:= c9, @arg10:= c10, @arg11:= c11, @arg12:= c12, -@arg13:= c13, @arg14:= c14, @arg15:= c15, @arg16:= c16, -@arg17:= c17, @arg18:= c18, @arg19:= c19, @arg20:= c20, -@arg21:= c21, @arg22:= c22, @arg23:= c23, @arg24:= c24, -@arg25:= c25, @arg26:= c26, @arg27:= c27, @arg28:= c28, -@arg29:= c29, @arg30:= c30, @arg31:= c31, @arg32:= c32 -from t9 where c1= 1 ; -@arg01:= c1 @arg02:= c2 @arg03:= c3 @arg04:= c4 @arg05:= c5 @arg06:= c6 @arg07:= c7 @arg08:= c8 @arg09:= c9 @arg10:= c10 @arg11:= c11 @arg12:= c12 @arg13:= c13 @arg14:= c14 @arg15:= c15 @arg16:= c16 @arg17:= c17 @arg18:= c18 @arg19:= c19 @arg20:= c20 @arg21:= c21 @arg22:= c22 @arg23:= c23 @arg24:= c24 @arg25:= c25 @arg26:= c26 @arg27:= c27 @arg28:= c28 @arg29:= c29 @arg30:= c30 @arg31:= c31 @arg32:= c32 -1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday -execute full_info ; -Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 8 20 1 Y 32896 0 63 -def @arg02 8 20 1 Y 32896 0 63 -def @arg03 8 20 1 Y 32896 0 63 -def @arg04 8 20 1 Y 32896 0 63 -def @arg05 8 20 1 Y 32896 0 63 -def @arg06 8 20 1 Y 32896 0 63 -def @arg07 5 23 1 Y 32896 31 63 -def @arg08 5 23 1 Y 32896 31 63 -def @arg09 5 23 1 Y 32896 31 63 -def @arg10 5 23 1 Y 32896 31 63 -def @arg11 246 83 6 Y 32896 30 63 -def @arg12 246 83 6 Y 32896 30 63 -def @arg13 251 16777216 10 Y 0 31 8 -def @arg14 251 16777216 19 Y 0 31 8 -def @arg15 251 16777216 19 Y 0 31 8 -def @arg16 251 16777216 8 Y 0 31 8 -def @arg17 8 20 4 Y 32928 0 63 -def @arg18 8 20 1 Y 32896 0 63 -def @arg19 8 20 1 Y 32896 0 63 -def @arg20 251 16777216 1 Y 0 31 8 -def @arg21 251 16777216 10 Y 0 31 8 -def @arg22 251 16777216 30 Y 0 31 8 -def @arg23 251 16777216 8 Y 128 31 63 -def @arg24 251 16777216 8 Y 0 31 8 -def @arg25 251 16777216 4 Y 128 31 63 -def @arg26 251 16777216 4 Y 0 31 8 -def @arg27 251 16777216 10 Y 128 31 63 -def @arg28 251 16777216 10 Y 0 31 8 -def @arg29 251 16777216 8 Y 128 31 63 -def @arg30 251 16777216 8 Y 0 31 8 -def @arg31 251 16777216 3 Y 0 31 8 -def @arg32 251 16777216 6 Y 0 31 8 -@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday -select @arg01:= c1, @arg02:= c2, @arg03:= c3, @arg04:= c4, -@arg05:= c5, @arg06:= c6, @arg07:= c7, @arg08:= c8, -@arg09:= c9, @arg10:= c10, @arg11:= c11, @arg12:= c12, -@arg13:= c13, @arg14:= c14, @arg15:= c15, @arg16:= c16, -@arg17:= c17, @arg18:= c18, @arg19:= c19, @arg20:= c20, -@arg21:= c21, @arg22:= c22, @arg23:= c23, @arg24:= c24, -@arg25:= c25, @arg26:= c26, @arg27:= c27, @arg28:= c28, -@arg29:= c29, @arg30:= c30, @arg31:= c31, @arg32:= c32 -from t9 where c1= 0 ; -@arg01:= c1 @arg02:= c2 @arg03:= c3 @arg04:= c4 @arg05:= c5 @arg06:= c6 @arg07:= c7 @arg08:= c8 @arg09:= c9 @arg10:= c10 @arg11:= c11 @arg12:= c12 @arg13:= c13 @arg14:= c14 @arg15:= c15 @arg16:= c16 @arg17:= c17 @arg18:= c18 @arg19:= c19 @arg20:= c20 @arg21:= c21 @arg22:= c22 @arg23:= c23 @arg24:= c24 @arg25:= c25 @arg26:= c26 @arg27:= c27 @arg28:= c28 @arg29:= c29 @arg30:= c30 @arg31:= c31 @arg32:= c32 -0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -execute full_info ; -Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 8 20 1 Y 32896 0 63 -def @arg02 8 20 0 Y 32896 0 63 -def @arg03 8 20 0 Y 32896 0 63 -def @arg04 8 20 0 Y 32896 0 63 -def @arg05 8 20 0 Y 32896 0 63 -def @arg06 8 20 0 Y 32896 0 63 -def @arg07 5 23 0 Y 32896 31 63 -def @arg08 5 23 0 Y 32896 31 63 -def @arg09 5 23 0 Y 32896 31 63 -def @arg10 5 23 0 Y 32896 31 63 -def @arg11 246 83 0 Y 32896 30 63 -def @arg12 246 83 0 Y 32896 30 63 -def @arg13 251 16777216 0 Y 0 31 8 -def @arg14 251 16777216 0 Y 0 31 8 -def @arg15 251 16777216 19 Y 0 31 8 -def @arg16 251 16777216 0 Y 0 31 8 -def @arg17 8 20 0 Y 32928 0 63 -def @arg18 8 20 0 Y 32896 0 63 -def @arg19 8 20 0 Y 32896 0 63 -def @arg20 251 16777216 0 Y 0 31 8 -def @arg21 251 16777216 0 Y 0 31 8 -def @arg22 251 16777216 0 Y 0 31 8 -def @arg23 251 16777216 0 Y 128 31 63 -def @arg24 251 16777216 0 Y 0 31 8 -def @arg25 251 16777216 0 Y 128 31 63 -def @arg26 251 16777216 0 Y 0 31 8 -def @arg27 251 16777216 0 Y 128 31 63 -def @arg28 251 16777216 0 Y 0 31 8 -def @arg29 251 16777216 0 Y 128 31 63 -def @arg30 251 16777216 0 Y 0 31 8 -def @arg31 251 16777216 0 Y 0 31 8 -def @arg32 251 16777216 0 Y 0 31 8 -@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -prepare stmt1 from "select - @arg01:= c1, @arg02:= c2, @arg03:= c3, @arg04:= c4, - @arg05:= c5, @arg06:= c6, @arg07:= c7, @arg08:= c8, - @arg09:= c9, @arg10:= c10, @arg11:= c11, @arg12:= c12, - @arg13:= c13, @arg14:= c14, @arg15:= c15, @arg16:= c16, - @arg17:= c17, @arg18:= c18, @arg19:= c19, @arg20:= c20, - @arg21:= c21, @arg22:= c22, @arg23:= c23, @arg24:= c24, - @arg25:= c25, @arg26:= c26, @arg27:= c27, @arg28:= c28, - @arg29:= c29, @arg30:= c30, @arg31:= c31, @arg32:= c32 -from t9 where c1= ?" ; -set @my_key= 1 ; -execute stmt1 using @my_key ; -@arg01:= c1 @arg02:= c2 @arg03:= c3 @arg04:= c4 @arg05:= c5 @arg06:= c6 @arg07:= c7 @arg08:= c8 @arg09:= c9 @arg10:= c10 @arg11:= c11 @arg12:= c12 @arg13:= c13 @arg14:= c14 @arg15:= c15 @arg16:= c16 @arg17:= c17 @arg18:= c18 @arg19:= c19 @arg20:= c20 @arg21:= c21 @arg22:= c22 @arg23:= c23 @arg24:= c24 @arg25:= c25 @arg26:= c26 @arg27:= c27 @arg28:= c28 @arg29:= c29 @arg30:= c30 @arg31:= c31 @arg32:= c32 -1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday -execute full_info ; -Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 8 20 1 Y 32896 0 63 -def @arg02 8 20 1 Y 32896 0 63 -def @arg03 8 20 1 Y 32896 0 63 -def @arg04 8 20 1 Y 32896 0 63 -def @arg05 8 20 1 Y 32896 0 63 -def @arg06 8 20 1 Y 32896 0 63 -def @arg07 5 23 1 Y 32896 31 63 -def @arg08 5 23 1 Y 32896 31 63 -def @arg09 5 23 1 Y 32896 31 63 -def @arg10 5 23 1 Y 32896 31 63 -def @arg11 246 83 6 Y 32896 30 63 -def @arg12 246 83 6 Y 32896 30 63 -def @arg13 251 16777216 10 Y 0 31 8 -def @arg14 251 16777216 19 Y 0 31 8 -def @arg15 251 16777216 19 Y 0 31 8 -def @arg16 251 16777216 8 Y 0 31 8 -def @arg17 8 20 4 Y 32928 0 63 -def @arg18 8 20 1 Y 32896 0 63 -def @arg19 8 20 1 Y 32896 0 63 -def @arg20 251 16777216 1 Y 0 31 8 -def @arg21 251 16777216 10 Y 0 31 8 -def @arg22 251 16777216 30 Y 0 31 8 -def @arg23 251 16777216 8 Y 128 31 63 -def @arg24 251 16777216 8 Y 0 31 8 -def @arg25 251 16777216 4 Y 128 31 63 -def @arg26 251 16777216 4 Y 0 31 8 -def @arg27 251 16777216 10 Y 128 31 63 -def @arg28 251 16777216 10 Y 0 31 8 -def @arg29 251 16777216 8 Y 128 31 63 -def @arg30 251 16777216 8 Y 0 31 8 -def @arg31 251 16777216 3 Y 0 31 8 -def @arg32 251 16777216 6 Y 0 31 8 -@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday -set @my_key= 0 ; -execute stmt1 using @my_key ; -@arg01:= c1 @arg02:= c2 @arg03:= c3 @arg04:= c4 @arg05:= c5 @arg06:= c6 @arg07:= c7 @arg08:= c8 @arg09:= c9 @arg10:= c10 @arg11:= c11 @arg12:= c12 @arg13:= c13 @arg14:= c14 @arg15:= c15 @arg16:= c16 @arg17:= c17 @arg18:= c18 @arg19:= c19 @arg20:= c20 @arg21:= c21 @arg22:= c22 @arg23:= c23 @arg24:= c24 @arg25:= c25 @arg26:= c26 @arg27:= c27 @arg28:= c28 @arg29:= c29 @arg30:= c30 @arg31:= c31 @arg32:= c32 -0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -execute full_info ; -Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 8 20 1 Y 32896 0 63 -def @arg02 8 20 0 Y 32896 0 63 -def @arg03 8 20 0 Y 32896 0 63 -def @arg04 8 20 0 Y 32896 0 63 -def @arg05 8 20 0 Y 32896 0 63 -def @arg06 8 20 0 Y 32896 0 63 -def @arg07 5 23 0 Y 32896 31 63 -def @arg08 5 23 0 Y 32896 31 63 -def @arg09 5 23 0 Y 32896 31 63 -def @arg10 5 23 0 Y 32896 31 63 -def @arg11 246 83 0 Y 32896 30 63 -def @arg12 246 83 0 Y 32896 30 63 -def @arg13 251 16777216 0 Y 0 31 8 -def @arg14 251 16777216 0 Y 0 31 8 -def @arg15 251 16777216 19 Y 0 31 8 -def @arg16 251 16777216 0 Y 0 31 8 -def @arg17 8 20 0 Y 32928 0 63 -def @arg18 8 20 0 Y 32896 0 63 -def @arg19 8 20 0 Y 32896 0 63 -def @arg20 251 16777216 0 Y 0 31 8 -def @arg21 251 16777216 0 Y 0 31 8 -def @arg22 251 16777216 0 Y 0 31 8 -def @arg23 251 16777216 0 Y 128 31 63 -def @arg24 251 16777216 0 Y 0 31 8 -def @arg25 251 16777216 0 Y 128 31 63 -def @arg26 251 16777216 0 Y 0 31 8 -def @arg27 251 16777216 0 Y 128 31 63 -def @arg28 251 16777216 0 Y 0 31 8 -def @arg29 251 16777216 0 Y 128 31 63 -def @arg30 251 16777216 0 Y 0 31 8 -def @arg31 251 16777216 0 Y 0 31 8 -def @arg32 251 16777216 0 Y 0 31 8 -@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -prepare stmt1 from "select ? := c1 from t9 where c1= 1" ; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ':= c1 from t9 where c1= 1' at line 1 -test_sequence ------- select column, .. into @parm,.. ------ -select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, -c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, -c25, c26, c27, c28, c29, c30, c31, c32 -into @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, @arg07, @arg08, -@arg09, @arg10, @arg11, @arg12, @arg13, @arg14, @arg15, @arg16, -@arg17, @arg18, @arg19, @arg20, @arg21, @arg22, @arg23, @arg24, -@arg25, @arg26, @arg27, @arg28, @arg29, @arg30, @arg31, @arg32 -from t9 where c1= 1 ; -execute full_info ; -Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 8 20 1 Y 32896 0 63 -def @arg02 8 20 1 Y 32896 0 63 -def @arg03 8 20 1 Y 32896 0 63 -def @arg04 8 20 1 Y 32896 0 63 -def @arg05 8 20 1 Y 32896 0 63 -def @arg06 8 20 1 Y 32896 0 63 -def @arg07 5 23 1 Y 32896 31 63 -def @arg08 5 23 1 Y 32896 31 63 -def @arg09 5 23 1 Y 32896 31 63 -def @arg10 5 23 1 Y 32896 31 63 -def @arg11 246 83 6 Y 32896 30 63 -def @arg12 246 83 6 Y 32896 30 63 -def @arg13 251 16777216 10 Y 0 31 8 -def @arg14 251 16777216 19 Y 0 31 8 -def @arg15 251 16777216 19 Y 0 31 8 -def @arg16 251 16777216 8 Y 0 31 8 -def @arg17 8 20 4 Y 32928 0 63 -def @arg18 8 20 1 Y 32896 0 63 -def @arg19 8 20 1 Y 32896 0 63 -def @arg20 251 16777216 1 Y 0 31 8 -def @arg21 251 16777216 10 Y 0 31 8 -def @arg22 251 16777216 30 Y 0 31 8 -def @arg23 251 16777216 8 Y 128 31 63 -def @arg24 251 16777216 8 Y 0 31 8 -def @arg25 251 16777216 4 Y 128 31 63 -def @arg26 251 16777216 4 Y 0 31 8 -def @arg27 251 16777216 10 Y 128 31 63 -def @arg28 251 16777216 10 Y 0 31 8 -def @arg29 251 16777216 8 Y 128 31 63 -def @arg30 251 16777216 8 Y 0 31 8 -def @arg31 251 16777216 3 Y 0 31 8 -def @arg32 251 16777216 6 Y 0 31 8 -@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday -select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, -c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, -c25, c26, c27, c28, c29, c30, c31, c32 -into @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, @arg07, @arg08, -@arg09, @arg10, @arg11, @arg12, @arg13, @arg14, @arg15, @arg16, -@arg17, @arg18, @arg19, @arg20, @arg21, @arg22, @arg23, @arg24, -@arg25, @arg26, @arg27, @arg28, @arg29, @arg30, @arg31, @arg32 -from t9 where c1= 0 ; -execute full_info ; -Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 8 20 1 Y 32896 0 63 -def @arg02 8 20 0 Y 32896 0 63 -def @arg03 8 20 0 Y 32896 0 63 -def @arg04 8 20 0 Y 32896 0 63 -def @arg05 8 20 0 Y 32896 0 63 -def @arg06 8 20 0 Y 32896 0 63 -def @arg07 5 23 0 Y 32896 31 63 -def @arg08 5 23 0 Y 32896 31 63 -def @arg09 5 23 0 Y 32896 31 63 -def @arg10 5 23 0 Y 32896 31 63 -def @arg11 246 83 0 Y 32896 30 63 -def @arg12 246 83 0 Y 32896 30 63 -def @arg13 251 16777216 0 Y 0 31 8 -def @arg14 251 16777216 0 Y 0 31 8 -def @arg15 251 16777216 19 Y 0 31 8 -def @arg16 251 16777216 0 Y 0 31 8 -def @arg17 8 20 0 Y 32928 0 63 -def @arg18 8 20 0 Y 32896 0 63 -def @arg19 8 20 0 Y 32896 0 63 -def @arg20 251 16777216 0 Y 0 31 8 -def @arg21 251 16777216 0 Y 0 31 8 -def @arg22 251 16777216 0 Y 0 31 8 -def @arg23 251 16777216 0 Y 128 31 63 -def @arg24 251 16777216 0 Y 0 31 8 -def @arg25 251 16777216 0 Y 128 31 63 -def @arg26 251 16777216 0 Y 0 31 8 -def @arg27 251 16777216 0 Y 128 31 63 -def @arg28 251 16777216 0 Y 0 31 8 -def @arg29 251 16777216 0 Y 128 31 63 -def @arg30 251 16777216 0 Y 0 31 8 -def @arg31 251 16777216 0 Y 0 31 8 -def @arg32 251 16777216 0 Y 0 31 8 -@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -prepare stmt1 from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, - c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, - c25, c26, c27, c28, c29, c30, c31, c32 -into @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, @arg07, @arg08, - @arg09, @arg10, @arg11, @arg12, @arg13, @arg14, @arg15, @arg16, - @arg17, @arg18, @arg19, @arg20, @arg21, @arg22, @arg23, @arg24, - @arg25, @arg26, @arg27, @arg28, @arg29, @arg30, @arg31, @arg32 -from t9 where c1= ?" ; -set @my_key= 1 ; -execute stmt1 using @my_key ; -execute full_info ; -Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 8 20 1 Y 32896 0 63 -def @arg02 8 20 1 Y 32896 0 63 -def @arg03 8 20 1 Y 32896 0 63 -def @arg04 8 20 1 Y 32896 0 63 -def @arg05 8 20 1 Y 32896 0 63 -def @arg06 8 20 1 Y 32896 0 63 -def @arg07 5 23 1 Y 32896 31 63 -def @arg08 5 23 1 Y 32896 31 63 -def @arg09 5 23 1 Y 32896 31 63 -def @arg10 5 23 1 Y 32896 31 63 -def @arg11 246 83 6 Y 32896 30 63 -def @arg12 246 83 6 Y 32896 30 63 -def @arg13 251 16777216 10 Y 0 31 8 -def @arg14 251 16777216 19 Y 0 31 8 -def @arg15 251 16777216 19 Y 0 31 8 -def @arg16 251 16777216 8 Y 0 31 8 -def @arg17 8 20 4 Y 32928 0 63 -def @arg18 8 20 1 Y 32896 0 63 -def @arg19 8 20 1 Y 32896 0 63 -def @arg20 251 16777216 1 Y 0 31 8 -def @arg21 251 16777216 10 Y 0 31 8 -def @arg22 251 16777216 30 Y 0 31 8 -def @arg23 251 16777216 8 Y 128 31 63 -def @arg24 251 16777216 8 Y 0 31 8 -def @arg25 251 16777216 4 Y 128 31 63 -def @arg26 251 16777216 4 Y 0 31 8 -def @arg27 251 16777216 10 Y 128 31 63 -def @arg28 251 16777216 10 Y 0 31 8 -def @arg29 251 16777216 8 Y 128 31 63 -def @arg30 251 16777216 8 Y 0 31 8 -def @arg31 251 16777216 3 Y 0 31 8 -def @arg32 251 16777216 6 Y 0 31 8 -@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday -set @my_key= 0 ; -execute stmt1 using @my_key ; -execute full_info ; -Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 8 20 1 Y 32896 0 63 -def @arg02 8 20 0 Y 32896 0 63 -def @arg03 8 20 0 Y 32896 0 63 -def @arg04 8 20 0 Y 32896 0 63 -def @arg05 8 20 0 Y 32896 0 63 -def @arg06 8 20 0 Y 32896 0 63 -def @arg07 5 23 0 Y 32896 31 63 -def @arg08 5 23 0 Y 32896 31 63 -def @arg09 5 23 0 Y 32896 31 63 -def @arg10 5 23 0 Y 32896 31 63 -def @arg11 246 83 0 Y 32896 30 63 -def @arg12 246 83 0 Y 32896 30 63 -def @arg13 251 16777216 0 Y 0 31 8 -def @arg14 251 16777216 0 Y 0 31 8 -def @arg15 251 16777216 19 Y 0 31 8 -def @arg16 251 16777216 0 Y 0 31 8 -def @arg17 8 20 0 Y 32928 0 63 -def @arg18 8 20 0 Y 32896 0 63 -def @arg19 8 20 0 Y 32896 0 63 -def @arg20 251 16777216 0 Y 0 31 8 -def @arg21 251 16777216 0 Y 0 31 8 -def @arg22 251 16777216 0 Y 0 31 8 -def @arg23 251 16777216 0 Y 128 31 63 -def @arg24 251 16777216 0 Y 0 31 8 -def @arg25 251 16777216 0 Y 128 31 63 -def @arg26 251 16777216 0 Y 0 31 8 -def @arg27 251 16777216 0 Y 128 31 63 -def @arg28 251 16777216 0 Y 0 31 8 -def @arg29 251 16777216 0 Y 128 31 63 -def @arg30 251 16777216 0 Y 0 31 8 -def @arg31 251 16777216 0 Y 0 31 8 -def @arg32 251 16777216 0 Y 0 31 8 -@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -prepare stmt1 from "select c1 into ? from t9 where c1= 1" ; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '? from t9 where c1= 1' at line 1 -test_sequence --- insert into numeric columns -- -insert into t9 -( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values -( 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20 ) ; -set @arg00= 21 ; -insert into t9 -( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values -( @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00, @arg00 ) ; -prepare stmt1 from "insert into t9 - ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values - ( 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22 )" ; -execute stmt1 ; -set @arg00= 23; -prepare stmt2 from "insert into t9 - ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values - ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" ; -execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00 ; -insert into t9 -( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values -( 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, -30.0, 30.0, 30.0 ) ; -set @arg00= 31.0 ; -insert into t9 -( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values -( @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00, @arg00 ) ; -prepare stmt1 from "insert into t9 - ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values - ( 32.0, 32.0, 32.0, 32.0, 32.0, 32.0, 32.0, 32.0, - 32.0, 32.0, 32.0 )" ; -execute stmt1 ; -set @arg00= 33.0; -prepare stmt2 from "insert into t9 - ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values - ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" ; -execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00 ; -insert into t9 -( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values -( '40', '40', '40', '40', '40', '40', '40', '40', -'40', '40', '40' ) ; -set @arg00= '41' ; -insert into t9 -( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values -( @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00, @arg00 ) ; -prepare stmt1 from "insert into t9 - ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values - ( '42', '42', '42', '42', '42', '42', '42', '42', - '42', '42', '42' )" ; -execute stmt1 ; -set @arg00= '43'; -prepare stmt2 from "insert into t9 - ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values - ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" ; -execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00 ; -insert into t9 -( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values -( CAST('50' as binary), CAST('50' as binary), -CAST('50' as binary), CAST('50' as binary), CAST('50' as binary), -CAST('50' as binary), CAST('50' as binary), CAST('50' as binary), -CAST('50' as binary), CAST('50' as binary), CAST('50' as binary) ) ; -set @arg00= CAST('51' as binary) ; -insert into t9 -( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values -( @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00, @arg00 ) ; -prepare stmt1 from "insert into t9 - ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values - ( CAST('52' as binary), CAST('52' as binary), - CAST('52' as binary), CAST('52' as binary), CAST('52' as binary), - CAST('52' as binary), CAST('52' as binary), CAST('52' as binary), - CAST('52' as binary), CAST('52' as binary), CAST('52' as binary) )" ; -execute stmt1 ; -set @arg00= CAST('53' as binary) ; -prepare stmt2 from "insert into t9 - ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values - ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" ; -execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00 ; -set @arg00= 2 ; -set @arg00= NULL ; -insert into t9 -( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values -( 60, NULL, NULL, NULL, NULL, NULL, NULL, NULL, -NULL, NULL, NULL ) ; -insert into t9 -( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values -( 61, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00, @arg00 ) ; -prepare stmt1 from "insert into t9 - ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values - ( 62, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL )" ; -execute stmt1 ; -prepare stmt2 from "insert into t9 - ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values - ( 63, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" ; -execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00 ; -set @arg00= 8.0 ; -set @arg00= NULL ; -insert into t9 -( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values -( 71, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00, @arg00 ) ; -prepare stmt2 from "insert into t9 - ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values - ( 73, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" ; -execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00 ; -set @arg00= 'abc' ; -set @arg00= NULL ; -insert into t9 -( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values -( 81, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00, @arg00 ) ; -prepare stmt2 from "insert into t9 - ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values - ( 83, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" ; -execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00 ; -select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 -from t9 where c1 >= 20 -order by c1 ; -c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c12 -20 20 20 20 20 20 20 20 20 20 20.0000 -21 21 21 21 21 21 21 21 21 21 21.0000 -22 22 22 22 22 22 22 22 22 22 22.0000 -23 23 23 23 23 23 23 23 23 23 23.0000 -30 30 30 30 30 30 30 30 30 30 30.0000 -31 31 31 31 31 31 31 31 31 31 31.0000 -32 32 32 32 32 32 32 32 32 32 32.0000 -33 33 33 33 33 33 33 33 33 33 33.0000 -40 40 40 40 40 40 40 40 40 40 40.0000 -41 41 41 41 41 41 41 41 41 41 41.0000 -42 42 42 42 42 42 42 42 42 42 42.0000 -43 43 43 43 43 43 43 43 43 43 43.0000 -50 50 50 50 50 50 50 50 50 50 50.0000 -51 51 51 51 51 51 51 51 51 51 51.0000 -52 52 52 52 52 52 52 52 52 52 52.0000 -53 53 53 53 53 53 53 53 53 53 53.0000 -60 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -61 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -62 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -63 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -71 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -73 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -81 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -83 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -test_sequence --- select .. where numeric column = .. -- -set @arg00= 20; -select 'true' as found from t9 -where c1= 20 and c2= 20 and c3= 20 and c4= 20 and c5= 20 and c6= 20 and c7= 20 -and c8= 20 and c9= 20 and c10= 20 and c12= 20; -found -true -select 'true' as found from t9 -where c1= @arg00 and c2= @arg00 and c3= @arg00 and c4= @arg00 and c5= @arg00 -and c6= @arg00 and c7= @arg00 and c8= @arg00 and c9= @arg00 and c10= @arg00 -and c12= @arg00; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= 20 and c2= 20 and c3= 20 and c4= 20 and c5= 20 and c6= 20 and c7= 20 - and c8= 20 and c9= 20 and c10= 20 and c12= 20 "; -execute stmt1 ; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= ? and c2= ? and c3= ? and c4= ? and c5= ? - and c6= ? and c7= ? and c8= ? and c9= ? and c10= ? - and c12= ? "; -execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00 ; -found -true -set @arg00= 20.0; -select 'true' as found from t9 -where c1= 20.0 and c2= 20.0 and c3= 20.0 and c4= 20.0 and c5= 20.0 and c6= 20.0 -and c7= 20.0 and c8= 20.0 and c9= 20.0 and c10= 20.0 and c12= 20.0; -found -true -select 'true' as found from t9 -where c1= @arg00 and c2= @arg00 and c3= @arg00 and c4= @arg00 and c5= @arg00 -and c6= @arg00 and c7= @arg00 and c8= @arg00 and c9= @arg00 and c10= @arg00 -and c12= @arg00; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= 20.0 and c2= 20.0 and c3= 20.0 and c4= 20.0 and c5= 20.0 and c6= 20.0 - and c7= 20.0 and c8= 20.0 and c9= 20.0 and c10= 20.0 and c12= 20.0 "; -execute stmt1 ; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= ? and c2= ? and c3= ? and c4= ? and c5= ? - and c6= ? and c7= ? and c8= ? and c9= ? and c10= ? - and c12= ? "; -execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00 ; -found -true -select 'true' as found from t9 -where c1= '20' and c2= '20' and c3= '20' and c4= '20' and c5= '20' and c6= '20' - and c7= '20' and c8= '20' and c9= '20' and c10= '20' and c12= '20'; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= '20' and c2= '20' and c3= '20' and c4= '20' and c5= '20' and c6= '20' - and c7= '20' and c8= '20' and c9= '20' and c10= '20' and c12= '20' "; -execute stmt1 ; -found -true -set @arg00= '20'; -select 'true' as found from t9 -where c1= @arg00 and c2= @arg00 and c3= @arg00 and c4= @arg00 and c5= @arg00 -and c6= @arg00 and c7= @arg00 and c8= @arg00 and c9= @arg00 and c10= @arg00 -and c12= @arg00; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= ? and c2= ? and c3= ? and c4= ? and c5= ? - and c6= ? and c7= ? and c8= ? and c9= ? and c10= ? - and c12= ? "; -execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00 ; -found -true -select 'true' as found from t9 -where c1= CAST('20' as binary) and c2= CAST('20' as binary) and -c3= CAST('20' as binary) and c4= CAST('20' as binary) and -c5= CAST('20' as binary) and c6= CAST('20' as binary) and -c7= CAST('20' as binary) and c8= CAST('20' as binary) and -c9= CAST('20' as binary) and c10= CAST('20' as binary) and -c12= CAST('20' as binary); -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= CAST('20' as binary) and c2= CAST('20' as binary) and - c3= CAST('20' as binary) and c4= CAST('20' as binary) and - c5= CAST('20' as binary) and c6= CAST('20' as binary) and - c7= CAST('20' as binary) and c8= CAST('20' as binary) and - c9= CAST('20' as binary) and c10= CAST('20' as binary) and - c12= CAST('20' as binary) "; -execute stmt1 ; -found -true -set @arg00= CAST('20' as binary) ; -select 'true' as found from t9 -where c1= @arg00 and c2= @arg00 and c3= @arg00 and c4= @arg00 and c5= @arg00 -and c6= @arg00 and c7= @arg00 and c8= @arg00 and c9= @arg00 and c10= @arg00 -and c12= @arg00; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= ? and c2= ? and c3= ? and c4= ? and c5= ? - and c6= ? and c7= ? and c8= ? and c9= ? and c10= ? - and c12= ? "; -execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00 ; -found -true -delete from t9 ; -test_sequence --- some numeric overflow experiments -- -prepare my_insert from "insert into t9 - ( c21, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values - ( 'O', ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" ; -prepare my_select from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 -from t9 where c21 = 'O' "; -prepare my_delete from "delete from t9 where c21 = 'O' "; -set @arg00= 9223372036854775807 ; -execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00, @arg00 ; -Warnings: -Warning 1264 Out of range value for column 'c1' at row 1 -Warning 1264 Out of range value for column 'c2' at row 1 -Warning 1264 Out of range value for column 'c3' at row 1 -Warning 1264 Out of range value for column 'c4' at row 1 -Warning 1264 Out of range value for column 'c5' at row 1 -Warning 1264 Out of range value for column 'c12' at row 1 -execute my_select ; -c1 127 -c2 32767 -c3 8388607 -c4 2147483647 -c5 2147483647 -c6 9223372036854775807 -c7 9.22337e18 -c8 9.223372036854776e18 -c9 9.223372036854776e18 -c10 9.223372036854776e18 -c12 9999.9999 -execute my_delete ; -set @arg00= '9223372036854775807' ; -execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00, @arg00 ; -Warnings: -Warning 1264 Out of range value for column 'c1' at row 1 -Warning 1264 Out of range value for column 'c2' at row 1 -Warning 1264 Out of range value for column 'c3' at row 1 -Warning 1264 Out of range value for column 'c4' at row 1 -Warning 1264 Out of range value for column 'c5' at row 1 -Warning 1264 Out of range value for column 'c12' at row 1 -execute my_select ; -c1 127 -c2 32767 -c3 8388607 -c4 2147483647 -c5 2147483647 -c6 9223372036854775807 -c7 9.22337e18 -c8 9.223372036854776e18 -c9 9.223372036854776e18 -c10 9.223372036854776e18 -c12 9999.9999 -execute my_delete ; -set @arg00= -9223372036854775808 ; -execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00, @arg00 ; -Warnings: -Warning 1264 Out of range value for column 'c1' at row 1 -Warning 1264 Out of range value for column 'c2' at row 1 -Warning 1264 Out of range value for column 'c3' at row 1 -Warning 1264 Out of range value for column 'c4' at row 1 -Warning 1264 Out of range value for column 'c5' at row 1 -Warning 1264 Out of range value for column 'c12' at row 1 -execute my_select ; -c1 -128 -c2 -32768 -c3 -8388608 -c4 -2147483648 -c5 -2147483648 -c6 -9223372036854775808 -c7 -9.22337e18 -c8 -9.223372036854776e18 -c9 -9.223372036854776e18 -c10 -9.223372036854776e18 -c12 -9999.9999 -execute my_delete ; -set @arg00= '-9223372036854775808' ; -execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00, @arg00 ; -Warnings: -Warning 1264 Out of range value for column 'c1' at row 1 -Warning 1264 Out of range value for column 'c2' at row 1 -Warning 1264 Out of range value for column 'c3' at row 1 -Warning 1264 Out of range value for column 'c4' at row 1 -Warning 1264 Out of range value for column 'c5' at row 1 -Warning 1264 Out of range value for column 'c12' at row 1 -execute my_select ; -c1 -128 -c2 -32768 -c3 -8388608 -c4 -2147483648 -c5 -2147483648 -c6 -9223372036854775808 -c7 -9.22337e18 -c8 -9.223372036854776e18 -c9 -9.223372036854776e18 -c10 -9.223372036854776e18 -c12 -9999.9999 -execute my_delete ; -set @arg00= 1.11111111111111111111e+50 ; -execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00, @arg00 ; -Warnings: -Warning 1264 Out of range value for column 'c1' at row 1 -Warning 1264 Out of range value for column 'c2' at row 1 -Warning 1264 Out of range value for column 'c3' at row 1 -Warning 1264 Out of range value for column 'c4' at row 1 -Warning 1264 Out of range value for column 'c5' at row 1 -Warning 1264 Out of range value for column 'c6' at row 1 -Warning 1264 Out of range value for column 'c7' at row 1 -Warning 1264 Out of range value for column 'c12' at row 1 -execute my_select ; -c1 127 -c2 32767 -c3 8388607 -c4 2147483647 -c5 2147483647 -c6 9223372036854775807 -c7 3.40282e38 -c8 1.111111111111111e50 -c9 1.111111111111111e50 -c10 1.111111111111111e50 -c12 9999.9999 -execute my_delete ; -set @arg00= '1.11111111111111111111e+50' ; -execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00, @arg00 ; -Warnings: -Warning 1264 Out of range value for column 'c1' at row 1 -Warning 1264 Out of range value for column 'c2' at row 1 -Warning 1264 Out of range value for column 'c3' at row 1 -Warning 1264 Out of range value for column 'c4' at row 1 -Warning 1264 Out of range value for column 'c5' at row 1 -Warning 1264 Out of range value for column 'c6' at row 1 -Warning 1264 Out of range value for column 'c7' at row 1 -Warning 1264 Out of range value for column 'c12' at row 1 -execute my_select ; -c1 127 -c2 32767 -c3 8388607 -c4 2147483647 -c5 2147483647 -c6 9223372036854775807 -c7 3.40282e38 -c8 1.111111111111111e50 -c9 1.111111111111111e50 -c10 1.111111111111111e50 -c12 9999.9999 -execute my_delete ; -set @arg00= -1.11111111111111111111e+50 ; -execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00, @arg00 ; -Warnings: -Warning 1264 Out of range value for column 'c1' at row 1 -Warning 1264 Out of range value for column 'c2' at row 1 -Warning 1264 Out of range value for column 'c3' at row 1 -Warning 1264 Out of range value for column 'c4' at row 1 -Warning 1264 Out of range value for column 'c5' at row 1 -Warning 1264 Out of range value for column 'c6' at row 1 -Warning 1264 Out of range value for column 'c7' at row 1 -Warning 1264 Out of range value for column 'c12' at row 1 -execute my_select ; -c1 -128 -c2 -32768 -c3 -8388608 -c4 -2147483648 -c5 -2147483648 -c6 -9223372036854775808 -c7 -3.40282e38 -c8 -1.111111111111111e50 -c9 -1.111111111111111e50 -c10 -1.111111111111111e50 -c12 -9999.9999 -execute my_delete ; -set @arg00= '-1.11111111111111111111e+50' ; -execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00, @arg00 ; -Warnings: -Warning 1264 Out of range value for column 'c1' at row 1 -Warning 1264 Out of range value for column 'c2' at row 1 -Warning 1264 Out of range value for column 'c3' at row 1 -Warning 1264 Out of range value for column 'c4' at row 1 -Warning 1264 Out of range value for column 'c5' at row 1 -Warning 1264 Out of range value for column 'c6' at row 1 -Warning 1264 Out of range value for column 'c7' at row 1 -Warning 1264 Out of range value for column 'c12' at row 1 -execute my_select ; -c1 -128 -c2 -32768 -c3 -8388608 -c4 -2147483648 -c5 -2147483648 -c6 -9223372036854775808 -c7 -3.40282e38 -c8 -1.111111111111111e50 -c9 -1.111111111111111e50 -c10 -1.111111111111111e50 -c12 -9999.9999 -execute my_delete ; -test_sequence --- insert into string columns -- -Warnings: -Warning 1265 Data truncated for column 'c20' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c20' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c20' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c20' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c20' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c20' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c20' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c20' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c20' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c20' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c20' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c20' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c20' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c20' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c20' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c20' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c20' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c20' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c20' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c20' at row 1 -select c1, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30 -from t9 where c1 >= 20 -order by c1 ; -c1 c20 c21 c22 c23 c24 c25 c26 c27 c28 c29 c30 -20 2 20 20 20 20 20 20 20 20 20 20 -21 2 21 21 21 21 21 21 21 21 21 21 -22 2 22 22 22 22 22 22 22 22 22 22 -23 2 23 23 23 23 23 23 23 23 23 23 -30 3 30 30 30 30 30 30 30 30 30 30 -31 3 31 31 31 31 31 31 31 31 31 31 -32 3 32 32 32 32 32 32 32 32 32 32 -33 3 33 33 33 33 33 33 33 33 33 33 -40 4 40 40 40 40 40 40 40 40 40 40 -41 4 41 41 41 41 41 41 41 41 41 41 -42 4 42 42 42 42 42 42 42 42 42 42 -43 4 43 43 43 43 43 43 43 43 43 43 -50 5 50.0 50.0 50.0 50.0 50.0 50.0 50.0 50.0 50.0 50.0 -51 5 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0 -52 5 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 -53 5 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 -54 5 54 54 54 54 54 54 54 54 54 54 -55 6 55 55 55 55 55 55 55 55 55 55 -56 6 56 56 56 56 56 56 56 56 56 56 -57 6 57 57 57 57 57 57 57 57 57 57 -60 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -61 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -62 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -63 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -71 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -73 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -81 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -83 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -test_sequence --- select .. where string column = .. -- -set @arg00= '20'; -select 'true' as found from t9 -where c1= 20 and concat(c20,substr('20',1+length(c20)))= '20' and c21= '20' and -c22= '20' and c23= '20' and c24= '20' and c25= '20' and c26= '20' and -c27= '20' and c28= '20' and c29= '20' and c30= '20' ; -found -true -select 'true' as found from t9 -where c1= 20 and concat(c20,substr(@arg00,1+length(c20)))= @arg00 and -c21= @arg00 and c22= @arg00 and c23= @arg00 and c25= @arg00 and -c26= @arg00 and c27= @arg00 and c28= @arg00 and c29= @arg00 and c30= @arg00; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= 20 and concat(c20,substr('20',1+length(c20)))= '20' and c21= '20' and - c22= '20' and c23= '20' and c24= '20' and c25= '20' and c26= '20' and - c27= '20' and c28= '20' and c29= '20' and c30= '20'" ; -execute stmt1 ; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= 20 and concat(c20,substr(?,1+length(c20)))= ? and - c21= ? and c22= ? and c23= ? and c25= ? and - c26= ? and c27= ? and c28= ? and c29= ? and c30= ?" ; -execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00, @arg00 ; -found -true -set @arg00= CAST('20' as binary); -select 'true' as found from t9 -where c1= 20 and concat(c20,substr(CAST('20' as binary),1+length(c20))) -= CAST('20' as binary) and c21= CAST('20' as binary) -and c22= CAST('20' as binary) and c23= CAST('20' as binary) and -c24= CAST('20' as binary) and c25= CAST('20' as binary) and -c26= CAST('20' as binary) and c27= CAST('20' as binary) and -c28= CAST('20' as binary) and c29= CAST('20' as binary) and -c30= CAST('20' as binary) ; -found -true -select 'true' as found from t9 -where c1= 20 and concat(c20,substr(@arg00,1+length(c20))) = @arg00 and -c21= @arg00 and c22= @arg00 and c23= @arg00 and c25= @arg00 and -c26= @arg00 and c27= @arg00 and c28= @arg00 and c29= @arg00 and -c30= @arg00; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= 20 and concat(c20,substr(CAST('20' as binary),1+length(c20))) - = CAST('20' as binary) and c21= CAST('20' as binary) - and c22= CAST('20' as binary) and c23= CAST('20' as binary) and - c24= CAST('20' as binary) and c25= CAST('20' as binary) and - c26= CAST('20' as binary) and c27= CAST('20' as binary) and - c28= CAST('20' as binary) and c29= CAST('20' as binary) and - c30= CAST('20' as binary)" ; -execute stmt1 ; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= 20 and concat(c20,substr(?,1+length(c20))) = ? and c21= ? and - c22= ? and c23= ? and c25= ? and c26= ? and c27= ? and c28= ? and - c29= ? and c30= ?"; -execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00, @arg00 ; -found -true -set @arg00= 20; -select 'true' as found from t9 -where c1= 20 and concat(c20,substr(20,1+length(c20)))= 20 and c21= 20 and -c22= 20 and c23= 20 and c24= 20 and c25= 20 and c26= 20 and -c27= 20 and c28= 20 and c29= 20 and c30= 20 ; -found -true -select 'true' as found from t9 -where c1= 20 and concat(c20,substr(@arg00,1+length(c20)))= @arg00 and -c21= @arg00 and c22= @arg00 and c23= @arg00 and c25= @arg00 and -c26= @arg00 and c27= @arg00 and c28= @arg00 and c29= @arg00 and c30= @arg00; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= 20 and concat(c20,substr(20,1+length(c20)))= 20 and c21= 20 and - c22= 20 and c23= 20 and c24= 20 and c25= 20 and c26= 20 and - c27= 20 and c28= 20 and c29= 20 and c30= 20" ; -execute stmt1 ; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= 20 and concat(c20,substr(?,1+length(c20)))= ? and - c21= ? and c22= ? and c23= ? and c25= ? and - c26= ? and c27= ? and c28= ? and c29= ? and c30= ?" ; -execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00, @arg00 ; -found -true -set @arg00= 20.0; -select 'true' as found from t9 -where c1= 20 and concat(c20,substr(20.0,1+length(c20)))= 20.0 and c21= 20.0 and -c22= 20.0 and c23= 20.0 and c24= 20.0 and c25= 20.0 and c26= 20.0 and -c27= 20.0 and c28= 20.0 and c29= 20.0 and c30= 20.0 ; -found -true -select 'true' as found from t9 -where c1= 20 and concat(c20,substr(@arg00,1+length(c20)))= @arg00 and -c21= @arg00 and c22= @arg00 and c23= @arg00 and c25= @arg00 and -c26= @arg00 and c27= @arg00 and c28= @arg00 and c29= @arg00 and c30= @arg00; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= 20 and concat(c20,substr(20.0,1+length(c20)))= 20.0 and c21= 20.0 and - c22= 20.0 and c23= 20.0 and c24= 20.0 and c25= 20.0 and c26= 20.0 and - c27= 20.0 and c28= 20.0 and c29= 20.0 and c30= 20.0" ; -execute stmt1 ; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= 20 and concat(c20,substr(?,1+length(c20)))= ? and - c21= ? and c22= ? and c23= ? and c25= ? and - c26= ? and c27= ? and c28= ? and c29= ? and c30= ?" ; -execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00, @arg00 ; -found -true -delete from t9 ; -test_sequence --- insert into date/time columns -- -Warnings: -Note 1265 Data truncated for column 'c13' at row 1 -Warning 1265 Data truncated for column 'c17' at row 1 -Warnings: -Note 1265 Data truncated for column 'c13' at row 1 -Warning 1265 Data truncated for column 'c17' at row 1 -Warnings: -Note 1265 Data truncated for column 'c13' at row 1 -Warning 1265 Data truncated for column 'c17' at row 1 -Warnings: -Note 1265 Data truncated for column 'c13' at row 1 -Warning 1265 Data truncated for column 'c17' at row 1 -Warnings: -Note 1265 Data truncated for column 'c13' at row 1 -Warning 1265 Data truncated for column 'c17' at row 1 -Warnings: -Note 1265 Data truncated for column 'c13' at row 1 -Warning 1265 Data truncated for column 'c17' at row 1 -Warnings: -Note 1265 Data truncated for column 'c13' at row 1 -Warning 1265 Data truncated for column 'c17' at row 1 -Warnings: -Note 1265 Data truncated for column 'c13' at row 1 -Warning 1265 Data truncated for column 'c17' at row 1 -Warnings: -Warning 1264 Out of range value for column 'c13' at row 1 -Warning 1264 Out of range value for column 'c14' at row 1 -Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Out of range value for column 'c16' at row 1 -Warning 1264 Out of range value for column 'c17' at row 1 -Warnings: -Warning 1264 Out of range value for column 'c13' at row 1 -Warning 1264 Out of range value for column 'c14' at row 1 -Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Out of range value for column 'c16' at row 1 -Warning 1264 Out of range value for column 'c17' at row 1 -Warnings: -Warning 1264 Out of range value for column 'c13' at row 1 -Warning 1264 Out of range value for column 'c14' at row 1 -Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Out of range value for column 'c16' at row 1 -Warning 1264 Out of range value for column 'c17' at row 1 -Warnings: -Warning 1264 Out of range value for column 'c13' at row 1 -Warning 1264 Out of range value for column 'c14' at row 1 -Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Out of range value for column 'c16' at row 1 -Warning 1264 Out of range value for column 'c17' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Out of range value for column 'c16' at row 1 -Warning 1264 Out of range value for column 'c17' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Out of range value for column 'c16' at row 1 -Warning 1264 Out of range value for column 'c17' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Out of range value for column 'c16' at row 1 -Warning 1264 Out of range value for column 'c17' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Out of range value for column 'c16' at row 1 -Warning 1264 Out of range value for column 'c17' at row 1 -select c1, c13, c14, c15, c16, c17 from t9 order by c1 ; -c1 c13 c14 c15 c16 c17 -20 1991-01-01 1991-01-01 01:01:01 1991-01-01 01:01:01 01:01:01 1991 -21 1991-01-01 1991-01-01 01:01:01 1991-01-01 01:01:01 01:01:01 1991 -22 1991-01-01 1991-01-01 01:01:01 1991-01-01 01:01:01 01:01:01 1991 -23 1991-01-01 1991-01-01 01:01:01 1991-01-01 01:01:01 01:01:01 1991 -30 1991-01-01 1991-01-01 01:01:01 1991-01-01 01:01:01 01:01:01 1991 -31 1991-01-01 1991-01-01 01:01:01 1991-01-01 01:01:01 01:01:01 1991 -32 1991-01-01 1991-01-01 01:01:01 1991-01-01 01:01:01 01:01:01 1991 -33 1991-01-01 1991-01-01 01:01:01 1991-01-01 01:01:01 01:01:01 1991 -40 0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 -41 0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 -42 0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 -43 0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 -50 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 -51 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 -52 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 -53 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 -60 NULL NULL 1991-01-01 01:01:01 NULL NULL -61 NULL NULL 1991-01-01 01:01:01 NULL NULL -62 NULL NULL 1991-01-01 01:01:01 NULL NULL -63 NULL NULL 1991-01-01 01:01:01 NULL NULL -71 NULL NULL 1991-01-01 01:01:01 NULL NULL -73 NULL NULL 1991-01-01 01:01:01 NULL NULL -81 NULL NULL 1991-01-01 01:01:01 NULL NULL -83 NULL NULL 1991-01-01 01:01:01 NULL NULL -test_sequence --- select .. where date/time column = .. -- -set @arg00= '1991-01-01 01:01:01' ; -select 'true' as found from t9 -where c1= 20 and c13= CAST('1991-01-01 01:01:01' AS DATE) and c14= '1991-01-01 01:01:01' and -c15= '1991-01-01 01:01:01' and c16= '1991-01-01 01:01:01' and -c17= '1991-01-01 01:01:01' ; -found -true -select 'true' as found from t9 -where c1= 20 and c13= CAST(@arg00 AS DATE) and c14= @arg00 and c15= @arg00 and c16= @arg00 -and c17= @arg00 ; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= 20 and c13= CAST('1991-01-01 01:01:01' AS DATE) and c14= '1991-01-01 01:01:01' and - c15= '1991-01-01 01:01:01' and c16= '1991-01-01 01:01:01' and - c17= '1991-01-01 01:01:01'" ; -execute stmt1 ; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= 20 and c13= CAST(? AS DATE) and c14= ? and c15= ? and c16= ? and c17= ?" ; -execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00 ; -found -true -set @arg00= CAST('1991-01-01 01:01:01' as datetime) ; -select 'true' as found from t9 -where c1= 20 and c13= CAST('1991-01-01 00:00:00' as datetime) and -c14= CAST('1991-01-01 01:01:01' as datetime) and -c15= CAST('1991-01-01 01:01:01' as datetime) and -c16= CAST('1991-01-01 01:01:01' as datetime) and -c17= CAST('1991-01-01 01:01:01' as datetime) ; -found -true -select 'true' as found from t9 -where c1= 20 and c13= CAST(@arg00 AS DATE) and c14= @arg00 and c15= @arg00 and c16= @arg00 -and c17= @arg00 ; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= 20 and c13= CAST('1991-01-01 00:00:00' as datetime) and - c14= CAST('1991-01-01 01:01:01' as datetime) and - c15= CAST('1991-01-01 01:01:01' as datetime) and - c16= CAST('1991-01-01 01:01:01' as datetime) and - c17= CAST('1991-01-01 01:01:01' as datetime)" ; -execute stmt1 ; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= 20 and c13= CAST(? AS DATE) and c14= ? and c15= ? and c16= ? and c17= ?" ; -execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00 ; -found -true -set @arg00= 1991 ; -select 'true' as found from t9 -where c1= 20 and c17= 1991 ; -found -true -select 'true' as found from t9 -where c1= 20 and c17= @arg00 ; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= 20 and c17= 1991" ; -execute stmt1 ; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= 20 and c17= ?" ; -execute stmt1 using @arg00 ; -found -true -set @arg00= 1.991e+3 ; -select 'true' as found from t9 -where c1= 20 and abs(c17 - 1.991e+3) < 0.01 ; -found -true -select 'true' as found from t9 -where c1= 20 and abs(c17 - @arg00) < 0.01 ; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= 20 and abs(c17 - 1.991e+3) < 0.01" ; -execute stmt1 ; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= 20 and abs(c17 - ?) < 0.01" ; -execute stmt1 using @arg00 ; -found -true -drop table t1, t9; diff --git a/mysql-test/suite/ndb/r/strict_autoinc_5ndb.result b/mysql-test/suite/ndb/r/strict_autoinc_5ndb.result deleted file mode 100644 index ea6e5ffc741..00000000000 --- a/mysql-test/suite/ndb/r/strict_autoinc_5ndb.result +++ /dev/null @@ -1,28 +0,0 @@ -drop table if exists t1; -set @org_mode=@@sql_mode; -create table t1 -( -`a` tinyint(4) NOT NULL auto_increment, -primary key (`a`) -) engine = 'NDB' ; -set @@sql_mode='strict_all_tables'; -insert into t1 values(1000); -ERROR 22003: Out of range value for column 'a' at row 1 -select count(*) from t1; -count(*) -0 -set auto_increment_increment=1000; -set auto_increment_offset=700; -insert into t1 values(null); -ERROR 22003: Out of range value for column 'a' at row 1 -select count(*) from t1; -count(*) -0 -set @@sql_mode=@org_mode; -insert into t1 values(null); -Warnings: -Warning 1264 Out of range value for column 'a' at row 1 -select * from t1; -a -127 -drop table t1; diff --git a/mysql-test/suite/ndb/t/disabled.def b/mysql-test/suite/ndb/t/disabled.def deleted file mode 100644 index c3c046e7ece..00000000000 --- a/mysql-test/suite/ndb/t/disabled.def +++ /dev/null @@ -1,18 +0,0 @@ -############################################################################## -# -# List the test cases that are to be disabled temporarily. -# -# Separate the test case name and the comment with ':'. -# -# : BUG# -# -# Do not use any TAB characters for whitespace. -# -############################################################################## - -ndb_binlog_discover : Bug#54851 2010-07-02 alik ndb.ndb_binlog_discover crashes the server -ndb_partition_error2 : Bug#40989 ndb_partition_error2 needs maintenance - - -# the below testcase have been reworked to avoid the bug, test contains comment, keep bug open -ndb_alter_table3 : Bug#45621 2009-06-10 alik A few test files are disabled due to WL#4284 diff --git a/mysql-test/suite/ndb/t/loaddata_autocom_ndb.test b/mysql-test/suite/ndb/t/loaddata_autocom_ndb.test deleted file mode 100644 index f4a6743aabe..00000000000 --- a/mysql-test/suite/ndb/t/loaddata_autocom_ndb.test +++ /dev/null @@ -1,4 +0,0 @@ ---source include/have_ndb.inc -let $engine_type=ndbcluster; - ---source include/loaddata_autocom.inc diff --git a/mysql-test/suite/ndb/t/ndb_alter_table.test b/mysql-test/suite/ndb/t/ndb_alter_table.test deleted file mode 100644 index bf0f8a540bb..00000000000 --- a/mysql-test/suite/ndb/t/ndb_alter_table.test +++ /dev/null @@ -1,458 +0,0 @@ --- source include/have_multi_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1, t2; -drop database if exists mysqltest; ---enable_warnings - -connect (con1,localhost,root,,test); -connect (con2,localhost,root,,test); - -connection con2; --- sleep 2 -connection con1; - -# -# Basic test to show that the ALTER TABLE -# is working -# -CREATE TABLE t1 ( - a INT NOT NULL, - b INT NOT NULL -) ENGINE=ndbcluster; - -INSERT INTO t1 VALUES (9410,9412); - -ALTER TABLE t1 ADD COLUMN c int not null; -SELECT * FROM t1; - -DROP TABLE t1; - -# -# Verfify changing table names between databases -# -CREATE DATABASE mysqltest; -USE mysqltest; -CREATE TABLE t1 ( - a INT NOT NULL, - b INT NOT NULL -) ENGINE=ndbcluster; -RENAME TABLE t1 TO test.t1; -SHOW TABLES; -DROP DATABASE mysqltest; -USE test; -SHOW TABLES; -DROP TABLE t1; - -# -# More advanced test -# -create table t1 ( -col1 int not null auto_increment primary key, -col2 varchar(30) not null, -col3 varchar (20) not null, -col4 varchar(4) not null, -col5 enum('PENDING', 'ACTIVE', 'DISABLED') not null, -col6 int not null, to_be_deleted int) ENGINE=ndbcluster; ---replace_column 6 # 7 # 8 # 10 # 12 # 13 # 14 # 18 # -show table status; -SET SQL_MODE=NO_AUTO_VALUE_ON_ZERO; -insert into t1 values -(0,4,3,5,"PENDING",1,7),(NULL,4,3,5,"PENDING",1,7),(31,4,3,5,"PENDING",1,7), (7,4,3,5,"PENDING",1,7), (NULL,4,3,5,"PENDING",1,7), (100,4,3,5,"PENDING",1,7), (99,4,3,5,"PENDING",1,7), (8,4,3,5,"PENDING",1,7), (NULL,4,3,5,"PENDING",1,7); ---replace_column 6 # 7 # 8 # 10 # 12 # 13 # 14 # 18 # -show table status; -select * from t1 order by col1; -alter table t1 -add column col4_5 varchar(20) not null after col4, -add column col7 varchar(30) not null after col5, -add column col8 datetime not null, drop column to_be_deleted, -change column col2 fourth varchar(30) not null after col3, -modify column col6 int not null first; ---replace_column 6 # 7 # 8 # 10 # 12 # 13 # 14 # 18 # -show table status; -select * from t1 order by col1; -insert into t1 values (2, NULL,4,3,5,99,"PENDING","EXTRA",'2004-01-01 00:00:00'); ---replace_column 6 # 7 # 8 # 10 # 12 # 13 # 14 # 18 # -show table status; -select * from t1 order by col1; -delete from t1; -insert into t1 values (0,0,4,3,5,99,"PENDING","EXTRA",'2004-01-01 00:00:00'); -SET SQL_MODE=''; -insert into t1 values (1,0,4,3,5,99,"PENDING","EXTRA",'2004-01-01 00:00:00'); -select * from t1 order by col1; -alter table t1 drop column col4_5; -insert into t1 values (2,0,4,3,5,"PENDING","EXTRA",'2004-01-01 00:00:00'); -select * from t1 order by col1; -drop table t1; - - -# -# Check that invalidating dictionary cache works -# - -CREATE TABLE t1 ( - a INT NOT NULL, - b INT NOT NULL -) ENGINE=ndbcluster; - -INSERT INTO t1 VALUES (9410,9412); - -ALTER TABLE t1 ADD COLUMN c int not null; -select * from t1 order by a; - -connection con2; -select * from t1 order by a; -alter table t1 drop c; - -connection con1; -select * from t1 order by a; -drop table t1; - -connection con2; ---error 1146 -select * from t1 order by a; - -CREATE TABLE t1 ( - a INT NOT NULL PRIMARY KEY, - b INT NOT NULL -) ENGINE=ndbcluster; - -INSERT INTO t1 VALUES (0,1),(17,18); -select * from t1 order by a; -SET SQL_MODE=NO_AUTO_VALUE_ON_ZERO; -alter table t1 modify column a int not null auto_increment; -SET SQL_MODE=''; -select * from t1 order by a; -INSERT INTO t1 VALUES (0,19),(20,21); -select * from t1 order by a; -drop table t1; - -CREATE TABLE t1 ( - a INT NOT NULL PRIMARY KEY, - b INT NOT NULL -) ENGINE=ndbcluster; - -INSERT INTO t1 VALUES (0,1),(17,18); -select * from t1 order by a; -alter table t1 add c int not null unique auto_increment; -select c from t1 order by c; -INSERT INTO t1 VALUES (1,2,0),(18,19,4),(20,21,0); -select c from t1 order by c; -drop table t1; - -## Test moved to ndb_alter_table_row|stmt respectively as behaviour differs -#create table t1 ( a int primary key, b varchar(10), c varchar(10), index (b) ) -#engine=ndb; -#insert into t1 values (1,'one','one'), (2,'two','two'), (3,'three','three'); -#create index c on t1(c); -#connection server2; -#select * from t1 where c = 'two'; -#connection server1; -#alter table t1 drop index c; -#connection server2; -#select * from t1 where c = 'two'; -#connection server1; -#drop table t1; - -#--disable_warnings -#DROP TABLE IF EXISTS t2; -#--enable_warnings - -#create table t2 (a int NOT NULL PRIMARY KEY) engine=myisam; -#let $1=12001; -#disable_query_log; -#while ($1) -#{ -# eval insert into t2 values($1); -# dec $1; -#} -#enable_query_log; -#alter table t2 engine=ndbcluster; -#alter table t2 add c int; -#--error 1297 -#delete from t2; -#to make sure we do a full table scan -#select count(*) from t2 where a+0 > 0; -#truncate table t2; -#select count(*) from t2; -#drop table t2; - -## Test moved to ndb_alter_table_row|stmt respectively as behaviour differs -#connection server1; -#create table t3 (a int primary key) engine=ndbcluster; - -#connection server2; -#begin; -#insert into t3 values (1); - -#connection server1; -#alter table t3 rename t4; - -#connection server2; -## with rbr the below will not work as the "alter" event -## explicitly invalidates the dictionary cache. -### This should work as transaction is ongoing... -##delete from t3; -##insert into t3 values (1); -#commit; - -## This should fail as its a new transaction -#--error 1146 -#select * from t3; -#select * from t4; -#drop table t4; -#show tables; -#connection server1; - -create table t1 ( -ai bigint auto_increment, -c001 int(11) not null, -c002 int(11) not null, -c003 int(11) not null, -c004 int(11) not null, -c005 int(11) not null, -c006 int(11) not null, -c007 int(11) not null, -c008 int(11) not null, -c009 int(11) not null, -c010 int(11) not null, -c011 int(11) not null, -c012 int(11) not null, -c013 int(11) not null, -c014 int(11) not null, -c015 int(11) not null, -c016 int(11) not null, -c017 int(11) not null, -c018 int(11) not null, -c019 int(11) not null, -c020 int(11) not null, -c021 int(11) not null, -c022 int(11) not null, -c023 int(11) not null, -c024 int(11) not null, -c025 int(11) not null, -c026 int(11) not null, -c027 int(11) not null, -c028 int(11) not null, -c029 int(11) not null, -c030 int(11) not null, -c031 int(11) not null, -c032 int(11) not null, -c033 int(11) not null, -c034 int(11) not null, -c035 int(11) not null, -c036 int(11) not null, -c037 int(11) not null, -c038 int(11) not null, -c039 int(11) not null, -c040 int(11) not null, -c041 int(11) not null, -c042 int(11) not null, -c043 int(11) not null, -c044 int(11) not null, -c045 int(11) not null, -c046 int(11) not null, -c047 int(11) not null, -c048 int(11) not null, -c049 int(11) not null, -c050 int(11) not null, -c051 int(11) not null, -c052 int(11) not null, -c053 int(11) not null, -c054 int(11) not null, -c055 int(11) not null, -c056 int(11) not null, -c057 int(11) not null, -c058 int(11) not null, -c059 int(11) not null, -c060 int(11) not null, -c061 int(11) not null, -c062 int(11) not null, -c063 int(11) not null, -c064 int(11) not null, -c065 int(11) not null, -c066 int(11) not null, -c067 int(11) not null, -c068 int(11) not null, -c069 int(11) not null, -c070 int(11) not null, -c071 int(11) not null, -c072 int(11) not null, -c073 int(11) not null, -c074 int(11) not null, -c075 int(11) not null, -c076 int(11) not null, -c077 int(11) not null, -c078 int(11) not null, -c079 int(11) not null, -c080 int(11) not null, -c081 int(11) not null, -c082 int(11) not null, -c083 int(11) not null, -c084 int(11) not null, -c085 int(11) not null, -c086 int(11) not null, -c087 int(11) not null, -c088 int(11) not null, -c089 int(11) not null, -c090 int(11) not null, -c091 int(11) not null, -c092 int(11) not null, -c093 int(11) not null, -c094 int(11) not null, -c095 int(11) not null, -c096 int(11) not null, -c097 int(11) not null, -c098 int(11) not null, -c099 int(11) not null, -c100 int(11) not null, -c101 int(11) not null, -c102 int(11) not null, -c103 int(11) not null, -c104 int(11) not null, -c105 int(11) not null, -c106 int(11) not null, -c107 int(11) not null, -c108 int(11) not null, -c109 int(11) not null, -primary key (ai), -unique key tx1 (c002, c003, c004, c005)) engine=ndb; - -create index tx2 -on t1 (c010, c011, c012, c013); - -drop table t1; - -# End of 4.1 tests - -# On-line alter table - - -CREATE TABLE t1 ( - auto int(5) unsigned NOT NULL auto_increment, - string char(10), - vstring varchar(10), - bin binary(2), - vbin varbinary(7), - tiny tinyint(4) DEFAULT '0' NOT NULL , - short smallint(6) DEFAULT '1' NOT NULL , - medium mediumint(8) DEFAULT '0' NOT NULL, - long_int int(11) DEFAULT '0' NOT NULL, - longlong bigint(13) DEFAULT '0' NOT NULL, - real_float float(13,1) DEFAULT 0.0 NOT NULL, - real_double double(16,4), - real_decimal decimal(16,4), - utiny tinyint(3) unsigned DEFAULT '0' NOT NULL, - ushort smallint(5) unsigned zerofill DEFAULT '00000' NOT NULL, - umedium mediumint(8) unsigned DEFAULT '0' NOT NULL, - ulong int(11) unsigned DEFAULT '0' NOT NULL, - ulonglong bigint(13) unsigned DEFAULT '0' NOT NULL, - bits bit(3), - options enum('zero','one','two','three','four') not null, - flags set('zero','one','two','three','four') not null, - date_field date, - year_field year, - time_field time, - date_time datetime, - time_stamp timestamp, - PRIMARY KEY (auto) -) engine=ndb; - -CREATE TEMPORARY TABLE ndb_show_tables (id INT, type VARCHAR(20), state VARCHAR(20), logging VARCHAR(20), _database VARCHAR(255), _schema VARCHAR(20), name VARCHAR(255)); - ---disable_warnings -let $MYSQLD_DATADIR= `select @@datadir`; ---exec $NDB_TOOLS_DIR/ndb_show_tables --p > $MYSQLD_DATADIR/test/tmp.dat -LOAD DATA INFILE 'tmp.dat' INTO TABLE ndb_show_tables; ---enable_warnings - -# Ndb doesn't support renaming attributes on-line -set @t1_id = (select id from ndb_show_tables where name like '%t1%'); -truncate ndb_show_tables; - -alter table t1 change tiny new_tiny tinyint(4) DEFAULT '0' NOT NULL; ---disable_warnings ---exec $NDB_TOOLS_DIR/ndb_show_tables --p > $MYSQLD_DATADIR/test/tmp.dat -LOAD DATA INFILE 'tmp.dat' INTO TABLE ndb_show_tables; ---enable_warnings - -select 'no_copy' from ndb_show_tables where id = @t1_id and name like '%t1%'; - -set @t1_id = (select id from ndb_show_tables where name like '%t1%'); -truncate ndb_show_tables; - -create index i1 on t1(medium); -alter table t1 add index i2(new_tiny); -drop index i1 on t1; - ---disable_warnings ---exec $NDB_TOOLS_DIR/ndb_show_tables --p > $MYSQLD_DATADIR/test/tmp.dat -LOAD DATA INFILE 'tmp.dat' INTO TABLE ndb_show_tables; ---exec rm $MYSQLD_DATADIR/test/tmp.dat || true ---enable_warnings - -select 'no_copy' from ndb_show_tables where id = @t1_id and name like '%t1%'; - -DROP TABLE t1, ndb_show_tables; - -# simple test that auto incr is not lost at rename or alter -create table t1 (a int primary key auto_increment, b int) engine=ndb; -insert into t1 (b) values (101),(102),(103); -select * from t1 where a = 3; -alter table t1 rename t2; -insert into t2 (b) values (201),(202),(203); -select * from t2 where a = 6; -alter table t2 add c int; -insert into t2 (b) values (301),(302),(303); -select * from t2 where a = 9; -alter table t2 rename t1; -insert into t1 (b) values (401),(402),(403); -select * from t1 where a = 12; -drop table t1; - -# some other ALTER combinations -# Check add/drop primary key (not supported on-line) -create table t1(a int not null) engine=ndb; ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep PRIMARY -insert into t1 values (1),(2),(3); -alter table t1 add primary key (a); ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep PRIMARY -update t1 set a = 17 where a = 1; -select * from t1 order by a; -alter table t1 drop primary key; ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep PRIMARY -update t1 set a = 1 where a = 17; -select * from t1 order by a; -drop table t1; - -# bug#31233 mysql_alter_table() fails to drop UNIQUE KEY -create table t1(a int not null) engine=ndb; ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep PRIMARY -insert into t1 values (1),(2),(3); -create unique index pk on t1(a); ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep PRIMARY -update t1 set a = 17 where a = 1; -select * from t1 order by a; -alter table t1 drop index pk; ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep PRIMARY -update t1 set a = 1 where a = 17; -select * from t1 order by a; -drop table t1; - -# alter .. alter -create table t1 (a int not null primary key, b int not null default 0, c varchar(254)) engine=ndb; -show create table t1; -alter table t1 alter b set default 1; -show create table t1; -drop table t1; - -# alter .. order by -create table t1 (a int not null, b int not null) engine=ndb; -insert into t1 values (1, 300), (2, 200), (3, 100); -select * from t1 order by a; -alter table t1 order by b; -select * from t1 order by b; -drop table t1; - ---echo End of 5.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_alter_table2.test b/mysql-test/suite/ndb/t/ndb_alter_table2.test deleted file mode 100644 index f078ed6b479..00000000000 --- a/mysql-test/suite/ndb/t/ndb_alter_table2.test +++ /dev/null @@ -1,84 +0,0 @@ --- source include/have_multi_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - -connect (con1,localhost,root,,test); -connect (con2,localhost,root,,test); -connect (con3,localhost,root,,test); -connect (con4,localhost,root,,test); -connect (con5,localhost,root,,test); -connect (con6,localhost,root,,test); - -CREATE TABLE t1 ( - a INT NOT NULL PRIMARY KEY, - b INT NOT NULL -) ENGINE=ndbcluster; - -connection con1; -BEGIN; -INSERT INTO t1 VALUES (9410,9412); -connection con2; -BEGIN; ---send -INSERT INTO t1 VALUES (9411,9412); -connection con3; -BEGIN; ---send -INSERT INTO t1 VALUES (9412,9412); -connection con4; -BEGIN; ---send -INSERT INTO t1 VALUES (9413,9412); -connection con5; -BEGIN; ---send -INSERT INTO t1 VALUES (9414,9412); -connection con6; -BEGIN; ---send -INSERT INTO t1 VALUES (9415,9412); -connection con1; -sleep 1; - -ROLLBACK; -connection con2; -reap; -ROLLBACK; -connection con3; -reap; -ROLLBACK; -connection con4; -reap; -ROLLBACK; -connection con5; -reap; -ROLLBACK; -connection con6; -reap; -ROLLBACK; - -connection server2; - -drop table t1; -CREATE TABLE t1 ( - a INT NOT NULL PRIMARY KEY, - b INT NOT NULL, - c INT NOT NULL -) ENGINE=ndbcluster; - -connection server1; - ---disable_result_log ---error 0,1412 -select * from t1; ---enable_result_log -select * from t1; -select * from t1; -select * from t1; -select * from t1; -select * from t1; - -drop table t1; diff --git a/mysql-test/suite/ndb/t/ndb_alter_table3.test b/mysql-test/suite/ndb/t/ndb_alter_table3.test deleted file mode 100644 index 86e664b23b0..00000000000 --- a/mysql-test/suite/ndb/t/ndb_alter_table3.test +++ /dev/null @@ -1,48 +0,0 @@ --- source include/have_multi_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - -connection server1; -create table t1 ( a int primary key, b varchar(10), c varchar(10), index (b) ) -engine=ndb; -insert into t1 values (1,'one','one'), (2,'two','two'), (3,'three','three'); -create index c on t1(c); -connection server2; -show indexes from t1; -select * from t1 where c = 'two'; -connection server1; -alter table t1 drop index c; -connection server2; -show indexes from t1; -select * from t1 where c = 'two'; -connection server1; -drop table t1; - -connection server1; -create table t3 (a int primary key) engine=ndbcluster; - -connection server2; -begin; -insert into t3 values (1); - -connection server1; -alter table t3 rename t4; - -connection server2; -# with rbr the below will not work as the "alter" event -# explicitly invalidates the dictionary cache. -## This should work as transaction is ongoing... -#delete from t3; -#insert into t3 values (1); -commit; - -# This should fail as its a new transaction ---error 1146 -select * from t3; -select * from t4; -drop table t4; -show tables; -connection server1; diff --git a/mysql-test/suite/ndb/t/ndb_auto_increment.test b/mysql-test/suite/ndb/t/ndb_auto_increment.test deleted file mode 100644 index 14e7ae7ca7b..00000000000 --- a/mysql-test/suite/ndb/t/ndb_auto_increment.test +++ /dev/null @@ -1,293 +0,0 @@ --- source include/have_multi_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -connection server1; -DROP TABLE IF EXISTS t1,t2; -connection server2; -DROP TABLE IF EXISTS t1; -connection server1; ---enable_warnings - -set @old_auto_increment_offset = @@session.auto_increment_offset; -set @old_auto_increment_increment = @@session.auto_increment_increment; -set @old_ndb_autoincrement_prefetch_sz = @@session.ndb_autoincrement_prefetch_sz; - -flush status; - -create table t1 (a int not null auto_increment primary key) engine ndb; - -# Step 1: Verify simple insert -insert into t1 values (NULL); -select * from t1 order by a; - -# Step 2: Verify simple update with higher than highest value causes -# next insert to use updated_value + 1 -update t1 set a = 5 where a = 1; -insert into t1 values (NULL); -select * from t1 order by a; - -# Step 3: Verify insert that inserts higher than highest value causes -# next insert to use inserted_value + 1 -insert into t1 values (7); -insert into t1 values (NULL); -select * from t1 order by a; - -# Step 4: Verify that insert into hole, lower than highest value doesn't -# affect next insert -insert into t1 values (2); -insert into t1 values (NULL); -select * from t1 order by a; - -# Step 5: Verify that update into hole, lower than highest value doesn't -# affect next insert -update t1 set a = 4 where a = 2; -insert into t1 values (NULL); -select * from t1 order by a; - -# Step 6: Verify that delete of highest value doesn't cause the next -# insert to reuse this value -delete from t1 where a = 10; -insert into t1 values (NULL); -select * from t1 order by a; - -# Step 7: Verify that REPLACE has the same effect as INSERT -replace t1 values (NULL); -select * from t1 order by a; -replace t1 values (15); -select * from t1 order by a; -replace into t1 values (NULL); -select * from t1 order by a; - -# Step 8: Verify that REPLACE has the same effect as UPDATE -replace t1 values (15); -select * from t1 order by a; - -# Step 9: Verify that IGNORE doesn't affect auto_increment -insert ignore into t1 values (NULL); -select * from t1 order by a; -insert ignore into t1 values (15), (NULL); -select * from t1 order by a; - -# Step 10: Verify that on duplicate key as UPDATE behaves as an -# UPDATE -insert into t1 values (15) -on duplicate key update a = 20; -insert into t1 values (NULL); -select * from t1 order by a; - -# Step 11: Verify that on duplicate key as INSERT behaves as INSERT -insert into t1 values (NULL) on duplicate key update a = 30; -select * from t1 order by a; -insert into t1 values (30) on duplicate key update a = 40; -select * from t1 order by a; - -#Step 12: Vefify INSERT IGNORE (bug#32055) -insert ignore into t1 values(600),(NULL),(NULL),(610),(NULL); -select * from t1 order by a; -drop table t1; - -#Step 13: Verify auto_increment of unique key -create table t1 (a int not null primary key, - b int not null unique auto_increment) engine ndb; -insert into t1 values (1, NULL); -insert into t1 values (3, NULL); -update t1 set b = 3 where a = 3; -insert into t1 values (4, NULL); -select * from t1 order by a; -drop table t1; - -#Step 14: Verify that auto_increment_increment and auto_increment_offset -# work as expected - -CREATE TABLE t1 ( - pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, - b INT NOT NULL, - c INT NOT NULL UNIQUE -) ENGINE=NDBCLUSTER; - -CREATE TABLE t2 ( - pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, - b INT NOT NULL, - c INT NOT NULL UNIQUE -) ENGINE=MYISAM; - -SET @@session.auto_increment_increment=10; -INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); -INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); -SELECT * FROM t1 ORDER BY pk; -SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; -TRUNCATE t1; -TRUNCATE t2; -SET @@session.auto_increment_offset=5; -INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); -INSERT INTO t1 (pk,b,c) VALUES (27,4,3),(NULL,5,4),(99,6,5),(NULL,7,6); -INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); -INSERT INTO t2 (pk,b,c) VALUES (27,4,3),(NULL,5,4),(99,6,5),(NULL,7,6); -SELECT * FROM t1 ORDER BY pk; -SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; -TRUNCATE t1; -TRUNCATE t2; -SET @@session.auto_increment_increment=2; -INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); -INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); -SELECT * FROM t1 ORDER BY pk; -SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; -DROP TABLE t1, t2; - -CREATE TABLE t1 ( - pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, - b INT NOT NULL, - c INT NOT NULL UNIQUE -) ENGINE=NDBCLUSTER AUTO_INCREMENT = 7; - -CREATE TABLE t2 ( - pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, - b INT NOT NULL, - c INT NOT NULL UNIQUE -) ENGINE=MYISAM AUTO_INCREMENT = 7; - -SET @@session.auto_increment_offset=1; -SET @@session.auto_increment_increment=1; -INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); -INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); -SELECT * FROM t1 ORDER BY pk; -SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; -DROP TABLE t1, t2; - -CREATE TABLE t1 ( - pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, - b INT NOT NULL, - c INT NOT NULL UNIQUE -) ENGINE=NDBCLUSTER AUTO_INCREMENT = 3; - -CREATE TABLE t2 ( - pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, - b INT NOT NULL, - c INT NOT NULL UNIQUE -) ENGINE=MYISAM AUTO_INCREMENT = 3; - -SET @@session.auto_increment_offset=5; -SET @@session.auto_increment_increment=10; -INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); -INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); -SELECT * FROM t1 ORDER BY pk; -SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; -DROP TABLE t1, t2; - -CREATE TABLE t1 ( - pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, - b INT NOT NULL, - c INT NOT NULL UNIQUE -) ENGINE=NDBCLUSTER AUTO_INCREMENT = 7; - -CREATE TABLE t2 ( - pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, - b INT NOT NULL, - c INT NOT NULL UNIQUE -) ENGINE=MYISAM AUTO_INCREMENT = 7; - -SET @@session.auto_increment_offset=5; -SET @@session.auto_increment_increment=10; -INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); -INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); -SELECT * FROM t1 ORDER BY pk; -SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; -DROP TABLE t1, t2; - -CREATE TABLE t1 ( - pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, - b INT NOT NULL, - c INT NOT NULL UNIQUE -) ENGINE=NDBCLUSTER AUTO_INCREMENT = 5; - -CREATE TABLE t2 ( - pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, - b INT NOT NULL, - c INT NOT NULL UNIQUE -) ENGINE=MYISAM AUTO_INCREMENT = 5; - -SET @@session.auto_increment_offset=5; -SET @@session.auto_increment_increment=10; -INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); -INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); -SELECT * FROM t1 ORDER BY pk; -SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; -DROP TABLE t1, t2; - -CREATE TABLE t1 ( - pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, - b INT NOT NULL, - c INT NOT NULL UNIQUE -) ENGINE=NDBCLUSTER AUTO_INCREMENT = 100; - -CREATE TABLE t2 ( - pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, - b INT NOT NULL, - c INT NOT NULL UNIQUE -) ENGINE=MYISAM AUTO_INCREMENT = 100; - -SET @@session.auto_increment_offset=5; -SET @@session.auto_increment_increment=10; -INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); -INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); -SELECT * FROM t1 ORDER BY pk; -SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; -DROP TABLE t1, t2; - -#Step 15: Now verify that behaviour on multiple MySQL Servers behave -# properly. Start by dropping table and recreating it to start -# counters and id caches from zero again. ---disable_warnings -connection server2; -SET @@session.auto_increment_offset=1; -SET @@session.auto_increment_increment=1; -set ndb_autoincrement_prefetch_sz = 32; -drop table if exists t1; -connection server1; -SET @@session.auto_increment_offset=1; -SET @@session.auto_increment_increment=1; -set ndb_autoincrement_prefetch_sz = 32; ---enable_warnings - - -create table t1 (a int not null auto_increment primary key) engine ndb; -# Basic test, ensure that the second server gets a new range. -#Generate record with key = 1 -insert into t1 values (NULL); -connection server2; -#Generate record with key = 33 -insert into t1 values (NULL); -connection server1; -select * from t1 order by a; - -#This insert should not affect the range of the second server -insert into t1 values (20); -connection server2; -insert into t1 values (NULL); -select * from t1 order by a; - -connection server1; -#This insert should remove cached values but also skip values already -#taken by server2, given that there is no method of communicating with -#the other server it should also cause a conflict -connection server1; - -insert into t1 values (35); -insert into t1 values (NULL); -connection server2; ---error ER_DUP_ENTRY -insert into t1 values (NULL); -select * from t1 order by a; - -insert into t1 values (100); -insert into t1 values (NULL); -connection server1; -insert into t1 values (NULL); -select * from t1 order by a; - -set auto_increment_offset = @old_auto_increment_offset; -set auto_increment_increment = @old_auto_increment_increment; -set ndb_autoincrement_prefetch_sz = @old_ndb_autoincrement_prefetch_sz; - -drop table t1; diff --git a/mysql-test/suite/ndb/t/ndb_autoinc.test b/mysql-test/suite/ndb/t/ndb_autoinc.test deleted file mode 100644 index a5ae52c88d7..00000000000 --- a/mysql-test/suite/ndb/t/ndb_autoinc.test +++ /dev/null @@ -1,45 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1,t2,t3; ---enable_warnings - -USE test; - -CREATE TABLE t1 ( - id INT AUTO_INCREMENT, - PRIMARY KEY(id) -) ENGINE=NDBCLUSTER; - -# Test For bug#30417 ---error 1005 - -CREATE TABLE t2 ( - id INT AUTO_INCREMENT, - KEY(id) -) ENGINE=NDBCLUSTER; - -SHOW TABLES; - -CREATE TABLE t3 ( - id INT AUTO_INCREMENT, - KEY(id) -) ENGINE=MYISAM; - ---disable_result_log ---error 1005 -ALTER TABLE t3 -ENGINE NDBCLUSTER; ---enable_result_log - -SHOW CREATE TABLE t3; - -ALTER TABLE t3 -ADD PRIMARY KEY (id); - -SHOW CREATE TABLE t3; - -DROP TABLE t1, t3; - ---echo End of 5.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_basic.test b/mysql-test/suite/ndb/t/ndb_basic.test deleted file mode 100644 index 2fc140288ca..00000000000 --- a/mysql-test/suite/ndb/t/ndb_basic.test +++ /dev/null @@ -1,861 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; -drop database if exists mysqltest; ---enable_warnings - -# workaround for bug#16445 -# remove to reproduce bug and run tests from ndb start -# and with ndb_autodiscover disabled. Fails on Linux 50 % of the times -CREATE TABLE t1 ( - pk1 INT NOT NULL PRIMARY KEY, - attr1 INT NOT NULL, - attr2 INT, - attr3 VARCHAR(10) -) ENGINE=ndbcluster; -drop table t1; - -# -# Basic test to show that the NDB -# table handler is working -# - -# -# Show status and variables -# ---replace_column 2 # -SHOW GLOBAL STATUS LIKE 'ndb%'; ---replace_column 2 # -SHOW GLOBAL VARIABLES LIKE 'ndb%'; - -# -# Create a normal table with primary key -# -CREATE TABLE t1 ( - pk1 INT NOT NULL PRIMARY KEY, - attr1 INT NOT NULL, - attr2 INT, - attr3 VARCHAR(10) -) ENGINE=ndbcluster; - -SHOW INDEX FROM t1; -INSERT INTO t1 VALUES (9410,9412, NULL, '9412'), (9411,9413, 17, '9413'); -SHOW INDEX FROM t1; -SELECT pk1 FROM t1 ORDER BY pk1; -SELECT * FROM t1 ORDER BY pk1; -SELECT t1.* FROM t1 ORDER BY pk1; - -# Update on record by primary key -UPDATE t1 SET attr1=1 WHERE pk1=9410; -SELECT * FROM t1 ORDER BY pk1; - -# Update primary key -UPDATE t1 SET pk1=2 WHERE attr1=1; -SELECT * FROM t1 ORDER BY pk1; -UPDATE t1 SET pk1=pk1 + 1; -SELECT * FROM t1 ORDER BY pk1; -UPDATE t1 SET pk1=4 WHERE pk1 = 3; -SELECT * FROM t1 ORDER BY pk1; - -# Delete the record -DELETE FROM t1; -SELECT * FROM t1; - -# Insert more records and update them all at once -INSERT INTO t1 VALUES (9410,9412, NULL, '9412'), (9408, 8765, NULL, '8765'), -(7,8, NULL, NULL), (8,9, NULL, NULL), (9,10, NULL, NULL), (10,11, NULL, NULL), (11,12, NULL, NULL), (12,13, NULL, NULL), (13,14, NULL, NULL); -UPDATE t1 SET attr1 = 9999; -SELECT * FROM t1 ORDER BY pk1; - -UPDATE t1 SET attr1 = 9998 WHERE pk1 < 1000; -SELECT * FROM t1 ORDER BY pk1; - -UPDATE t1 SET attr1 = 9997 WHERE attr1 = 9999; -SELECT * FROM t1 ORDER BY pk1; - -# Delete one record by specifying pk -DELETE FROM t1 WHERE pk1 = 9410; -SELECT * FROM t1 ORDER BY pk1; - -# Delete all from table -DELETE FROM t1; -SELECT * FROM t1; - -# Insert three records with attr1=4 and two with attr1=5 -# Delete all with attr1=4 -INSERT INTO t1 values (1, 4, NULL, NULL), (2, 4, NULL, NULL), (3, 5, NULL, NULL), (4, 4, NULL, NULL), (5, 5, NULL, NULL); -DELETE FROM t1 WHERE attr1=4; -SELECT * FROM t1 order by pk1; -DELETE FROM t1; - -# Insert two records and delete one -INSERT INTO t1 VALUES (9410,9412, NULL, NULL), (9411, 9413, NULL, NULL); -DELETE FROM t1 WHERE pk1 = 9410; -SELECT * FROM t1; -DROP TABLE t1; - -# -# Create table without primary key -# a hidden primary key column is created by handler -# -CREATE TABLE t1 (id INT, id2 int) engine=ndbcluster; -INSERT INTO t1 values(3456, 7890); -SELECT * FROM t1; -UPDATE t1 SET id=2 WHERE id2=12; -SELECT * FROM t1; -UPDATE t1 SET id=1234 WHERE id2=7890; -SELECT * FROM t1; -DELETE FROM t1; - -INSERT INTO t1 values(3456, 7890), (3456, 7890), (3456, 7890), (3454, 7890); -SELECT * FROM t1 ORDER BY id; -DELETE FROM t1 WHERE id = 3456; -SELECT * FROM t1 ORDER BY id; - -DROP TABLE t1; - -# test create with the keyword "engine=NDBCLUSTER" -CREATE TABLE t1 ( - pk1 INT NOT NULL PRIMARY KEY, - attr1 INT NOT NULL -) ENGINE=NDBCLUSTER; - -INSERT INTO t1 values(1, 9999); - -DROP TABLE t1; - -# test create with the keyword "engine=NDB" -CREATE TABLE t1 ( - pk1 INT NOT NULL PRIMARY KEY, - attr1 INT NOT NULL -) ENGINE=NDB; - -INSERT INTO t1 values(1, 9999); - -DROP TABLE t1; - - -# -# A more extensive test with a lot more records -# - -CREATE TABLE t2 ( - a bigint unsigned NOT NULL PRIMARY KEY, - b int unsigned not null, - c int unsigned -) engine=ndbcluster; - -CREATE TABLE t3 ( - a bigint unsigned NOT NULL, - b bigint unsigned not null, - c bigint unsigned, - PRIMARY KEY(a) -) engine=ndbcluster; - -CREATE TABLE t4 ( - a bigint unsigned NOT NULL, - b bigint unsigned not null, - c bigint unsigned NOT NULL, - d int unsigned, - PRIMARY KEY(a, b, c) -) engine=ndbcluster; - - -# -# insert more records into tables -# -let $1=1000; -disable_query_log; -while ($1) -{ - eval insert into t2 values($1, $1+9, 5); - eval insert into t3 values($1, $1+9, 5); - eval insert into t4 values($1, $1+9, 5, $1+26000); - dec $1; -} -enable_query_log; - - -# -# delete every other record in the tables -# -let $1=1000; -disable_query_log; -while ($1) -{ - eval delete from t2 where a=$1; - eval delete from t3 where a=$1; - eval delete from t4 where a=$1 and b=$1+9 and c=5; - dec $1; - dec $1; -} -enable_query_log; - - -select * from t2 where a = 7 order by b; -select * from t2 where a = 7 order by a; -select * from t2 where a = 7 order by 2; -select * from t2 where a = 7 order by c; - -select * from t2 where a = 7 and b = 16 order by b; -select * from t2 where a = 7 and b = 16 order by a; -select * from t2 where a = 7 and b = 17 order by a; -select * from t2 where a = 7 and b != 16 order by b; - -select * from t2 where a = 7 and b = 16 and c = 5 order by b; -select * from t2 where a = 7 and b = 16 and c = 5 order by a; -select * from t2 where a = 7 and b = 16 and c = 6 order by a; -select * from t2 where a = 7 and b != 16 and c = 5 order by b; - -select * from t3 where a = 7 order by b; -select * from t3 where a = 7 order by a; -select * from t3 where a = 7 order by 2; -select * from t3 where a = 7 order by c; - -select * from t3 where a = 7 and b = 16 order by b; -select * from t3 where a = 7 and b = 16 order by a; -select * from t3 where a = 7 and b = 17 order by a; -select * from t3 where a = 7 and b != 16 order by b; - -select * from t4 where a = 7 order by b; -select * from t4 where a = 7 order by a; -select * from t4 where a = 7 order by 2; -select * from t4 where a = 7 order by c; - -select * from t4 where a = 7 and b = 16 order by b; -select * from t4 where a = 7 and b = 16 order by a; -select * from t4 where a = 7 and b = 17 order by a; -select * from t4 where a = 7 and b != 16 order by b; - -# -# update records -# -let $1=1000; -disable_query_log; -while ($1) -{ - eval update t2 set c=$1 where a=$1; - eval update t3 set c=7 where a=$1 and b=$1+9 and c=5; - eval update t4 set d=$1+21987 where a=$1 and b=$1+9 and c=5; - dec $1; - dec $1; -} -enable_query_log; - -delete from t2 where a > 5; -select x1.a, x1.b from t2 x1, t2 x2 where x1.b = x2.b order by x1.a; -select a, b FROM t2 outer_table where -a = (select a from t2 where b = outer_table.b ) order by a; - - -delete from t2; -delete from t3; -delete from t4; - -drop table t2; -drop table t3; -drop table t4; - -# -# Test delete and update from table with 3 keys -# - -CREATE TABLE t5 ( - a bigint unsigned NOT NULL, - b bigint unsigned not null, - c bigint unsigned NOT NULL, - d int unsigned, - PRIMARY KEY(a, b, c) -) engine=ndbcluster; - -insert into t5 values(10, 19, 5, 26010); - -delete from t5 where a=10 and b=19 and c=5; - -select * from t5; - -insert into t5 values(10, 19, 5, 26010); - -update t5 set d=21997 where a=10 and b=19 and c=5; - -select * from t5; - -delete from t5; - -drop table t5; - -# -# Test using table with a char(255) column first in table -# - -CREATE TABLE t6 ( - adress char(255), - a int NOT NULL PRIMARY KEY, - b int -) engine = NDB; - -insert into t6 values - ("Nice road 3456", 1, 23), - ("Street Road 78", 3, 92), - ("Road street 89C", 5, 71), - (NULL, 7, NULL); -select * from t6 order by a; -select a, b from t6 order by a; - -update t6 set adress="End of road 09" where a=3; -update t6 set b=181, adress="Street 76" where a=7; -select * from t6 order by a; -select * from t6 where a=1; -delete from t6 where a=1; -select * from t6 order by a; -delete from t6 where b=71; -select * from t6 order by a; - -drop table t6; - -# -# Test using table with a char(255) column first in table and a -# primary key consisting of two columns -# - -CREATE TABLE t7 ( - adress char(255), - a int NOT NULL, - b int, - c int NOT NULL, - PRIMARY KEY(a, c) -) engine = NDB; - -insert into t7 values - ("Highway 3456", 1, 23, 2), - ("Street Road 78", 3, 92, 3), - ("Main street 89C", 5, 71, 4), - (NULL, 8, NULL, 12); -select * from t7 order by a; -select a, b from t7 order by a; - -update t7 set adress="End of road 09" where a=3; -update t7 set adress="Gatuvägen 90C" where a=5 and c=4; -update t7 set adress="No adress" where adress is NULL; -select * from t7 order by a; -select * from t7 where a=1 and c=2; -delete from t7 where a=1; -delete from t7 where a=3 and c=3; -delete from t7 where a=5 and c=4; -select * from t7; -delete from t7 where b=23; -select * from t7; - -drop table t7; - -# -# Test multiple databases in one statement -# - -CREATE TABLE t1 ( - pk1 INT NOT NULL PRIMARY KEY, - attr1 INT NOT NULL, - attr2 INT, - attr3 VARCHAR(10) -) ENGINE=ndbcluster; - -INSERT INTO t1 VALUES (9410,9412, NULL, '9412'), (9411,9413, 17, '9413'); - -create database mysqltest; -use mysqltest; - -CREATE TABLE t2 ( - a bigint unsigned NOT NULL PRIMARY KEY, - b int unsigned not null, - c int unsigned -) engine=ndbcluster; - -insert into t2 select pk1,attr1,attr2 from test.t1; -select * from t2 order by a; -select b from test.t1, t2 where c = test.t1.attr2; -select b,test.t1.attr1 from test.t1, t2 where test.t1.pk1 < a; - -drop table test.t1, t2; -drop database mysqltest; - -# -# BUG#6031 - DROP DATABASE doesn't drop database on first try -# - ---disable_warnings -drop database if exists ndbtest1; ---enable_warnings - -create database ndbtest1; -use ndbtest1; -create table t1(id int) engine=ndbcluster; -drop database ndbtest1; ---error 1008 -drop database ndbtest1; - -# -# test support of char(0) -# - -use test; -create table t1 (a int primary key, b char(0)); -insert into t1 values (1,""); -insert into t1 values (2,NULL); -select * from t1 order by a; -select * from t1 order by b; -select * from t1 where b IS NULL; -select * from t1 where b IS NOT NULL; -drop table t1; - -# -# test the limit of no of attributes in one table -# -# also tests bug#17179, more than 31 attributes in -# a partitioned table -# -create table t1 ( -c1 int, -c2 int, -c3 int, -c4 int, -c5 int, -c6 int, -c7 int, -c8 int, -c9 int, -c10 int, -c11 int, -c12 int, -c13 int, -c14 int, -c15 int, -c16 int, -c17 int, -c18 int, -c19 int, -c20 int, -c21 int, -c22 int, -c23 int, -c24 int, -c25 int, -c26 int, -c27 int, -c28 int, -c29 int, -c30 int, -c31 int, -c32 int, -c33 int, -c34 int, -c35 int, -c36 int, -c37 int, -c38 int, -c39 int, -c40 int, -c41 int, -c42 int, -c43 int, -c44 int, -c45 int, -c46 int, -c47 int, -c48 int, -c49 int, -c50 int, -c51 int, -c52 int, -c53 int, -c54 int, -c55 int, -c56 int, -c57 int, -c58 int, -c59 int, -c60 int, -c61 int, -c62 int, -c63 int, -c64 int, -c65 int, -c66 int, -c67 int, -c68 int, -c69 int, -c70 int, -c71 int, -c72 int, -c73 int, -c74 int, -c75 int, -c76 int, -c77 int, -c78 int, -c79 int, -c80 int, -c81 int, -c82 int, -c83 int, -c84 int, -c85 int, -c86 int, -c87 int, -c88 int, -c89 int, -c90 int, -c91 int, -c92 int, -c93 int, -c94 int, -c95 int, -c96 int, -c97 int, -c98 int, -c99 int, -c100 int, -c101 int, -c102 int, -c103 int, -c104 int, -c105 int, -c106 int, -c107 int, -c108 int, -c109 int, -c110 int, -c111 int, -c112 int, -c113 int, -c114 int, -c115 int, -c116 int, -c117 int, -c118 int, -c119 int, -c120 int, -c121 int, -c122 int, -c123 int, -c124 int, -c125 int, -c126 int, -c127 int, -c128 int, -primary key using hash(c1)) engine=ndb partition by key(c1); -drop table t1; - -# -# test max size of attribute name and truncation -# - -create table t1 ( -a1234567890123456789012345678901234567890 int primary key, -a12345678901234567890123456789a1234567890 int, -index(a12345678901234567890123456789a1234567890) -) engine=ndb; -show tables; -insert into t1 values (1,1),(2,1),(3,1),(4,1),(5,2),(6,1),(7,1); ---replace_column 9 # -explain select * from t1 where a12345678901234567890123456789a1234567890=2; -select * from t1 where a12345678901234567890123456789a1234567890=2; -drop table t1; - -# -# test fragment creation -# -# first a table with _many_ fragments per node group -# then a table with just one fragment per node group -# -create table t1 - (a bigint, b bigint, c bigint, d bigint, - primary key (a,b,c,d)) - engine=ndb - max_rows=800000000; -insert into t1 values - (1,2,3,4),(2,3,4,5),(3,4,5,6), - (3,2,3,4),(1,3,4,5),(2,4,5,6), - (1,2,3,5),(2,3,4,8),(3,4,5,9), - (3,2,3,5),(1,3,4,8),(2,4,5,9), - (1,2,3,6),(2,3,4,6),(3,4,5,7), - (3,2,3,6),(1,3,4,6),(2,4,5,7), - (1,2,3,7),(2,3,4,7),(3,4,5,8), - (3,2,3,7),(1,3,4,7),(2,4,5,8), - (1,3,3,4),(2,4,4,5),(3,5,5,6), - (3,3,3,4),(1,4,4,5),(2,5,5,6), - (1,3,3,5),(2,4,4,8),(3,5,5,9), - (3,3,3,5),(1,4,4,8),(2,5,5,9), - (1,3,3,6),(2,4,4,6),(3,5,5,7), - (3,3,3,6),(1,4,4,6),(2,5,5,7), - (1,3,3,7),(2,4,4,7),(3,5,5,8), - (3,3,3,7),(1,4,4,7),(2,5,5,8); -select count(*) from t1; -drop table t1; - -create table t1 - (a bigint, b bigint, c bigint, d bigint, - primary key (a)) - engine=ndb - max_rows=1; -drop table t1; - -# -# Test auto_increment -# - -connect (con1,localhost,root,,test); -connect (con2,localhost,root,,test); - -create table t1 - (counter int(64) NOT NULL auto_increment, - datavalue char(40) default 'XXXX', - primary key (counter) - ) ENGINE=ndbcluster; - -connection con1; -insert into t1 (datavalue) values ('newval'); -insert into t1 (datavalue) values ('newval'); -select * from t1 order by counter; -insert into t1 (datavalue) select datavalue from t1 where counter < 100; -insert into t1 (datavalue) select datavalue from t1 where counter < 100; -select * from t1 order by counter; -connection con2; -insert into t1 (datavalue) select datavalue from t1 where counter < 100; -insert into t1 (datavalue) select datavalue from t1 where counter < 100; -select * from t1 order by counter; - -drop table t1; - -# -# bug#27437 -connection con1; -create table t1 (a int primary key auto_increment) engine = ndb; -insert into t1() values (),(),(),(),(),(),(),(),(),(),(),(); -connection con2; -insert into t1(a) values (20),(28); -connection con1; -insert into t1() values (),(),(),(),(),(),(),(),(),(),(),(); -connection con2; -insert into t1() values (21), (22); -connection con1; - -drop table t1; - -# -# BUG#14514 Creating table with packed key fails silently -# - -CREATE TABLE t1 ( b INT ) PACK_KEYS = 0 ENGINE = ndb; -select * from t1; -drop table t1; - -# -# Bug #17249 delete statement with join where clause fails -# when table do not have pk - # - -create table t1 (a int) engine=ndb; -create table t2 (a int) engine=ndb; -insert into t1 values (1); -insert into t2 values (1); -delete t1.* from t1, t2 where t1.a = t2.a; -select * from t1; -select * from t2; -drop table t1; -drop table t2; - -# -# Bug #17257 update fails for inner joins if tables -# do not have Primary Key -# - -CREATE TABLE t1 ( - i INT, - j INT, - x INT, - y INT, - z INT -) engine=ndb; - -CREATE TABLE t2 ( - i INT, - k INT, - x INT, - y INT, - z INT -) engine=ndb; - -CREATE TABLE t3 ( - j INT, - k INT, - x INT, - y INT, - z INT -) engine=ndb; - -INSERT INTO t1 VALUES ( 1, 2,13,14,15); -INSERT INTO t2 VALUES ( 1, 3,23,24,25); -INSERT INTO t3 VALUES ( 2, 3, 1,34,35), ( 2, 3, 1,34,36); - -UPDATE t1 AS a -INNER JOIN t2 AS b - ON a.i = b.i -INNER JOIN t3 AS c - ON a.j = c.j AND b.k = c.k -SET a.x = b.x, - a.y = b.y, - a.z = ( - SELECT sum(z) - FROM t3 - WHERE y = 34 - ) -WHERE b.x = 23; -select * from t1; -drop table t1; -drop table t2; -drop table t3; - -# End of 4.1 tests - -# -# Test long table name -# -create table atablewithareallylongandirritatingname (a int); -insert into atablewithareallylongandirritatingname values (2); -select * from atablewithareallylongandirritatingname; -drop table atablewithareallylongandirritatingname; - -# -# Bug#15682 -# -create table t1 (f1 varchar(50), f2 text,f3 int, primary key(f1)) engine=NDB; -insert into t1 (f1,f2,f3)VALUES("111111","aaaaaa",1); -insert into t1 (f1,f2,f3)VALUES("222222","bbbbbb",2); -select * from t1 order by f1; -select * from t1 order by f2; -select * from t1 order by f3; -drop table t1; -# Bug#16561 Unknown ERROR msg "ERROR 1186 (HY000): Binlog closed" by perror -# - -# As long there is no error code 1186 defined by NDB -# we should get a message "Illegal ndb error code: 1186" ---error 1 ---exec $MY_PERROR --ndb 1186 2>&1 - -# -# Bug #25746 - VARCHAR UTF8 PK issue -# - prior to bugfix 4209, illegal length parameter would be -# returned in SELECT * - -CREATE TABLE t1 ( -a VARBINARY(40) NOT NULL, -b VARCHAR (256) CHARACTER SET UTF8 NOT NULL, -c VARCHAR(256) CHARACTER SET UTF8 NOT NULL, -PRIMARY KEY (b,c)) ENGINE=ndbcluster; -INSERT INTO t1 VALUES -("a","ab","abc"),("b","abc","abcd"),("c","abc","ab"),("d","ab","ab"),("e","abc","abc"); -SELECT * FROM t1 ORDER BY a; -DROP TABLE t1; - -# delete -create table t1 (a int not null primary key, b int not null) engine=ndb; -create table t2 (a int not null primary key, b int not null) engine=ndb; -insert into t1 values (1,10), (2,20), (3,30); -insert into t2 values (1,10), (2,20), (3,30); -select * from t1 order by a; -delete from t1 where a > 0 order by a desc limit 1; -select * from t1 order by a; -delete from t1,t2 using t1,t2 where t1.a = t2.a; -select * from t2 order by a; -drop table t1,t2; - -# insert ignore -create table t1 (a int not null primary key, b int not null) engine=ndb; -insert into t1 values (1,10), (2,20), (3,30); ---error ER_DUP_ENTRY -insert into t1 set a=1, b=100; -insert ignore into t1 set a=1, b=100; -select * from t1 order by a; -insert into t1 set a=1, b=1000 on duplicate key update b=b+1; -select * from t1 order by a; -drop table t1; - -# update -create table t1 (a int not null primary key, b int not null) engine=ndb; -create table t2 (c int not null primary key, d int not null) engine=ndb; -insert into t1 values (1,10), (2,10), (3,30), (4, 30); -insert into t2 values (1,10), (2,10), (3,30), (4, 30); ---error ER_DUP_ENTRY -update t1 set a = 1 where a = 3; -select * from t1 order by a; -update t1 set b = 1 where a > 1 order by a desc limit 1; -select * from t1 order by a; ---error ER_DUP_ENTRY -update t1,t2 set a = 1, c = 1 where a = 3 and c = 3; -select * from t1 order by a; -update ignore t1,t2 set a = 1, c = 1 where a = 3 and c = 3; -select * from t1 order by a; -drop table t1,t2; - -# -# Bug#31635 -# -create table t1 (a varchar(100) primary key, b varchar(100)) engine = NDB; -insert into t1 values - ('a', 'a'),('b','b'),('c', 'c'),('aa', 'aa'),('bb', 'bb'),('cc', 'cc'); -replace into t1 values ('a', '-a'); -replace into t1 values ('b', '-b'); -replace into t1 values ('c', '-c'); - -replace into t1 values ('aa', '-aa'); -replace into t1 values ('bb', '-bb'); -replace into t1 values ('cc', '-cc'); - -replace into t1 values ('aaa', '-aaa'); -replace into t1 values ('bbb', '-bbb'); -replace into t1 values ('ccc', '-ccc'); -select * from t1 order by 1,2; -drop table t1; - ---echo End of 5.0 tests - -# -# Bug #18483 Cannot create table with FK constraint -# ndb does not support foreign key constraint, it is silently ignored -# in line with other storage engines -# -CREATE TABLE t1 (a VARCHAR(255) NOT NULL, - CONSTRAINT pk_a PRIMARY KEY (a))engine=ndb; -CREATE TABLE t2(a VARCHAR(255) NOT NULL, - b VARCHAR(255) NOT NULL, - c VARCHAR(255) NOT NULL, - CONSTRAINT pk_b_c_id PRIMARY KEY (b,c), - CONSTRAINT fk_a FOREIGN KEY(a) REFERENCES t1(a))engine=ndb; -drop table t1, t2; - -# bug#24301 -create table t1 (a int not null primary key, b int) engine=ndb; -insert into t1 values(1,1),(2,2),(3,3); -create table t2 like t1; -insert into t2 select * from t1; -select * from t1 order by a; -select * from t2 order by a; -drop table t1, t2; - -# create table if not exists ---disable_warnings -create table t1 (a int not null primary key, b int not null default 0, c varchar(254)) engine=ndb; -create table if not exists t1 (a int not null primary key, b int not null default 0, c varchar(254)) engine=ndb; ---enable_warnings - -# create like -create table t2 like t1; - -# multi rename -rename table t1 to t10, t2 to t20; -drop table t10,t20; - ---echo End of 5.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_binlog_basic.test b/mysql-test/suite/ndb/t/ndb_binlog_basic.test deleted file mode 100644 index 4d8b7a8b127..00000000000 --- a/mysql-test/suite/ndb/t/ndb_binlog_basic.test +++ /dev/null @@ -1,80 +0,0 @@ --- source include/have_ndb.inc --- source include/have_binlog_format_mixed_or_row.inc - ---disable_warnings -drop table if exists t1, t2; -drop database if exists mysqltest; -create database mysqltest; -use mysqltest; -drop database mysqltest; -use test; ---enable_warnings - -# -# basic insert, update, delete test, alter, rename, drop -# check that ndb_binlog_index gets the right info -# - -create table t1 (a int primary key) engine=ndb; -insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); -save_master_pos; ---replace_column 1 # -select @max_epoch:=max(epoch)-1 from mysql.ndb_binlog_index; - -delete from t1; -alter table t1 add (b int); -insert into t1 values (3,3),(4,4); -alter table t1 rename t2; - -# get all in one epoch -begin; -insert into t2 values (1,1),(2,2); -update t2 set b=1 where a=3; -delete from t2 where a=4; -commit; -drop table t2; - -# check that above is ok -# (save_master_pos waits for last gcp to complete, ensuring that we have -# the expected data in the binlog) -save_master_pos; -select inserts from mysql.ndb_binlog_index where epoch > @max_epoch and inserts > 5; -select deletes from mysql.ndb_binlog_index where epoch > @max_epoch and deletes > 5; -select inserts,updates,deletes from - mysql.ndb_binlog_index where epoch > @max_epoch and updates > 0; - -# -# check that purge clears the ndb_binlog_index -# -# TODO: make this deterministic -# This test is disabled until we can make this determistic under load. -# The problem is that in some cases, the binlog writing thread gets -# scheduled after the purge, writes pending things, then the select -# gets scheduled -# -flush logs; ---sleep 1 -purge master logs before now(); ---disable_parsing -select count(*) from mysql.ndb_binlog_index; ---enable_parsing - -# -# several tables in different databases -# check that same table name in different databases don't mix up -# -create table t1 (a int primary key, b int) engine=ndb; -create database mysqltest; -use mysqltest; -create table t1 (c int, d int primary key) engine=ndb; -use test; - -insert into mysqltest.t1 values (2,1),(2,2); -save_master_pos; ---replace_column 1 # -select @max_epoch:=max(epoch)-1 from mysql.ndb_binlog_index; - -drop table t1; -drop database mysqltest; -select inserts,updates,deletes from - mysql.ndb_binlog_index where epoch > @max_epoch and inserts > 0; diff --git a/mysql-test/suite/ndb/t/ndb_binlog_ddl_multi.test b/mysql-test/suite/ndb/t/ndb_binlog_ddl_multi.test deleted file mode 100644 index a70dbe2011f..00000000000 --- a/mysql-test/suite/ndb/t/ndb_binlog_ddl_multi.test +++ /dev/null @@ -1,190 +0,0 @@ --- source include/have_multi_ndb.inc --- source include/have_binlog_format_mixed_or_row.inc - ---disable_warnings -connection server2; -drop database if exists mysqltest; -drop table if exists t1,t2,t3; -connection server1; -drop database if exists mysqltest; -drop table if exists t1,t2,t3; ---connection server1 -reset master; ---connection server2 -reset master; ---enable_warnings - -# -# basic test to see if ddl distribution works across -# multiple binlogs -# - -# create database ---connection server1 -create database mysqltest; - -# create table ---connection server1 -use mysqltest; -create table t1 (a int primary key) engine=ndb; - ---connection server2 -create table t2 (a int primary key) engine=ndb; ---source include/show_binlog_events2.inc - ---connection server1 ---source include/show_binlog_events2.inc - -# alter table ---connection server1 -reset master; ---connection server2 -reset master; - ---connection server2 -alter table t2 add column (b int); - ---connection server1 ---source include/show_binlog_events2.inc - -# alter database ---connection server1 -reset master; ---connection server2 -reset master; - ---connection server2 -ALTER DATABASE mysqltest CHARACTER SET latin1; - - -# having drop here instead of below sometimes triggers bug#18976 -## drop table and drop should come after data events ---connection server2 -drop table mysqltest.t1; - ---connection server1 ---source include/show_binlog_events2.inc -# to track down bug#18976 ---real_sleep 10 ---source include/show_binlog_events2.inc - -#--connection server2 -#drop table mysqltest.t1; - -# drop database and drop should come after data events ---connection server1 -reset master; ---connection server2 -reset master; - ---connection server1 -use test; -insert into t2 values (1,2); -drop database mysqltest; -create table t1 (a int primary key) engine=ndb; - ---connection server2 ---source include/show_binlog_events2.inc - ---connection server2 -drop table t2; - -# logfile groups and table spaces ---connection server1 -reset master; ---connection server2 -reset master; - ---connection server1 -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; - -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE = 4M -ENGINE=NDB; - -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE NDB; - -ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile02.dat' -INITIAL_SIZE = 4M -ENGINE=NDB; - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE = NDB; - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile02.dat' -ENGINE = NDB; - -DROP TABLESPACE ts1 -ENGINE = NDB; - -DROP LOGFILE GROUP lg1 -ENGINE =NDB; - -# having drop here instead of below sometimes triggers bug#18976 -#drop table t1; - ---connection server2 ---source include/show_binlog_events2.inc -# to track down bug#18976 ---real_sleep 10 ---source include/show_binlog_events2.inc - -drop table t1; - -# -# Bug #17827 cluster: rename of several tables in one statement, -# gets multiply logged -# ---connection server1 -reset master; -show tables; ---connection server2 -reset master; -show tables; - ---connection server1 -create table t1 (a int key) engine=ndb; -create table t2 (a int key) engine=ndb; -create table t3 (a int key) engine=ndb; -rename table t3 to t4, t2 to t3, t1 to t2, t4 to t1; ---connection server2 ---source include/show_binlog_events2.inc - -drop table t1; -drop table t2; -drop table t3; - -# -# Bug #17838 binlog not setup on seconday master after rename -# -# ---connection server1 -reset master; -show tables; ---connection server2 -reset master; -show tables; - ---connection server1 -create table t1 (a int key) engine=ndb; -insert into t1 values(1); -rename table t1 to t2; -insert into t2 values(2); - -# now we should see data in table t1 _and_ t2 -# prior to bug fix, data was missing for t2 ---connection server2 -drop table t2; ---source include/show_binlog_events2.inc diff --git a/mysql-test/suite/ndb/t/ndb_binlog_discover.test b/mysql-test/suite/ndb/t/ndb_binlog_discover.test deleted file mode 100644 index dc8275a8a39..00000000000 --- a/mysql-test/suite/ndb/t/ndb_binlog_discover.test +++ /dev/null @@ -1,36 +0,0 @@ --- source include/have_ndb.inc --- source include/have_binlog_format_mixed_or_row.inc - ---disable_warnings -drop table if exists t1; ---enable_warnings - -# -# Bug #14516 Restart of cluster can cause NDB API replication failure -# -create table t1 (a int key) engine=ndb; -reset master; ---exec $NDB_MGM --no-defaults -e "all restart -n" > /dev/null ---exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults --not-started > /dev/null ---exec $NDB_MGM --no-defaults -e "all start" > /dev/null ---exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults > /dev/null - ---disable_query_log -let $mysql_errno= 1; -while ($mysql_errno) -{ - # Table t1 is readonly until the mysqld has reconnected properly - --error 0,1036,1296 - insert into t1 values(1); - if ($mysql_errno) - { - --sleep 0.1 - } -} ---enable_query_log - ---source include/show_binlog_events2.inc -PURGE MASTER LOGS TO 'mysqld-bin.000002'; - ---source include/show_binlog_events2.inc -drop table t1; diff --git a/mysql-test/suite/ndb/t/ndb_binlog_format.test b/mysql-test/suite/ndb/t/ndb_binlog_format.test deleted file mode 100644 index e240a33a20e..00000000000 --- a/mysql-test/suite/ndb/t/ndb_binlog_format.test +++ /dev/null @@ -1,35 +0,0 @@ -# -# test different behavior of ndb using different binlog formats -# - --- source include/have_blackhole.inc --- source include/have_ndb.inc --- source include/have_log_bin.inc - -call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); - ---disable_warnings -drop table if exists t1, t2, t3; ---enable_warnings - -# -# Bug #29222 Statement mode replicates both statement and -# rows when writing to an NDB table -# -CREATE TABLE t1 (m INT, n INT) ENGINE=MYISAM; -CREATE TABLE t2 (b INT, c INT) ENGINE=BLACKHOLE; -CREATE TABLE t3 (e INT, f INT) ENGINE=NDB; -RESET MASTER; -SET SESSION BINLOG_FORMAT=STATEMENT; -INSERT INTO t1 VALUES (1,1), (1,2), (2,1), (2,2); -INSERT INTO t2 VALUES (1,1), (1,2), (2,1), (2,2); -UPDATE t1, t2 SET m = 2, b = 3 WHERE n = c; -# A transaction here is not necessary, but I wanted to group the bad statements -START TRANSACTION; -INSERT INTO t3 VALUES (1,1), (1,2), (2,1), (2,2); -UPDATE t1, t3 SET m = 2, e = 3 WHERE n = f; -UPDATE t3, t2 SET e = 2, b = 3 WHERE f = c; -COMMIT; ---source include/show_binlog_events.inc -DROP TABLE t1, t2, t3; - diff --git a/mysql-test/suite/ndb/t/ndb_binlog_ignore_db-master.opt b/mysql-test/suite/ndb/t/ndb_binlog_ignore_db-master.opt deleted file mode 100644 index e3947c0eeed..00000000000 --- a/mysql-test/suite/ndb/t/ndb_binlog_ignore_db-master.opt +++ /dev/null @@ -1 +0,0 @@ ---binlog-ignore-db=mysqltest diff --git a/mysql-test/suite/ndb/t/ndb_binlog_ignore_db.test b/mysql-test/suite/ndb/t/ndb_binlog_ignore_db.test deleted file mode 100644 index 013df54a76a..00000000000 --- a/mysql-test/suite/ndb/t/ndb_binlog_ignore_db.test +++ /dev/null @@ -1,16 +0,0 @@ --- source include/have_ndb.inc --- source include/have_binlog_format_mixed_or_row.inc -reset master; - ---disable_warnings -drop table if exists t1; -drop database if exists mysqltest; ---enable_warnings - -create database mysqltest; -use mysqltest; -create table t1 (a int primary key, b int) engine=ndb; -insert into t1 values (1, 1); --- source include/show_binlog_events2.inc - -drop database mysqltest; diff --git a/mysql-test/suite/ndb/t/ndb_binlog_log_bin.test b/mysql-test/suite/ndb/t/ndb_binlog_log_bin.test deleted file mode 100644 index 75ac766fd25..00000000000 --- a/mysql-test/suite/ndb/t/ndb_binlog_log_bin.test +++ /dev/null @@ -1,49 +0,0 @@ --- source include/have_multi_ndb.inc --- source include/have_binlog_format_mixed_or_row.inc - ---disable_warnings -connection server2; -drop table if exists t1,t2,t3; -reset master; -connection server1; -drop table if exists t1,t2,t3; -reset master; ---enable_warnings - -# basic SQL_LOG_BIN functionality -# see updates from one thread but not the other -connect (con1,localhost,root,,); -connect (con2,localhost,root,,); -# do some stuff with SQL_LOG_BIN=0 -connection con2; -set SQL_LOG_BIN=0; -create database mysqltest; -use mysqltest; -create table t1 (a int key, b int) engine=ndb; -create table t2 (a int key, b int) engine=ndb; -insert into t1 values (1,1); -alter table t1 add c int; -# we should not see it in the local server --- source include/show_binlog_events2.inc -reset master; -# we should not see it in another server -connection server2; -use mysqltest; -insert into t2 values (1,1); --- source include/show_binlog_events2.inc -reset master; -# but if you do stuff in "default" client setting -connection con1; -use mysqltest; -drop table t1; -drop table t2; -create table t1 (d int key, e int) engine=ndb; -create table t2 (d int key, e int) engine=ndb; -insert into t1 values (1,1); --- source include/show_binlog_events2.inc -# and in another server -connection server2; -use mysqltest; -insert into t2 values (1,1); --- source include/show_binlog_events2.inc -drop database mysqltest; diff --git a/mysql-test/suite/ndb/t/ndb_binlog_multi.test b/mysql-test/suite/ndb/t/ndb_binlog_multi.test deleted file mode 100644 index c39034c71f6..00000000000 --- a/mysql-test/suite/ndb/t/ndb_binlog_multi.test +++ /dev/null @@ -1,82 +0,0 @@ --- source include/have_multi_ndb.inc --- source include/have_binlog_format_mixed_or_row.inc - ---disable_warnings -connection server2; -drop table if exists t1,t2,t3; -connection server1; -drop table if exists t1,t2,t3; ---enable_warnings - -# Dummy table create/drop to avoid a race where table is created -# before event subscription is set up, causing test failure (BUG#20677). -connection server2; -CREATE TABLE t3 (dummy INT PRIMARY KEY) ENGINE = NDB; -connection server1; -DROP TABLE t3; - -# reset for test -connection server1; -reset master; -connection server2; -reset master; - -# -# basic test to see if one server sees the table from the other -# and sets up the replication correctly -# - -# create table on the other server -connection server2; -CREATE TABLE t2 (a INT PRIMARY KEY, b int) ENGINE = NDB; - -# insert something on server2 -INSERT INTO t2 VALUES (1,1),(2,2); -# verify that we get the data in the binlog ---source include/show_binlog_events2.inc -select * from t2 order by a; ---replace_column 1 -SELECT @the_epoch:=epoch,inserts,updates,deletes,schemaops FROM - mysql.ndb_binlog_index ORDER BY epoch DESC LIMIT 1; -let $the_epoch= `SELECT @the_epoch`; - -# see if we got something on server1 -connection server1; -SELECT * FROM t2 ORDER BY a; -# doing drop table will ensure that all the events have been received -DROP TABLE t2; -# verify thar we have table and data in binlog ---source include/show_binlog_events2.inc ---replace_result $the_epoch -eval SELECT inserts,updates,deletes,schemaops FROM - mysql.ndb_binlog_index WHERE epoch=$the_epoch; - -# reset for next test -connection server1; -reset master; -connection server2; -reset master; - -# single schema ops will not show -connection server2; -CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE = NDB; -INSERT INTO t1 VALUES (1),(2); ---source include/show_binlog_events2.inc ---replace_column 1 -SELECT @the_epoch2:=epoch,inserts,updates,deletes,schemaops FROM - mysql.ndb_binlog_index ORDER BY epoch DESC LIMIT 1; -let $the_epoch2= `SELECT @the_epoch2`; - ---replace_result $the_epoch $the_epoch2 -eval SELECT inserts,updates,deletes,schemaops FROM - mysql.ndb_binlog_index WHERE epoch > $the_epoch AND epoch <= $the_epoch2; - -# now see that we have the events on the other server -connection server2; -# doing drop table will ensure that all the events have been received -drop table t1; -# verify thar we have table and data in binlog ---source include/show_binlog_events2.inc ---replace_result $the_epoch $the_epoch2 -eval SELECT inserts,updates,deletes,schemaops FROM - mysql.ndb_binlog_index WHERE epoch > $the_epoch AND epoch <= $the_epoch2; diff --git a/mysql-test/suite/ndb/t/ndb_bitfield.test b/mysql-test/suite/ndb/t/ndb_bitfield.test deleted file mode 100644 index de0ae23bfe6..00000000000 --- a/mysql-test/suite/ndb/t/ndb_bitfield.test +++ /dev/null @@ -1,124 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -drop table if exists t1; ---enable_warnings - -create table t1 ( - pk1 int not null primary key, - b bit(64) -) engine=ndbcluster; - -show create table t1; -insert into t1 values -(0,b'1111111111111111111111111111111111111111111111111111111111111111'), -(1,b'1000000000000000000000000000000000000000000000000000000000000000'), -(2,b'0000000000000000000000000000000000000000000000000000000000000001'), -(3,b'1010101010101010101010101010101010101010101010101010101010101010'), -(4,b'0101010101010101010101010101010101010101010101010101010101010101'); -select hex(b) from t1 order by pk1; -drop table t1; - -create table t1 ( - pk1 int not null primary key, - b bit(9) -) engine=ndbcluster; -insert into t1 values -(0,b'000000000'), -(1,b'000000001'), -(2,b'000000010'), -(3,b'000000011'), -(4,b'000000100'); -select hex(b) from t1 order by pk1; -update t1 set b = b + b'101010101'; -select hex(b) from t1 order by pk1; -drop table t1; - -create table t1 (a bit(7), b bit(9)) engine = ndbcluster; -insert into t1 values -(94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177), -(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380), -(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36), -(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499), -(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403), -(44, 307), (68, 454), (57, 135); -select a+0 from t1 order by a; -select b+0 from t1 order by b; -drop table t1; - -create table t1 ( - dummyKey INTEGER NOT NULL, - a001 TINYINT, - a010 TINYINT, - a012 TINYINT, - a015 TINYINT, - a016 TINYINT, - a017 TINYINT, - a019 TINYINT, - a029 TINYINT, - a030 TINYINT, - a031 TINYINT, - a032 TINYINT, - a042 TINYINT, - a043 TINYINT, - a044 TINYINT, - a3001 TINYINT, - a3002 TINYINT, - a3003 TINYINT, - a3004 TINYINT, - a3005 TINYINT, - a3021 TINYINT, - a3022 TINYINT, - a BIT(6), - b BIT(6), - c BIT(6), - d TINYINT, - e TINYINT, - f TINYINT, - g TINYINT, - h TINYINT, - i TINYINT, - j TINYINT, - k TINYINT, - l TINYINT, - m TINYINT, - n TINYINT, - o TINYINT, - a034 TINYINT, -PRIMARY KEY USING HASH (dummyKey) ) engine=ndb; -INSERT INTO `t1` VALUES -(1,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'000001',b'111111',b'111110',4,5,5,5,5,5,5,5,5,5,3,2,1), -(2,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'000010',b'000000',b'111101',4,5,5,5,5,5,5,5,5,5,3,2,1), -(3,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'000100',b'001111',b'111011',4,5,5,5,5,5,5,5,5,5,3,2,1), -(4,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'001000',b'110000',b'110111',4,5,5,5,5,5,5,5,5,5,3,2,1), -(5,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'010000',b'100001',b'101111',4,5,5,5,5,5,5,5,5,5,3,2,1), -(6,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'100000',b'010010',b'011111',4,5,5,5,5,5,5,5,5,5,3,2,1), -(7,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'000000',b'001100',b'111111',4,5,5,5,5,5,5,5,5,5,3,2,1), -(8,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'111111',b'000000',b'000000',4,5,5,5,5,5,5,5,5,5,3,2,1); ---exec $MYSQL_DUMP --hex-blob --compact --order-by-primary --skip-extended-insert --no-create-info test t1 -drop table t1; - ---error 1005 -create table t1 ( - pk1 bit(9) not null primary key, - b int -) engine=ndbcluster; -show warnings; - ---error 1005 -create table t1 ( - pk1 int not null primary key, - b bit(9), - key(b) -) engine=ndbcluster; -show warnings; - -# bug#16125 -create table t1 ( - pk1 int primary key, - b bit(32) not null -) engine=ndbcluster; - -insert into t1 values (1,1); -drop table t1; diff --git a/mysql-test/suite/ndb/t/ndb_blob.test b/mysql-test/suite/ndb/t/ndb_blob.test deleted file mode 100644 index 0388913df8b..00000000000 --- a/mysql-test/suite/ndb/t/ndb_blob.test +++ /dev/null @@ -1,519 +0,0 @@ ---source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -drop table if exists t1; -drop database if exists test2; ---enable_warnings - -# -# Minimal NDB blobs test. -# -# On NDB API level there is an extensive test program "testBlobs". -# A prerequisite for this handler test is that "testBlobs" succeeds. -# - -# -- general test starts -- - -# make test harder with autocommit off -set autocommit=0; - -create table t1 ( - a int not null primary key, - b text not null, - c int not null, - d longblob, - key (c) -) engine=ndbcluster; - -# -- values -- - -# x0 size 256 (current inline size) -set @x0 = '01234567012345670123456701234567'; -set @x0 = concat(@x0,@x0,@x0,@x0,@x0,@x0,@x0,@x0); - -# b1 length 2000+256 (blob part aligned) -set @b1 = 'b1'; -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@x0); -# d1 length 3000 -set @d1 = 'dd1'; -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); - -# b2 length 20000 -set @b2 = 'b2'; -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -# d2 length 30000 -set @d2 = 'dd2'; -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); - -select length(@x0),length(@b1),length(@d1) from dual; -select length(@x0),length(@b2),length(@d2) from dual; - -# -- pk ops -- - -insert into t1 values(1,@b1,111,@d1); -insert into t1 values(2,@b2,222,@d2); -commit; ---replace_column 9 # -explain select * from t1 where a = 1; - -# pk read -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where a=1; -select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3) -from t1 where a=2; - -# pk update -update t1 set b=@b2,d=@d2 where a=1; -update t1 set b=@b1,d=@d1 where a=2; -commit; -select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3) -from t1 where a=1; -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where a=2; - -# pk update -update t1 set b=concat(b,b),d=concat(d,d) where a=1; -update t1 set b=concat(b,b),d=concat(d,d) where a=2; -commit; -select a,length(b),substr(b,1+4*9000,2),length(d),substr(d,1+6*9000,3) -from t1 where a=1; -select a,length(b),substr(b,1+4*900,2),length(d),substr(d,1+6*900,3) -from t1 where a=2; - -# pk update to null -update t1 set d=null where a=1; -commit; -select a from t1 where d is null; - -# bug#24028 - does not occur on MySQL level -# bug#17986 - not seen by us anymore but could show as warning here -delete from t1 where a=45567; -commit; - -# pk delete -delete from t1 where a=1; -delete from t1 where a=2; -commit; -select count(*) from t1; - -# -- replace ( bug-6018 ) -- - -# insert -replace t1 set a=1,b=@b1,c=111,d=@d1; -replace t1 set a=2,b=@b2,c=222,d=@d2; -commit; ---replace_column 9 # -explain select * from t1 where a = 1; - -# pk read -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where a=1; -select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3) -from t1 where a=2; - -# update -replace t1 set a=1,b=@b2,c=111,d=@d2; -replace t1 set a=2,b=@b1,c=222,d=@d1; -commit; -select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3) -from t1 where a=1; -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where a=2; - -# update -replace t1 set a=1,b=concat(@b2,@b2),c=111,d=concat(@d2,@d2); -replace t1 set a=2,b=concat(@b1,@b1),c=222,d=concat(@d1,@d1); -commit; -select a,length(b),substr(b,1+4*9000,2),length(d),substr(d,1+6*9000,3) -from t1 where a=1; -select a,length(b),substr(b,1+4*900,2),length(d),substr(d,1+6*900,3) -from t1 where a=2; - -# update to null -replace t1 set a=1,b='xyz',c=111,d=null; -commit; -select a,b from t1 where d is null; - -# pk delete -delete from t1 where a=1; -delete from t1 where a=2; -commit; -select count(*) from t1; - -# -- hash index ops -- - -insert into t1 values(1,@b1,111,@d1); -insert into t1 values(2,@b2,222,@d2); -commit; ---replace_column 9 # -explain select * from t1 where c = 111; - -# hash key read -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where c=111; -select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3) -from t1 where c=222; - -# hash key update -update t1 set b=@b2,d=@d2 where c=111; -update t1 set b=@b1,d=@d1 where c=222; -commit; -select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3) -from t1 where c=111; -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where c=222; - -# hash key update to null -update t1 set d=null where c=111; -commit; -select a from t1 where d is null; - -# hash key delete -delete from t1 where c=111; -delete from t1 where c=222; -commit; -select count(*) from t1; - -# -- table scan ops, short values -- - -insert into t1 values(1,'b1',111,'dd1'); -insert into t1 values(2,'b2',222,'dd2'); -insert into t1 values(3,'b3',333,'dd3'); -insert into t1 values(4,'b4',444,'dd4'); -insert into t1 values(5,'b5',555,'dd5'); -insert into t1 values(6,'b6',666,'dd6'); -insert into t1 values(7,'b7',777,'dd7'); -insert into t1 values(8,'b8',888,'dd8'); -insert into t1 values(9,'b9',999,'dd9'); -commit; ---replace_column 9 # -explain select * from t1; - -# table scan read -select * from t1 order by a; - -# table scan update -update t1 set b=concat(a,'x',b),d=concat(a,'x',d); -commit; -select * from t1 order by a; - -# table scan delete -delete from t1; -commit; -select count(*) from t1; - -# -- table scan ops, long values -- - -insert into t1 values(1,@b1,111,@d1); -insert into t1 values(2,@b2,222,@d2); -commit; ---replace_column 9 # -explain select * from t1; - -# table scan read -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 order by a; - -# table scan update -update t1 set b=concat(b,b),d=concat(d,d); -commit; -select a,length(b),substr(b,1+4*9000,2),length(d),substr(d,1+6*9000,3) -from t1 order by a; - -# table scan delete -delete from t1; -commit; -select count(*) from t1; - -# -- range scan ops, short values -- - -insert into t1 values(1,'b1',111,'dd1'); -insert into t1 values(2,'b2',222,'dd2'); -insert into t1 values(3,'b3',333,'dd3'); -insert into t1 values(4,'b4',444,'dd4'); -insert into t1 values(5,'b5',555,'dd5'); -insert into t1 values(6,'b6',666,'dd6'); -insert into t1 values(7,'b7',777,'dd7'); -insert into t1 values(8,'b8',888,'dd8'); -insert into t1 values(9,'b9',999,'dd9'); -commit; ---replace_column 9 # -explain select * from t1 where c >= 100 order by a; - -# range scan read -select * from t1 where c >= 100 order by a; - -# range scan update -update t1 set b=concat(a,'x',b),d=concat(a,'x',d) -where c >= 100; -commit; -select * from t1 where c >= 100 order by a; - -# range scan delete -delete from t1 where c >= 100; -commit; -select count(*) from t1; - -# -- range scan ops, long values -- - -insert into t1 values(1,@b1,111,@d1); -insert into t1 values(2,@b2,222,@d2); -commit; ---replace_column 9 # -explain select * from t1 where c >= 100 order by a; - -# range scan read -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where c >= 100 order by a; - -# range scan update -update t1 set b=concat(b,b),d=concat(d,d); -commit; -select a,length(b),substr(b,1+4*9000,2),length(d),substr(d,1+6*9000,3) -from t1 where c >= 100 order by a; - -# range scan delete -delete from t1 where c >= 100; -commit; -select count(*) from t1; - -# -- rollback -- - -insert into t1 values(1,@b1,111,@d1); -insert into t1 values(2,@b2,222,@d2); -# 626 -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where a = 0; -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where a = 1; -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where a = 2; -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 order by a; -rollback; -select count(*) from t1; - -# -- alter table and multi db -- - -insert into t1 values(1,'b1',111,'dd1'); -insert into t1 values(2,'b2',222,'dd2'); -insert into t1 values(3,'b3',333,'dd3'); -insert into t1 values(4,'b4',444,'dd4'); -insert into t1 values(5,'b5',555,'dd5'); -insert into t1 values(6,'b6',666,'dd6'); -insert into t1 values(7,'b7',777,'dd7'); -insert into t1 values(8,'b8',888,'dd8'); -insert into t1 values(9,'b9',999,'dd9'); -commit; - -select * from t1 order by a; -alter table t1 add x int; -select * from t1 order by a; -alter table t1 drop x; -select * from t1 order by a; - -create database test2; -use test2; - -CREATE TABLE t2 ( - a bigint unsigned NOT NULL PRIMARY KEY, - b int unsigned not null, - c int unsigned -) engine=ndbcluster; - -insert into t2 values (1,1,1),(2,2,2); -select * from test.t1,t2 where test.t1.a = t2.a order by test.t1.a; - -drop table t2; -use test; - -select * from t1 order by a; -alter table t1 add x int; -select * from t1 order by a; -alter table t1 drop x; -select * from t1 order by a; - -# -- end general test -- - -drop table t1; -drop database test2; - -# -- bug-5252 tinytext crashes + no-commit result + replace -- - -set autocommit=0; -create table t1 ( - a int not null primary key, - b tinytext -) engine=ndbcluster; - -insert into t1 values(1, 'x'); -update t1 set b = 'y'; -select * from t1; -delete from t1; -select * from t1; -commit; -replace t1 set a=2, b='y'; -select * from t1; -delete from t1; -select * from t1; -drop table t1; - -# -- bug-5013 insert empty string to text -- - -set autocommit=0; -create table t1 ( - a int not null primary key, - b text not null -) engine=ndbcluster; - -insert into t1 values(1, ''); -select * from t1; -commit; -drop table t1; - -# -- bug #5349 -- -set autocommit=1; -use test; -CREATE TABLE t1 ( - a int, - b text, - PRIMARY KEY (a) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; - -INSERT INTO t1 VALUES -(1,'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'); -INSERT INTO t1 VALUES -(2,'BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB'); - -select * from t1 order by a; -alter table t1 engine=ndb; -select * from t1 order by a; - -# -- bug #5872 -- -set autocommit=1; -alter table t1 engine=myisam; -select * from t1 order by a; -drop table t1; - -# -- bug #7340 -- -create table t1 ( - id int(11) unsigned primary key NOT NULL auto_increment, - msg text NOT NULL -) engine=ndbcluster default charset=utf8; -insert into t1 (msg) values( -'Tries to validate (8 byte length + inline bytes) as UTF8 :( -Fast fix: removed validation for Text. It is not yet indexable -so bad data will not crash kernel.'); -select * from t1; -drop table t1; - -# -- bug #19201 -create table t1 ( - a int primary key not null auto_increment, - b text -) engine=ndbcluster; ---disable_query_log -set autocommit=1; -# more rows than batch size (64) -# for this bug no blob parts would be necessary -let $1 = 500; -while ($1) -{ - insert into t1 (b) values (repeat('x',4000)); - dec $1; -} ---enable_query_log -select count(*) from t1; -truncate t1; -select count(*) from t1; -drop table t1; - -# -- bug#19956 - var* key, complex key - -create table t1 ( - a varchar(40) not null, - b mediumint not null, - t text, - c varchar(2) not null, - d bigint not null, - primary key (a,b,c), - key (c,a), - unique key (d) -) engine=ndb; - ---disable_query_log -set @s1 = 'rggurloniukyehuxdbfkkyzlceixzrehqhvxvxbpwizzvjzpucqmzrhzxzfau'; -set @s2 = 'ykyymbzqgqlcjhlhmyqelfoaaohvtbekvifukdtnvcrrjveevfakxarxexomz'; -set @s3 = 'dbnfqyzgtqxalcrwtfsqabknvtfcbpoonxsjiqvmhnfikxxhcgoexlkoezvah'; -set @v1 = repeat(@s1,123); -set @v2 = repeat(@s2,234); -set @v3 = repeat(@s3,345); -set @v4 = NULL; ---enable_query_log - -insert into t1 (a,b,c,d,t) values ('a',1110,'a',1,@v1); -insert into t1 (a,b,c,d,t) values ('b',1110,'a',2,@v2); -insert into t1 (a,b,c,d,t) values ('a',1110,'b',3,@v3); -insert into t1 (a,b,c,d,t) values ('b',1110,'b',4,@v4); -select a,b,c,d,sha1(t) from t1 order by c,a; - -select a,b,c,d,sha1(t) from t1 where a='a' and b=1110 and c='a'; -select a,b,c,d,sha1(t) from t1 where a='a' and b=1110 and c='b'; - -update t1 set t=@v4 where a='b' and b=1110 and c='a'; -update t1 set t=@v2 where a='b' and b=1110 and c='b'; -select a,b,c,d,sha1(t) from t1 order by c,a; - -update t1 set t=@v2 where d=2; -update t1 set t=@v4 where d=4; -select a,b,c,d,sha1(t) from t1 order by c,a; - -update t1 set t=@v4 where a='b' and c='a'; -update t1 set t=@v2 where a='b' and c='b'; -select a,b,c,d,sha1(t) from t1 order by c,a; - -update t1 set t=@v2 where b+d=1112; -update t1 set t=@v4 where b+d=1114; -select a,b,c,d,sha1(t) from t1 order by c,a; - -delete from t1 where a='a' and b=1110 and c='a'; -delete from t1 where a='b' and c='a'; -delete from t1 where d=3; -delete from t1 where b+d=1114; -select count(*) from t1; - -drop table t1; - -# End of 4.1 tests - - -# bug # 30674 : -# NOT NULL Blobs should default to zero-length. Not NULL TEXT -# should default to zero-chars -create table t1( - a int, - blob_nn blob not null, - text_nn text not null, - blob_nl blob, - text_nl text, - primary key(a) -) engine=ndb; - -insert into t1(a) values (1); -insert into t1(a, text_nl) values (2, 'MySQL Cluster NDB'); - -select a, length(blob_nn), length(text_nn), blob_nl, text_nl from t1 order by a; - -drop table t1; diff --git a/mysql-test/suite/ndb/t/ndb_blob_partition.test b/mysql-test/suite/ndb/t/ndb_blob_partition.test deleted file mode 100644 index 35df57b96ba..00000000000 --- a/mysql-test/suite/ndb/t/ndb_blob_partition.test +++ /dev/null @@ -1,97 +0,0 @@ ---source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_query_log -set new=on; ---enable_query_log - ---disable_warnings -drop table if exists t1; ---enable_warnings - -# -# Minimal NDB blobs test with range partitions. -# - -create table t1 ( - a mediumint not null, - b text not null, - c int not null, - d longblob, - primary key using hash (a,c), - unique key (c) -) - engine=ndb - partition by range (c) - partitions 3 - ( partition p1 values less than (200), - partition p2 values less than (300), - partition p3 values less than (400)); - ---disable_query_log -sleep 1; - -# length 61 -set @s0 = 'rggurloniukyehuxdbfkkyzlceixzrehqhvxvxbpwizzvjzpucqmzrhzxzfau'; -set @s1 = 'ykyymbzqgqlcjhlhmyqelfoaaohvtbekvifukdtnvcrrjveevfakxarxexomz'; -set @s2 = 'dbnfqyzgtqxalcrwtfsqabknvtfcbpoonxsjiqvmhnfikxxhcgoexlkoezvah'; - -set @v1 = repeat(@s0, 100); # 1d42dd9090cf78314a06665d4ea938c35cc760f4 -set @v2 = repeat(@s1, 200); # 10d3c783026b310218d10b7188da96a2401648c6 -set @v3 = repeat(@s2, 300); # a33549d9844092289a58ac348dd59f09fc28406a -set @v4 = repeat(@s0, 400); # daa61c6de36a0526f0d47dc29d6b9de7e6d2630c -set @v5 = repeat(@s1, 500); # 70fc9a7d08beebc522258bfb02000a30c77a8f1d -set @v6 = repeat(@s2, 600); # 090565c580809efed3d369481a4bbb168b20713e -set @v7 = repeat(@s0, 700); # 1e0070bec426871a46291de27b9bd6e4255ab4e5 -set @v8 = repeat(@s1, 800); # acbaba01bc2e682f015f40e79d9cbe475db3002e -set @v9 = repeat(@s2, 900); # 9ee30d99162574f79c66ae95cdf132dcf9cbc259 ---enable_query_log - -# -- insert -- -insert into t1 values (1, @v1, 101, @v2); -insert into t1 values (1, @v2, 102, @v3); -insert into t1 values (1, @v3, 103, @v4); -insert into t1 values (2, @v4, 201, @v5); -insert into t1 values (2, @v5, 202, @v6); -insert into t1 values (2, @v6, 203, @v7); -insert into t1 values (3, @v7, 301, @v8); -insert into t1 values (3, @v8, 302, @v9); -insert into t1 values (3, @v9, 303, @v1); -select a, sha1(b), c, sha1(d) from t1 order by a; - -# -- pk read -- -select a, sha1(b), c, sha1(d) from t1 where a = 1 and c = 101; -select a, sha1(b), c, sha1(d) from t1 where a = 2 and c = 201; -select a, sha1(b), c, sha1(d) from t1 where a = 3 and c = 301; - -# -- pk update -- -update t1 set b = @v3, d = @v4 where a = 1 and c = 102; -update t1 set b = @v6, d = @v7 where a = 2 and c = 202; -update t1 set b = @v9, d = @v1 where a = 3 and c = 302; -select a, sha1(b), c, sha1(d) from t1 order by a; - -# -- hash index update -- -update t1 set b = @v4, d = @v5 where c = 103; -update t1 set b = @v7, d = @v8 where c = 203; -update t1 set b = @v1, d = @v2 where c = 303; -select a, sha1(b), c, sha1(d) from t1 order by a; - -# -- full scan update -- -update t1 set b = @v5, d = @v6; -select a, sha1(b), c, sha1(d) from t1 order by a; - -# -- range scan update -update t1 set b = @v1, d = @v2 where 100 < c and c < 200; -update t1 set b = @v4, d = @v5 where 200 < c and c < 300; -update t1 set b = @v7, d = @v8 where 300 < c and c < 400; -select a, sha1(b), c, sha1(d) from t1 order by a; - -# -- delete -- -delete from t1 where a = 1 and c = 101; -delete from t1 where c = 102; -# delete from t1 where c < 300; # XXX coredump -delete from t1; -select a, sha1(b), c, sha1(d) from t1 order by a; - -# -- clean up -- -drop table t1; diff --git a/mysql-test/suite/ndb/t/ndb_bug26793.test b/mysql-test/suite/ndb/t/ndb_bug26793.test deleted file mode 100644 index f35d8808c1a..00000000000 --- a/mysql-test/suite/ndb/t/ndb_bug26793.test +++ /dev/null @@ -1,35 +0,0 @@ --- source include/have_ndb.inc - ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - -CREATE TABLE `test` ( -`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY , -`t` VARCHAR( 10 ) NOT NULL -) ENGINE = ndbcluster; - -# Add user1@localhost with a specific password -# and connect as that user -GRANT USAGE ON *.* TO user1@localhost IDENTIFIED BY 'pass'; -connect (user1,localhost,user1,pass,*NO-ONE*); - -# Run the query 100 times -disable_query_log; -disable_result_log; -let $i= 100; -while ($i) -{ -select count(*) from information_schema.tables union all select count(*) from information_schema.tables union all select count(*) from information_schema.tables; -dec $i; -} -enable_query_log; -enable_result_log; - -disconnect user1; - -# Switch back to the default connection and cleanup -connection default; -DROP TABLE `test`.`test`; -drop user user1@localhost; - diff --git a/mysql-test/suite/ndb/t/ndb_bug31477.test b/mysql-test/suite/ndb/t/ndb_bug31477.test deleted file mode 100644 index 41c519e56fd..00000000000 --- a/mysql-test/suite/ndb/t/ndb_bug31477.test +++ /dev/null @@ -1,109 +0,0 @@ ---source include/have_ndb.inc - ---disable_warnings -drop table if exists t1; ---enable_warnings - -# setup - -connect (con1,localhost,root,,test); -connect (con2,localhost,root,,test); - -# unique index -connection con1; -create table t1(a int primary key, b int, c int, unique(b)) engine = ndb; -insert into t1 values (2,2,2); -insert into t1 values (3,3,3); -insert into t1 values (4,4,4); - -begin; -insert into t1 values (1,1,1); - -connection con2; -begin; ---error 1205 -update t1 set c = 2 where b = 1; -rollback; - -connection con1; -rollback; -drop table t1; -# ordered index - -connection con1; -create table t1(a int primary key, b int, c int, key(b)) engine = ndb; -insert into t1 values (2,2,2); -insert into t1 values (3,3,3); -insert into t1 values (4,4,4); - -begin; -insert into t1 values (1,1,1); - -connection con2; -begin; ---error 1205 -update t1 set c = 2 where b = 1; -rollback; - -connection con1; -rollback; -drop table t1; - -# multiple versions - ---echo --con1 -connection con1; -create table t1(a int primary key, b int, c int, key(b)) engine = ndb; -insert into t1 values (1,1,1); -insert into t1 values (2,2,2); -insert into t1 values (3,3,3); -insert into t1 values (4,4,4); - -begin; -update t1 set c = 10 where a = 1; -update t1 set c = 20 where a = 1; -update t1 set c = 30 where a = 1; - ---echo --con1 c=30 -select * from t1 where b >= 1 order by b; ---echo --con2 c=1 -connection con2; -select * from t1 where b >= 1 order by b; - ---echo --con1 -connection con1; -delete from t1 where a = 1; - ---echo --con1 c=none -select * from t1 where b >= 1 order by b; ---echo --con2 c=1 -connection con2; -select * from t1 where b >= 1 order by b; - ---echo --con1 -connection con1; -commit; - ---echo --con1 c=none -select * from t1 where b >= 1 order by b; ---echo --con2 c=none -connection con2; -select * from t1 where b >= 1 order by b; - ---echo --con1 -connection con1; -begin; -insert into t1 values (1,1,1); -update t1 set c = 10 where a = 1; -update t1 set c = 20 where a = 1; -update t1 set c = 30 where a = 1; - ---echo --con1 c=30 -select * from t1 where b >= 1 order by b; ---echo --con2 c=none -connection con2; -select * from t1 where b >= 1 order by b; - -# this fails with "no such table" via con2 ??? -connection con1; -drop table t1; diff --git a/mysql-test/suite/ndb/t/ndb_cache.test b/mysql-test/suite/ndb/t/ndb_cache.test deleted file mode 100644 index 9c299b61c24..00000000000 --- a/mysql-test/suite/ndb/t/ndb_cache.test +++ /dev/null @@ -1,122 +0,0 @@ --- source include/have_query_cache.inc --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -drop table if exists t1; ---enable_warnings - -# Turn on and reset query cache -set GLOBAL query_cache_type=on; -set GLOBAL query_cache_size=1355776; -reset query cache; -flush status; - -# Create test table in NDB -CREATE TABLE t1 ( pk int not null primary key, - a int, b int not null, c varchar(20)) ENGINE=ndbcluster; -insert into t1 value (1, 2, 3, 'First row'); - -# Perform one query which should be inerted in query cache -select * from t1; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -# Perform the same query and make sure the query cache is hit -select * from t1; -show status like "Qcache_hits"; - -# Update the table and make sure the correct data is returned -update t1 set a=3 where pk=1; -select * from t1; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -# Insert a new record and make sure the correct data is returned -insert into t1 value (2, 7, 8, 'Second row'); -insert into t1 value (4, 5, 6, 'Fourth row'); -select * from t1 order by pk; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -select * from t1 order by pk; -show status like "Qcache_hits"; - -# Perform a "new" query and make sure the query cache is not hit -select * from t1 where b=3; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_hits"; - -# Same query again... -select * from t1 where b=3; -show status like "Qcache_hits"; - -# Delete from the table -delete from t1 where c='Fourth row'; -show status like "Qcache_queries_in_cache"; -select * from t1 where b=3; -show status like "Qcache_hits"; - -# Start another connection and check that the query cache is hit -connect (con1,localhost,root,,); -connection con1; -use test; -select * from t1 order by pk; -select * from t1 where b=3; -show status like "Qcache_hits"; - -# Update the table and switch to other connection -update t1 set a=4 where b=3; -connect (con2,localhost,root,,); -connection con2; -use test; -show status like "Qcache_queries_in_cache"; -select * from t1 order by pk desc; -select * from t1 order by pk desc; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con1; -select * from t1 order by pk desc; -select * from t1 order by pk desc; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -# Use transactions and make sure the query cache is not updated until -# transaction is commited -begin; -update t1 set a=5 where pk=1; -# Note!! the below test shows that table is invalidated -# before transaction is committed -# TODO Fix so that cache is not invalidated HERE! -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con2; -select * from t1 order by pk desc; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con1; -commit; -# TODO Here query is invalidated once again, commit count in NDB has changed -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con2; -select * from t1 order by pk desc; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con1; -select * from t1 order by pk desc; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -drop table t1; - -show status like "Qcache_queries_in_cache"; - -SET GLOBAL query_cache_size=0; - -# End of 4.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_cache2.test b/mysql-test/suite/ndb/t/ndb_cache2.test deleted file mode 100644 index 352b01ef73f..00000000000 --- a/mysql-test/suite/ndb/t/ndb_cache2.test +++ /dev/null @@ -1,361 +0,0 @@ --- source include/have_query_cache.inc --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -drop table if exists t1, t2, t3, t4, t5; ---enable_warnings - - -# Turn on and reset query cache -set GLOBAL query_cache_type=on; -set GLOBAL query_cache_size=1355776; -# Turn on thread that will fetch commit count for open tables -set GLOBAL ndb_cache_check_time=100; -reset query cache; -flush status; - -# Create test tables in NDB -CREATE TABLE t1 ( - pk int not null primary key, - a1 int, - b1 int not null, - c1 varchar(20) -) ENGINE=ndb; -CREATE TABLE t2 ( - pk int not null primary key, - a2 int, - b2 int not null -) ENGINE=ndb; -CREATE TABLE t3 ( - pk int not null primary key, - a3 int, - b3 int not null, - c3 int not null, - d3 varchar(20) -) ENGINE=ndb; -CREATE TABLE t4 ( - a4 int, - b4 int not null, - c4 char(20) -) ENGINE=ndbcluster; -CREATE TABLE t5 ( - pk int not null primary key, - a5 int, - b5 int not null, - c5 varchar(255) -) ENGINE=ndbcluster; -insert into t1 value (1, 2, 3, 'First row'); -insert into t2 value (1, 2, 3); -insert into t3 value (1, 2, 3, 4, '3 - First row'); -insert into t4 value (2, 3, '4 - First row'); -insert into t5 value (1, 2, 3, '5 - First row'); - -# Perform one query which should be inserted in query cache -select * from t1; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -# Perform the same query and make sure the query cache is hit -select * from t1; -show status like "Qcache_hits"; - -# Update the table and make sure the correct data is returned -update t1 set a1=3 where pk=1; -select * from t1; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -# Insert a new record and make sure the correct data is returned -insert into t1 value (2, 7, 8, 'Second row'); -insert into t1 value (4, 5, 6, 'Fourth row'); -select * from t1 order by pk desc; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -select * from t1 order by pk desc; -show status like "Qcache_hits"; - -# Perform a "new" query and make sure the query cache is not hit -select * from t1 where b1=3; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_hits"; - -# Same query again... -select * from t1 where b1=3; -show status like "Qcache_hits"; - -# Delete from the table -delete from t1 where c1='Fourth row'; -show status like "Qcache_queries_in_cache"; -select * from t1 where b1=3; -show status like "Qcache_hits"; - -# Start another connection and check that the query cache is hit -connect (con1,localhost,root,,); -connection con1; -use test; -select * from t1 order by pk desc; -select * from t1 where b1=3; -show status like "Qcache_hits"; - -# Update the table and switch to other connection -update t1 set a1=4 where b1=3; -connect (con2,localhost,root,,); -connection con2; -use test; -show status like "Qcache_queries_in_cache"; -select * from t1 order by pk desc; -select * from t1 order by pk desc; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con1; -select * from t1 order by pk desc; -select * from t1 order by pk desc; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -# Load all tables into cache -select * from t2; -select * from t3; -select * from t4; -select * from t5; -show status like "Qcache_queries_in_cache"; - -##################################################################### -# Start transaction and perform update -# Switch to other transaction and check that update does not show up -# Switch back and commit transaction -# Switch to other transaction and check that update shows up -##################################################################### -connection con1; -flush status; -begin; -update t1 set a1=5 where pk=1; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con2; -select * from t1 order by pk desc; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con1; -commit; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con2; -select * from t1 order by pk desc; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con1; -select * from t1 order by pk desc; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -##################################################################### -# Start transaction and perform update -# Switch to other transaction and check that update does not show up -# Switch back, perform selects and commit transaction -# Switch to other transaction and check that update shows up -##################################################################### -connection con1; -flush status; -begin; -update t1 set a1=6 where pk=1; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con2; -select * from t1 order by pk desc; -select * from t1 order by pk desc; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con1; -# The two queries below will not hit cache since transaction is ongoing -select * from t1 order by pk desc; -select * from t1 order by pk desc; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -commit; - -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con2; -select * from t1 order by pk desc; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con1; -select * from t1 order by pk desc; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -##################################################################### -# Start transaction and perform insert -# Switch to other transaction and check that insert does not show up -# Switch back, perform selects and commit transaction -# Switch to other transaction and check that update shows up -##################################################################### -connection con1; -flush status; -begin; -insert into t1 set pk=5, a1=6, b1=3, c1="New row"; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con2; -select * from t1 where pk=5; -select * from t1 order by pk desc; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con1; -# The below four queries will not be cached, trans is ongoing -select * from t1 where pk=5; -select * from t1 where pk=5; -select * from t1 order by pk desc; -select * from t1 order by pk desc; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -commit; - -connection con2; -select * from t1 order by pk desc; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -connection con1; - -##################################################################### -# Start transaction and perform delete -# Switch to other transaction and check that delete does not show up -# Switch back, perform selects and commit transaction -# Switch to other transaction and check that update shows up -##################################################################### -connection con1; -flush status; -begin; -delete from t1 where pk=2; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con2; -select * from t1 where pk=2; -select * from t1 order by pk desc; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con1; -# The below four queries will not be cached, trans is ongoing -select * from t1 where pk=2; -select * from t1 order by pk desc; -select * from t1 order by pk desc; -select * from t1 where pk=2; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -commit; - -connection con2; -select * from t1 order by pk desc; -select * from t1 where pk=2; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -connection con1; - -##################################################################### -# Start a transaction which updates all tables -# Switch to other transaction and check updates does not show up -# Switch back, perform selects and commit transaction -# Switch to other transaction and check that update shows up -##################################################################### -flush status; -begin; -update t1 set a1=9 where pk=1; -update t2 set a2=9 where pk=1; -update t3 set a3=9 where pk=1; -update t4 set a4=9 where a4=2; -update t5 set a5=9 where pk=1; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con2; -select * from t1 order by pk desc; -select * from t2; -select * from t3; -select * from t4; -select * from t5; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con1; -# The below five queries will not be cached, trans is ongoing -select * from t1 order by pk desc; -select * from t1 order by pk desc; -select * from t2; -select * from t3; -select * from t4; -select * from t5; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -commit; - -connection con2; -select * from t1 order by pk desc; -select * from t2; -select * from t3; -select * from t4; -select * from t5; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -connection con1; -select * from t1 order by pk desc; -select * from t2; -select * from t3; -select * from t4; -select * from t5; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -select * from t1 order by pk desc; -select * from t2; -select * from t3; -select * from t4; -select * from t5; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -connection con2; -select * from t1 order by pk desc; -select * from t2; -select * from t3; -select * from t4; -select * from t5; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -drop table t1, t2, t3, t4, t5; - -# There should be no queries in cache, when tables have been dropped -show status like "Qcache_queries_in_cache"; - -SET GLOBAL query_cache_size=0; -SET GLOBAL ndb_cache_check_time=0; - - diff --git a/mysql-test/suite/ndb/t/ndb_cache_multi.test b/mysql-test/suite/ndb/t/ndb_cache_multi.test deleted file mode 100644 index 8c7f186b866..00000000000 --- a/mysql-test/suite/ndb/t/ndb_cache_multi.test +++ /dev/null @@ -1,71 +0,0 @@ --- source include/have_query_cache.inc --- source include/have_multi_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -drop table if exists t1, t2; ---enable_warnings - - -# Turn on and reset query cache on server1 -connection server1; -set GLOBAL query_cache_type=on; -set GLOBAL query_cache_size=1355776; -reset query cache; -flush status; - -# Turn on and reset query cache on server2 -connection server2; -set GLOBAL query_cache_type=on; -set GLOBAL query_cache_size=1355776; -reset query cache; -flush status; - - - -# Create test tables in NDB and load them into cache -# on server1 -connection server1; -create table t1 (a int) engine=ndbcluster; -create table t2 (a int) engine=ndbcluster; -insert into t1 value (2); -insert into t2 value (3); -select * from t1; -select * from t2; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - - -# Connect server2, load table in to cache, then update the table -connection server2; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -select * from t1; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -update t1 set a=3 where a=2; - -# Connect to server1 and check that cache is invalidated -# and correct data is returned -connection server1; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -select * from t1; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -drop table t1, t2; - - -# Turn off query cache on server1 -connection server1; -set GLOBAL query_cache_size=0; - -# Turn off query cache on server2 -connection server2; -set GLOBAL query_cache_size=0; diff --git a/mysql-test/suite/ndb/t/ndb_cache_multi2.test b/mysql-test/suite/ndb/t/ndb_cache_multi2.test deleted file mode 100644 index 853e4090193..00000000000 --- a/mysql-test/suite/ndb/t/ndb_cache_multi2.test +++ /dev/null @@ -1,125 +0,0 @@ --- source include/have_query_cache.inc --- source include/have_multi_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -drop table if exists t1, t2; ---enable_warnings - - -# Turn on and reset query cache on server1 -connection server1; -echo == Connected to server1 ==; -set GLOBAL query_cache_type=on; -set GLOBAL query_cache_size=1355776; -set GLOBAL ndb_cache_check_time=1; -reset query cache; -flush status; - -# Turn on and reset query cache on server2 -connection server2; -echo == Connected to server2 ==; -set GLOBAL query_cache_type=on; -set GLOBAL query_cache_size=1355776; -set GLOBAL ndb_cache_check_time=1; -reset query cache; -flush status; - -# Create test tables in NDB and load them into cache -# on server1 -connection server1; -echo == Connected to server1 ==; -create table t1 (a int) engine=ndbcluster; -create table t2 (a int) engine=ndbcluster; -insert into t1 value (2); -insert into t2 value (3); -select * from t1; -# Run the check query once to load it into qc on server1 -# See at the end of this test why we need to disable ps-protocol for -# this query (*) ---disable_ps_protocol -select a != 3 from t1; ---enable_ps_protocol -select * from t2; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - - -# Connect server2, load table in to cache, then update the table -connection server2; -echo == Connected to server2 ==; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -select * from t1; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -update t1 set a=3 where a=2; - -# Connect to server1 and check that cache is invalidated -# and correct data is returned -connection server1; -echo == Connected to server1 ==; - -# Loop and wait for max 10 seconds until query cache thread -# has invalidated the cache and the column a in t1 is equal to 3 -let $retries=20; -while (`select a != 3 from t1`) -{ - dec $retries; - if (!$retries) - { - The query_cache thread failed to invalidate query_cache in 10 seconds; - } - sleep 0.5; -} - -# Select from t1 one last time for the result file -# Column a should be 3 -select * from t1; - -# There should now be three queries in the cache -show status like "Qcache_queries_in_cache"; - -drop table t1, t2; - -# Turn off and reset query cache on server1 and server2 -connection server1; -set GLOBAL query_cache_size=0; -set GLOBAL ndb_cache_check_time=0; -reset query cache; -flush status; -connection server2; -set GLOBAL query_cache_size=0; -set GLOBAL ndb_cache_check_time=0; -reset query cache; -flush status; - -# (*) Why we need to execute the query in non-ps mode. -# The principle of this test is: two mysqlds connected to one cluster, -# both using their query cache. Queries are cached in server1 -# ("select a!=3 from t1", "select * from t1"), -# table t1 is modified in server2, we want to see that this invalidates -# the query cache of server1. Invalidation with NDB works like this: -# when a query is found in the query cache, NDB is asked if the tables -# have changed. In this test, ha_ndbcluster calls NDB every millisecond -# to collect change information about tables. -# Due to this millisecond delay, there is need for a loop ("while...") -# in this test, which waits until a query1 ("select a!=3 from t1") is -# invalidated (which is equivalent to it returning -# up-to-date results), and then expects query2 ("select * from t1") -# to have been invalidated (see up-to-date results). -# But when enabling --ps-protocol in this test, the logic breaks, -# because query1 is still done via mysql_real_query() (see mysqltest.c: -# eval_expr() always uses mysql_real_query()). So, query1 returning -# up-to-date results is not a sign of it being invalidated in the cache, -# because it was NOT in the cache ("select a!=3 from t1" on line 39 -# was done with prep stmts, while `select a!=3 from t1` is not, -# thus the second does not see the first in the cache). Thus, we may run -# query2 when cache still has not been invalidated. -# The solution is to make the initial "select a!=3 from t1" run -# as a normal query, this repairs the broken logic. -# But note, "select * from t1" is still using prepared statements -# which was the goal of this test with --ps-protocol. diff --git a/mysql-test/suite/ndb/t/ndb_charset.test b/mysql-test/suite/ndb/t/ndb_charset.test deleted file mode 100644 index 2d9f66564bc..00000000000 --- a/mysql-test/suite/ndb/t/ndb_charset.test +++ /dev/null @@ -1,257 +0,0 @@ ---source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -drop table if exists t1; ---enable_warnings - -# -# Minimal NDB charset test. -# - -# pk - binary - -create table t1 ( - a char(3) character set latin1 collate latin1_bin primary key -) engine=ndb; -# ok -insert into t1 values('aAa'); -insert into t1 values('aaa'); -insert into t1 values('AAA'); -# 3 -select * from t1 order by a; -# 1 -select * from t1 where a = 'aAa'; -# 1 -select * from t1 where a = 'aaa'; -# 0 -select * from t1 where a = 'AaA'; -# 1 -select * from t1 where a = 'AAA'; -drop table t1; - -# pk - case insensitive - -create table t1 ( - a char(3) character set latin1 collate latin1_swedish_ci primary key -) engine=ndb; -# ok -insert into t1 values('aAa'); -# fail ---error ER_DUP_ENTRY -insert into t1 values('aaa'); ---error ER_DUP_ENTRY -insert into t1 values('AAA'); -# 1 -select * from t1 order by a; -# 1 -select * from t1 where a = 'aAa'; -# 1 -select * from t1 where a = 'aaa'; -# 1 -select * from t1 where a = 'AaA'; -# 1 -select * from t1 where a = 'AAA'; -drop table t1; - -# pk - varchar - -create table t1 ( - a varchar(20) character set latin1 collate latin1_swedish_ci primary key -) engine=ndb; -# -insert into t1 values ('A'),('b '),('C '),('d '),('E'),('f'); --- error ER_DUP_ENTRY -insert into t1 values('b'); --- error ER_DUP_ENTRY -insert into t1 values('a '); -# -select a,length(a) from t1 order by a; -select a,length(a) from t1 order by a desc; -select * from t1 where a = 'a'; -select * from t1 where a = 'a '; -select * from t1 where a = 'd'; -drop table t1; - -# unique hash index - binary - -create table t1 ( - p int primary key, - a char(3) character set latin1 collate latin1_bin not null, - unique key(a) -) engine=ndb; -# ok -insert into t1 values(1, 'aAa'); -insert into t1 values(2, 'aaa'); -insert into t1 values(3, 'AAA'); -# 3 -select * from t1 order by p; -# 1 -select * from t1 where a = 'aAa'; -# 1 -select * from t1 where a = 'aaa'; -# 0 -select * from t1 where a = 'AaA'; -# 1 -select * from t1 where a = 'AAA'; -drop table t1; - -# unique hash index - case insensitive - -create table t1 ( - p int primary key, - a char(3) character set latin1 collate latin1_swedish_ci not null, - unique key(a) -) engine=ndb; -# ok -insert into t1 values(1, 'aAa'); -# fail ---error ER_DUP_ENTRY -insert into t1 values(2, 'aaa'); ---error ER_DUP_ENTRY -insert into t1 values(3, 'AAA'); -# 1 -select * from t1 order by p; -# 1 -select * from t1 where a = 'aAa'; -# 1 -select * from t1 where a = 'aaa'; -# 1 -select * from t1 where a = 'AaA'; -# 1 -select * from t1 where a = 'AAA'; -drop table t1; - -# unique hash index - varchar - -create table t1 ( - p int primary key, - a varchar(20) character set latin1 collate latin1_swedish_ci not null, - unique key(a) -) engine=ndb; -# -insert into t1 values (1,'A'),(2,'b '),(3,'C '),(4,'d '),(5,'E'),(6,'f'); --- error ER_DUP_ENTRY -insert into t1 values(99,'b'); --- error ER_DUP_ENTRY -insert into t1 values(99,'a '); -# -select a,length(a) from t1 order by a; -select a,length(a) from t1 order by a desc; -select * from t1 where a = 'a'; -select * from t1 where a = 'a '; -select * from t1 where a = 'd'; -drop table t1; - -# ordered index - binary - -create table t1 ( - p int primary key, - a char(3) character set latin1 collate latin1_bin not null, - index(a) -) engine=ndb; -# ok -insert into t1 values(1, 'aAa'); -insert into t1 values(2, 'aaa'); -insert into t1 values(3, 'AAA'); -insert into t1 values(4, 'aAa'); -insert into t1 values(5, 'aaa'); -insert into t1 values(6, 'AAA'); -# 6 -select * from t1 order by p; -# plan too flaky -#--replace_column 9 # -#explain select * from t1 where a = 'zZz' order by p; -# 2 -select * from t1 where a = 'aAa' order by p; -# 2 -select * from t1 where a = 'aaa' order by p; -# 0 -select * from t1 where a = 'AaA' order by p; -# 2 -select * from t1 where a = 'AAA' order by p; -drop table t1; - -# ordered index - case insensitive - -create table t1 ( - p int primary key, - a char(3) character set latin1 collate latin1_swedish_ci not null, - index(a) -) engine=ndb; -# ok -insert into t1 values(1, 'aAa'); -insert into t1 values(2, 'aaa'); -insert into t1 values(3, 'AAA'); -insert into t1 values(4, 'aAa'); -insert into t1 values(5, 'aaa'); -insert into t1 values(6, 'AAA'); -# 6 -select * from t1 order by p; -# plan too flaky -#--replace_column 9 # -#explain select * from t1 where a = 'zZz' order by p; -# 6 -select * from t1 where a = 'aAa' order by p; -# 6 -select * from t1 where a = 'aaa' order by p; -# 6 -select * from t1 where a = 'AaA' order by p; -# 6 -select * from t1 where a = 'AAA' order by p; -drop table t1; - -# ordered index - varchar - -create table t1 ( - p int primary key, - a varchar(20) character set latin1 collate latin1_swedish_ci not null, - index(a, p) -) engine=ndb; -# -insert into t1 values (1,'A'),(2,'b '),(3,'C '),(4,'d '),(5,'E'),(6,'f'); -insert into t1 values (7,'a'),(8,'B '),(9,'c '),(10,'D'),(11,'e'),(12,'F '); -select p,a,length(a) from t1 order by a, p; -select * from t1 where a = 'a ' order by a desc, p desc; -select * from t1 where a >= 'D' order by a, p; -select * from t1 where a < 'D' order by a, p; -# -select count(*) from t1 x, t1 y, t1 z where x.a = y.a and y.a = z.a; -drop table t1; - -# minimal multi-byte test -# removed by jonas as this requires a configure --with-extra-charsets -#create table t1 ( -# a char(5) character set ucs2, -# b varchar(7) character set utf8, -# primary key(a, b) -#) engine=ndb; -# -#insert into t1 values -# ('a','A '),('B ','b'),('c','C '),('D','d'),('e ','E'),('F','f '), -# ('A','b '),('b ','C'),('C','d '),('d','E'),('E ','f'), -# ('a','C '),('B ','d'),('c','E '),('D','f'); -#-- error ER_DUP_ENTRY -#insert into t1 values('d','f'); -# -#select a,b,length(a),length(b) from t1 order by a,b limit 3; -#select a,b,length(a),length(b) from t1 order by a desc, b desc limit 3; -#select a,b,length(a),length(b) from t1 where a='c' and b='c'; -#drop table t1; - -# bug#14007 -create table t1 ( - a char(10) primary key -) engine=ndbcluster default charset=latin1; - -insert into t1 values ('aaabb'); -select * from t1; -replace into t1 set a = 'AAABB'; -select * from t1; -replace into t1 set a = 'aAaBb'; -select * from t1; -replace into t1 set a = 'aaabb'; -select * from t1; -drop table t1; - -# End of 4.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_condition_pushdown.test b/mysql-test/suite/ndb/t/ndb_condition_pushdown.test deleted file mode 100644 index a6ab06eae31..00000000000 --- a/mysql-test/suite/ndb/t/ndb_condition_pushdown.test +++ /dev/null @@ -1,2054 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1,t2,t3,t4; ---enable_warnings - -# -# Test of condition pushdown to storage engine -# -CREATE TABLE t1 ( - auto int(5) unsigned NOT NULL auto_increment, - string char(10), - vstring varchar(10), - bin binary(2), - vbin varbinary(7), - tiny tinyint(4) DEFAULT '0' NOT NULL , - short smallint(6) DEFAULT '1' NOT NULL , - medium mediumint(8) DEFAULT '0' NOT NULL, - long_int int(11) DEFAULT '0' NOT NULL, - longlong bigint(13) DEFAULT '0' NOT NULL, - real_float float(13,1) DEFAULT 0.0 NOT NULL, - real_double double(16,4), - real_decimal decimal(16,4), - utiny tinyint(3) unsigned DEFAULT '0' NOT NULL, - ushort smallint(5) unsigned zerofill DEFAULT '00000' NOT NULL, - umedium mediumint(8) unsigned DEFAULT '0' NOT NULL, - ulong int(11) unsigned DEFAULT '0' NOT NULL, - ulonglong bigint(13) unsigned DEFAULT '0' NOT NULL, - bits bit(3), - options enum('zero','one','two','three','four') not null, - flags set('zero','one','two','three','four') not null, - date_field date, - year_field year, - time_field time, - date_time datetime, - time_stamp timestamp, - PRIMARY KEY (auto) -) engine=ndb; - -insert into t1 values -(NULL,"aaaa","aaaa",0xAAAA,0xAAAA,-1,-1,-1,-1,-1,1.1,1.1,1.1,1,1,1,1,1, - b'001','one','one', - '1901-01-01','1901', -'01:01:01','1901-01-01 01:01:01',NULL), -(NULL,"bbbb","bbbb",0xBBBB,0xBBBB,-2,-2,-2,-2,-2,2.2,2.2,2.2,2,2,2,2,2, - b'010','two','one,two', - '1902-02-02','1902', -'02:02:02','1902-02-02 02:02:02',NULL), -(NULL,"cccc","cccc",0xCCCC,0xCCCC,-3,-3,-3,-3,-3,3.3,3.3,3.3,3,3,3,3,3, - b'011','three','one,two,three', - '1903-03-03','1903', -'03:03:03','1903-03-03 03:03:03',NULL), -(NULL,"dddd","dddd",0xDDDD,0xDDDD,-4,-4,-4,-4,-4,4.4,4.4,4.4,4,4,4,4,4, - b'100','four','one,two,three,four', - '1904-04-04','1904', -'04:04:04','1904-04-04 04:04:04',NULL); - -CREATE TABLE t2 (pk1 int unsigned NOT NULL PRIMARY KEY, attr1 int unsigned NOT NULL, attr2 int unsigned, attr3 VARCHAR(10) ) ENGINE=ndbcluster; - -insert into t2 values (0,0,0, "a"),(1,1,1,"b"),(2,2,NULL,NULL),(3,3,3,"d"),(4,4,4,"e"),(5,5,5,"f"); - -CREATE TABLE t3 (pk1 int unsigned NOT NULL PRIMARY KEY, attr1 int unsigned NOT NULL, attr2 bigint unsigned, attr3 tinyint unsigned, attr4 VARCHAR(10) ) ENGINE=ndbcluster; - -insert into t3 values (0,0,0,0,"a"),(1,1,9223372036854775803,1,"b"),(2,2,9223372036854775804,2,"c"),(3,3,9223372036854775805,3,"d"),(4,4,9223372036854775806,4,"e"),(5,5,9223372036854775807,5,"f"); - -CREATE TABLE t4 (pk1 int unsigned NOT NULL PRIMARY KEY, attr1 int unsigned NOT NULL, attr2 bigint unsigned, attr3 tinyint unsigned, attr4 VARCHAR(10) , KEY (attr1)) ENGINE=ndbcluster; - -insert into t4 values (0,0,0,0,"a"),(1,1,9223372036854775803,1,"b"),(2,2,9223372036854775804,2,"c"),(3,3,9223372036854775805,3,"d"),(4,4,9223372036854775806,4,"e"),(5,5,9223372036854775807,5,"f"); - -set @old_optimizer_switch = @@session.optimizer_switch; -set optimizer_switch = "engine_condition_pushdown=off"; - -# Test all types and compare operators -select auto from t1 where -string = "aaaa" and -vstring = "aaaa" and -bin = 0xAAAA and -vbin = 0xAAAA and -tiny = -1 and -short = -1 and -medium = -1 and -long_int = -1 and -longlong = -1 and -real_float > 1.0 and real_float < 2.0 and -real_double > 1.0 and real_double < 2.0 and -real_decimal > 1.0 and real_decimal < 2.0 and -utiny = 1 and -ushort = 1 and -umedium = 1 and -ulong = 1 and -ulonglong = 1 and -bits = b'001' and -options = 'one' and -flags = 'one' and -date_field = '1901-01-01' and -year_field = '1901' and -time_field = '01:01:01' and -date_time = '1901-01-01 01:01:01' -order by auto; - -select auto from t1 where -string != "aaaa" and -vstring != "aaaa" and -bin != 0xAAAA and -vbin != 0xAAAA and -tiny != -1 and -short != -1 and -medium != -1 and -long_int != -1 and -longlong != -1 and -(real_float < 1.0 or real_float > 2.0) and -(real_double < 1.0 or real_double > 2.0) and -(real_decimal < 1.0 or real_decimal > 2.0) and -utiny != 1 and -ushort != 1 and -umedium != 1 and -ulong != 1 and -ulonglong != 1 and -bits != b'001' and -options != 'one' and -flags != 'one' and -date_field != '1901-01-01' and -year_field != '1901' and -time_field != '01:01:01' and -date_time != '1901-01-01 01:01:01' -order by auto; - -select auto from t1 where -string > "aaaa" and -vstring > "aaaa" and -bin > 0xAAAA and -vbin > 0xAAAA and -tiny < -1 and -short < -1 and -medium < -1 and -long_int < -1 and -longlong < -1 and -real_float > 1.1 and -real_double > 1.1 and -real_decimal > 1.1 and -utiny > 1 and -ushort > 1 and -umedium > 1 and -ulong > 1 and -ulonglong > 1 and -bits > b'001' and -(options = 'two' or options = 'three' or options = 'four') and -(flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field > '1901-01-01' and -year_field > '1901' and -time_field > '01:01:01' and -date_time > '1901-01-01 01:01:01' -order by auto; - -select auto from t1 where -string >= "aaaa" and -vstring >= "aaaa" and -bin >= 0xAAAA and -vbin >= 0xAAAA and -tiny <= -1 and -short <= -1 and -medium <= -1 and -long_int <= -1 and -longlong <= -1 and -real_float >= 1.0 and -real_double >= 1.0 and -real_decimal >= 1.0 and -utiny >= 1 and -ushort >= 1 and -umedium >= 1 and -ulong >= 1 and -ulonglong >= 1 and -bits >= b'001' and -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field >= '1901-01-01' and -year_field >= '1901' and -time_field >= '01:01:01' and -date_time >= '1901-01-01 01:01:01' -order by auto; - -select auto from t1 where -string < "dddd" and -vstring < "dddd" and -bin < 0xDDDD and -vbin < 0xDDDD and -tiny > -4 and -short > -4 and -medium > -4 and -long_int > -4 and -longlong > -4 and -real_float < 4.4 and -real_double < 4.4 and -real_decimal < 4.4 and -utiny < 4 and -ushort < 4 and -umedium < 4 and -ulong < 4 and -ulonglong < 4 and -bits < b'100' and -(options = 'one' or options = 'two' or options = 'three') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three') and -date_field < '1904-01-01' and -year_field < '1904' and -time_field < '04:04:04' and -date_time < '1904-04-04 04:04:04' -order by auto; - -select auto from t1 where -string <= "dddd" and -vstring <= "dddd" and -bin <= 0xDDDD and -vbin <= 0xDDDD and -tiny >= -4 and -short >= -4 and -medium >= -4 and -long_int >= -4 and -longlong >= -4 and -real_float <= 4.5 and -real_double <= 4.5 and -real_decimal <= 4.5 and -utiny <= 4 and -ushort <= 4 and -umedium <= 4 and -ulong <= 4 and -ulonglong <= 4 and -bits <= b'100' and -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field <= '1904-04-04' and -year_field <= '1904' and -time_field <= '04:04:04' and -date_time <= '1904-04-04 04:04:04' -order by auto; - -# Test LIKE/NOT LIKE -select auto from t1 where -string like "b%" and -vstring like "b%" and -bin like concat(0xBB, '%') and -vbin like concat(0xBB, '%') -order by auto; - -select auto from t1 where -string not like "b%" and -vstring not like "b%" and -bin not like concat(0xBB, '%') and -vbin not like concat(0xBB, '%') -order by auto; - -# BETWEEN -select auto from t1 where -(string between "aaaa" and "cccc") and -(vstring between "aaaa" and "cccc") and -(bin between 0xAAAA and 0xCCCC) and -(vbin between 0xAAAA and 0xCCCC) and -(tiny between -3 and -1) and -(short between -3 and -1) and -(medium between -3 and -1) and -(long_int between -3 and -1) and -(longlong between -3 and -1) and -(utiny between 1 and 3) and -(ushort between 1 and 3) and -(umedium between 1 and 3) and -(ulong between 1 and 3) and -(ulonglong between 1 and 3) and -(bits between b'001' and b'011') and -(options between 'one' and 'three') and -(flags between 'one' and 'one,two,three') and -(date_field between '1901-01-01' and '1903-03-03') and -(year_field between '1901' and '1903') and -(time_field between '01:01:01' and '03:03:03') and -(date_time between '1901-01-01 01:01:01' and '1903-03-03 03:03:03') -order by auto; - -select auto from t1 where -("aaaa" between string and string) and -("aaaa" between vstring and vstring) and -(0xAAAA between bin and bin) and -(0xAAAA between vbin and vbin) and -(-1 between tiny and tiny) and -(-1 between short and short) and -(-1 between medium and medium) and -(-1 between long_int and long_int) and -(-1 between longlong and longlong) and -(1 between utiny and utiny) and -(1 between ushort and ushort) and -(1 between umedium and umedium) and -(1 between ulong and ulong) and -(1 between ulonglong and ulonglong) and -(b'001' between bits and bits) and -('one' between options and options) and -('one' between flags and flags) and -('1901-01-01' between date_field and date_field) and -('1901' between year_field and year_field) and -('01:01:01' between time_field and time_field) and -('1901-01-01 01:01:01' between date_time and date_time) -order by auto; - -# NOT BETWEEN -select auto from t1 where -(string not between "aaaa" and "cccc") and -(vstring not between "aaaa" and "cccc") and -(bin not between 0xAAAA and 0xCCCC) and -(vbin not between 0xAAAA and 0xCCCC) and -(tiny not between -3 and -1) and -(short not between -3 and -1) and -(medium not between -3 and -1) and -(long_int not between -3 and -1) and -(longlong not between -3 and -1) and -(utiny not between 1 and 3) and -(ushort not between 1 and 3) and -(umedium not between 1 and 3) and -(ulong not between 1 and 3) and -(ulonglong not between 1 and 3) and -(bits not between b'001' and b'011') and -(options not between 'one' and 'three') and -(flags not between 'one' and 'one,two,three') and -(date_field not between '1901-01-01' and '1903-03-03') and -(year_field not between '1901' and '1903') and -(time_field not between '01:01:01' and '03:03:03') and -(date_time not between '1901-01-01 01:01:01' and '1903-03-03 03:03:03') -order by auto; - -select auto from t1 where -("aaaa" not between string and string) and -("aaaa" not between vstring and vstring) and -(0xAAAA not between bin and bin) and -(0xAAAA not between vbin and vbin) and -(-1 not between tiny and tiny) and -(-1 not between short and short) and -(-1 not between medium and medium) and -(-1 not between long_int and long_int) and -(-1 not between longlong and longlong) and -(1 not between utiny and utiny) and -(1 not between ushort and ushort) and -(1 not between umedium and umedium) and -(1 not between ulong and ulong) and -(1 not between ulonglong and ulonglong) and -(b'001' not between bits and bits) and -('one' not between options and options) and -('one' not between flags and flags) and -('1901-01-01' not between date_field and date_field) and -('1901' not between year_field and year_field) and -('01:01:01' not between time_field and time_field) and -('1901-01-01 01:01:01' not between date_time and date_time) -order by auto; - -# IN -select auto from t1 where -string in("aaaa","cccc") and -vstring in("aaaa","cccc") and -bin in(0xAAAA,0xCCCC) and -vbin in(0xAAAA,0xCCCC) and -tiny in(-1,-3) and -short in(-1,-3) and -medium in(-1,-3) and -long_int in(-1,-3) and -longlong in(-1,-3) and -utiny in(1,3) and -ushort in(1,3) and -umedium in(1,3) and -ulong in(1,3) and -ulonglong in(1,3) and -bits in(b'001',b'011') and -options in('one','three') and -flags in('one','one,two,three') and -date_field in('1901-01-01','1903-03-03') and -year_field in('1901','1903') and -time_field in('01:01:01','03:03:03') and -date_time in('1901-01-01 01:01:01','1903-03-03 03:03:03') -order by auto; - -select auto from t1 where -"aaaa" in(string) and -"aaaa" in(vstring) and -0xAAAA in(bin) and -0xAAAA in(vbin) and -(-1 in(tiny)) and -(-1 in(short)) and -(-1 in(medium)) and -(-1 in(long_int)) and -(-1 in(longlong)) and -1 in(utiny) and -1 in(ushort) and -1 in(umedium) and -1 in(ulong) and -1 in(ulonglong) and -b'001' in(bits) and -'one' in(options) and -'one' in(flags) and -'1901-01-01' in(date_field) and -'1901' in(year_field) and -'01:01:01' in(time_field) and -'1901-01-01 01:01:01' in(date_time) -order by auto; - -# NOT IN -select auto from t1 where -string not in("aaaa","cccc") and -vstring not in("aaaa","cccc") and -bin not in(0xAAAA,0xCCCC) and -vbin not in(0xAAAA,0xCCCC) and -tiny not in(-1,-3) and -short not in(-1,-3) and -medium not in(-1,-3) and -long_int not in(-1,-3) and -longlong not in(-1,-3) and -utiny not in(1,3) and -ushort not in(1,3) and -umedium not in(1,3) and -ulong not in(1,3) and -ulonglong not in(1,3) and -bits not in(b'001',b'011') and -options not in('one','three') and -flags not in('one','one,two,three') and -date_field not in('1901-01-01','1903-03-03') and -year_field not in('1901','1903') and -time_field not in('01:01:01','03:03:03') and -date_time not in('1901-01-01 01:01:01','1903-03-03 03:03:03') -order by auto; - -select auto from t1 where -"aaaa" not in(string) and -"aaaa" not in(vstring) and -0xAAAA not in(bin) and -0xAAAA not in(vbin) and -(-1 not in(tiny)) and -(-1 not in(short)) and -(-1 not in(medium)) and -(-1 not in(long_int)) and -(-1 not in(longlong)) and -1 not in(utiny) and -1 not in(ushort) and -1 not in(umedium) and -1 not in(ulong) and -1 not in(ulonglong) and -b'001' not in(bits) and -'one' not in(options) and -'one' not in(flags) and -'1901-01-01' not in(date_field) and -'1901' not in(year_field) and -'01:01:01' not in(time_field) and -'1901-01-01 01:01:01' not in(date_time) -order by auto; - -# Various tests -select * from t2 where attr3 is null or attr1 > 2 and pk1= 3 order by pk1; -select * from t2 where attr3 is not null and attr1 > 2 order by pk1; -select * from t3 where attr2 > 9223372036854775803 and attr3 != 3 order by pk1; -select * from t2,t3 where t2.attr1 < 1 and t2.attr2 = t3.attr2 and t3.attr1 < 5 order by t2.pk1; -select * from t4 where attr1 < 5 and attr2 > 9223372036854775803 and attr3 != 3 order by t4.pk1; -select * from t3,t4 where t4.attr1 > 1 and t4.attr2 = t3.attr2 and t4.attr3 < 5 order by t4.pk1; - -set optimizer_switch = "engine_condition_pushdown=on"; - -# Test all types and compare operators ---replace_column 9 # -explain -select auto from t1 where -string = "aaaa" and -vstring = "aaaa" and -bin = 0xAAAA and -vbin = 0xAAAA and -tiny = -1 and -short = -1 and -medium = -1 and -long_int = -1 and -longlong = -1 and -real_float > 1.0 and real_float < 2.0 and -real_double > 1.0 and real_double < 2.0 and -real_decimal > 1.0 and real_decimal < 2.0 and -utiny = 1 and -ushort = 1 and -umedium = 1 and -ulong = 1 and -ulonglong = 1 and -/* bits = b'001' and */ -options = 'one' and -flags = 'one' and -date_field = '1901-01-01' and -year_field = '1901' and -time_field = '01:01:01' and -date_time = '1901-01-01 01:01:01' -order by auto; - -select auto from t1 where -string = "aaaa" and -vstring = "aaaa" and -bin = 0xAAAA and -vbin = 0xAAAA and -tiny = -1 and -short = -1 and -medium = -1 and -long_int = -1 and -longlong = -1 and -real_float > 1.0 and real_float < 2.0 and -real_double > 1.0 and real_double < 2.0 and -real_decimal > 1.0 and real_decimal < 2.0 and -utiny = 1 and -ushort = 1 and -umedium = 1 and -ulong = 1 and -ulonglong = 1 and -/* bits = b'001' and */ -options = 'one' and -flags = 'one' and -date_field = '1901-01-01' and -year_field = '1901' and -time_field = '01:01:01' and -date_time = '1901-01-01 01:01:01' -order by auto; - ---replace_column 9 # -explain -select auto from t1 where -string != "aaaa" and -vstring != "aaaa" and -bin != 0xAAAA and -vbin != 0xAAAA and -tiny != -1 and -short != -1 and -medium != -1 and -long_int != -1 and -longlong != -1 and -(real_float < 1.0 or real_float > 2.0) and -(real_double < 1.0 or real_double > 2.0) and -(real_decimal < 1.0 or real_decimal > 2.0) and -utiny != 1 and -ushort != 1 and -umedium != 1 and -ulong != 1 and -ulonglong != 1 and -/* bits != b'001' and */ -options != 'one' and -flags != 'one' and -date_field != '1901-01-01' and -year_field != '1901' and -time_field != '01:01:01' and -date_time != '1901-01-01 01:01:01' -order by auto; - -select auto from t1 where -string != "aaaa" and -vstring != "aaaa" and -bin != 0xAAAA and -vbin != 0xAAAA and -tiny != -1 and -short != -1 and -medium != -1 and -long_int != -1 and -longlong != -1 and -(real_float < 1.0 or real_float > 2.0) and -(real_double < 1.0 or real_double > 2.0) and -(real_decimal < 1.0 or real_decimal > 2.0) and -utiny != 1 and -ushort != 1 and -umedium != 1 and -ulong != 1 and -ulonglong != 1 and -/* bits != b'001' and */ -options != 'one' and -flags != 'one' and -date_field != '1901-01-01' and -year_field != '1901' and -time_field != '01:01:01' and -date_time != '1901-01-01 01:01:01' -order by auto; - ---replace_column 9 # -explain -select auto from t1 where -string > "aaaa" and -vstring > "aaaa" and -bin > 0xAAAA and -vbin > 0xAAAA and -tiny < -1 and -short < -1 and -medium < -1 and -long_int < -1 and -longlong < -1 and -real_float > 1.1 and -real_double > 1.1 and -real_decimal > 1.1 and -utiny > 1 and -ushort > 1 and -umedium > 1 and -ulong > 1 and -ulonglong > 1 and -/* bits > b'001' and */ -(options = 'two' or options = 'three' or options = 'four') and -(flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field > '1901-01-01' and -year_field > '1901' and -time_field > '01:01:01' and -date_time > '1901-01-01 01:01:01' -order by auto; - -select auto from t1 where -string > "aaaa" and -vstring > "aaaa" and -bin > 0xAAAA and -vbin > 0xAAAA and -tiny < -1 and -short < -1 and -medium < -1 and -long_int < -1 and -longlong < -1 and -real_float > 1.1 and -real_double > 1.1 and -real_decimal > 1.1 and -utiny > 1 and -ushort > 1 and -umedium > 1 and -ulong > 1 and -ulonglong > 1 and -/* bits > b'001' and */ -(options = 'two' or options = 'three' or options = 'four') and -(flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field > '1901-01-01' and -year_field > '1901' and -time_field > '01:01:01' and -date_time > '1901-01-01 01:01:01' -order by auto; - ---replace_column 9 # -explain -select auto from t1 where -string >= "aaaa" and -vstring >= "aaaa" and -bin >= 0xAAAA and -vbin >= 0xAAAA and -tiny <= -1 and -short <= -1 and -medium <= -1 and -long_int <= -1 and -longlong <= -1 and -real_float >= 1.0 and -real_double >= 1.0 and -real_decimal >= 1.0 and -utiny >= 1 and -ushort >= 1 and -umedium >= 1 and -ulong >= 1 and -ulonglong >= 1 and -/* bits >= b'001' and */ -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field >= '1901-01-01' and -year_field >= '1901' and -time_field >= '01:01:01' and -date_time >= '1901-01-01 01:01:01' -order by auto; - -select auto from t1 where -string >= "aaaa" and -vstring >= "aaaa" and -bin >= 0xAAAA and -vbin >= 0xAAAA and -tiny <= -1 and -short <= -1 and -medium <= -1 and -long_int <= -1 and -longlong <= -1 and -real_float >= 1.0 and -real_double >= 1.0 and -real_decimal >= 1.0 and -utiny >= 1 and -ushort >= 1 and -umedium >= 1 and -ulong >= 1 and -ulonglong >= 1 and -/* bits >= b'001' and */ -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field >= '1901-01-01' and -year_field >= '1901' and -time_field >= '01:01:01' and -date_time >= '1901-01-01 01:01:01' -order by auto; - ---replace_column 9 # -explain -select auto from t1 where -string < "dddd" and -vstring < "dddd" and -bin < 0xDDDD and -vbin < 0xDDDD and -tiny > -4 and -short > -4 and -medium > -4 and -long_int > -4 and -longlong > -4 and -real_float < 4.4 and -real_double < 4.4 and -real_decimal < 4.4 and -utiny < 4 and -ushort < 4 and -umedium < 4 and -ulong < 4 and -ulonglong < 4 and -/* bits < b'100' and */ -(options = 'one' or options = 'two' or options = 'three') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three') and -date_field < '1904-01-01' and -year_field < '1904' and -time_field < '04:04:04' and -date_time < '1904-04-04 04:04:04' -order by auto; - -select auto from t1 where -string < "dddd" and -vstring < "dddd" and -bin < 0xDDDD and -vbin < 0xDDDD and -tiny > -4 and -short > -4 and -medium > -4 and -long_int > -4 and -longlong > -4 and -real_float < 4.4 and -real_double < 4.4 and -real_decimal < 4.4 and -utiny < 4 and -ushort < 4 and -umedium < 4 and -ulong < 4 and -ulonglong < 4 and -/* bits < b'100' and */ -(options = 'one' or options = 'two' or options = 'three') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three') and -date_field < '1904-01-01' and -year_field < '1904' and -time_field < '04:04:04' and -date_time < '1904-04-04 04:04:04' -order by auto; - ---replace_column 9 # -explain -select auto from t1 where -string <= "dddd" and -vstring <= "dddd" and -bin <= 0xDDDD and -vbin <= 0xDDDD and -tiny >= -4 and -short >= -4 and -medium >= -4 and -long_int >= -4 and -longlong >= -4 and -real_float <= 4.5 and -real_double <= 4.5 and -real_decimal <= 4.5 and -utiny <= 4 - 1 + 1 and /* Checking function composition */ -ushort <= 4 and -umedium <= 4 and -ulong <= 4 and -ulonglong <= 4 and -/* bits <= b'100' and */ -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field <= '1904-04-04' and -year_field <= '1904' and -time_field <= '04:04:04' and -date_time <= '1904-04-04 04:04:04' -order by auto; - -select auto from t1 where -string <= "dddd" and -vstring <= "dddd" and -bin <= 0xDDDD and -vbin <= 0xDDDD and -tiny >= -4 and -short >= -4 and -medium >= -4 and -long_int >= -4 and -longlong >= -4 and -real_float <= 4.5 and -real_double <= 4.5 and -real_decimal <= 4.5 and -utiny <= 4 - 1 + 1 and /* Checking function composition */ -ushort <= 4 and -umedium <= 4 and -ulong <= 4 and -ulonglong <= 4 and -/* bits <= b'100' and */ -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field <= '1904-04-04' and -year_field <= '1904' and -time_field <= '04:04:04' and -date_time <= '1904-04-04 04:04:04' -order by auto; - -# Test index scan with filter -create index medium_index on t1(medium); - -# Test all types and compare operators ---replace_column 9 # -explain -select auto from t1 where -string = "aaaa" and -vstring = "aaaa" and -bin = 0xAAAA and -vbin = 0xAAAA and -tiny = -1 and -short = -1 and -medium = -1 and -long_int = -1 and -longlong = -1 and -real_float > 1.0 and real_float < 2.0 and -real_double > 1.0 and real_double < 2.0 and -real_decimal > 1.0 and real_decimal < 2.0 and -utiny = 1 and -ushort = 1 and -umedium = 1 and -ulong = 1 and -ulonglong = 1 and -/* bits = b'001' and */ -options = 'one' and -flags = 'one' and -date_field = '1901-01-01' and -year_field = '1901' and -time_field = '01:01:01' and -date_time = '1901-01-01 01:01:01' -order by auto; - -select auto from t1 where -string = "aaaa" and -vstring = "aaaa" and -bin = 0xAAAA and -vbin = 0xAAAA and -tiny = -1 and -short = -1 and -medium = -1 and -long_int = -1 and -longlong = -1 and -real_float > 1.0 and real_float < 2.0 and -real_double > 1.0 and real_double < 2.0 and -real_decimal > 1.0 and real_decimal < 2.0 and -utiny = 1 and -ushort = 1 and -umedium = 1 and -ulong = 1 and -ulonglong = 1 and -/* bits = b'001' and */ -options = 'one' and -flags = 'one' and -date_field = '1901-01-01' and -year_field = '1901' and -time_field = '01:01:01' and -date_time = '1901-01-01 01:01:01' -order by auto; - ---replace_column 9 # -explain -select auto from t1 where -string != "aaaa" and -vstring != "aaaa" and -bin != 0xAAAA and -vbin != 0xAAAA and -tiny != -1 and -short != -1 and -medium != -1 and -long_int != -1 and -longlong != -1 and -(real_float < 1.0 or real_float > 2.0) and -(real_double < 1.0 or real_double > 2.0) and -(real_decimal < 1.0 or real_decimal > 2.0) and -utiny != 1 and -ushort != 1 and -umedium != 1 and -ulong != 1 and -ulonglong != 1 and -/* bits != b'001' and */ -options != 'one' and -flags != 'one' and -date_field != '1901-01-01' and -year_field != '1901' and -time_field != '01:01:01' and -date_time != '1901-01-01 01:01:01' -order by auto; - -select auto from t1 where -string != "aaaa" and -vstring != "aaaa" and -bin != 0xAAAA and -vbin != 0xAAAA and -tiny != -1 and -short != -1 and -medium != -1 and -long_int != -1 and -longlong != -1 and -(real_float < 1.0 or real_float > 2.0) and -(real_double < 1.0 or real_double > 2.0) and -(real_decimal < 1.0 or real_decimal > 2.0) and -utiny != 1 and -ushort != 1 and -umedium != 1 and -ulong != 1 and -ulonglong != 1 and -/* bits != b'001' and */ -options != 'one' and -flags != 'one' and -date_field != '1901-01-01' and -year_field != '1901' and -time_field != '01:01:01' and -date_time != '1901-01-01 01:01:01' -order by auto; - ---replace_column 9 # -explain -select auto from t1 where -string > "aaaa" and -vstring > "aaaa" and -bin > 0xAAAA and -vbin > 0xAAAA and -tiny < -1 and -short < -1 and -medium < -1 and -long_int < -1 and -longlong < -1 and -real_float > 1.1 and -real_double > 1.1 and -real_decimal > 1.1 and -utiny > 1 and -ushort > 1 and -umedium > 1 and -ulong > 1 and -ulonglong > 1 and -/* bits > b'001' and */ -(options = 'two' or options = 'three' or options = 'four') and -(flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field > '1901-01-01' and -year_field > '1901' and -time_field > '01:01:01' and -date_time > '1901-01-01 01:01:01' -order by auto; - -select auto from t1 where -string > "aaaa" and -vstring > "aaaa" and -bin > 0xAAAA and -vbin > 0xAAAA and -tiny < -1 and -short < -1 and -medium < -1 and -long_int < -1 and -longlong < -1 and -real_float > 1.1 and -real_double > 1.1 and -real_decimal > 1.1 and -utiny > 1 and -ushort > 1 and -umedium > 1 and -ulong > 1 and -ulonglong > 1 and -/* bits > b'001' and */ -(options = 'two' or options = 'three' or options = 'four') and -(flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field > '1901-01-01' and -year_field > '1901' and -time_field > '01:01:01' and -date_time > '1901-01-01 01:01:01' -order by auto; - ---replace_column 9 # -explain -select auto from t1 where -string >= "aaaa" and -vstring >= "aaaa" and -bin >= 0xAAAA and -vbin >= 0xAAAA and -tiny <= -1 and -short <= -1 and -medium <= -1 and -long_int <= -1 and -longlong <= -1 and -real_float >= 1.0 and -real_double >= 1.0 and -real_decimal >= 1.0 and -utiny >= 1 and -ushort >= 1 and -umedium >= 1 and -ulong >= 1 and -ulonglong >= 1 and -/* bits >= b'001' and */ -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field >= '1901-01-01' and -year_field >= '1901' and -time_field >= '01:01:01' and -date_time >= '1901-01-01 01:01:01' -order by auto; - -select auto from t1 where -string >= "aaaa" and -vstring >= "aaaa" and -bin >= 0xAAAA and -vbin >= 0xAAAA and -tiny <= -1 and -short <= -1 and -medium <= -1 and -long_int <= -1 and -longlong <= -1 and -real_float >= 1.0 and -real_double >= 1.0 and -real_decimal >= 1.0 and -utiny >= 1 and -ushort >= 1 and -umedium >= 1 and -ulong >= 1 and -ulonglong >= 1 and -/* bits >= b'001' and */ -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field >= '1901-01-01' and -year_field >= '1901' and -time_field >= '01:01:01' and -date_time >= '1901-01-01 01:01:01' -order by auto; - ---replace_column 9 # -explain -select auto from t1 where -string < "dddd" and -vstring < "dddd" and -bin < 0xDDDD and -vbin < 0xDDDD and -tiny > -4 and -short > -4 and -medium > -4 and -long_int > -4 and -longlong > -4 and -real_float < 4.4 and -real_double < 4.4 and -real_decimal < 4.4 and -utiny < 4 and -ushort < 4 and -umedium < 4 and -ulong < 4 and -ulonglong < 4 and -/* bits < b'100' and */ -(options = 'one' or options = 'two' or options = 'three') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three') and -date_field < '1904-01-01' and -year_field < '1904' and -time_field < '04:04:04' and -date_time < '1904-04-04 04:04:04' -order by auto; - -select auto from t1 where -string < "dddd" and -vstring < "dddd" and -bin < 0xDDDD and -vbin < 0xDDDD and -tiny > -4 and -short > -4 and -medium > -4 and -long_int > -4 and -longlong > -4 and -real_float < 4.4 and -real_double < 4.4 and -real_decimal < 4.4 and -utiny < 4 and -ushort < 4 and -umedium < 4 and -ulong < 4 and -ulonglong < 4 and -/* bits < b'100' and */ -(options = 'one' or options = 'two' or options = 'three') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three') and -date_field < '1904-01-01' and -year_field < '1904' and -time_field < '04:04:04' and -date_time < '1904-04-04 04:04:04' -order by auto; - ---replace_column 9 # -explain -select auto from t1 where -string <= "dddd" and -vstring <= "dddd" and -bin <= 0xDDDD and -vbin <= 0xDDDD and -tiny >= -4 and -short >= -4 and -medium >= -4 and -long_int >= -4 and -longlong >= -4 and -real_float <= 4.5 and -real_double <= 4.5 and -real_decimal <= 4.5 and -utiny <= 4 - 1 + 1 and /* Checking function composition */ -ushort <= 4 and -umedium <= 4 and -ulong <= 4 and -ulonglong <= 4 and -/* bits <= b'100' and */ -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field <= '1904-04-04' and -year_field <= '1904' and -time_field <= '04:04:04' and -date_time <= '1904-04-04 04:04:04' -order by auto; - -select auto from t1 where -string <= "dddd" and -vstring <= "dddd" and -bin <= 0xDDDD and -vbin <= 0xDDDD and -tiny >= -4 and -short >= -4 and -medium >= -4 and -long_int >= -4 and -longlong >= -4 and -real_float <= 4.5 and -real_double <= 4.5 and -real_decimal <= 4.5 and -utiny <= 4 - 1 + 1 and /* Checking function composition */ -ushort <= 4 and -umedium <= 4 and -ulong <= 4 and -ulonglong <= 4 and -/* bits <= b'100' and */ -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field <= '1904-04-04' and -year_field <= '1904' and -time_field <= '04:04:04' and -date_time <= '1904-04-04 04:04:04' -order by auto; - -# Test LIKE/NOT LIKE ---replace_column 9 # -explain -select auto from t1 where -string like "b%" and -vstring like "b%" and -bin like concat(0xBB, '%') and -vbin like concat(0xBB, '%') -order by auto; - -select auto from t1 where -string like "b%" and -vstring like "b%" and -bin like concat(0xBB, '%') and -vbin like concat(0xBB, '%') -order by auto; - ---replace_column 9 # -explain -select auto from t1 where -string not like "b%" and -vstring not like "b%" and -bin not like concat(0xBB, '%') and -vbin not like concat(0xBB, '%') -order by auto; - -select auto from t1 where -string not like "b%" and -vstring not like "b%" and -bin not like concat(0xBB, '%') and -vbin not like concat(0xBB, '%') -order by auto; - -# BETWEEN ---replace_column 9 # -explain -select auto from t1 where -(string between "aaaa" and "cccc") and -(vstring between "aaaa" and "cccc") and -(bin between 0xAAAA and 0xCCCC) and -(vbin between 0xAAAA and 0xCCCC) and -(tiny between -3 and -1) and -(short between -3 and -1) and -(medium between -3 and -1) and -(long_int between -3 and -1) and -(longlong between -3 and -1) and -(utiny between 1 and 3) and -(ushort between 1 and 3) and -(umedium between 1 and 3) and -(ulong between 1 and 3) and -(ulonglong between 1 and 3) and -/* (bits between b'001' and b'011') and */ -(options between 'one' and 'three') and -(flags between 'one' and 'one,two,three') and -(date_field between '1901-01-01' and '1903-03-03') and -(year_field between '1901' and '1903') and -(time_field between '01:01:01' and '03:03:03') and -(date_time between '1901-01-01 01:01:01' and '1903-03-03 03:03:03') -order by auto; - -select auto from t1 where -(string between "aaaa" and "cccc") and -(vstring between "aaaa" and "cccc") and -(bin between 0xAAAA and 0xCCCC) and -(vbin between 0xAAAA and 0xCCCC) and -(tiny between -3 and -1) and -(short between -3 and -1) and -(medium between -3 and -1) and -(long_int between -3 and -1) and -(longlong between -3 and -1) and -(utiny between 1 and 3) and -(ushort between 1 and 3) and -(umedium between 1 and 3) and -(ulong between 1 and 3) and -(ulonglong between 1 and 3) and -/* (bits between b'001' and b'011') and */ -(options between 'one' and 'three') and -(flags between 'one' and 'one,two,three') and -(date_field between '1901-01-01' and '1903-03-03') and -(year_field between '1901' and '1903') and -(time_field between '01:01:01' and '03:03:03') and -(date_time between '1901-01-01 01:01:01' and '1903-03-03 03:03:03') -order by auto; - ---replace_column 9 # -explain -select auto from t1 where -("aaaa" between string and string) and -("aaaa" between vstring and vstring) and -(0xAAAA between bin and bin) and -(0xAAAA between vbin and vbin) and -(-1 between tiny and tiny) and -(-1 between short and short) and -(-1 between medium and medium) and -(-1 between long_int and long_int) and -(-1 between longlong and longlong) and -(1 between utiny and utiny) and -(1 between ushort and ushort) and -(1 between umedium and umedium) and -(1 between ulong and ulong) and -(1 between ulonglong and ulonglong) and -/* (b'001' between bits and bits) and */ -('one' between options and options) and -('one' between flags and flags) and -('1901-01-01' between date_field and date_field) and -('1901' between year_field and year_field) and -('01:01:01' between time_field and time_field) and -('1901-01-01 01:01:01' between date_time and date_time) -order by auto; - -select auto from t1 where -("aaaa" between string and string) and -("aaaa" between vstring and vstring) and -(0xAAAA between bin and bin) and -(0xAAAA between vbin and vbin) and -(-1 between tiny and tiny) and -(-1 between short and short) and -(-1 between medium and medium) and -(-1 between long_int and long_int) and -(-1 between longlong and longlong) and -(1 between utiny and utiny) and -(1 between ushort and ushort) and -(1 between umedium and umedium) and -(1 between ulong and ulong) and -(1 between ulonglong and ulonglong) and -/* (b'001' between bits and bits) and */ -('one' between options and options) and -('one' between flags and flags) and -('1901-01-01' between date_field and date_field) and -('1901' between year_field and year_field) and -('01:01:01' between time_field and time_field) and -('1901-01-01 01:01:01' between date_time and date_time) -order by auto; - -# NOT BETWEEN ---replace_column 9 # -explain -select auto from t1 where -(string not between "aaaa" and "cccc") and -(vstring not between "aaaa" and "cccc") and -(bin not between 0xAAAA and 0xCCCC) and -(vbin not between 0xAAAA and 0xCCCC) and -(tiny not between -3 and -1) and -(short not between -3 and -1) and -(medium not between -3 and -1) and -(long_int not between -3 and -1) and -(longlong not between -3 and -1) and -(utiny not between 1 and 3) and -(ushort not between 1 and 3) and -(umedium not between 1 and 3) and -(ulong not between 1 and 3) and -(ulonglong not between 1 and 3) and -/* (bits not between b'001' and b'011') and */ -(options not between 'one' and 'three') and -(flags not between 'one' and 'one,two,three') and -(date_field not between '1901-01-01' and '1903-03-03') and -(year_field not between '1901' and '1903') and -(time_field not between '01:01:01' and '03:03:03') and -(date_time not between '1901-01-01 01:01:01' and '1903-03-03 03:03:03') -order by auto; - -select auto from t1 where -(string not between "aaaa" and "cccc") and -(vstring not between "aaaa" and "cccc") and -(bin not between 0xAAAA and 0xCCCC) and -(vbin not between 0xAAAA and 0xCCCC) and -(tiny not between -3 and -1) and -(short not between -3 and -1) and -(medium not between -3 and -1) and -(long_int not between -3 and -1) and -(longlong not between -3 and -1) and -(utiny not between 1 and 3) and -(ushort not between 1 and 3) and -(umedium not between 1 and 3) and -(ulong not between 1 and 3) and -(ulonglong not between 1 and 3) and -/* (bits not between b'001' and b'011') and */ -(options not between 'one' and 'three') and -(flags not between 'one' and 'one,two,three') and -(date_field not between '1901-01-01' and '1903-03-03') and -(year_field not between '1901' and '1903') and -(time_field not between '01:01:01' and '03:03:03') and -(date_time not between '1901-01-01 01:01:01' and '1903-03-03 03:03:03') -order by auto; - ---replace_column 9 # -explain -select auto from t1 where -("aaaa" not between string and string) and -("aaaa" not between vstring and vstring) and -(0xAAAA not between bin and bin) and -(0xAAAA not between vbin and vbin) and -(-1 not between tiny and tiny) and -(-1 not between short and short) and -(-1 not between medium and medium) and -(-1 not between long_int and long_int) and -(-1 not between longlong and longlong) and -(1 not between utiny and utiny) and -(1 not between ushort and ushort) and -(1 not between umedium and umedium) and -(1 not between ulong and ulong) and -(1 not between ulonglong and ulonglong) and -/* (b'001' not between bits and bits) and */ -('one' not between options and options) and -('one' not between flags and flags) and -('1901-01-01' not between date_field and date_field) and -('1901' not between year_field and year_field) and -('01:01:01' not between time_field and time_field) and -('1901-01-01 01:01:01' not between date_time and date_time) -order by auto; - -select auto from t1 where -("aaaa" not between string and string) and -("aaaa" not between vstring and vstring) and -(0xAAAA not between bin and bin) and -(0xAAAA not between vbin and vbin) and -(-1 not between tiny and tiny) and -(-1 not between short and short) and -(-1 not between medium and medium) and -(-1 not between long_int and long_int) and -(-1 not between longlong and longlong) and -(1 not between utiny and utiny) and -(1 not between ushort and ushort) and -(1 not between umedium and umedium) and -(1 not between ulong and ulong) and -(1 not between ulonglong and ulonglong) and -/* (b'001' not between bits and bits) and */ -('one' not between options and options) and -('one' not between flags and flags) and -('1901-01-01' not between date_field and date_field) and -('1901' not between year_field and year_field) and -('01:01:01' not between time_field and time_field) and -('1901-01-01 01:01:01' not between date_time and date_time) -order by auto; - -# IN ---replace_column 9 # -explain -select auto from t1 where -string in("aaaa","cccc") and -vstring in("aaaa","cccc") and -bin in(0xAAAA,0xCCCC) and -vbin in(0xAAAA,0xCCCC) and -tiny in(-1,-3) and -short in(-1,-3) and -medium in(-1,-3) and -long_int in(-1,-3) and -longlong in(-1,-3) and -utiny in(1,3) and -ushort in(1,3) and -umedium in(1,3) and -ulong in(1,3) and -ulonglong in(1,3) and -/* bits in(b'001',b'011') and */ -options in('one','three') and -flags in('one','one,two,three') and -date_field in('1901-01-01','1903-03-03') and -year_field in('1901','1903') and -time_field in('01:01:01','03:03:03') and -date_time in('1901-01-01 01:01:01','1903-03-03 03:03:03') -order by auto; - -select auto from t1 where -string in("aaaa","cccc") and -vstring in("aaaa","cccc") and -bin in(0xAAAA,0xCCCC) and -vbin in(0xAAAA,0xCCCC) and -tiny in(-1,-3) and -short in(-1,-3) and -medium in(-1,-3) and -long_int in(-1,-3) and -longlong in(-1,-3) and -utiny in(1,3) and -ushort in(1,3) and -umedium in(1,3) and -ulong in(1,3) and -ulonglong in(1,3) and -/* bits in(b'001',b'011') and */ -options in('one','three') and -flags in('one','one,two,three') and -date_field in('1901-01-01','1903-03-03') and -year_field in('1901','1903') and -time_field in('01:01:01','03:03:03') and -date_time in('1901-01-01 01:01:01','1903-03-03 03:03:03') -order by auto; - ---replace_column 9 # -explain -select auto from t1 where -"aaaa" in(string) and -"aaaa" in(vstring) and -0xAAAA in(bin) and -0xAAAA in(vbin) and -(-1 in(tiny)) and -(-1 in (short)) and -(-1 in(medium)) and -(-1 in(long_int)) and -(-1 in(longlong)) and -1 in(utiny) and -1 in(ushort) and -1 in(umedium) and -1 in(ulong) and -1 in(ulonglong) and -/* b'001' in(bits) and */ -'one' in(options) and -'one' in(flags) and -'1901-01-01' in(date_field) and -'1901' in(year_field) and -'01:01:01' in(time_field) and -'1901-01-01 01:01:01' in(date_time) -order by auto; - -select auto from t1 where -"aaaa" in(string) and -"aaaa" in(vstring) and -0xAAAA in(bin) and -0xAAAA in(vbin) and -(-1 in(tiny)) and -(-1 in (short)) and -(-1 in(medium)) and -(-1 in(long_int)) and -(-1 in(longlong)) and -1 in(utiny) and -1 in(ushort) and -1 in(umedium) and -1 in(ulong) and -1 in(ulonglong) and -/* b'001' in(bits) and */ -'one' in(options) and -'one' in(flags) and -'1901-01-01' in(date_field) and -'1901' in(year_field) and -'01:01:01' in(time_field) and -'1901-01-01 01:01:01' in(date_time) -order by auto; - -# NOT IN ---replace_column 9 # -explain -select auto from t1 where -string not in("aaaa","cccc") and -vstring not in("aaaa","cccc") and -bin not in(0xAAAA,0xCCCC) and -vbin not in(0xAAAA,0xCCCC) and -tiny not in(-1,-3) and -short not in(-1,-3) and -medium not in(-1,-3) and -long_int not in(-1,-3) and -longlong not in(-1,-3) and -utiny not in(1,3) and -ushort not in(1,3) and -umedium not in(1,3) and -ulong not in(1,3) and -ulonglong not in(1,3) and -/* bits not in(b'001',b'011') and */ -options not in('one','three') and -flags not in('one','one,two,three') and -date_field not in('1901-01-01','1903-03-03') and -year_field not in('1901','1903') and -time_field not in('01:01:01','03:03:03') and -date_time not in('1901-01-01 01:01:01','1903-03-03 03:03:03') -order by auto; - -select auto from t1 where -string not in("aaaa","cccc") and -vstring not in("aaaa","cccc") and -bin not in(0xAAAA,0xCCCC) and -vbin not in(0xAAAA,0xCCCC) and -tiny not in(-1,-3) and -short not in(-1,-3) and -medium not in(-1,-3) and -long_int not in(-1,-3) and -longlong not in(-1,-3) and -utiny not in(1,3) and -ushort not in(1,3) and -umedium not in(1,3) and -ulong not in(1,3) and -ulonglong not in(1,3) and -/* bits not in(b'001',b'011') and */ -options not in('one','three') and -flags not in('one','one,two,three') and -date_field not in('1901-01-01','1903-03-03') and -year_field not in('1901','1903') and -time_field not in('01:01:01','03:03:03') and -date_time not in('1901-01-01 01:01:01','1903-03-03 03:03:03') -order by auto; - ---replace_column 9 # -explain -select auto from t1 where -"aaaa" not in(string) and -"aaaa" not in(vstring) and -0xAAAA not in(bin) and -0xAAAA not in(vbin) and -(-1 not in(tiny)) and -(-1 not in(short)) and -(-1 not in(medium)) and -(-1 not in(long_int)) and -(-1 not in(longlong)) and -1 not in(utiny) and -1 not in(ushort) and -1 not in(umedium) and -1 not in(ulong) and -1 not in(ulonglong) and -/* b'001' not in(bits) and */ -'one' not in(options) and -'one' not in(flags) and -'1901-01-01' not in(date_field) and -'1901' not in(year_field) and -'01:01:01' not in(time_field) and -'1901-01-01 01:01:01' not in(date_time) -order by auto; - -select auto from t1 where -"aaaa" not in(string) and -"aaaa" not in(vstring) and -0xAAAA not in(bin) and -0xAAAA not in(vbin) and -(-1 not in(tiny)) and -(-1 not in(short)) and -(-1 not in(medium)) and -(-1 not in(long_int)) and -(-1 not in(longlong)) and -1 not in(utiny) and -1 not in(ushort) and -1 not in(umedium) and -1 not in(ulong) and -1 not in(ulonglong) and -/* b'001' not in(bits) and */ -'one' not in(options) and -'one' not in(flags) and -'1901-01-01' not in(date_field) and -'1901' not in(year_field) and -'01:01:01' not in(time_field) and -'1901-01-01 01:01:01' not in(date_time) -order by auto; - -# Update test -update t1 -set medium = 17 -where -string = "aaaa" and -vstring = "aaaa" and -bin = 0xAAAA and -vbin = 0xAAAA and -tiny = -1 and -short = -1 and -medium = -1 and -long_int = -1 and -longlong = -1 and -real_float > 1.0 and real_float < 2.0 and -real_double > 1.0 and real_double < 2.0 and -real_decimal > 1.0 and real_decimal < 2.0 and -utiny = 1 and -ushort = 1 and -umedium = 1 and -ulong = 1 and -ulonglong = 1 and -/* bits = b'001' and */ -options = 'one' and -flags = 'one' and -date_field = '1901-01-01' and -year_field = '1901' and -time_field = '01:01:01' and -date_time = '1901-01-01 01:01:01'; - -# Delete test -delete from t1 -where -string = "aaaa" and -vstring = "aaaa" and -bin = 0xAAAA and -vbin = 0xAAAA and -tiny = -1 and -short = -1 and -medium = 17 and -long_int = -1 and -longlong = -1 and -real_float > 1.0 and real_float < 2.0 and -real_double > 1.0 and real_double < 2.0 and -real_decimal > 1.0 and real_decimal < 2.0 and -utiny = 1 and -ushort = 1 and -umedium = 1 and -ulong = 1 and -ulonglong = 1 and -/* bits = b'001' and */ -options = 'one' and -flags = 'one' and -date_field = '1901-01-01' and -year_field = '1901' and -time_field = '01:01:01' and -date_time = '1901-01-01 01:01:01'; - -select count(*) from t1; - -# Various tests ---replace_column 9 # -explain -select * from t2 where attr3 is null or attr1 > 2 and pk1= 3 order by pk1; -select * from t2 where attr3 is null or attr1 > 2 and pk1= 3 order by pk1; - ---replace_column 9 # -explain -select * from t2 where attr3 is not null and attr1 > 2 order by pk1; -select * from t2 where attr3 is not null and attr1 > 2 order by pk1; - ---replace_column 9 # -explain -select * from t3 where attr2 > 9223372036854775803 and attr3 != 3 order by pk1; -select * from t3 where attr2 > 9223372036854775803 and attr3 != 3 order by pk1; - ---replace_column 9 # -explain -select * from t2,t3 where t2.attr1 < 1 and t2.attr2 = t3.attr2 and t3.attr1 < 5 order by t2.pk1; -select * from t2,t3 where t2.attr1 < 1 and t2.attr2 = t3.attr2 and t3.attr1 < 5 order by t2.pk1; - ---replace_column 9 # -explain -select * from t4 where attr1 < 5 and attr2 > 9223372036854775803 and attr3 != 3 order by t4.pk1; -select * from t4 where attr1 < 5 and attr2 > 9223372036854775803 and attr3 != 3 order by t4.pk1; - ---replace_column 9 # -explain -select * from t3,t4 where t4.attr1 > 1 and t4.attr2 = t3.attr2 and t4.attr3 < 5 order by t4.pk1; -select * from t3,t4 where t4.attr1 > 1 and t4.attr2 = t3.attr2 and t4.attr3 < 5 order by t4.pk1; - -# Some tests that are currently not supported and should not push condition ---replace_column 9 # -explain -select auto from t1 where string = "aaaa" collate latin1_general_ci order by auto; ---replace_column 9 # -explain -select * from t2 where (attr1 < 2) = (attr2 < 2) order by pk1; ---replace_column 9 # -explain -select * from t3 left join t4 on t4.attr2 = t3.attr2 where t4.attr1 > 1 and t4.attr3 < 5 or t4.attr1 is null order by t4.pk1; - -# bug#15722 -create table t5 (a int primary key auto_increment, b tinytext not null) -engine = ndb; -insert into t5 (b) values ('jonas'), ('jensing'), ('johan'); -set optimizer_switch = "engine_condition_pushdown=off"; -select * from t5 where b like '%jo%' order by a; -set optimizer_switch = "engine_condition_pushdown=on"; ---replace_column 9 # -explain select * from t5 where b like '%jo%'; -select * from t5 where b like '%jo%' order by a; - -# bug#21056 ndb pushdown equal/setValue error on datetime -set optimizer_switch = "engine_condition_pushdown=off"; -select auto from t1 where date_time like '1902-02-02 %' order by auto; -select auto from t1 where date_time not like '1902-02-02 %' order by auto; -set optimizer_switch = "engine_condition_pushdown=on"; ---replace_column 9 # -explain select auto from t1 where date_time like '1902-02-02 %'; -select auto from t1 where date_time like '1902-02-02 %' order by auto; ---replace_column 9 # -explain select auto from t1 where date_time not like '1902-02-02 %'; -select auto from t1 where date_time not like '1902-02-02 %' order by auto; - -# bug#17421 -1 -drop table t1; -create table t1 (a int, b varchar(3), primary key using hash(a)) -engine=ndb; -insert into t1 values (1,'a'), (2,'ab'), (3,'abc'); -# in TUP the constants 'ab' 'abc' were expected in varchar format -# "like" returned error which became "false" -# scan filter negates "or" which exposes the bug -set optimizer_switch = "engine_condition_pushdown=off"; -select * from t1 where b like 'ab'; -select * from t1 where b like 'ab' or b like 'ab'; -select * from t1 where b like 'abc'; -select * from t1 where b like 'abc' or b like 'abc'; -set optimizer_switch = "engine_condition_pushdown=on"; -select * from t1 where b like 'ab'; -select * from t1 where b like 'ab' or b like 'ab'; -select * from t1 where b like 'abc'; -select * from t1 where b like 'abc' or b like 'abc'; - -# bug#17421 -2 -drop table t1; -create table t1 (a int, b char(3), primary key using hash(a)) -engine=ndb; -insert into t1 values (1,'a'), (2,'ab'), (3,'abc'); -# test that incorrect MySQL behaviour is preserved -# 'ab ' LIKE 'ab' is true in MySQL -set optimizer_switch = "engine_condition_pushdown=off"; -select * from t1 where b like 'ab'; -select * from t1 where b like 'ab' or b like 'ab'; -select * from t1 where b like 'abc'; -select * from t1 where b like 'abc' or b like 'abc'; -set optimizer_switch = "engine_condition_pushdown=on"; -select * from t1 where b like 'ab'; -select * from t1 where b like 'ab' or b like 'ab'; -select * from t1 where b like 'abc'; -select * from t1 where b like 'abc' or b like 'abc'; - -# bug#20406 (maybe same as bug#17421 -1, not seen on 32-bit x86) -drop table t1; -create table t1 ( fname varchar(255), lname varchar(255) ) -engine=ndbcluster; -insert into t1 values ("Young","Foo"); - -set optimizer_switch = "engine_condition_pushdown=off"; -SELECT fname, lname FROM t1 WHERE (fname like 'Y%') or (lname like 'F%'); -set optimizer_switch = "engine_condition_pushdown=on"; -SELECT fname, lname FROM t1 WHERE (fname like 'Y%') or (lname like 'F%'); - -# make sure optimizer does not do some crazy shortcut -insert into t1 values ("aaa", "aaa"); -insert into t1 values ("bbb", "bbb"); -insert into t1 values ("ccc", "ccc"); -insert into t1 values ("ddd", "ddd"); - -set optimizer_switch = "engine_condition_pushdown=off"; -SELECT fname, lname FROM t1 WHERE (fname like 'Y%') or (lname like 'F%'); -set optimizer_switch = "engine_condition_pushdown=on"; -SELECT fname, lname FROM t1 WHERE (fname like 'Y%') or (lname like 'F%'); - -# bug#29390 (scan filter is too large, discarded) -# bug#34107 (previous limit was too large for TUP) - -drop table t1; - -create table t1 (a int, b int, c int, d int, primary key using hash(a)) - engine=ndbcluster; - -insert into t1 values (10,1,100,0+0x1111); -insert into t1 values (20,2,200,0+0x2222); -insert into t1 values (30,3,300,0+0x3333); -insert into t1 values (40,4,400,0+0x4444); -insert into t1 values (50,5,500,0+0x5555); - -set optimizer_switch = "engine_condition_pushdown=on"; - -select a,b,d from t1 - where b in (0,1,2,5) - order by b; - ---echo -- big filter just below limit ---disable_query_log -select a,b,d from t1 - where b in ( -0,1,2,5,0,1,2,5,0,1, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2) - order by b; ---enable_query_log - ---echo -- big filter just above limit ---disable_query_log -select a,b,d from t1 - where b in ( -0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2) - order by b; ---enable_query_log - -set optimizer_switch = @old_optimizer_switch; -DROP TABLE t1,t2,t3,t4,t5; diff --git a/mysql-test/suite/ndb/t/ndb_config.test b/mysql-test/suite/ndb/t/ndb_config.test deleted file mode 100644 index 08d1226953c..00000000000 --- a/mysql-test/suite/ndb/t/ndb_config.test +++ /dev/null @@ -1,23 +0,0 @@ --- source include/have_ndb.inc --- source include/ndb_default_cluster.inc --- source include/not_embedded.inc - ---exec $NDB_TOOLS_DIR/ndb_config --no-defaults --query=type,nodeid,host 2> /dev/null ---exec $NDB_TOOLS_DIR/ndb_config --no-defaults --query=nodeid,host,DataMemory,IndexMemory --type=ndbd 2> /dev/null ---exec $NDB_TOOLS_DIR/ndb_config --no-defaults -r \\\n -f " " --query=nodeid,host,DataMemory,IndexMemory --type=ndbd 2> /dev/null ---exec $NDB_TOOLS_DIR/ndb_config --no-defaults --query=nodeid --type=ndbd --host=localhost 2> /dev/null ---exec $NDB_TOOLS_DIR/ndb_config --no-defaults --query=type,nodeid,host --config-file=$MYSQL_TEST_DIR/std_data/ndb_config_config.ini 2> /dev/null - -# End of 4.1 tests - ---exec $NDB_TOOLS_DIR/ndb_config --defaults-group-suffix=.jonas --defaults-file=$MYSQL_TEST_DIR/std_data/ndb_config_mycnf1.cnf --query=type,nodeid,host,IndexMemory,DataMemory --mycnf 2> /dev/null - ---exec $NDB_TOOLS_DIR/ndb_config --defaults-group-suffix=.cluster0 --defaults-file=$MYSQL_TEST_DIR/std_data/ndb_config_mycnf2.cnf --query=type,nodeid,host --mycnf 2> /dev/null ---exec $NDB_TOOLS_DIR/ndb_config --defaults-group-suffix=.cluster1 --defaults-file=$MYSQL_TEST_DIR/std_data/ndb_config_mycnf2.cnf --query=type,nodeid,host --mycnf 2> /dev/null ---exec $NDB_TOOLS_DIR/ndb_config --defaults-group-suffix=.cluster2 --defaults-file=$MYSQL_TEST_DIR/std_data/ndb_config_mycnf2.cnf --query=type,nodeid,host --mycnf 2> /dev/null ---exec $NDB_TOOLS_DIR/ndb_config --defaults-group-suffix=.cluster2 --defaults-file=$MYSQL_TEST_DIR/std_data/ndb_config_mycnf2.cnf --ndb-shm --connections --query=type,nodeid1,nodeid2,group,nodeidserver --mycnf 2> /dev/null - - ---exec $NDB_TOOLS_DIR/ndb_config --no-defaults --query=nodeid --host=localhost --config-file=$MYSQL_TEST_DIR/std_data/ndb_config_config.ini 2> /dev/null ---exec $NDB_TOOLS_DIR/ndb_config --no-defaults --query=nodeid --host=1.2.3.4 --config-file=$MYSQL_TEST_DIR/std_data/ndb_config_config.ini 2> /dev/null ---exec $NDB_TOOLS_DIR/ndb_config --no-defaults --query=nodeid --host=127.0.0.1 --config-file=$MYSQL_TEST_DIR/std_data/ndb_config_config.ini 2> /dev/null diff --git a/mysql-test/suite/ndb/t/ndb_config2.test b/mysql-test/suite/ndb/t/ndb_config2.test deleted file mode 100644 index 170f1b2e5e7..00000000000 --- a/mysql-test/suite/ndb/t/ndb_config2.test +++ /dev/null @@ -1,7 +0,0 @@ --- source include/have_ndb.inc --- source include/ndb_default_cluster.inc --- source include/not_embedded.inc - -# Following doesn't work in all configurations (if shm is not defined) - ---exec $NDB_TOOLS_DIR/ndb_config --defaults-group-suffix=.cluster2 --defaults-file=$MYSQL_TEST_DIR/std_data/ndb_config_mycnf2.cnf --ndb-shm --connections --query=type,nodeid1,nodeid2,group,nodeidserver --mycnf 2> /dev/null diff --git a/mysql-test/suite/ndb/t/ndb_cursor.test b/mysql-test/suite/ndb/t/ndb_cursor.test deleted file mode 100644 index 406f8629cfe..00000000000 --- a/mysql-test/suite/ndb/t/ndb_cursor.test +++ /dev/null @@ -1,47 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -drop table if exists t1; -drop table if exists t2; ---enable_warnings - -create table t1 ( - a int not null primary key, - b int not null -) engine=ndb; - -create table t2 ( - a int not null primary key, - b int not null -) engine=ndb; - -insert into t1 values (1,10), (2,20), (3,30), (4, 40); - -delimiter //; -create procedure test_cursor () -begin - declare done int default 0; - declare temp_a int; - declare temp_b int; - declare cur1 cursor for select a,b from t1; - declare continue handler for sqlstate '02000' set done = 1; - open cur1; - repeat - fetch cur1 into temp_a, temp_b; - if not done then - insert into t2 values (temp_a, temp_b); - end if; - until done end repeat; - close cur1; -end; -// -delimiter ;// - -select * from t2 order by a; -call test_cursor(); -select * from t2 order by a; -drop procedure test_cursor; -drop table t1,t2; - ---echo end of 5.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_database.test b/mysql-test/suite/ndb/t/ndb_database.test deleted file mode 100644 index 8bfdf40de88..00000000000 --- a/mysql-test/suite/ndb/t/ndb_database.test +++ /dev/null @@ -1,24 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -drop database if exists mysqltest; ---enable_warnings - -# -# Check that all tables in a database are dropped when database is dropped -# - -create database mysqltest; -create table mysqltest.t1 (a int primary key, b int) engine=ndb; -use mysqltest; -show tables; - -drop database mysqltest; -create database mysqltest; -use mysqltest; -show tables; - -drop database mysqltest; - -# End of 4.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_dd_alter.test b/mysql-test/suite/ndb/t/ndb_dd_alter.test deleted file mode 100644 index 7635a8944da..00000000000 --- a/mysql-test/suite/ndb/t/ndb_dd_alter.test +++ /dev/null @@ -1,274 +0,0 @@ -############################################################## -# Author: JBM -# Date: 2006-01-12 -# Purpose: To test using ndb memory and disk tables together. -############################################################## - -############################################################## -# Author: Nikolay -# Date: 2006-05-12 -# Purpose: To test using ndb memory and disk tables together. -# -# Select from disk into memory table -# Select from disk into memory table -# Create test that loads data, use mysql dump to dump data, drop table, -# create table and load from mysql dump. -# Use group by asc and dec; Use having; Use order by -# ALTER Tests (Meta data testing): -# ALTER from InnoDB to Cluster Disk Data -# ALTER from MyISAM to Cluster Disk Data -# ALTER from Cluster Disk Data to InnoDB -# ALTER from Cluster Disk Data to MyISAM -# ALTER DD Tables and add columns -# ALTER DD Tables and add Indexes -# ALTER DD Tables and drop columns -# -############################################################## -# Author: Jonathan -# Date 2006-08-28 -# Purpose: To take out some of the test that are already -# Covered by other tests. Per Jonas -# The new purpose of this test is testing "Alter" -# Statements. Therefore the name is changed to -# ndb_dd_alter.test -# Removed tests include: -# Select from disk into memory table -# Select from disk into memory table -# Create test that loads data, use mysql dump to dump data, drop table, -# create table and load from mysql dump. -# Use group by asc and dec; Use having; Use order by -############################################################## - --- source include/have_ndb.inc --- source include/have_innodb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; ---enable_warnings - -############ Test Setup Section ############# --- echo **** Test Setup Section **** -################## ALTER Tests (Meta data testing) #################### - - CREATE LOGFILE GROUP lg - ADD UNDOFILE './lg_group/undofile.dat' - INITIAL_SIZE 16M - UNDO_BUFFER_SIZE = 1M - ENGINE=NDB; - - CREATE TABLESPACE ts - ADD DATAFILE './table_space/datafile.dat' - USE LOGFILE GROUP lg - INITIAL_SIZE 12M - ENGINE NDB; - -#### Try to ALTER from InnoDB to Cluster Disk Data - -CREATE TABLE test.t1 ( - a1 smallint NOT NULL, - a2 int NOT NULL, - a3 bigint NOT NULL, - a4 char(10), - a5 decimal(5,1), - a6 time, - a7 date, - a8 datetime, - a9 VARCHAR(255), - a10 blob, - PRIMARY KEY(a1) -) ENGINE=InnoDB; - -let $1=20; -disable_query_log; -while ($1) -{ - eval insert into test.t1 values($1, $1+1, $1+2000000000, "aaa$1", 34.2, '4:3:2', '2006-1-1', '1971-5-28 16:55:03', "bbbbbbbbbbbbb$1", "binary data"); - dec $1; -} -enable_query_log; - -SHOW CREATE TABLE test.t1; -SELECT * FROM test.t1 ORDER BY a1; -ALTER TABLE test.t1 TABLESPACE ts STORAGE DISK ENGINE=NDB; -SHOW CREATE TABLE test.t1; -# Check column storage ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep 'ST=' -SELECT * FROM test.t1 ORDER BY a1; -DROP TABLE test.t1; - -#### Try to ALTER from MyISAM to Cluster Disk Data - -CREATE TABLE test.t1 ( - a1 smallint NOT NULL, - a2 int NOT NULL, - a3 bigint NOT NULL, - a4 char(10), - a5 decimal(5,1), - a6 time, - a7 date, - a8 datetime, - a9 VARCHAR(255), - a10 blob, - PRIMARY KEY(a1) -) ENGINE=MyISAM; - -let $1=20; -disable_query_log; -while ($1) -{ - eval insert into test.t1 values($1, $1+1, $1+2000000000, "aaa$1", 34.2, '4:3:2', '2006-1-1', '1971-5-28 16:55:03', "bbbbbbbbbbbbb$1", "binary data"); - dec $1; -} -enable_query_log; - -SHOW CREATE TABLE test.t1; -SELECT * FROM test.t1 ORDER BY a1; -ALTER TABLE test.t1 TABLESPACE ts STORAGE DISK ENGINE=NDB; -SHOW CREATE TABLE test.t1; -# Check column storage ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep 'ST=' -SELECT * FROM test.t1 ORDER BY a1; - -#### Try to ALTER from Cluster Disk Data to InnoDB - -ALTER TABLE test.t1 ENGINE=InnoDB; -SHOW CREATE TABLE test.t1; -SELECT * FROM test.t1 ORDER BY a1; -ALTER TABLE test.t1 TABLESPACE ts STORAGE DISK ENGINE=NDB; -SHOW CREATE TABLE test.t1; -# Check column storage ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep 'ST=' - -#### Try to ALTER from Cluster Disk Data to MyISAM - -ALTER TABLE test.t1 ENGINE=MyISAM; -SHOW CREATE TABLE test.t1; -DROP TABLE test.t1; - -#### Try to ALTER DD Tables and add columns - -CREATE TABLE test.t1 (a1 INT PRIMARY KEY) TABLESPACE ts STORAGE DISK ENGINE=NDB; - -let $1=20; -disable_query_log; -while ($1) -{ - eval insert into test.t1 values($1); - dec $1; -} -enable_query_log; - -SELECT * FROM test.t1 ORDER BY a1; - -SELECT * FROM information_schema.partitions WHERE table_name= 't1' AND partition_name = 'p0'; - -ALTER TABLE test.t1 ADD a2 FLOAT, ADD a3 DOUBLE; - -SELECT * FROM information_schema.partitions WHERE table_name= 't1' AND partition_name = 'p0'; - -let $1=20; -disable_query_log; -while ($1) -{ - eval update test.t1 set a2 = $1+1.2345, a3 = $1+20000000.00 where a1 = $1; - dec $1; -} -enable_query_log; - -SELECT * FROM test.t1 ORDER BY a1; - -ALTER TABLE test.t1 ADD a4 BIT, ADD a5 TINYINT, ADD a6 BIGINT, ADD a7 DATE, ADD a8 TIME; - -let $1=20; -disable_query_log; -while ($1) -{ - eval update test.t1 set a4 = 0, a5 = 1, a6 = $1+23456, a7 = '2006-1-1', - a8 = '07:04:00' where a1 = $1; - dec $1; -} -enable_query_log; - -SELECT a1,a2,a3,hex(a4), a5,a6,a7,a8 FROM test.t1 ORDER BY a1; - -ALTER TABLE test.t1 ADD a9 DATETIME, ADD a10 TINYTEXT, ADD a11 MEDIUMTEXT, ADD a12 LONGTEXT, ADD a13 TEXT, ADD a14 BLOB; -SHOW CREATE TABLE test.t1; -# Check column storage ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep 'ST=' - -disable_query_log; -set @d2 = 'dd2'; -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -enable_query_log; - -let $1=20; -disable_query_log; -while ($1) -{ - eval update test.t1 set a9 = '1971-5-28 16:55:03', a10 = 'abc', a11 = 'abcdefg', - a12 = 'LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL', a13 = 'Text Field', - a14 = @d2 where a1 = $1; - dec $1; -} -enable_query_log; - -SELECT a1, a2,a3,hex(a4),a5,a6,a7,a8,a9,a10,a11,a12,a13 FROM test.t1 ORDER BY a1; - -#### Try to ALTER DD Tables and add Indexes - -ALTER TABLE test.t1 ADD INDEX a2_i (a2), ADD INDEX a3_i (a3); - -SHOW CREATE TABLE test.t1; - -# Check column storage ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep 'ST=' - -ALTER TABLE test.t1 DROP INDEX a2_i; - -SHOW CREATE TABLE test.t1; - -# Check column storage ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep 'ST=' - -TRUNCATE TABLE test.t1; - -SHOW CREATE TABLE test.t1; - -# Check column storage ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep 'ST=' - -#### Try to ALTER DD Tables and drop columns - - -ALTER TABLE test.t1 DROP a14; -ALTER TABLE test.t1 DROP a13; -ALTER TABLE test.t1 DROP a12; -ALTER TABLE test.t1 DROP a11; -ALTER TABLE test.t1 DROP a10; -ALTER TABLE test.t1 DROP a9; -ALTER TABLE test.t1 DROP a8; -ALTER TABLE test.t1 DROP a7; -ALTER TABLE test.t1 DROP a6; -ALTER TABLE test.t1 DROP PRIMARY KEY; - -SHOW CREATE TABLE test.t1; - -# Check column storage ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep 'ST=' - -DROP TABLE test.t1; - - ALTER TABLESPACE ts - DROP DATAFILE './table_space/datafile.dat' - ENGINE NDB; - DROP TABLESPACE ts ENGINE NDB; - DROP LOGFILE GROUP lg ENGINE=NDB; - -####################### End section 4 ######################### -#End 5.1 test case - diff --git a/mysql-test/suite/ndb/t/ndb_dd_basic.test b/mysql-test/suite/ndb/t/ndb_dd_basic.test deleted file mode 100644 index 0fb793e2142..00000000000 --- a/mysql-test/suite/ndb/t/ndb_dd_basic.test +++ /dev/null @@ -1,485 +0,0 @@ -################################# -# Author: JO -# Org Date: ? -# Purpose: To test basic Cluster Disk Data -################################# -# Change Author: JBM -# Change Date: 2006-01-11 -# Change: Cleanup and test rename -################################# -# Change Author: Guangbao Ni -# Change Date: 2007-03-20 -# Change: Test insert data when no datafile in spacetable -################################# - --- source include/have_ndb.inc - -# -# Bug#30322 Server crashes on selecting from i_s.columns when cluster is running -regression -# ---replace_column 1 # -select count(*) from information_schema.columns; - ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - -# some negative tests -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=MYISAM; - -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE = 4M -ENGINE=XYZ; - -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M; - -################################## -# Basic test of disk tables for NDB -# Start by creating a logfile group -################################## - -set storage_engine=ndb; -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M; - -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE = 4M -ENGINE=NDB; - -################################################### -# Create a tablespace connected to the logfile group -################################################### - -set storage_engine=myisam; -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE NDB; - -ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile02.dat' -INITIAL_SIZE = 4M -ENGINE=NDB; - -######################################## -# Create a table using this tablespace -######################################## - -CREATE TABLE t1 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE ts1 STORAGE DISK -ENGINE=NDB; - -SHOW CREATE TABLE t1; - -INSERT INTO t1 VALUES (0, 0, 0); -SELECT * FROM t1; - -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10), -(11,11,11),(12,12,12),(13,13,13),(14,14,14),(15,15,15), -(16,16,16),(17,17,17),(18,18,18),(19,19,19),(20,20,20), -(21,21,21),(22,22,22),(23,23,23),(24,24,24),(25,25,25), -(26,26,26),(27,27,27),(28,28,28),(29,29,29),(30,30,30), -(31,31,31),(32,32,32),(33,33,33),(34,34,34),(35,35,35), -(36,36,36),(37,37,37),(38,38,38),(39,39,39),(40,40,40), -(41,41,41),(42,42,42),(43,43,43),(44,44,44),(45,45,45), -(46,46,46),(47,47,47),(48,48,48),(49,49,49),(50,50,50), -(51,51,51),(52,52,52),(53,53,53),(54,54,54),(55,55,55), -(56,56,56),(57,57,57),(58,58,58),(59,59,59),(60,60,60), -(61,61,61),(62,62,62),(63,63,63),(64,64,64),(65,65,65), -(66,66,66),(67,67,67),(68,68,68),(69,69,69),(70,70,70), -(71,71,71),(72,72,72),(73,73,73),(74,74,74),(75,75,75), -(76,76,76),(77,77,77),(78,78,78),(79,79,79),(80,80,80), -(81,81,81),(82,82,82),(83,83,83),(84,84,84),(85,85,85), -(86,86,86),(87,87,87),(88,88,88),(89,89,89),(90,90,90), -(91,91,91),(92,92,92),(93,93,93),(94,94,94),(95,95,95), -(96,96,96),(97,97,97),(98,98,98),(99,99,99),(100,100,100), -(101,101,101),(102,102,102),(103,103,103),(104,104,104),(105,105,105), -(106,106,106),(107,107,107),(108,108,108),(109,109,109),(110,110,110), -(111,111,111),(112,112,112),(113,113,113),(114,114,114),(115,115,115), -(116,116,116),(117,117,117),(118,118,118),(119,119,119),(120,120,120), -(121,121,121),(122,122,122),(123,123,123),(124,124,124),(125,125,125), -(126,126,126),(127,127,127),(128,128,128),(129,129,129),(130,130,130), -(131,131,131),(132,132,132),(133,133,133),(134,134,134),(135,135,135), -(136,136,136),(137,137,137),(138,138,138),(139,139,139),(140,140,140), -(141,141,141),(142,142,142),(143,143,143),(144,144,144),(145,145,145), -(146,146,146),(147,147,147),(148,148,148),(149,149,149),(150,150,150), -(151,151,151),(152,152,152),(153,153,153),(154,154,154),(155,155,155), -(156,156,156),(157,157,157),(158,158,158),(159,159,159),(160,160,160), -(161,161,161),(162,162,162),(163,163,163),(164,164,164),(165,165,165), -(166,166,166),(167,167,167),(168,168,168),(169,169,169),(170,170,170), -(171,171,171),(172,172,172),(173,173,173),(174,174,174),(175,175,175), -(176,176,176),(177,177,177),(178,178,178),(179,179,179),(180,180,180), -(181,181,181),(182,182,182),(183,183,183),(184,184,184),(185,185,185), -(186,186,186),(187,187,187),(188,188,188),(189,189,189),(190,190,190), -(191,191,191),(192,192,192),(193,193,193),(194,194,194),(195,195,195), -(196,196,196),(197,197,197),(198,198,198),(199,199,199),(200,200,200), -(201,201,201),(202,202,202),(203,203,203),(204,204,204),(205,205,205), -(206,206,206),(207,207,207),(208,208,208),(209,209,209),(210,210,210), -(211,211,211),(212,212,212),(213,213,213),(214,214,214),(215,215,215), -(216,216,216),(217,217,217),(218,218,218),(219,219,219),(220,220,220), -(221,221,221),(222,222,222),(223,223,223),(224,224,224),(225,225,225), -(226,226,226),(227,227,227),(228,228,228),(229,229,229),(230,230,230), -(231,231,231),(232,232,232),(233,233,233),(234,234,234),(235,235,235), -(236,236,236),(237,237,237),(238,238,238),(239,239,239),(240,240,240), -(241,241,241),(242,242,242),(243,243,243),(244,244,244),(245,245,245), -(246,246,246),(247,247,247),(248,248,248),(249,249,249),(250,250,250), -(251,251,251),(252,252,252),(253,253,253),(254,254,254),(255,255,255), -(256,256,256),(257,257,257),(258,258,258),(259,259,259),(260,260,260), -(261,261,261),(262,262,262),(263,263,263),(264,264,264),(265,265,265), -(266,266,266),(267,267,267),(268,268,268),(269,269,269),(270,270,270), -(271,271,271),(272,272,272),(273,273,273),(274,274,274),(275,275,275), -(276,276,276),(277,277,277),(278,278,278),(279,279,279),(280,280,280), -(281,281,281),(282,282,282),(283,283,283),(284,284,284),(285,285,285), -(286,286,286),(287,287,287),(288,288,288),(289,289,289),(290,290,290), -(291,291,291),(292,292,292),(293,293,293),(294,294,294),(295,295,295), -(296,296,296),(297,297,297),(298,298,298),(299,299,299),(300,300,300), -(301,301,301),(302,302,302),(303,303,303),(304,304,304),(305,305,305), -(306,306,306),(307,307,307),(308,308,308),(309,309,309),(310,310,310), -(311,311,311),(312,312,312),(313,313,313),(314,314,314),(315,315,315), -(316,316,316),(317,317,317),(318,318,318),(319,319,319),(320,320,320), -(321,321,321),(322,322,322),(323,323,323),(324,324,324),(325,325,325), -(326,326,326),(327,327,327),(328,328,328),(329,329,329),(330,330,330), -(331,331,331),(332,332,332),(333,333,333),(334,334,334),(335,335,335), -(336,336,336),(337,337,337),(338,338,338),(339,339,339),(340,340,340), -(341,341,341),(342,342,342),(343,343,343),(344,344,344),(345,345,345), -(346,346,346),(347,347,347),(348,348,348),(349,349,349),(350,350,350), -(351,351,351),(352,352,352),(353,353,353),(354,354,354),(355,355,355), -(356,356,356),(357,357,357),(358,358,358),(359,359,359),(360,360,360), -(361,361,361),(362,362,362),(363,363,363),(364,364,364),(365,365,365), -(366,366,366),(367,367,367),(368,368,368),(369,369,369),(370,370,370), -(371,371,371),(372,372,372),(373,373,373),(374,374,374),(375,375,375), -(376,376,376),(377,377,377),(378,378,378),(379,379,379),(380,380,380), -(381,381,381),(382,382,382),(383,383,383),(384,384,384),(385,385,385), -(386,386,386),(387,387,387),(388,388,388),(389,389,389),(390,390,390), -(391,391,391),(392,392,392),(393,393,393),(394,394,394),(395,395,395), -(396,396,396),(397,397,397),(398,398,398),(399,399,399),(400,400,400), -(401,401,401),(402,402,402),(403,403,403),(404,404,404),(405,405,405), -(406,406,406),(407,407,407),(408,408,408),(409,409,409),(410,410,410), -(411,411,411),(412,412,412),(413,413,413),(414,414,414),(415,415,415), -(416,416,416),(417,417,417),(418,418,418),(419,419,419),(420,420,420), -(421,421,421),(422,422,422),(423,423,423),(424,424,424),(425,425,425), -(426,426,426),(427,427,427),(428,428,428),(429,429,429),(430,430,430), -(431,431,431),(432,432,432),(433,433,433),(434,434,434),(435,435,435), -(436,436,436),(437,437,437),(438,438,438),(439,439,439),(440,440,440), -(441,441,441),(442,442,442),(443,443,443),(444,444,444),(445,445,445), -(446,446,446),(447,447,447),(448,448,448),(449,449,449),(450,450,450), -(451,451,451),(452,452,452),(453,453,453),(454,454,454),(455,455,455), -(456,456,456),(457,457,457),(458,458,458),(459,459,459),(460,460,460), -(461,461,461),(462,462,462),(463,463,463),(464,464,464),(465,465,465), -(466,466,466),(467,467,467),(468,468,468),(469,469,469),(470,470,470), -(471,471,471),(472,472,472),(473,473,473),(474,474,474),(475,475,475), -(476,476,476),(477,477,477),(478,478,478),(479,479,479),(480,480,480), -(481,481,481),(482,482,482),(483,483,483),(484,484,484),(485,485,485), -(486,486,486),(487,487,487),(488,488,488),(489,489,489),(490,490,490), -(491,491,491),(492,492,492),(493,493,493),(494,494,494),(495,495,495), -(496,496,496),(497,497,497),(498,498,498),(499,499,499),(500, 500, 500); - -SELECT COUNT(*) FROM t1; - -#################################### -# Test error cases with size numbers -#################################### ---error ER_WRONG_SIZE_NUMBER -CREATE LOGFILE GROUP lg2 -ADD UNDOFILE 'x.dat' -INITIAL_SIZE 10y -ENGINE = NDB; - ---error ER_WRONG_SIZE_NUMBER -CREATE LOGFILE GROUP lg2 -ADD UNDOFILE 'x.dat' -INITIAL_SIZE 10MB -ENGINE = NDB; - ---error 1064 -CREATE LOGFILE GROUP lg2 -ADD UNDOFILE 'x.dat' -INITIAL_SIZE 10 MB -ENGINE = NDB; - ---error 1064 -CREATE LOGFILE GROUP lg2 -ADD UNDOFILE 'x.dat' -INITIAL_SIZE 10 M -ENGINE = NDB; - ---error ER_SIZE_OVERFLOW_ERROR -CREATE LOGFILE GROUP lg2 -ADD UNDOFILE 'x.dat' -INITIAL_SIZE 1000000000000K -ENGINE = NDB; - -DROP TABLE t1; - -create tablespace ts2 -add datafile 'datafile2_1.dat' -use logfile group lg1 -initial_size 12M -engine ndb; - -CREATE TABLE City ( - ID int(11) NOT NULL AUTO_INCREMENT, - Name char(35) NOT NULL, - CountryCode char(3) NOT NULL, - District char(20) NOT NULL, - Population int(11) NOT NULL, - PRIMARY KEY (ID) -) ENGINE=ndbcluster -tablespace ts2 -storage disk; - -alter tablespace ts2 -drop datafile 'datafile2_1.dat' -engine ndb; - -#It will give error messages: NoDatafile in tablespace ---error ER_GET_ERRMSG -insert -into City (Name,CountryCode,District,Population) -values ('BeiJing','CN','Beijing',2000); - ---error ER_DROP_FILEGROUP_FAILED -drop tablespace ts2 -engine ndb; - -drop table City; - -drop tablespace ts2 -engine ndb; - -############################ -# Test update of mm/dd part -############################ - -CREATE TABLE t1 (a INT PRIMARY KEY, b CHAR(4) NOT NULL, c CHAR(4) NOT NULL, KEY(b)) TABLESPACE ts1 STORAGE DISK ENGINE = NDB; -INSERT INTO t1 VALUES (1,'1','1'), (2,'2','2'), (3,'3','3'); -BEGIN; -UPDATE t1 SET b = '2' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -SELECT * FROM t1 WHERE a = 1; -UPDATE t1 SET c = '2' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -SELECT * FROM t1 WHERE a = 1; -UPDATE t1 SET b = '3' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -SELECT * FROM t1 WHERE a = 1; -COMMIT; -SELECT * FROM t1 ORDER BY 1; -BEGIN; -UPDATE t1 SET c = '3' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -SELECT * FROM t1 WHERE a = 1; -UPDATE t1 SET b = '4' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -SELECT * FROM t1 WHERE a = 1; -UPDATE t1 SET c = '4' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -SELECT * FROM t1 WHERE a = 1; -COMMIT; -SELECT * FROM t1 ORDER BY 1; -UPDATE t1 SET b = '5' WHERE a = 1; -SELECT * FROM t1 ORDER BY 1; -UPDATE t1 SET b = '6' WHERE b = '5'; -SELECT * FROM t1 ORDER BY 1; -UPDATE t1 SET b = '7'WHERE c = '4'; -SELECT * FROM t1 ORDER BY 1; -UPDATE t1 SET c = '5' WHERE a = 1; -SELECT * FROM t1 ORDER BY 1; -UPDATE t1 SET c = '6' WHERE b = '7'; -SELECT * FROM t1 ORDER BY 1; -UPDATE t1 SET c = '7' WHERE c = '6'; -SELECT * FROM t1 ORDER BY 1; -DROP TABLE t1; - -##### - -CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(4) NOT NULL, c CHAR(4) NOT NULL, KEY(b)) TABLESPACE ts1 STORAGE DISK ENGINE NDB; -INSERT INTO t1 VALUE (1,'1','1'), (2,'2','2'), (3,'3','3'); -BEGIN; -UPDATE t1 SET b = '2' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -SELECT * FROM t1 WHERE a = 1; -UPDATE t1 SET c = '2' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -SELECT * FROM t1 WHERE a = 1; -UPDATE t1 SET b = '3' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -SELECT * FROM t1 WHERE a = 1; -COMMIT; -SELECT * FROM t1 ORDER BY 1; -BEGIN; -UPDATE t1 SET c = '3' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -SELECT * FROM t1 WHERE a = 1; -UPDATE t1 SET b = '4' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -SELECT * FROM t1 WHERE a = 1; -UPDATE t1 SET c = '4' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -SELECT * FROM t1 WHERE a = 1; -COMMIT; -SELECT * FROM t1 ORDER BY 1; -UPDATE t1 SET b = '5' WHERE a = 1; -SELECT * FROM t1 ORDER BY 1; -UPDATE t1 SET b = '6' WHERE b = '5'; -SELECT * FROM t1 ORDER BY 1; -UPDATE t1 SET b = '7' WHERE c = '4'; -SELECT * FROM t1 ORDER BY 1; -UPDATE t1 SET c = '5' WHERE a = 1; -SELECT * FROM t1 ORDER BY 1; -UPDATE t1 SET c = '6' WHERE b = '7'; -SELECT * FROM t1 ORDER BY 1; -UPDATE t1 SET c = '7' WHERE c = '6'; -SELECT * FROM t1 ORDER BY 1; - -DELETE FROM t1; -INSERT INTO t1 VALUES (3,'1','1'); -BEGIN; -UPDATE t1 SET b = b + 2 WHERE A = 3; -DELETE FROM t1 WHERE A = 3; -INSERT INTO t1 VALUES (3,'0','0'); -COMMIT; -SELECT * from t1 ORDER BY 1; - -DROP TABLE t1; - -######################## -# Test for blobs... -######################## - -CREATE TABLE t1 ( - a INT NOT NULL PRIMARY KEY, - b TEXT NOT NULL -) TABLESPACE ts1 STORAGE DISK ENGINE=NDBCLUSTER; - -# b1 length 2000+256 (blob part aligned) -######################################### -set @x0 = '01234567012345670123456701234567'; -set @x0 = concat(@x0,@x0,@x0,@x0,@x0,@x0,@x0,@x0); -set @b1 = 'b1'; -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@x0); -# b2 length 20000 -########################################## -set @b2 = 'b2'; -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); - -INSERT INTO t1 VALUES(1,@b1); -INSERT INTO t1 VALUES(2,@b2); -SELECT a,length(b),substr(b,1+2*900,2) FROM t1 WHERE a=1; -SELECT a,length(b),substr(b,1+2*9000,2) FROM t1 WHERE a=2; -UPDATE t1 SET b=@b2 WHERE a=1; -UPDATE t1 SET b=@b1 WHERE a=2; -SELECT a,length(b),substr(b,1+2*9000,2) FROM t1 WHERE a=1; -SELECT a,length(b),substr(b,1+2*900,2) FROM t1 WHERE a=2; -UPDATE t1 SET b=concat(b,b) WHERE a=1; -UPDATE t1 SET b=concat(b,b) WHERE a=2; -SELECT a,length(b),substr(b,1+4*9000,2) FROM t1 WHERE a=1; -SELECT a,length(b),substr(b,1+4*900,2) FROM t1 WHERE a=2; -DELETE FROM t1 WHERE a=1; -DELETE FROM t1 WHERE a=2; -SELECT COUNT(*) FROM t1; -DROP TABLE t1; - -# bug#20612 INS-DEL bug (not pgman bug) -# found via disk data assert but is not pgman or disk data related - -CREATE TABLE t1 ( - a int NOT NULL, - b varchar(4000), -- must use 2 pages undo - PRIMARY KEY using hash (a) -) -TABLESPACE ts1 STORAGE DISK ENGINE=NDBCLUSTER; - -set autocommit = 0; -insert into t1 values(0,'x'); -insert into t1 values(1,'x'); -insert into t1 values(2,'x'); -insert into t1 values(3,'x'); -insert into t1 values(4,'x'); -insert into t1 values(5,'x'); -insert into t1 values(6,'x'); -insert into t1 values(7,'x'); -insert into t1 values(8,'x'); -delete from t1 where a = 0; -commit; - -delete from t1; -begin; -insert into t1 values (1, 'x'); -select * from t1; -rollback; - -set autocommit = 1; - - -drop table t1; -############################# -# Customer posted order by test case -# Org in ndb_dd_advance.test -############################# - -create table test.t1 (f1 varchar(50) primary key, f2 text,f3 int) -TABLESPACE ts1 STORAGE DISK engine=NDB; -insert into test.t1 (f1,f2,f3)VALUES("111111","aaaaaa",1); -insert into test.t1 (f1,f2,f3)VALUES("222222","bbbbbb",2); -select * from test.t1 order by f1; -select f1,f2 from test.t1 order by f2; -select f2 from test.t1 order by f2; -select f1,f2 from test.t1 order by f1; -drop table test.t1; - -# bug#34118 hash index trigger and do not update any disk attr -CREATE TABLE t1 ( -id int unsigned NOT NULL, -c1 int unsigned NOT NULL, -c2 int DEFAULT NULL, -PRIMARY KEY using hash (id), -UNIQUE KEY c1 using hash (c1)) -TABLESPACE ts1 STORAGE DISK ENGINE=ndbcluster; - -insert into t1 values(1, 1, 3); -insert into t1 values(2, 2, 3); ---error ER_DUP_ENTRY -update t1 set c1 = 1 where id = 2; -drop table t1; - -################### -# Test Cleanup -################### - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE = NDB; - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile02.dat' -ENGINE = NDB; - -DROP TABLESPACE ts1 -ENGINE = NDB; - -DROP LOGFILE GROUP lg1 -ENGINE =NDB; - -#End 5.1 test case diff --git a/mysql-test/suite/ndb/t/ndb_dd_ddl.test b/mysql-test/suite/ndb/t/ndb_dd_ddl.test deleted file mode 100644 index ca39be87c94..00000000000 --- a/mysql-test/suite/ndb/t/ndb_dd_ddl.test +++ /dev/null @@ -1,470 +0,0 @@ -######################################### -# Author: JBM -# Date: 2006-01-03 -# Purpose: Test the NDB engine reaction to duplicate -# Table spaces and log groups. Also to test -# Statement mixed case. -############################################ -# Change Author:JBM -# Change Date 2006-01-19 -# Change: Adding to test cases feedback from OB -# 1) The 'duplicate' tests. -# a) The test is using the default (test) database and is not -# attempting to create databases (only logs, table spaces and -# tables). Is this intentional? -# b) What about a duplication of table name when one exists on disk and -# you are trying to create it again in memory? -# -#2) 'CaSE SensiTiVE' tests -# a) Suggest you include a test case where the case difference is in -# the file name. I know this is not an issue for *nix systems but -# will be when we expand to Windows and Mac. Better put it in now. -############################################ -# -# Jonas 2006-03-10 -# Add verification that ndb currently is limited to 1 logfile group -# - - --- source include/have_ndb.inc - ---disable_warnings -DROP TABLE IF EXISTS t1; -DROP DATABASE IF EXISTS mysqltest; -CREATE DATABASE mysqltest; ---enable_warnings - -############## Duplcate Statement Testing ######### - ---echo **** Begin Duplicate Statement Testing **** - -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 1M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; - -# Verify that one currently can create only 1 logfile group ---error ER_CREATE_FILEGROUP_FAILED -CREATE LOGFILE GROUP lg2 -ADD UNDOFILE 'undofile2.dat' -INITIAL_SIZE 1M -UNDO_BUFFER_SIZE 1M -ENGINE NDB; -SHOW WARNINGS; - ---error ER_CREATE_FILEGROUP_FAILED -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 1M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; - -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE 1M ENGINE NDB; - ---error ER_ALTER_FILEGROUP_FAILED -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE 1M ENGINE=NDB; - -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 1M -ENGINE NDB; - ---error ER_CREATE_FILEGROUP_FAILED -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 1M -ENGINE NDB; - - -ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile2.dat' -INITIAL_SIZE 1M -ENGINE=NDB; - ---error ER_ALTER_FILEGROUP_FAILED -ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile2.dat' -INITIAL_SIZE 1M -ENGINE=NDB; - -CREATE TABLE mysqltest.t1 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE ts1 STORAGE DISK -ENGINE=NDB; - ---error ER_TABLE_EXISTS_ERROR -CREATE TABLE mysqltest.t1 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE ts1 STORAGE DISK -ENGINE=NDB; - ---error ER_TABLE_EXISTS_ERROR -CREATE TABLE mysqltest.t1 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -ENGINE=NDB; - - -DROP TABLE mysqltest.t1; - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile2.dat' -ENGINE=NDB; - ---error ER_ALTER_FILEGROUP_FAILED -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile2.dat' -ENGINE=NDB; - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE=NDB; - ---error ER_ALTER_FILEGROUP_FAILED -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE=NDB; - -DROP TABLESPACE ts1 -ENGINE=NDB; - ---error ER_DROP_FILEGROUP_FAILED -DROP TABLESPACE ts1 -ENGINE=NDB; - -DROP LOGFILE GROUP lg1 -ENGINE=NDB; - ---error ER_DROP_FILEGROUP_FAILED -DROP LOGFILE GROUP lg1 -ENGINE=NDB; - -DROP DATABASE IF EXISTS mysqltest; - ---echo **** End Duplicate Statement Testing **** -############# End Duplicate Statments ############ ---echo -############ Begin CaSe Testing ################## ---echo **** Begin Statment CaSe Testing **** - -creaTE LOgfilE GrOuP lg1 -adD undoFILE 'undofile.dat' -initiAL_siZE 1M -UnDo_BuFfEr_SiZe = 1M -ENGInE=NDb; - -altER LOgFiLE GrOUp lg1 -AdD UnDOfILe 'uNdOfiLe02.daT' -INItIAl_SIzE 1M ENgINE nDB; - -CrEAtE TABLEspaCE ts1 -ADD DATAfilE 'datafile.dat' -UsE LoGFiLE GRoUP lg1 -INITiaL_SizE 1M -ENGiNe NDb; - -AlTeR tAbLeSpAcE ts1 -AdD DaTaFiLe 'dAtAfiLe2.daT' -InItIaL_SiZe 1M -EnGiNe=NDB; - -CREATE TABLE t1 -(pk1 int not null primary key, b int not null, c int not null) -TABLEspace ts1 storAGE dISk -ENGine nDb; - -DROP TABLE t1; - -AlteR TAblespaCE ts1 -droP DATAfile 'dAtAfiLe2.daT' -ENGINE=NDB; - -ALter tablesPACE ts1 -dROp dAtAfIlE 'datafile.dat' -ENGine=Ndb; - -DrOp TaBleSpAcE ts1 -engINE=ndB; - -DrOp lOgFiLe GrOuP lg1 -EnGiNe=nDb; - ---echo **** End Statment CaSe Testing **** -############ End CaSe Testing ################## ---echo -############ Begin = and no = Testing ########## ---echo **** Begin = And No = Testing **** - -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE=1M -UNDO_BUFFER_SIZE=1M -ENGINE=NDB; - -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE=1M -ENGINE=NDB; - -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE=1M -ENGINE=NDB; - -ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile2.dat' -INITIAL_SIZE=1M -ENGINE=NDB; - -CREATE TABLE t1 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE ts1 STORAGE DISK -ENGINE=NDB; - -DROP TABLE t1; - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile2.dat' -ENGINE=NDB; - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE=NDB; - -DROP TABLESPACE ts1 -ENGINE=NDB; - -DROP LOGFILE GROUP lg1 -ENGINE=NDB; - ---echo ---echo **** End of = **** ---echo - -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 1M -UNDO_BUFFER_SIZE 1M -ENGINE NDB; - -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE 1M -ENGINE NDB; - -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 1M -ENGINE NDB; - -ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile2.dat' -INITIAL_SIZE 1M -ENGINE NDB; - ---error 1005 -CREATE TABLE t1 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE ts1 STORAGE MEMORY -ENGINE NDB; - -CREATE TABLE t1 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE ts1 STORAGE DISK -ENGINE NDB; - - -CREATE INDEX b_i on t1(b); -CREATE INDEX bc_i on t1(b, c); - -DROP TABLE t1; - -# bug#20053 - -CREATE TABLESPACE ts2 -ADD DATAFILE 'datafile3.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 1M -ENGINE NDB; - ---error ER_ALTER_FILEGROUP_FAILED -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile3.dat' -ENGINE NDB; - ---error ER_ALTER_FILEGROUP_FAILED -ALTER TABLESPACE ts2 -DROP DATAFILE 'datafile2.dat' -ENGINE NDB; -# bug#20053 - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile2.dat' -ENGINE NDB; - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE NDB; - -DROP TABLESPACE ts1 -ENGINE NDB; - -ALTER TABLESPACE ts2 -DROP DATAFILE 'datafile3.dat' -ENGINE NDB; - -DROP TABLESPACE ts2 -ENGINE NDB; - -DROP LOGFILE GROUP lg1 -ENGINE NDB; - ---echo **** End = And No = **** -############ End = And No = ################## - -### -# -# bug#16341 -#create table t1 (a int primary key) engine = myisam; -# 2007-08-22 Jeb -# Removed the use of create table and manually -# created the file to cause failure due to -# inconsistant results on other OS -# see #bug30559 - ---exec touch $MYSQLTEST_VARDIR/tmp/t1.frm - ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR ---error ER_CREATE_FILEGROUP_FAILED ---eval create logfile group lg1 add undofile '$MYSQLTEST_VARDIR/tmp/t1.frm' initial_size 1M undo_buffer_size = 1M engine=ndb; - -create logfile group lg1 -add undofile 'undofile.dat' -initial_size 1M -undo_buffer_size = 1M -engine=ndb; - ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR ---error ER_CREATE_FILEGROUP_FAILED ---eval create tablespace ts1 add datafile '$MYSQLTEST_VARDIR/tmp/t1.frm' use logfile group lg1 initial_size 1M engine ndb; - ---error ER_DROP_FILEGROUP_FAILED -drop tablespace ts1 -engine ndb; - -drop logfile group lg1 -engine ndb; - -#drop table t1; ---exec rm $MYSQLTEST_VARDIR/tmp/t1.frm - - ---echo ---echo # ----------------------------------------------------------------- ---echo # End 5.1 test ---echo # ----------------------------------------------------------------- - ---echo ---echo # -- ---echo # -- WL#4300: Define privileges for tablespaces. ---echo # -- - -GRANT CREATE TABLESPACE ON *.* TO mysqltest_u1@localhost; - ---echo - ---disable_warnings -DROP DATABASE IF EXISTS mysqltest2; ---enable_warnings - -CREATE DATABASE mysqltest2; - -GRANT ALL PRIVILEGES ON mysqltest2.* TO mysqltest_u2@localhost; - ---echo ---echo # -- Connection: mysqltest_u1@localhost ---echo ---connect(con1, localhost, mysqltest_u1,,) - ---echo # -- Grants for mysqltest_u1@localhost: -SHOW GRANTS; - ---echo ---echo # -- Check CREATE LOGFILE GROUP... -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 1M -UNDO_BUFFER_SIZE = 1M -ENGINE = NDB; - ---echo ---echo # -- Check ALTER LOGFILE GROUP... -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE 1M -ENGINE = NDB; - ---echo ---echo # -- Check CREATE TABLESPACE... -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 1M -ENGINE = NDB; - ---echo ---echo # -- Check ALTER TABLESPACE... -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -INITIAL_SIZE 1M -ENGINE = NDB; - ---echo ---echo # -- Connection: mysqltest_u2@localhost ---echo ---connect(con2, localhost, mysqltest_u2,,mysqltest2) - ---echo # -- Grants for mysqltest_u2@localhost: -SHOW GRANTS; - -CREATE TABLE t1(c INT) TABLESPACE ts1; - -DROP TABLE t1; - ---echo ---echo # -- Connection: mysqltest_u1@localhost ---echo ---connection con1 - ---echo ---echo # -- Check DROP TABLESPACE... -DROP TABLESPACE ts1 -ENGINE = NDB; - ---echo ---echo # -- Check DROP LOGFILE GROUP... -DROP LOGFILE GROUP lg1 -ENGINE = NDB; - ---echo ---echo # -- Connection: root@localhost ---echo ---connection default ---disconnect con1 - -DROP USER mysqltest_u1@localhost; -DROP USER mysqltest_u2@localhost; -DROP DATABASE mysqltest2; - ---echo ---echo # ----------------------------------------------------------------- ---echo # End 6.0 test ---echo # ----------------------------------------------------------------- diff --git a/mysql-test/suite/ndb/t/ndb_dd_disk2memory.test b/mysql-test/suite/ndb/t/ndb_dd_disk2memory.test deleted file mode 100644 index 5975f44e087..00000000000 --- a/mysql-test/suite/ndb/t/ndb_dd_disk2memory.test +++ /dev/null @@ -1,292 +0,0 @@ -######################################## -# Author: JBM -# Date: 2006-01-12 -# Purpose: To test using ndb memory and -# disk tables together. -######################################## - --- source include/have_ndb.inc - ---disable_warnings -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; ---enable_warnings - -############ Test Setup Section ############# --- echo **** Test Setup Section **** - -CREATE LOGFILE GROUP log_group1 -ADD UNDOFILE './log_group1/undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; - -CREATE TABLESPACE table_space1 -ADD DATAFILE './table_space1/datafile.dat' -USE LOGFILE GROUP log_group1 -INITIAL_SIZE 12M -ENGINE NDB; - - -CREATE TABLE test.t1 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE table_space1 STORAGE DISK -ENGINE=NDB; - -CREATE TABLE test.t2 -(pk2 INT NOT NULL PRIMARY KEY, b2 INT NOT NULL, c2 INT NOT NULL) -ENGINE=NDB; - ---echo -##################### Data load for first test #################### ---echo **** Data load for first test **** - -INSERT INTO test.t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10), -(11,11,11),(12,12,12),(13,13,13),(14,14,14),(15,15,15), -(16,16,16),(17,17,17),(18,18,18),(19,19,19),(20,20,20), -(21,21,21),(22,22,22),(23,23,23),(24,24,24),(25,25,25), -(26,26,26),(27,27,27),(28,28,28),(29,29,29),(30,30,30), -(31,31,31),(32,32,32),(33,33,33),(34,34,34),(35,35,35), -(36,36,36),(37,37,37),(38,38,38),(39,39,39),(40,40,40), -(41,41,41),(42,42,42),(43,43,43),(44,44,44),(45,45,45), -(46,46,46),(47,47,47),(48,48,48),(49,49,49),(50,50,50), -(51,51,51),(52,52,52),(53,53,53),(54,54,54),(55,55,55), -(56,56,56),(57,57,57),(58,58,58),(59,59,59),(60,60,60), -(61,61,61),(62,62,62),(63,63,63),(64,64,64),(65,65,65), -(66,66,66),(67,67,67),(68,68,68),(69,69,69),(70,70,70), -(71,71,71),(72,72,72),(73,73,73),(74,74,74),(75,75,75); - - -INSERT INTO test.t2 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10), -(11,11,11),(12,12,12),(13,13,13),(14,14,14),(15,15,15), -(16,16,16),(17,17,17),(18,18,18),(19,19,19),(20,20,20), -(21,21,21),(22,22,22),(23,23,23),(24,24,24),(25,25,25), -(26,26,26),(27,27,27),(28,28,28),(29,29,29),(30,30,30), -(31,31,31),(32,32,32),(33,33,33),(34,34,34),(35,35,35), -(36,36,36),(37,37,37),(38,38,38),(39,39,39),(40,40,40), -(41,41,41),(42,42,42),(43,43,43),(44,44,44),(45,45,45), -(46,46,46),(47,47,47),(48,48,48),(49,49,49),(50,50,50), -(51,51,51),(52,52,52),(53,53,53),(54,54,54),(55,55,55), -(56,56,56),(57,57,57),(58,58,58),(59,59,59),(60,60,60), -(61,61,61),(62,62,62),(63,63,63),(64,64,64),(65,65,65), -(66,66,66),(67,67,67),(68,68,68),(69,69,69),(70,70,70), -(71,71,71),(72,72,72),(73,73,73),(74,74,74),(75,75,75); - ---echo -##################### Test 1 Section Begins ############### ---echo *** Test 1 Section Begins *** -SELECT COUNT(*) FROM test.t2 LEFT JOIN test.t1 ON pk2=pk1 WHERE b2 IN (4); -SELECT * FROM test.t2 LEFT JOIN test.t1 ON pk2=pk1 WHERE b2 IN (4); -SELECT COUNT(*) FROM test.t1 LEFT JOIN test.t2 ON pk1=pk2 WHERE b IN (4); -SELECT COUNT(*) FROM test.t1 LEFT JOIN test.t2 ON b=b2 WHERE pk1 IN (75); -SELECT b, c FROM test.t1 LEFT JOIN test.t2 ON pk1=pk2 ORDER BY b; ---echo -####################### Test 1 Section End ################ - -##################### Setup for test 2 #################### ---echo *** Setup for test 2 **** -DELETE FROM test.t1; -INSERT INTO test.t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10), -(11,11,11),(12,12,12),(13,13,13),(14,14,14),(15,15,15), -(16,16,16),(17,17,17),(18,18,18),(19,19,19),(20,20,20), -(21,21,21),(22,22,22),(23,23,23),(24,24,24),(25,25,25), -(26,26,26),(27,27,27),(28,28,28),(29,29,29),(30,30,30), -(31,31,31),(32,32,32),(33,33,33),(34,34,34),(35,35,35), -(36,36,36),(37,37,37),(38,38,38),(39,39,39),(40,40,40), -(41,41,41),(42,42,42),(43,43,43),(44,44,44),(45,45,45); ---echo -############################# Test Section 2 ############### ---echo **** Test Section 2 **** -SELECT b, c FROM test.t1 LEFT JOIN test.t2 ON pk1=pk2 ORDER BY b; -SELECT COUNT(*) FROM test.t1 LEFT JOIN test.t2 ON b=b2; -SELECT COUNT(*) FROM test.t1 RIGHT JOIN test.t2 ON b=b2; -SHOW CREATE TABLE test.t2; -SHOW CREATE TABLE test.t1; -ALTER TABLE test.t2 TABLESPACE table_space1 STORAGE DISK -ENGINE=NDB; -SHOW CREATE TABLE test.t2; -ALTER TABLE test.t1 STORAGE MEMORY ENGINE=NDBCLUSTER; -SHOW CREATE TABLE test.t1; ---echo -######################### End Test Section 2 ################# -DROP TABLE test.t1; -DROP TABLE test.t2; -##################### Setup for Test Section 3 ############### ---echo *** Setup for Test Section 3 *** -CREATE TABLE test.t1 ( - usr_id INT unsigned NOT NULL, - uniq_id INT unsigned NOT NULL AUTO_INCREMENT, - start_num INT unsigned NOT NULL DEFAULT 1, - increment INT unsigned NOT NULL DEFAULT 1, - PRIMARY KEY (uniq_id), - INDEX usr_uniq_idx (usr_id, uniq_id), - INDEX uniq_usr_idx (uniq_id, usr_id)) -TABLESPACE table_space1 STORAGE DISK -ENGINE=NDB; - - -CREATE TABLE test.t2 ( - id INT unsigned NOT NULL DEFAULT 0, - usr2_id INT unsigned NOT NULL DEFAULT 0, - max INT unsigned NOT NULL DEFAULT 0, - c_amount INT unsigned NOT NULL DEFAULT 0, - d_max INT unsigned NOT NULL DEFAULT 0, - d_num INT unsigned NOT NULL DEFAULT 0, - orig_time INT unsigned NOT NULL DEFAULT 0, - c_time INT unsigned NOT NULL DEFAULT 0, - active ENUM ("no","yes") NOT NULL, - PRIMARY KEY (id,usr2_id), - INDEX id_idx (id), - INDEX usr2_idx (usr2_id)) -ENGINE=NDB; - -INSERT INTO test.t1 VALUES (3,NULL,0,50),(3,NULL,0,200),(3,NULL,0,25),(3,NULL,0,84676),(3,NULL,0,235),(3,NULL,0,10),(3,NULL,0,3098),(3,NULL,0,2947),(3,NULL,0,8987),(3,NULL,0,8347654),(3,NULL,0,20398),(3,NULL,0,8976),(3,NULL,0,500),(3,NULL,0,198); - ---echo -###################### Test Section 3 ###################### ---echo **** Test Section 3 **** -SELECT test.t1.usr_id,test.t1.uniq_id,test.t1.increment, -test.t2.usr2_id,test.t2.c_amount,test.t2.max -FROM test.t1 -LEFT JOIN test.t2 ON test.t2.id = test.t1.uniq_id -WHERE test.t1.uniq_id = 4 -ORDER BY test.t2.c_amount; - -INSERT INTO test.t2 VALUES (2,3,3000,6000,0,0,746584,837484,'yes'); -INSERT INTO test.t2 VALUES (4,3,3000,6000,0,0,746584,837484,'yes'); -INSERT INTO test.t2 VALUES (7,3,1000,2000,0,0,746294,937484,'yes'); - -SELECT test.t1.usr_id,test.t1.uniq_id,test.t1.increment, -test.t2.usr2_id,test.t2.c_amount,test.t2.max -FROM test.t1 -LEFT JOIN test.t2 ON test.t2.id = test.t1.uniq_id -WHERE test.t1.uniq_id = 4 -ORDER BY test.t2.c_amount; ---echo -####################### End Section 3 ######################### -DROP TABLE test.t1; -DROP TABLE test.t2; - -########## Test that use to be in ndb_dd_advance.test ######### -########## ndb_dd_advance.test is now ndb_dd_alter.test ####### -#### Use group by asc and dec; Use having; Use order by. #### - -CREATE TABLE test.t1 ( - a1 smallint NOT NULL, - a2 int NOT NULL, - a3 bigint NOT NULL, - a4 char(10), - a5 decimal(5,1), - a6 time, - a7 date, - a8 datetime, - a9 VARCHAR(255), - a10 blob, - PRIMARY KEY(a1) -) TABLESPACE table_space1 STORAGE DISK ENGINE=NDB; - -CREATE TABLE test.t2 ( - b1 smallint NOT NULL, - b2 int NOT NULL, - b3 bigint NOT NULL, - b4 char(10), - b5 decimal(5,1), - b6 time, - b7 date, - b8 datetime, - b9 VARCHAR(255), - b10 blob, - PRIMARY KEY(b1) -) ENGINE=NDB; - -### ADD Some DATA to tables ###### - - -let $1=20; -disable_query_log; -while ($1) -{ - eval insert into test.t1 values($1, $1+1, $1+2000000000, "aaa$1", 34.2, '4:3:2', '2006-1-1', '1971-5-28 16:55:03', "bbbbbbbbbbbbb$1", "binary data"); - eval insert into test.t2 values($1+2, $1+3, $1+3000000000, "aaa$1", 35.2, '4:3:2', '2006-1-1', '1971-5-28 16:55:03', "bbbbbbbbbbbbb$1", "binary data"); - dec $1; -} - -ALTER TABLE test.t1 ADD INDEX (a2), ADD INDEX (a3), ADD INDEX (a8); -ALTER TABLE test.t2 ADD INDEX (b2), ADD INDEX (b3), ADD INDEX (b8); -SHOW CREATE TABLE test.t1; -SHOW CREATE TABLE test.t2; -SELECT * FROM test.t1 order by a1; -SELECT * FROM test.t2 order by b1; -SELECT COUNT(a1), a1, COUNT(a1)*a1 FROM test.t1 GROUP BY a1; -SELECT COUNT(a2), (a2+1), COUNT(a2)*(a2+0) FROM test.t1 GROUP BY a2; - -DROP TABLE test.t1; -DROP TABLE test.t2; - -CREATE TABLE test.t1 (a INT NOT NULL, -b CHAR(5), c TEXT, d INT NOT NULL PRIMARY KEY) TABLESPACE -table_space1 STORAGE DISK ENGINE=NDB; - -insert into test.t1 (a,b,c,d) values (1,'a','Jonas',1),(2,'b','Tomas',2), -(3,'c','Pekka',3),(4,'d','Martin',4),(5,'e','Stewart',5),(6,'f','Jeb',6), -(7,'g','Serge',7),(8,'h','Clavin',8); -select distinct a from test.t1 group by b,a having a > 4 order by a desc; -select distinct a,c from test.t1 group by b,c,a having a > 2 order by a desc; -select distinct a from test.t1 group by b,a having a > 1 order by a asc; -select distinct a,c from test.t1 group by b,c,a having a > 3 order by a asc; -drop table test.t1; - -create table test.t1 (a char(1), key(a)) TABLESPACE table_space1 -STORAGE DISK ENGINE=NDB; -insert into test.t1 values('1'),('1'),('1'),('2'),('2'),('3'),('3'); -select * from test.t1 where a >= '1' order by a; -select distinct a from test.t1 order by a desc; -select distinct a from test.t1 where a >= '1' order by a desc; -select distinct a from test.t1 where a >= '1' order by a asc; -drop table test.t1; - -CREATE TABLE test.t1 (email varchar(50), infoID BIGINT, dateentered DATETIME) -TABLESPACE table_space1 STORAGE DISK ENGINE=NDB; -CREATE TABLE test.t2 (infoID BIGINT, shipcode varchar(10)) ENGINE=NDB; - -INSERT INTO test.t1 (email, infoID, dateentered) VALUES - ('test1@testdomain.com', 1, '2002-07-30 22:56:38'), - ('test1@testdomain.com', 1, '2002-07-27 22:58:16'), - ('test2@testdomain.com', 1, '2002-06-19 15:22:19'), - ('test2@testdomain.com', 2, '2002-06-18 14:23:47'), - ('test3@testdomain.com', 1, '2002-05-19 22:17:32'); - -INSERT INTO test.t2(infoID, shipcode) VALUES - (1, 'Z001'), - (2, 'R002'); - -SELECT DISTINCTROW email, shipcode FROM test.t1, test.t2 -WHERE t1.infoID=t2.infoID order by email, shipcode; -SELECT DISTINCTROW email FROM test.t1 ORDER BY dateentered DESC; -SELECT DISTINCTROW email, shipcode FROM test.t1, test.t2 -WHERE test.t1.infoID=test.t2.infoID ORDER BY dateentered DESC; - -DROP TABLE test.t1,test.t2; - -################# -# Test Cleanup -################# - -ALTER TABLESPACE table_space1 -DROP DATAFILE './table_space1/datafile.dat' -ENGINE = NDB; - -DROP TABLESPACE table_space1 -ENGINE = NDB; - -DROP LOGFILE GROUP log_group1 -ENGINE =NDB; - -#End 5.1 test case - diff --git a/mysql-test/suite/ndb/t/ndb_dd_dump.test b/mysql-test/suite/ndb/t/ndb_dd_dump.test deleted file mode 100644 index 7fc315ef167..00000000000 --- a/mysql-test/suite/ndb/t/ndb_dd_dump.test +++ /dev/null @@ -1,289 +0,0 @@ --- source include/have_ndb.inc - ---disable_warnings -DROP TABLE IF EXISTS t1, t2, t3; ---enable_warnings - -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile_lg1_01.dat' -INITIAL_SIZE 2M -UNDO_BUFFER_SIZE = 1M -ENGINE NDB; - -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile_lg1_02.dat' -INITIAL_SIZE = 4M -ENGINE NDB; - -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile_ts1_01.dat' -USE LOGFILE GROUP lg1 -EXTENT_SIZE 1M -INITIAL_SIZE 2M -ENGINE NDB; - -ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile_ts1_02.dat' -INITIAL_SIZE = 1M -ENGINE=NDB; - -CREATE TABLESPACE ts2 -ADD DATAFILE 'datafile_ts2_01.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 2M -ENGINE NDB; - -CREATE TABLESPACE ts3 -ADD DATAFILE 'datafile_ts3_01.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 4M -ENGINE NDB; - -######################################## -# Create a table using this tablespace -######################################## - -CREATE TABLE t1 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE ts1 STORAGE DISK -ENGINE=NDB; - -CREATE TABLE t2 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE ts2 STORAGE DISK -ENGINE=NDB; - -CREATE TABLE t3 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE ts3 STORAGE DISK -ENGINE=NDB; - -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10), -(11,11,11),(12,12,12),(13,13,13),(14,14,14),(15,15,15), -(16,16,16),(17,17,17),(18,18,18),(19,19,19),(20,20,20), -(21,21,21),(22,22,22),(23,23,23),(24,24,24),(25,25,25), -(26,26,26),(27,27,27),(28,28,28),(29,29,29),(30,30,30), -(31,31,31),(32,32,32),(33,33,33),(34,34,34),(35,35,35), -(36,36,36),(37,37,37),(38,38,38),(39,39,39),(40,40,40), -(41,41,41),(42,42,42),(43,43,43),(44,44,44),(45,45,45), -(46,46,46),(47,47,47),(48,48,48),(49,49,49),(50,50,50), -(51,51,51),(52,52,52),(53,53,53),(54,54,54),(55,55,55), -(56,56,56),(57,57,57),(58,58,58),(59,59,59),(60,60,60), -(61,61,61),(62,62,62),(63,63,63),(64,64,64),(65,65,65), -(66,66,66),(67,67,67),(68,68,68),(69,69,69),(70,70,70), -(71,71,71),(72,72,72),(73,73,73),(74,74,74),(75,75,75), -(76,76,76),(77,77,77),(78,78,78),(79,79,79),(80,80,80), -(81,81,81),(82,82,82),(83,83,83),(84,84,84),(85,85,85), -(86,86,86),(87,87,87),(88,88,88),(89,89,89),(90,90,90), -(91,91,91),(92,92,92),(93,93,93),(94,94,94),(95,95,95), -(96,96,96),(97,97,97),(98,98,98),(99,99,99),(100,100,100), -(101,101,101),(102,102,102),(103,103,103),(104,104,104),(105,105,105), -(106,106,106),(107,107,107),(108,108,108),(109,109,109),(110,110,110), -(111,111,111),(112,112,112),(113,113,113),(114,114,114),(115,115,115), -(116,116,116),(117,117,117),(118,118,118),(119,119,119),(120,120,120), -(121,121,121),(122,122,122),(123,123,123),(124,124,124),(125,125,125), -(126,126,126),(127,127,127),(128,128,128),(129,129,129),(130,130,130), -(131,131,131),(132,132,132),(133,133,133),(134,134,134),(135,135,135), -(136,136,136),(137,137,137),(138,138,138),(139,139,139),(140,140,140), -(141,141,141),(142,142,142),(143,143,143),(144,144,144),(145,145,145), -(146,146,146),(147,147,147),(148,148,148),(149,149,149),(150,150,150), -(151,151,151),(152,152,152),(153,153,153),(154,154,154),(155,155,155), -(156,156,156),(157,157,157),(158,158,158),(159,159,159),(160,160,160), -(161,161,161),(162,162,162),(163,163,163),(164,164,164),(165,165,165), -(166,166,166),(167,167,167),(168,168,168),(169,169,169),(170,170,170), -(171,171,171),(172,172,172),(173,173,173),(174,174,174),(175,175,175), -(176,176,176),(177,177,177),(178,178,178),(179,179,179),(180,180,180), -(181,181,181),(182,182,182),(183,183,183),(184,184,184),(185,185,185), -(186,186,186),(187,187,187),(188,188,188),(189,189,189),(190,190,190), -(191,191,191),(192,192,192),(193,193,193),(194,194,194),(195,195,195), -(196,196,196),(197,197,197),(198,198,198),(199,199,199),(200,200,200), -(201,201,201),(202,202,202),(203,203,203),(204,204,204),(205,205,205), -(206,206,206),(207,207,207),(208,208,208),(209,209,209),(210,210,210), -(211,211,211),(212,212,212),(213,213,213),(214,214,214),(215,215,215), -(216,216,216),(217,217,217),(218,218,218),(219,219,219),(220,220,220), -(221,221,221),(222,222,222),(223,223,223),(224,224,224),(225,225,225), -(226,226,226),(227,227,227),(228,228,228),(229,229,229),(230,230,230), -(231,231,231),(232,232,232),(233,233,233),(234,234,234),(235,235,235), -(236,236,236),(237,237,237),(238,238,238),(239,239,239),(240,240,240), -(241,241,241),(242,242,242),(243,243,243),(244,244,244),(245,245,245), -(246,246,246),(247,247,247),(248,248,248),(249,249,249),(250,250,250), -(251,251,251),(252,252,252),(253,253,253),(254,254,254),(255,255,255), -(256,256,256),(257,257,257),(258,258,258),(259,259,259),(260,260,260), -(261,261,261),(262,262,262),(263,263,263),(264,264,264),(265,265,265), -(266,266,266),(267,267,267),(268,268,268),(269,269,269),(270,270,270), -(271,271,271),(272,272,272),(273,273,273),(274,274,274),(275,275,275), -(276,276,276),(277,277,277),(278,278,278),(279,279,279),(280,280,280), -(281,281,281),(282,282,282),(283,283,283),(284,284,284),(285,285,285), -(286,286,286),(287,287,287),(288,288,288),(289,289,289),(290,290,290), -(291,291,291),(292,292,292),(293,293,293),(294,294,294),(295,295,295), -(296,296,296),(297,297,297),(298,298,298),(299,299,299),(300,300,300), -(301,301,301),(302,302,302),(303,303,303),(304,304,304),(305,305,305), -(306,306,306),(307,307,307),(308,308,308),(309,309,309),(310,310,310), -(311,311,311),(312,312,312),(313,313,313),(314,314,314),(315,315,315), -(316,316,316),(317,317,317),(318,318,318),(319,319,319),(320,320,320), -(321,321,321),(322,322,322),(323,323,323),(324,324,324),(325,325,325), -(326,326,326),(327,327,327),(328,328,328),(329,329,329),(330,330,330), -(331,331,331),(332,332,332),(333,333,333),(334,334,334),(335,335,335), -(336,336,336),(337,337,337),(338,338,338),(339,339,339),(340,340,340), -(341,341,341),(342,342,342),(343,343,343),(344,344,344),(345,345,345), -(346,346,346),(347,347,347),(348,348,348),(349,349,349),(350,350,350), -(351,351,351),(352,352,352),(353,353,353),(354,354,354),(355,355,355), -(356,356,356),(357,357,357),(358,358,358),(359,359,359),(360,360,360), -(361,361,361),(362,362,362),(363,363,363),(364,364,364),(365,365,365), -(366,366,366),(367,367,367),(368,368,368),(369,369,369),(370,370,370), -(371,371,371),(372,372,372),(373,373,373),(374,374,374),(375,375,375), -(376,376,376),(377,377,377),(378,378,378),(379,379,379),(380,380,380), -(381,381,381),(382,382,382),(383,383,383),(384,384,384),(385,385,385), -(386,386,386),(387,387,387),(388,388,388),(389,389,389),(390,390,390), -(391,391,391),(392,392,392),(393,393,393),(394,394,394),(395,395,395), -(396,396,396),(397,397,397),(398,398,398),(399,399,399),(400,400,400), -(401,401,401),(402,402,402),(403,403,403),(404,404,404),(405,405,405), -(406,406,406),(407,407,407),(408,408,408),(409,409,409),(410,410,410), -(411,411,411),(412,412,412),(413,413,413),(414,414,414),(415,415,415), -(416,416,416),(417,417,417),(418,418,418),(419,419,419),(420,420,420), -(421,421,421),(422,422,422),(423,423,423),(424,424,424),(425,425,425), -(426,426,426),(427,427,427),(428,428,428),(429,429,429),(430,430,430), -(431,431,431),(432,432,432),(433,433,433),(434,434,434),(435,435,435), -(436,436,436),(437,437,437),(438,438,438),(439,439,439),(440,440,440), -(441,441,441),(442,442,442),(443,443,443),(444,444,444),(445,445,445), -(446,446,446),(447,447,447),(448,448,448),(449,449,449),(450,450,450), -(451,451,451),(452,452,452),(453,453,453),(454,454,454),(455,455,455), -(456,456,456),(457,457,457),(458,458,458),(459,459,459),(460,460,460), -(461,461,461),(462,462,462),(463,463,463),(464,464,464),(465,465,465), -(466,466,466),(467,467,467),(468,468,468),(469,469,469),(470,470,470), -(471,471,471),(472,472,472),(473,473,473),(474,474,474),(475,475,475), -(476,476,476),(477,477,477),(478,478,478),(479,479,479),(480,480,480), -(481,481,481),(482,482,482),(483,483,483),(484,484,484),(485,485,485), -(486,486,486),(487,487,487),(488,488,488),(489,489,489),(490,490,490), -(491,491,491),(492,492,492),(493,493,493),(494,494,494),(495,495,495), -(496,496,496),(497,497,497),(498,498,498),(499,499,499),(500, 500, 500); - -INSERT INTO t2 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5); - -INSERT INTO t3 VALUES -(1,1,1); - ---exec $MYSQL_DUMP --skip-comments --compact -Y test > $MYSQLTEST_VARDIR/tmp/ndb_dd_dump.sql - -DROP TABLE t1; -DROP TABLE t2; -DROP TABLE t3; - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile_ts1_01.dat' -ENGINE = NDB; - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile_ts1_02.dat' -ENGINE = NDB; - -ALTER TABLESPACE ts2 -DROP DATAFILE 'datafile_ts2_01.dat' -ENGINE = NDB; - -ALTER TABLESPACE ts3 -DROP DATAFILE 'datafile_ts3_01.dat' -ENGINE = NDB; - -DROP TABLESPACE ts1 ENGINE = NDB; -DROP TABLESPACE ts2 ENGINE = NDB; -DROP TABLESPACE ts3 ENGINE = NDB; - -DROP LOGFILE GROUP lg1 ENGINE = NDB; - ---exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/ndb_dd_dump.sql - -SELECT DISTINCT - LOGFILE_GROUP_NAME, - FILE_NAME, - TOTAL_EXTENTS, - INITIAL_SIZE, - ENGINE -FROM INFORMATION_SCHEMA.FILES WHERE FILE_TYPE="UNDO LOG" ORDER BY FILE_NAME; - -SELECT DISTINCT - TABLESPACE_NAME, - LOGFILE_GROUP_NAME, - FILE_NAME, - EXTENT_SIZE, - INITIAL_SIZE, - ENGINE -FROM INFORMATION_SCHEMA.FILES WHERE FILE_TYPE="DATAFILE" ORDER BY FILE_NAME; - -SELECT COUNT(*) FROM t1; -SELECT COUNT(*) FROM t2; -SELECT COUNT(*) FROM t3; - -DROP TABLE t1; -DROP TABLE t2; -DROP TABLE t3; - -#### BUG 18856 test case comented out -##### Use "SELECT * INTO OUTFILE" to dump data and "LOAD DATA INFILE" to load ##### data back to the data file. - -CREATE TABLE test.t ( - a smallint NOT NULL, - b int NOT NULL, - c bigint NOT NULL, - d char(10), - e TEXT, - f VARCHAR(255), - PRIMARY KEY(a) -) TABLESPACE ts1 STORAGE DISK ENGINE=NDB; - - ALTER TABLE test.t ADD INDEX (d), ADD INDEX (f); - SHOW CREATE TABLE test.t; - -# insert records into tables - - let $1=100; - disable_query_log; - while ($1) - { - eval insert into test.t values($1, $1+1, $1+2, "aaa$1", "bbb$1", "ccccc$1"); - dec $1; - } - enable_query_log; - - SELECT * FROM test.t order by a; - - SELECT * INTO OUTFILE 't_backup' FROM test.t; - TRUNCATE test.t; - -#'TRUNCATE test.t' failed: 1205: Lock wait timeout exceeded; try restarting -#transaction. TABLESPACE ts STORAGE DISK ENGINE=NDB; - - SELECT count(*) FROM test.t; - LOAD DATA INFILE 't_backup' INTO TABLE test.t; - - SELECT * FROM test.t order by a; - - DROP TABLE test.t; - - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile_ts1_01.dat' -ENGINE = NDB; - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile_ts1_02.dat' -ENGINE = NDB; - -ALTER TABLESPACE ts2 -DROP DATAFILE 'datafile_ts2_01.dat' -ENGINE = NDB; - -ALTER TABLESPACE ts3 -DROP DATAFILE 'datafile_ts3_01.dat' -ENGINE = NDB; - -DROP TABLESPACE ts1 ENGINE = NDB; -DROP TABLESPACE ts2 ENGINE = NDB; -DROP TABLESPACE ts3 ENGINE = NDB; - -DROP LOGFILE GROUP lg1 ENGINE = NDB; - -#End 5.1 test case diff --git a/mysql-test/suite/ndb/t/ndb_dd_sql_features.test b/mysql-test/suite/ndb/t/ndb_dd_sql_features.test deleted file mode 100644 index f46cb217ab4..00000000000 --- a/mysql-test/suite/ndb/t/ndb_dd_sql_features.test +++ /dev/null @@ -1,551 +0,0 @@ -############################################################## -# Author: Nikolay -# Date: 2006-04-01 -# Purpose: Specific Blob and Varchar testing using disk tables. -############################################################## -# Create Stored procedures that use disk based tables. -# Create function that operate on disk based tables. -# Create triggers that operate on disk based tables. -# Create views that operate on disk based tables. -# Try to create FK constraints on disk based tables. -# Create and use disk based table that use auto inc. -# Create test that use transaction (commit, rollback) -# Create large disk base table, do random queries, check cache hits, -# do same query 10 times check cache hits. -# Create test that uses COUNT(), SUM(), MAX(), MIN(), -# NOW(), USER(), ... other built in # SQL functions -# Create test that uses locks. -# Create test using truncate. -############################################################## -# Author: Jonathan -# Date: 2006-08-28 -# Change: Remove all the create and drop LFG and TS except -# The first create and the last drop to make test -# run faster. -# In addition, renamed test to be to a name that -# gives a better idea of what the test is about -########################################################### --- source include/have_ndb.inc - ---disable_warnings -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -DROP TABLE IF EXISTS test.t3; ---enable_warnings - -#### Copy data from table in one table space to table in ### -#### different table space. #### ---echo ***** ---echo **** Copy data from table in one table space to table ---echo **** in different table space ---echo ***** - - CREATE LOGFILE GROUP lg - ADD UNDOFILE './lg_group/undofile.dat' - INITIAL_SIZE 16M - UNDO_BUFFER_SIZE = 1M - ENGINE=NDB; - - CREATE TABLESPACE ts1 - ADD DATAFILE './table_space1/datafile.dat' - USE LOGFILE GROUP lg - INITIAL_SIZE 25M - ENGINE NDB; - - CREATE TABLESPACE ts2 - ADD DATAFILE './table_space2/datafile.dat' - USE LOGFILE GROUP lg - INITIAL_SIZE 20M - ENGINE NDB; - - CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), a3 BLOB) - TABLESPACE ts1 STORAGE DISK ENGINE=NDB; - CREATE TABLE test.t2 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), a3 BLOB) - TABLESPACE ts2 STORAGE DISK ENGINE=NDB; - - SHOW CREATE TABLE test.t1; - SHOW CREATE TABLE test.t2; - - INSERT INTO test.t1 VALUES (1,'111111','aaaaaaaa'); - INSERT INTO test.t1 VALUES (2,'222222','bbbbbbbb'); - SELECT * FROM test.t1 ORDER BY a1; - INSERT INTO test.t2(a1,a2,a3) SELECT * FROM test.t1; - SELECT * FROM test.t2 ORDER BY a1; - - DROP TABLE test.t1, test.t2; - - # populate BLOB field with large data - -set @vc1 = repeat('a', 200); -set @vc2 = repeat('b', 500); -set @vc3 = repeat('c', 1000); -set @vc4 = repeat('d', 4000); - -# x0 size 256 -set @x0 = '01234567012345670123456701234567'; -set @x0 = concat(@x0,@x0,@x0,@x0,@x0,@x0,@x0,@x0); - -# b1 length 2000+256 -set @b1 = 'b1'; -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@x0); -# d1 length 3000 -set @d1 = 'dd1'; -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); - -# b2 length 20000 -set @b2 = 'b2'; -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -# d2 length 30000 -set @d2 = 'dd2'; -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); - -select length(@x0),length(@b1),length(@d1) from dual; -select length(@x0),length(@b2),length(@d2) from dual; - - CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(5000), a3 BLOB) - TABLESPACE ts1 STORAGE DISK ENGINE=NDB; - CREATE TABLE test.t2 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(5000), a3 BLOB) - TABLESPACE ts2 STORAGE DISK ENGINE=NDB; - - SHOW CREATE TABLE test.t1; - SHOW CREATE TABLE test.t2; - - INSERT INTO test.t1 VALUES (1,@vc1,@d1); - INSERT INTO test.t1 VALUES (2,@vc2,@b1); - INSERT INTO test.t1 VALUES (3,@vc3,@d2); - INSERT INTO test.t1 VALUES (4,@vc4,@b2); - - SELECT a1,length(a2),substr(a2,180,2),length(a3),substr(a3,1+3*900,3) - FROM test.t1 WHERE a1=1; - SELECT a1,length(a2),substr(a2,480,2),length(a3),substr(a3,1+2*900,3) - FROM test.t1 where a1=2; - - INSERT INTO test.t2(a1,a2,a3) SELECT * FROM test.t1; - SELECT a1,length(a2),substr(a2,180,2),length(a3),substr(a3,1+3*900,3) - FROM test.t2 WHERE a1=1; - SELECT a1,length(a2),substr(a2,480,2),length(a3),substr(a3,1+2*900,3) - FROM test.t2 where a1=2; - - - DROP TABLE test.t1, test.t2; - -#### Insert, Update, Delete from NDB table with BLOB fields #### ---echo ***** ---echo **** Insert, Update, Delete from NDB table with BLOB fields ---echo ***** - -set @vc1 = repeat('a', 200); -set @vc2 = repeat('b', 500); -set @vc3 = repeat('c', 1000); -set @vc4 = repeat('d', 4000); -set @vc5 = repeat('d', 5000); - -set @bb1 = repeat('1', 2000); -set @bb2 = repeat('2', 5000); -set @bb3 = repeat('3', 10000); -set @bb4 = repeat('4', 40000); -set @bb5 = repeat('5', 50000); - -select length(@vc1),length(@vc2),length(@vc3),length(@vc4),length(@vc5) -from dual; -select length(@bb1),length(@bb2),length(@bb3),length(@bb4),length(@bb5) -from dual; - - CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(5000), a3 BLOB) - TABLESPACE ts1 STORAGE DISK ENGINE=NDB; -# CREATE TABLE test.t2 (a1 int NOT NULL, a2 VARCHAR(5000), a3 BLOB) -# TABLESPACE ts2 STORAGE DISK ENGINE=NDB; - - INSERT INTO test.t1 VALUES (1,@vc1,@bb1); - INSERT INTO test.t1 VALUES (2,@vc2,@bb2); - INSERT INTO test.t1 VALUES (3,@vc3,@bb3); - INSERT INTO test.t1 VALUES (4,@vc4,@bb4); - INSERT INTO test.t1 VALUES (5,@vc5,@bb5); - - UPDATE test.t1 SET a2=@vc5, a3=@bb5 WHERE a1=1; - SELECT a1,length(a2),substr(a2,4998,2),length(a3),substr(a3,49997,3) - FROM test.t1 WHERE a1=1; - - UPDATE test.t1 SET a2=@vc4, a3=@bb4 WHERE a1=2; - SELECT a1,length(a2),substr(a2,3998,2),length(a3),substr(a3,39997,3) - FROM test.t1 WHERE a1=2; - - UPDATE test.t1 SET a2=@vc2, a3=@bb2 WHERE a1=3; - SELECT a1,length(a2),substr(a2,498,2),length(a3),substr(a3,3997,3) - FROM test.t1 WHERE a1=3; - - UPDATE test.t1 SET a2=@vc3, a3=@bb3 WHERE a1=4; - SELECT a1,length(a2),substr(a2,998,2),length(a3),substr(a3,9997,3) - FROM test.t1 WHERE a1=4; - - UPDATE test.t1 SET a2=@vc1, a3=@bb1 WHERE a1=5; - SELECT a1,length(a2),substr(a2,198,2),length(a3),substr(a3,1997,3) - FROM test.t1 WHERE a1=5; - - DELETE FROM test.t1 where a1=5; - SELECT count(*) from test.t1; - DELETE FROM test.t1 where a1=4; - SELECT count(*) from test.t1; - DELETE FROM test.t1 where a1=3; - SELECT count(*) from test.t1; - DELETE FROM test.t1 where a1=2; - SELECT count(*) from test.t1; - DELETE FROM test.t1 where a1=1; - SELECT count(*) from test.t1; - - DROP TABLE test.t1; - -##### Create Stored procedures that use disk based tables ##### ---echo ***** ---echo **** Create Stored procedures that use disk based tables ---echo ***** - -delimiter //; - CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), a3 BLOB) - TABLESPACE ts1 STORAGE DISK ENGINE=NDB// - CREATE PROCEDURE test.sp1() - BEGIN - INSERT INTO test.t1 values (1,'111111','aaaaaaaa'); - END// -delimiter ;// - - CALL test.sp1(); - SELECT * FROM test.t1; - -delimiter //; - CREATE PROCEDURE test.sp2(n INT, vc VARCHAR(256), blb BLOB) - BEGIN - UPDATE test.t1 SET a2=vc, a3=blb where a1=n; - END// -delimiter ;// - - CALL test.sp2(1,'222222','bbbbbbbb'); - SELECT * FROM test.t1; - - DELETE FROM test.t1; - DROP PROCEDURE test.sp1; - DROP PROCEDURE test.sp2; - DROP TABLE test.t1; - - -#### Create function that operate on disk based tables #### ---echo ***** ---echo ***** Create function that operate on disk based tables ---echo ***** - - CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), a3 BLOB) - TABLESPACE ts1 STORAGE DISK ENGINE=NDB; - let $1=100; - disable_query_log; - while ($1) - { - eval insert into test.t1 values($1, "aaaaa$1", "bbbbb$1"); - dec $1; - } - enable_query_log; - - delimiter //; - CREATE FUNCTION test.fn1(n INT) RETURNS INT - BEGIN - DECLARE v INT; - SELECT a1 INTO v FROM test.t1 WHERE a1=n; - RETURN v; - END// - delimiter ;// - -delimiter //; - CREATE FUNCTION test.fn2(n INT, blb BLOB) RETURNS BLOB - BEGIN - DECLARE vv BLOB; - UPDATE test.t1 SET a3=blb where a1=n; - SELECT a3 INTO vv FROM test.t1 WHERE a1=n; - RETURN vv; - END// - delimiter ;// - - SELECT test.fn1(10) FROM DUAL; - SELECT test.fn2(50, 'new BLOB content') FROM DUAL; - - DELETE FROM test.t1; - DROP FUNCTION test.fn1; - DROP FUNCTION test.fn2; - DROP TABLE test.t1; - -#### Create triggers that operate on disk based tables #### ---echo ***** ---echo ***** Create triggers that operate on disk based tables ---echo ***** - - CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), a3 BLOB) - TABLESPACE ts1 STORAGE DISK ENGINE=NDB; - - delimiter //; - CREATE TRIGGER test.trg1 BEFORE INSERT ON test.t1 FOR EACH ROW - BEGIN - if isnull(new.a2) then - set new.a2:= 'trg1 works on a2 field'; - end if; - if isnull(new.a3) then - set new.a3:= 'trg1 works on a3 field'; - end if; - end// - insert into test.t1 (a1) values (1)// - insert into test.t1 (a1,a2) values (2, 'ccccccc')// - select * from test.t1 order by a1// - delimiter ;// - - DELETE FROM test.t1; - DROP TRIGGER test.trg1; - DROP TABLE test.t1; - -#### Create, update views that operate on disk based tables #### ---echo ***** ---echo ***** Create, update views that operate on disk based tables ---echo ***** - - - CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), a3 BLOB) - TABLESPACE ts1 STORAGE DISK ENGINE=NDB; - let $1=10; - disable_query_log; - while ($1) - { - eval insert into test.t1 values($1, "aaaaa$1", "bbbbb$1"); - dec $1; - } - enable_query_log; - CREATE VIEW test.v1 AS SELECT * FROM test.t1; - SELECT * FROM test.v1 order by a1; - CHECK TABLE test.v1, test.t1; - - UPDATE test.v1 SET a2='zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz' WHERE a1=5; - SELECT * FROM test.v1 order by a1; - - DROP VIEW test.v1; - DELETE FROM test.t1; - DROP TABLE test.t1; - -#### Create and use disk based table that use auto inc #### ---echo ***** ---echo ***** Create and use disk based table that use auto inc ---echo ***** - - CREATE TABLE test.t1 (a1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, - a2 VARCHAR(256), a3 BLOB) - TABLESPACE ts1 STORAGE DISK ENGINE=NDB; - let $1=10; - disable_query_log; - while ($1) - { - eval insert into test.t1 values(NULL, "aaaaa$1", "bbbbb$1"); - dec $1; - } - enable_query_log; - SELECT * FROM test.t1 ORDER BY a1; - DELETE FROM test.t1; - DROP TABLE test.t1; - - -#### Create test that use transaction (commit, rollback) #### ---echo ***** ---echo ***** Create test that use transaction (commit, rollback) ---echo ***** - - SET AUTOCOMMIT=0; - CREATE TABLE test.t1 (a1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, - a2 VARCHAR(256), a3 BLOB) - TABLESPACE ts1 STORAGE DISK ENGINE=NDB; - - INSERT INTO test.t1 VALUES(NULL, "aaaaa1", "bbbbb1"); - COMMIT; - SELECT * FROM test.t1 ORDER BY a1; - INSERT INTO test.t1 VALUES(NULL, "aaaaa2", "bbbbb2"); - ROLLBACK; - SELECT * FROM test.t1 ORDER BY a1; - - DELETE FROM test.t1; - DROP TABLE test.t1; - SET AUTOCOMMIT=1; - -# Now do the same thing with START TRANSACTION without using AUTOCOMMIT. - - CREATE TABLE test.t1 (a1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, - a2 VARCHAR(256), a3 BLOB) - TABLESPACE ts1 STORAGE DISK ENGINE=NDB; - - START TRANSACTION; - INSERT INTO test.t1 VALUES(NULL, "aaaaa1", "bbbbb1"); - COMMIT; - SELECT * FROM test.t1 ORDER BY a1; - - START TRANSACTION; - INSERT INTO test.t1 VALUES(NULL, "aaaaa2", "bbbbb2"); - ROLLBACK; - SELECT * FROM test.t1 ORDER BY a1; - - DELETE FROM test.t1; - DROP TABLE test.t1; - -#### Create test that uses locks #### ---echo ***** ---echo ***** Create test that uses locks ---echo ***** - - connect (con1,localhost,root,,); - connect (con2,localhost,root,,); - -# connection con1; ---disable_warnings - drop table if exists test.t1; - CREATE TABLE test.t1 (a1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, - a2 VARCHAR(256), a3 BLOB) - TABLESPACE ts1 STORAGE DISK ENGINE=NDB; ---enable_warnings - - LOCK TABLES test.t1 write; - INSERT INTO test.t1 VALUES(NULL, "aaaaa1", "bbbbb1"); - INSERT INTO test.t1 VALUES(NULL, "aaaaa2", "bbbbb2"); - SELECT * FROM test.t1 ORDER BY a1; - - connection con2; - SELECT * FROM test.t1 ORDER BY a1; - INSERT INTO test.t1 VALUES(NULL, "aaaaa3", "bbbbb3"); - - connection con1; - UNLOCK TABLES; - - connection con2; - INSERT INTO test.t1 VALUES(NULL, "aaaaa3", "bbbbb3"); - SELECT * FROM test.t1 ORDER BY a1; - DELETE FROM test.t1; - DROP TABLE test.t1; - - #connection defualt; - -#### Create large disk base table, do random queries, check cache hits #### ---echo ***** ---echo ***** Create large disk base table, do random queries, check cache hits ---echo ***** - -set @vc1 = repeat('a', 200); -SELECT @vc1 FROM DUAL; -set @vc2 = repeat('b', 500); -set @vc3 = repeat('b', 998); - -# x0 size 256 -set @x0 = '01234567012345670123456701234567'; -set @x0 = concat(@x0,@x0,@x0,@x0,@x0,@x0,@x0,@x0); - -# b1 length 2000+256 (blob part aligned) -set @b1 = 'b1'; -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@x0); -# d1 length 3000 -set @d1 = 'dd1'; -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); - -# b2 length 20000 -set @b2 = 'b2'; -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -# d2 length 30000 -set @d2 = 'dd2'; -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); - -select length(@x0),length(@b1),length(@d1) from dual; -select length(@x0),length(@b2),length(@d2) from dual; - - CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(1000), a3 BLOB) - TABLESPACE ts1 STORAGE DISK ENGINE=NDB; - - INSERT INTO test.t1 values(1,@vc1,@d1); - INSERT INTO test.t1 values(2,@vc2,@d2); - --replace_column 9 # - explain SELECT * from test.t1 WHERE a1 = 1; - - SELECT a1,length(a2),substr(a2,1+2*900,2),length(a3),substr(a3,1+3*900,3) - FROM test.t1 WHERE a1=1 ORDER BY a1; - SELECT a1,length(a2),substr(a2,1+2*9000,2),length(a3),substr(a3,1+3*9000,3) - FROM test.t1 where a1=2 ORDER BY a1; - - UPDATE test.t1 set a2=@vc2,a3=@d2 where a1=1; - UPDATE test.t1 set a2=@vc1,a3=@d1 where a1=2; - - SELECT a1,length(a2),substr(a2,1+2*9000,2),length(a3),substr(a3,1+3*9000,3) - FROM test.t1 where a1=1; - SELECT a1,length(a2),substr(a2,1+2*900,2),length(a3),substr(a3,1+3*900,3) - FROM test.t1 where a1=2; - - #SHOW VARIABLES LIKE 'have_query_cache'; - #SHOW STATUS LIKE 'Qcache%'; - - DELETE FROM test.t1; - DROP TABLE test.t1; - -#### Create test that uses COUNT(), SUM(), MAX(), #### -##### MIN(), NOW(), USER(), TRUNCATE #### ---echo ***** ---echo ***** Create test that uses COUNT(), SUM(), MAX(), MIN(), NOW(), ---echo ***** USER(), TRUNCATE ---echo ***** - - CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), - a3 BLOB, a4 DATE, a5 CHAR(250)) - TABLESPACE ts1 STORAGE DISK ENGINE=NDB; - let $1=100; - disable_query_log; - while ($1) - { - eval insert into test.t1 values($1, "aaaaaaaaaaaaaaaa$1", - "bbbbbbbbbbbbbbbbbb$1", '2006-06-20' , USER()); - dec $1; - } - enable_query_log; - - SELECT COUNT(*) from test.t1; - SELECT SUM(a1) from test.t1; - SELECT MIN(a1) from test.t1; - SELECT MAX(a1) from test.t1; - SELECT a5 from test.t1 where a1=50; - - - SELECT * from test.t1 order by a1; - - DROP TABLE test.t1; - - ALTER TABLESPACE ts1 - DROP DATAFILE './table_space1/datafile.dat' - ENGINE=NDB; - DROP TABLESPACE ts1 ENGINE=NDB; - - ALTER TABLESPACE ts2 - DROP DATAFILE './table_space2/datafile.dat' - ENGINE=NDB; - DROP TABLESPACE ts2 ENGINE=NDB; - - DROP LOGFILE GROUP lg - ENGINE=NDB; - - -#End 5.1 test case - diff --git a/mysql-test/suite/ndb/t/ndb_gis.test b/mysql-test/suite/ndb/t/ndb_gis.test deleted file mode 100644 index babff535f94..00000000000 --- a/mysql-test/suite/ndb/t/ndb_gis.test +++ /dev/null @@ -1,5 +0,0 @@ ---source include/have_ndb.inc -SET storage_engine=ndbcluster; ---source include/gis_generic.inc -set optimizer_switch = "engine_condition_pushdown=on"; ---source include/gis_generic.inc diff --git a/mysql-test/suite/ndb/t/ndb_grant.later b/mysql-test/suite/ndb/t/ndb_grant.later deleted file mode 100644 index 5431d94e1f8..00000000000 --- a/mysql-test/suite/ndb/t/ndb_grant.later +++ /dev/null @@ -1,385 +0,0 @@ --- source include/have_ndb.inc -# Test of GRANT commands - -# Cleanup ---disable_warnings -drop table if exists t1; ---enable_warnings - -SET NAMES binary; - -# -# Alter mysql system tables to ndb -# make sure you alter all back in the end -# -use mysql; -alter table columns_priv engine=ndb; -alter table db engine=ndb; -alter table func engine=ndb; -alter table help_category engine=ndb; -alter table help_keyword engine=ndb; -alter table help_relation engine=ndb; -alter table help_topic engine=ndb; -alter table host engine=ndb; -alter table tables_priv engine=ndb; -alter table time_zone engine=ndb; -alter table time_zone_leap_second engine=ndb; -alter table time_zone_name engine=ndb; -alter table time_zone_transition engine=ndb; -alter table time_zone_transition_type engine=ndb; -alter table user engine=ndb; -use test; - -# -# Test that SSL options works properly -# -delete from mysql.user where user='mysqltest_1'; -delete from mysql.db where user='mysqltest_1'; -flush privileges; -begin; -grant select on mysqltest.* to mysqltest_1@localhost require cipher "EDH-RSA-DES-CBC3-SHA"; -commit; -show grants for mysqltest_1@localhost; -begin; -grant delete on mysqltest.* to mysqltest_1@localhost; -commit; -select * from mysql.user where user="mysqltest_1"; -show grants for mysqltest_1@localhost; -begin; -revoke delete on mysqltest.* from mysqltest_1@localhost; -commit; -show grants for mysqltest_1@localhost; -begin; -grant select on mysqltest.* to mysqltest_1@localhost require NONE; -commit; -show grants for mysqltest_1@localhost; -begin; -grant USAGE on mysqltest.* to mysqltest_1@localhost require cipher "EDH-RSA-DES-CBC3-SHA" AND SUBJECT "testsubject" ISSUER "MySQL AB"; -commit; -show grants for mysqltest_1@localhost; -begin; -revoke all privileges on mysqltest.* from mysqltest_1@localhost; -commit; -show grants for mysqltest_1@localhost; -delete from mysql.user where user='mysqltest_1'; -flush privileges; - -# -# Test that the new db privileges are stored/retrieved correctly -# - -begin; -grant CREATE TEMPORARY TABLES, LOCK TABLES on mysqltest.* to mysqltest_1@localhost; -commit; -show grants for mysqltest_1@localhost; -flush privileges; -show grants for mysqltest_1@localhost; -begin; -revoke CREATE TEMPORARY TABLES on mysqltest.* from mysqltest_1@localhost; -commit; -show grants for mysqltest_1@localhost; -begin; -grant ALL PRIVILEGES on mysqltest.* to mysqltest_1@localhost with GRANT OPTION; -commit; -flush privileges; -show grants for mysqltest_1@localhost; -begin; -revoke LOCK TABLES, ALTER on mysqltest.* from mysqltest_1@localhost; -commit; -show grants for mysqltest_1@localhost; -begin; -revoke all privileges on mysqltest.* from mysqltest_1@localhost; -commit; -delete from mysql.user where user='mysqltest_1'; -flush privileges; -begin; -grant usage on test.* to mysqltest_1@localhost with grant option; -commit; -show grants for mysqltest_1@localhost; -delete from mysql.user where user='mysqltest_1'; -delete from mysql.db where user='mysqltest_1'; -delete from mysql.tables_priv where user='mysqltest_1'; -delete from mysql.columns_priv where user='mysqltest_1'; -flush privileges; ---error 1141 -show grants for mysqltest_1@localhost; - -# -# Test what happens when you have same table and colum level grants -# - -create table t1 (a int); -begin; -GRANT select,update,insert on t1 to mysqltest_1@localhost; -GRANT select (a), update (a),insert(a), references(a) on t1 to mysqltest_1@localhost; -commit; -show grants for mysqltest_1@localhost; -select table_priv,column_priv from mysql.tables_priv where user="mysqltest_1"; -begin; -REVOKE select (a), update on t1 from mysqltest_1@localhost; -commit; -show grants for mysqltest_1@localhost; -begin; -REVOKE select,update,insert,insert (a) on t1 from mysqltest_1@localhost; -commit; -show grants for mysqltest_1@localhost; -begin; -GRANT select,references on t1 to mysqltest_1@localhost; -commit; -select table_priv,column_priv from mysql.tables_priv where user="mysqltest_1"; -begin; -grant all on test.* to mysqltest_3@localhost with grant option; -revoke all on test.* from mysqltest_3@localhost; -commit; -show grants for mysqltest_3@localhost; -begin; -revoke grant option on test.* from mysqltest_3@localhost; -commit; -show grants for mysqltest_3@localhost; -begin; -grant all on test.t1 to mysqltest_2@localhost with grant option; -revoke all on test.t1 from mysqltest_2@localhost; -commit; -show grants for mysqltest_2@localhost; -begin; -revoke grant option on test.t1 from mysqltest_2@localhost; -commit; -show grants for mysqltest_2@localhost; -delete from mysql.user where user='mysqltest_1' or user="mysqltest_2" or user="mysqltest_3"; -delete from mysql.db where user='mysqltest_1' or user="mysqltest_2" or user="mysqltest_3"; -delete from mysql.tables_priv where user='mysqltest_1' or user="mysqltest_2" or user="mysqltest_3"; -delete from mysql.columns_priv where user='mysqltest_1' or user="mysqltest_2" or user="mysqltest_3"; -flush privileges; -drop table t1; - -# -# Test some error conditions -# -begin; ---error 1221 -GRANT FILE on mysqltest.* to mysqltest_1@localhost; -commit; -select 1; -- To test that the previous command didn't cause problems - -# -# Bug#6123: GRANT USAGE inserts useless Db row -# -create database mysqltest1; -begin; -grant usage on mysqltest1.* to test6123 identified by 'magic123'; -commit; -select host,db,user,select_priv,insert_priv from mysql.db where db="mysqltest1"; -delete from mysql.user where user='test6123'; -drop database mysqltest1; - -# -# Test for 'drop user', 'revoke privileges, grant' -# - -create table t1 (a int); -begin; -grant ALL PRIVILEGES on *.* to drop_user2@localhost with GRANT OPTION; -commit; -show grants for drop_user2@localhost; -begin; -revoke all privileges, grant option from drop_user2@localhost; -commit; -drop user drop_user2@localhost; - -begin; -grant ALL PRIVILEGES on *.* to drop_user@localhost with GRANT OPTION; -grant ALL PRIVILEGES on test.* to drop_user@localhost with GRANT OPTION; -grant select(a) on test.t1 to drop_user@localhost; -commit; -show grants for drop_user@localhost; - -# -# Bug3086 -# -set sql_mode=ansi_quotes; -show grants for drop_user@localhost; -set sql_mode=default; - -set sql_quote_show_create=0; -show grants for drop_user@localhost; -set sql_mode="ansi_quotes"; -show grants for drop_user@localhost; -set sql_quote_show_create=1; -show grants for drop_user@localhost; -set sql_mode=""; -show grants for drop_user@localhost; - -revoke all privileges, grant option from drop_user@localhost; -show grants for drop_user@localhost; -drop user drop_user@localhost; -begin; ---error 1269 -revoke all privileges, grant option from drop_user@localhost; -commit; - -begin; -grant select(a) on test.t1 to drop_user1@localhost; -commit; -flush privileges; -begin; -grant select on test.t1 to drop_user2@localhost; -grant select on test.* to drop_user3@localhost; -grant select on *.* to drop_user4@localhost; -commit; -flush privileges; -# Drop user now implicitly revokes all privileges. -drop user drop_user1@localhost, drop_user2@localhost, drop_user3@localhost, -drop_user4@localhost; -begin; ---error 1269 -revoke all privileges, grant option from drop_user1@localhost, drop_user2@localhost, -drop_user3@localhost, drop_user4@localhost; -commit; -flush privileges; -#--error 1268 -drop user drop_user1@localhost, drop_user2@localhost, drop_user3@localhost, -drop_user4@localhost; -drop table t1; -begin; -grant usage on *.* to mysqltest_1@localhost identified by "password"; -grant select, update, insert on test.* to mysqltest_1@localhost; -commit; -show grants for mysqltest_1@localhost; -drop user mysqltest_1@localhost; - -# -# Bug #3403 Wrong encodin in SHOW GRANTS output -# -SET NAMES koi8r; -CREATE DATABASE ÂÄ; -USE ÂÄ; -CREATE TABLE ÔÁ (ËÏÌ int); - -begin; -GRANT SELECT ON ÂÄ.* TO ÀÚÅÒ@localhost; -commit; -SHOW GRANTS FOR ÀÚÅÒ@localhost; -begin; -REVOKE SELECT ON ÂÄ.* FROM ÀÚÅÒ@localhost; -commit; - -begin; -GRANT SELECT ON ÂÄ.ÔÁ TO ÀÚÅÒ@localhost; -commit; -SHOW GRANTS FOR ÀÚÅÒ@localhost; -begin; -REVOKE SELECT ON ÂÄ.ÔÁ FROM ÀÚÅÒ@localhost; -commit; - -begin; -GRANT SELECT (ËÏÌ) ON ÂÄ.ÔÁ TO ÀÚÅÒ@localhost; -commit; -SHOW GRANTS FOR ÀÚÅÒ@localhost; -begin; -REVOKE SELECT (ËÏÌ) ON ÂÄ.ÔÁ FROM ÀÚÅÒ@localhost; -commit; - -DROP DATABASE ÂÄ; -SET NAMES latin1; - -# -# Bug #5831: REVOKE ALL PRIVILEGES, GRANT OPTION does not revoke everything -# -USE test; -CREATE TABLE t1 (a int ); -CREATE TABLE t2 LIKE t1; -CREATE TABLE t3 LIKE t1; -CREATE TABLE t4 LIKE t1; -CREATE TABLE t5 LIKE t1; -CREATE TABLE t6 LIKE t1; -CREATE TABLE t7 LIKE t1; -CREATE TABLE t8 LIKE t1; -CREATE TABLE t9 LIKE t1; -CREATE TABLE t10 LIKE t1; -CREATE DATABASE testdb1; -CREATE DATABASE testdb2; -CREATE DATABASE testdb3; -CREATE DATABASE testdb4; -CREATE DATABASE testdb5; -CREATE DATABASE testdb6; -CREATE DATABASE testdb7; -CREATE DATABASE testdb8; -CREATE DATABASE testdb9; -CREATE DATABASE testdb10; -begin; -GRANT ALL ON testdb1.* TO testuser@localhost; -GRANT ALL ON testdb2.* TO testuser@localhost; -GRANT ALL ON testdb3.* TO testuser@localhost; -GRANT ALL ON testdb4.* TO testuser@localhost; -GRANT ALL ON testdb5.* TO testuser@localhost; -GRANT ALL ON testdb6.* TO testuser@localhost; -GRANT ALL ON testdb7.* TO testuser@localhost; -GRANT ALL ON testdb8.* TO testuser@localhost; -GRANT ALL ON testdb9.* TO testuser@localhost; -GRANT ALL ON testdb10.* TO testuser@localhost; -GRANT SELECT ON test.t1 TO testuser@localhost; -GRANT SELECT ON test.t2 TO testuser@localhost; -GRANT SELECT ON test.t3 TO testuser@localhost; -GRANT SELECT ON test.t4 TO testuser@localhost; -GRANT SELECT ON test.t5 TO testuser@localhost; -GRANT SELECT ON test.t6 TO testuser@localhost; -GRANT SELECT ON test.t7 TO testuser@localhost; -GRANT SELECT ON test.t8 TO testuser@localhost; -GRANT SELECT ON test.t9 TO testuser@localhost; -GRANT SELECT ON test.t10 TO testuser@localhost; -GRANT SELECT (a) ON test.t1 TO testuser@localhost; -GRANT SELECT (a) ON test.t2 TO testuser@localhost; -GRANT SELECT (a) ON test.t3 TO testuser@localhost; -GRANT SELECT (a) ON test.t4 TO testuser@localhost; -GRANT SELECT (a) ON test.t5 TO testuser@localhost; -GRANT SELECT (a) ON test.t6 TO testuser@localhost; -GRANT SELECT (a) ON test.t7 TO testuser@localhost; -GRANT SELECT (a) ON test.t8 TO testuser@localhost; -GRANT SELECT (a) ON test.t9 TO testuser@localhost; -GRANT SELECT (a) ON test.t10 TO testuser@localhost; -commit; -begin; -REVOKE ALL PRIVILEGES, GRANT OPTION FROM testuser@localhost; -commit; -SHOW GRANTS FOR testuser@localhost; -DROP USER testuser@localhost; -DROP TABLE t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; -DROP DATABASE testdb1; -DROP DATABASE testdb2; -DROP DATABASE testdb3; -DROP DATABASE testdb4; -DROP DATABASE testdb5; -DROP DATABASE testdb6; -DROP DATABASE testdb7; -DROP DATABASE testdb8; -DROP DATABASE testdb9; -DROP DATABASE testdb10; - -# -# just SHOW PRIVILEGES test -# -SHOW PRIVILEGES; - -# -# Alter mysql system tables back to myisam -# -use mysql; -alter table columns_priv engine=myisam; -alter table db engine=myisam; -alter table func engine=myisam; -alter table help_category engine=myisam; -alter table help_keyword engine=myisam; -alter table help_relation engine=myisam; -alter table help_topic engine=myisam; -alter table host engine=myisam; -alter table tables_priv engine=myisam; -alter table time_zone engine=myisam; -alter table time_zone_leap_second engine=myisam; -alter table time_zone_name engine=myisam; -alter table time_zone_transition engine=myisam; -alter table time_zone_transition_type engine=myisam; -alter table user engine=myisam; -use test; -flush privileges; - -# End of 4.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_index.test b/mysql-test/suite/ndb/t/ndb_index.test deleted file mode 100644 index 272f30e3e6f..00000000000 --- a/mysql-test/suite/ndb/t/ndb_index.test +++ /dev/null @@ -1,131 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -drop table if exists t1; ---enable_warnings - -CREATE TABLE t1 ( - PORT varchar(16) NOT NULL, - ACCESSNODE varchar(16) NOT NULL, - POP varchar(48) NOT NULL, - ACCESSTYPE int unsigned NOT NULL, - CUSTOMER_ID varchar(20) collate latin1_bin NOT NULL, - PROVIDER varchar(16), - TEXPIRE int unsigned, - NUM_IP int unsigned, - LEASED_NUM_IP int unsigned, - LOCKED_IP int unsigned, - STATIC_DNS int unsigned, - SUSPENDED_SERVICE int unsigned, - SUSPENDED_REASON int unsigned, - BGP_COMMUNITY int unsigned, - INDEX CUSTOMER_ID_INDEX(CUSTOMER_ID), - INDEX FQPN_INDEX(POP,ACCESSNODE,PORT), - PRIMARY KEY(POP,ACCESSNODE,PORT,ACCESSTYPE) -) engine=ndbcluster; - -INSERT INTO t1 VALUES ('port67', 'node78', 'pop98', 1, 'kllopmn', 'pr_43', 121212, 1, 2, 3, 8, NULL, NULL, NULL); -INSERT INTO t1 VALUES ('port67', 'node78', 'pop99', 2, 'klkighh', 'pr_44', 121213, 3, 3, 6, 7, NULL, NULL, NULL); -INSERT INTO t1 VALUES ('port79', 'node79', 'pop79', 2, 'kpongfaa', 'pr_44', 981213, 2, 4, 10, 11, 2, 99, 1278); - - -# Test select using port -select port, accessnode, pop, accesstype from t1 where port='port67' order by accesstype; -select port, accessnode, pop, accesstype from t1 where port='foo'; - -# Test select using accessnode -select port, accessnode, pop, accesstype from t1 where accessnode='node78' order by accesstype; -select port, accessnode, pop, accesstype from t1 where accessnode='foo'; - -# Test select using pop -select port, accessnode, pop, accesstype from t1 where pop='pop98'; -select port, accessnode, pop, accesstype from t1 where pop='pop98'; -select port, accessnode, pop, accesstype from t1 where pop='pop98'; -select port, accessnode, pop, accesstype from t1 where pop='pop98' order by accesstype; -# The following two querys will not return any rows since -# the index used for access is case sensitive -# They are thus disabled for now -#select port, accessnode, pop, accesstype from t1 where pop='POP98'; -#select port, accessnode, pop, accesstype from t1 where pop='POP98' order by accesstype; -select port, accessnode, pop, accesstype from t1 where pop='foo'; - -# Test select using accesstype -select port, accessnode, pop, accesstype from t1 where accesstype=1; -select port, accessnode, pop, accesstype from t1 where accesstype=2 order by port; -select port, accessnode, pop, accesstype from t1 where accesstype=98 order by port; - -# Test select using customer_id -# NOTE! customer_id has a INDEX (ordered index in NDB), it's case sensitive! -select port, accessnode, pop, accesstype from t1 where customer_id='kllopmn'; -select port, accessnode, pop, accesstype from t1 where customer_id='KLLOPMN'; -select port, accessnode, pop, accesstype from t1 where customer_id='kLLoPMn'; -select port, accessnode, pop, accesstype from t1 where customer_id='foo'; - -# Test select using provider -select port, accessnode, pop, accesstype from t1 where provider='pr_43'; -select port, accessnode, pop, accesstype from t1 where provider='foo'; - -# Test select using texpire -select port, accessnode from t1 where texpire=121212; -select port, accessnode from t1 where texpire=2323; - -# Test select using num_ip -select port, accessnode, pop, accesstype from t1 where num_ip=1; -select port, accessnode, pop, accesstype from t1 where num_ip=89; - -# Test select using leased_num_ip -select port, accessnode, pop, accesstype from t1 where leased_num_ip=2; -select port, accessnode, pop, accesstype from t1 where leased_num_ip=89; - -# Test select using locked_ip -select port, accessnode, pop, accesstype from t1 where locked_ip=3; -select port, accessnode, pop, accesstype from t1 where locked_ip=89; - -# Test select using static_dns -select port, accessnode, pop, accesstype from t1 where static_dns=8; -select port, accessnode, pop, accesstype from t1 where static_dns=89; - -# Test select using suspended_service -select port, accessnode, pop, accesstype from t1 where suspended_service=8; -select port, accessnode, pop, accesstype from t1 where suspended_service=89; - -# Test select using suspended_reason -select port, accessnode, pop, accesstype from t1 where suspended_reason=NULL; -select port, accessnode, pop, accesstype from t1 where suspended_reason=89; -select port, accessnode, pop, accesstype from t1 where suspended_reason=0; - -# Test select using bgp_community -select port, accessnode, pop, accesstype from t1 where bgp_community=NULL; -select port, accessnode, pop, accesstype from t1 where bgp_community=89; -select port, accessnode, pop, accesstype from t1 where bgp_community=0; - -# Test select using full primary key -select port, accessnode, pop, accesstype from t1 where port='port67' and accessnode='node78' and pop='pop98' and accesstype=1; -select port, accessnode, pop, accesstype from t1 where port='port67' and accesstype=1 and accessnode='node78' and pop='pop98'; -select port, accessnode, pop, accesstype from t1 where pop='pop98' and port='port67' and accesstype=1 and accessnode='node78'; -select port, accessnode from t1 where port='foo' and accessnode='foo' and pop='foo' and accesstype=99; - -# Test select using partial primary key -select port, accessnode, pop, accesstype from t1 where port='port67' and pop='pop98' and accesstype=1; -select port, accessnode, pop, accesstype from t1 where accesstype=1 and accessnode='node78' and pop='pop98'; -select port, accessnode, pop, accesstype from t1 where port='port67' and accesstype=1 and accessnode='node78'; -select port, accessnode from t1 where port='foo' and accessnode='foo' and pop='foo'; - -# Test select using CUSTOMER_ID_INDEX -select port, accessnode, pop, accesstype from t1 where customer_id='kllopmn'; -select port, accessnode, pop, accesstype from t1 where customer_id='kllopmn' and accesstype=1; -select port, accessnode, pop, accesstype from t1 where customer_id='kllopmn' and accesstype=2; -select port, accessnode, pop, accesstype from t1 where accesstype=2 and customer_id='kllopmn'; - -# Test select using FQPN_INDEX -select port, accessnode, pop, accesstype from t1 where pop='pop98' and accessnode='node78' and port='port67'; -#select port, accessnode, pop, accesstype from t1 where pop='pop98' and accessnode='node78' and port='port67' order by accesstype; -#select port, accessnode, pop, accesstype from t1 where accessnode='node78' and port='port67' and pop='pop98' order by accesstype; -#select port, accessnode, pop, accesstype from t1 where port='port67' and pop='pop98' and accessnode='node78' order by accesstype; -select port, accessnode, pop, accesstype from t1 where pop='pop98' and accessnode='node78' and port='port67' and customer_id='kllopmn'; -select port, accessnode, pop, accesstype from t1 where pop='pop98' and accessnode='node78' and port='port67' and customer_id='foo'; - -drop table t1; - -# End of 4.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_index_ordered.test b/mysql-test/suite/ndb/t/ndb_index_ordered.test deleted file mode 100644 index c8dfc1de59f..00000000000 --- a/mysql-test/suite/ndb/t/ndb_index_ordered.test +++ /dev/null @@ -1,488 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -drop table if exists t1, test1, test2; ---enable_warnings - -# -# Simple test to show use of ordered indexes -# - -CREATE TABLE t1 ( - a int unsigned NOT NULL PRIMARY KEY, - b int unsigned not null, - c int unsigned, - KEY(b) -) engine=ndbcluster; - -insert t1 values(1, 2, 3), (2,3, 5), (3, 4, 6), (4, 5, 8), (5,6, 2), (6,7, 2); -select * from t1 order by b; -select * from t1 where b >= 4 order by b; -select * from t1 where b = 4 order by b; -select * from t1 where b > 4 order by b; -select * from t1 where b < 4 order by b; -select * from t1 where b <= 4 order by b; - -# Test of reset_bounds -select tt1.* from t1 as tt1, t1 as tt2 use index(b) where tt1.b = tt2.b order by tt1.b; -select a, b, c from t1 where a!=2 and c=6; -select a, b, c from t1 where a!=2 order by a; - -# -# Here we should add some "explain select" to verify that the ordered index is -# used for these queries. -# - -# -# Update using ordered index scan -# - -update t1 set c = 3 where b = 3; -select * from t1 order by a; -update t1 set c = 10 where b >= 6; -select * from t1 order by a; -update t1 set c = 11 where b < 5; -select * from t1 order by a; -update t1 set c = 12 where b > 0; -select * from t1 order by a; -update t1 set c = 13 where b <= 3; -select * from t1 order by a; -update t1 set b = b + 1 where b > 4 and b < 7; -select * from t1 order by a; -# Update primary key -update t1 set a = a + 10 where b > 1 and b < 7; -select * from t1 order by a; - -# -# Delete using ordered index scan -# - -drop table t1; - -CREATE TABLE t1 ( - a int unsigned NOT NULL PRIMARY KEY, - b int unsigned not null, - c int unsigned, - KEY(b) -) engine=ndbcluster; - -insert t1 values(1, 2, 13), (2,3, 13), (3, 4, 12), (4, 5, 12), (5,6, 12), (6,7, 12); - -delete from t1 where b = 3; -select * from t1 order by a; -delete from t1 where b >= 6; -select * from t1 order by a; -delete from t1 where b < 4; -select * from t1 order by a; -delete from t1 where b > 5; -select * from t1 order by a; -delete from t1 where b <= 4; -select * from t1 order by a; - -drop table t1; - - -# -#multi part key -# -CREATE TABLE t1 ( - a int unsigned NOT NULL PRIMARY KEY, - b int unsigned not null, - c int unsigned not null -) engine = ndb; - -create index a1 on t1 (b, c); - -insert into t1 values (1, 2, 13); -insert into t1 values (2,3, 13); -insert into t1 values (3, 4, 12); -insert into t1 values (4, 5, 12); -insert into t1 values (5,6, 12); -insert into t1 values (6,7, 12); -insert into t1 values (7, 2, 1); -insert into t1 values (8,3, 6); -insert into t1 values (9, 4, 12); -insert into t1 values (14, 5, 4); -insert into t1 values (15,5,5); -insert into t1 values (16,5, 6); -insert into t1 values (17,4,4); -insert into t1 values (18,1, 7); - - - -select * from t1 order by a; -select * from t1 where b<=5 order by a; -select * from t1 where b<=5 and c=0; -insert into t1 values (19,4, 0); -select * from t1 where b<=5 and c=0; -select * from t1 where b=4 and c<=5 order by a; -select * from t1 where b<=4 and c<=5 order by a; -select * from t1 where b<=5 and c=0 or b<=5 and c=2; - -select count(*) from t1 where b = 0; -select count(*) from t1 where b = 1; -drop table t1; - -# -# Indexing NULL values -# - -CREATE TABLE t1 ( - a int unsigned NOT NULL PRIMARY KEY, - b int unsigned, - c int unsigned, - KEY bc(b,c) -) engine = ndb; - -insert into t1 values(1,1,1),(2,NULL,2),(3,NULL,NULL),(4,4,NULL); -select * from t1 use index (bc) where b IS NULL order by a; - -select * from t1 use index (bc)order by a; -select * from t1 use index (bc) order by a; -select * from t1 use index (PRIMARY) where b IS NULL order by a; -select * from t1 use index (bc) where b IS NULL order by a; -select * from t1 use index (bc) where b IS NULL and c IS NULL order by a; -select * from t1 use index (bc) where b IS NULL and c = 2 order by a; -select * from t1 use index (bc) where b < 4 order by a; -select * from t1 use index (bc) where b IS NOT NULL order by a; -drop table t1; - -# -# Order by again, including descending. -# - -create table t1 ( - a int unsigned primary key, - b int unsigned, - c char(10), - key bc (b, c) -) engine=ndb; - -insert into t1 values(1,1,'a'),(2,2,'b'),(3,3,'c'),(4,4,'d'),(5,5,'e'); -insert into t1 select a*7,10*b,'f' from t1; -insert into t1 select a*13,10*b,'g' from t1; -insert into t1 select a*17,10*b,'h' from t1; -insert into t1 select a*19,10*b,'i' from t1; -insert into t1 select a*23,10*b,'j' from t1; -insert into t1 select a*29,10*b,'k' from t1; -# -select b, c from t1 where b <= 10 and c <'f' order by b, c; -select b, c from t1 where b <= 10 and c <'f' order by b desc, c desc; -# -select b, c from t1 where b=4000 and c<'k' order by b, c; -select b, c from t1 where b=4000 and c<'k' order by b desc, c desc; -select b, c from t1 where 1000<=b and b<=100000 and c<'j' order by b, c; -select b, c from t1 where 1000<=b and b<=100000 and c<'j' order by b desc, c desc; -# -select min(b), max(b) from t1; -# -drop table t1; - -# -# Bug #6435 -CREATE TABLE test1 ( -SubscrID int(11) NOT NULL auto_increment, -UsrID int(11) NOT NULL default '0', -PRIMARY KEY (SubscrID), -KEY idx_usrid (UsrID) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; - -INSERT INTO test1 VALUES (2,224),(3,224),(1,224); - -CREATE TABLE test2 ( -SbclID int(11) NOT NULL auto_increment, -SbcrID int(11) NOT NULL default '0', -PRIMARY KEY (SbclID), -KEY idx_sbcrid (SbcrID) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; - -INSERT INTO test2 VALUES (3,2),(1,1),(2,1),(4,2); -select * from test1 order by 1; -select * from test2 order by 1; -SELECT s.SubscrID,l.SbclID FROM test1 s left JOIN test2 l ON -l.SbcrID=s.SubscrID WHERE s.UsrID=224 order by 1, 2; -drop table test1; -drop table test2; - -# bug#7424 + bug#7725 - -create table t1 ( - pk int primary key, - dt datetime not null, - da date not null, - ye year not null, - ti time not null, - ts timestamp not null, - index(dt), - index(da), - index(ye), - index(ti), - index(ts) -) engine=ndb; - -insert into t1 (pk,dt,da,ye,ti,ts) values - (1, '1901-05-05 23:00:59', '1901-05-05', '1901', '23:00:59', '2001-01-01 23:00:59'), - (2, '1912-09-05 13:00:59', '1912-09-05', '1912', '13:00:59', '2001-01-01 13:00:59'), - (3, '1945-12-31 00:00:00', '1945-12-31', '1945', '00:00:00', '2001-01-01 00:00:00'), - (4, '1955-12-31 00:00:00', '1955-12-31', '1955', '00:00:00', '2001-01-01 00:00:00'), - (5, '1963-06-06 06:06:06', '1963-06-06', '1963', '06:06:06', '2001-01-01 06:06:06'), - (6, '1993-06-06 06:06:06', '1993-06-06', '1993', '06:06:06', '2001-01-01 06:06:06'), - (7, '2001-01-01 10:11:10', '2001-01-01', '2001', '10:11:10', '2001-01-01 10:11:10'), - (8, '2001-01-01 10:11:11', '2001-01-01', '2001', '10:11:11', '2001-01-01 10:11:11'), - (9, '2005-01-31 23:59:59', '2005-01-31', '2005', '23:59:59', '2001-01-01 23:59:59'); - -# datetime -select count(*)-9 from t1 use index (dt) where dt > '1900-01-01 00:00:00'; -select count(*)-6 from t1 use index (dt) where dt >= '1955-12-31 00:00:00'; -select count(*)-5 from t1 use index (dt) where dt > '1955-12-31 00:00:00'; -select count(*)-5 from t1 use index (dt) where dt < '1970-03-03 22:22:22'; -select count(*)-7 from t1 use index (dt) where dt < '2001-01-01 10:11:11'; -select count(*)-8 from t1 use index (dt) where dt <= '2001-01-01 10:11:11'; -select count(*)-9 from t1 use index (dt) where dt <= '2055-01-01 00:00:00'; - -# date -select count(*)-9 from t1 use index (da) where da > '1900-01-01'; -select count(*)-6 from t1 use index (da) where da >= '1955-12-31'; -select count(*)-5 from t1 use index (da) where da > '1955-12-31'; -select count(*)-5 from t1 use index (da) where da < '1970-03-03'; -select count(*)-6 from t1 use index (da) where da < '2001-01-01'; -select count(*)-8 from t1 use index (da) where da <= '2001-01-02'; -select count(*)-9 from t1 use index (da) where da <= '2055-01-01'; - -# year -select count(*)-9 from t1 use index (ye) where ye > '1900'; -select count(*)-6 from t1 use index (ye) where ye >= '1955'; -select count(*)-5 from t1 use index (ye) where ye > '1955'; -select count(*)-5 from t1 use index (ye) where ye < '1970'; -select count(*)-6 from t1 use index (ye) where ye < '2001'; -select count(*)-8 from t1 use index (ye) where ye <= '2001'; -select count(*)-9 from t1 use index (ye) where ye <= '2055'; - -# time -select count(*)-9 from t1 use index (ti) where ti >= '00:00:00'; -select count(*)-7 from t1 use index (ti) where ti > '00:00:00'; -select count(*)-7 from t1 use index (ti) where ti > '05:05:05'; -select count(*)-5 from t1 use index (ti) where ti > '06:06:06'; -select count(*)-5 from t1 use index (ti) where ti < '10:11:11'; -select count(*)-6 from t1 use index (ti) where ti <= '10:11:11'; -select count(*)-8 from t1 use index (ti) where ti < '23:59:59'; -select count(*)-9 from t1 use index (ti) where ti <= '23:59:59'; - -# timestamp -select count(*)-9 from t1 use index (ts) where ts >= '2001-01-01 00:00:00'; -select count(*)-7 from t1 use index (ts) where ts > '2001-01-01 00:00:00'; -select count(*)-7 from t1 use index (ts) where ts > '2001-01-01 05:05:05'; -select count(*)-5 from t1 use index (ts) where ts > '2001-01-01 06:06:06'; -select count(*)-5 from t1 use index (ts) where ts < '2001-01-01 10:11:11'; -select count(*)-6 from t1 use index (ts) where ts <= '2001-01-01 10:11:11'; -select count(*)-8 from t1 use index (ts) where ts < '2001-01-01 23:59:59'; -select count(*)-9 from t1 use index (ts) where ts <= '2001-01-01 23:59:59'; - -drop table t1; - -# decimal (not the new 5.0 thing) - -create table t1 ( - a int primary key, - s decimal(12), - t decimal(12, 5), - u decimal(12) unsigned, - v decimal(12, 5) unsigned, - key (s), - key (t), - key (u), - key (v) -) engine=ndb; -# -insert into t1 values - ( 0, -000000000007, -0000061.00003, 000000000061, 0000965.00042), - ( 1, -000000000007, -0000061.00042, 000000000061, 0000965.00003), - ( 2, -071006035767, 4210253.00024, 000000000001, 0000001.84488), - ( 3, 000000007115, 0000000.77607, 000077350625, 0000018.00013), - ( 4, -000000068391, -0346486.00000, 000000005071, 0005334.00002), - ( 5, -521579890459, -1936874.00001, 000000000154, 0000003.00018), - ( 6, -521579890459, -1936874.00018, 000000000154, 0000003.00001), - ( 7, 000000000333, 0000051.39140, 000000907958, 0788643.08374), - ( 8, 000042731229, 0000009.00000, 000000000009, 6428667.00000), - ( 9, -000008159769, 0000918.00004, 000096951421, 7607730.00008); -# -select count(*)- 5 from t1 use index (s) where s < -000000000007; -select count(*)- 7 from t1 use index (s) where s <= -000000000007; -select count(*)- 2 from t1 use index (s) where s = -000000000007; -select count(*)- 5 from t1 use index (s) where s >= -000000000007; -select count(*)- 3 from t1 use index (s) where s > -000000000007; -# -select count(*)- 4 from t1 use index (t) where t < -0000061.00003; -select count(*)- 5 from t1 use index (t) where t <= -0000061.00003; -select count(*)- 1 from t1 use index (t) where t = -0000061.00003; -select count(*)- 6 from t1 use index (t) where t >= -0000061.00003; -select count(*)- 5 from t1 use index (t) where t > -0000061.00003; -# -select count(*)- 2 from t1 use index (u) where u < 000000000061; -select count(*)- 4 from t1 use index (u) where u <= 000000000061; -select count(*)- 2 from t1 use index (u) where u = 000000000061; -select count(*)- 8 from t1 use index (u) where u >= 000000000061; -select count(*)- 6 from t1 use index (u) where u > 000000000061; -# -select count(*)- 5 from t1 use index (v) where v < 0000965.00042; -select count(*)- 6 from t1 use index (v) where v <= 0000965.00042; -select count(*)- 1 from t1 use index (v) where v = 0000965.00042; -select count(*)- 5 from t1 use index (v) where v >= 0000965.00042; -select count(*)- 4 from t1 use index (v) where v > 0000965.00042; - -drop table t1; - -# -# Disabled due to WL#4284 -# -# Needs to be reworked. It's not possible anymore to do a non-fast alter table -# on a table that is being used by a pending transaction (transaction holds a -# metadata lock on the table). -# -# bug#7798 -# create table t1(a int primary key, b int not null, c int, index(b)); -# insert into t1 values (1,1,1), (2,2,2); -# connect (con1,localhost,root,,test); -# connect (con2,localhost,root,,test); -# connection con1; -# set autocommit=0; -# begin; -# select count(*) from t1; -# connection con2; -# ALTER TABLE t1 ADD COLUMN c int -# connection con1; -# select a from t1 where b = 2; -# show tables; -# drop table t1; -# - -# mysqld 5.0.13 crash, no bug# -create table t1 (a int, c varchar(10), - primary key using hash (a), index(c)) engine=ndb; -insert into t1 (a, c) values (1,'aaa'),(3,'bbb'); -select count(*) from t1 where c<'bbb'; -drop table t1; - -# -- index statistics -- - -set autocommit=1; -show session variables like 'ndb_index_stat_%'; - -set ndb_index_stat_enable = off; -show session variables like 'ndb_index_stat_%'; - -create table t1 (a int, b int, c varchar(10) not null, - primary key using hash (a), index(b,c)) engine=ndb; -insert into t1 values - (1,10,'aaa'),(2,10,'bbb'),(3,10,'ccc'), - (4,20,'aaa'),(5,20,'bbb'),(6,20,'ccc'), - (7,30,'aaa'),(8,30,'bbb'),(9,30,'ccc'); -select count(*) from t1 where b < 10; -select count(*) from t1 where b >= 10 and c >= 'bbb'; -select count(*) from t1 where b > 10; -select count(*) from t1 where b <= 20 and c < 'ccc'; -select count(*) from t1 where b = 20 and c = 'ccc'; -select count(*) from t1 where b > 20; -select count(*) from t1 where b = 30 and c > 'aaa'; -select count(*) from t1 where b <= 20; -select count(*) from t1 where b >= 20 and c > 'aaa'; -drop table t1; - -set ndb_index_stat_enable = on; -set ndb_index_stat_cache_entries = 0; -show session variables like 'ndb_index_stat_%'; - -create table t1 (a int, b int, c varchar(10) not null, - primary key using hash (a), index(b,c)) engine=ndb; -insert into t1 values - (1,10,'aaa'),(2,10,'bbb'),(3,10,'ccc'), - (4,20,'aaa'),(5,20,'bbb'),(6,20,'ccc'), - (7,30,'aaa'),(8,30,'bbb'),(9,30,'ccc'); -select count(*) from t1 where b < 10; -select count(*) from t1 where b >= 10 and c >= 'bbb'; -select count(*) from t1 where b > 10; -select count(*) from t1 where b <= 20 and c < 'ccc'; -select count(*) from t1 where b = 20 and c = 'ccc'; -select count(*) from t1 where b > 20; -select count(*) from t1 where b = 30 and c > 'aaa'; -select count(*) from t1 where b <= 20; -select count(*) from t1 where b >= 20 and c > 'aaa'; -drop table t1; - -set ndb_index_stat_enable = on; -set ndb_index_stat_cache_entries = 4; -set ndb_index_stat_update_freq = 2; -show session variables like 'ndb_index_stat_%'; - -create table t1 (a int, b int, c varchar(10) not null, - primary key using hash (a), index(b,c)) engine=ndb; -insert into t1 values - (1,10,'aaa'),(2,10,'bbb'),(3,10,'ccc'), - (4,20,'aaa'),(5,20,'bbb'),(6,20,'ccc'), - (7,30,'aaa'),(8,30,'bbb'),(9,30,'ccc'); -select count(*) from t1 where b < 10; -select count(*) from t1 where b >= 10 and c >= 'bbb'; -select count(*) from t1 where b > 10; -select count(*) from t1 where b <= 20 and c < 'ccc'; -select count(*) from t1 where b = 20 and c = 'ccc'; -select count(*) from t1 where b > 20; -select count(*) from t1 where b = 30 and c > 'aaa'; -select count(*) from t1 where b <= 20; -select count(*) from t1 where b >= 20 and c > 'aaa'; -drop table t1; - -set ndb_index_stat_enable = @@global.ndb_index_stat_enable; -set ndb_index_stat_cache_entries = @@global.ndb_index_stat_cache_entries; -set ndb_index_stat_update_freq = @@global.ndb_index_stat_update_freq; -show session variables like 'ndb_index_stat_%'; - -# End of 4.1 tests - -# bug#24039 - -create table t1 (a int primary key) engine = ndb; -insert into t1 values (1), (2), (3); -begin; -delete from t1 where a > 1; -rollback; -select * from t1 order by a; -begin; -delete from t1 where a > 1; -rollback; - -begin; -select * from t1 order by a; -delete from t1 where a > 2; -select * from t1 order by a; -delete from t1 where a > 1; -select * from t1 order by a; -delete from t1 where a > 0; -select * from t1 order by a; -rollback; -select * from t1 order by a; -delete from t1; -drop table t1; - -# bug#24820 CREATE INDEX ....USING HASH on NDB table creates ordered index, not HASH index - ---error ER_CANT_CREATE_TABLE -create table nationaldish (DishID int(10) unsigned NOT NULL AUTO_INCREMENT, - CountryCode char(3) NOT NULL, - DishTitle varchar(64) NOT NULL, - calories smallint(5) unsigned DEFAULT NULL, - PRIMARY KEY (DishID), - INDEX i USING HASH (countrycode,calories) - ) ENGINE=ndbcluster; - -create table nationaldish (DishID int(10) unsigned NOT NULL AUTO_INCREMENT, - CountryCode char(3) NOT NULL, - DishTitle varchar(64) NOT NULL, - calories smallint(5) unsigned DEFAULT NULL, - PRIMARY KEY (DishID) - ) ENGINE=ndbcluster; - ---error ER_UNSUPPORTED_EXTENSION -create index i on nationaldish(countrycode,calories) using hash; - -drop table nationaldish; diff --git a/mysql-test/suite/ndb/t/ndb_index_unique.test b/mysql-test/suite/ndb/t/ndb_index_unique.test deleted file mode 100644 index 9178ace1ad0..00000000000 --- a/mysql-test/suite/ndb/t/ndb_index_unique.test +++ /dev/null @@ -1,361 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -drop table if exists t1, t2, t3, t4, t5, t6, t7, t8; ---enable_warnings - -# -# Simple test to show use of UNIQUE indexes -# - -CREATE TABLE t1 ( - a int NOT NULL PRIMARY KEY, - b int not null, - c int, - UNIQUE ib(b) -) engine=ndbcluster; - -insert t1 values(1, 2, 3), (2, 3, 5), (3, 4, 6), (4, 5, 8), (5,6, 2), (6,7, 2); -select * from t1 order by b; -select * from t1 where b = 4 order by b; -insert into t1 values(7,8,3); -select * from t1 where b = 4 order by a; - --- error ER_DUP_ENTRY -insert into t1 values(8, 2, 3); -select * from t1 order by a; -delete from t1 where a = 1; -insert into t1 values(8, 2, 3); -select * from t1 order by a; - -alter table t1 drop index ib; -insert into t1 values(1, 2, 3); -# Bug# #18129 ---error 1169 -create unique index ib on t1(b); - -drop table t1; - -# -# Indexing NULL values -# - -CREATE TABLE t1 ( - a int unsigned NOT NULL PRIMARY KEY, - b int unsigned, - c int unsigned, - UNIQUE bc(b,c) -) engine = ndb; - -insert into t1 values(1,1,1),(2,NULL,2),(3,NULL,NULL),(4,4,NULL); -select * from t1 use index (bc) where b IS NULL order by a; - -select * from t1 use index (bc)order by a; -select * from t1 use index (bc) order by a; -select * from t1 use index (PRIMARY) where b IS NULL order by a; -select * from t1 use index (bc) where b IS NULL order by a; -select * from t1 use index (bc) where b IS NULL and c IS NULL order by a; -select * from t1 use index (bc) where b IS NULL and c = 2 order by a; -select * from t1 use index (bc) where b < 4 order by a; -select * from t1 use index (bc) where b IS NOT NULL order by a; --- error ER_DUP_ENTRY -insert into t1 values(5,1,1); -drop table t1; - - -# -# Show use of UNIQUE USING HASH indexes -# - -CREATE TABLE t2 ( - a int unsigned NOT NULL PRIMARY KEY, - b int unsigned not null, - c int unsigned not null, - UNIQUE (b, c) USING HASH -) engine=ndbcluster; - -insert t2 values(1, 2, 3), (2, 3, 5), (3, 4, 6), (4, 5, 8), (5,6, 2), (6,7, 2); -select * from t2 where a = 3; -select * from t2 where b = 4; -select * from t2 where c = 6; -insert into t2 values(7,8,3); -select * from t2 where b = 4 order by a; - --- error ER_DUP_ENTRY -insert into t2 values(8, 2, 3); -select * from t2 order by a; -delete from t2 where a = 1; -insert into t2 values(8, 2, 3); -select * from t2 order by a; - -# Bug #24818 CREATE UNIQUE INDEX (...) USING HASH on a NDB table crashes mysqld -create unique index bi using hash on t2(b); --- error ER_DUP_ENTRY -insert into t2 values(9, 3, 1); -alter table t2 drop index bi; -insert into t2 values(9, 3, 1); -select * from t2 order by a; - -drop table t2; - -CREATE TABLE t2 ( - a int unsigned NOT NULL PRIMARY KEY, - b int unsigned not null, - c int unsigned, - UNIQUE (b, c) USING HASH -) engine=ndbcluster; - - -insert t2 values(1,1,NULL),(2,2,2),(3,3,NULL),(4,4,4),(5,5,NULL),(6,6,6),(7,7,NULL),(8,3,NULL),(9,3,NULL); - -select * from t2 where c IS NULL order by a; -select * from t2 where b = 3 AND c IS NULL order by a; -select * from t2 where (b = 3 OR b = 5) AND c IS NULL order by a; -set @old_optimizer_switch = @@session.optimizer_switch; -set optimizer_switch = "engine_condition_pushdown=on"; -explain select * from t2 where (b = 3 OR b = 5) AND c IS NULL AND a < 9 order by a; -select * from t2 where (b = 3 OR b = 5) AND c IS NULL AND a < 9 order by a; -set optimizer_switch = @old_optimizer_switch; - -drop table t2; - -# -# Show use of PRIMARY KEY USING HASH indexes -# - -CREATE TABLE t3 ( - a int unsigned NOT NULL, - b int unsigned not null, - c int unsigned, - PRIMARY KEY (a, b) USING HASH -) engine=ndbcluster; - -insert t3 values(1, 2, 3), (2, 3, 5), (3, 4, 6), (4, 5, 8), (5,6, 2), (6,7, 2); -select * from t3 where a = 3; -select * from t3 where b = 4; -select * from t3 where c = 6; -insert into t3 values(7,8,3); -select * from t3 where b = 4 order by a; - -drop table t3; - -# -# Indexes on NULL-able columns -# - -CREATE TABLE t1 ( - pk int NOT NULL PRIMARY KEY, - a int unsigned, - UNIQUE KEY (a) -) engine=ndbcluster; - -insert into t1 values (-1,NULL), (0,0), (1,NULL),(2,2),(3,NULL),(4,4); - -select * from t1 order by pk; - ---error ER_DUP_ENTRY -insert into t1 values (5,0); -select * from t1 order by pk; -delete from t1 where a = 0; -insert into t1 values (5,0); -select * from t1 order by pk; - -CREATE TABLE t2 ( - pk int NOT NULL PRIMARY KEY, - a int unsigned, - b tinyint NOT NULL, - c VARCHAR(10), - UNIQUE KEY si(a, c) -) engine=ndbcluster; - -insert into t2 values (-1,1,17,NULL),(0,NULL,18,NULL),(1,3,19,'abc'); - -select * from t2 order by pk; - ---error ER_DUP_ENTRY -insert into t2 values(2,3,19,'abc'); -select * from t2 order by pk; -delete from t2 where c IS NOT NULL; -insert into t2 values(2,3,19,'abc'); -select * from t2 order by pk; - -drop table t1, t2; - -# -# More complex tables -# - -CREATE TABLE t1 ( - cid smallint(5) unsigned NOT NULL default '0', - cv varchar(250) NOT NULL default '', - PRIMARY KEY (cid), - UNIQUE KEY cv (cv) -) engine=ndbcluster; -INSERT INTO t1 VALUES (8,'dummy'); -CREATE TABLE t2 ( - cid bigint(20) unsigned NOT NULL auto_increment, - cap varchar(255) NOT NULL default '', - PRIMARY KEY (cid), - UNIQUE KEY (cid, cap) -) engine=ndbcluster; -INSERT INTO t2 VALUES (NULL,'another dummy'); -CREATE TABLE t3 ( - gid bigint(20) unsigned NOT NULL auto_increment, - gn varchar(255) NOT NULL default '', - must tinyint(4) default NULL, - PRIMARY KEY (gid) -) engine=ndbcluster; -INSERT INTO t3 VALUES (1,'V1',NULL); -CREATE TABLE t4 ( - uid bigint(20) unsigned NOT NULL default '0', - gid bigint(20) unsigned NOT NULL, - rid bigint(20) unsigned NOT NULL, - cid bigint(20) unsigned NOT NULL, - UNIQUE KEY m (uid,gid,rid,cid) -) engine=ndbcluster; -INSERT INTO t4 VALUES (1,1,2,4); -INSERT INTO t4 VALUES (1,1,2,3); -INSERT INTO t4 VALUES (1,1,5,7); -INSERT INTO t4 VALUES (1,1,10,8); -CREATE TABLE t5 ( - rid bigint(20) unsigned NOT NULL auto_increment, - rl varchar(255) NOT NULL default '', - PRIMARY KEY (rid) -) engine=ndbcluster; -CREATE TABLE t6 ( - uid bigint(20) unsigned NOT NULL auto_increment, - un varchar(250) NOT NULL default '', - uc smallint(5) unsigned NOT NULL default '0', - PRIMARY KEY (uid), - UNIQUE KEY nc (un,uc) -) engine=ndbcluster; -INSERT INTO t6 VALUES (1,'test',8); -INSERT INTO t6 VALUES (2,'test2',9); -INSERT INTO t6 VALUES (3,'tre',3); -CREATE TABLE t7 ( - mid bigint(20) unsigned NOT NULL PRIMARY KEY, - uid bigint(20) unsigned NOT NULL default '0', - gid bigint(20) unsigned NOT NULL, - rid bigint(20) unsigned NOT NULL, - cid bigint(20) unsigned NOT NULL, - UNIQUE KEY m (uid,gid,rid,cid) -) engine=ndbcluster; -INSERT INTO t7 VALUES(1, 1, 1, 1, 1); -INSERT INTO t7 VALUES(2, 2, 1, 1, 1); -INSERT INTO t7 VALUES(3, 3, 1, 1, 1); -INSERT INTO t7 VALUES(4, 4, 1, 1, 1); -INSERT INTO t7 VALUES(5, 5, 1, 1, 1); -INSERT INTO t7 VALUES(6, 1, 1, 1, 6); -INSERT INTO t7 VALUES(7, 2, 1, 1, 7); -INSERT INTO t7 VALUES(8, 3, 1, 1, 8); -INSERT INTO t7 VALUES(9, 4, 1, 1, 9); -INSERT INTO t7 VALUES(10, 5, 1, 1, 10); - -select * from t1 where cv = 'dummy'; -select * from t1 where cv = 'test'; -select * from t2 where cap = 'another dummy'; -select * from t4 where uid = 1 and gid=1 and rid=2 and cid=4; -select * from t4 where uid = 1 and gid=1 and rid=1 and cid=4; -select * from t4 where uid = 1 order by cid; -select * from t4 where rid = 2 order by cid; -select * from t6 where un='test' and uc=8; -select * from t6 where un='test' and uc=7; -select * from t6 where un='test'; -select * from t7 where mid = 8; -select * from t7 where uid = 8; -select * from t7 where uid = 1 order by mid; -select * from t7 where uid = 4 order by mid; -select * from t7 where gid = 4; -select * from t7 where gid = 1 order by mid; -select * from t7 where cid = 4; -select * from t7 where cid = 8; - -# -# insert more records into t4 -# -let $1=100; -disable_query_log; -while ($1) -{ - eval insert into t4 values(1, $1, 5, 12); - eval insert into t4 values($1, 3, 9, 11); - dec $1; -} -enable_query_log; - -select * from t4 where uid = 1 and gid=1 and rid=2 and cid=4; -select * from t4 where uid = 1 and gid=1 and rid=1 and cid=4; -select * from t4 where uid = 1 order by gid,cid; -select * from t4 where uid = 1 order by gid,cid; -select * from t4 where rid = 2 order by cid; - - -drop table t1,t2,t3,t4,t5,t6,t7; - -# test null in indexes -CREATE TABLE t1 ( - a int unsigned NOT NULL PRIMARY KEY, - b int unsigned, - c int unsigned, - UNIQUE bc(b,c) ) engine = ndb; - -insert into t1 values(1,1,1),(2,NULL,2),(3,NULL,NULL),(4,4,NULL); -select * from t1 where b=1 and c=1; -select * from t1 where b is null and c is null; -select * from t1 where b is null and c = 2; -select * from t1 where b = 4 and c is null; -create table t8 as -select * from t1 where (b = 1 and c = 1) - or (b is null and c is null) - or (b is null and c = 2) - or (b = 4 and c is null); -select * from t8 order by a; -select * from t1 order by a; -drop table t1, t8; - -############################### -# Bug 8101 -# -# Unique index not specified in the same order as in table -# - -create table t1( - id integer not null auto_increment, - month integer not null, - year integer not null, - code varchar( 2) not null, - primary key ( id), - unique idx_t1( month, code, year) -) engine=ndb; - -INSERT INTO t1 (month, year, code) VALUES (4,2004,'12'); -INSERT INTO t1 (month, year, code) VALUES (5,2004,'12'); - -select * from t1 where code = '12' and month = 4 and year = 2004 ; - -drop table t1; - -# bug#15918 Unique Key Limit in NDB Engine - -create table t1 (a int primary key, b varchar(1000) not null, unique key (b)) -engine=ndb charset=utf8; - -insert into t1 values (1, repeat(_utf8 0xe288ab6474, 200)); ---error ER_DUP_ENTRY -insert into t1 values (2, repeat(_utf8 0xe288ab6474, 200)); -select a, sha1(b) from t1; - -# perl -e 'print pack("H2000","e288ab6474"x200)' | sha1sum - -drop table t1; - -# bug#21873 MySQLD Crash on ALTER...ADD..UNIQUE..USING HASH statement for NDB backed table - -create table t1(id int not null) engine = NDB; - -alter table t1 add constraint uk_test unique (id) using hash; - -drop table t1; - -# End of 4.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_insert.test b/mysql-test/suite/ndb/t/ndb_insert.test deleted file mode 100644 index d659f8357f2..00000000000 --- a/mysql-test/suite/ndb/t/ndb_insert.test +++ /dev/null @@ -1,641 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - -# -# Basic test of INSERT in NDB -# - -# -# Create a normal table with primary key -# -CREATE TABLE t1 ( - pk1 INT NOT NULL PRIMARY KEY, - b INT NOT NULL, - c INT NOT NULL -) ENGINE=ndbcluster; - -INSERT INTO t1 VALUES (0, 0, 0); -SELECT * FROM t1; - -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10), -(11,11,11),(12,12,12),(13,13,13),(14,14,14),(15,15,15), -(16,16,16),(17,17,17),(18,18,18),(19,19,19),(20,20,20), -(21,21,21),(22,22,22),(23,23,23),(24,24,24),(25,25,25), -(26,26,26),(27,27,27),(28,28,28),(29,29,29),(30,30,30), -(31,31,31),(32,32,32),(33,33,33),(34,34,34),(35,35,35), -(36,36,36),(37,37,37),(38,38,38),(39,39,39),(40,40,40), -(41,41,41),(42,42,42),(43,43,43),(44,44,44),(45,45,45), -(46,46,46),(47,47,47),(48,48,48),(49,49,49),(50,50,50), -(51,51,51),(52,52,52),(53,53,53),(54,54,54),(55,55,55), -(56,56,56),(57,57,57),(58,58,58),(59,59,59),(60,60,60), -(61,61,61),(62,62,62),(63,63,63),(64,64,64),(65,65,65), -(66,66,66),(67,67,67),(68,68,68),(69,69,69),(70,70,70), -(71,71,71),(72,72,72),(73,73,73),(74,74,74),(75,75,75), -(76,76,76),(77,77,77),(78,78,78),(79,79,79),(80,80,80), -(81,81,81),(82,82,82),(83,83,83),(84,84,84),(85,85,85), -(86,86,86),(87,87,87),(88,88,88),(89,89,89),(90,90,90), -(91,91,91),(92,92,92),(93,93,93),(94,94,94),(95,95,95), -(96,96,96),(97,97,97),(98,98,98),(99,99,99),(100,100,100), -(101,101,101),(102,102,102),(103,103,103),(104,104,104),(105,105,105), -(106,106,106),(107,107,107),(108,108,108),(109,109,109),(110,110,110), -(111,111,111),(112,112,112),(113,113,113),(114,114,114),(115,115,115), -(116,116,116),(117,117,117),(118,118,118),(119,119,119),(120,120,120), -(121,121,121),(122,122,122),(123,123,123),(124,124,124),(125,125,125), -(126,126,126),(127,127,127),(128,128,128),(129,129,129),(130,130,130), -(131,131,131),(132,132,132),(133,133,133),(134,134,134),(135,135,135), -(136,136,136),(137,137,137),(138,138,138),(139,139,139),(140,140,140), -(141,141,141),(142,142,142),(143,143,143),(144,144,144),(145,145,145), -(146,146,146),(147,147,147),(148,148,148),(149,149,149),(150,150,150), -(151,151,151),(152,152,152),(153,153,153),(154,154,154),(155,155,155), -(156,156,156),(157,157,157),(158,158,158),(159,159,159),(160,160,160), -(161,161,161),(162,162,162),(163,163,163),(164,164,164),(165,165,165), -(166,166,166),(167,167,167),(168,168,168),(169,169,169),(170,170,170), -(171,171,171),(172,172,172),(173,173,173),(174,174,174),(175,175,175), -(176,176,176),(177,177,177),(178,178,178),(179,179,179),(180,180,180), -(181,181,181),(182,182,182),(183,183,183),(184,184,184),(185,185,185), -(186,186,186),(187,187,187),(188,188,188),(189,189,189),(190,190,190), -(191,191,191),(192,192,192),(193,193,193),(194,194,194),(195,195,195), -(196,196,196),(197,197,197),(198,198,198),(199,199,199),(200,200,200), -(201,201,201),(202,202,202),(203,203,203),(204,204,204),(205,205,205), -(206,206,206),(207,207,207),(208,208,208),(209,209,209),(210,210,210), -(211,211,211),(212,212,212),(213,213,213),(214,214,214),(215,215,215), -(216,216,216),(217,217,217),(218,218,218),(219,219,219),(220,220,220), -(221,221,221),(222,222,222),(223,223,223),(224,224,224),(225,225,225), -(226,226,226),(227,227,227),(228,228,228),(229,229,229),(230,230,230), -(231,231,231),(232,232,232),(233,233,233),(234,234,234),(235,235,235), -(236,236,236),(237,237,237),(238,238,238),(239,239,239),(240,240,240), -(241,241,241),(242,242,242),(243,243,243),(244,244,244),(245,245,245), -(246,246,246),(247,247,247),(248,248,248),(249,249,249),(250,250,250), -(251,251,251),(252,252,252),(253,253,253),(254,254,254),(255,255,255), -(256,256,256),(257,257,257),(258,258,258),(259,259,259),(260,260,260), -(261,261,261),(262,262,262),(263,263,263),(264,264,264),(265,265,265), -(266,266,266),(267,267,267),(268,268,268),(269,269,269),(270,270,270), -(271,271,271),(272,272,272),(273,273,273),(274,274,274),(275,275,275), -(276,276,276),(277,277,277),(278,278,278),(279,279,279),(280,280,280), -(281,281,281),(282,282,282),(283,283,283),(284,284,284),(285,285,285), -(286,286,286),(287,287,287),(288,288,288),(289,289,289),(290,290,290), -(291,291,291),(292,292,292),(293,293,293),(294,294,294),(295,295,295), -(296,296,296),(297,297,297),(298,298,298),(299,299,299),(300,300,300), -(301,301,301),(302,302,302),(303,303,303),(304,304,304),(305,305,305), -(306,306,306),(307,307,307),(308,308,308),(309,309,309),(310,310,310), -(311,311,311),(312,312,312),(313,313,313),(314,314,314),(315,315,315), -(316,316,316),(317,317,317),(318,318,318),(319,319,319),(320,320,320), -(321,321,321),(322,322,322),(323,323,323),(324,324,324),(325,325,325), -(326,326,326),(327,327,327),(328,328,328),(329,329,329),(330,330,330), -(331,331,331),(332,332,332),(333,333,333),(334,334,334),(335,335,335), -(336,336,336),(337,337,337),(338,338,338),(339,339,339),(340,340,340), -(341,341,341),(342,342,342),(343,343,343),(344,344,344),(345,345,345), -(346,346,346),(347,347,347),(348,348,348),(349,349,349),(350,350,350), -(351,351,351),(352,352,352),(353,353,353),(354,354,354),(355,355,355), -(356,356,356),(357,357,357),(358,358,358),(359,359,359),(360,360,360), -(361,361,361),(362,362,362),(363,363,363),(364,364,364),(365,365,365), -(366,366,366),(367,367,367),(368,368,368),(369,369,369),(370,370,370), -(371,371,371),(372,372,372),(373,373,373),(374,374,374),(375,375,375), -(376,376,376),(377,377,377),(378,378,378),(379,379,379),(380,380,380), -(381,381,381),(382,382,382),(383,383,383),(384,384,384),(385,385,385), -(386,386,386),(387,387,387),(388,388,388),(389,389,389),(390,390,390), -(391,391,391),(392,392,392),(393,393,393),(394,394,394),(395,395,395), -(396,396,396),(397,397,397),(398,398,398),(399,399,399),(400,400,400), -(401,401,401),(402,402,402),(403,403,403),(404,404,404),(405,405,405), -(406,406,406),(407,407,407),(408,408,408),(409,409,409),(410,410,410), -(411,411,411),(412,412,412),(413,413,413),(414,414,414),(415,415,415), -(416,416,416),(417,417,417),(418,418,418),(419,419,419),(420,420,420), -(421,421,421),(422,422,422),(423,423,423),(424,424,424),(425,425,425), -(426,426,426),(427,427,427),(428,428,428),(429,429,429),(430,430,430), -(431,431,431),(432,432,432),(433,433,433),(434,434,434),(435,435,435), -(436,436,436),(437,437,437),(438,438,438),(439,439,439),(440,440,440), -(441,441,441),(442,442,442),(443,443,443),(444,444,444),(445,445,445), -(446,446,446),(447,447,447),(448,448,448),(449,449,449),(450,450,450), -(451,451,451),(452,452,452),(453,453,453),(454,454,454),(455,455,455), -(456,456,456),(457,457,457),(458,458,458),(459,459,459),(460,460,460), -(461,461,461),(462,462,462),(463,463,463),(464,464,464),(465,465,465), -(466,466,466),(467,467,467),(468,468,468),(469,469,469),(470,470,470), -(471,471,471),(472,472,472),(473,473,473),(474,474,474),(475,475,475), -(476,476,476),(477,477,477),(478,478,478),(479,479,479),(480,480,480), -(481,481,481),(482,482,482),(483,483,483),(484,484,484),(485,485,485), -(486,486,486),(487,487,487),(488,488,488),(489,489,489),(490,490,490), -(491,491,491),(492,492,492),(493,493,493),(494,494,494),(495,495,495), -(496,496,496),(497,497,497),(498,498,498),(499,499,499),(500, 500, 500); - -SELECT COUNT(*) FROM t1; - -INSERT INTO t1 VALUES -(501,501,501),(502,502,502),(503,503,503),(504,504,504),(505,505,505), -(506,506,506),(507,507,507),(508,508,508),(509,509,509),(510,510,510), -(511,511,511),(512,512,512),(513,513,513),(514,514,514),(515,515,515), -(516,516,516),(517,517,517),(518,518,518),(519,519,519),(520,520,520), -(521,521,521),(522,522,522),(523,523,523),(524,524,524),(525,525,525), -(526,526,526),(527,527,527),(528,528,528),(529,529,529),(530,530,530), -(531,531,531),(532,532,532),(533,533,533),(534,534,534),(535,535,535), -(536,536,536),(537,537,537),(538,538,538),(539,539,539),(540,540,540), -(541,541,541),(542,542,542),(543,543,543),(544,544,544),(545,545,545), -(546,546,546),(547,547,547),(548,548,548),(549,549,549),(550,550,550), -(551,551,551),(552,552,552),(553,553,553),(554,554,554),(555,555,555), -(556,556,556),(557,557,557),(558,558,558),(559,559,559),(560,560,560), -(561,561,561),(562,562,562),(563,563,563),(564,564,564),(565,565,565), -(566,566,566),(567,567,567),(568,568,568),(569,569,569),(570,570,570), -(571,571,571),(572,572,572),(573,573,573),(574,574,574),(575,575,575), -(576,576,576),(577,577,577),(578,578,578),(579,579,579),(580,580,580), -(581,581,581),(582,582,582),(583,583,583),(584,584,584),(585,585,585), -(586,586,586),(587,587,587),(588,588,588),(589,589,589),(590,590,590), -(591,591,591),(592,592,592),(593,593,593),(594,594,594),(595,595,595), -(596,596,596),(597,597,597),(598,598,598),(599,599,599),(600,600,600), -(601,601,601),(602,602,602),(603,603,603),(604,604,604),(605,605,605), -(606,606,606),(607,607,607),(608,608,608),(609,609,609),(610,610,610), -(611,611,611),(612,612,612),(613,613,613),(614,614,614),(615,615,615), -(616,616,616),(617,617,617),(618,618,618),(619,619,619),(620,620,620), -(621,621,621),(622,622,622),(623,623,623),(624,624,624),(625,625,625), -(626,626,626),(627,627,627),(628,628,628),(629,629,629),(630,630,630), -(631,631,631),(632,632,632),(633,633,633),(634,634,634),(635,635,635), -(636,636,636),(637,637,637),(638,638,638),(639,639,639),(640,640,640), -(641,641,641),(642,642,642),(643,643,643),(644,644,644),(645,645,645), -(646,646,646),(647,647,647),(648,648,648),(649,649,649),(650,650,650), -(651,651,651),(652,652,652),(653,653,653),(654,654,654),(655,655,655), -(656,656,656),(657,657,657),(658,658,658),(659,659,659),(660,660,660), -(661,661,661),(662,662,662),(663,663,663),(664,664,664),(665,665,665), -(666,666,666),(667,667,667),(668,668,668),(669,669,669),(670,670,670), -(671,671,671),(672,672,672),(673,673,673),(674,674,674),(675,675,675), -(676,676,676),(677,677,677),(678,678,678),(679,679,679),(680,680,680), -(681,681,681),(682,682,682),(683,683,683),(684,684,684),(685,685,685), -(686,686,686),(687,687,687),(688,688,688),(689,689,689),(690,690,690), -(691,691,691),(692,692,692),(693,693,693),(694,694,694),(695,695,695), -(696,696,696),(697,697,697),(698,698,698),(699,699,699),(700,700,700), -(701,701,701),(702,702,702),(703,703,703),(704,704,704),(705,705,705), -(706,706,706),(707,707,707),(708,708,708),(709,709,709),(710,710,710), -(711,711,711),(712,712,712),(713,713,713),(714,714,714),(715,715,715), -(716,716,716),(717,717,717),(718,718,718),(719,719,719),(720,720,720), -(721,721,721),(722,722,722),(723,723,723),(724,724,724),(725,725,725), -(726,726,726),(727,727,727),(728,728,728),(729,729,729),(730,730,730), -(731,731,731),(732,732,732),(733,733,733),(734,734,734),(735,735,735), -(736,736,736),(737,737,737),(738,738,738),(739,739,739),(740,740,740), -(741,741,741),(742,742,742),(743,743,743),(744,744,744),(745,745,745), -(746,746,746),(747,747,747),(748,748,748),(749,749,749),(750,750,750), -(751,751,751),(752,752,752),(753,753,753),(754,754,754),(755,755,755), -(756,756,756),(757,757,757),(758,758,758),(759,759,759),(760,760,760), -(761,761,761),(762,762,762),(763,763,763),(764,764,764),(765,765,765), -(766,766,766),(767,767,767),(768,768,768),(769,769,769),(770,770,770), -(771,771,771),(772,772,772),(773,773,773),(774,774,774),(775,775,775), -(776,776,776),(777,777,777),(778,778,778),(779,779,779),(780,780,780), -(781,781,781),(782,782,782),(783,783,783),(784,784,784),(785,785,785), -(786,786,786),(787,787,787),(788,788,788),(789,789,789),(790,790,790), -(791,791,791),(792,792,792),(793,793,793),(794,794,794),(795,795,795), -(796,796,796),(797,797,797),(798,798,798),(799,799,799),(800,800,800), -(801,801,801),(802,802,802),(803,803,803),(804,804,804),(805,805,805), -(806,806,806),(807,807,807),(808,808,808),(809,809,809),(810,810,810), -(811,811,811),(812,812,812),(813,813,813),(814,814,814),(815,815,815), -(816,816,816),(817,817,817),(818,818,818),(819,819,819),(820,820,820), -(821,821,821),(822,822,822),(823,823,823),(824,824,824),(825,825,825), -(826,826,826),(827,827,827),(828,828,828),(829,829,829),(830,830,830), -(831,831,831),(832,832,832),(833,833,833),(834,834,834),(835,835,835), -(836,836,836),(837,837,837),(838,838,838),(839,839,839),(840,840,840), -(841,841,841),(842,842,842),(843,843,843),(844,844,844),(845,845,845), -(846,846,846),(847,847,847),(848,848,848),(849,849,849),(850,850,850), -(851,851,851),(852,852,852),(853,853,853),(854,854,854),(855,855,855), -(856,856,856),(857,857,857),(858,858,858),(859,859,859),(860,860,860), -(861,861,861),(862,862,862),(863,863,863),(864,864,864),(865,865,865), -(866,866,866),(867,867,867),(868,868,868),(869,869,869),(870,870,870), -(871,871,871),(872,872,872),(873,873,873),(874,874,874),(875,875,875), -(876,876,876),(877,877,877),(878,878,878),(879,879,879),(880,880,880), -(881,881,881),(882,882,882),(883,883,883),(884,884,884),(885,885,885), -(886,886,886),(887,887,887),(888,888,888),(889,889,889),(890,890,890), -(891,891,891),(892,892,892),(893,893,893),(894,894,894),(895,895,895), -(896,896,896),(897,897,897),(898,898,898),(899,899,899),(900,900,900), -(901,901,901),(902,902,902),(903,903,903),(904,904,904),(905,905,905), -(906,906,906),(907,907,907),(908,908,908),(909,909,909),(910,910,910), -(911,911,911),(912,912,912),(913,913,913),(914,914,914),(915,915,915), -(916,916,916),(917,917,917),(918,918,918),(919,919,919),(920,920,920), -(921,921,921),(922,922,922),(923,923,923),(924,924,924),(925,925,925), -(926,926,926),(927,927,927),(928,928,928),(929,929,929),(930,930,930), -(931,931,931),(932,932,932),(933,933,933),(934,934,934),(935,935,935), -(936,936,936),(937,937,937),(938,938,938),(939,939,939),(940,940,940), -(941,941,941),(942,942,942),(943,943,943),(944,944,944),(945,945,945), -(946,946,946),(947,947,947),(948,948,948),(949,949,949),(950,950,950), -(951,951,951),(952,952,952),(953,953,953),(954,954,954),(955,955,955), -(956,956,956),(957,957,957),(958,958,958),(959,959,959),(960,960,960), -(961,961,961),(962,962,962),(963,963,963),(964,964,964),(965,965,965), -(966,966,966),(967,967,967),(968,968,968),(969,969,969),(970,970,970), -(971,971,971),(972,972,972),(973,973,973),(974,974,974),(975,975,975), -(976,976,976),(977,977,977),(978,978,978),(979,979,979),(980,980,980), -(981,981,981),(982,982,982),(983,983,983),(984,984,984),(985,985,985), -(986,986,986),(987,987,987),(988,988,988),(989,989,989),(990,990,990), -(991,991,991),(992,992,992),(993,993,993),(994,994,994),(995,995,995), -(996,996,996),(997,997,997),(998,998,998),(999,999,999),(1000,1000,1000), -(1001,1001,1001),(1002,1002,1002),(1003,1003,1003),(1004,1004,1004),(1005,1005,1005), -(1006,1006,1006),(1007,1007,1007),(1008,1008,1008),(1009,1009,1009),(1010,1010,1010), -(1011,1011,1011),(1012,1012,1012),(1013,1013,1013),(1014,1014,1014),(1015,1015,1015), -(1016,1016,1016),(1017,1017,1017),(1018,1018,1018),(1019,1019,1019),(1020,1020,1020), -(1021,1021,1021),(1022,1022,1022),(1023,1023,1023),(1024,1024,1024),(1025,1025,1025), -(1026,1026,1026),(1027,1027,1027),(1028,1028,1028),(1029,1029,1029),(1030,1030,1030), -(1031,1031,1031),(1032,1032,1032),(1033,1033,1033),(1034,1034,1034),(1035,1035,1035), -(1036,1036,1036),(1037,1037,1037),(1038,1038,1038),(1039,1039,1039),(1040,1040,1040), -(1041,1041,1041),(1042,1042,1042),(1043,1043,1043),(1044,1044,1044),(1045,1045,1045), -(1046,1046,1046),(1047,1047,1047),(1048,1048,1048),(1049,1049,1049),(1050,1050,1050), -(1051,1051,1051),(1052,1052,1052),(1053,1053,1053),(1054,1054,1054),(1055,1055,1055), -(1056,1056,1056),(1057,1057,1057),(1058,1058,1058),(1059,1059,1059),(1060,1060,1060), -(1061,1061,1061),(1062,1062,1062),(1063,1063,1063),(1064,1064,1064),(1065,1065,1065), -(1066,1066,1066),(1067,1067,1067),(1068,1068,1068),(1069,1069,1069),(1070,1070,1070), -(1071,1071,1071),(1072,1072,1072),(1073,1073,1073),(1074,1074,1074),(1075,1075,1075), -(1076,1076,1076),(1077,1077,1077),(1078,1078,1078),(1079,1079,1079),(1080,1080,1080), -(1081,1081,1081),(1082,1082,1082),(1083,1083,1083),(1084,1084,1084),(1085,1085,1085), -(1086,1086,1086),(1087,1087,1087),(1088,1088,1088),(1089,1089,1089),(1090,1090,1090), -(1091,1091,1091),(1092,1092,1092),(1093,1093,1093),(1094,1094,1094),(1095,1095,1095), -(1096,1096,1096),(1097,1097,1097),(1098,1098,1098),(1099,1099,1099),(1100,1100,1100), -(1101,1101,1101),(1102,1102,1102),(1103,1103,1103),(1104,1104,1104),(1105,1105,1105), -(1106,1106,1106),(1107,1107,1107),(1108,1108,1108),(1109,1109,1109),(1110,1110,1110), -(1111,1111,1111),(1112,1112,1112),(1113,1113,1113),(1114,1114,1114),(1115,1115,1115), -(1116,1116,1116),(1117,1117,1117),(1118,1118,1118),(1119,1119,1119),(1120,1120,1120), -(1121,1121,1121),(1122,1122,1122),(1123,1123,1123),(1124,1124,1124),(1125,1125,1125), -(1126,1126,1126),(1127,1127,1127),(1128,1128,1128),(1129,1129,1129),(1130,1130,1130), -(1131,1131,1131),(1132,1132,1132),(1133,1133,1133),(1134,1134,1134),(1135,1135,1135), -(1136,1136,1136),(1137,1137,1137),(1138,1138,1138),(1139,1139,1139),(1140,1140,1140), -(1141,1141,1141),(1142,1142,1142),(1143,1143,1143),(1144,1144,1144),(1145,1145,1145), -(1146,1146,1146),(1147,1147,1147),(1148,1148,1148),(1149,1149,1149),(1150,1150,1150), -(1151,1151,1151),(1152,1152,1152),(1153,1153,1153),(1154,1154,1154),(1155,1155,1155), -(1156,1156,1156),(1157,1157,1157),(1158,1158,1158),(1159,1159,1159),(1160,1160,1160), -(1161,1161,1161),(1162,1162,1162),(1163,1163,1163),(1164,1164,1164),(1165,1165,1165), -(1166,1166,1166),(1167,1167,1167),(1168,1168,1168),(1169,1169,1169),(1170,1170,1170), -(1171,1171,1171),(1172,1172,1172),(1173,1173,1173),(1174,1174,1174),(1175,1175,1175), -(1176,1176,1176),(1177,1177,1177),(1178,1178,1178),(1179,1179,1179),(1180,1180,1180), -(1181,1181,1181),(1182,1182,1182),(1183,1183,1183),(1184,1184,1184),(1185,1185,1185), -(1186,1186,1186),(1187,1187,1187),(1188,1188,1188),(1189,1189,1189),(1190,1190,1190), -(1191,1191,1191),(1192,1192,1192),(1193,1193,1193),(1194,1194,1194),(1195,1195,1195), -(1196,1196,1196),(1197,1197,1197),(1198,1198,1198),(1199,1199,1199),(1200,1200,1200), -(1201,1201,1201),(1202,1202,1202),(1203,1203,1203),(1204,1204,1204),(1205,1205,1205), -(1206,1206,1206),(1207,1207,1207),(1208,1208,1208),(1209,1209,1209),(1210,1210,1210), -(1211,1211,1211),(1212,1212,1212),(1213,1213,1213),(1214,1214,1214),(1215,1215,1215), -(1216,1216,1216),(1217,1217,1217),(1218,1218,1218),(1219,1219,1219),(1220,1220,1220), -(1221,1221,1221),(1222,1222,1222),(1223,1223,1223),(1224,1224,1224),(1225,1225,1225), -(1226,1226,1226),(1227,1227,1227),(1228,1228,1228),(1229,1229,1229),(1230,1230,1230), -(1231,1231,1231),(1232,1232,1232),(1233,1233,1233),(1234,1234,1234),(1235,1235,1235), -(1236,1236,1236),(1237,1237,1237),(1238,1238,1238),(1239,1239,1239),(1240,1240,1240), -(1241,1241,1241),(1242,1242,1242),(1243,1243,1243),(1244,1244,1244),(1245,1245,1245), -(1246,1246,1246),(1247,1247,1247),(1248,1248,1248),(1249,1249,1249),(1250,1250,1250), -(1251,1251,1251),(1252,1252,1252),(1253,1253,1253),(1254,1254,1254),(1255,1255,1255), -(1256,1256,1256),(1257,1257,1257),(1258,1258,1258),(1259,1259,1259),(1260,1260,1260), -(1261,1261,1261),(1262,1262,1262),(1263,1263,1263),(1264,1264,1264),(1265,1265,1265), -(1266,1266,1266),(1267,1267,1267),(1268,1268,1268),(1269,1269,1269),(1270,1270,1270), -(1271,1271,1271),(1272,1272,1272),(1273,1273,1273),(1274,1274,1274),(1275,1275,1275), -(1276,1276,1276),(1277,1277,1277),(1278,1278,1278),(1279,1279,1279),(1280,1280,1280), -(1281,1281,1281),(1282,1282,1282),(1283,1283,1283),(1284,1284,1284),(1285,1285,1285), -(1286,1286,1286),(1287,1287,1287),(1288,1288,1288),(1289,1289,1289),(1290,1290,1290), -(1291,1291,1291),(1292,1292,1292),(1293,1293,1293),(1294,1294,1294),(1295,1295,1295), -(1296,1296,1296),(1297,1297,1297),(1298,1298,1298),(1299,1299,1299),(1300,1300,1300), -(1301,1301,1301),(1302,1302,1302),(1303,1303,1303),(1304,1304,1304),(1305,1305,1305), -(1306,1306,1306),(1307,1307,1307),(1308,1308,1308),(1309,1309,1309),(1310,1310,1310), -(1311,1311,1311),(1312,1312,1312),(1313,1313,1313),(1314,1314,1314),(1315,1315,1315), -(1316,1316,1316),(1317,1317,1317),(1318,1318,1318),(1319,1319,1319),(1320,1320,1320), -(1321,1321,1321),(1322,1322,1322),(1323,1323,1323),(1324,1324,1324),(1325,1325,1325), -(1326,1326,1326),(1327,1327,1327),(1328,1328,1328),(1329,1329,1329),(1330,1330,1330), -(1331,1331,1331),(1332,1332,1332),(1333,1333,1333),(1334,1334,1334),(1335,1335,1335), -(1336,1336,1336),(1337,1337,1337),(1338,1338,1338),(1339,1339,1339),(1340,1340,1340), -(1341,1341,1341),(1342,1342,1342),(1343,1343,1343),(1344,1344,1344),(1345,1345,1345), -(1346,1346,1346),(1347,1347,1347),(1348,1348,1348),(1349,1349,1349),(1350,1350,1350), -(1351,1351,1351),(1352,1352,1352),(1353,1353,1353),(1354,1354,1354),(1355,1355,1355), -(1356,1356,1356),(1357,1357,1357),(1358,1358,1358),(1359,1359,1359),(1360,1360,1360), -(1361,1361,1361),(1362,1362,1362),(1363,1363,1363),(1364,1364,1364),(1365,1365,1365), -(1366,1366,1366),(1367,1367,1367),(1368,1368,1368),(1369,1369,1369),(1370,1370,1370), -(1371,1371,1371),(1372,1372,1372),(1373,1373,1373),(1374,1374,1374),(1375,1375,1375), -(1376,1376,1376),(1377,1377,1377),(1378,1378,1378),(1379,1379,1379),(1380,1380,1380), -(1381,1381,1381),(1382,1382,1382),(1383,1383,1383),(1384,1384,1384),(1385,1385,1385), -(1386,1386,1386),(1387,1387,1387),(1388,1388,1388),(1389,1389,1389),(1390,1390,1390), -(1391,1391,1391),(1392,1392,1392),(1393,1393,1393),(1394,1394,1394),(1395,1395,1395), -(1396,1396,1396),(1397,1397,1397),(1398,1398,1398),(1399,1399,1399),(1400,1400,1400), -(1401,1401,1401),(1402,1402,1402),(1403,1403,1403),(1404,1404,1404),(1405,1405,1405), -(1406,1406,1406),(1407,1407,1407),(1408,1408,1408),(1409,1409,1409),(1410,1410,1410), -(1411,1411,1411),(1412,1412,1412),(1413,1413,1413),(1414,1414,1414),(1415,1415,1415), -(1416,1416,1416),(1417,1417,1417),(1418,1418,1418),(1419,1419,1419),(1420,1420,1420), -(1421,1421,1421),(1422,1422,1422),(1423,1423,1423),(1424,1424,1424),(1425,1425,1425), -(1426,1426,1426),(1427,1427,1427),(1428,1428,1428),(1429,1429,1429),(1430,1430,1430), -(1431,1431,1431),(1432,1432,1432),(1433,1433,1433),(1434,1434,1434),(1435,1435,1435), -(1436,1436,1436),(1437,1437,1437),(1438,1438,1438),(1439,1439,1439),(1440,1440,1440), -(1441,1441,1441),(1442,1442,1442),(1443,1443,1443),(1444,1444,1444),(1445,1445,1445), -(1446,1446,1446),(1447,1447,1447),(1448,1448,1448),(1449,1449,1449),(1450,1450,1450), -(1451,1451,1451),(1452,1452,1452),(1453,1453,1453),(1454,1454,1454),(1455,1455,1455), -(1456,1456,1456),(1457,1457,1457),(1458,1458,1458),(1459,1459,1459),(1460,1460,1460), -(1461,1461,1461),(1462,1462,1462),(1463,1463,1463),(1464,1464,1464),(1465,1465,1465), -(1466,1466,1466),(1467,1467,1467),(1468,1468,1468),(1469,1469,1469),(1470,1470,1470), -(1471,1471,1471),(1472,1472,1472),(1473,1473,1473),(1474,1474,1474),(1475,1475,1475), -(1476,1476,1476),(1477,1477,1477),(1478,1478,1478),(1479,1479,1479),(1480,1480,1480), -(1481,1481,1481),(1482,1482,1482),(1483,1483,1483),(1484,1484,1484),(1485,1485,1485), -(1486,1486,1486),(1487,1487,1487),(1488,1488,1488),(1489,1489,1489),(1490,1490,1490), -(1491,1491,1491),(1492,1492,1492),(1493,1493,1493),(1494,1494,1494),(1495,1495,1495), -(1496,1496,1496),(1497,1497,1497),(1498,1498,1498),(1499,1499,1499),(1500,1500,1500), -(1501,1501,1501),(1502,1502,1502),(1503,1503,1503),(1504,1504,1504),(1505,1505,1505), -(1506,1506,1506),(1507,1507,1507),(1508,1508,1508),(1509,1509,1509),(1510,1510,1510), -(1511,1511,1511),(1512,1512,1512),(1513,1513,1513),(1514,1514,1514),(1515,1515,1515), -(1516,1516,1516),(1517,1517,1517),(1518,1518,1518),(1519,1519,1519),(1520,1520,1520), -(1521,1521,1521),(1522,1522,1522),(1523,1523,1523),(1524,1524,1524),(1525,1525,1525), -(1526,1526,1526),(1527,1527,1527),(1528,1528,1528),(1529,1529,1529),(1530,1530,1530), -(1531,1531,1531),(1532,1532,1532),(1533,1533,1533),(1534,1534,1534),(1535,1535,1535), -(1536,1536,1536),(1537,1537,1537),(1538,1538,1538),(1539,1539,1539),(1540,1540,1540), -(1541,1541,1541),(1542,1542,1542),(1543,1543,1543),(1544,1544,1544),(1545,1545,1545), -(1546,1546,1546),(1547,1547,1547),(1548,1548,1548),(1549,1549,1549),(1550,1550,1550), -(1551,1551,1551),(1552,1552,1552),(1553,1553,1553),(1554,1554,1554),(1555,1555,1555), -(1556,1556,1556),(1557,1557,1557),(1558,1558,1558),(1559,1559,1559),(1560,1560,1560), -(1561,1561,1561),(1562,1562,1562),(1563,1563,1563),(1564,1564,1564),(1565,1565,1565), -(1566,1566,1566),(1567,1567,1567),(1568,1568,1568),(1569,1569,1569),(1570,1570,1570), -(1571,1571,1571),(1572,1572,1572),(1573,1573,1573),(1574,1574,1574),(1575,1575,1575), -(1576,1576,1576),(1577,1577,1577),(1578,1578,1578),(1579,1579,1579),(1580,1580,1580), -(1581,1581,1581),(1582,1582,1582),(1583,1583,1583),(1584,1584,1584),(1585,1585,1585), -(1586,1586,1586),(1587,1587,1587),(1588,1588,1588),(1589,1589,1589),(1590,1590,1590), -(1591,1591,1591),(1592,1592,1592),(1593,1593,1593),(1594,1594,1594),(1595,1595,1595), -(1596,1596,1596),(1597,1597,1597),(1598,1598,1598),(1599,1599,1599),(1600,1600,1600), -(1601,1601,1601),(1602,1602,1602),(1603,1603,1603),(1604,1604,1604),(1605,1605,1605), -(1606,1606,1606),(1607,1607,1607),(1608,1608,1608),(1609,1609,1609),(1610,1610,1610), -(1611,1611,1611),(1612,1612,1612),(1613,1613,1613),(1614,1614,1614),(1615,1615,1615), -(1616,1616,1616),(1617,1617,1617),(1618,1618,1618),(1619,1619,1619),(1620,1620,1620), -(1621,1621,1621),(1622,1622,1622),(1623,1623,1623),(1624,1624,1624),(1625,1625,1625), -(1626,1626,1626),(1627,1627,1627),(1628,1628,1628),(1629,1629,1629),(1630,1630,1630), -(1631,1631,1631),(1632,1632,1632),(1633,1633,1633),(1634,1634,1634),(1635,1635,1635), -(1636,1636,1636),(1637,1637,1637),(1638,1638,1638),(1639,1639,1639),(1640,1640,1640), -(1641,1641,1641),(1642,1642,1642),(1643,1643,1643),(1644,1644,1644),(1645,1645,1645), -(1646,1646,1646),(1647,1647,1647),(1648,1648,1648),(1649,1649,1649),(1650,1650,1650), -(1651,1651,1651),(1652,1652,1652),(1653,1653,1653),(1654,1654,1654),(1655,1655,1655), -(1656,1656,1656),(1657,1657,1657),(1658,1658,1658),(1659,1659,1659),(1660,1660,1660), -(1661,1661,1661),(1662,1662,1662),(1663,1663,1663),(1664,1664,1664),(1665,1665,1665), -(1666,1666,1666),(1667,1667,1667),(1668,1668,1668),(1669,1669,1669),(1670,1670,1670), -(1671,1671,1671),(1672,1672,1672),(1673,1673,1673),(1674,1674,1674),(1675,1675,1675), -(1676,1676,1676),(1677,1677,1677),(1678,1678,1678),(1679,1679,1679),(1680,1680,1680), -(1681,1681,1681),(1682,1682,1682),(1683,1683,1683),(1684,1684,1684),(1685,1685,1685), -(1686,1686,1686),(1687,1687,1687),(1688,1688,1688),(1689,1689,1689),(1690,1690,1690), -(1691,1691,1691),(1692,1692,1692),(1693,1693,1693),(1694,1694,1694),(1695,1695,1695), -(1696,1696,1696),(1697,1697,1697),(1698,1698,1698),(1699,1699,1699),(1700,1700,1700), -(1701,1701,1701),(1702,1702,1702),(1703,1703,1703),(1704,1704,1704),(1705,1705,1705), -(1706,1706,1706),(1707,1707,1707),(1708,1708,1708),(1709,1709,1709),(1710,1710,1710), -(1711,1711,1711),(1712,1712,1712),(1713,1713,1713),(1714,1714,1714),(1715,1715,1715), -(1716,1716,1716),(1717,1717,1717),(1718,1718,1718),(1719,1719,1719),(1720,1720,1720), -(1721,1721,1721),(1722,1722,1722),(1723,1723,1723),(1724,1724,1724),(1725,1725,1725), -(1726,1726,1726),(1727,1727,1727),(1728,1728,1728),(1729,1729,1729),(1730,1730,1730), -(1731,1731,1731),(1732,1732,1732),(1733,1733,1733),(1734,1734,1734),(1735,1735,1735), -(1736,1736,1736),(1737,1737,1737),(1738,1738,1738),(1739,1739,1739),(1740,1740,1740), -(1741,1741,1741),(1742,1742,1742),(1743,1743,1743),(1744,1744,1744),(1745,1745,1745), -(1746,1746,1746),(1747,1747,1747),(1748,1748,1748),(1749,1749,1749),(1750,1750,1750), -(1751,1751,1751),(1752,1752,1752),(1753,1753,1753),(1754,1754,1754),(1755,1755,1755), -(1756,1756,1756),(1757,1757,1757),(1758,1758,1758),(1759,1759,1759),(1760,1760,1760), -(1761,1761,1761),(1762,1762,1762),(1763,1763,1763),(1764,1764,1764),(1765,1765,1765), -(1766,1766,1766),(1767,1767,1767),(1768,1768,1768),(1769,1769,1769),(1770,1770,1770), -(1771,1771,1771),(1772,1772,1772),(1773,1773,1773),(1774,1774,1774),(1775,1775,1775), -(1776,1776,1776),(1777,1777,1777),(1778,1778,1778),(1779,1779,1779),(1780,1780,1780), -(1781,1781,1781),(1782,1782,1782),(1783,1783,1783),(1784,1784,1784),(1785,1785,1785), -(1786,1786,1786),(1787,1787,1787),(1788,1788,1788),(1789,1789,1789),(1790,1790,1790), -(1791,1791,1791),(1792,1792,1792),(1793,1793,1793),(1794,1794,1794),(1795,1795,1795), -(1796,1796,1796),(1797,1797,1797),(1798,1798,1798),(1799,1799,1799),(1800,1800,1800), -(1801,1801,1801),(1802,1802,1802),(1803,1803,1803),(1804,1804,1804),(1805,1805,1805), -(1806,1806,1806),(1807,1807,1807),(1808,1808,1808),(1809,1809,1809),(1810,1810,1810), -(1811,1811,1811),(1812,1812,1812),(1813,1813,1813),(1814,1814,1814),(1815,1815,1815), -(1816,1816,1816),(1817,1817,1817),(1818,1818,1818),(1819,1819,1819),(1820,1820,1820), -(1821,1821,1821),(1822,1822,1822),(1823,1823,1823),(1824,1824,1824),(1825,1825,1825), -(1826,1826,1826),(1827,1827,1827),(1828,1828,1828),(1829,1829,1829),(1830,1830,1830), -(1831,1831,1831),(1832,1832,1832),(1833,1833,1833),(1834,1834,1834),(1835,1835,1835), -(1836,1836,1836),(1837,1837,1837),(1838,1838,1838),(1839,1839,1839),(1840,1840,1840), -(1841,1841,1841),(1842,1842,1842),(1843,1843,1843),(1844,1844,1844),(1845,1845,1845), -(1846,1846,1846),(1847,1847,1847),(1848,1848,1848),(1849,1849,1849),(1850,1850,1850), -(1851,1851,1851),(1852,1852,1852),(1853,1853,1853),(1854,1854,1854),(1855,1855,1855), -(1856,1856,1856),(1857,1857,1857),(1858,1858,1858),(1859,1859,1859),(1860,1860,1860), -(1861,1861,1861),(1862,1862,1862),(1863,1863,1863),(1864,1864,1864),(1865,1865,1865), -(1866,1866,1866),(1867,1867,1867),(1868,1868,1868),(1869,1869,1869),(1870,1870,1870), -(1871,1871,1871),(1872,1872,1872),(1873,1873,1873),(1874,1874,1874),(1875,1875,1875), -(1876,1876,1876),(1877,1877,1877),(1878,1878,1878),(1879,1879,1879),(1880,1880,1880), -(1881,1881,1881),(1882,1882,1882),(1883,1883,1883),(1884,1884,1884),(1885,1885,1885), -(1886,1886,1886),(1887,1887,1887),(1888,1888,1888),(1889,1889,1889),(1890,1890,1890), -(1891,1891,1891),(1892,1892,1892),(1893,1893,1893),(1894,1894,1894),(1895,1895,1895), -(1896,1896,1896),(1897,1897,1897),(1898,1898,1898),(1899,1899,1899),(1900,1900,1900), -(1901,1901,1901),(1902,1902,1902),(1903,1903,1903),(1904,1904,1904),(1905,1905,1905), -(1906,1906,1906),(1907,1907,1907),(1908,1908,1908),(1909,1909,1909),(1910,1910,1910), -(1911,1911,1911),(1912,1912,1912),(1913,1913,1913),(1914,1914,1914),(1915,1915,1915), -(1916,1916,1916),(1917,1917,1917),(1918,1918,1918),(1919,1919,1919),(1920,1920,1920), -(1921,1921,1921),(1922,1922,1922),(1923,1923,1923),(1924,1924,1924),(1925,1925,1925), -(1926,1926,1926),(1927,1927,1927),(1928,1928,1928),(1929,1929,1929),(1930,1930,1930), -(1931,1931,1931),(1932,1932,1932),(1933,1933,1933),(1934,1934,1934),(1935,1935,1935), -(1936,1936,1936),(1937,1937,1937),(1938,1938,1938),(1939,1939,1939),(1940,1940,1940), -(1941,1941,1941),(1942,1942,1942),(1943,1943,1943),(1944,1944,1944),(1945,1945,1945), -(1946,1946,1946),(1947,1947,1947),(1948,1948,1948),(1949,1949,1949),(1950,1950,1950), -(1951,1951,1951),(1952,1952,1952),(1953,1953,1953),(1954,1954,1954),(1955,1955,1955), -(1956,1956,1956),(1957,1957,1957),(1958,1958,1958),(1959,1959,1959),(1960,1960,1960), -(1961,1961,1961),(1962,1962,1962),(1963,1963,1963),(1964,1964,1964),(1965,1965,1965), -(1966,1966,1966),(1967,1967,1967),(1968,1968,1968),(1969,1969,1969),(1970,1970,1970), -(1971,1971,1971),(1972,1972,1972),(1973,1973,1973),(1974,1974,1974),(1975,1975,1975), -(1976,1976,1976),(1977,1977,1977),(1978,1978,1978),(1979,1979,1979),(1980,1980,1980), -(1981,1981,1981),(1982,1982,1982),(1983,1983,1983),(1984,1984,1984),(1985,1985,1985), -(1986,1986,1986),(1987,1987,1987),(1988,1988,1988),(1989,1989,1989),(1990,1990,1990), -(1991,1991,1991),(1992,1992,1992),(1993,1993,1993),(1994,1994,1994),(1995,1995,1995), -(1996,1996,1996),(1997,1997,1997),(1998,1998,1998),(1999,1999,1999); - -SELECT COUNT(*) FROM t1; - - -# -# Insert duplicate rows -# ---error ER_DUP_ENTRY -INSERT INTO t1 VALUES (1,1,1); - ---error 1022 -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10); - -select count(*) from t1; - - -# -# Test that select count(*) can see inserts made in the same transaction -# -begin; -SELECT COUNT(*) FROM t1; -INSERT INTO t1 VALUES -(2001,2001,2001),(2002,2002,2002),(2003,2003,2003),(2004,2004,2004),(2005,2005,2005); -SELECT COUNT(*) FROM t1; -rollback; - -# -# Insert duplicate rows, inside transaction -# try to commit -# -begin; - ---error 1022 -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10); - ---error 1296 -commit; - -select * from t1 where pk1=1; -select * from t1 where pk1=10; -select count(*) from t1 where pk1 <= 10 order by pk1; -select count(*) from t1; - - -# -# Insert duplicate rows, inside transaction -# rollback -# -begin; - ---error 1022 -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10); - -rollback; - -select * from t1 where pk1=1; -select * from t1 where pk1=10; -select count(*) from t1 where pk1 <= 10 order by pk1; -select count(*) from t1; - - -# -# Insert duplicate rows, inside transaction -# then try to select, finally rollback -# -begin; - ---error 1022 -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10); ---error 1296 -SELECT * FROM t1 WHERE pk1=10; - -rollback; - -select * from t1 where pk1=1; -select * from t1 where pk1=10; -select count(*) from t1 where pk1 <= 10 order by pk1; -select count(*) from t1; - - -# -# Insert duplicate rows, inside transaction -# then try to select, finally commit -# -begin; - ---error 1022 -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10); - ---error 1296 -SELECT * FROM t1 WHERE pk1=10; - ---error 1296 -SELECT * FROM t1 WHERE pk1=10; - ---error 1296 -commit; - -select * from t1 where pk1=1; -select * from t1 where pk1=10; -select count(*) from t1 where pk1 <= 10 order by pk1; -select count(*) from t1; - - -# -# Insert duplicate rows, inside transaction -# then try to do another insert -# -begin; - ---error 1022 -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10); - ---error 1296 -INSERT INTO t1 values (4000, 40, 44); - -rollback; - -select * from t1 where pk1=1; -select * from t1 where pk1=10; -select count(*) from t1 where pk1 <= 10 order by pk1; -select count(*) from t1; - -# -# Insert duplicate rows using "insert .. select" - -# ---error 1022 -insert into t1 select * from t1 where b < 10 order by pk1; - -DELETE FROM t1 WHERE pk1=2; - -begin; -INSERT IGNORE INTO t1 VALUES(1,2,3),(2,3,4); -select * from t1 where pk1 < 3 order by pk1; -rollback; - -INSERT IGNORE INTO t1 VALUES(1,2,3),(2,3,4); -select * from t1 where pk1 < 3 order by pk1; - -REPLACE INTO t1 values(1, 78, 3); -select * from t1 where pk1=1; - -INSERT INTO t1 VALUES(1,1,1),(3,4,5) ON DUPLICATE KEY UPDATE b=79; -select * from t1 where pk1 < 4 order by pk1; - -INSERT INTO t1 VALUES(1,1,1),(3,4,5) ON DUPLICATE KEY UPDATE b=pk1+c; -select * from t1 where pk1 < 4 order by pk1; - -DELETE FROM t1 WHERE pk1 = 2 OR pk1 = 4 OR pk1 = 6; -INSERT INTO t1 VALUES(1,1,1),(2,2,17),(3,4,5) ON DUPLICATE KEY UPDATE pk1=b; -select * from t1 where pk1 = b and b != c order by pk1; - -# Test handling of duplicate unique -DELETE FROM t1; -CREATE UNIQUE INDEX bi ON t1(b); -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10); -INSERT INTO t1 VALUES(0,1,0),(21,21,21) ON DUPLICATE KEY UPDATE pk1=b+10,b=b+10; -select * from t1 order by pk1; - -DROP TABLE t1; - -# -# Bug #6331: problem with 'insert ignore' -# - -CREATE TABLE t1(a INT) ENGINE=ndb; -INSERT IGNORE INTO t1 VALUES (1); -INSERT IGNORE INTO t1 VALUES (1); -INSERT IGNORE INTO t1 SELECT a FROM t1; -INSERT IGNORE INTO t1 SELECT a FROM t1; -INSERT IGNORE INTO t1 SELECT a FROM t1; -INSERT IGNORE INTO t1 VALUES (1); -INSERT IGNORE INTO t1 VALUES (1); -SELECT * FROM t1 ORDER BY a; -DELETE FROM t1; -CREATE UNIQUE INDEX ai ON t1(a); -INSERT IGNORE INTO t1 VALUES (1); -INSERT IGNORE INTO t1 VALUES (1); -INSERT IGNORE INTO t1 VALUES (NULL),(2); -SELECT * FROM t1 ORDER BY a; -DROP TABLE t1; - -# Ignore and NULL values -CREATE TABLE t1(pk INT NOT NULL PRIMARY KEY, a INT, UNIQUE (a)) ENGINE=ndb; -INSERT IGNORE INTO t1 VALUES (1,1),(2,2),(3,3); -INSERT IGNORE INTO t1 VALUES (4,NULL),(5,NULL),(6,NULL),(7,4); -SELECT * FROM t1 ORDER BY pk; -DROP TABLE t1; - -# -# Bug #27980 INSERT IGNORE wrongly ignores NULLs in unique index -# - -create table t1(a int primary key, b int, unique key(b)) engine=ndb; -insert ignore into t1 values (1,0), (2,0), (2,null), (3,null); -select * from t1 order by a; -drop table t1; -# End of 4.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_limit.test b/mysql-test/suite/ndb/t/ndb_limit.test deleted file mode 100644 index 01613606d66..00000000000 --- a/mysql-test/suite/ndb/t/ndb_limit.test +++ /dev/null @@ -1,85 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t2; ---enable_warnings - - -CREATE TABLE t2 ( - a bigint unsigned NOT NULL PRIMARY KEY, - b int unsigned not null, - c int unsigned -) engine=ndbcluster; - - -# -# insert records into table -# -let $1=1000; -disable_query_log; -while ($1) -{ - eval insert into t2 values($1*10, $1+9, 5*$1), ($1*10+1, $1+10, 7),($1*10+2, $1+10, 7*$1), ($1*10+3, $1+10, 10+$1), ($1*10+4, $1+10, 70*$1), ($1*10+5, $1+10, 7), ($1*10+6, $1+10, 9), ($1*10+7, $1+299, 899), ($1*10+8, $1+10, 12), ($1*10+9, $1+10, 14*$1); - dec $1; -} -enable_query_log; - -select count(*) from t2; - -delete from t2 limit 1; -select count(*) from t2; - -delete from t2 limit 100; -select count(*) from t2; - -delete from t2 limit 1000; -select count(*) from t2; - -update t2 set c=12345678 limit 100; -select count(*) from t2 where c=12345678; -select count(*) from t2 where c=12345678 limit 1000; - -select * from t2 limit 0; - -drop table t2; - -CREATE TABLE `t2` ( - `views` int(11) NOT NULL default '0', - `clicks` int(11) NOT NULL default '0', - `day` date NOT NULL default '0000-00-00', - `hour` tinyint(4) NOT NULL default '0', - `bannerid` smallint(6) NOT NULL default '0', - `zoneid` smallint(6) NOT NULL default '0', - `source` varchar(50) NOT NULL default '', - PRIMARY KEY (`day`,`hour`,`bannerid`,`zoneid`,`source`), - KEY `bannerid_day` (`bannerid`,`day`), - KEY `zoneid` (`zoneid`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; - -INSERT INTO `t2` VALUES -( 1,0,'2004-09-17', 5,100,100,''), -( 1,0,'2004-09-18', 7,100,100,''), -( 17,0,'2004-09-27',20,132,100,''), -( 4,0,'2004-09-16',23,132,100,''), -( 86,0,'2004-09-18', 7,196,196,''), -( 11,0,'2004-09-16',16,132,100,''), -(140,0,'2004-09-18', 0,100,164,''), -( 2,0,'2004-09-17', 7,132,100,''), -(846,0,'2004-09-27',11,132,164,''), -( 1,0,'2004-09-18', 8,132,100,''), -( 22,0,'2004-09-27', 9,164,132,''), -(711,0,'2004-09-27', 9,100,164,''), -( 11,0,'2004-09-18', 0,196,132,''), -( 41,0,'2004-09-27',15,196,132,''), -( 57,0,'2004-09-18', 2,164,196,''); - -SELECT DATE_FORMAT(day, '%Y%m%d') as date, DATE_FORMAT(day, '%d-%m-%Y') -as date_formatted FROM t2 GROUP BY day ORDER BY day DESC; - -SELECT DATE_FORMAT(day, '%Y%m%d') as date, DATE_FORMAT(day, '%d-%m-%Y') -as date_formatted FROM t2 GROUP BY day ORDER BY day DESC LIMIT 2; - -drop table t2; - -# End of 4.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_load.test b/mysql-test/suite/ndb/t/ndb_load.test deleted file mode 100644 index aa48b3dfdcf..00000000000 --- a/mysql-test/suite/ndb/t/ndb_load.test +++ /dev/null @@ -1,24 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - -# -# Basic test for different types of loading data -# - -# should give duplicate key -CREATE TABLE t1 (word CHAR(20) NOT NULL PRIMARY KEY) ENGINE=NDB; ---error 1022 -LOAD DATA INFILE '../../../std_data/words.dat' INTO TABLE t1 ; -DROP TABLE t1; - -# now without a primary key we should be ok -CREATE TABLE t1 (word CHAR(20) NOT NULL) ENGINE=NDB; -LOAD DATA INFILE '../../../std_data/words.dat' INTO TABLE t1 ; -SELECT * FROM t1 ORDER BY word; -DROP TABLE t1; - -# End of 4.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_loaddatalocal.test b/mysql-test/suite/ndb/t/ndb_loaddatalocal.test deleted file mode 100644 index 257a26087b7..00000000000 --- a/mysql-test/suite/ndb/t/ndb_loaddatalocal.test +++ /dev/null @@ -1,71 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - -create table t1(a int) engine=myisam; -let $1=10000; -disable_query_log; -set SQL_LOG_BIN=0; -while ($1) -{ - insert into t1 values(1); - dec $1; -} -set SQL_LOG_BIN=1; -let $MYSQLD_DATADIR= `select @@datadir`; -enable_query_log; ---replace_result $MYSQLD_DATADIR MYSQLD_DATADIR -eval select * into outfile '$MYSQLD_DATADIR/ndb_loaddatalocal.select_outfile' from t1; -#This will generate a 20KB file, now test LOAD DATA LOCAL -drop table t1; - -create table t1(a int) engine=ndb; ---replace_result $MYSQLD_DATADIR MYSQLD_DATADIR -eval load data local infile '$MYSQLD_DATADIR/ndb_loaddatalocal.select_outfile' into table t1; -select count(*) from t1; ---remove_file $MYSQLD_DATADIR/ndb_loaddatalocal.select_outfile -drop table t1; - -create table t1(a int) engine=myisam; -insert into t1 values (1), (2), (2), (3); ---replace_result $MYSQLD_DATADIR MYSQLD_DATADIR -eval select * into outfile '$MYSQLD_DATADIR/ndb_loaddatalocal.select_outfile' from t1; -drop table t1; - -create table t1(a int primary key) engine=ndb; ---replace_result $MYSQLD_DATADIR MYSQLD_DATADIR -eval load data local infile '$MYSQLD_DATADIR/ndb_loaddatalocal.select_outfile' into table t1; ---remove_file $MYSQLD_DATADIR/ndb_loaddatalocal.select_outfile -select * from t1 order by a; -drop table t1; - -create table t1(a int) engine=myisam; -insert into t1 values (1), (1), (2), (3); ---replace_result $MYSQLD_DATADIR MYSQLD_DATADIR -eval select * into outfile '$MYSQLD_DATADIR/ndb_loaddatalocal.select_outfile' from t1; -drop table t1; - -create table t1(a int primary key) engine=ndb; ---replace_result $MYSQLD_DATADIR MYSQLD_DATADIR -eval load data local infile '$MYSQLD_DATADIR/ndb_loaddatalocal.select_outfile' into table t1; ---remove_file $MYSQLD_DATADIR/ndb_loaddatalocal.select_outfile -select * from t1 order by a; -drop table t1; - -create table t1(a int) engine=myisam; -insert into t1 values (1), (2), (3), (3); ---replace_result $MYSQLD_DATADIR MYSQLD_DATADIR -eval select * into outfile '$MYSQLD_DATADIR/ndb_loaddatalocal.select_outfile' from t1; -drop table t1; - -create table t1(a int primary key) engine=ndb; ---replace_result $MYSQLD_DATADIR MYSQLD_DATADIR -eval load data local infile '$MYSQLD_DATADIR/ndb_loaddatalocal.select_outfile' into table t1; ---remove_file $MYSQLD_DATADIR/ndb_loaddatalocal.select_outfile -select * from t1 order by a; -drop table t1; - -# End of 4.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_lock.test b/mysql-test/suite/ndb/t/ndb_lock.test deleted file mode 100644 index b6cd1ca7eb4..00000000000 --- a/mysql-test/suite/ndb/t/ndb_lock.test +++ /dev/null @@ -1,269 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - -connect (con1,localhost,root,,); -connect (con2,localhost,root,,); - ---disable_warnings -DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; ---enable_warnings - -# -# Transaction lock test to show that the NDB -# table handler is working properly with -# transaction locks -# - -# -# Testing of scan isolation -# -connection con1; -create table t1 (x integer not null primary key, y varchar(32)) engine = ndb; -insert into t1 values (1,'one'), (2,'two'); -select * from t1 order by x; - -connection con2; -select * from t1 order by x; - -connection con1; -start transaction; -insert into t1 values (3,'three'); -select * from t1 order by x; - -connection con2; -start transaction; -select * from t1 order by x; - -connection con1; -commit; - -connection con2; -select * from t1 order by x; -commit; - -drop table t1; - -### -# Bug#6020 -create table t1 (pk integer not null primary key, u int not null, o int not null, - unique(u), key(o)) engine = ndb; -insert into t1 values (1,1,1), (2,2,2), (3,3,3), (4,4,4), (5,5,5); - -lock tables t1 write; -delete from t1 where pk = 1; -unlock tables; -select * from t1 order by pk; -insert into t1 values (1,1,1); - -lock tables t1 write; -delete from t1 where u = 1; -unlock tables; -select * from t1 order by pk; -insert into t1 values (1,1,1); - -lock tables t1 write; -delete from t1 where o = 1; -unlock tables; -select * from t1 order by pk; -insert into t1 values (1,1,1); - -drop table t1; - -# Lock for update - -create table t1 (x integer not null primary key, y varchar(32), z integer, key(z)) engine = ndb; - -insert into t1 values (1,'one',1); - -# PK access -connection con1; -begin; -select * from t1 where x = 1 for update; - -connection con2; -begin; ---error 1205 -select * from t1 where x = 1 for update; -rollback; - -connection con1; -rollback; -insert into t1 values (2,'two',2),(3,"three",3); -begin; -select * from t1 where x = 1 for update; - -connection con2; ---error 1205 -select * from t1 where x = 1 for update; -select * from t1 where x = 2 for update; -rollback; - -connection con1; -commit; - -# table scan -# -# Note that there are two distinct execution paths in which we unlock -# non-matching rows inspected during table scan - one that is used in -# case of filesort and one that used in rest of cases. Below we cover -# the latter (Bug #20390 "SELECT FOR UPDATE does not release locks of -# untouched rows in full table scans"). -connection con1; -begin; -# We can't use "order by x" here as it will cause filesort ---replace_column 1 # 2 # 3 # -select * from t1 where y = 'one' or y = 'three' for update; - -connection con2; -begin; -# Have to check with pk access here since scans take locks on -# all rows and then release them in chunks -select * from t1 where x = 2 for update; ---error 1205 -select * from t1 where x = 1 for update; -rollback; - -connection con1; -commit; - -# And now the test for case with filesort -begin; -select * from t1 where y = 'one' or y = 'three' order by x for update; -connection con2; -begin; -select * from t1 where x = 2 for update; ---error 1205 -select * from t1 where x = 1 for update; -rollback; - -connection con1; -commit; - -# index scan -connection con1; -begin; -select * from t1 where z > 1 and z < 3 for update; - -connection con2; -begin; -# Have to check with pk access here since scans take locks on -# all rows and then release them in chunks -select * from t1 where x = 1 for update; ---error 1105,1205 -select * from t1 where x = 2 for update; -rollback; - -connection con1; -commit; - -# share locking - -# PK access -connection con1; -begin; -select * from t1 where x = 1 lock in share mode; - -connection con2; -begin; -select * from t1 where x = 1 lock in share mode; -select * from t1 where x = 2 for update; ---error 1205 -select * from t1 where x = 1 for update; -rollback; - -connection con1; -commit; - -# table scan -connection con1; -begin; -# We can't use "order by x" here as it will cause filesort ---replace_column 1 # 2 # 3 # -select * from t1 where y = 'one' or y = 'three' lock in share mode; - -connection con2; -begin; -select * from t1 where y = 'one' lock in share mode; -# Have to check with pk access here since scans take locks on -# all rows and then release them in chunks -select * from t1 where x = 2 for update; ---error 1205 -select * from t1 where x = 1 for update; -rollback; - -connection con1; -commit; - -# And the same test for case with filesort -connection con1; -begin; -select * from t1 where y = 'one' or y = 'three' order by x lock in share mode; - -connection con2; -begin; -select * from t1 where y = 'one' lock in share mode; -select * from t1 where x = 2 for update; ---error 1205 -select * from t1 where x = 1 for update; -rollback; - -connection con1; -commit; - -# index scan -connection con1; -begin; -select * from t1 where z > 1 and z < 3 lock in share mode; - -connection con2; -begin; -select * from t1 where z = 1 lock in share mode; -# Have to check with pk access here since scans take locks on -# all rows and then release them in chunks -select * from t1 where x = 1 for update; ---error 1205 -select * from t1 where x = 2 for update; -rollback; - -connection con1; -commit; - -drop table t1; - -# End of 4.1 tests - -# -# Bug #17812 Previous lock table for write causes "stray" lock -# although table is recreated -# -# this creating, locking, and dropping causes a subsequent hang -# on the delete below waiting for table t2 the locking in the -# "other" connection is relevant, as without it there is no problem -# -connection con1; -create table t3 (id2 int) engine=ndb; - -connection con2; -lock tables t3 write; -unlock tables; - -connection con1; -drop table t3; - -connection con1; -create table t2 (id int, j int) engine=ndb; -insert into t2 values (2, 2); -create table t3 (id int) engine=ndb; - -connection con2; -lock tables t3 read; - -connection con1; -# here we get a hang before bugfix although we shouldn't -delete t2 from t2, t3 where t2.id = t3.id; - -connection con2; -unlock tables; - -connection con1; -drop table t2, t3; diff --git a/mysql-test/suite/ndb/t/ndb_lock_table.test b/mysql-test/suite/ndb/t/ndb_lock_table.test deleted file mode 100644 index 6c21e8e8232..00000000000 --- a/mysql-test/suite/ndb/t/ndb_lock_table.test +++ /dev/null @@ -1,15 +0,0 @@ --- source include/have_ndb.inc - -# BUG 30996 ---disable_warnings -drop table if exists t1; ---enable_warnings -create table t1 (a int) engine ndb; -set autocommit=1; -lock table t1 write; -set autocommit=0; -insert into t1 values (0); -rollback; -select * from t1; -unlock tables; -drop table t1; diff --git a/mysql-test/suite/ndb/t/ndb_minmax.test b/mysql-test/suite/ndb/t/ndb_minmax.test deleted file mode 100644 index a3ac677cd2a..00000000000 --- a/mysql-test/suite/ndb/t/ndb_minmax.test +++ /dev/null @@ -1,65 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -drop table if exists t1, t2; ---enable_warnings - -CREATE TABLE t1 ( - a int PRIMARY KEY -) engine = ndb; - -INSERT INTO t1 VALUES (1); -INSERT INTO t1 VALUES (2); -INSERT INTO t1 VALUES (3); -INSERT INTO t1 VALUES (4); -INSERT INTO t1 VALUES (5); -INSERT INTO t1 VALUES (6); - -select MAX(a) from t1; -select MAX(a) from t1; -select MAX(a) from t1; -select MAX(a) from t1; -select MIN(a) from t1; -select MIN(a) from t1; -select MIN(a) from t1; -select * from t1 order by a; -select MIN(a) from t1; -select MAX(a) from t1; -select MAX(a) from t1; -select * from t1 order by a; -drop table t1; - - -CREATE TABLE t2 ( - a int PRIMARY KEY, - b int not null, - c int not null, - KEY(b), - UNIQUE(c) -) engine = ndb; - -INSERT INTO t2 VALUES (1, 5, 1); -INSERT INTO t2 VALUES (2, 2, 7); -INSERT INTO t2 VALUES (3, 3, 3); -INSERT INTO t2 VALUES (4, 4, 4); -INSERT INTO t2 VALUES (5, 5, 5); -INSERT INTO t2 VALUES (6, 6, 6); -INSERT INTO t2 VALUES (7, 2, 10); -INSERT INTO t2 VALUES (8, 10, 2); - - -select MAX(a) from t2; -select MAX(b) from t2; -select MAX(c) from t2; -select MIN(a) from t2; -select MIN(b) from t2; -select MIN(c) from t2; -select * from t2 order by a; -select MIN(b) from t2; -select MAX(a) from t2; -select MAX(c) from t2; -select * from t2 order by a; -drop table t2; - -# End of 4.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_multi.test b/mysql-test/suite/ndb/t/ndb_multi.test deleted file mode 100644 index e033ad1e479..00000000000 --- a/mysql-test/suite/ndb/t/ndb_multi.test +++ /dev/null @@ -1,154 +0,0 @@ --- source include/have_multi_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -connection server2; -drop table if exists t1, t2, t3, t4; -flush status; -connection server1; -drop table if exists t1, t2, t3, t4; -flush status; ---enable_warnings - -# Create test tables on server1 -create table t1 (a int) engine=ndbcluster; -create table t2 (a int) engine=ndbcluster; -insert into t1 value (2); -insert into t2 value (3); -select * from t1; -select * from t2; -show status like 'handler_discover%'; - -# Check dropping and recreating table on same server -connect (con1,localhost,root,,test); -connect (con2,localhost,root,,test); -connection con1; -select * from t1; -connection con2; -drop table t1; -create table t1 (a int) engine=ndbcluster; -insert into t1 value (2); -connection con1; -select * from t1; - -# Check dropping and recreating table on different server -connection server2; -show status like 'handler_discover%'; -drop table t1; -create table t1 (a int) engine=ndbcluster; -insert into t1 value (2); -connection server1; -select * from t1; -select * from t1; - -# Connect to server2 and use the tables from there -connection server2; -flush status; -select * from t1; -update t1 set a=3 where a=2; -show status like 'handler_discover%'; - -# Create a new table on server2 -create table t3 (a int not null primary key, b varchar(22), -c int, last_col text) engine=ndb; -insert into t3 values(1, 'Hi!', 89, 'Longtext column'); -create table t4 (pk int primary key, b int) engine=ndb; - -# Check that the tables are accessible from server1 -connection server1; -select * from t1; -select * from t3; -show tables like 't4'; -show tables; - -drop table t1, t2, t3, t4; -# bug#21378 -connection server1; -create table t1(c1 int key)ENGINE=MyISAM; -insert into t1 values(1),(3),(5); -select * from t1 order by c1; - -connection server2; -show tables; -create table t1(c1 int key)ENGINE=MyISAM; -insert into t1 values(100),(344),(533); -select * from t1 order by c1; - -connection server1; -alter table t1 engine=ndb; - -connection server2; -show tables; -select * from t1 order by c1; -drop table t1; - -connection server1; -select * from t1 order by c1; -drop table t1; -# End of 4.1 tests - -# Check distributed drop of database in 5.1 -create database db; -use db; -create table t1(x int) engine=ndb; - -connection server2; -use db; -show tables; - -connection server1; -drop database db; - -connection server2; ---error 1049 -show tables; - -connection server1; - -# bug#21495 -create database db; -use db; -create table t1(x int) engine=ndb; - -connection server2; -use db; -create table t2(x int) engine=myisam; -show tables; - -connection server1; -drop database db; - -connection server2; -show tables; -drop database db; - - -# -# bug#31470, ndb table with special characters in name -# are not discovered correctly -connection server1; -use test; -create table `test`.`t1$EX` - (server_id int unsigned, - master_server_id int unsigned, - master_epoch bigint unsigned, - count int unsigned, - primary key(server_id, master_server_id, - master_epoch, count)) - engine ndb; - -# check that table shows up ok on both servers -# before bugfix table would not show up on server2 ---replace_regex /EX/ex/ -show tables like '%$%'; -connection server2; -use test; ---replace_regex /EX/ex/ -show tables like '%$%'; - -# check cleanup -drop table `test`.`t1$EX`; -show tables like '%$%'; - -connection server1; -show tables like '%$%'; diff --git a/mysql-test/suite/ndb/t/ndb_multi_row.test b/mysql-test/suite/ndb/t/ndb_multi_row.test deleted file mode 100644 index 26953093ed0..00000000000 --- a/mysql-test/suite/ndb/t/ndb_multi_row.test +++ /dev/null @@ -1,76 +0,0 @@ --- source include/have_multi_ndb.inc --- source include/not_embedded.inc --- source include/have_binlog_format_mixed_or_row.inc - - ---disable_warnings -connection server2; -drop table if exists t1, t2, t3, t4; -flush status; -connection server1; -drop table if exists t1, t2, t3, t4; -flush status; ---enable_warnings - - -# Create test tables on server1 -create table t1 (a int) engine=ndbcluster; -create table t2 (a int) engine=ndbcluster; -insert into t1 value (2); -insert into t2 value (3); -select * from t1; -select * from t2; -show status like 'handler_discover%'; - -# Check dropping and recreating table on same server -connect (con1,localhost,root,,test); -connect (con2,localhost,root,,test); -connection con1; -select * from t1; -connection con2; -drop table t1; -create table t1 (a int) engine=ndbcluster; -insert into t1 value (2); -connection con1; -select * from t1; - -# Check dropping and recreating table on different server -connection server2; -show status like 'handler_discover%'; -drop table t1; -create table t1 (a int) engine=ndbcluster; -insert into t1 value (2); -connection server1; -## Currently a retry is required remotely -#--error 1412 -#select * from t1; -#show warnings; -#flush table t1; -# Table definition change should be propagated automatically -select * from t1; - -# Connect to server2 and use the tables from there -connection server2; -flush status; -select * from t1; -update t1 set a=3 where a=2; -show status like 'handler_discover%'; - -# Create a new table on server2 -create table t3 (a int not null primary key, b varchar(22), -c int, last_col text) engine=ndb; -insert into t3 values(1, 'Hi!', 89, 'Longtext column'); -create table t4 (pk int primary key, b int) engine=ndb; - -# Check that the tables are accessible from server1 -connection server1; -select * from t1; -select * from t3; -show tables like 't4'; -show tables; - -drop table t1, t2, t3, t4; -connection server2; -drop table if exists t1, t3, t4; - -# End of 4.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_partition_error.test b/mysql-test/suite/ndb/t/ndb_partition_error.test deleted file mode 100644 index 9db2a6a6f6d..00000000000 --- a/mysql-test/suite/ndb/t/ndb_partition_error.test +++ /dev/null @@ -1,74 +0,0 @@ --- source include/have_ndb.inc -#--disable_abort_on_error -# -# Simple test for the partition storage engine -# Focuses on range partitioning tests -# -#-- source include/have_partition.inc - ---disable_warnings -drop table if exists t1; ---enable_warnings - ---disable_query_log -set new=on; ---enable_query_log -# -# Partition by range, generate node group error -# ---error 1005 -CREATE TABLE t1 ( -a int not null, -b int not null, -c int not null, -primary key(a,b), -index (a)) -engine = ndb -partition by range (a) -partitions 3 -(partition x1 values less than (5) nodegroup 12, - partition x2 values less than (10) nodegroup 13, - partition x3 values less than (20) nodegroup 14); -show warnings; - -# -# Partition by range, create normal valid table -# -CREATE TABLE t1 ( -a int not null, -b int not null, -c int not null, -primary key(a)) -engine = ndb -partition by range (a) -partitions 3 -(partition x1 values less than (5), - partition x2 values less than (10), - partition x3 values less than (20)); - -drop table t1; - -# -# Bug #17763 mysqld cores with list partitioning if update to missing partition -# -CREATE TABLE t1 (id INT) ENGINE=NDB - PARTITION BY LIST(id) - (PARTITION p0 VALUES IN (2, 4), - PARTITION p1 VALUES IN (42, 142)); -INSERT INTO t1 VALUES (2); ---error ER_NO_PARTITION_FOR_GIVEN_VALUE -UPDATE t1 SET id=5 WHERE id=2; -DROP TABLE t1; - -# -# NULL for LIST partition -# -create table t1 (a int,b int, c int) -engine = ndb -partition by list(a) -partitions 2 -(partition x123 values in (11, 12), - partition x234 values in (5, 1)); ---error ER_NO_PARTITION_FOR_GIVEN_VALUE -insert into t1 values (NULL,1,1); -drop table t1; diff --git a/mysql-test/suite/ndb/t/ndb_partition_error2-master.opt b/mysql-test/suite/ndb/t/ndb_partition_error2-master.opt deleted file mode 100644 index 955f7692c8b..00000000000 --- a/mysql-test/suite/ndb/t/ndb_partition_error2-master.opt +++ /dev/null @@ -1 +0,0 @@ ---ndbcluster diff --git a/mysql-test/suite/ndb/t/ndb_partition_error2.test b/mysql-test/suite/ndb/t/ndb_partition_error2.test deleted file mode 100644 index afedd0e3c5c..00000000000 --- a/mysql-test/suite/ndb/t/ndb_partition_error2.test +++ /dev/null @@ -1,14 +0,0 @@ -disable_query_log; ---require r/true.require -select support = 'Enabled' as `TRUE` from information_schema.engines where engine = 'ndbcluster'; -enable_query_log; - ---disable_warnings -drop table if exists t1; ---enable_warnings -# -# Bug #27359 Partitions: memory allocation error message -# ---error ER_PARTITION_NOT_DEFINED_ERROR -create table t1 (s1 int) engine=ndbcluster; - diff --git a/mysql-test/suite/ndb/t/ndb_partition_key.test b/mysql-test/suite/ndb/t/ndb_partition_key.test deleted file mode 100644 index a3898407445..00000000000 --- a/mysql-test/suite/ndb/t/ndb_partition_key.test +++ /dev/null @@ -1,244 +0,0 @@ --- source include/have_ndb.inc - ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - -# -# Basic syntax test -# - -# Support for partition key verified -CREATE TABLE t1 (a int, b int, c int, d int, PRIMARY KEY(a,b,c)) - ENGINE = NDB - PARTITION BY KEY (a,b); - -insert into t1 values (1,1,1,1); -select * from t1; -update t1 set d = 2 where a = 1 and b = 1 and c = 1; -select * from t1; -delete from t1; -select * from t1; - -drop table t1; - -# only support for partition key on primary key ---error ER_UNIQUE_KEY_NEED_ALL_FIELDS_IN_PF -CREATE TABLE t1 (a int, b int, c int, d int, PRIMARY KEY(a,b)) - ENGINE = NDB - PARTITION BY KEY (c); - -CREATE TABLE t1 (a int, b int, c int, PRIMARY KEY(a,b)) - ENGINE = NDB - PARTITION BY KEY (a); - -insert into t1 values - (1,1,3),(1,2,3),(1,3,3),(1,4,3),(1,5,3),(1,6,3), - (1,7,3),(1,8,3),(1,9,3),(1,10,3),(1,11,3),(1,12,3); - -select * from t1 order by b; - -# BUG#33061: ORDER BY DESC becomes ASC in NDB partition pruning to one partition -select max(b) from t1 where a = 1; -select b from t1 where a = 1 order by b desc; - -DROP TABLE t1; - -# -# Test partition and char support -# - -CREATE TABLE t1 (a INT, b CHAR(10) COLLATE latin1_bin, c INT, d INT, - PRIMARY KEY (a,b,c) USING HASH) - ENGINE=NDB - DEFAULT CHARSET=latin1 - PARTITION BY KEY (b); - -insert into t1 values (1,"a",1,1),(2,"a",1,1),(3,"a",1,1); - -# should show only one attribute with DISTRIBUTION KEY ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | sed 's/Version: [0-9]*//' | sed 's/\(Length of frm data: \)[0-9]*/\1#/' - -# -# Test that explicit partition info is not shown in show create table -# result should not contain (PARTITION P0 ... etc) since this is what shows up in -# mysqldump, and we don't want that info there -# -show create table t1; - -DROP TABLE t1; - -# -# Bug #13155: Problem in Create Table using SHOW CREATE TABLE syntax -# -CREATE TABLE t1 (a int not null primary key) -PARTITION BY KEY(a) -(PARTITION p0 ENGINE = NDB, PARTITION p1 ENGINE = NDB); - -drop table t1; - -CREATE TABLE t1 (a int not null primary key); -ALTER TABLE t1 -ENGINE = NDB -PARTITION BY KEY(a) -(PARTITION p0 ENGINE = NDB, PARTITION p1 ENGINE = NDB); - -drop table t1; - -CREATE TABLE t1 (a int not null primary key) ENGINE = NDB; -ALTER TABLE t1 -PARTITION BY KEY(a) -(PARTITION p0 ENGINE = NDB, PARTITION p1 ENGINE = NDB); - -drop table t1; - -# -# Bug #17754 Improper handling of removal of partitioning in ALTER TABLE -# Also added a number of general test cases in the same area -# -create table t1 (a int) -engine=ndb -partition by key(a) -(partition p0, partition p1); -show create table t1; - -alter table t1 engine=heap; -show create table t1; - -alter table t1 engine=ndb; -show create table t1; - -alter table t1 engine=heap remove partitioning; -show create table t1; - -alter table t1 engine=ndb -partition by key(a) -(partition p0, partition p1 engine = ndb); -show create table t1; - -alter table t1 -partition by key (a) -(partition p0 engine=ndb, partition p1 engine=ndb); -show create table t1; - -alter table t1 remove partitioning; -show create table t1; - -# after bug#31931 was fixed -# this is OK, since the storage engine is specified -# on table level before. -#--error ER_MIX_HANDLER_ERROR -alter table t1 -partition by key(a) -(partition p0 engine=ndb, partition p1); - -alter table t1 -engine=ndb -partition by key(a) -(partition p0 engine=ndb, partition p1 engine = ndb); -show create table t1; - -drop table t1; - -# -# BUG 16810 Out of memory when coalesce partition -# -CREATE TABLE t1 ( - c1 MEDIUMINT NOT NULL AUTO_INCREMENT, - c2 TEXT NOT NULL, - c3 INT NOT NULL, - c4 BIT NOT NULL, - c5 FLOAT, - c6 VARCHAR(255), - c7 TIMESTAMP, - PRIMARY KEY(c1,c3)) - ENGINE=NDB - PARTITION BY KEY(c3) PARTITIONS 5; - -let $j= 11; ---disable_query_log -while ($j) -{ - eval INSERT INTO t1 VALUES (NULL, "Tested Remotely from Texas, USA", $j, -b'0', - $j.00,"By JBM $j","2006-01-26"); - dec $j; -} ---enable_query_log -ALTER TABLE t1 COALESCE PARTITION 4; - -DROP TABLE t1; - -# -# Bug 16822: OPTIMIZE TABLE hangs test -# -CREATE TABLE t1 (a int primary key) -ENGINE=NDB -PARTITION BY KEY(a); -ANALYZE TABLE t1; -CHECK TABLE t1; -OPTIMIZE TABLE t1; -REPAIR TABLE t1; -ALTER TABLE t1 OPTIMIZE PARTITION p0; -ALTER TABLE t1 CHECK PARTITION p0; -ALTER TABLE t1 REPAIR PARTITION p0; -ALTER TABLE t1 ANALYZE PARTITION p0; ---error ER_ILLEGAL_HA -ALTER TABLE t1 REBUILD PARTITION p0; -DROP TABLE t1; - -# -# BUG 16806: ALTER TABLE fails -# -CREATE TABLE t1 ( - c1 MEDIUMINT NOT NULL AUTO_INCREMENT, - c2 TEXT NOT NULL, - c3 INT NOT NULL, - PRIMARY KEY(c1,c3)) - ENGINE=NDB - PARTITION BY KEY(c3) PARTITIONS 5; - -ALTER TABLE t1 ADD COLUMN c4 INT AFTER c1; -DROP TABLE t1; - -CREATE TABLE t1 ( - c1 MEDIUMINT NOT NULL AUTO_INCREMENT, - c2 TEXT NOT NULL, - c3 INT NOT NULL, - PRIMARY KEY(c1,c3)) - ENGINE=NDB - PARTITION BY KEY(c3) - (PARTITION p0 NODEGROUP 0, PARTITION p1 NODEGROUP 0); - -ALTER TABLE t1 ADD COLUMN c4 INT AFTER c1; -SELECT NODEGROUP,PARTITION_NAME FROM information_schema.partitions WHERE -table_name = "t1"; -DROP TABLE t1; - -# bug#25587 - -CREATE TABLE t1 ( -a tinyint unsigned NOT NULL, -b bigint(20) unsigned NOT NULL, -c char(12), -PRIMARY KEY (a,b) -) ENGINE ndb DEFAULT CHARSET=latin1 PARTITION BY KEY (a); - -insert into t1 values(1,1,'1'), (2,2,'2'), (3,3,'3'), (4,4,'4'), (5,5,'5'); -select * from t1 where a = 1; -select * from t1 where a = 2; -select * from t1 where a = 3; -select * from t1 where a = 4; -select * from t1 where a = 5; -delete from t1 where a = 1; -select * from t1 order by 1; -delete from t1 where a = 2; -select * from t1 order by 1; -delete from t1 where a = 3; -select * from t1 order by 1; -delete from t1 where a = 4; -select * from t1 order by 1; -delete from t1 where a = 5; -select * from t1 order by 1; - -drop table t1; diff --git a/mysql-test/suite/ndb/t/ndb_partition_list.test b/mysql-test/suite/ndb/t/ndb_partition_list.test deleted file mode 100644 index ccfcdbc84f4..00000000000 --- a/mysql-test/suite/ndb/t/ndb_partition_list.test +++ /dev/null @@ -1,68 +0,0 @@ ---source include/have_ndb.inc -# -# Simple test for the partition storage engine -# Focuses on range partitioning tests -# -#-- source include/have_partition.inc - ---disable_query_log -set new=on; ---enable_query_log - ---disable_warnings -drop table if exists t1; ---enable_warnings - -# -# Partition by list, basic -# - -CREATE TABLE t1 ( f_int1 INTEGER NOT NULL, f_int2 INTEGER NOT NULL, - f_char1 CHAR(10), - f_char2 CHAR(10), f_charbig VARCHAR(1000), -PRIMARY KEY (f_int1,f_int2)) -ENGINE = NDB -PARTITION BY LIST(MOD(f_int1 + f_int2,4)) -(PARTITION part_3 VALUES IN (-3), - PARTITION part_2 VALUES IN (-2), - PARTITION part_1 VALUES IN (-1), - PARTITION part0 VALUES IN (0), - PARTITION part1 VALUES IN (1), - PARTITION part2 VALUES IN (2), - PARTITION part3 VALUES IN (3,4,5)); - -INSERT INTO t1 SET f_int1 = -2, f_int2 = 20, f_char1 = '20', f_char2 = '20', f_charbig = '===20==='; -INSERT INTO t1 SET f_int1 = 1, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; -INSERT INTO t1 SET f_int1 = 2, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; -INSERT INTO t1 SET f_int1 = 3, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; -INSERT INTO t1 SET f_int1 = 4, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; -INSERT INTO t1 SET f_int1 = 5, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; -INSERT INTO t1 SET f_int1 = 20, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; - -SELECT * FROM t1 ORDER BY f_int1; - -DROP TABLE t1; - -# -# Partition by list, no pk -# - -CREATE TABLE t1 ( f_int1 INTEGER, f_int2 INTEGER, f_char1 CHAR(10), - f_char2 CHAR(10), f_charbig VARCHAR(1000)) -ENGINE = NDB -PARTITION BY LIST(f_int1) -(PARTITION part_1 VALUES IN (-1), - PARTITION part0 VALUES IN (0,1), - PARTITION part1 VALUES IN (2)); - -INSERT INTO t1 SET f_int1 = -1, f_int2 = 20, f_char1 = '20', f_char2 = '20', f_charbig = '===20==='; -INSERT INTO t1 SET f_int1 = 0, f_int2 = 20, f_char1 = '20', f_char2 = '20', f_charbig = '===20==='; -INSERT INTO t1 SET f_int1 = 1, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; -INSERT INTO t1 SET f_int1 = 2, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; ---error ER_NO_PARTITION_FOR_GIVEN_VALUE -INSERT INTO t1 SET f_int1 = 20, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; - -SELECT * FROM t1 ORDER BY f_int1; - -DROP TABLE t1; - diff --git a/mysql-test/suite/ndb/t/ndb_partition_range.test b/mysql-test/suite/ndb/t/ndb_partition_range.test deleted file mode 100644 index 778e552c6d8..00000000000 --- a/mysql-test/suite/ndb/t/ndb_partition_range.test +++ /dev/null @@ -1,269 +0,0 @@ --- source include/have_ndb.inc -#--disable_abort_on_error -# -# Simple test for the partition storage engine -# Focuses on range partitioning tests -# -#-- source include/have_partition.inc - ---disable_query_log -set new=on; ---enable_query_log - ---disable_warnings -drop table if exists t1; ---enable_warnings - -# -# Partition by range, basic -# -CREATE TABLE t1 ( -a int not null, -b int not null, -c int not null, -primary key(a,b), -index (a)) -engine = ndb -partition by range (a) -partitions 3 -(partition x1 values less than (5), - partition x2 values less than (10), - partition x3 values less than (20)); - -# Simple insert and verify test -INSERT into t1 values (1, 1, 1); -INSERT into t1 values (6, 1, 1); -INSERT into t1 values (10, 1, 1); -INSERT into t1 values (15, 1, 1); - ---replace_column 16 # 19 # 20 # -select * from information_schema.partitions where table_name= 't1'; - -select * from t1 order by a; - -select * from t1 where a=1 order by a; -select * from t1 where a=15 and b=1 order by a; -select * from t1 where a=21 and b=1 order by a; -select * from t1 where a=21 order by a; -select * from t1 where a in (1,6,10,21) order by a; -select * from t1 where b=1 and a in (1,6,10,21) order by a; - -# BUG#33061: ORDER BY DESC becomes ASC in NDB partition pruning to one partition -INSERT into t1 values (1, 2, 2); -select max(b) from t1 where a = 1; -select b from t1 where a = 1 order by b desc; - -drop table t1; - -# -# Partition by range, basic -# -CREATE TABLE t1 ( -a int not null, -b int not null, -c int not null, -primary key(b), -unique (a)) -engine = ndb -partition by range (b) -partitions 3 -(partition x1 values less than (5), - partition x2 values less than (10), - partition x3 values less than (20)); - -# Simple insert and verify test -INSERT into t1 values (1, 1, 1); -INSERT into t1 values (2, 6, 1); -INSERT into t1 values (3, 10, 1); -INSERT into t1 values (4, 15, 1); - -select * from t1 order by a; -UPDATE t1 set a = 5 WHERE b = 15; -select * from t1 order by a; -UPDATE t1 set a = 6 WHERE a = 5; -select * from t1 order by a; - -select * from t1 where b=1 order by b; -select * from t1 where b=15 and a=1 order by b; -select * from t1 where b=21 and a=1 order by b; -select * from t1 where b=21 order by b; -select * from t1 where b in (1,6,10,21) order by b; -select * from t1 where a in (1,2,5,6) order by b; -select * from t1 where a=1 and b in (1,6,10,21) order by b; - -DELETE from t1 WHERE b = 6; -DELETE from t1 WHERE a = 6; - -# -# Test that explicit partition info _is_ shown in show create table -# result _should_ contain (PARTITION x1 ... etc) -# -show create table t1; - -drop table t1; - -# -# Bug #17499, #17687 -# Alter partitioned NDB table causes mysqld to core -# - -CREATE TABLE t1 - (id MEDIUMINT NOT NULL, - b1 BIT(8), - vc VARCHAR(255), - bc CHAR(255), - d DECIMAL(10,4) DEFAULT 0, - f FLOAT DEFAULT 0, - total BIGINT UNSIGNED, - y YEAR, - t DATE) ENGINE=NDB - PARTITION BY RANGE (YEAR(t)) - (PARTITION p0 VALUES LESS THAN (1901), - PARTITION p1 VALUES LESS THAN (1946), - PARTITION p2 VALUES LESS THAN (1966), - PARTITION p3 VALUES LESS THAN (1986), - PARTITION p4 VALUES LESS THAN (2005), - PARTITION p5 VALUES LESS THAN MAXVALUE); - -INSERT INTO t1 VALUES (0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); -SELECT * FROM t1; -ALTER TABLE t1 ENGINE=MYISAM; -SELECT * FROM t1; -DROP TABLE t1; - -CREATE LOGFILE GROUP lg1 - ADD UNDOFILE 'undofile.dat' - INITIAL_SIZE 16M - UNDO_BUFFER_SIZE=1M - ENGINE=NDB; - -CREATE TABLESPACE ts1 - ADD DATAFILE 'datafile.dat' - USE LOGFILE GROUP lg1 - INITIAL_SIZE 12M - ENGINE NDB; - -CREATE TABLE test.t1 ( - a1 INT, - a2 TEXT NOT NULL, - a3 BIT NOT NULL, - a4 DECIMAL(8,3), - a5 INT NOT NULL, - a6 INT, - PRIMARY KEY(a1)) - TABLESPACE ts1 STORAGE DISK ENGINE=NDB - PARTITION BY LIST (a1) - (PARTITION p0 VALUES IN (1,2,3,4,5), - PARTITION p1 VALUES IN (6,7,8,9, 10), - PARTITION p2 VALUES IN (11, 12, 13, 14, 15)); - -# Alter table directly without any statements inbetween -ALTER TABLE test.t1 DROP COLUMN a6; -ALTER TABLE test.t1 ADD COLUMN a6 VARCHAR(255); - -let $j= 15; ---disable_query_log -while ($j) -{ -eval INSERT INTO test.t1 VALUES ($j, "Tested Remotely from Texas, USA", -b'1',$j.00,$j+1,"By NIK $j"); -dec $j; -} ---enable_query_log -SELECT COUNT(*) FROM test.t1; - -ALTER TABLE test.t1 DROP COLUMN a4; -SELECT COUNT(*) FROM test.t1; - -DROP TABLE t1; - -CREATE TABLE test.t1 ( - a1 INT, - a2 TEXT NOT NULL, - a3 BIT NOT NULL, - a4 DECIMAL(8,3), - a5 INT NOT NULL, - a6 VARCHAR(255), - PRIMARY KEY(a1)) - TABLESPACE ts1 STORAGE DISK ENGINE=NDB - PARTITION BY HASH(a1) - PARTITIONS 4; - -let $j= 15; ---disable_query_log -while ($j) -{ -eval INSERT INTO test.t1 VALUES ($j, "Tested Remotely from Texas, USA", -b'1',$j.00,$j+1,"By NIK $j"); -dec $j; -} ---enable_query_log -SELECT COUNT(*) FROM test.t1; - -ALTER TABLE test.t1 DROP COLUMN a4; -SELECT COUNT(*) FROM test.t1; - -DROP TABLE t1; - -ALTER TABLESPACE ts1 - DROP DATAFILE 'datafile.dat' - ENGINE=NDB; -DROP TABLESPACE ts1 ENGINE=NDB; -DROP LOGFILE GROUP lg1 ENGINE=NDB; - - -# -# Bug #17701 ALTER TABLE t1 ADD PARTITION for PARTITION BY LIST hangs test -# - -CREATE TABLE t1 - (id MEDIUMINT NOT NULL, - b1 BIT(8), - vc VARCHAR(255), - bc CHAR(255), - d DECIMAL(10,4) DEFAULT 0, - f FLOAT DEFAULT 0, - total BIGINT UNSIGNED, - y YEAR, - t DATE) ENGINE=NDB - PARTITION BY LIST(id) - (PARTITION p0 VALUES IN (2, 4), - PARTITION p1 VALUES IN (42, 142)); - -INSERT INTO t1 VALUES (2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); -SELECT * FROM t1; -ALTER TABLE t1 ADD PARTITION - (PARTITION p2 VALUES IN (412)); -SELECT * FROM t1; -DROP TABLE t1; - -# -# Bug #17806 Update on NDB table with list partition causes mysqld to core -# Bug #16385 Partitions: crash when updating a range partitioned NDB table -# -CREATE TABLE t1 ( -a int not null, -b int not null, -c int not null) -partition by list(a) -partitions 2 -(partition x123 values in (1,5,6), - partition x234 values in (4,7,8)); -INSERT into t1 VALUES (5,1,1); -select * from t1; -UPDATE t1 SET a=8 WHERE a=5 AND b=1; -select * from t1; -drop table t1; - -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) engine=ndb -PARTITION BY RANGE(f1) -( PARTITION part1 VALUES LESS THAN (2), -PARTITION part2 VALUES LESS THAN (1000)); -INSERT INTO t1 VALUES(1, '---1---'); -INSERT INTO t1 VALUES(2, '---2---'); -select * from t1 order by f1; -UPDATE t1 SET f1 = f1 + 4 WHERE f1 = 2; -select * from t1 order by f1; -UPDATE t1 SET f1 = f1 + 4 WHERE f1 = 1; -select * from t1 order by f1; -drop table t1; diff --git a/mysql-test/suite/ndb/t/ndb_read_multi_range.test b/mysql-test/suite/ndb/t/ndb_read_multi_range.test deleted file mode 100644 index 1c439e65099..00000000000 --- a/mysql-test/suite/ndb/t/ndb_read_multi_range.test +++ /dev/null @@ -1,340 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1, t2, r1; ---enable_warnings - -# -# Basic test to see that batching is working -# - -create table t1 ( - a int primary key, - b int not null, - c int not null, - index(b), unique index using hash(c) -) engine = ndb; -insert into t1 values - (1,2,1),(2,3,2),(3,4,3),(4,5,4), - (5,2,12),(6,3,11),(7,4,10),(8,5,9), - (9,2,8),(10,3,7),(11,4,6),(12,5,5); - -# batch on primary key -create table r1 as select * from t1 where a in (2,8,12); -select * from r1 order by a; -drop table r1; - -# batch on ordered index -create table r1 as select * from t1 where b in (1,2,5); -select * from r1 order by a; -drop table r1; - -# batch on unique hash index -create table r1 as select * from t1 where c in (2,8,12); -select * from r1 order by a; -drop table r1; - -# batch mixed -create table r1 as select * from t1 where a in (2,8) or (a > 11) or (a <= 1); -select * from r1 order by a; -drop table r1; - -# batch on primary key, missing values -create table r1 as select * from t1 where a in (33,8,12); -select * from r1 order by a; -drop table r1; -create table r1 as select * from t1 where a in (2,33,8,12,34); -select * from r1 order by a; -drop table r1; - -# batch on ordered index, missing values -create table r1 as select * from t1 where b in (1,33,5); -select * from r1 order by a; -drop table r1; -select * from t1 where b in (1,33,5) order by a; -create table r1 as select * from t1 where b in (45,1,33,5,44); -select * from r1 order by a; -drop table r1; -select * from t1 where b in (45,22) order by a; - -# batch on unique hash index, missing values -create table r1 as select * from t1 where c in (2,8,33); -select * from r1 order by a; -drop table r1; -create table r1 as select * from t1 where c in (13,2,8,33,12); -select * from r1 order by a; -drop table r1; - -select * from t1 where a in (33,8,12) order by a; -select * from t1 where a in (33,34,35) order by a; -select * from t1 where a in (2,8) or (a > 11) or (a <= 1) order by a; -select * from t1 where b in (6,7) or (b <= 5) or (b >= 10) order by b,a; -select * from t1 where c in (13,2,8,33,12) order by c,a; -drop table t1; - -# -# Somewhat more complicated -# - -create table t1 ( - a int not null, - b int not null, - c int not null, - d int not null, - e int not null, - primary key (a,b,c,d), index (d) -) engine = ndb; - -insert into t1 values - (1,2,1,1,1),(2,3,2,3,1),(3,4,3,1,1),(4,5,4,7,1), - (5,2,12,12,1),(6,3,11,1,1),(7,4,10,3,1),(8,5,9,5,1), - (9,2,8,6,1),(10,3,7,5,1),(11,4,6,3,1),(12,5,5,2,1), - (1,2,1,2,1), - (1,2,1,3,1), - (1,2,1,4,1), - (1,2,1,5,1); - -# batch on primary key -create table r1 as select * from t1 - where a=1 and b=2 and c=1 and d in (1,4,3,2); -select * from r1 order by a,b,c,d; -drop table r1; - -# batched update ordered index, one value for all -update t1 set e = 100 - where d in (12,6,7); -select * from t1 where d in (12,6,7) order by a,b,c,d; -select * from t1 where d not in (12,6,7) and e = 100; - -# batched update primary key, one value for all -update t1 - set e = 101 - where a=1 and - b=2 and - c=1 and - d in (1,4,3,2); -select * - from t1 - where a=1 and b=2 and c=1 and d in (1,4,3,2) - order by a,b,c,d; -select * - from t1 - where not (a=1 and b=2 and c=1 and d in (1,4,3,2)) - and e=101; - - -# batched update ordered index, different values -update t1 - set e = - (case d - when 12 then 112 - when 6 then 106 - when 7 then 107 - end) - where d in (12,6,7); -select * from t1 where d in (12,6,7) order by a,b,c,d; - -# batched update primary key, different values -update t1 - set e = - (case d - when 1 then 111 - when 4 then 444 - when 3 then 333 - when 2 then 222 - end) - where a=1 and - b=2 and - c=1 and - d in (1,4,3,2); -select * - from t1 - where a=1 and b=2 and c=1 and d in (1,4,3,2) - order by a,b,c,d; - -# batched delete -delete from t1 where d in (12,6,7); -select * from t1 where d in (12,6,7); - -drop table t1; - -# null handling -create table t1 ( - a int not null primary key, - b int, - c int, - d int, - unique index (b), - index(c) -) engine = ndb; - -insert into t1 values - (1,null,1,1), - (2,2,2,2), - (3,null,null,3), - (4,4,null,4), - (5,null,5,null), - (6,6,6,null), - (7,null,null,null), - (8,8,null,null), - (9,null,9,9), - (10,10,10,10), - (11,null,null,11), - (12,12,null,12), - (13,null,13,null), - (14,14,14,null), - (15,null,null,null), - (16,16,null,null); - -create table t2 as select * from t1 where a in (5,6,7,8,9,10); -select * from t2 order by a; -drop table t2; - -create table t2 as select * from t1 where b in (5,6,7,8,9,10); -select * from t2 order by a; -drop table t2; - -create table t2 as select * from t1 where c in (5,6,7,8,9,10); -select * from t2 order by a; -drop table t2; - -drop table t1; - -# bug17729 - -CREATE TABLE t1 ( - a int(11) NOT NULL, - b int(11) NOT NULL, - c datetime default NULL, - PRIMARY KEY (a), - KEY idx_bc (b,c) -) ENGINE=ndbcluster; - -INSERT INTO t1 VALUES -(406989,67,'2006-02-23 17:08:46'), (150078,67,'2005-10-26 11:17:45'), -(406993,67,'2006-02-27 11:20:57'), (245655,67,'2005-12-08 15:59:08'), -(406994,67,'2006-02-27 11:26:46'), (256,67,NULL), -(398341,67,'2006-02-20 04:48:44'), (254,67,NULL),(1120,67,NULL), -(406988,67,'2006-02-23 17:07:22'), (255,67,NULL), -(398340,67,'2006-02-20 04:38:53'),(406631,67,'2006-02-23 10:49:42'), -(245653,67,'2005-12-08 15:59:07'),(406992,67,'2006-02-24 16:47:18'), -(245654,67,'2005-12-08 15:59:08'),(406995,67,'2006-02-28 11:55:00'), -(127261,67,'2005-10-13 12:17:58'),(406991,67,'2006-02-24 16:42:32'), -(245652,67,'2005-12-08 15:58:27'),(398545,67,'2006-02-20 04:53:13'), -(154504,67,'2005-10-28 11:53:01'),(9199,67,NULL),(1,67,'2006-02-23 15:01:35'), -(223456,67,NULL),(4101,67,NULL),(1133,67,NULL), -(406990,67,'2006-02-23 18:01:45'),(148815,67,'2005-10-25 15:34:17'), -(148812,67,'2005-10-25 15:30:01'),(245651,67,'2005-12-08 15:58:27'), -(154503,67,'2005-10-28 11:52:38'); - -create table t11 engine = ndbcluster select * from t1 where b = 67 AND (c IS NULL OR c > NOW()) order by 3 asc; -create table t12 engine = ndbcluster select * from t1 where b = 67 AND (c IS NULL OR c > NOW()) order by 3 desc; -create table t21 select * from t1 where b = 67 AND (c IS NULL OR c > '2005-12-08') order by 3 asc; -create table t22 engine = ndbcluster select * from t1 where b = 67 AND (c IS NULL OR c > '2005-12-08') order by 3 desc; - -select * from t11 order by 1,2,3; -select * from t12 order by 1,2,3; -select * from t21 order by 1,2,3; -select * from t22 order by 1,2,3; - -# join tests -select t12.a from t11, t12 where t11.a in(255,256) and t11.a = t12.a and t11.c is null order by t12.a; - -update t22 set c = '2005-12-08 15:58:27' where a = 255; -select * from t22 order by 1,2,3; -select t21.* from t21,t22 where t21.a = t22.a and -t22.a in (select t12.a from t11, t12 where t11.a in(255,256) and t11.a = t12.a and t11.c is null) and t22.c is null order by t21.a; - -delete from t22 where a > 245651; -update t22 set b = a + 1; -select * from t22 order by 1,2,3; -select t21.c, count(*) -from t21 -inner join t22 using (a) -where t22.b in (2,256,257,1121,1134,4102,9200,223457,245652) -group by t21.c -order by t21.c; - -DROP TABLE t1, t11, t12, t21, t22; - -# bug#19956 -CREATE TABLE t1 (id varchar(255) NOT NULL, - tag int(11) NOT NULL, - doc text NOT NULL, - type varchar(150) NOT NULL, - modified timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (id) - ) ENGINE=ndbcluster; - -INSERT INTO t1 VALUES ('sakila',1,'Some text goes here','text',CURRENT_TIMESTAMP); -SELECT id, tag, doc, type FROM t1 WHERE id IN ('flipper','orka'); -SELECT id, tag, doc, type FROM t1 WHERE id IN ('flipper','sakila'); - -DROP TABLE t1; - -#bug#25522 -CREATE TABLE t1 ( - var1 int(2) NOT NULL, - var2 int(2) NOT NULL, - PRIMARY KEY (var1) - ) ENGINE=ndbcluster DEFAULT CHARSET=ascii CHECKSUM=1; - - -CREATE TABLE t2 ( - var1 int(2) NOT NULL, - var2 int(2) NOT NULL, - PRIMARY KEY (var1) - ) ENGINE=ndbcluster DEFAULT CHARSET=ascii CHECKSUM=1; - - -DELIMITER |; -CREATE TRIGGER testtrigger - AFTER UPDATE ON t1 FOR EACH ROW BEGIN - REPLACE INTO t2 SELECT * FROM t1 WHERE t1.var1 = NEW.var1;END| -DELIMITER ;| - -INSERT INTO t1 VALUES (1,1),(2,2),(3,3); - -UPDATE t1 SET var2 = 9 WHERE var1 IN(1,2,3); - -DROP TRIGGER testtrigger; - -DROP TABLE t1, t2; - -#bug#25821 -create table t1 (a int, b int, primary key (a), key ab (a,b)) engine=ndbcluster; - -insert into t1 values (1,1), (10,10); - -select * from t1 use index (ab) where a in(1,10) order by a; - -create table t2 (a int, b int, primary key (a,b)) engine=ndbcluster -partition by key(a); - -insert into t2 values (1,1), (10,10); - -select * from t2 where a in (1,10) order by a; -drop table t1, t2; - -#bug#30337 - -create table t1 (id int primary key) engine ndb; -insert into t1 values (1), (2), (3); - -create table t2 (id int primary key) engine ndb; -insert into t2 select id from t1; - -delimiter |; -create trigger kaboom after delete on t1 -for each row begin - delete from t2 where id=old.id; -end| -delimiter ;| - -select * from t1 order by id; -delete from t1 where id in (1,2); -select * from t2 order by id; - -drop trigger kaboom; -drop table t1, t2; diff --git a/mysql-test/suite/ndb/t/ndb_rename.test b/mysql-test/suite/ndb/t/ndb_rename.test deleted file mode 100644 index 7f9fd0e6984..00000000000 --- a/mysql-test/suite/ndb/t/ndb_rename.test +++ /dev/null @@ -1,36 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1,t2; -drop database if exists mysqltest; ---enable_warnings - -# -# Table rename tests -# - -# -# Create a normal table with primary key -# -CREATE TABLE t1 ( - pk1 INT NOT NULL PRIMARY KEY, - attr1 INT NOT NULL, - attr2 INT, - attr3 VARCHAR(10), - INDEX i1(attr1) -) ENGINE=ndbcluster; - -INSERT INTO t1 VALUES (0,0,0,"zero"),(1,1,1,"one"),(2,2,2,"two"); -SELECT * FROM t1 WHERE attr1 = 1; -alter table t1 rename t2; -SELECT * FROM t2 WHERE attr1 = 1; - -create database ndbtest; -alter table t2 rename ndbtest.t2; -SELECT * FROM ndbtest.t2 WHERE attr1 = 1; - -drop table ndbtest.t2; -drop database ndbtest; - -# End of 4.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_replace.test b/mysql-test/suite/ndb/t/ndb_replace.test deleted file mode 100644 index 432cf7f2dcd..00000000000 --- a/mysql-test/suite/ndb/t/ndb_replace.test +++ /dev/null @@ -1,104 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - -# -# Test of REPLACE with NDB -# - ---disable_warnings -drop table if exists t1,t2; ---enable_warnings - -CREATE TABLE t1 ( - gesuchnr int(11) DEFAULT '0' NOT NULL, - benutzer_id int(11) DEFAULT '0' NOT NULL, - PRIMARY KEY (gesuchnr,benutzer_id) -) engine=ndbcluster; - -replace into t1 (gesuchnr,benutzer_id) values (2,1); -replace into t1 (gesuchnr,benutzer_id) values (1,1); -replace into t1 (gesuchnr,benutzer_id) values (1,1); -insert into t1 (gesuchnr, benutzer_id) value (3,2); -replace into t1 (gesuchnr,benutzer_id) values (1,1); -replace into t1 (gesuchnr,benutzer_id) values (1,1); ---error ER_DUP_ENTRY -insert into t1 (gesuchnr,benutzer_id) values (1,1); -replace into t1 (gesuchnr,benutzer_id) values (1,1); -select * from t1 order by gesuchnr; -drop table t1; - -# End of 4.1 tests - -# bug#17431 -CREATE TABLE t1(i INT PRIMARY KEY AUTO_INCREMENT, - j INT, - k INT, - UNIQUE INDEX(j) - ) ENGINE = ndb; -INSERT INTO t1 VALUES (1,1,23),(2,2,24); -REPLACE INTO t1 (j,k) VALUES (1,42); -REPLACE INTO t1 (i,j) VALUES (17,2); -SELECT * from t1 ORDER BY i; -DROP TABLE t1; - -# bug#19906 -CREATE TABLE t2 (a INT(11) NOT NULL, - b INT(11) NOT NULL, - c INT(11) NOT NULL, - x TEXT, - y TEXT, - z TEXT, - id INT(10) unsigned NOT NULL AUTO_INCREMENT, - i INT(11) DEFAULT NULL, - PRIMARY KEY (id), - UNIQUE KEY a (a,b,c) -) ENGINE=ndbcluster; - -REPLACE INTO t2 (a,b,c,x,y,z,i) VALUES (1,1,1,'a','a','a',1),(1,1,1,'b','b','b',2), (1,1,1,'c','c','c',3); - -SELECT * FROM t2 ORDER BY id; - -REPLACE INTO t2(a,b,c,x,y,z,i) values (1,1,1,'a','a','a',1); -REPLACE INTO t2(a,b,c,x,y,z,i) values (1,1,1,'b','b','b',2); - -SELECT * FROM t2 ORDER BY id; - -DROP TABLE t2; - -# -# Bug #20728 "REPLACE does not work correctly for NDB table with PK and -# unique index" -# ---disable_warnings -drop table if exists t1; ---enable_warnings -create table t1 (pk int primary key, apk int unique, data int) engine=ndbcluster; -# Test for plain replace which updates pk -insert into t1 values (1, 1, 1), (2, 2, 2), (3, 3, 3); -replace into t1 (pk, apk) values (4, 1), (5, 2); -select * from t1 order by pk; -delete from t1; -# Another test for plain replace which doesn't touch pk -insert into t1 values (1, 1, 1), (2, 2, 2), (3, 3, 3); -replace into t1 (pk, apk) values (1, 4), (2, 5); -select * from t1 order by pk; -delete from t1; -# Test for load data replace which updates pk -insert into t1 values (1, 1, 1), (4, 4, 4), (6, 6, 6); -load data infile '../../../std_data/loaddata5.dat' replace into table t1 fields terminated by '' enclosed by '' ignore 1 lines (pk, apk); -select * from t1 order by pk; -delete from t1; -# Now test for load data replace which doesn't touch pk -insert into t1 values (1, 1, 1), (3, 3, 3), (5, 5, 5); -load data infile '../../../std_data/loaddata5.dat' replace into table t1 fields terminated by '' enclosed by '' ignore 1 lines (pk, apk); -select * from t1 order by pk; -delete from t1; -# Finally test for both types of replace ... select -insert into t1 values (1, 1, 1), (2, 2, 2), (3, 3, 3); -replace into t1 (pk, apk) select 4, 1; -replace into t1 (pk, apk) select 2, 4; -select * from t1 order by pk; -# Clean-up -drop table t1; - ---echo End of 5.0 tests. diff --git a/mysql-test/suite/ndb/t/ndb_restore.test b/mysql-test/suite/ndb/t/ndb_restore.test deleted file mode 100644 index c8b07fd351a..00000000000 --- a/mysql-test/suite/ndb/t/ndb_restore.test +++ /dev/null @@ -1,413 +0,0 @@ --- source include/have_ndb.inc --- source include/ndb_default_cluster.inc --- source include/not_embedded.inc - ---disable_warnings -use test; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; -drop table if exists t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c; ---enable_warnings - -# Bug #27775 - mediumint auto inc not restored correctly -# - check mediumint -CREATE TABLE `t1_c` ( - `capgoaledatta` mediumint(5) unsigned NOT NULL auto_increment, - `goaledatta` char(2) NOT NULL default '', - `maturegarbagefa` varchar(32) NOT NULL default '', - PRIMARY KEY (`capgoaledatta`,`goaledatta`,`maturegarbagefa`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t1_c` VALUES (2,'3','q3plus.qt'),(400,'4','q3plus.qt'),(1,'3','q3.net'),(3,'4','q3.net'),(3000,'20','threetrees.qt'); -# -# Bug #27758 Restoring NDB backups makes table usable in SQL nodes -# - space in key made table unusable after restore -# -# Bug #27775 - mediumint auto inc not restored correctly -# - check smallint -CREATE TABLE `t2_c` ( - `capgotod` smallint(5) unsigned NOT NULL auto_increment, - `gotod` smallint(5) unsigned NOT NULL default '0', - `goaledatta` char(2) default NULL, - `maturegarbagefa` varchar(32) default NULL, - `descrpooppo` varchar(64) default NULL, - `svcutonsa` varchar(64) NOT NULL default '', - PRIMARY KEY (`capgotod`), - KEY `i quadaddsvr` (`gotod`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t2_c` VALUES (500,4,'','q3.net','addavp:MK_CASELECTOR=1','postorod rattoaa'),(2,1,'4','','addavp:MK_BRANDTAD=345','REDS Brandtad'),(3,2,'4','q3.net','execorder','fixedRatediPO REDS'),(1,1,'3','','addavp:MK_BRANDTAD=123','TEST Brandtad'),(6,5,'','told.q3.net','addavp:MK_BRANDTAD=123','Brandtad Toldzone'),(4,3,'3','q3.net','addavp:MK_POOLHINT=2','ratedi PO TEST'),(5,0,'',NULL,NULL,''); - -# Added ROW_FORMAT=FIXED to use below to see that setting is preserved -# by restore -CREATE TABLE `t3_c` ( - `CapGoaledatta` smallint(5) unsigned NOT NULL default '0', - `capgotod` smallint(5) unsigned NOT NULL default '0', - PRIMARY KEY (`capgotod`,`CapGoaledatta`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 ROW_FORMAT=FIXED; -INSERT INTO `t3_c` VALUES (5,3),(2,4),(5,4),(1,3); - -# Bug #27775 - mediumint auto inc not restored correctly -# - check bigint -CREATE TABLE `t4_c` ( - `capfa` bigint(20) unsigned NOT NULL auto_increment, - `realm` varchar(32) NOT NULL default '', - `authpwchap` varchar(32) default NULL, - `fa` varchar(32) NOT NULL default '', - `payyingatta` tinyint(4) NOT NULL default '0', - `status` char(1) default NULL, - PRIMARY KEY (`fa`,`realm`), - KEY `capfa` (`capfa`), - KEY `i_quadentity` (`fa`,`realm`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t4_c` VALUES (18,'john.smith','q3.net','dessjohn.smith',0,NULL),(21,'quad_katt_with_brandtad','q3.net','acne',0,NULL),(2200,'quad_katt_carattoaa','q3.net','acne',0,NULL),(26,'436462612809','sqasdt.q3.net','N/A',0,'6'),(19,'john','smith.qt','dessjohn',0,NULL),(33,'436643196120','sqasdt.q3.net','N/A',1,'6'),(28,'436642900019','sqasdt.q3.net','N/A',0,'6'),(30,'436462900209','sqasdt.q3.net','N/A',0,'6'),(16,'436640006666','sqasdt.q3.net','',0,NULL),(19,'dette','el-redun.com','dessdette',0,NULL),(12,'quad_kattPP','q3.net','acne',2,NULL),(14,'436640008888','sqasdt.q3.net','',0,NULL),(29,'463624900028','sqasdt.q3.net','N/A',0,'6'),(15,'436640099099','sqasdt.q3.net','',0,NULL),(13,'pap','q3plus.qt','acne',1,NULL),(19,'436642612091','sqasdt.q3.net','N/A',0,'6'),(12,'quad_katt','q3.net','acne',0,NULL),(11,'quad_kattVK','q3.net','acne',1,NULL),(32000,'463641969502','sqasdt.q3.net','N/A',1,'6'),(20,'joe','q3.net','joedesswd',0,NULL),(290000000,'436642900034','sqasdt.q3.net','N/A',0,'6'),(25,'contind','armerde.qt','acne',1,NULL); - -CREATE TABLE `t5_c` ( - `capfa` bigint(20) unsigned NOT NULL default '0', - `gotod` smallint(5) unsigned NOT NULL default '0', - `orderutonsa` varchar(64) NOT NULL default '', - PRIMARY KEY (`capfa`,`gotod`,`orderutonsa`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t5_c` VALUES (21,2,''),(21,1,''),(22,4,''); - -CREATE TABLE `t6_c` ( - `capfa_parent` bigint(20) unsigned NOT NULL default '0', - `capfa_child` bigint(20) unsigned NOT NULL default '0', - `relatta` smallint(5) unsigned NOT NULL default '0', - PRIMARY KEY (`capfa_child`,`capfa_parent`,`relatta`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t6_c` VALUES (15,16,0),(19,20,0),(18326932092909551615,30,0),(26,29,0),(18326932092909551615,29,0),(19,18,0),(26,28,0),(12,14,0); - -# Bug #27775 - mediumint auto inc not restored correctly -# - check tinyint -CREATE TABLE `t7_c` ( - `dardpo` char(15) NOT NULL default '', - `dardtestard` tinyint(3) unsigned NOT NULL auto_increment, - `FastFA` char(5) NOT NULL default '', - `FastCode` char(6) NOT NULL default '', - `Fastca` char(1) NOT NULL default '', - `Fastmag` char(1) NOT NULL default '', - `Beareratta` char(2) NOT NULL default '', - PRIMARY KEY (`dardpo`,`dardtestard`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t7_c` VALUES ('2.6.2.4',24,'CECHP','54545','0','0','5'),('2.2.5.4',26,'CANFA','33223','1','1','4'),('4.3.2.4',28,'ITALD','54222','1','0','5'),('129..0.0.eins',28,'G','99999','1','1','5'),('1.1.1.1',24,'AUTPT','32323','0','1','3'); - -CREATE TABLE `t8_c` ( - `kattjame` varchar(32) NOT NULL default '', - `realm` varchar(32) NOT NULL default '', - `realm_entered` varchar(32) NOT NULL default '', - `maturegarbagefa` varchar(32) NOT NULL default '', - `hunderaaarbagefa_parent` varchar(32) NOT NULL default '', - `kattjame_entered` varchar(32) NOT NULL default '', - `hunderaaarbagefa` varchar(32) NOT NULL default '', - `gest` varchar(16) default NULL, - `hassetino` varchar(16) NOT NULL default '', - `aaaproxysessfa` varchar(255) default NULL, - `autologonallowed` char(1) default NULL, - `squardporoot` varchar(15) NOT NULL default '', - `naspo` varchar(15) default NULL, - `beareratta` char(2) default NULL, - `fastCode` varchar(6) default NULL, - `fastFA` varchar(5) default NULL, - `fastca` char(1) default NULL, - `fastmag` char(1) default NULL, - `lastupdate` datetime default NULL, - `hassetistart` datetime NOT NULL default '0000-00-00 00:00:00', - `accthassetitime` int(10) unsigned default NULL, - `acctoutputoctets` bigint(20) unsigned default NULL, - `acctinputoctets` bigint(20) unsigned default NULL, - PRIMARY KEY (`kattjame`,`hunderaaarbagefa`,`hassetistart`,`hassetino`), - KEY `squardporoot` (`squardporoot`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t8_c` VALUES ('4tt45345235','pap','q3plus.qt','q3plus.qt','q3.net','436643196120','436643196929','8956234534568968','5524595699','uxasmt21.net.acne.qt/481889229462692422','','1.1.1.1','2.2.4.6','4','86989','34','x','x','2012-03-12 12:55:34','2012-12-05 11:20:04',3223433,3369,9565),('4545435545','john','q3.net','q3.net','acne.li','436643196120','436643196929','45345234568968','995696699','uxasmt21.net.acne.qt/481889229462692423','','1.1.1.1','2.2.9.8','2','86989','34','x','x','2012-03-12 11:35:03','2012-12-05 08:50:04',8821923,169,3565),('versteckter_q3net_katt','joe','q3.net','elredun.com','q3.net','436643196120','436643196939','91341234568968','695595699','uxasmt21.net.acne.qt/481889229462692421','','1.1.1.1','2.5.2.5','3','86989','34','x','x','2012-03-12 18:35:04','2012-12-05 12:35:04',1923123,9569,6565); - -CREATE TABLE `t9_c` ( - `kattjame` varchar(32) NOT NULL default '', - `kattjame_entered` varchar(32) NOT NULL default '', - `realm` varchar(32) NOT NULL default '', - `realm_entered` varchar(32) NOT NULL default '', - `maturegarbagefa` varchar(32) NOT NULL default '', - `hunderaaarbagefa` varchar(32) NOT NULL default '', - `hunderaaarbagefa_parent` varchar(32) NOT NULL default '', - `gest` varchar(16) default NULL, - `hassetino` varchar(16) NOT NULL default '', - `squardporoot` varchar(15) NOT NULL default '', - `naspo` varchar(15) default NULL, - `beareratta` char(2) default NULL, - `fastCode` varchar(6) default NULL, - `fastFA` varchar(5) default NULL, - `fastca` char(1) default NULL, - `fastmag` char(1) default NULL, - `lastupdate` datetime default NULL, - `hassetistart` datetime NOT NULL default '0000-00-00 00:00:00', - `accthassetitime` int(10) unsigned default NULL, - `actcoutpuocttets` bigint(20) unsigned default NULL, - `actinputocctets` bigint(20) unsigned default NULL, - `terminateraste` tinyint(3) unsigned default NULL, - PRIMARY KEY (`kattjame`,`hunderaaarbagefa`,`hassetistart`,`hassetino`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t9_c` VALUES ('3g4jh8gar2t','joe','q3.net','elredun.com','q3.net','436643316120','436643316939','91341234568968','695595699','1.1.1.1','2.2.6.2','3','86989','34','x','x','2012-03-12 18:35:04','2012-12-05 12:35:04',3123123,9569,6565,1),('4tt45345235','pap','q3plus.qt','q3plus.qt','q3.net','436643316120','436643316939','8956234534568968','5254595969','1.1.1.1','8.6.2.2','4','86989','34','x','x','2012-03-12 12:55:34','2012-12-05 11:20:04',3223433,3369,9565,2),('4545435545','john','q3.net','q3.net','acne.li','436643316120','436643316939','45345234568968','995696699','1.1.1.1','2.9.9.2','2','86998','34','x','x','2012-03-12 11:35:03','2012-12-05 08:50:04',8823123,169,3565,3); - -# Bug #20820 -# auto inc table not handled correctly when restored from cluster backup -# - before fix ndb_restore would not set auto inc value correct, -# seen by select below -CREATE TABLE t10_c (a INT AUTO_INCREMENT KEY) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO t10_c VALUES (1),(2),(3); -# Bug #27775 - mediumint auto inc not restored correctly -# - check int -insert into t10_c values (10000),(2000),(3000); - -create table t1 engine=myisam as select * from t1_c; -create table t2 engine=myisam as select * from t2_c; -create table t3 engine=myisam as select * from t3_c; -create table t4 engine=myisam as select * from t4_c; -create table t5 engine=myisam as select * from t5_c; -create table t6 engine=myisam as select * from t6_c; -create table t7 engine=myisam as select * from t7_c; -create table t8 engine=myisam as select * from t8_c; -create table t9 engine=myisam as select * from t9_c; -create table t10 engine=myisam as select * from t10_c; - -# check that force varpart is preserved by ndb_restore -# t3_c has ROW_FORMAT=FIXED i.e. ForceVarPart=0 ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t3_c | grep ForceVarPart ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t2_c | grep ForceVarPart - ---source include/ndb_backup.inc -drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c; ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 1 -m -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 2 -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT -# check that force varpart is preserved by ndb_restore -# t3_c has ROW_FORMAT=FIXED i.e. ForceVarPart=0 ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t3_c | grep ForceVarPart ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t2_c | grep ForceVarPart - -# Bug #30667 -# ndb table discovery does not work correcly with information schema -# - prior to bug fix this would yeild no output and a warning -select * from information_schema.columns where table_name = "t1_c"; - -# random output order?? -#show tables; - -select count(*) from t1; -select count(*) from t1_c; -select count(*) - from (select * from t1 union - select * from t1_c) a; - -select count(*) from t2; -select count(*) from t2_c; -select count(*) - from (select * from t2 union - select * from t2_c) a; - -select count(*) from t3; -select count(*) from t3_c; -select count(*) - from (select * from t3 union - select * from t3_c) a; - -select count(*) from t4; -select count(*) from t4_c; -select count(*) - from (select * from t4 union - select * from t4_c) a; - -select count(*) from t5; -select count(*) from t5_c; -select count(*) - from (select * from t5 union - select * from t5_c) a; - -select count(*) from t6; -select count(*) from t6_c; -select count(*) - from (select * from t6 union - select * from t6_c) a; - -select count(*) from t7; -select count(*) from t7_c; -select count(*) - from (select * from t7 union - select * from t7_c) a; - -select count(*) from t8; -select count(*) from t8_c; -select count(*) - from (select * from t8 union - select * from t8_c) a; - -select count(*) from t9; -select count(*) from t9_c; -select count(*) - from (select * from t9 union - select * from t9_c) a; - -# Bug #20820 cont'd -select * from t10_c order by a; -# Bug #27775 cont'd -# - auto inc info should be correct -select max(capgoaledatta) from t1_c; -select auto_increment from information_schema.tables -where table_name = 't1_c'; -select max(capgotod) from t2_c; -select auto_increment from information_schema.tables -where table_name = 't2_c'; -select max(capfa) from t4_c; -select auto_increment from information_schema.tables -where table_name = 't4_c'; -select max(dardtestard) from t7_c; -select auto_increment from information_schema.tables -where table_name = 't7_c'; -select max(a) from t10_c; -select auto_increment from information_schema.tables -where table_name = 't10_c'; - -# -# Try Partitioned tables as well -# -ALTER TABLE t7_c -PARTITION BY LINEAR KEY (`dardtestard`); - ---source include/ndb_backup.inc -drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c; ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 1 -m -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 2 -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT - -select count(*) from t1; -select count(*) from t1_c; -select count(*) - from (select * from t1 union - select * from t1_c) a; - -select count(*) from t2; -select count(*) from t2_c; -select count(*) - from (select * from t2 union - select * from t2_c) a; - -select count(*) from t3; -select count(*) from t3_c; -select count(*) - from (select * from t3 union - select * from t3_c) a; - -select count(*) from t4; -select count(*) from t4_c; -select count(*) - from (select * from t4 union - select * from t4_c) a; - -select count(*) from t5; -select count(*) from t5_c; -select count(*) - from (select * from t5 union - select * from t5_c) a; - -select count(*) from t6; -select count(*) from t6_c; -select count(*) - from (select * from t6 union - select * from t6_c) a; - -select count(*) from t7; -select count(*) from t7_c; -select count(*) - from (select * from t7 union - select * from t7_c) a; - -select count(*) from t8; -select count(*) from t8_c; -select count(*) - from (select * from t8 union - select * from t8_c) a; - -select count(*) from t9; -select count(*) from t9_c; -select count(*) - from (select * from t9 union - select * from t9_c) a; - -drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c; ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 1 -m -r --ndb-nodegroup_map '(0,0)' --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 2 -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT - -select count(*) from t1; -select count(*) from t1_c; -select count(*) - from (select * from t1 union - select * from t1_c) a; - -select count(*) from t2; -select count(*) from t2_c; -select count(*) - from (select * from t2 union - select * from t2_c) a; - -select count(*) from t3; -select count(*) from t3_c; -select count(*) - from (select * from t3 union - select * from t3_c) a; - -select count(*) from t4; -select count(*) from t4_c; -select count(*) - from (select * from t4 union - select * from t4_c) a; - -select count(*) from t5; -select count(*) from t5_c; -select count(*) - from (select * from t5 union - select * from t5_c) a; - -select count(*) from t6; -select count(*) from t6_c; -select count(*) - from (select * from t6 union - select * from t6_c) a; - -select count(*) from t7; -select count(*) from t7_c; -select count(*) - from (select * from t7 union - select * from t7_c) a; - -select count(*) from t8; -select count(*) from t8_c; -select count(*) - from (select * from t8 union - select * from t8_c) a; - -select count(*) from t9; -select count(*) from t9_c; -select count(*) - from (select * from t9 union - select * from t9_c) a; - -# -# Drop all table except t2_c -# This to make sure that error returned from ndb_restore above is -# guaranteed to be from t2_c, this since order of tables in backup -# is none deterministic -# -drop table t1_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c; ---source include/ndb_backup.inc ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --core=0 -b $the_backup_id -n 1 -m -r --ndb-nodegroup_map '(0,1)' $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id 2>&1 | grep Translate || true - -# -# Cleanup -# - ---disable_warnings -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; -drop table if exists t2_c; ---enable_warnings - -# -# Test BUG#10287 -# - ---exec $NDB_TOOLS_DIR/ndb_select_all --no-defaults -d sys -D , SYSTAB_0 | grep 520093696, | sed "s/,$the_backup_id/,/" - -# End of 5.0 tests (4.1 test intermixed to save test time) diff --git a/mysql-test/suite/ndb/t/ndb_restore_compat.test b/mysql-test/suite/ndb/t/ndb_restore_compat.test deleted file mode 100644 index 8e5b30aa6fd..00000000000 --- a/mysql-test/suite/ndb/t/ndb_restore_compat.test +++ /dev/null @@ -1,67 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc --- source include/have_case_sensitive_file_system.inc - -# This test currently requires case sensitive file system as the tables -# are originally stored with uppercase - -# -# Bug #18594 ndb_restore log boken in 5.1 -# - ---disable_warnings -DROP DATABASE IF EXISTS BANK; ---enable_warnings -CREATE DATABASE BANK default charset=latin1 default collate=latin1_bin; ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b 1 -n 1 -p 1 -m -r $MYSQL_TEST_DIR/std_data/ndb_backup51 >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -e -b 1 -n 2 -p 1 -r $MYSQL_TEST_DIR/std_data/ndb_backup51 >> $NDB_TOOLS_OUTPUT -USE BANK; -SHOW TABLES; -SELECT * FROM GL ORDER BY TIME,ACCOUNT_TYPE; -SELECT * FROM ACCOUNT ORDER BY ACCOUNT_ID; -SELECT COUNT(*) FROM TRANSACTION; -SELECT * FROM SYSTEM_VALUES ORDER BY SYSTEM_VALUES_ID; -SELECT * FROM mysql.ndb_apply_status WHERE server_id=0; - -# Check that force varpart is set by ndb_restore ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK GL | grep ForceVarPart ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK ACCOUNT | grep ForceVarPart ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK TRANSACTION | grep ForceVarPart ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK SYSTEM_VALUES | grep ForceVarPart ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK ACCOUNT_TYPE | grep ForceVarPart - -# -# verify restore of 5.0 backup -# here we must use the already created tables as restoring the old -# table definitions will not work -# -TRUNCATE GL; -TRUNCATE ACCOUNT; -TRUNCATE TRANSACTION; -TRUNCATE SYSTEM_VALUES; -TRUNCATE ACCOUNT_TYPE; - -# Check that force varpart is not changed by truncate ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK GL | grep ForceVarPart ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK ACCOUNT | grep ForceVarPart ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK TRANSACTION | grep ForceVarPart ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK SYSTEM_VALUES | grep ForceVarPart ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK ACCOUNT_TYPE | grep ForceVarPart - -# Restore data ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b 1 -n 1 -p 1 -r $MYSQL_TEST_DIR/std_data/ndb_backup50 >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -e -b 1 -n 2 -p 1 -r $MYSQL_TEST_DIR/std_data/ndb_backup50 >> $NDB_TOOLS_OUTPUT - -# Check data -SELECT * FROM GL ORDER BY TIME,ACCOUNT_TYPE; -SELECT * FROM ACCOUNT ORDER BY ACCOUNT_ID; -SELECT COUNT(*) FROM TRANSACTION; -SELECT * FROM SYSTEM_VALUES ORDER BY SYSTEM_VALUES_ID; -SELECT * FROM mysql.ndb_apply_status WHERE server_id=0; ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b 2 -n 1 -m -p 1 -s -r $MYSQL_TEST_DIR/std_data/ndb_backup50 >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b 2 -n 2 -p 1 -s -r $MYSQL_TEST_DIR/std_data/ndb_backup50 >> $NDB_TOOLS_OUTPUT -SELECT * FROM DESCRIPTION ORDER BY USERNAME; ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK DESCRIPTION | grep SHORT_VAR ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK DESCRIPTION | grep MEDIUM_VAR - -DROP DATABASE BANK; diff --git a/mysql-test/suite/ndb/t/ndb_restore_different_endian_data.test b/mysql-test/suite/ndb/t/ndb_restore_different_endian_data.test deleted file mode 100644 index 069796f43c4..00000000000 --- a/mysql-test/suite/ndb/t/ndb_restore_different_endian_data.test +++ /dev/null @@ -1,185 +0,0 @@ --- source include/have_ndb.inc --- source include/ndb_default_cluster.inc --- source include/not_embedded.inc - -# -# Bug #27543 restore of backup from different endian does not work for blob column -# Bug #30024 restore of backup from different endian does not work for datetime column -# Bug #28674 backup will run forever if disk full and later write succes will kill ndb node -# -# The table structure and data list below -# -# CREATE TABLE t_num ( -# t_pk INT PRIMARY KEY, -# t_bit BIT(64), -# t_tinyint TINYINT, -# t_bool BOOL, -# t_smallint SMALLINT, -# t_mediumint MEDIUMINT, -# t_int INT, -# t_bigint BIGINT, -# t_float FLOAT, -# t_double DOUBLE, -# t_decimal DECIMAL (37, 16) -# ) ENGINE=NDBCLUSTER; -# -# INSERT INTO t_num VALUE ( -# 1, -# b'1010101010101010101010101010101010101010101010101010101010101010', -# 125, -# 1, -# 32765, -# 8388606, -# 2147483647, -# 9223372036854775807, -# 1e+20, -# 1e+150, -# '331.0000000000' -# ); -# -# CREATE TABLE t_datetime ( -# t_pk INT PRIMARY KEY, -# t_date DATE, -# t_datetime DATETIME, -# t_timestamp TIMESTAMP, -# t_time TIME, -# t_year YEAR -# ) ENGINE=NDBCLUSTER; -# -# INSERT INTO t_datetime VALUE ( -# 1, -# '1998-01-01', -# '2006-08-10 10:11:12', -# 20021029165106, -# '19:38:34', -# 2155 -# ); -# -# CREATE TABLE t_string_1 ( -# t_pk INT PRIMARY KEY, -# t_char CHAR(255), -# t_varchar VARCHAR(655), -# t_binary BINARY(255), -# t_varbinary VARBINARY(6553) -# ) ENGINE=NDBCLUSTER; -# -# CREATE TABLE t_string_2 ( -# t_pk INT PRIMARY KEY, -# t_tinyblob TINYBLOB, -# t_tinytext TINYTEXT, -# t_blob BLOB, -# t_text TEXT, -# t_mediumblob MEDIUMBLOB, -# t_mediumtext MEDIUMTEXT, -# t_longblob LONGBLOB, -# t_longtext LONGTEXT, -# t_enum ENUM('001001','001004','001010','001018','001019','001020','001021','001027','001028','001029','001030','001031','001100','002003','002004','002005','002007')DEFAULT '001001' NOT NULL, -# t_set SET('a','B') -# ) ENGINE=NDBCLUSTER; -# -# INSERT INTO t_string_1 VALUE ( -# 1, -# 'abcdefghijklmn', -# 'abcdefghijklmnabcdefghijklmnabcdefghijklmnabcdefghijklmn', -# 0x612020, -# 0x4100 -# ); -# -# INSERT INTO t_string_2 VALUE ( -# 1, -# 'abcdefghijklmnabcdefghijklmn', -# 'abcdefghijklmnabcdefghijklmn', -# 'a123456789b123456789c123456789d123456789e123456789f123456789g123456789', -# 'a123456789b123456789c123456789d123456789e123456789f123456789g123456789', -# 'a123456789b123456789c123456789d123456789e123456789f123456789g123456789', -# 'a123456789b123456789c123456789d123456789e123456789f123456789g123456789', -# 'a123456789b123456789c123456789d123456789e123456789f123456789g123456789', -# 'a123456789b123456789c123456789d123456789e123456789f123456789g123456789', -# '001001', -# 'a' -# ); -# -# CREATE TABLE t_gis ( -# t_pk INT PRIMARY KEY, -# t_point POINT, -# t_linestring LINESTRING, -# t_polygon POLYGON, -# t_multipoint MULTIPOINT, -# t_multilinestring MULTILINESTRING, -# t_multipolygon MULTIPOLYGON, -# t_geometrycollection GEOMETRYCOLLECTION, -# t_geometry GEOMETRY -# ) ENGINE=NDBCLUSTER; -# -# INSERT INTO t_gis VALUE ( -# 1, -# PointFromText('POINT(10 10)'), -# LineStringFromText('LINESTRING(10 10,20 10,20 20,10 20,10 10)'), -# PolyFromText('POLYGON((0 0,50 0,50 50,0 50,0 0), (10 10,20 10,20 20,10 20,10 10))'), -# MPointFromText('MULTIPOINT(1 1,11 11,11 21,21 21)'), -# MLineFromText('MULTILINESTRING((10 48,10 21,10 0))'), -# MPolyFromText('MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))'), -# GeomCollFromText('GEOMETRYCOLLECTION(POINT(0 0), LINESTRING(0 0,10 10))'), -# MPolyFromText('MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))') -# ); -# -# INSERT INTO t_gis VALUE ( -# 2, -# PointFromWKB(AsWKB(PointFromText('POINT(10 20)'))), -# LineStringFromWKB(LineString(Point(10, 10), Point(40, 10))), -# PolyFromWKB(Polygon(LineString(Point(0, 0), Point(30, 0), Point(30, 30), Point(0, 0)))), -# MPointFromWKB(MultiPoint(Point(3, 6), Point(4, 10))), -# MLineFromWKB(MultiLineString(LineString(Point(1, 2), Point(3, 5)), LineString(Point(2, 5), Point(5, 8), Point(21, 7)))), -# MPolyFromWKB(MultiPolygon(Polygon(LineString(Point(0, 3), Point(3, 3), Point(3, 0), Point(0, 3))))), -# GeometryFromWKB(GeometryCollection(Point(44, 6), LineString(Point(3, 6), Point(7, 9)))), -# GeometryFromWKB(GeometryCollection(Point(44, 6), LineString(Point(3, 6), Point(7, 9)))) -# ); - - - -# -# Restore backup files (from little endian) -# - ---disable_warnings -USE test; -DROP TABLE IF EXISTS t_num,t_datetime,t_string_1,t_string_2,t_gis; ---enable_warnings ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b 1 -n 1 -m -r $MYSQL_TEST_DIR/std_data/ndb_backup51_data_le >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b 1 -n 2 -r $MYSQL_TEST_DIR/std_data/ndb_backup51_data_le >> $NDB_TOOLS_OUTPUT -SHOW TABLES; -SHOW CREATE TABLE t_num; -SHOW CREATE TABLE t_datetime; -SHOW CREATE TABLE t_string_1; -SHOW CREATE TABLE t_string_2; -SHOW CREATE TABLE t_gis; -SELECT * FROM t_datetime; -SELECT t_pk,hex(t_bit),t_tinyint,t_bool,t_smallint,t_mediumint,t_int,t_bigint,t_float,t_double,t_decimal FROM t_num; -SELECT t_pk,t_char,t_varchar,hex(t_binary),hex(t_varbinary) FROM t_string_1; -SELECT * FROM t_string_2; -SELECT AsText(t_point), AsText(t_linestring),AsText(t_polygon) FROM t_gis ORDER by t_pk; -SELECT AsText(t_multipoint), AsText(t_multilinestring),AsText(t_multipolygon) FROM t_gis ORDER by t_pk; -SELECT AsText(t_geometrycollection), AsText(t_geometry) FROM t_gis ORDER by t_pk; - -# -# Restore backup files (from big endian) -# - -DROP TABLE t_num,t_datetime,t_string_1,t_string_2,t_gis; ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b 1 -n 1 -m -r $MYSQL_TEST_DIR/std_data/ndb_backup51_data_be >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b 1 -n 2 -r $MYSQL_TEST_DIR/std_data/ndb_backup51_data_be >> $NDB_TOOLS_OUTPUT -SHOW TABLES; -SHOW CREATE TABLE t_num; -SHOW CREATE TABLE t_datetime; -SHOW CREATE TABLE t_string_1; -SHOW CREATE TABLE t_string_2; -SHOW CREATE TABLE t_gis; -SELECT * FROM t_datetime; -SELECT t_pk,hex(t_bit),t_tinyint,t_bool,t_smallint,t_mediumint,t_int,t_bigint,t_float,t_double,t_decimal FROM t_num; -SELECT t_pk,t_char,t_varchar,hex(t_binary),hex(t_varbinary) FROM t_string_1; -SELECT * FROM t_string_2; -SELECT AsText(t_point), AsText(t_linestring),AsText(t_polygon) FROM t_gis ORDER by t_pk; -SELECT AsText(t_multipoint), AsText(t_multilinestring),AsText(t_multipolygon) FROM t_gis ORDER by t_pk; -SELECT AsText(t_geometrycollection), AsText(t_geometry) FROM t_gis ORDER by t_pk; - -DROP TABLE t_num,t_datetime,t_string_1,t_string_2,t_gis; diff --git a/mysql-test/suite/ndb/t/ndb_restore_partition-master.opt b/mysql-test/suite/ndb/t/ndb_restore_partition-master.opt deleted file mode 100644 index 075c6392dde..00000000000 --- a/mysql-test/suite/ndb/t/ndb_restore_partition-master.opt +++ /dev/null @@ -1 +0,0 @@ ---new diff --git a/mysql-test/suite/ndb/t/ndb_restore_partition.test b/mysql-test/suite/ndb/t/ndb_restore_partition.test deleted file mode 100644 index f11324492c2..00000000000 --- a/mysql-test/suite/ndb/t/ndb_restore_partition.test +++ /dev/null @@ -1,375 +0,0 @@ --- source include/have_ndb.inc --- source include/ndb_default_cluster.inc --- source include/not_embedded.inc - ---disable_warnings -use test; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -drop table if exists t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c; ---enable_warnings - -CREATE TABLE `t1_c` ( - `capgoaledatta` smallint(5) unsigned NOT NULL auto_increment, - `goaledatta` char(2) NOT NULL default '', - `maturegarbagefa` varchar(32) NOT NULL default '', - PRIMARY KEY (`capgoaledatta`,`goaledatta`,`maturegarbagefa`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t1_c` VALUES (2,'3','q3plus.qt'),(4,'4','q3plus.qt'),(1,'3','q3.net'),(3,'4','q3.net'),(3,'20','threetrees.qt'); - -CREATE TABLE `t2_c` ( - `capgotod` smallint(5) unsigned NOT NULL auto_increment, - `gotod` smallint(5) unsigned NOT NULL default '0', - `goaledatta` char(2) default NULL, - `maturegarbagefa` varchar(32) default NULL, - `descrpooppo` varchar(64) default NULL, - `svcutonsa` varchar(64) NOT NULL default '', - PRIMARY KEY (`capgotod`), - KEY `i_quadaddsvr` (`gotod`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t2_c` VALUES (5,4,'','q3.net','addavp:MK_CASELECTOR=1','postorod rattoaa'),(2,1,'4','','addavp:MK_BRANDTAD=345','REDS Brandtad'),(3,2,'4','q3.net','execorder','fixedRatediPO REDS'),(1,1,'3','','addavp:MK_BRANDTAD=123','TEST Brandtad'),(6,5,'','told.q3.net','addavp:MK_BRANDTAD=123','Brandtad Toldzone'),(4,3,'3','q3.net','addavp:MK_POOLHINT=2','ratedi PO TEST'); - -CREATE TABLE `t3_c` ( - `CapGoaledatta` smallint(5) unsigned NOT NULL default '0', - `capgotod` smallint(5) unsigned NOT NULL default '0', - PRIMARY KEY (`capgotod`,`CapGoaledatta`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t3_c` VALUES (5,3),(2,4),(5,4),(1,3); - -CREATE TABLE `t4_c` ( - `capfa` bigint(20) unsigned NOT NULL auto_increment, - `realm` varchar(32) NOT NULL default '', - `authpwchap` varchar(32) default NULL, - `fa` varchar(32) NOT NULL default '', - `payyingatta` tinyint(4) NOT NULL default '0', - `status` char(1) default NULL, - PRIMARY KEY (`fa`,`realm`), - KEY `capfa` (`capfa`), - KEY `i_quadentity` (`fa`,`realm`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t4_c` VALUES (18,'john.smith','q3.net','dessjohn.smith',0,NULL),(21,'quad_katt_with_brandtad','q3.net','acne',0,NULL),(22,'quad_katt_carattoaa','q3.net','acne',0,NULL),(26,'436462612809','sqasdt.q3.net','N/A',0,'6'),(19,'john','smith.qt','dessjohn',0,NULL),(33,'436643196120','sqasdt.q3.net','N/A',1,'6'),(28,'436642900019','sqasdt.q3.net','N/A',0,'6'),(30,'436462900209','sqasdt.q3.net','N/A',0,'6'),(16,'436640006666','sqasdt.q3.net','',0,NULL),(19,'dette','el-redun.com','dessdette',0,NULL),(12,'quad_kattPP','q3.net','acne',2,NULL),(14,'436640008888','sqasdt.q3.net','',0,NULL),(29,'463624900028','sqasdt.q3.net','N/A',0,'6'),(15,'436640099099','sqasdt.q3.net','',0,NULL),(13,'pap','q3plus.qt','acne',1,NULL),(19,'436642612091','sqasdt.q3.net','N/A',0,'6'),(12,'quad_katt','q3.net','acne',0,NULL),(11,'quad_kattVK','q3.net','acne',1,NULL),(32,'463641969502','sqasdt.q3.net','N/A',1,'6'),(20,'joe','q3.net','joedesswd',0,NULL),(29,'436642900034','sqasdt.q3.net','N/A',0,'6'),(25,'contind','armerde.qt','acne',1,NULL); - -CREATE TABLE `t5_c` ( - `capfa` bigint(20) unsigned NOT NULL default '0', - `gotod` smallint(5) unsigned NOT NULL default '0', - `orderutonsa` varchar(64) NOT NULL default '', - PRIMARY KEY (`capfa`,`gotod`,`orderutonsa`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t5_c` VALUES (21,2,''),(21,1,''),(22,4,''); - -CREATE TABLE `t6_c` ( - `capfa_parent` bigint(20) unsigned NOT NULL default '0', - `capfa_child` bigint(20) unsigned NOT NULL default '0', - `relatta` smallint(5) unsigned NOT NULL default '0', - PRIMARY KEY (`capfa_child`,`capfa_parent`,`relatta`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t6_c` VALUES (15,16,0),(19,20,0),(18326932092909551615,30,0),(26,29,0),(18326932092909551615,29,0),(19,18,0),(26,28,0),(12,14,0); - -CREATE TABLE `t7_c` ( - `dardpo` char(15) NOT NULL default '', - `dardtestard` tinyint(3) unsigned NOT NULL default '0', - `FastFA` char(5) NOT NULL default '', - `FastCode` char(6) NOT NULL default '', - `Fastca` char(1) NOT NULL default '', - `Fastmag` char(1) NOT NULL default '', - `Beareratta` char(2) NOT NULL default '', - PRIMARY KEY (`dardpo`,`dardtestard`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t7_c` VALUES ('2.6.2.4',24,'CECHP','54545','0','0','5'),('2.2.5.4',26,'CANFA','33223','1','1','4'),('4.3.2.4',28,'ITALD','54222','1','0','5'),('129..0.0.eins',28,'G','99999','1','1','5'),('1.1.1.1',24,'AUTPT','32323','0','1','3'); - -CREATE TABLE `t8_c` ( - `kattjame` varchar(32) NOT NULL default '', - `realm` varchar(32) NOT NULL default '', - `realm_entered` varchar(32) NOT NULL default '', - `maturegarbagefa` varchar(32) NOT NULL default '', - `hunderaaarbagefa_parent` varchar(32) NOT NULL default '', - `kattjame_entered` varchar(32) NOT NULL default '', - `hunderaaarbagefa` varchar(32) NOT NULL default '', - `gest` varchar(16) default NULL, - `hassetino` varchar(16) NOT NULL default '', - `aaaproxysessfa` varchar(255) default NULL, - `autologonallowed` char(1) default NULL, - `squardporoot` varchar(15) NOT NULL default '', - `naspo` varchar(15) default NULL, - `beareratta` char(2) default NULL, - `fastCode` varchar(6) default NULL, - `fastFA` varchar(5) default NULL, - `fastca` char(1) default NULL, - `fastmag` char(1) default NULL, - `lastupdate` datetime default NULL, - `hassetistart` datetime NOT NULL default '0000-00-00 00:00:00', - `accthassetitime` int(10) unsigned default NULL, - `acctoutputoctets` bigint(20) unsigned default NULL, - `acctinputoctets` bigint(20) unsigned default NULL, - PRIMARY KEY (`kattjame`,`hunderaaarbagefa`,`hassetistart`,`hassetino`), - KEY `squardporoot` (`squardporoot`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t8_c` VALUES ('4tt45345235','pap','q3plus.qt','q3plus.qt','q3.net','436643196120','436643196929','8956234534568968','5524595699','uxasmt21.net.acne.qt/481889229462692422','','1.1.1.1','2.2.4.6','4','86989','34','x','x','2012-03-12 12:55:34','2012-12-05 11:20:04',3223433,3369,9565),('4545435545','john','q3.net','q3.net','acne.li','436643196120','436643196929','45345234568968','995696699','uxasmt21.net.acne.qt/481889229462692423','','1.1.1.1','2.2.9.8','2','86989','34','x','x','2012-03-12 11:35:03','2012-12-05 08:50:04',8821923,169,3565),('versteckter_q3net_katt','joe','q3.net','elredun.com','q3.net','436643196120','436643196939','91341234568968','695595699','uxasmt21.net.acne.qt/481889229462692421','','1.1.1.1','2.5.2.5','3','86989','34','x','x','2012-03-12 18:35:04','2012-12-05 12:35:04',1923123,9569,6565); - -CREATE TABLE `t9_c` ( - `kattjame` varchar(32) NOT NULL default '', - `kattjame_entered` varchar(32) NOT NULL default '', - `realm` varchar(32) NOT NULL default '', - `realm_entered` varchar(32) NOT NULL default '', - `maturegarbagefa` varchar(32) NOT NULL default '', - `hunderaaarbagefa` varchar(32) NOT NULL default '', - `hunderaaarbagefa_parent` varchar(32) NOT NULL default '', - `gest` varchar(16) default NULL, - `hassetino` varchar(16) NOT NULL default '', - `squardporoot` varchar(15) NOT NULL default '', - `naspo` varchar(15) default NULL, - `beareratta` char(2) default NULL, - `fastCode` varchar(6) default NULL, - `fastFA` varchar(5) default NULL, - `fastca` char(1) default NULL, - `fastmag` char(1) default NULL, - `lastupdate` datetime default NULL, - `hassetistart` datetime NOT NULL default '0000-00-00 00:00:00', - `accthassetitime` int(10) unsigned default NULL, - `actcoutpuocttets` bigint(20) unsigned default NULL, - `actinputocctets` bigint(20) unsigned default NULL, - `terminateraste` tinyint(3) unsigned default NULL, - PRIMARY KEY (`kattjame`,`hunderaaarbagefa`,`hassetistart`,`hassetino`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t9_c` VALUES ('3g4jh8gar2t','joe','q3.net','elredun.com','q3.net','436643316120','436643316939','91341234568968','695595699','1.1.1.1','2.2.6.2','3','86989','34','x','x','2012-03-12 18:35:04','2012-12-05 12:35:04',3123123,9569,6565,1),('4tt45345235','pap','q3plus.qt','q3plus.qt','q3.net','436643316120','436643316939','8956234534568968','5254595969','1.1.1.1','8.6.2.2','4','86989','34','x','x','2012-03-12 12:55:34','2012-12-05 11:20:04',3223433,3369,9565,2),('4545435545','john','q3.net','q3.net','acne.li','436643316120','436643316939','45345234568968','995696699','1.1.1.1','2.9.9.2','2','86998','34','x','x','2012-03-12 11:35:03','2012-12-05 08:50:04',8823123,169,3565,3); - -create table t1 engine=myisam as select * from t1_c; -create table t2 engine=myisam as select * from t2_c; -create table t3 engine=myisam as select * from t3_c; -create table t4 engine=myisam as select * from t4_c; -create table t5 engine=myisam as select * from t5_c; -create table t6 engine=myisam as select * from t6_c; -create table t7 engine=myisam as select * from t7_c; -create table t8 engine=myisam as select * from t8_c; -create table t9 engine=myisam as select * from t9_c; - - ---source include/ndb_backup.inc -drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c; ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 1 -m -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 2 -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT - -# random output order?? -#show tables; - -select count(*) from t1; -select count(*) from t1_c; -select count(*) - from (select * from t1 union - select * from t1_c) a; - -select count(*) from t2; -select count(*) from t2_c; -select count(*) - from (select * from t2 union - select * from t2_c) a; - -select count(*) from t3; -select count(*) from t3_c; -select count(*) - from (select * from t3 union - select * from t3_c) a; - -select count(*) from t4; -select count(*) from t4_c; -select count(*) - from (select * from t4 union - select * from t4_c) a; - -select count(*) from t5; -select count(*) from t5_c; -select count(*) - from (select * from t5 union - select * from t5_c) a; - -select count(*) from t6; -select count(*) from t6_c; -select count(*) - from (select * from t6 union - select * from t6_c) a; - -select count(*) from t7; -select count(*) from t7_c; -select count(*) - from (select * from t7 union - select * from t7_c) a; - -select count(*) from t8; -select count(*) from t8_c; -select count(*) - from (select * from t8 union - select * from t8_c) a; - -select count(*) from t9; -select count(*) from t9_c; -select count(*) - from (select * from t9 union - select * from t9_c) a; - -# -# Try Partitioned tables as well -# -ALTER TABLE t1_c -PARTITION BY RANGE (`capgoaledatta`) -(PARTITION p0 VALUES LESS THAN MAXVALUE); - -ALTER TABLE t2_c -PARTITION BY LIST(`capgotod`) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6)); - -ALTER TABLE t3_c -PARTITION BY HASH (`CapGoaledatta`); - -ALTER TABLE t5_c -PARTITION BY HASH (`capfa`) -PARTITIONS 4; - -ALTER TABLE t6_c -PARTITION BY LINEAR HASH (`relatta`) -PARTITIONS 4; - -ALTER TABLE t7_c -PARTITION BY LINEAR KEY (`dardtestard`); - ---source include/ndb_backup.inc -drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c; ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 1 -m -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 2 -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT - -select count(*) from t1; -select count(*) from t1_c; -select count(*) - from (select * from t1 union - select * from t1_c) a; - -select count(*) from t2; -select count(*) from t2_c; -select count(*) - from (select * from t2 union - select * from t2_c) a; - -select count(*) from t3; -select count(*) from t3_c; -select count(*) - from (select * from t3 union - select * from t3_c) a; - -select count(*) from t4; -select count(*) from t4_c; -select count(*) - from (select * from t4 union - select * from t4_c) a; - -select count(*) from t5; -select count(*) from t5_c; -select count(*) - from (select * from t5 union - select * from t5_c) a; - -select count(*) from t6; -select count(*) from t6_c; -select count(*) - from (select * from t6 union - select * from t6_c) a; - -select count(*) from t7; -select count(*) from t7_c; -select count(*) - from (select * from t7 union - select * from t7_c) a; - -select count(*) from t8; -select count(*) from t8_c; -select count(*) - from (select * from t8 union - select * from t8_c) a; - -select count(*) from t9; -select count(*) from t9_c; -select count(*) - from (select * from t9 union - select * from t9_c) a; - -drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c; ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 1 -m -r --ndb-nodegroup_map '(0,0)' --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 2 -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT - -select count(*) from t1; -select count(*) from t1_c; -select count(*) - from (select * from t1 union - select * from t1_c) a; - -select count(*) from t2; -select count(*) from t2_c; -select count(*) - from (select * from t2 union - select * from t2_c) a; - -select count(*) from t3; -select count(*) from t3_c; -select count(*) - from (select * from t3 union - select * from t3_c) a; - -select count(*) from t4; -select count(*) from t4_c; -select count(*) - from (select * from t4 union - select * from t4_c) a; - -select count(*) from t5; -select count(*) from t5_c; -select count(*) - from (select * from t5 union - select * from t5_c) a; - -select count(*) from t6; -select count(*) from t6_c; -select count(*) - from (select * from t6 union - select * from t6_c) a; - -select count(*) from t7; -select count(*) from t7_c; -select count(*) - from (select * from t7 union - select * from t7_c) a; - -select count(*) from t8; -select count(*) from t8_c; -select count(*) - from (select * from t8 union - select * from t8_c) a; - -select count(*) from t9; -select count(*) from t9_c; -select count(*) - from (select * from t9 union - select * from t9_c) a; - -# -# Drop all table except t2_c -# This to make sure that error returned from ndb_restore above is -# guaranteed to be from t2_c, this since order of tables in backup -# is none deterministic -# -drop table t1_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c; ---source include/ndb_backup.inc ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --core=0 -b $the_backup_id -n 1 -m -r --ndb-nodegroup_map '(0,1)' $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id 2>&1 | grep Translate || true - -# -# Cleanup -# - ---disable_warnings -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -drop table if exists t2_c; ---enable_warnings - -# -# Test BUG#10287 -# - ---exec $NDB_TOOLS_DIR/ndb_select_all --no-defaults -d sys -D , SYSTAB_0 | grep 520093696, | sed "s/,$the_backup_id/,/" - -# End of 4.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_restore_print.test b/mysql-test/suite/ndb/t/ndb_restore_print.test deleted file mode 100644 index 9a880f8968c..00000000000 --- a/mysql-test/suite/ndb/t/ndb_restore_print.test +++ /dev/null @@ -1,193 +0,0 @@ --- source include/have_ndb.inc --- source include/ndb_default_cluster.inc --- source include/not_embedded.inc - ---disable_warnings -use test; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; ---enable_warnings - -# basic datatypes -create table t1 - (pk int key - ,a1 BIT(1), a2 BIT(5), a3 BIT(33), a4 BIT(63), a5 BIT(64) - ,b1 TINYINT, b2 TINYINT UNSIGNED - ,c1 SMALLINT, c2 SMALLINT UNSIGNED - ,d1 INT, d2 INT UNSIGNED - ,e1 BIGINT, e2 BIGINT UNSIGNED - ,f1 CHAR(1) BINARY, f2 CHAR(32) BINARY, f3 CHAR(255) BINARY - ,g1 VARCHAR(32) BINARY, g2 VARCHAR(255) BINARY, g3 VARCHAR(1000) BINARY - ,h1 BINARY(1), h2 BINARY(8), h3 BINARY(255) - ,i1 VARBINARY(32), i2 VARBINARY(255), i3 VARBINARY(1000) - ) engine myisam; - -# max values -insert into t1 values - (1 - ,0x1, 0x17, 0x789a, 0x789abcde, 0xfedc0001 - ,127, 255 - ,32767, 65535 - ,2147483647, 4294967295 - ,9223372036854775807, 18446744073709551615 - ,'1','12345678901234567890123456789012','123456789' - ,'1','12345678901234567890123456789012','123456789' - ,0x12,0x123456789abcdef0, 0x012345 - ,0x12,0x123456789abcdef0, 0x00123450 - ); - -# min values -insert into t1 values - (2 - ,0, 0, 0, 0, 0 - ,-128, 0 - ,-32768, 0 - ,-2147483648, 0 - ,-9223372036854775808, 0 - ,'','','' - ,'','','' - ,0x0,0x0,0x0 - ,0x0,0x0,0x0 - ); - -# null values -insert into t1 values - (3 - ,NULL,NULL,NULL,NULL,NULL - ,NULL,NULL - ,NULL,NULL - ,NULL,NULL - ,NULL,NULL - ,NULL,NULL,NULL - ,NULL,NULL,NULL - ,NULL,NULL,NULL - ,NULL,NULL,NULL - ); - ---vertical_results -select pk - ,hex(a1), hex(a2), hex(a3), hex(a4), hex(a5) - ,b1, b2 - ,c1 , c2 - ,d1 , d2 - ,e1 , e2 - ,f1 , f2, f3 - ,g1 , g2, g3 - ,hex(h1), hex(h2), hex(h3) - ,hex(i1), hex(i2), hex(i3) - from t1 order by pk; - -alter table t1 engine ndb; - -select pk - ,hex(a1), hex(a2), hex(a3), hex(a4), hex(a5) - ,b1, b2 - ,c1 , c2 - ,d1 , d2 - ,e1 , e2 - ,f1 , f2, f3 - ,g1 , g2, g3 - ,hex(h1), hex(h2), hex(h3) - ,hex(i1), hex(i2), hex(i3) - from t1 order by pk; ---horizontal_results - ---source include/ndb_backup.inc - ---let ndb_restore_filter=test t1 ---let ndb_restore_opts=--verbose=0 --print_data --hex --fields-terminated-by=";" ---source include/ndb_backup_print.inc - ---let ndb_restore_filter=test t1 ---let ndb_restore_opts=--verbose=0 --print_data --hex --fields-terminated-by="," --fields-optionally-enclosed-by="'" ---source include/ndb_backup_print.inc - - -drop table t1; - -# some binary char tests with trailing spaces -create table t1 - (pk int key - ,f1 CHAR(1) BINARY, f2 CHAR(32) BINARY, f3 CHAR(255) BINARY - ,g1 VARCHAR(32) BINARY, g2 VARCHAR(255) BINARY, g3 VARCHAR(1000) BINARY - ,h1 BINARY(1), h2 BINARY(9), h3 BINARY(255) - ,i1 VARBINARY(32), i2 VARBINARY(255), i3 VARBINARY(1000) - ) engine ndb; - -insert into t1 values - (1 - ,'1','12345678901234567890123456789012','123456789 ' - ,'1 ','12345678901234567890123456789012 ','123456789 ' - ,0x20,0x123456789abcdef020, 0x012345000020 - ,0x1200000020,0x123456789abcdef000000020, 0x00123450000020 - ); - -create table t2 (pk int key, a int) engine ndb; -create table t3 (pk int key, a int) engine ndb; -create table t4 (pk int key, a int) engine ndb; - -insert into t2 values (1,11),(2,12),(3,13),(4,14),(5,15); -insert into t3 values (1,21),(2,22),(3,23),(4,24),(5,25); -insert into t4 values (1,31),(2,32),(3,33),(4,34),(5,35); - ---source include/ndb_backup.inc ---let ndb_restore_opts=--verbose=0 --print_data --hex --fields-enclosed-by="'" --fields-optionally-enclosed-by="X" ---let ndb_restore_filter=test t1 ---source include/ndb_backup_print.inc - ---error 0,1 ---remove_file $MYSQLTEST_VARDIR/tmp/t1.txt ---error 0,1 ---remove_file $MYSQLTEST_VARDIR/tmp/t2.txt ---error 0,1 ---remove_file $MYSQLTEST_VARDIR/tmp/t3.txt ---error 0,1 ---remove_file $MYSQLTEST_VARDIR/tmp/t4.txt - ---let ndb_restore_opts=--verbose=0 --print_data --hex --tab $MYSQLTEST_VARDIR/tmp --append ---let ndb_restore_filter=test ---source include/ndb_backup_print.inc - ---let $message= t1 ---source include/show_msg.inc ---exec sort $MYSQLTEST_VARDIR/tmp/t1.txt ---let $message= t2 ---source include/show_msg.inc ---exec sort $MYSQLTEST_VARDIR/tmp/t2.txt ---let $message= t3 ---source include/show_msg.inc ---exec sort $MYSQLTEST_VARDIR/tmp/t3.txt ---let $message= t4 ---source include/show_msg.inc ---exec sort $MYSQLTEST_VARDIR/tmp/t4.txt - ---remove_file $MYSQLTEST_VARDIR/tmp/t1.txt ---remove_file $MYSQLTEST_VARDIR/tmp/t2.txt ---remove_file $MYSQLTEST_VARDIR/tmp/t3.txt ---remove_file $MYSQLTEST_VARDIR/tmp/t4.txt - -# now test some other datatypes -drop table t1; -create table t1 - (pk int key - ,a1 MEDIUMINT, a2 MEDIUMINT UNSIGNED - ) engine ndb; - -# max values -insert into t1 values(1, 8388607, 16777215); -# min values -insert into t1 values(2, -8388608, 0); -# small values -insert into t1 values(3, -1, 1); - -# backup and print ---source include/ndb_backup.inc - ---let ndb_restore_filter=test t1 ---let ndb_restore_opts=--verbose=0 --print_data --hex --fields-terminated-by=";" ---source include/ndb_backup_print.inc - -# clean up -drop table t1; -drop table t2; -drop table t3; -drop table t4; diff --git a/mysql-test/suite/ndb/t/ndb_row_format.test b/mysql-test/suite/ndb/t/ndb_row_format.test deleted file mode 100644 index b1582cbe339..00000000000 --- a/mysql-test/suite/ndb/t/ndb_row_format.test +++ /dev/null @@ -1,86 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; -drop database if exists mysqltest; ---enable_warnings - -# -# some negative tests -# - -# cannot have ROW_FORMAT=FIXED and var attrs mixed ---error 1005 -CREATE TABLE t1 - ( a INT KEY, - b VARCHAR(10) ) - ROW_FORMAT=FIXED - ENGINE=NDB; - -# warnings give more detail on the error -SHOW WARNINGS; - - -# -# Check force var part for different ROW_FORMAT -# - -# default => ForceVarPart: 1 -CREATE TABLE t1 - ( a INT KEY, - b INT ) - ENGINE=NDB; ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep ForceVarPart -DROP TABLE t1; - -# explicit DEFAULT => ForceVarPart: 1 -CREATE TABLE t1 - ( a INT KEY, - b INT ) - ROW_FORMAT=DEFAULT - ENGINE=NDB; ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep ForceVarPart -DROP TABLE t1; - -# FIXED => ForceVarPart: 0 -CREATE TABLE t1 - ( a INT KEY, - b INT ) - ROW_FORMAT=FIXED - ENGINE=NDB; ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep ForceVarPart -DROP TABLE t1; - -# DYNAMIC => ForceVarPart: 1 -CREATE TABLE t1 - ( a INT KEY, - b INT ) - ROW_FORMAT=DYNAMIC - ENGINE=NDB; ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep ForceVarPart -DROP TABLE t1; - -# test of bug -create table t1 (a int auto_increment primary key, b varchar(1000)) engine = ndb; -insert into t1(b) values ('0123456789'); -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -select count(*) from t1; -begin; -update t1 set b = concat(b,b); -update t1 set b = concat(b,b); -update t1 set b = concat(b,b); -update t1 set b = concat(b,b); -update t1 set b = concat(b,b); -rollback; -select count(*),b from t1 group by b; -drop table t1; diff --git a/mysql-test/suite/ndb/t/ndb_single_user.test b/mysql-test/suite/ndb/t/ndb_single_user.test deleted file mode 100644 index a64ac066a49..00000000000 --- a/mysql-test/suite/ndb/t/ndb_single_user.test +++ /dev/null @@ -1,174 +0,0 @@ --- source include/have_multi_ndb.inc --- source include/ndb_default_cluster.inc --- source include/not_embedded.inc - ---disable_warnings -drop table if exists t1,t2; ---enable_warnings - -# operations allowed while cluster is in single user mode - ---connection server1 ---let $node_id= `SHOW STATUS LIKE 'Ndb_cluster_node_id'` ---disable_query_log ---eval set @node_id= SUBSTRING('$node_id', 20)+0 ---enable_query_log ---let $node_id= `SELECT @node_id` ---exec $NDB_MGM --no-defaults --ndb-connectstring="$NDB_CONNECTSTRING" -e "enter single user mode $node_id" >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults --ndb-connectstring="$NDB_CONNECTSTRING" --single-user >> $NDB_TOOLS_OUTPUT - -# verify that we are indeed in single user mode -# and test that some operations give correct errors ---connection server2 ---error 1005 -create table t1 (a int key, b int unique, c int) engine ndb; -# Bug #27712 Single user mode. Creating logfile group and tablespace is allowed -# - before bug fix these would succeed ---error ER_CREATE_FILEGROUP_FAILED -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; -show warnings; - -# test some sql on first mysqld ---connection server1 -create table t1 (a int key, b int unique, c int) engine ndb; -# Check that we can create logfile group -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; ---connection server2 ---error ER_CREATE_FILEGROUP_FAILED -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE NDB; -show warnings; ---error ER_DROP_FILEGROUP_FAILED -DROP LOGFILE GROUP lg1 -ENGINE =NDB; -show warnings; ---connection server1 -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE NDB; ---connection server2 ---error ER_ALTER_FILEGROUP_FAILED -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE NDB; -show warnings; ---connection server1 -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE NDB; ---connection server2 ---error ER_DROP_FILEGROUP_FAILED -DROP TABLESPACE ts1 -ENGINE NDB; -show warnings; ---connection server1 -DROP TABLESPACE ts1 -ENGINE NDB; -DROP LOGFILE GROUP lg1 -ENGINE =NDB; -insert into t1 values (1,1,0),(2,2,0),(3,3,0),(4,4,0),(5,5,0),(6,6,0),(7,7,0),(8,8,0),(9,9,0),(10,10,0); -create table t2 as select * from t1; -# read with pk -select * from t1 where a = 1; -# read with unique index -select * from t1 where b = 4; -# read with ordered index -select * from t1 where a > 4 order by a; -# update with pk -update t1 set b=102 where a = 2; -# update with unique index -update t1 set b=103 where b = 3; -# update with full table scan -update t1 set b=b+100; -# update with ordered insex scan -update t1 set b=b+100 where a > 7; -# delete with full table scan -delete from t1; -insert into t1 select * from t2; -# Bug #27710 Creating unique index fails during single user mode -# - prior to bugfix this would fail -create unique index new_index on t1 (b,c); - -drop table t2; - -# test some sql on other mysqld ---connection server2 ---error 1051 -drop table t1; ---error 1296 -create index new_index_fail on t1 (c); ---error 1296 -insert into t1 values (21,21,0),(22,22,0),(23,23,0),(24,24,0),(25,25,0),(26,26,0),(27,27,0),(28,28,0),(29,29,0),(210,210,0); ---error 1296 -select * from t1 where a = 1; ---error 1296 -select * from t1 where b = 4; ---error 1296 -update t1 set b=102 where a = 2; ---error 1296 -update t1 set b=103 where b = 3; ---error 1296 -update t1 set b=b+100; ---error 1296 -update t1 set b=b+100 where a > 7; - ---exec $NDB_MGM --no-defaults --ndb-connectstring="$NDB_CONNECTSTRING" -e "exit single user mode" >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults >> $NDB_TOOLS_OUTPUT - -# -# we should be able to run transaction while in single user mode -# ---connection server1 -BEGIN; -update t1 set b=b+100 where a=1; - ---connection server2 -BEGIN; -update t1 set b=b+100 where a=2; - -# enter single user mode ---exec $NDB_MGM --no-defaults --ndb-connectstring="$NDB_CONNECTSTRING" -e "enter single user mode $node_id" >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults --ndb-connectstring="$NDB_CONNECTSTRING" --single-user >> $NDB_TOOLS_OUTPUT - ---connection server1 -update t1 set b=b+100 where a=3; -COMMIT; - -# while on other mysqld it should be aborted ---connection server2 ---error 1296 -update t1 set b=b+100 where a=4; ---error 1296 -COMMIT; - -# Bug #25275 SINGLE USER MODE prevents ALTER on non-ndb -# tables for other mysqld nodes ---connection server2 -create table t2 (a int) engine myisam; -alter table t2 add column (b int); - -# exit single user mode ---exec $NDB_MGM --no-defaults --ndb-connectstring="$NDB_CONNECTSTRING" -e "exit single user mode" >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults >> $NDB_TOOLS_OUTPUT - -# cleanup ---connection server2 -drop table t2; ---connection server1 -drop table t1; - -# End of 5.0 tests - diff --git a/mysql-test/suite/ndb/t/ndb_sp.test b/mysql-test/suite/ndb/t/ndb_sp.test deleted file mode 100644 index b833869cad0..00000000000 --- a/mysql-test/suite/ndb/t/ndb_sp.test +++ /dev/null @@ -1,42 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -drop table if exists t1; ---enable_warnings - -create table t1 ( - a int not null primary key, - b int not null -) engine=ndb; -insert into t1 values (1,10), (2,20), (3,100), (4, 100); - -delimiter //; -create procedure test_proc1 (in var_in int) -begin - select * from t1 where a = var_in; -end; -create procedure test_proc2 (out var_out int) -begin - select b from t1 where a = 1 into var_out; -end; -create procedure test_proc3 (inout var_inout int) -begin - select b from t1 where a = var_inout into var_inout; -end; -// -delimiter ;// -call test_proc1(1); -call test_proc2(@test_var); -select @test_var; -set @test_var = 1; -call test_proc3(@test_var); -select @test_var; -alter procedure test_proc1 comment 'new comment'; -show create procedure test_proc1; -drop procedure test_proc1; -drop procedure test_proc2; -drop procedure test_proc3; -drop table t1; - ---echo End of 5.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_subquery.test b/mysql-test/suite/ndb/t/ndb_subquery.test deleted file mode 100644 index 6282c31c922..00000000000 --- a/mysql-test/suite/ndb/t/ndb_subquery.test +++ /dev/null @@ -1,79 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -drop table if exists t1, t2, t3, t4; ---enable_warnings - -########## -# bug#5367 -create table t1 (p int not null primary key, u int not null, o int not null, -unique (u), key(o)) engine=ndb; - -create table t2 (p int not null primary key, u int not null, o int not null, -unique (u), key(o)) engine=ndb; - -create table t3 (a int not null primary key, b int not null) engine=ndb; -create table t4 (c int not null primary key, d int not null) engine=ndb; - -insert into t1 values (1,1,1),(2,2,2),(3,3,3); -insert into t2 values (1,1,1),(2,2,2),(3,3,3), (4,4,4), (5,5,5); -insert into t3 values (1,10), (2,10), (3,30), (4, 30); -insert into t4 values (1,10), (2,10), (3,30), (4, 30); - -# Use pk ---replace_column 9 # -explain select * from t2 where p NOT IN (select p from t1); -select * from t2 where p NOT IN (select p from t1) order by p; - -# Use unique index ---replace_column 9 # -explain select * from t2 where p NOT IN (select u from t1); -select * from t2 where p NOT IN (select u from t1) order by p; - -# Use ordered index ---replace_column 9 # -explain select * from t2 where p NOT IN (select o from t1); -select * from t2 where p NOT IN (select o from t1) order by p; - -# Use scan ---replace_column 9 # -explain select * from t2 where p NOT IN (select p+0 from t1); -select * from t2 where p NOT IN (select p+0 from t1) order by p; - -drop table t1; -drop table t2; -# bug#5367 -########## - -# End of 4.1 tests - -# -# bug#11205 -# -create table t1 (p int not null primary key, u int not null) engine=ndb; -insert into t1 values (1,1),(2,2),(3,3); - -create table t2 as -select t1.* -from t1 as t1, t1 as t2, t1 as t3, t1 as t4, t1 as t5, t1 as t6, t1 as t7, t1 as t8 -where t1.u = t2.u - and t2.u = t3.u - and t3.u = t4.u - and t4.u = t5.u - and t5.u = t6.u - and t6.u = t7.u - and t7.u = t8.u; - -select * from t2 order by 1; - -select * from t3 where a = any (select c from t4 where c = 1) order by a; -select * from t3 where a in (select c from t4 where c = 1) order by a; -select * from t3 where a <> some (select c from t4 where c = 1) order by a; -select * from t3 where a > all (select c from t4 where c = 1) order by a; -select * from t3 where row(1,10) = (select c,d from t4 where c = 1) order by a; -select * from t3 where exists (select * from t4 where c = 1) order by a; - -drop table if exists t1, t2, t3, t4; - ---echo End of 5.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_temporary.test b/mysql-test/suite/ndb/t/ndb_temporary.test deleted file mode 100644 index 7f6902bf745..00000000000 --- a/mysql-test/suite/ndb/t/ndb_temporary.test +++ /dev/null @@ -1,38 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - -# -# creating a temporary table with engine=ndb should give an error -# ---error ER_ILLEGAL_HA_CREATE_OPTION -create temporary table t1 (a int key) engine=ndb; - - -# -# alter temporary table to engine=ndb should give an error -# -create temporary table t1 (a int key) engine=myisam; ---error ER_ILLEGAL_HA_CREATE_OPTION -alter table t1 engine=ndb; -drop table t1; - - -# -# if default storage engine=ndb, temporary tables -# without explicit engine= should be created as myisam -# -SET SESSION storage_engine=NDBCLUSTER; -create table t1 (a int key); - -# verify that we have a ndb table -select engine from information_schema.tables where table_name = 't1'; -drop table t1; - -# verify that we have a myisam table -create temporary table t1 (a int key); -show create table t1; -drop table t1; diff --git a/mysql-test/suite/ndb/t/ndb_tmp_table_and_DDL.test b/mysql-test/suite/ndb/t/ndb_tmp_table_and_DDL.test deleted file mode 100644 index 748c0ac28e4..00000000000 --- a/mysql-test/suite/ndb/t/ndb_tmp_table_and_DDL.test +++ /dev/null @@ -1,11 +0,0 @@ -# -# Bug#49132 -# This test verifies if executing DDL statement before trying to manipulate -# a temporary table causes row-based replication to break with error 'table -# does not exist' base on ndb engine. -# - -source include/have_ndb.inc; - -LET $ENGINE_TYPE= NDB; -source extra/rpl_tests/rpl_tmp_table_and_DDL.test; diff --git a/mysql-test/suite/ndb/t/ndb_transaction.test b/mysql-test/suite/ndb/t/ndb_transaction.test deleted file mode 100644 index d3ebadb1a78..00000000000 --- a/mysql-test/suite/ndb/t/ndb_transaction.test +++ /dev/null @@ -1,298 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; -drop database if exists mysqltest; ---enable_warnings - -# -# Transactionc test to show that the NDB -# table handler is working properly with -# transactions -# - -# -# Create a normal table with primary key -# -CREATE TABLE t1 ( - pk1 INT NOT NULL PRIMARY KEY, - attr1 INT NOT NULL -) ENGINE=ndbcluster; - -# insert -begin; -insert into t1 values(1,1); -insert into t1 values(2,2); -select count(*) from t1; -select * from t1 where pk1 = 1; -select t1.attr1 from t1, t1 as t1x where t1.pk1 = t1x.pk1 + 1; -rollback; - -select count(*) from t1; -select * from t1 where pk1 = 1; -select t1.attr1 from t1, t1 as t1x where t1.pk1 = t1x.pk1 + 1; - -begin; -insert into t1 values(1,1); -insert into t1 values(2,2); -commit; - -select count(*) from t1; -select * from t1 where pk1 = 1; -select t1.attr1 from t1, t1 as t1x where t1.pk1 = t1x.pk1 + 1; - -# update -begin; -update t1 set attr1 = attr1 * 2; -select count(*) from t1; -select * from t1 where pk1 = 1; -select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; -rollback; - -select count(*) from t1; -select * from t1 where pk1 = 1; -select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; - -begin; -update t1 set attr1 = attr1 * 2; -commit; - -select count(*) from t1; -select * from t1 where pk1 = 1; -select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; - -# delete -begin; -delete from t1 where attr1 = 2; -select count(*) from t1; -select * from t1 where pk1 = 1; -select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; -rollback; - -select count(*) from t1; -select * from t1 where pk1 = 1; -select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; - -begin; -delete from t1 where attr1 = 2; -commit; - -select count(*) from t1; -select * from t1 where pk1 = 1; -select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; - -DROP TABLE t1; - -# -# Create table without primary key -# a hidden primary key column is created by handler -# -CREATE TABLE t1 (id INT, id2 int) engine=ndbcluster; - -# insert -begin; -insert into t1 values(1,1); -insert into t1 values(2,2); -select sum(id) from t1; -select * from t1 where id = 1; -select t1.id from t1, t1 as t1x where t1.id2 = t1x.id2 + 1; -rollback; - -select sum(id) from t1; -select * from t1 where id = 1; -select t1.id from t1, t1 as t1x where t1.id2 = t1x.id2 + 1; - -begin; -insert into t1 values(1,1); -insert into t1 values(2,2); -commit; - -select sum(id) from t1; -select * from t1 where id = 1; -select t1.id from t1, t1 as t1x where t1.id2 = t1x.id2 + 1; - -# update -begin; -update t1 set id = id * 2; -select sum(id) from t1; -select * from t1 where id = 2; -select * from t1, t1 as t1x where t1x.id = t1.id - 2; -rollback; - -select sum(id) from t1; -select * from t1 where id = 2; -select * from t1, t1 as t1x where t1x.id = t1.id - 2; - -begin; -update t1 set id = id * 2; -commit; - -select sum(id) from t1; -select * from t1 where id = 2; -select * from t1, t1 as t1x where t1x.id = t1.id - 2; - -# delete - -DROP TABLE t1; - -# -# A more extensive test with a lot more records -# - -CREATE TABLE t2 ( - a bigint unsigned NOT NULL PRIMARY KEY, - b int unsigned not null, - c int unsigned -) engine=ndbcluster; - -CREATE TABLE t3 ( - a bigint unsigned NOT NULL, - b bigint unsigned not null, - c bigint unsigned, - PRIMARY KEY(a) -) engine=ndbcluster; - -CREATE TABLE t4 ( - a bigint unsigned NOT NULL, - b bigint unsigned not null, - c bigint unsigned NOT NULL, - d int unsigned, - PRIMARY KEY(a, b, c) -) engine=ndbcluster; - - -# -# insert records into tables and rollback -# -let $1=100; -disable_query_log; -begin; -while ($1) -{ - eval insert into t2 values($1, $1+9, 5); - eval insert into t3 values($1, $1+9, 5); - eval insert into t4 values($1, $1+9, 5, $1+26000); - dec $1; -} -rollback; -enable_query_log; - -select count(*) from t2; -select count(*) from t3; -select count(*) from t4; - -# -# insert records into tables and commit; -# -let $1=100; -disable_query_log; -begin; -while ($1) -{ - eval insert into t2 values($1, $1+9, 5); - eval insert into t3 values($1, $1+9, 5); - eval insert into t4 values($1, $1+9, 5, $1+26000); - dec $1; -} -commit; -enable_query_log; - -select count(*) from t2; -select count(*) from t3; -select count(*) from t4; - -# -# delete every other record in the tables -# -let $1=100; -disable_query_log; -while ($1) -{ - eval delete from t2 where a=$1; - eval delete from t3 where a=$1; - eval delete from t4 where a=$1 and b=$1+9 and c=5; - dec $1; - dec $1; -} -enable_query_log; - -# -# update records and rollback -# -begin; -let $1=100; -disable_query_log; -while ($1) -{ - eval update t2 set c=$1 where a=$1; - eval update t3 set c=7 where a=$1 and b=$1+9 and c=5; - eval update t4 set d=$1+21987 where a=$1 and b=$1+9 and c=5; - dec $1; - dec $1; -} -rollback; -enable_query_log; - -# -# update records and commit -# -begin; -let $1=100; -disable_query_log; -while ($1) -{ - eval update t2 set c=$1 where a=$1; - eval update t3 set c=7 where a=$1 and b=$1+9 and c=5; - eval update t4 set d=$1+21987 where a=$1 and b=$1+9 and c=5; - dec $1; - dec $1; -} -rollback; -enable_query_log; - -drop table t2; -drop table t3; -drop table t4; - -# -# Test multiple databases in one transaction -# - -CREATE TABLE t1 ( - pk1 INT NOT NULL PRIMARY KEY, - attr1 INT NOT NULL -) ENGINE=ndbcluster; - -create database mysqltest; -use mysqltest; - -CREATE TABLE t2 ( - a bigint unsigned NOT NULL PRIMARY KEY, - b int unsigned not null, - c int unsigned -) engine=ndbcluster; - -begin; -insert into test.t1 values(1,1); -insert into t2 values(1,1,1); -insert into test.t1 values(2,2); -insert into t2 values(2,2,2); -select count(*) from test.t1; -select count(*) from t2; -select * from test.t1 where pk1 = 1; -select * from t2 where a = 1; -select test.t1.attr1 -from test.t1, test.t1 as t1x where test.t1.pk1 = t1x.pk1 + 1; -select t2.a -from t2, t2 as t2x where t2.a = t2x.a + 1; -select test.t1.pk1, a from test.t1,t2 where b > test.t1.attr1; -rollback; - -select count(*) from test.t1; -select count(*) from t2; - -drop table test.t1, t2; -drop database mysqltest; - -# End of 4.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_trigger.test b/mysql-test/suite/ndb/t/ndb_trigger.test deleted file mode 100644 index 9f01157fc93..00000000000 --- a/mysql-test/suite/ndb/t/ndb_trigger.test +++ /dev/null @@ -1,221 +0,0 @@ -# Tests which involve triggers and NDB storage engine ---source include/have_ndb.inc ---source include/not_embedded.inc - -# -# Test for bug#18437 "Wrong values inserted with a before update -# trigger on NDB table". SQL-layer didn't properly inform handler -# about fields which were read and set in triggers. In some cases -# this resulted in incorrect (garbage) values of OLD variables and -# lost changes to NEW variables. -# You can find similar tests for ON INSERT triggers in federated.test -# since this engine so far is the only engine in MySQL which cares -# about field mark-up during handler::write_row() operation. -# - ---disable_warnings -drop table if exists t1, t2, t3, t4, t5; ---enable_warnings - -create table t1 (id int primary key, a int not null, b decimal (63,30) default 0) engine=ndb; -create table t2 (op char(1), a int not null, b decimal (63,30)) engine=ndb; -create table t3 engine=ndb select 1 as i; -create table t4 (a int not null primary key, b int) engine=ndb; -create table t5 (a int not null primary key, b int) engine=ndb; - -delimiter //; -create trigger t1_bu before update on t1 for each row -begin - insert into t2 values ("u", old.a, old.b); - set new.b = old.b + 10; -end;// -create trigger t1_bd before delete on t1 for each row -begin - insert into t2 values ("d", old.a, old.b); -end;// -create trigger t4_au after update on t4 - for each row begin - update t5 set b = b+1; - end; -// -create trigger t4_ad after delete on t4 - for each row begin - update t5 set b = b+1; - end; -// -delimiter ;// - -insert into t1 values (1, 1, 1.05), (2, 2, 2.05), (3, 3, 3.05), (4, 4, 4.05); -insert into t4 values (1,1), (2,2), (3,3), (4, 4); -insert into t5 values (1,0); - -# Check that usual update works as it should -update t1 set a=5 where a != 3; -select * from t1 order by id; -select * from t2 order by op, a, b; -delete from t2; -# Check that everything works for multi-update -update t1, t3 set a=6 where a = 5; -select * from t1 order by id; -select * from t2 order by op, a, b; -delete from t2; -# Check for delete -delete from t1 where a != 3; -select * from t1 order by id; -select * from t2 order by op, a, b; -delete from t2; -# Check for multi-delete -insert into t1 values (1, 1, 1.05), (2, 2, 2.05), (4, 4, 4.05); -delete t1 from t1, t3 where a != 3; -select * from t1 order by id; -select * from t2 order by op, a, b; -delete from t2; -# Check for insert ... on duplicate key update -insert into t1 values (4, 4, 4.05); -insert into t1 (id, a) values (4, 1), (3, 1) on duplicate key update a= a + 1; -select * from t1 order by id; -select * from t2 order by op, a, b; -delete from t2; -# Check for insert ... select ... on duplicate key update -delete from t3; -insert into t3 values (4), (3); -insert into t1 (id, a) (select i, 1 from t3) on duplicate key update a= a + 1; -select * from t1 order by id; -select * from t2 order by op, a, b; -delete from t2; -# Check for replace -replace into t1 (id, a) values (4, 1), (3, 1); -select * from t1 order by id; -select * from t2 order by op, a, b; -delete from t1; -delete from t2; -# Check for replace ... select ... -insert into t1 values (3, 1, 1.05), (4, 1, 2.05); -replace into t1 (id, a) (select i, 2 from t3); -select * from t1 order by id; -select * from t2 order by op, a, b; -delete from t1; -delete from t2; -# Check for load data replace -insert into t1 values (3, 1, 1.05), (5, 2, 2.05); -load data infile '../../../std_data/loaddata5.dat' replace into table t1 fields terminated by '' enclosed by '' ignore 1 lines (id, a); -select * from t1 order by id; -select * from t2 order by op, a, b; -update t4 set b = 10 where a = 1; -select * from t5 order by a; -update t5 set b = 0; -delete from t4 where a = 1; -select * from t5 order by a; -drop trigger t4_au; -drop trigger t4_ad; - -drop table t1, t2, t3, t4, t5; -# Test for bug#26242 -# Verify that AFTER UPDATE/DELETE triggers are executed -# after the change has actually taken place - -CREATE TABLE t1 ( - id INT NOT NULL PRIMARY KEY, - xy INT -) ENGINE=ndbcluster; - -INSERT INTO t1 VALUES (1, 0); - -DELIMITER //; -CREATE TRIGGER t1_update AFTER UPDATE ON t1 FOR EACH ROW BEGIN REPLACE INTO t2 SELECT * FROM t1 WHERE t1.id = NEW.id; END // -DELIMITER ;// - -CREATE TABLE t2 ( - id INT NOT NULL PRIMARY KEY, - xy INT -) ENGINE=ndbcluster; - -INSERT INTO t2 VALUES (2, 0); - -CREATE TABLE t3 (id INT NOT NULL PRIMARY KEY) ENGINE=ndbcluster; - -INSERT INTO t3 VALUES (1); - -CREATE TABLE t4 LIKE t1; - -DELIMITER //; -CREATE TRIGGER t4_update AFTER UPDATE ON t4 FOR EACH ROW BEGIN REPLACE INTO t5 SELECT * FROM t4 WHERE t4.id = NEW.id; END // -DELIMITER ;// - -CREATE TABLE t5 LIKE t2; - -UPDATE t1 SET xy = 3 WHERE id = 1; -SELECT xy FROM t1 where id = 1; -SELECT xy FROM t2 where id = 1; - -UPDATE t1 SET xy = 4 WHERE id IN (SELECT id FROM t3 WHERE id = 1); -SELECT xy FROM t1 where id = 1; -SELECT xy FROM t2 where id = 1; - -INSERT INTO t4 SELECT * FROM t1; -INSERT INTO t5 SELECT * FROM t2; -UPDATE t1,t4 SET t1.xy = 3, t4.xy = 3 WHERE t1.id = 1 AND t4.id = 1; -SELECT xy FROM t1 where id = 1; -SELECT xy FROM t2 where id = 1; -SELECT xy FROM t4 where id = 1; -SELECT xy FROM t5 where id = 1; - -UPDATE t1,t4 SET t1.xy = 4, t4.xy = 4 WHERE t1.id IN (SELECT id FROM t3 WHERE id = 1) AND t4.id IN (SELECT id FROM t3 WHERE id = 1); -SELECT xy FROM t1 where id = 1; -SELECT xy FROM t2 where id = 1; -SELECT xy FROM t4 where id = 1; -SELECT xy FROM t5 where id = 1; - -INSERT INTO t1 VALUES (1,0) ON DUPLICATE KEY UPDATE xy = 5; -SELECT xy FROM t1 where id = 1; -SELECT xy FROM t2 where id = 1; - -DROP TRIGGER t1_update; -DROP TRIGGER t4_update; - -DELIMITER //; -CREATE TRIGGER t1_delete AFTER DELETE ON t1 FOR EACH ROW BEGIN REPLACE INTO t2 SELECT * FROM t1 WHERE t1.id > 4; END // -DELIMITER ;// - -DELIMITER //; -CREATE TRIGGER t4_delete AFTER DELETE ON t4 FOR EACH ROW BEGIN REPLACE INTO t5 SELECT * FROM t4 WHERE t4.id > 4; END // -DELIMITER ;// - -INSERT INTO t1 VALUES (5, 0),(6,0); -INSERT INTO t2 VALUES (5, 1),(6,1); -INSERT INTO t3 VALUES (5); -SELECT * FROM t1 order by id; -SELECT * FROM t2 order by id; -DELETE FROM t1 WHERE id IN (SELECT id FROM t3 WHERE id = 5); -SELECT * FROM t1 order by id; -SELECT * FROM t2 order by id; - -INSERT INTO t1 VALUES (5,0); -UPDATE t2 SET xy = 1 WHERE id = 6; -TRUNCATE t4; -INSERT INTO t4 SELECT * FROM t1; -TRUNCATE t5; -INSERT INTO t5 SELECT * FROM t2; -SELECT * FROM t1 order by id; -SELECT * FROM t2 order by id; -SELECT * FROM t4 order by id; -SELECT * FROM t5 order by id; -DELETE FROM t1,t4 USING t1,t3,t4 WHERE t1.id IN (SELECT id FROM t3 WHERE id = 5) AND t4.id IN (SELECT id FROM t3 WHERE id = 5); -SELECT * FROM t1 order by id; -SELECT * FROM t2 order by id; -SELECT * FROM t4 order by id; -SELECT * FROM t5 order by id; - -INSERT INTO t1 VALUES (5, 0); -REPLACE INTO t2 VALUES (6,1); -SELECT * FROM t1 order by id; -SELECT * FROM t2 order by id; -REPLACE INTO t1 VALUES (5, 1); -SELECT * FROM t1 order by id; -SELECT * FROM t2 order by id; - -DROP TRIGGER t1_delete; -DROP TRIGGER t4_delete; -DROP TABLE t1, t2, t3, t4, t5; - ---echo End of 5.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_truncate.test b/mysql-test/suite/ndb/t/ndb_truncate.test deleted file mode 100644 index a1ef4be0d48..00000000000 --- a/mysql-test/suite/ndb/t/ndb_truncate.test +++ /dev/null @@ -1,41 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1, t2; ---enable_warnings - -CREATE TABLE t1 ( - a bigint unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY, - b int unsigned not null, - c int unsigned -) engine=ndbcluster; - - -# -# insert records into table -# -let $1=500; -disable_query_log; -while ($1) -{ - eval insert into t1 values(NULL, $1+9, 5*$1), (NULL, $1+10, 7),(NULL, $1+10, 7*$1), (NULL, $1+10, 10+$1), (NULL, $1+10, 70*$1), (NULL, $1+10, 7), (NULL, $1+10, 9), (NULL, $1+299, 899), (NULL, $1+10, 12), (NULL, $1+10, 14*$1); - dec $1; -} -enable_query_log; - -select count(*) from t1; - -select * from t1 order by a limit 2; - -truncate table t1; - -select count(*) from t1; - -insert into t1 values(NULL,1,1),(NULL,2,2); - -select * from t1 order by a; - -drop table t1; - -# End of 4.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_types.test b/mysql-test/suite/ndb/t/ndb_types.test deleted file mode 100644 index ab18817132e..00000000000 --- a/mysql-test/suite/ndb/t/ndb_types.test +++ /dev/null @@ -1,85 +0,0 @@ ---source include/have_ndb.inc ---source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - -# -# Test creation of different column types in NDB -# -CREATE TABLE t1 ( - auto int(5) unsigned NOT NULL auto_increment, - string char(10) default "hello", - vstring varchar(10) default "hello", - bin binary(2), - vbin varbinary(7), - tiny tinyint(4) DEFAULT '0' NOT NULL , - short smallint(6) DEFAULT '1' NOT NULL , - medium mediumint(8) DEFAULT '0' NOT NULL, - long_int int(11) DEFAULT '0' NOT NULL, - longlong bigint(13) DEFAULT '0' NOT NULL, - real_float float(13,1) DEFAULT 0.0 NOT NULL, - real_double double(16,4), - real_decimal decimal(16,4), - utiny tinyint(3) unsigned DEFAULT '0' NOT NULL, - ushort smallint(5) unsigned zerofill DEFAULT '00000' NOT NULL, - umedium mediumint(8) unsigned DEFAULT '0' NOT NULL, - ulong int(11) unsigned DEFAULT '0' NOT NULL, - ulonglong bigint(13) unsigned DEFAULT '0' NOT NULL, - bits bit(3), - options enum('one','two','tree') not null, - flags set('one','two','tree') not null, - date_field date, - year_field year, - time_field time, - date_time datetime, - time_stamp timestamp not null default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, - PRIMARY KEY (auto), - KEY (utiny), - KEY (tiny), - KEY (short), - KEY any_name (medium), - KEY (longlong), - KEY (real_float), - KEY (ushort), - KEY (umedium), - KEY (ulong), - KEY (ulonglong,ulong), - KEY (options,flags) -); - -set @now = now(); ---sleep 1.5 -insert into t1 -(string,vstring,bin,vbin,tiny,short,medium,long_int,longlong, - real_float,real_double, real_decimal,utiny, ushort, umedium,ulong,ulonglong, - bits,options,flags,date_field,year_field,time_field,date_time) -values -("aaaa","aaaa",0xAAAA,0xAAAA,-1,-1,-1,-1,-1,1.1,1.1,1.1,1,1,1,1,1, - b'001','one','one', '1901-01-01','1901','01:01:01','1901-01-01 01:01:01'); - -select auto,string,vstring,bin,vbin,tiny,short,medium,long_int,longlong, - real_float,real_double,real_decimal,utiny,ushort,umedium,ulong,ulonglong, - bits,options,flags,date_field,year_field,time_field,date_time -from t1; -select time_stamp>@now from t1; - -set @now = now(); ---sleep 1.5 -update t1 set string="bbbb",vstring="bbbb",bin=0xBBBB,vbin=0xBBBB, -tiny=-2,short=-2,medium=-2,long_int=-2,longlong=-2,real_float=2.2, -real_double=2.2,real_decimal=2.2,utiny=2,ushort=2,umedium=2,ulong=2, -ulonglong=2, bits=b'010', -options='one',flags='one', date_field='1902-02-02',year_field='1902', -time_field='02:02:02',date_time='1902-02-02 02:02:02' where auto=1; - -select auto,string,vstring,bin,vbin,tiny,short,medium,long_int,longlong, - real_float,real_double,real_decimal,utiny,ushort,umedium,ulong,ulonglong, - bits,options,flags,date_field,year_field,time_field,date_time -from t1; -select time_stamp>@now from t1; - -drop table t1; - ---echo End of 4.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_update.test b/mysql-test/suite/ndb/t/ndb_update.test deleted file mode 100644 index ab0fbee171e..00000000000 --- a/mysql-test/suite/ndb/t/ndb_update.test +++ /dev/null @@ -1,94 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1; -DROP TABLE IF EXISTS t2; -DROP TABLE IF EXISTS t3; ---enable_warnings - -# -# Basic test of UPDATE in NDB -# - -# -# Create a normal table with primary key -# -CREATE TABLE t1 ( - pk1 INT NOT NULL PRIMARY KEY, - b INT NOT NULL, - c INT NOT NULL UNIQUE -) ENGINE=ndbcluster; - -INSERT INTO t1 VALUES (0, 1, 0),(1,2,1),(2,3,2); -UPDATE t1 set b = c; -select * from t1 order by pk1; -UPDATE t1 set pk1 = 4 where pk1 = 1; -select * from t1 order by pk1; ---error ER_DUP_ENTRY -UPDATE t1 set pk1 = 4 where pk1 = 2; -UPDATE IGNORE t1 set pk1 = 4 where pk1 = 2; -select * from t1 order by pk1; ---error ER_DUP_ENTRY -UPDATE t1 set pk1 = 1, c = 2 where pk1 = 4; -UPDATE IGNORE t1 set pk1 = 1, c = 2 where pk1 = 4; -select * from t1 order by pk1; -UPDATE t1 set pk1 = pk1 + 10; -select * from t1 order by pk1; -# bug#25817 -create unique index ib on t1(b); -update t1 set c = 4 where pk1 = 12; -update ignore t1 set b = 55 where pk1 = 14; -select * from t1 order by pk1; - ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - -# End of 4.1 tests - -# -# Bug#28158: table->read_set is set incorrectly, -# causing wrong error message in Falcon -# -CREATE TABLE t1 (a int, b int, KEY (a, b)) ENGINE=ndbcluster; -CREATE TABLE t2 (a int, b int, UNIQUE KEY (a, b)) ENGINE=ndbcluster; -CREATE TABLE t3 (a int, b int, PRIMARY KEY (a, b)) ENGINE=ndbcluster; -# -INSERT INTO t1 VALUES (1, 2); -INSERT INTO t1 VALUES (2, 2); -# -INSERT INTO t2 VALUES (1, 2); -INSERT INTO t2 VALUES (2, 2); -# -INSERT INTO t3 VALUES (1, 2); -INSERT INTO t3 VALUES (2, 2); -# -UPDATE t1 SET a = 1; -UPDATE t1 SET a = 1 ORDER BY a; -# ---error ER_DUP_ENTRY -UPDATE t2 SET a = 1; ---error ER_DUP_ENTRY -UPDATE t2 SET a = 1 ORDER BY a; -# ---error ER_DUP_ENTRY -UPDATE t3 SET a = 1; ---error ER_DUP_ENTRY -UPDATE t3 SET a = 1 ORDER BY a; -# -SELECT count(*) FROM t1; -SELECT count(*) FROM t2; -SELECT count(*) FROM t3; -SELECT * FROM t1 ORDER by a; -SELECT * FROM t2 ORDER by a; -SELECT * FROM t3 ORDER by a; -# ---disable_warnings -DROP TABLE IF EXISTS t1; -DROP TABLE IF EXISTS t2; -DROP TABLE IF EXISTS t3; ---enable_warnings - ---echo End of 5.1 tests - diff --git a/mysql-test/suite/ndb/t/ndb_update_no_read.test b/mysql-test/suite/ndb/t/ndb_update_no_read.test deleted file mode 100644 index 60bea53b7b5..00000000000 --- a/mysql-test/suite/ndb/t/ndb_update_no_read.test +++ /dev/null @@ -1,79 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - -# -# New test case for WL 3686 (which is not until CGE-6.3) -# but test is committed in 5.1 to verify consistant results. -# -# When only constant expressions in update statements and -# only PK or UK in WHERE clause. No extra WHERE parts are -# allowed. WL #3687 takes of more advanced variants of -# avoiding the read before the update/delete - -create table t1 (a int not null primary key, b int not null, c int, - unique index_b (b) using hash) -engine ndb; - -insert into t1 values (1,10,1),(2,9,1),(3,8,1),(4,7,1),(5,6,1),(6,5,2),(7,4,2),(8,3,2), - (9,2,2),(10,1,2); - -# These ones should use optimisation - -update t1 set c = 111, b = 20 where a = 1; - -select * from t1 where a = 1 order by a; - -delete from t1 where a = 1; - -select * from t1 where a = 1 order by a; - -update t1 set c = 12, b = 19 where b = 2; - -select * from t1 where b = 2 order by a; - -delete from t1 where b = 19; - -select * from t1 where b = 19 order by a; - -update t1 set c = 22 where a = 10 or a >= 10; - -select * from t1 order by a; - -update t1 set c = 23 where a in (8,10); - -select * from t1 order by a; - -update t1 set c = 23 where a in (7,8) or a >= 10; - -select * from t1 order by a; - -# These ones should not use optimisation - -update t1 set c = 11 where a = 3 or b = 7; - -select * from t1 where a = 3 or b = 7 order by a; - -update t1 set a = 13, b = 20 where a = 3; - -select * from t1 where a = 13 order by a; - -update t1 set a = 12, b = 19 where b = 7; - -select * from t1 where b = 19 order by a; - -select * from t1 where b = 7 order by a; - -update t1 set c = 12, b = 29 where a = 5 and b = 6; - -select * from t1 where b = 19 order by a; - -delete from t1 where b = 6 and c = 12; - -select * from t1 where b = 6 order by a; - -drop table t1; - diff --git a/mysql-test/suite/ndb/t/ndb_view.test b/mysql-test/suite/ndb/t/ndb_view.test deleted file mode 100644 index 3b8fc330b40..00000000000 --- a/mysql-test/suite/ndb/t/ndb_view.test +++ /dev/null @@ -1,29 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1,t2,t3; -DROP VIEW IF EXISTS v1,v2,v3; ---enable_warnings - -# -# simple operations via view -# - -create table t1 (a int, b int, c int, d int) engine=ndb; -insert into t1 values (1,2,3,4),(5,6,7,8); - -create view v1 as select t1.c as a, t1.a as b, t1.d as c, t1.a+t1.b+t1.c as d from t1; -select * from v1 order by a,b,c; - -update v1 set a=a+100 where b=1; -select * from v1 order by a,b,c; - -drop view v1; - -create view v1 as select t1.c as a from t1; -insert into v1 values (200); -select * from t1 order by a,b,c,d; - -drop view v1; -drop table t1; diff --git a/mysql-test/suite/ndb/t/ndbapi.test b/mysql-test/suite/ndb/t/ndbapi.test deleted file mode 100644 index 398a2cbfbfa..00000000000 --- a/mysql-test/suite/ndb/t/ndbapi.test +++ /dev/null @@ -1,44 +0,0 @@ --- source include/have_ndb.inc --- source include/have_ndbapi_examples.inc - ---disable_warnings -DROP TABLE IF EXISTS t0; -drop database if exists mysqltest; ---enable_warnings - ---exec echo Running ndbapi_simple ---exec $NDB_EXAMPLES_DIR/ndbapi_simple/ndbapi_simple $MASTER_MYSOCK "$NDB_CONNECTSTRING" >> $NDB_EXAMPLES_OUTPUT - ---exec echo Running ndbapi_simple_index ---exec $NDB_EXAMPLES_DIR/ndbapi_simple_index/ndbapi_simple_index $MASTER_MYSOCK "$NDB_CONNECTSTRING" >> $NDB_EXAMPLES_OUTPUT - ---exec echo Running ndbapi_scan ---exec $NDB_EXAMPLES_DIR/ndbapi_scan/ndbapi_scan $MASTER_MYSOCK "$NDB_CONNECTSTRING" >> $NDB_EXAMPLES_OUTPUT - ---exec echo Running ndbapi_retries ---exec $NDB_EXAMPLES_DIR/ndbapi_retries/ndbapi_retries $MASTER_MYSOCK "$NDB_CONNECTSTRING" >> $NDB_EXAMPLES_OUTPUT - ---exec echo Running ndbapi_async ---exec $NDB_EXAMPLES_DIR/ndbapi_async/ndbapi_async $MASTER_MYSOCK "$NDB_CONNECTSTRING" >> $NDB_EXAMPLES_OUTPUT - ---exec echo Running ndbapi_async1 ---exec $NDB_EXAMPLES_DIR/ndbapi_async1/ndbapi_async1 $MASTER_MYSOCK "$NDB_CONNECTSTRING" >> $NDB_EXAMPLES_OUTPUT - -use TEST_DB; -create table t0(c0 int, c1 int, c2 char(4), c3 char(4), c4 text, - primary key(c0, c2)) engine ndb charset latin1; -#--exec echo Running ndbapi_event -#--exec $NDB_EXAMPLES_DIR/ndbapi_event/ndbapi_event "$NDB_CONNECTSTRING" 1 >> $NDB_EXAMPLES_OUTPUT -insert into t0 values (1, 2, 'a', 'b', null); -insert into t0 values (3, 4, 'c', 'd', null); -update t0 set c3 = 'e' where c0 = 1 and c2 = 'a'; -- use pk -update t0 set c3 = 'f'; -- use scan -update t0 set c3 = 'F'; -- use scan update to 'same' -update t0 set c2 = 'g' where c0 = 1; -- update pk part -update t0 set c2 = 'G' where c0 = 1; -- update pk part to 'same' -update t0 set c0 = 5, c2 = 'H' where c0 = 3; -- update full PK -delete from t0; -drop table t0; - ---exec echo Running mgmapi_logevent ---exec $NDB_EXAMPLES_DIR/mgmapi_logevent/mgmapi_logevent "$NDB_CONNECTSTRING" 1 >> $NDB_EXAMPLES_OUTPUT diff --git a/mysql-test/suite/ndb/t/ps_7ndb.test b/mysql-test/suite/ndb/t/ps_7ndb.test deleted file mode 100644 index e3f65ec2c4e..00000000000 --- a/mysql-test/suite/ndb/t/ps_7ndb.test +++ /dev/null @@ -1,25 +0,0 @@ -############################################### -# # -# Prepared Statements test on NDB tables # -# # -############################################### - -# -# NOTE: PLEASE SEE ps_1general.test (bottom) -# BEFORE ADDING NEW TEST CASES HERE !!! - -use test; - --- source include/have_ndb.inc -let $type= 'NDB' ; --- source include/ps_create.inc --- source include/ps_renew.inc - --- source include/ps_query.inc --- source include/ps_modify.inc --- source include/ps_modify1.inc --- source include/ps_conv.inc - -drop table t1, t9; - -# End of 4.1 tests diff --git a/mysql-test/suite/ndb/t/strict_autoinc_5ndb.test b/mysql-test/suite/ndb/t/strict_autoinc_5ndb.test deleted file mode 100644 index 9e2090fddef..00000000000 --- a/mysql-test/suite/ndb/t/strict_autoinc_5ndb.test +++ /dev/null @@ -1,10 +0,0 @@ --- source include/have_ndb.inc - -# -# Bug#20573 Strict mode auto-increment -# - -let $type= 'NDB' ; ---source include/strict_autoinc.inc - -# end of test diff --git a/mysql-test/suite/ndb_team/r/ndb_autodiscover.result b/mysql-test/suite/ndb_team/r/ndb_autodiscover.result deleted file mode 100644 index 487f52f6427..00000000000 --- a/mysql-test/suite/ndb_team/r/ndb_autodiscover.result +++ /dev/null @@ -1,397 +0,0 @@ -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; -flush status; -create table t1( -id int not null primary key, -name char(20) -) engine=ndb; -insert into t1 values(1, "Autodiscover"); -flush tables; -select * from t1; -id name -1 Autodiscover -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 1 -flush tables; -insert into t1 values (2, "Auto 2"); -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 2 -insert into t1 values (3, "Discover 3"); -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 2 -flush tables; -select * from t1 order by id; -id name -1 Autodiscover -2 Auto 2 -3 Discover 3 -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 3 -flush tables; -update t1 set name="Autodiscover" where id = 2; -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 4 -select * from t1 order by id; -id name -1 Autodiscover -2 Autodiscover -3 Discover 3 -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 4 -flush tables; -delete from t1 where id = 3; -select * from t1 order by id; -id name -1 Autodiscover -2 Autodiscover -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 5 -drop table t1; -flush status; -create table t2( -id int not null primary key, -name char(22) -) engine=ndb; -insert into t2 values (1, "Discoverer"); -select * from t2; -id name -1 Discoverer -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 0 -flush tables; -select * from t2; -id name -1 Discoverer -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 1 -drop table t2; -flush status; -create table t3( -id int not null primary key, -name char(255) -) engine=ndb; -insert into t3 values (1, "Explorer"); -select * from t3; -id name -1 Explorer -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 0 -flush tables; -create table t3( -id int not null primary key, -name char(20), a int, b float, c char(24) -) engine=ndb; -ERROR 42S01: Table 't3' already exists -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 0 -create table IF NOT EXISTS t3( -id int not null primary key, -id2 int not null, -name char(20) -) engine=ndb; -Warnings: -Note 1050 Table 't3' already exists -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 0 -SHOW CREATE TABLE t3; -Table Create Table -t3 CREATE TABLE `t3` ( - `id` int(11) NOT NULL, - `name` char(255) default NULL, - PRIMARY KEY (`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY () -select * from t3; -id name -1 Explorer -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 1 -drop table t3; -flush status; -create table t7( -id int not null primary key, -name char(255) -) engine=ndb; -create table t6( -id int not null primary key, -name char(255) -) engine=MyISAM; -insert into t7 values (1, "Explorer"); -insert into t6 values (2, "MyISAM table"); -select * from t7; -id name -1 Explorer -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 0 -flush tables; -show tables from test; -Tables_in_test -t6 -t7 -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 1 -flush tables; -show table status; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t6 MyISAM 10 Fixed 1 # # # # 0 NULL # # NULL # NULL # -t7 NDBCLUSTER 10 Fixed 1 # # # # 0 NULL # # NULL # NULL # -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 2 -drop table t6, t7; -flush status; -create table t4( -id int not null primary key, -name char(27) -) engine=ndb; -insert into t4 values (1, "Automatic"); -select * from t4; -id name -1 Automatic -select * from t4; -ERROR 42S02: Table 'test.t4' doesn't exist -select * from t4; -ERROR 42S02: Table 'test.t4' doesn't exist -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 0 -drop table t4; -ERROR 42S02: Unknown table 't4' -create table t4( -id int not null primary key, -name char(27) -) engine=ndb; -insert into t4 values (1, "Automatic"); -select * from t4; -id name -1 Automatic -select * from t4; -ERROR 42S02: Table 'test.t4' doesn't exist -drop table if exists t4; -Warnings: -Error 155 Table 'test.t4' doesn't exist -drop table t5; -ERROR 42S02: Unknown table 't5' -drop table if exists t5; -Warnings: -Note 1051 Unknown table 't5' -flush status; -create table t4( -id int not null primary key, -id2 int, -name char(27) -) engine=ndb; -insert into t4 values (1, 76, "Automatic2"); -select * from t4; -id id2 name -1 76 Automatic2 -flush tables; -SHOW TABLES; -Tables_in_test -select * from t4; -ERROR 42S02: Table 'test.t4' doesn't exist -flush status; -create table t1(id int) engine=ndbcluster; -create table t2(id int, b char(255)) engine=myisam; -create table t3(id int, c char(255)) engine=ndbcluster; -create table t4(id int) engine=myisam; -create table t5(id int, d char(56)) engine=ndbcluster; -create table t6(id int) engine=ndbcluster; -create table t7(id int) engine=ndbcluster; -create table t8(id int, e char(34)) engine=myisam; -create table t9(id int) engine=myisam; -insert into t2 values (2, "myisam table 2"); -insert into t3 values (3, "ndb table 3"); -insert into t5 values (5, "ndb table 5"); -insert into t6 values (6); -insert into t8 values (8, "myisam table 8"); -insert into t9 values (9); -SHOW TABLES; -Tables_in_test -t1 -t2 -t4 -t8 -t9 -t7 -t6 -select * from t6; -id -6 -select * from t7; -id -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 2 -drop table t1, t2, t4, t6, t7, t8, t9; -flush status; -create table t1(id int) engine=ndbcluster; -create table t2(id int, b char(255)) engine=myisam; -create table t3(id int, c char(255)) engine=ndbcluster; -create table t4(id int) engine=myisam; -create table t5(id int, d char(56)) engine=ndbcluster; -create table t6(id int) engine=ndbcluster; -create table t7(id int) engine=ndbcluster; -create table t8(id int, e char(34)) engine=myisam; -create table t9(id int) engine=myisam; -insert into t2 values (2, "myisam table 2"); -insert into t3 values (3, "ndb table 3"); -insert into t5 values (5, "ndb table 5"); -insert into t6 values (6); -insert into t8 values (8, "myisam table 8"); -insert into t9 values (9); -SHOW TABLES LIKE 't6'; -Tables_in_test (t6) -t6 -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 1 -create table t3(a int); -ERROR 42S01: Table 't3' already exists -create table t5(a int); -ERROR 42S01: Table 't5' already exists -SHOW TABLES LIKE 't%'; -Tables_in_test (t%) -t1 -t2 -t4 -t6 -t8 -t9 -t7 -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 2 -drop table t1, t2, t4, t6, t7, t8, t9; -flush status; -create table t1(id int) engine=ndbcluster; -create table t2(id int, b char(255)) engine=ndbcluster; -create table t3(id int, c char(255)) engine=ndbcluster; -create table t4(id int) engine=myisam; -insert into t1 values (1); -insert into t2 values (2, "table 2"); -insert into t3 values (3, "ndb table 3"); -insert into t4 values (4); -flush tables; -select * from t1, t2, t3, t4; -id id b id c id -1 2 table 2 3 ndb table 3 4 -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 3 -drop table t1, t2, t3, t4; -flush status; -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 0 -create table t5( -id int not null primary key, -name char(200) -) engine=ndb; -insert into t5 values (1, "Magnus"); -select * from t5; -id name -1 Magnus -ALTER TABLE t5 ADD COLUMN adress char(255) FIRST; -select * from t5; -adress id name -NULL 1 Magnus -insert into t5 values -("Adress for record 2", 2, "Carl-Gustav"), -("Adress for record 3", 3, "Karl-Emil"); -update t5 set name="Bertil" where id = 2; -select * from t5 order by id; -adress id name -NULL 1 Magnus -Adress for record 2 2 Bertil -Adress for record 3 3 Karl-Emil -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 0 -drop table t5; -flush status; -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 0 -create table t6( -id int not null primary key, -name char(20) -) engine=ndb; -insert into t6 values (1, "Magnus"); -select * from t6; -id name -1 Magnus -ALTER TABLE t6 ADD COLUMN adress char(255) FIRST; -select * from t6; -adress id name -NULL 1 Magnus -insert into t6 values -("Adress for record 2", 2, "Carl-Gustav"), -("Adress for record 3", 3, "Karl-Emil"); -update t6 set name="Bertil" where id = 2; -select * from t6 order by id; -adress id name -NULL 1 Magnus -Adress for record 2 2 Bertil -Adress for record 3 3 Karl-Emil -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 0 -drop table t6; -show tables; -Tables_in_test -create table t1 (a int,b longblob) engine=ndb; -show tables; -Tables_in_test -t1 -create database test2; -use test2; -show tables; -Tables_in_test2 -select * from t1; -ERROR 42S02: Table 'test2.t1' doesn't exist -create table t2 (b int,c longblob) engine=ndb; -use test; -select * from t1; -a b -show tables; -Tables_in_test -t1 -drop table t1; -use test2; -drop table t2; -drop database test2; -use test; -drop database if exists test_only_ndb_tables; -create database test_only_ndb_tables; -use test_only_ndb_tables; -create table t1 (a int primary key) engine=ndb; -select * from t1; -a -select * from t1; -ERROR HY000: Can't lock file (errno: 157) -use test; -drop database test_only_ndb_tables; -CREATE TABLE t9 ( -a int NOT NULL PRIMARY KEY, -b int -) engine=ndb; -insert t9 values(1, 2), (2,3), (3, 4), (4, 5); -create table t10 ( -a int not null primary key, -b blob -) engine=ndb; -insert into t10 values (1, 'kalle'); diff --git a/mysql-test/suite/ndb_team/r/ndb_autodiscover2.result b/mysql-test/suite/ndb_team/r/ndb_autodiscover2.result deleted file mode 100644 index 269888e0820..00000000000 --- a/mysql-test/suite/ndb_team/r/ndb_autodiscover2.result +++ /dev/null @@ -1,13 +0,0 @@ -select * from t9 order by a; -a b -1 2 -2 3 -3 4 -4 5 -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 0 -drop table t9; -select * from t10; -ERROR HY000: Got error 4263 'Invalid blob attributes or invalid blob parts table' from NDBCLUSTER -drop table t10; diff --git a/mysql-test/suite/ndb_team/r/ndb_autodiscover3.result b/mysql-test/suite/ndb_team/r/ndb_autodiscover3.result deleted file mode 100644 index 86495ebb3eb..00000000000 --- a/mysql-test/suite/ndb_team/r/ndb_autodiscover3.result +++ /dev/null @@ -1,53 +0,0 @@ -drop table if exists t1, t2; -create table t1 (a int key) engine=ndbcluster; -begin; -insert into t1 values (1); -insert into t1 values (2); -ERROR HY000: Got temporary error 4025 'Node failure caused abort of transaction' from NDBCLUSTER -commit; -ERROR HY000: Got error 4350 'Transaction already aborted' from NDBCLUSTER -drop table t1; -create table t2 (a int, b int, primary key(a,b)) engine=ndbcluster; -insert into t2 values (1,1),(2,1),(3,1),(4,1),(5,1),(6,1),(7,1),(8,1),(9,1),(10,1); -select * from t2 order by a limit 3; -a b -1 1 -2 1 -3 1 -select * from t2; -ERROR 42S02: Table 'test.t2' doesn't exist -show tables like 't2'; -Tables_in_test (t2) -reset master; -create table t2 (a int key) engine=ndbcluster; -insert into t2 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); -select * from t2 order by a limit 3; -a -1 -2 -3 -select * from t2 order by a limit 3; -a -1 -2 -3 -reset master; -select * from t2; -ERROR 42S02: Table 'test.t2' doesn't exist -show tables like 't2'; -Tables_in_test (t2) -reset master; -create table t2 (a int key) engine=ndbcluster; -insert into t2 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); -select * from t2 order by a limit 3; -a -1 -2 -3 -select * from t2 order by a limit 3; -a -1 -2 -3 -reset master; -drop table t2; diff --git a/mysql-test/suite/ndb_team/r/ndb_backup_print.result b/mysql-test/suite/ndb_team/r/ndb_backup_print.result deleted file mode 100644 index 7fa073bafb5..00000000000 --- a/mysql-test/suite/ndb_team/r/ndb_backup_print.result +++ /dev/null @@ -1,65 +0,0 @@ -use test; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; -Connected to Management Server at: : -Waiting for completed, this may take several minutes -Node : Backup started from node -Node : Backup started from node completed - StartGCP: StopGCP: - #Records: #LogRecords: - Data: bytes Log: bytes -create table t1 -(pk int key -,a1 BIT(1), a2 BIT(5), a3 BIT(33), a4 BIT(63), a5 BIT(64) -,b1 TINYINT, b2 TINYINT UNSIGNED -,c1 SMALLINT, c2 SMALLINT UNSIGNED -,d1 INT, d2 INT UNSIGNED -,e1 BIGINT, e2 BIGINT UNSIGNED -,f1 CHAR(1) BINARY, f2 CHAR(32) BINARY, f3 CHAR(255) BINARY -,g1 VARCHAR(32) BINARY, g2 VARCHAR(255) BINARY, g3 VARCHAR(1000) BINARY -,h1 BINARY(1), h2 BINARY(8), h3 BINARY(255) -,i1 VARBINARY(32), i2 VARBINARY(255), i3 VARBINARY(1000) -) engine ndb; -insert into t1 values -(1 -,0x1, 0x17, 0x789a, 0x789abcde, 0xfedc0001 -,127, 255 -,32767, 65535 -,2147483647, 4294967295 -,9223372036854775807, 18446744073709551615 -,'1','12345678901234567890123456789012','123456789' - ,'1','12345678901234567890123456789012','123456789' - ,0x12,0x123456789abcdef0, 0x012345 -,0x12,0x123456789abcdef0, 0x00123450 -); -insert into t1 values -(2 -,0, 0, 0, 0, 0 -,-128, 0 -,-32768, 0 -,-2147483648, 0 -,-9223372036854775808, 0 -,'','','' - ,'','','' - ,0x0,0x0,0x0 -,0x0,0x0,0x0 -); -insert into t1 values -(3 -,NULL,NULL,NULL,NULL,NULL -,NULL,NULL -,NULL,NULL -,NULL,NULL -,NULL,NULL -,NULL,NULL,NULL -,NULL,NULL,NULL -,NULL,NULL,NULL -,NULL,NULL,NULL -); -Connected to Management Server at: : -Waiting for completed, this may take several minutes -Node : Backup started from node -Node : Backup started from node completed - StartGCP: StopGCP: - #Records: #LogRecords: - Data: bytes Log: bytes -drop table t1; diff --git a/mysql-test/suite/ndb_team/r/ndb_dd_backuprestore.result b/mysql-test/suite/ndb_team/r/ndb_dd_backuprestore.result deleted file mode 100644 index 12a65a433a3..00000000000 --- a/mysql-test/suite/ndb_team/r/ndb_dd_backuprestore.result +++ /dev/null @@ -1,512 +0,0 @@ -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -DROP TABLE IF EXISTS test.t3; -DROP TABLE IF EXISTS test.t4; -DROP TABLE IF EXISTS test.t5; -DROP TABLE IF EXISTS test.t6; -**** Test 1 Simple DD backup and restore **** -CREATE LOGFILE GROUP log_group1 -ADD UNDOFILE './log_group1/undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; -CREATE TABLESPACE table_space1 -ADD DATAFILE './table_space1/datafile.dat' -USE LOGFILE GROUP log_group1 -INITIAL_SIZE 12M -ENGINE NDB; -CREATE TABLE test.t1 -(pk1 MEDIUMINT NOT NULL AUTO_INCREMENT PRIMARY KEY, c2 CHAR(50) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL) TABLESPACE table_space1 STORAGE DISK ENGINE=NDB; -SELECT COUNT(*) FROM test.t1; -COUNT(*) -500 -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY pk1 LIMIT 5; -pk1 c2 c3 hex(c4) -1 Sweden 500 1 -2 Sweden 499 1 -3 Sweden 498 1 -4 Sweden 497 1 -5 Sweden 496 1 -CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info -(id INT, backup_id INT) ENGINE = MEMORY; -LOAD DATA INFILE '/tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; -DROP TABLE test.backup_info; -DROP TABLE test.t1; -ALTER TABLESPACE table_space1 -DROP DATAFILE './table_space1/datafile.dat' -ENGINE = NDB; -DROP TABLESPACE table_space1 -ENGINE = NDB; -DROP LOGFILE GROUP log_group1 -ENGINE =NDB; -SELECT COUNT(*) FROM test.t1; -COUNT(*) -500 -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY pk1 LIMIT 5; -pk1 c2 c3 hex(c4) -1 Sweden 500 1 -2 Sweden 499 1 -3 Sweden 498 1 -4 Sweden 497 1 -5 Sweden 496 1 -**** Test 2 Mixed Cluster Test backup and restore **** -CREATE TABLE test.t2 -(pk1 MEDIUMINT NOT NULL AUTO_INCREMENT PRIMARY KEY, c2 VARCHAR(200) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL)ENGINE=NDB; -CREATE TABLE test.t3 (c1 int not null auto_increment, data LONGBLOB, PRIMARY KEY(c1))TABLESPACE table_space1 STORAGE DISK ENGINE=NDB; -CREATE TABLE test.t4 (c1 int not null auto_increment, data LONGBLOB, PRIMARY KEY(c1))ENGINE=NDB; -SELECT COUNT(*) FROM test.t1; -COUNT(*) -500 -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY pk1 LIMIT 5; -pk1 c2 c3 hex(c4) -1 Sweden 500 1 -2 Sweden 499 1 -3 Sweden 498 1 -4 Sweden 497 1 -5 Sweden 496 1 -SELECT COUNT(*) FROM test.t2; -COUNT(*) -500 -SELECT pk1, c2, c3, hex(c4) FROM test.t2 ORDER BY pk1 LIMIT 5; -pk1 c2 c3 hex(c4) -1 Sweden, Texas 500 0 -2 Sweden, Texas 499 0 -3 Sweden, Texas 498 0 -4 Sweden, Texas 497 0 -5 Sweden, Texas 496 0 -SELECT COUNT(*) FROM test.t3; -COUNT(*) -100 -SELECT LENGTH(data) FROM test.t3 WHERE c1 = 1; -LENGTH(data) -1024 -SELECT LENGTH(data) FROM test.t3 WHERE c1 = 2; -LENGTH(data) -16384 -SELECT COUNT(*) FROM test.t4; -COUNT(*) -100 -SELECT LENGTH(data) FROM test.t4 WHERE c1 = 1; -LENGTH(data) -1024 -SELECT LENGTH(data) FROM test.t4 WHERE c1 = 2; -LENGTH(data) -16384 -CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info -(id INT, backup_id INT) ENGINE = MEMORY; -LOAD DATA INFILE '/tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; -DROP TABLE test.backup_info; -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; -DROP TABLE test.t4; -ALTER TABLESPACE table_space1 -DROP DATAFILE './table_space1/datafile.dat' -ENGINE = NDB; -DROP TABLESPACE table_space1 -ENGINE = NDB; -DROP LOGFILE GROUP log_group1 -ENGINE =NDB; -SELECT COUNT(*) FROM test.t1; -COUNT(*) -500 -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY pk1 LIMIT 5; -pk1 c2 c3 hex(c4) -1 Sweden 500 1 -2 Sweden 499 1 -3 Sweden 498 1 -4 Sweden 497 1 -5 Sweden 496 1 -SELECT COUNT(*) FROM test.t2; -COUNT(*) -500 -SELECT pk1, c2, c3, hex(c4) FROM test.t2 ORDER BY pk1 LIMIT 5; -pk1 c2 c3 hex(c4) -1 Sweden, Texas 500 0 -2 Sweden, Texas 499 0 -3 Sweden, Texas 498 0 -4 Sweden, Texas 497 0 -5 Sweden, Texas 496 0 -SELECT COUNT(*) FROM test.t3; -COUNT(*) -100 -SELECT LENGTH(data) FROM test.t3 WHERE c1 = 1; -LENGTH(data) -1024 -SELECT LENGTH(data) FROM test.t3 WHERE c1 = 2; -LENGTH(data) -16384 -SELECT COUNT(*) FROM test.t4; -COUNT(*) -100 -SELECT LENGTH(data) FROM test.t4 WHERE c1 = 1; -LENGTH(data) -1024 -SELECT LENGTH(data) FROM test.t4 WHERE c1 = 2; -LENGTH(data) -16384 -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; -DROP TABLE test.t4; -**** Test 3 Adding partition Test backup and restore **** -CREATE TABLESPACE table_space2 -ADD DATAFILE './table_space2/datafile.dat' -USE LOGFILE GROUP log_group1 -INITIAL_SIZE 12M -ENGINE NDB; -CREATE TABLE test.t1 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 VARCHAR(150) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))TABLESPACE table_space1 STORAGE DISK ENGINE=NDB PARTITION BY HASH(c3) PARTITIONS 4; -CREATE TABLE test.t4 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 VARCHAR(180) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))ENGINE=NDB PARTITION BY HASH(c3) PARTITIONS 2; -CREATE TABLE test.t2 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 TEXT NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))TABLESPACE table_space2 STORAGE DISK ENGINE=NDB PARTITION BY KEY(c3) (PARTITION p0 ENGINE = NDB, PARTITION p1 ENGINE = NDB); -CREATE TABLE test.t5 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 TEXT NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))ENGINE=NDB PARTITION BY KEY(pk1) (PARTITION p0 ENGINE = NDB, PARTITION p1 ENGINE = NDB); -CREATE TABLE test.t3 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 VARCHAR(202) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))TABLESPACE table_space2 STORAGE DISK ENGINE=NDB PARTITION BY RANGE (c3) PARTITIONS 3 (PARTITION x1 VALUES LESS THAN (105), PARTITION x2 VALUES LESS THAN (333), PARTITION x3 VALUES LESS THAN (720)); -CREATE TABLE test.t6 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 VARCHAR(220) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))ENGINE=NDB PARTITION BY RANGE (pk1) PARTITIONS 2 (PARTITION x1 VALUES LESS THAN (333), PARTITION x2 VALUES LESS THAN (720)); -SHOW CREATE TABLE test.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` varchar(150) NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) /*!50100 TABLESPACE table_space1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (c3) -PARTITIONS 4 */ -SHOW CREATE TABLE test.t2; -Table Create Table -t2 CREATE TABLE `t2` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` text NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) /*!50100 TABLESPACE table_space2 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (c3) -(PARTITION p0 ENGINE = ndbcluster, - PARTITION p1 ENGINE = ndbcluster) */ -SHOW CREATE TABLE test.t3; -Table Create Table -t3 CREATE TABLE `t3` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` varchar(202) NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) /*!50100 TABLESPACE table_space2 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (c3) -(PARTITION x1 VALUES LESS THAN (105) ENGINE = ndbcluster, - PARTITION x2 VALUES LESS THAN (333) ENGINE = ndbcluster, - PARTITION x3 VALUES LESS THAN (720) ENGINE = ndbcluster) */ -SHOW CREATE TABLE test.t4; -Table Create Table -t4 CREATE TABLE `t4` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` varchar(180) NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (c3) -PARTITIONS 2 */ -SHOW CREATE TABLE test.t5; -Table Create Table -t5 CREATE TABLE `t5` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` text NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (pk1) -(PARTITION p0 ENGINE = ndbcluster, - PARTITION p1 ENGINE = ndbcluster) */ -SHOW CREATE TABLE test.t6; -Table Create Table -t6 CREATE TABLE `t6` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` varchar(220) NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (pk1) -(PARTITION x1 VALUES LESS THAN (333) ENGINE = ndbcluster, - PARTITION x2 VALUES LESS THAN (720) ENGINE = ndbcluster) */ -SELECT * FROM information_schema.partitions WHERE table_name= 't1'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t1 p0 NULL 1 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space1 -NULL test t1 p1 NULL 2 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space1 -NULL test t1 p2 NULL 3 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space1 -NULL test t1 p3 NULL 4 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space1 -SELECT * FROM information_schema.partitions WHERE table_name= 't2'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t2 p0 NULL 1 NULL KEY NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 -NULL test t2 p1 NULL 2 NULL KEY NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 -SELECT * FROM information_schema.partitions WHERE table_name= 't3'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t3 x1 NULL 1 NULL RANGE NULL c3 NULL 105 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 -NULL test t3 x2 NULL 2 NULL RANGE NULL c3 NULL 333 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 -NULL test t3 x3 NULL 3 NULL RANGE NULL c3 NULL 720 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 -SELECT * FROM information_schema.partitions WHERE table_name= 't4'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t4 p0 NULL 1 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -NULL test t4 p1 NULL 2 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -SELECT * FROM information_schema.partitions WHERE table_name= 't5'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t5 p0 NULL 1 NULL KEY NULL pk1 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -NULL test t5 p1 NULL 2 NULL KEY NULL pk1 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -SELECT * FROM information_schema.partitions WHERE table_name= 't6'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t6 x1 NULL 1 NULL RANGE NULL pk1 NULL 333 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -NULL test t6 x2 NULL 2 NULL RANGE NULL pk1 NULL 720 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -SELECT COUNT(*) FROM test.t1; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 Sweden, Texas 2 0 -249 Sweden, Texas 4 0 -248 Sweden, Texas 6 0 -247 Sweden, Texas 8 0 -246 Sweden, Texas 10 0 -SELECT COUNT(*) FROM test.t2; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t2 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 1 1 -249 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 3 1 -248 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 5 1 -247 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 7 1 -246 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 9 1 -SELECT COUNT(*) FROM test.t3; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t3 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 0 1 -249 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 2 1 -248 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 4 1 -247 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 6 1 -246 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 8 1 -SELECT COUNT(*) FROM test.t4; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t4 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 Sweden, Texas 2 0 -249 Sweden, Texas 4 0 -248 Sweden, Texas 6 0 -247 Sweden, Texas 8 0 -246 Sweden, Texas 10 0 -SELECT COUNT(*) FROM test.t5; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t5 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 1 1 -249 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 3 1 -248 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 5 1 -247 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 7 1 -246 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 9 1 -SELECT COUNT(*) FROM test.t6; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t6 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 0 1 -249 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 2 1 -248 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 4 1 -247 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 6 1 -246 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 8 1 -CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info -(id INT, backup_id INT) ENGINE = MEMORY; -LOAD DATA INFILE '/tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; -DROP TABLE test.backup_info; -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; -DROP TABLE test.t4; -DROP TABLE test.t5; -DROP TABLE test.t6; -ALTER TABLESPACE table_space1 -DROP DATAFILE './table_space1/datafile.dat' -ENGINE = NDB; -ALTER TABLESPACE table_space2 -DROP DATAFILE './table_space2/datafile.dat' -ENGINE = NDB; -DROP TABLESPACE table_space1 -ENGINE = NDB; -DROP TABLESPACE table_space2 -ENGINE = NDB; -DROP LOGFILE GROUP log_group1 -ENGINE =NDB; -SHOW CREATE TABLE test.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` varchar(150) NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) /*!50100 TABLESPACE table_space1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (c3) -PARTITIONS 4 */ -SHOW CREATE TABLE test.t2; -Table Create Table -t2 CREATE TABLE `t2` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` text NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) /*!50100 TABLESPACE table_space2 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (c3) -(PARTITION p0 ENGINE = ndbcluster, - PARTITION p1 ENGINE = ndbcluster) */ -SHOW CREATE TABLE test.t3; -Table Create Table -t3 CREATE TABLE `t3` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` varchar(202) NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) /*!50100 TABLESPACE table_space2 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (c3) -(PARTITION x1 VALUES LESS THAN (105) ENGINE = ndbcluster, - PARTITION x2 VALUES LESS THAN (333) ENGINE = ndbcluster, - PARTITION x3 VALUES LESS THAN (720) ENGINE = ndbcluster) */ -SHOW CREATE TABLE test.t4; -Table Create Table -t4 CREATE TABLE `t4` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` varchar(180) NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (c3) -PARTITIONS 2 */ -SHOW CREATE TABLE test.t5; -Table Create Table -t5 CREATE TABLE `t5` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` text NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (pk1) -(PARTITION p0 ENGINE = ndbcluster, - PARTITION p1 ENGINE = ndbcluster) */ -SHOW CREATE TABLE test.t6; -Table Create Table -t6 CREATE TABLE `t6` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` varchar(220) NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (pk1) -(PARTITION x1 VALUES LESS THAN (333) ENGINE = ndbcluster, - PARTITION x2 VALUES LESS THAN (720) ENGINE = ndbcluster) */ -SELECT * FROM information_schema.partitions WHERE table_name= 't1'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t1 p0 NULL 1 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space1 -NULL test t1 p1 NULL 2 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space1 -NULL test t1 p2 NULL 3 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space1 -NULL test t1 p3 NULL 4 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space1 -SELECT * FROM information_schema.partitions WHERE table_name= 't2'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t2 p0 NULL 1 NULL KEY NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 -NULL test t2 p1 NULL 2 NULL KEY NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 -SELECT * FROM information_schema.partitions WHERE table_name= 't3'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t3 x1 NULL 1 NULL RANGE NULL c3 NULL 105 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 -NULL test t3 x2 NULL 2 NULL RANGE NULL c3 NULL 333 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 -NULL test t3 x3 NULL 3 NULL RANGE NULL c3 NULL 720 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 -SELECT * FROM information_schema.partitions WHERE table_name= 't4'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t4 p0 NULL 1 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -NULL test t4 p1 NULL 2 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -SELECT * FROM information_schema.partitions WHERE table_name= 't5'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t5 p0 NULL 1 NULL KEY NULL pk1 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -NULL test t5 p1 NULL 2 NULL KEY NULL pk1 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -SELECT * FROM information_schema.partitions WHERE table_name= 't6'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t6 x1 NULL 1 NULL RANGE NULL pk1 NULL 333 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -NULL test t6 x2 NULL 2 NULL RANGE NULL pk1 NULL 720 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -SELECT COUNT(*) FROM test.t1; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 Sweden, Texas 2 0 -249 Sweden, Texas 4 0 -248 Sweden, Texas 6 0 -247 Sweden, Texas 8 0 -246 Sweden, Texas 10 0 -SELECT COUNT(*) FROM test.t2; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t2 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 1 1 -249 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 3 1 -248 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 5 1 -247 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 7 1 -246 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 9 1 -SELECT COUNT(*) FROM test.t3; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t3 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 0 1 -249 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 2 1 -248 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 4 1 -247 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 6 1 -246 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 8 1 -SELECT COUNT(*) FROM test.t4; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t4 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 Sweden, Texas 2 0 -249 Sweden, Texas 4 0 -248 Sweden, Texas 6 0 -247 Sweden, Texas 8 0 -246 Sweden, Texas 10 0 -SELECT COUNT(*) FROM test.t5; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t5 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 1 1 -249 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 3 1 -248 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 5 1 -247 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 7 1 -246 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 9 1 -SELECT COUNT(*) FROM test.t6; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t6 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 0 1 -249 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 2 1 -248 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 4 1 -247 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 6 1 -246 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 8 1 -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; -DROP TABLE test.t4; -DROP TABLE test.t5; -DROP TABLE test.t6; -ALTER TABLESPACE table_space1 DROP DATAFILE './table_space1/datafile.dat' ENGINE=NDB; -ALTER TABLESPACE table_space2 DROP DATAFILE './table_space2/datafile.dat' ENGINE=NDB; -DROP TABLESPACE table_space1 ENGINE = NDB; -DROP TABLESPACE table_space2 ENGINE = NDB; -DROP LOGFILE GROUP log_group1 ENGINE = NDB; diff --git a/mysql-test/suite/ndb_team/r/rpl_ndb_dd_advance.result b/mysql-test/suite/ndb_team/r/rpl_ndb_dd_advance.result deleted file mode 100644 index 37188aeb1ca..00000000000 --- a/mysql-test/suite/ndb_team/r/rpl_ndb_dd_advance.result +++ /dev/null @@ -1,323 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -DROP TABLE IF EXISTS t1, t2, t3; -***** Test 1 RPL of CDD and Alter ***** -***** Test 1 setup ***** -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE 4M -ENGINE=NDB; -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE=NDB; -ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile02.dat' -INITIAL_SIZE 4M -ENGINE=NDB; -CREATE TABLE t1 -(c1 INT NOT NULL PRIMARY KEY, -c2 INT NOT NULL, -c3 INT NOT NULL) -TABLESPACE ts1 STORAGE DISK -ENGINE=NDB; -***** insert some data ***** -***** Select from Master ***** -SELECT * FROM t1 ORDER BY c1 LIMIT 5; -c1 c2 c3 -1 2 4 -2 4 5 -3 6 6 -4 8 7 -5 10 8 -***** Select from Slave ***** -SELECT * FROM t1 ORDER BY c1 LIMIT 5; -c1 c2 c3 -1 2 4 -2 4 5 -3 6 6 -4 8 7 -5 10 8 -FILE_NAME FILE_TYPE TABLESPACE_NAME LOGFILE_GROUP_NAME -NULL UNDO LOG NULL lg1 -datafile.dat DATAFILE ts1 lg1 -datafile02.dat DATAFILE ts1 lg1 -undofile.dat UNDO LOG NULL lg1 -undofile02.dat UNDO LOG NULL lg1 -**** Do First Set of ALTERs in the master table **** -CREATE INDEX t1_i ON t1(c2, c3); -CREATE UNIQUE INDEX t1_i2 ON t1(c2); -ALTER TABLE t1 ADD c4 TIMESTAMP; -ALTER TABLE t1 ADD c5 DOUBLE; -ALTER TABLE t1 ADD INDEX (c5); -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL, - `c2` int(11) NOT NULL, - `c3` int(11) NOT NULL, - `c4` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `c5` double DEFAULT NULL, - PRIMARY KEY (`c1`), - UNIQUE KEY `t1_i2` (`c2`), - KEY `t1_i` (`c2`,`c3`), - KEY `c5` (`c5`) -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -**** Show first set of ALTERs on SLAVE **** -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL, - `c2` int(11) NOT NULL, - `c3` int(11) NOT NULL, - `c4` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `c5` double DEFAULT NULL, - PRIMARY KEY (`c1`), - UNIQUE KEY `t1_i2` (`c2`), - KEY `t1_i` (`c2`,`c3`), - KEY `c5` (`c5`) -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -**** Second set of alters test 1 **** -ALTER TABLE t1 RENAME t2; -ALTER TABLE t2 DROP INDEX c5; -CREATE TABLE t1(c1 INT)ENGINE=NDB; -INSERT INTO t1 VALUES(1); -DROP TABLE t1; -ALTER TABLE t2 RENAME t1; -**** Show second set of ALTERs on MASTER **** -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL, - `c2` int(11) NOT NULL, - `c3` int(11) NOT NULL, - `c4` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `c5` double DEFAULT NULL, - PRIMARY KEY (`c1`), - UNIQUE KEY `t1_i2` (`c2`), - KEY `t1_i` (`c2`,`c3`) -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -**** Show second set of ALTERs on SLAVE **** -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL, - `c2` int(11) NOT NULL, - `c3` int(11) NOT NULL, - `c4` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `c5` double DEFAULT NULL, - PRIMARY KEY (`c1`), - UNIQUE KEY `t1_i2` (`c2`), - KEY `t1_i` (`c2`,`c3`) -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -**** Third and last set of alters for test1 **** -ALTER TABLE t1 CHANGE c1 c1 DOUBLE; -ALTER TABLE t1 CHANGE c2 c2 DECIMAL(10,2); -ALTER TABLE t1 DROP COLUMN c3; -ALTER TABLE t1 CHANGE c4 c4 TEXT CHARACTER SET utf8; -ALTER TABLE t1 CHANGE c4 c4 BLOB; -ALTER TABLE t1 CHANGE c4 c3 BLOB; -set @b1 = 'b1'; -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -UPDATE t1 SET c3=@b1 where c1 = 1; -UPDATE t1 SET c3=@b1 where c1 = 2; -**** Show last set of ALTERs on MASTER **** -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` double NOT NULL DEFAULT '0', - `c2` decimal(10,2) DEFAULT NULL, - `c3` blob, - `c5` double DEFAULT NULL, - PRIMARY KEY (`c1`), - UNIQUE KEY `t1_i2` (`c2`), - KEY `t1_i` (`c2`) -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -SELECT * FROM t1 ORDER BY c1 LIMIT 5; -c1 c2 c3 c5 -1 2.00 b1b1b1b1b1b1b1b1b1b1 NULL -2 4.00 b1b1b1b1b1b1b1b1b1b1 NULL -3 6.00 0000-00-00 00:00:00 NULL -4 8.00 0000-00-00 00:00:00 NULL -5 10.00 0000-00-00 00:00:00 NULL -**** Show last set of ALTERs on SLAVE **** -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` double NOT NULL DEFAULT '0', - `c2` decimal(10,2) DEFAULT NULL, - `c3` blob, - `c5` double DEFAULT NULL, - PRIMARY KEY (`c1`), - UNIQUE KEY `t1_i2` (`c2`), - KEY `t1_i` (`c2`) -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -SELECT * FROM t1 ORDER BY c1 LIMIT 5; -c1 c2 c3 c5 -1 2.00 b1b1b1b1b1b1b1b1b1b1 NULL -2 4.00 b1b1b1b1b1b1b1b1b1b1 NULL -3 6.00 0000-00-00 00:00:00 NULL -4 8.00 0000-00-00 00:00:00 NULL -5 10.00 0000-00-00 00:00:00 NULL -SELECT * FROM t1 where c1 = 1; -c1 c2 c3 c5 -1 2.00 b1b1b1b1b1b1b1b1b1b1 NULL -DROP TABLE t1; -STOP SLAVE; -RESET SLAVE; -RESET MASTER; -START SLAVE; -******** Create additional TABLESPACE test 2 ************** -CREATE TABLESPACE ts2 -ADD DATAFILE 'datafile03.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 10M -ENGINE=NDB; -ALTER TABLESPACE ts2 -ADD DATAFILE 'datafile04.dat' -INITIAL_SIZE 5M -ENGINE=NDB; -DROP DATABASE IF EXISTS tpcb; -CREATE DATABASE tpcb; - -CREATE TABLE tpcb.account -(id INT, bid INT, balance DECIMAL(10,2), -filler CHAR(255), PRIMARY KEY(id)) -TABLESPACE ts2 STORAGE DISK -ENGINE=NDBCLUSTER; - -CREATE TABLE tpcb.branch -(bid INT, balance DECIMAL(10,2), filler VARCHAR(255), -PRIMARY KEY(bid))TABLESPACE ts2 STORAGE DISK -ENGINE=NDBCLUSTER; - -CREATE TABLE tpcb.teller -(tid INT, balance DECIMAL(10,2), filler VARCHAR(255), -PRIMARY KEY(tid)) TABLESPACE ts2 STORAGE DISK -ENGINE=NDBCLUSTER; - -CREATE TABLE tpcb.history -(id MEDIUMINT NOT NULL AUTO_INCREMENT,aid INT, -tid INT, bid INT, amount DECIMAL(10,2), -tdate DATETIME, teller CHAR(20), uuidf LONGBLOB, -filler CHAR(80),PRIMARY KEY (id)) -TABLESPACE ts2 STORAGE DISK -ENGINE=NDBCLUSTER; - ---- Create stored procedures & functions --- - - -*** Stored Procedures Created *** - -****** TEST 2 test time ********************************* -USE tpcb; -*********** Load up the database ****************** -CALL tpcb.load(); -********** Check load master and slave ************** -SELECT COUNT(*) FROM account; -COUNT(*) -1000 -USE tpcb; -SELECT COUNT(*) FROM account; -COUNT(*) -1000 -******** Run in some transactions *************** -***** Time to try slave sync *********** -**** Must make sure slave is clean ***** -STOP SLAVE; -RESET SLAVE; -DROP PROCEDURE IF EXISTS tpcb.load; -DROP PROCEDURE IF EXISTS tpcb.trans; -DROP TABLE IF EXISTS tpcb.account; -DROP TABLE IF EXISTS tpcb.teller; -DROP TABLE IF EXISTS tpcb.branch; -DROP TABLE IF EXISTS tpcb.history; -DROP DATABASE tpcb; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE=NDB; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile02.dat' -ENGINE=NDB; -DROP TABLESPACE ts1 ENGINE=NDB; -ALTER TABLESPACE ts2 -DROP DATAFILE 'datafile03.dat' -ENGINE=NDB; -ALTER TABLESPACE ts2 -DROP DATAFILE 'datafile04.dat' -ENGINE=NDB; -DROP TABLESPACE ts2 ENGINE=NDB; -DROP LOGFILE GROUP lg1 ENGINE=NDB; -********** Take a backup of the Master ************* -SELECT COUNT(*) FROM history; -COUNT(*) -100 -SELECT COUNT(*) FROM history; -COUNT(*) -200 -CREATE TEMPORARY TABLE test.backup_info (id INT, backup_id INT) ENGINE = HEAP; -LOAD DATA INFILE 'DUMP_FILE' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; -DROP TABLE test.backup_info; -************ Restore the slave ************************ -CREATE DATABASE tpcb; -***** Check a few slave restore values *************** -USE tpcb; -SELECT COUNT(*) FROM account; -COUNT(*) -1000 -***** Add some more records to master ********* -***** Finsh the slave sync process ******* -@the_epoch:=MAX(epoch) - -@the_pos:=Position @the_file:=SUBSTRING_INDEX(FILE, '/', -1) - master-bin.000001 -* 4. * -* 5. * -START SLAVE; -**** We should be ready to continue on ************* -****** Let's make sure we match ******* -***** MASTER ******* -USE tpcb; -SELECT COUNT(*) FROM history; -COUNT(*) -400 -****** SLAVE ******** -USE tpcb; -SELECT COUNT(*) FROM history; -COUNT(*) -400 -*** DUMP MASTER & SLAVE FOR COMPARE ******** -*************** TEST 2 CLEANUP SECTION ******************** -DROP PROCEDURE IF EXISTS tpcb.load; -DROP PROCEDURE IF EXISTS tpcb.trans; -DROP TABLE tpcb.account; -DROP TABLE tpcb.teller; -DROP TABLE tpcb.branch; -DROP TABLE tpcb.history; -DROP DATABASE tpcb; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE=NDB; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile02.dat' -ENGINE=NDB; -DROP TABLESPACE ts1 ENGINE=NDB; -ALTER TABLESPACE ts2 -DROP DATAFILE 'datafile03.dat' -ENGINE=NDB; -ALTER TABLESPACE ts2 -DROP DATAFILE 'datafile04.dat' -ENGINE=NDB; -DROP TABLESPACE ts2 ENGINE=NDB; -DROP LOGFILE GROUP lg1 ENGINE=NDB; -****** Do dumps compare ************ diff --git a/mysql-test/suite/ndb_team/r/rpl_ndb_extraColMaster.result b/mysql-test/suite/ndb_team/r/rpl_ndb_extraColMaster.result deleted file mode 100644 index 55a95605839..00000000000 --- a/mysql-test/suite/ndb_team/r/rpl_ndb_extraColMaster.result +++ /dev/null @@ -1,1752 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -set binlog_format=row; - -*********************************************************** -*********************************************************** -***************** Start of Testing ************************ -*********************************************************** -*********************************************************** -* This test format == binlog_format ROW and engine == 'NDB' -*********************************************************** -*********************************************************** - -***** Testing more columns on the Master ***** - -CREATE TABLE t1 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), -/* extra */ -f5 FLOAT DEFAULT '2.00', -f6 CHAR(4) DEFAULT 'TEST', -f7 INT DEFAULT '0', -f8 TEXT, -f9 LONGBLOB, -f10 BIT(63), -f11 VARBINARY(64))ENGINE='NDB'; - -* Alter Table on Slave and drop columns f5 through f11 * - -alter table t1 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11; - -* Insert data in Master then update and delete some rows* - -* Select count and 20 rows from Master * - -SELECT COUNT(*) FROM t1; -COUNT(*) -40 - -SELECT f1,f2,f3,f4,f5,f6,f7,f8,f9, -hex(f10),hex(f11) FROM t1 ORDER BY f3 LIMIT 20; -f1 f2 f3 f4 f5 f6 f7 f8 f9 hex(f10) hex(f11) -2 2 2 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -3 3 3 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -5 5 5 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -6 6 6 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -8 8 8 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -9 9 9 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -11 11 11 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -12 12 12 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -14 14 14 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -15 15 15 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -17 17 17 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -18 18 18 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -20 20 20 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -21 21 21 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -23 23 23 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -24 24 24 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -26 26 26 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -27 27 27 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -29 29 29 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -30 30 30 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 - -* Select count and 20 rows from Slave * - -SELECT COUNT(*) FROM t1; -COUNT(*) -40 - -SELECT * FROM t1 ORDER BY f3 LIMIT 20; -f1 f2 f3 f4 -2 2 2 second -3 3 3 next -5 5 5 second -6 6 6 next -8 8 8 second -9 9 9 next -11 11 11 second -12 12 12 next -14 14 14 second -15 15 15 next -17 17 17 second -18 18 18 next -20 20 20 second -21 21 21 next -23 23 23 second -24 24 24 next -26 26 26 second -27 27 27 next -29 29 29 second -30 30 30 next -Checking that both slave threads are running. - -***** Testing Altering table def scenario ***** - -CREATE TABLE t2 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), -/* extra */ -f5 DOUBLE DEFAULT '2.00', -f6 ENUM('a', 'b', 'c') default 'a', -f7 DECIMAL(17,9) default '1000.00', -f8 MEDIUMBLOB, -f9 NUMERIC(6,4) default '2000.00', -f10 VARCHAR(1024), -f11 BINARY(20) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', -f12 SET('a', 'b', 'c') default 'b') -ENGINE='NDB'; -Warnings: -Warning 1264 Out of range value for column 'f9' at row 1 - -CREATE TABLE t3 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), -/* extra */ -f5 DOUBLE DEFAULT '2.00', -f6 ENUM('a', 'b', 'c') default 'a', -f8 MEDIUMBLOB, -f10 VARCHAR(1024), -f11 BINARY(20) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', -f12 SET('a', 'b', 'c') default 'b') -ENGINE='NDB'; - -CREATE TABLE t4 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), -/* extra */ -f5 DOUBLE DEFAULT '2.00', -f6 DECIMAL(17,9) default '1000.00', -f7 MEDIUMBLOB, -f8 NUMERIC(6,4) default '2000.00', -f9 VARCHAR(1024), -f10 BINARY(20) not null default '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', -f11 CHAR(255)) -ENGINE='NDB'; -Warnings: -Warning 1264 Out of range value for column 'f8' at row 1 - -CREATE TABLE t31 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), -/* extra */ -f5 BIGINT, -f6 BLOB, -f7 DATE, -f8 DATETIME, -f9 FLOAT, -f10 INT, -f11 LONGBLOB, -f12 LONGTEXT, -f13 MEDIUMBLOB, -f14 MEDIUMINT, -f15 MEDIUMTEXT, -f16 REAL, -f17 SMALLINT, -f18 TEXT, -f19 TIME, -f20 TIMESTAMP, -f21 TINYBLOB, -f22 TINYINT, -f23 TINYTEXT, -f24 YEAR, -f25 BINARY(255), -f26 BIT(64), -f27 CHAR(255), -f28 DECIMAL(30,7), -f29 DOUBLE, -f30 ENUM ('a','b', 'c') default 'a', -f31 FLOAT, -f32 NUMERIC(17,9), -f33 SET ('a', 'b', 'c') default 'b', -f34 VARBINARY(1025), -f35 VARCHAR(257) -) ENGINE='NDB'; - -** Alter tables on slave and drop columns ** - -alter table t2 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11, drop -f12; -alter table t3 drop f5, drop f6, drop f8, drop f10, drop f11, drop f12; -alter table t4 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11; -alter table t31 -drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11, -drop f12, drop f13, drop f14, drop f15, drop f16, drop f17, drop f18, -drop f19, drop f20, drop f21, drop f22, drop f23, drop f24, drop f25, -drop f26, drop f27, drop f28, drop f29, drop f30, drop f31, drop f32, -drop f33, drop f34, drop f35; - -** Insert Data into Master ** -INSERT into t2 set f1=1, f2=1, f3=1, f4='first', f8='f8: medium size blob', f10='f10: -some var char'; -INSERT into t2 values (2, 2, 2, 'second', -2.0, 'b', 2000.0002, 'f8: medium size blob', 2000, 'f10: some var char', -'01234567', 'c'), -(3, 3, 3, 'third', -3.0, 'b', 3000.0003, 'f8: medium size blob', 3000, 'f10: some var char', -'01234567', 'c'); -Warnings: -Warning 1264 Out of range value for column 'f9' at row 1 -Warning 1264 Out of range value for column 'f9' at row 2 -INSERT into t3 set f1=1, f2=1, f3=1, f4='first', f10='f10: some var char'; -INSERT into t4 set f1=1, f2=1, f3=1, f4='first', f7='f7: medium size blob', f10='f10: -binary data'; -INSERT into t31 set f1=1, f2=1, f3=1, f4='first'; -INSERT into t31 set f1=1, f2=1, f3=2, f4='second', -f9=2.2, f10='seven samurai', f28=222.222, f35='222'; -Warnings: -Warning 1366 Incorrect integer value: 'seven samurai' for column 'f10' at row 1 -INSERT into t31 values (1, 1, 3, 'third', -/* f5 BIGINT, */ 333333333333333333333333, -/* f6 BLOB, */ '3333333333333333333333', -/* f7 DATE, */ '2007-07-18', -/* f8 DATETIME, */ "2007-07-18", -/* f9 FLOAT, */ 3.33333333, -/* f10 INT, */ 333333333, -/* f11 LONGBLOB, */ '3333333333333333333', -/* f12 LONGTEXT, */ '3333333333333333333', -/* f13 MEDIUMBLOB, */ '3333333333333333333', -/* f14 MEDIUMINT, */ 33, -/* f15 MEDIUMTEXT, */ 3.3, -/* f16 REAL, */ 3.3, -/* f17 SMALLINT, */ 3, -/* f18 TEXT, */ '33', -/* f19 TIME, */ '2:59:58.999', -/* f20 TIMESTAMP, */ 20000303000000, -/* f21 TINYBLOB, */ '3333', -/* f22 TINYINT, */ 3, -/* f23 TINYTEXT, */ '3', -/* f24 YEAR, */ 3000, -/* f25 BINARY(255), */ 'three_33333', -/* f26 BIT(64), */ b'011', -/* f27 CHAR(255), */ 'three', -/* f28 DECIMAL(30,7), */ 3.333, -/* f29 DOUBLE, */ 3.333333333333333333333333333, -/* f30 ENUM ('a','b','c')*/ 'c', -/* f31 FLOAT, */ 3.0, -/* f32 NUMERIC(17,9), */ 3.3333, -/* f33 SET ('a','b','c'),*/ 'c', -/*f34 VARBINARY(1025),*/ '3333 minus 3', -/*f35 VARCHAR(257),*/ 'three times three' - ); -Warnings: -Warning 1264 Out of range value for column 'f5' at row 1 -Warning 1264 Out of range value for column 'f24' at row 1 -INSERT into t31 values (1, 1, 4, 'fourth', -/* f5 BIGINT, */ 333333333333333333333333, -/* f6 BLOB, */ '3333333333333333333333', -/* f7 DATE, */ '2007-07-18', -/* f8 DATETIME, */ "2007-07-18", -/* f9 FLOAT, */ 3.33333333, -/* f10 INT, */ 333333333, -/* f11 LONGBLOB, */ '3333333333333333333', -/* f12 LONGTEXT, */ '3333333333333333333', -/* f13 MEDIUMBLOB, */ '3333333333333333333', -/* f14 MEDIUMINT, */ 33, -/* f15 MEDIUMTEXT, */ 3.3, -/* f16 REAL, */ 3.3, -/* f17 SMALLINT, */ 3, -/* f18 TEXT, */ '33', -/* f19 TIME, */ '2:59:58.999', -/* f20 TIMESTAMP, */ 20000303000000, -/* f21 TINYBLOB, */ '3333', -/* f22 TINYINT, */ 3, -/* f23 TINYTEXT, */ '3', -/* f24 YEAR, */ 3000, -/* f25 BINARY(255), */ 'three_33333', -/* f26 BIT(64), */ b'011', -/* f27 CHAR(255), */ 'three', -/* f28 DECIMAL(30,7), */ 3.333, -/* f29 DOUBLE, */ 3.333333333333333333333333333, -/* f30 ENUM ('a','b','c')*/ 'c', -/* f31 FLOAT, */ 3.0, -/* f32 NUMERIC(17,9), */ 3.3333, -/* f33 SET ('a','b','c'),*/ 'c', -/*f34 VARBINARY(1025),*/ '3333 minus 3', -/*f35 VARCHAR(257),*/ 'three times three' - ), -(1, 1, 5, 'fifth', -/* f5 BIGINT, */ 333333333333333333333333, -/* f6 BLOB, */ '3333333333333333333333', -/* f7 DATE, */ '2007-07-18', -/* f8 DATETIME, */ "2007-07-18", -/* f9 FLOAT, */ 3.33333333, -/* f10 INT, */ 333333333, -/* f11 LONGBLOB, */ '3333333333333333333', -/* f12 LONGTEXT, */ '3333333333333333333', -/* f13 MEDIUMBLOB, */ '3333333333333333333', -/* f14 MEDIUMINT, */ 33, -/* f15 MEDIUMTEXT, */ 3.3, -/* f16 REAL, */ 3.3, -/* f17 SMALLINT, */ 3, -/* f18 TEXT, */ '33', -/* f19 TIME, */ '2:59:58.999', -/* f20 TIMESTAMP, */ 20000303000000, -/* f21 TINYBLOB, */ '3333', -/* f22 TINYINT, */ 3, -/* f23 TINYTEXT, */ '3', -/* f24 YEAR, */ 3000, -/* f25 BINARY(255), */ 'three_33333', -/* f26 BIT(64), */ b'011', -/* f27 CHAR(255), */ 'three', -/* f28 DECIMAL(30,7), */ 3.333, -/* f29 DOUBLE, */ 3.333333333333333333333333333, -/* f30 ENUM ('a','b','c')*/ 'c', -/* f31 FLOAT, */ 3.0, -/* f32 NUMERIC(17,9), */ 3.3333, -/* f33 SET ('a','b','c'),*/ 'c', -/*f34 VARBINARY(1025),*/ '3333 minus 3', -/*f35 VARCHAR(257),*/ 'three times three' - ), -(1, 1, 6, 'sixth', -/* f5 BIGINT, */ NULL, -/* f6 BLOB, */ '3333333333333333333333', -/* f7 DATE, */ '2007-07-18', -/* f8 DATETIME, */ "2007-07-18", -/* f9 FLOAT, */ 3.33333333, -/* f10 INT, */ 333333333, -/* f11 LONGBLOB, */ '3333333333333333333', -/* f12 LONGTEXT, */ '3333333333333333333', -/* f13 MEDIUMBLOB, */ '3333333333333333333', -/* f14 MEDIUMINT, */ 33, -/* f15 MEDIUMTEXT, */ 3.3, -/* f16 REAL, */ 3.3, -/* f17 SMALLINT, */ 3, -/* f18 TEXT, */ '33', -/* f19 TIME, */ '2:59:58.999', -/* f20 TIMESTAMP, */ 20000303000000, -/* f21 TINYBLOB, */ '3333', -/* f22 TINYINT, */ 3, -/* f23 TINYTEXT, */ '3', -/* f24 YEAR, */ 3000, -/* f25 BINARY(255), */ 'three_33333', -/* f26 BIT(64), */ b'011', -/* f27 CHAR(255), */ 'three', -/* f28 DECIMAL(30,7), */ 3.333, -/* f29 DOUBLE, */ 3.333333333333333333333333333, -/* f30 ENUM ('a','b','c')*/ 'c', -/* f31 FLOAT, */ 3.0, -/* f32 NUMERIC(17,9), */ 3.3333, -/* f33 SET ('a','b','c'),*/ 'c', -/*f34 VARBINARY(1025),*/ '3333 minus 3', -/*f35 VARCHAR(257),*/ NULL -); -Warnings: -Warning 1264 Out of range value for column 'f5' at row 1 -Warning 1264 Out of range value for column 'f24' at row 1 -Warning 1264 Out of range value for column 'f5' at row 2 -Warning 1264 Out of range value for column 'f24' at row 2 -Warning 1264 Out of range value for column 'f24' at row 3 - -** Sync slave with master ** -** Do selects from tables ** - -select * from t1 order by f3; -f1 f2 f3 f4 -2 2 2 second -3 3 3 next -5 5 5 second -6 6 6 next -8 8 8 second -9 9 9 next -11 11 11 second -12 12 12 next -14 14 14 second -15 15 15 next -17 17 17 second -18 18 18 next -20 20 20 second -21 21 21 next -23 23 23 second -24 24 24 next -26 26 26 second -27 27 27 next -29 29 29 second -30 30 30 next -31 31 31 second -32 32 32 second -33 33 33 second -34 34 34 second -35 35 35 second -36 36 36 second -37 37 37 second -38 38 38 second -39 39 39 second -40 40 40 second -41 41 41 second -42 42 42 second -43 43 43 second -44 44 44 second -45 45 45 second -46 46 46 second -47 47 47 second -48 48 48 second -49 49 49 second -50 50 50 second -select * from t2 order by f1; -f1 f2 f3 f4 -1 1 1 first -2 2 2 second -3 3 3 third -select * from t3 order by f1; -f1 f2 f3 f4 -1 1 1 first -select * from t4 order by f1; -f1 f2 f3 f4 -1 1 1 first -select * from t31 order by f3; -f1 f2 f3 f4 -1 1 1 first -1 1 2 second -1 1 3 third -1 1 4 fourth -1 1 5 fifth -1 1 6 sixth - -** Do updates master ** - -update t31 set f5=555555555555555 where f3=6; -update t31 set f2=2 where f3=2; -update t31 set f1=NULL where f3=1; -update t31 set f3=NULL, f27=NULL, f35='f35 new value' where f3=3; -Warnings: -Warning 1048 Column 'f3' cannot be null - -** Delete from Master ** - -delete from t1; -delete from t2; -delete from t3; -delete from t4; -delete from t31; -select * from t31; -f1 f2 f3 f4 - -** Check slave status ** - -Checking that both slave threads are running. - -**************************************** -* columns in master at middle of table * -* Expect: Proper error message * -**************************************** - -** Stop and Reset Slave ** - -STOP SLAVE; -RESET SLAVE; - -** create table slave side ** -CREATE TABLE t10 (a INT PRIMARY KEY, b BLOB, c CHAR(5) -) ENGINE='NDB'; - -** Connect to master and create table ** - -CREATE TABLE t10 (a INT KEY, b BLOB, f DOUBLE DEFAULT '233', -c CHAR(5), e INT DEFAULT '1')ENGINE='NDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t10 () VALUES(1,@b1,DEFAULT,'Kyle',DEFAULT), -(2,@b1,DEFAULT,'JOE',DEFAULT), -(3,@b1,DEFAULT,'QA',DEFAULT); - -******************************************** -*** Expect slave to fail with Error 1677 *** -******************************************** - ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Column 2 of table 'test.t10' cannot be converted from type 'double' to type 'char(5)' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc - -*** Drop t10 *** -DROP TABLE t10; - -********************************************* -* More columns in master at middle of table * -* Expect: Proper error message * -********************************************* - -*** Create t11 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t11 (a INT PRIMARY KEY, b BLOB, c VARCHAR(254) -) ENGINE='NDB'; - -*** Create t11 on Master *** -CREATE TABLE t11 (a INT KEY, b BLOB, f TEXT, -c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='NDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t11 () VALUES(1,@b1,'Testing is fun','Kyle',DEFAULT), -(2,@b1,'Testing is cool','JOE',DEFAULT), -(3,@b1,DEFAULT,'QA',DEFAULT); - -******************************************** -*** Expect slave to fail with Error 1677 *** -******************************************** - ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Column 2 of table 'test.t11' cannot be converted from type 'tinyblob' to type 'varchar(254)' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc - -*** Drop t11 *** -DROP TABLE t11; - -********************************************* -* More columns in master at middle of table * -* Expect: This one should pass blob-text * -********************************************* - -*** Create t12 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t12 (a INT PRIMARY KEY, b BLOB, c BLOB -) ENGINE='NDB'; - -*** Create t12 on Master *** -CREATE TABLE t12 (a INT KEY, b BLOB, f TEXT, -c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='NDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t12 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), -(2,@b1,'JOE',DEFAULT,DEFAULT), -(3,@b1,'QA',DEFAULT,DEFAULT); - -SELECT a,hex(b),f,c,e FROM t12 ORDER BY a; -a hex(b) f c e -1 62316231623162316231623162316231 Kyle test 1 -2 62316231623162316231623162316231 JOE test 1 -3 62316231623162316231623162316231 QA test 1 - -*** Select on Slave *** -SELECT a,hex(b),c FROM t12 ORDER BY a; -a hex(b) c -1 62316231623162316231623162316231 Kyle -2 62316231623162316231623162316231 JOE -3 62316231623162316231623162316231 QA - -*** Drop t12 *** -DROP TABLE t12; - -**************************************************** -* - Alter Master adding columns at middle of table * -* Expect: columns added * -**************************************************** - - -*** Create t14 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t14 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='NDB'; - -*** Create t14 on Master *** -CREATE TABLE t14 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='NDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -ALTER TABLE t14 ADD COLUMN c2 DECIMAL(8,2) AFTER c1; -ALTER TABLE t14 ADD COLUMN c3 TEXT AFTER c2; - -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t14 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle',DEFAULT,DEFAULT), -(2,2.00,'This Test Should work',@b1,'JOE',DEFAULT,DEFAULT), -(3,3.00,'If is does not, I will open a bug',@b1,'QA',DEFAULT,DEFAULT); - -SELECT c1,c2,c3,hex(c4),c5,c6,c7 FROM t14 ORDER BY c1; -c1 c2 c3 hex(c4) c5 c6 c7 -1 1.00 Replication Testing Extra Col 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 2.00 This Test Should work 62316231623162316231623162316231 JOE 1 CURRENT_TIMESTAMP -3 3.00 If is does not, I will open a bug 62316231623162316231623162316231 QA 1 CURRENT_TIMESTAMP - -*** Select on Slave **** -SELECT c1,c2,c3,hex(c4),c5 FROM t14 ORDER BY c1; -c1 c2 c3 hex(c4) c5 -1 1.00 Replication Testing Extra Col 62316231623162316231623162316231 Kyle -2 2.00 This Test Should work 62316231623162316231623162316231 JOE -3 3.00 If is does not, I will open a bug 62316231623162316231623162316231 QA - -**************************************************** -* - Alter Master Dropping columns from the middle. * -* Expect: columns dropped * -**************************************************** - -*** connect to master and drop columns *** -ALTER TABLE t14 DROP COLUMN c2; -ALTER TABLE t14 DROP COLUMN c7; - -*** Select from Master *** -SELECT c1,c3,hex(c4),c5,c6 FROM t14 ORDER BY c1; -c1 c3 hex(c4) c5 c6 -1 Replication Testing Extra Col 62316231623162316231623162316231 Kyle 1 -2 This Test Should work 62316231623162316231623162316231 JOE 1 -3 If is does not, I will open a bug 62316231623162316231623162316231 QA 1 - -************ -* Bug30415 * -************ -Last_SQL_Error = Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7' -STOP SLAVE; -RESET SLAVE; - -*** Drop t14 *** -DROP TABLE t14; -DROP TABLE t14; -RESET MASTER; -START SLAVE; - -************************************************* -* - Alter Master adding columns at end of table * -* Expect: Error 1054 * -************************************************* - -*** Create t15 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t15 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='NDB'; - -*** Create t15 on Master *** -CREATE TABLE t15 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='NDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7; -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t15 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT,3.00), -(2,@b1,'JOE',DEFAULT,DEFAULT,3.00), -(3,@b1,'QA',DEFAULT,DEFAULT,3.00); -SELECT c1,hex(c4),c5,c6,c7,c2 FROM t15 ORDER BY c1; -c1 hex(c4) c5 c6 c7 c2 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP 3.00 -2 62316231623162316231623162316231 JOE 1 CURRENT_TIMESTAMP 3.00 -3 62316231623162316231623162316231 QA 1 CURRENT_TIMESTAMP 3.00 - -******************************************** -*** Expect slave to fail with Error 1054 *** -******************************************** - -Last_SQL_Error = Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7' -STOP SLAVE; -RESET SLAVE; - -*** Drop t15 *** -DROP TABLE t15; -DROP TABLE t15; -RESET MASTER; -START SLAVE; - -************************************************ -* - Create index on Master column not on slave * -* Expect:Warning * -************************************************ - -*** Create t16 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t16 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='NDB'; - -*** Create t16 on Master *** -CREATE TABLE t16 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='NDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Create Index and Data Insert *** -CREATE INDEX part_of_c6 ON t16 (c6); -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t16 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), -(2,@b1,'JOE',2,DEFAULT), -(3,@b1,'QA',3,DEFAULT); -SELECT c1,hex(c4),c5,c6,c7 FROM t16 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP -3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP - -***************** -*** BUG 30434 *** -***************** - -Last_SQL_Error = Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)' -STOP SLAVE; -RESET SLAVE; - -*** Drop t16 *** -DROP TABLE t16; -DROP TABLE t16; -RESET MASTER; -START SLAVE; - -***************************************************** -* - Delete rows using column on Master not on slave * -* Expect: Rows Deleted * -***************************************************** - -*** Create t17 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t17 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='NDB'; - -*** Create t17 on Master *** -CREATE TABLE t17 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='NDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t17 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), -(2,@b1,'JOE',2,DEFAULT), -(3,@b1,'QA',3,DEFAULT); -SELECT c1,hex(c4),c5,c6,c7 FROM t17 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP -3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP - -** Select * from Slave ** -SELECT c1,hex(c4),c5 FROM t17 ORDER BY c1; -c1 hex(c4) c5 -1 62316231623162316231623162316231 Kyle -2 62316231623162316231623162316231 JOE -3 62316231623162316231623162316231 QA - -** Delete from master ** -DELETE FROM t17 WHERE c6 = 3; -SELECT c1,hex(c4),c5,c6,c7 FROM t17 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP - -** Check slave ** -SELECT c1,hex(c4),c5 FROM t17 ORDER BY c1; -c1 hex(c4) c5 -1 62316231623162316231623162316231 Kyle -2 62316231623162316231623162316231 JOE -DROP TABLE t17; - - -***************************************************** -* - Update row using column on Master not on slave * -* Expect: Rows updated * -***************************************************** - -** Bug30674 ** - -*** Create t18 on slave *** - -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t18 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='NDB'; - -*** Create t18 on Master *** -CREATE TABLE t18 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='NDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t18 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), -(2,@b1,'JOE',2,DEFAULT), -(3,@b1,'QA',3,DEFAULT); -SELECT c1,hex(c4),c5,c6,c7 FROM t18 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP -3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP - -** Select * from Slave ** -SELECT c1,hex(c4),c5 FROM t18 ORDER BY c1; -c1 hex(c4) c5 -1 62316231623162316231623162316231 Kyle -2 62316231623162316231623162316231 JOE -3 62316231623162316231623162316231 QA - -** update from master ** -UPDATE t18 SET c5 = 'TEST' WHERE c6 = 3; -SELECT c1,hex(c4),c5,c6,c7 FROM t18 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP -3 62316231623162316231623162316231 TEST 3 CURRENT_TIMESTAMP - -** Check slave ** -SELECT c1,hex(c4),c5 FROM t18 ORDER BY c1; -c1 hex(c4) c5 -1 62316231623162316231623162316231 Kyle -2 62316231623162316231623162316231 JOE -3 62316231623162316231623162316231 TEST -DROP TABLE t18; - - -***************************************************** -* - Insert UUID column on Master not on slave * -* Expect: Rows inserted * -***************************************************** - -*** Create t5 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t5 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='NDB'; - -*** Create t5 on Master *** -CREATE TABLE t5 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 LONG, -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='NDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -INSERT INTO t5 () VALUES(1,@b1,'Kyle',UUID(),DEFAULT), -(2,@b1,'JOE',UUID(),DEFAULT), -(3,@b1,'QA',UUID(),DEFAULT); -SELECT c1,hex(c4),c5,c6,c7 FROM t5 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 6231623162316231 Kyle UUID TIME -2 6231623162316231 JOE UUID TIME -3 6231623162316231 QA UUID TIME - -** Select * from Slave ** -SELECT c1,hex(c4),c5 FROM t5 ORDER BY c1; -c1 hex(c4) c5 -1 6231623162316231 Kyle -2 6231623162316231 JOE -3 6231623162316231 QA -DROP TABLE t5; - -set binlog_format=mixed; - -*********************************************************** -*********************************************************** -***************** Start of Testing ************************ -*********************************************************** -*********************************************************** -* This test format == binlog_format MIXED and engine == 'NDB' -*********************************************************** -*********************************************************** - -***** Testing more columns on the Master ***** - -CREATE TABLE t1 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), -/* extra */ -f5 FLOAT DEFAULT '2.00', -f6 CHAR(4) DEFAULT 'TEST', -f7 INT DEFAULT '0', -f8 TEXT, -f9 LONGBLOB, -f10 BIT(63), -f11 VARBINARY(64))ENGINE='NDB'; - -* Alter Table on Slave and drop columns f5 through f11 * - -alter table t1 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11; - -* Insert data in Master then update and delete some rows* - -* Select count and 20 rows from Master * - -SELECT COUNT(*) FROM t1; -COUNT(*) -40 - -SELECT f1,f2,f3,f4,f5,f6,f7,f8,f9, -hex(f10),hex(f11) FROM t1 ORDER BY f3 LIMIT 20; -f1 f2 f3 f4 f5 f6 f7 f8 f9 hex(f10) hex(f11) -2 2 2 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -3 3 3 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -5 5 5 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -6 6 6 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -8 8 8 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -9 9 9 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -11 11 11 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -12 12 12 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -14 14 14 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -15 15 15 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -17 17 17 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -18 18 18 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -20 20 20 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -21 21 21 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -23 23 23 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -24 24 24 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -26 26 26 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -27 27 27 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -29 29 29 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -30 30 30 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 - -* Select count and 20 rows from Slave * - -SELECT COUNT(*) FROM t1; -COUNT(*) -40 - -SELECT * FROM t1 ORDER BY f3 LIMIT 20; -f1 f2 f3 f4 -2 2 2 second -3 3 3 next -5 5 5 second -6 6 6 next -8 8 8 second -9 9 9 next -11 11 11 second -12 12 12 next -14 14 14 second -15 15 15 next -17 17 17 second -18 18 18 next -20 20 20 second -21 21 21 next -23 23 23 second -24 24 24 next -26 26 26 second -27 27 27 next -29 29 29 second -30 30 30 next -Checking that both slave threads are running. - -***** Testing Altering table def scenario ***** - -CREATE TABLE t2 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), -/* extra */ -f5 DOUBLE DEFAULT '2.00', -f6 ENUM('a', 'b', 'c') default 'a', -f7 DECIMAL(17,9) default '1000.00', -f8 MEDIUMBLOB, -f9 NUMERIC(6,4) default '2000.00', -f10 VARCHAR(1024), -f11 BINARY(20) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', -f12 SET('a', 'b', 'c') default 'b') -ENGINE='NDB'; -Warnings: -Warning 1264 Out of range value for column 'f9' at row 1 - -CREATE TABLE t3 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), -/* extra */ -f5 DOUBLE DEFAULT '2.00', -f6 ENUM('a', 'b', 'c') default 'a', -f8 MEDIUMBLOB, -f10 VARCHAR(1024), -f11 BINARY(20) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', -f12 SET('a', 'b', 'c') default 'b') -ENGINE='NDB'; - -CREATE TABLE t4 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), -/* extra */ -f5 DOUBLE DEFAULT '2.00', -f6 DECIMAL(17,9) default '1000.00', -f7 MEDIUMBLOB, -f8 NUMERIC(6,4) default '2000.00', -f9 VARCHAR(1024), -f10 BINARY(20) not null default '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', -f11 CHAR(255)) -ENGINE='NDB'; -Warnings: -Warning 1264 Out of range value for column 'f8' at row 1 - -CREATE TABLE t31 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), -/* extra */ -f5 BIGINT, -f6 BLOB, -f7 DATE, -f8 DATETIME, -f9 FLOAT, -f10 INT, -f11 LONGBLOB, -f12 LONGTEXT, -f13 MEDIUMBLOB, -f14 MEDIUMINT, -f15 MEDIUMTEXT, -f16 REAL, -f17 SMALLINT, -f18 TEXT, -f19 TIME, -f20 TIMESTAMP, -f21 TINYBLOB, -f22 TINYINT, -f23 TINYTEXT, -f24 YEAR, -f25 BINARY(255), -f26 BIT(64), -f27 CHAR(255), -f28 DECIMAL(30,7), -f29 DOUBLE, -f30 ENUM ('a','b', 'c') default 'a', -f31 FLOAT, -f32 NUMERIC(17,9), -f33 SET ('a', 'b', 'c') default 'b', -f34 VARBINARY(1025), -f35 VARCHAR(257) -) ENGINE='NDB'; - -** Alter tables on slave and drop columns ** - -alter table t2 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11, drop -f12; -alter table t3 drop f5, drop f6, drop f8, drop f10, drop f11, drop f12; -alter table t4 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11; -alter table t31 -drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11, -drop f12, drop f13, drop f14, drop f15, drop f16, drop f17, drop f18, -drop f19, drop f20, drop f21, drop f22, drop f23, drop f24, drop f25, -drop f26, drop f27, drop f28, drop f29, drop f30, drop f31, drop f32, -drop f33, drop f34, drop f35; - -** Insert Data into Master ** -INSERT into t2 set f1=1, f2=1, f3=1, f4='first', f8='f8: medium size blob', f10='f10: -some var char'; -INSERT into t2 values (2, 2, 2, 'second', -2.0, 'b', 2000.0002, 'f8: medium size blob', 2000, 'f10: some var char', -'01234567', 'c'), -(3, 3, 3, 'third', -3.0, 'b', 3000.0003, 'f8: medium size blob', 3000, 'f10: some var char', -'01234567', 'c'); -Warnings: -Warning 1264 Out of range value for column 'f9' at row 1 -Warning 1264 Out of range value for column 'f9' at row 2 -INSERT into t3 set f1=1, f2=1, f3=1, f4='first', f10='f10: some var char'; -INSERT into t4 set f1=1, f2=1, f3=1, f4='first', f7='f7: medium size blob', f10='f10: -binary data'; -INSERT into t31 set f1=1, f2=1, f3=1, f4='first'; -INSERT into t31 set f1=1, f2=1, f3=2, f4='second', -f9=2.2, f10='seven samurai', f28=222.222, f35='222'; -Warnings: -Warning 1366 Incorrect integer value: 'seven samurai' for column 'f10' at row 1 -INSERT into t31 values (1, 1, 3, 'third', -/* f5 BIGINT, */ 333333333333333333333333, -/* f6 BLOB, */ '3333333333333333333333', -/* f7 DATE, */ '2007-07-18', -/* f8 DATETIME, */ "2007-07-18", -/* f9 FLOAT, */ 3.33333333, -/* f10 INT, */ 333333333, -/* f11 LONGBLOB, */ '3333333333333333333', -/* f12 LONGTEXT, */ '3333333333333333333', -/* f13 MEDIUMBLOB, */ '3333333333333333333', -/* f14 MEDIUMINT, */ 33, -/* f15 MEDIUMTEXT, */ 3.3, -/* f16 REAL, */ 3.3, -/* f17 SMALLINT, */ 3, -/* f18 TEXT, */ '33', -/* f19 TIME, */ '2:59:58.999', -/* f20 TIMESTAMP, */ 20000303000000, -/* f21 TINYBLOB, */ '3333', -/* f22 TINYINT, */ 3, -/* f23 TINYTEXT, */ '3', -/* f24 YEAR, */ 3000, -/* f25 BINARY(255), */ 'three_33333', -/* f26 BIT(64), */ b'011', -/* f27 CHAR(255), */ 'three', -/* f28 DECIMAL(30,7), */ 3.333, -/* f29 DOUBLE, */ 3.333333333333333333333333333, -/* f30 ENUM ('a','b','c')*/ 'c', -/* f31 FLOAT, */ 3.0, -/* f32 NUMERIC(17,9), */ 3.3333, -/* f33 SET ('a','b','c'),*/ 'c', -/*f34 VARBINARY(1025),*/ '3333 minus 3', -/*f35 VARCHAR(257),*/ 'three times three' - ); -Warnings: -Warning 1264 Out of range value for column 'f5' at row 1 -Warning 1264 Out of range value for column 'f24' at row 1 -INSERT into t31 values (1, 1, 4, 'fourth', -/* f5 BIGINT, */ 333333333333333333333333, -/* f6 BLOB, */ '3333333333333333333333', -/* f7 DATE, */ '2007-07-18', -/* f8 DATETIME, */ "2007-07-18", -/* f9 FLOAT, */ 3.33333333, -/* f10 INT, */ 333333333, -/* f11 LONGBLOB, */ '3333333333333333333', -/* f12 LONGTEXT, */ '3333333333333333333', -/* f13 MEDIUMBLOB, */ '3333333333333333333', -/* f14 MEDIUMINT, */ 33, -/* f15 MEDIUMTEXT, */ 3.3, -/* f16 REAL, */ 3.3, -/* f17 SMALLINT, */ 3, -/* f18 TEXT, */ '33', -/* f19 TIME, */ '2:59:58.999', -/* f20 TIMESTAMP, */ 20000303000000, -/* f21 TINYBLOB, */ '3333', -/* f22 TINYINT, */ 3, -/* f23 TINYTEXT, */ '3', -/* f24 YEAR, */ 3000, -/* f25 BINARY(255), */ 'three_33333', -/* f26 BIT(64), */ b'011', -/* f27 CHAR(255), */ 'three', -/* f28 DECIMAL(30,7), */ 3.333, -/* f29 DOUBLE, */ 3.333333333333333333333333333, -/* f30 ENUM ('a','b','c')*/ 'c', -/* f31 FLOAT, */ 3.0, -/* f32 NUMERIC(17,9), */ 3.3333, -/* f33 SET ('a','b','c'),*/ 'c', -/*f34 VARBINARY(1025),*/ '3333 minus 3', -/*f35 VARCHAR(257),*/ 'three times three' - ), -(1, 1, 5, 'fifth', -/* f5 BIGINT, */ 333333333333333333333333, -/* f6 BLOB, */ '3333333333333333333333', -/* f7 DATE, */ '2007-07-18', -/* f8 DATETIME, */ "2007-07-18", -/* f9 FLOAT, */ 3.33333333, -/* f10 INT, */ 333333333, -/* f11 LONGBLOB, */ '3333333333333333333', -/* f12 LONGTEXT, */ '3333333333333333333', -/* f13 MEDIUMBLOB, */ '3333333333333333333', -/* f14 MEDIUMINT, */ 33, -/* f15 MEDIUMTEXT, */ 3.3, -/* f16 REAL, */ 3.3, -/* f17 SMALLINT, */ 3, -/* f18 TEXT, */ '33', -/* f19 TIME, */ '2:59:58.999', -/* f20 TIMESTAMP, */ 20000303000000, -/* f21 TINYBLOB, */ '3333', -/* f22 TINYINT, */ 3, -/* f23 TINYTEXT, */ '3', -/* f24 YEAR, */ 3000, -/* f25 BINARY(255), */ 'three_33333', -/* f26 BIT(64), */ b'011', -/* f27 CHAR(255), */ 'three', -/* f28 DECIMAL(30,7), */ 3.333, -/* f29 DOUBLE, */ 3.333333333333333333333333333, -/* f30 ENUM ('a','b','c')*/ 'c', -/* f31 FLOAT, */ 3.0, -/* f32 NUMERIC(17,9), */ 3.3333, -/* f33 SET ('a','b','c'),*/ 'c', -/*f34 VARBINARY(1025),*/ '3333 minus 3', -/*f35 VARCHAR(257),*/ 'three times three' - ), -(1, 1, 6, 'sixth', -/* f5 BIGINT, */ NULL, -/* f6 BLOB, */ '3333333333333333333333', -/* f7 DATE, */ '2007-07-18', -/* f8 DATETIME, */ "2007-07-18", -/* f9 FLOAT, */ 3.33333333, -/* f10 INT, */ 333333333, -/* f11 LONGBLOB, */ '3333333333333333333', -/* f12 LONGTEXT, */ '3333333333333333333', -/* f13 MEDIUMBLOB, */ '3333333333333333333', -/* f14 MEDIUMINT, */ 33, -/* f15 MEDIUMTEXT, */ 3.3, -/* f16 REAL, */ 3.3, -/* f17 SMALLINT, */ 3, -/* f18 TEXT, */ '33', -/* f19 TIME, */ '2:59:58.999', -/* f20 TIMESTAMP, */ 20000303000000, -/* f21 TINYBLOB, */ '3333', -/* f22 TINYINT, */ 3, -/* f23 TINYTEXT, */ '3', -/* f24 YEAR, */ 3000, -/* f25 BINARY(255), */ 'three_33333', -/* f26 BIT(64), */ b'011', -/* f27 CHAR(255), */ 'three', -/* f28 DECIMAL(30,7), */ 3.333, -/* f29 DOUBLE, */ 3.333333333333333333333333333, -/* f30 ENUM ('a','b','c')*/ 'c', -/* f31 FLOAT, */ 3.0, -/* f32 NUMERIC(17,9), */ 3.3333, -/* f33 SET ('a','b','c'),*/ 'c', -/*f34 VARBINARY(1025),*/ '3333 minus 3', -/*f35 VARCHAR(257),*/ NULL -); -Warnings: -Warning 1264 Out of range value for column 'f5' at row 1 -Warning 1264 Out of range value for column 'f24' at row 1 -Warning 1264 Out of range value for column 'f5' at row 2 -Warning 1264 Out of range value for column 'f24' at row 2 -Warning 1264 Out of range value for column 'f24' at row 3 - -** Sync slave with master ** -** Do selects from tables ** - -select * from t1 order by f3; -f1 f2 f3 f4 -2 2 2 second -3 3 3 next -5 5 5 second -6 6 6 next -8 8 8 second -9 9 9 next -11 11 11 second -12 12 12 next -14 14 14 second -15 15 15 next -17 17 17 second -18 18 18 next -20 20 20 second -21 21 21 next -23 23 23 second -24 24 24 next -26 26 26 second -27 27 27 next -29 29 29 second -30 30 30 next -31 31 31 second -32 32 32 second -33 33 33 second -34 34 34 second -35 35 35 second -36 36 36 second -37 37 37 second -38 38 38 second -39 39 39 second -40 40 40 second -41 41 41 second -42 42 42 second -43 43 43 second -44 44 44 second -45 45 45 second -46 46 46 second -47 47 47 second -48 48 48 second -49 49 49 second -50 50 50 second -select * from t2 order by f1; -f1 f2 f3 f4 -1 1 1 first -2 2 2 second -3 3 3 third -select * from t3 order by f1; -f1 f2 f3 f4 -1 1 1 first -select * from t4 order by f1; -f1 f2 f3 f4 -1 1 1 first -select * from t31 order by f3; -f1 f2 f3 f4 -1 1 1 first -1 1 2 second -1 1 3 third -1 1 4 fourth -1 1 5 fifth -1 1 6 sixth - -** Do updates master ** - -update t31 set f5=555555555555555 where f3=6; -update t31 set f2=2 where f3=2; -update t31 set f1=NULL where f3=1; -update t31 set f3=NULL, f27=NULL, f35='f35 new value' where f3=3; -Warnings: -Warning 1048 Column 'f3' cannot be null - -** Delete from Master ** - -delete from t1; -delete from t2; -delete from t3; -delete from t4; -delete from t31; -select * from t31; -f1 f2 f3 f4 - -** Check slave status ** - -Checking that both slave threads are running. - -**************************************** -* columns in master at middle of table * -* Expect: Proper error message * -**************************************** - -** Stop and Reset Slave ** - -STOP SLAVE; -RESET SLAVE; - -** create table slave side ** -CREATE TABLE t10 (a INT PRIMARY KEY, b BLOB, c CHAR(5) -) ENGINE='NDB'; - -** Connect to master and create table ** - -CREATE TABLE t10 (a INT KEY, b BLOB, f DOUBLE DEFAULT '233', -c CHAR(5), e INT DEFAULT '1')ENGINE='NDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t10 () VALUES(1,@b1,DEFAULT,'Kyle',DEFAULT), -(2,@b1,DEFAULT,'JOE',DEFAULT), -(3,@b1,DEFAULT,'QA',DEFAULT); - -******************************************** -*** Expect slave to fail with Error 1677 *** -******************************************** - ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Column 2 of table 'test.t10' cannot be converted from type 'double' to type 'char(5)' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc - -*** Drop t10 *** -DROP TABLE t10; - -********************************************* -* More columns in master at middle of table * -* Expect: Proper error message * -********************************************* - -*** Create t11 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t11 (a INT PRIMARY KEY, b BLOB, c VARCHAR(254) -) ENGINE='NDB'; - -*** Create t11 on Master *** -CREATE TABLE t11 (a INT KEY, b BLOB, f TEXT, -c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='NDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t11 () VALUES(1,@b1,'Testing is fun','Kyle',DEFAULT), -(2,@b1,'Testing is cool','JOE',DEFAULT), -(3,@b1,DEFAULT,'QA',DEFAULT); - -******************************************** -*** Expect slave to fail with Error 1677 *** -******************************************** - ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Column 2 of table 'test.t11' cannot be converted from type 'tinyblob' to type 'varchar(254)' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc - -*** Drop t11 *** -DROP TABLE t11; - -********************************************* -* More columns in master at middle of table * -* Expect: This one should pass blob-text * -********************************************* - -*** Create t12 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t12 (a INT PRIMARY KEY, b BLOB, c BLOB -) ENGINE='NDB'; - -*** Create t12 on Master *** -CREATE TABLE t12 (a INT KEY, b BLOB, f TEXT, -c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='NDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t12 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), -(2,@b1,'JOE',DEFAULT,DEFAULT), -(3,@b1,'QA',DEFAULT,DEFAULT); - -SELECT a,hex(b),f,c,e FROM t12 ORDER BY a; -a hex(b) f c e -1 62316231623162316231623162316231 Kyle test 1 -2 62316231623162316231623162316231 JOE test 1 -3 62316231623162316231623162316231 QA test 1 - -*** Select on Slave *** -SELECT a,hex(b),c FROM t12 ORDER BY a; -a hex(b) c -1 62316231623162316231623162316231 Kyle -2 62316231623162316231623162316231 JOE -3 62316231623162316231623162316231 QA - -*** Drop t12 *** -DROP TABLE t12; - -**************************************************** -* - Alter Master adding columns at middle of table * -* Expect: columns added * -**************************************************** - - -*** Create t14 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t14 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='NDB'; - -*** Create t14 on Master *** -CREATE TABLE t14 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='NDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -ALTER TABLE t14 ADD COLUMN c2 DECIMAL(8,2) AFTER c1; -ALTER TABLE t14 ADD COLUMN c3 TEXT AFTER c2; - -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t14 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle',DEFAULT,DEFAULT), -(2,2.00,'This Test Should work',@b1,'JOE',DEFAULT,DEFAULT), -(3,3.00,'If is does not, I will open a bug',@b1,'QA',DEFAULT,DEFAULT); - -SELECT c1,c2,c3,hex(c4),c5,c6,c7 FROM t14 ORDER BY c1; -c1 c2 c3 hex(c4) c5 c6 c7 -1 1.00 Replication Testing Extra Col 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 2.00 This Test Should work 62316231623162316231623162316231 JOE 1 CURRENT_TIMESTAMP -3 3.00 If is does not, I will open a bug 62316231623162316231623162316231 QA 1 CURRENT_TIMESTAMP - -*** Select on Slave **** -SELECT c1,c2,c3,hex(c4),c5 FROM t14 ORDER BY c1; -c1 c2 c3 hex(c4) c5 -1 1.00 Replication Testing Extra Col 62316231623162316231623162316231 Kyle -2 2.00 This Test Should work 62316231623162316231623162316231 JOE -3 3.00 If is does not, I will open a bug 62316231623162316231623162316231 QA - -**************************************************** -* - Alter Master Dropping columns from the middle. * -* Expect: columns dropped * -**************************************************** - -*** connect to master and drop columns *** -ALTER TABLE t14 DROP COLUMN c2; -ALTER TABLE t14 DROP COLUMN c7; - -*** Select from Master *** -SELECT c1,c3,hex(c4),c5,c6 FROM t14 ORDER BY c1; -c1 c3 hex(c4) c5 c6 -1 Replication Testing Extra Col 62316231623162316231623162316231 Kyle 1 -2 This Test Should work 62316231623162316231623162316231 JOE 1 -3 If is does not, I will open a bug 62316231623162316231623162316231 QA 1 - -************ -* Bug30415 * -************ -Last_SQL_Error = Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7' -STOP SLAVE; -RESET SLAVE; - -*** Drop t14 *** -DROP TABLE t14; -DROP TABLE t14; -RESET MASTER; -START SLAVE; - -************************************************* -* - Alter Master adding columns at end of table * -* Expect: Error 1054 * -************************************************* - -*** Create t15 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t15 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='NDB'; - -*** Create t15 on Master *** -CREATE TABLE t15 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='NDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7; -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t15 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT,3.00), -(2,@b1,'JOE',DEFAULT,DEFAULT,3.00), -(3,@b1,'QA',DEFAULT,DEFAULT,3.00); -SELECT c1,hex(c4),c5,c6,c7,c2 FROM t15 ORDER BY c1; -c1 hex(c4) c5 c6 c7 c2 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP 3.00 -2 62316231623162316231623162316231 JOE 1 CURRENT_TIMESTAMP 3.00 -3 62316231623162316231623162316231 QA 1 CURRENT_TIMESTAMP 3.00 - -******************************************** -*** Expect slave to fail with Error 1054 *** -******************************************** - -Last_SQL_Error = Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7' -STOP SLAVE; -RESET SLAVE; - -*** Drop t15 *** -DROP TABLE t15; -DROP TABLE t15; -RESET MASTER; -START SLAVE; - -************************************************ -* - Create index on Master column not on slave * -* Expect:Warning * -************************************************ - -*** Create t16 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t16 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='NDB'; - -*** Create t16 on Master *** -CREATE TABLE t16 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='NDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Create Index and Data Insert *** -CREATE INDEX part_of_c6 ON t16 (c6); -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t16 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), -(2,@b1,'JOE',2,DEFAULT), -(3,@b1,'QA',3,DEFAULT); -SELECT c1,hex(c4),c5,c6,c7 FROM t16 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP -3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP - -***************** -*** BUG 30434 *** -***************** - -Last_SQL_Error = Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)' -STOP SLAVE; -RESET SLAVE; - -*** Drop t16 *** -DROP TABLE t16; -DROP TABLE t16; -RESET MASTER; -START SLAVE; - -***************************************************** -* - Delete rows using column on Master not on slave * -* Expect: Rows Deleted * -***************************************************** - -*** Create t17 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t17 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='NDB'; - -*** Create t17 on Master *** -CREATE TABLE t17 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='NDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t17 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), -(2,@b1,'JOE',2,DEFAULT), -(3,@b1,'QA',3,DEFAULT); -SELECT c1,hex(c4),c5,c6,c7 FROM t17 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP -3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP - -** Select * from Slave ** -SELECT c1,hex(c4),c5 FROM t17 ORDER BY c1; -c1 hex(c4) c5 -1 62316231623162316231623162316231 Kyle -2 62316231623162316231623162316231 JOE -3 62316231623162316231623162316231 QA - -** Delete from master ** -DELETE FROM t17 WHERE c6 = 3; -SELECT c1,hex(c4),c5,c6,c7 FROM t17 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP - -** Check slave ** -SELECT c1,hex(c4),c5 FROM t17 ORDER BY c1; -c1 hex(c4) c5 -1 62316231623162316231623162316231 Kyle -2 62316231623162316231623162316231 JOE -DROP TABLE t17; - - -***************************************************** -* - Update row using column on Master not on slave * -* Expect: Rows updated * -***************************************************** - -** Bug30674 ** - -*** Create t18 on slave *** - -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t18 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='NDB'; - -*** Create t18 on Master *** -CREATE TABLE t18 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='NDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t18 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), -(2,@b1,'JOE',2,DEFAULT), -(3,@b1,'QA',3,DEFAULT); -SELECT c1,hex(c4),c5,c6,c7 FROM t18 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP -3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP - -** Select * from Slave ** -SELECT c1,hex(c4),c5 FROM t18 ORDER BY c1; -c1 hex(c4) c5 -1 62316231623162316231623162316231 Kyle -2 62316231623162316231623162316231 JOE -3 62316231623162316231623162316231 QA - -** update from master ** -UPDATE t18 SET c5 = 'TEST' WHERE c6 = 3; -SELECT c1,hex(c4),c5,c6,c7 FROM t18 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP -3 62316231623162316231623162316231 TEST 3 CURRENT_TIMESTAMP - -** Check slave ** -SELECT c1,hex(c4),c5 FROM t18 ORDER BY c1; -c1 hex(c4) c5 -1 62316231623162316231623162316231 Kyle -2 62316231623162316231623162316231 JOE -3 62316231623162316231623162316231 TEST -DROP TABLE t18; - - -***************************************************** -* - Insert UUID column on Master not on slave * -* Expect: Rows inserted * -***************************************************** - -*** Create t5 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t5 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='NDB'; - -*** Create t5 on Master *** -CREATE TABLE t5 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 LONG, -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='NDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -INSERT INTO t5 () VALUES(1,@b1,'Kyle',UUID(),DEFAULT), -(2,@b1,'JOE',UUID(),DEFAULT), -(3,@b1,'QA',UUID(),DEFAULT); -SELECT c1,hex(c4),c5,c6,c7 FROM t5 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 6231623162316231 Kyle UUID TIME -2 6231623162316231 JOE UUID TIME -3 6231623162316231 QA UUID TIME - -** Select * from Slave ** -SELECT c1,hex(c4),c5 FROM t5 ORDER BY c1; -c1 hex(c4) c5 -1 6231623162316231 Kyle -2 6231623162316231 JOE -3 6231623162316231 QA -DROP TABLE t5; - diff --git a/mysql-test/suite/ndb_team/r/rpl_ndb_mix_innodb.result b/mysql-test/suite/ndb_team/r/rpl_ndb_mix_innodb.result deleted file mode 100644 index 203a59b4613..00000000000 --- a/mysql-test/suite/ndb_team/r/rpl_ndb_mix_innodb.result +++ /dev/null @@ -1,143 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; - -*** Test 1 *** - -create table t1 (a int key, b int) engine innodb; -create table t2 (a int key, b int) engine innodb; - -alter table t1 engine ndb; -alter table t2 engine ndb; - -insert into t1 values (1,2); - -select @log_name:=log_name, @start_pos:=start_pos, @end_pos:=end_pos -from mysql.ndb_apply_status; -@log_name:=log_name @start_pos:=start_pos @end_pos:=end_pos - - -# Now check that that is in the apply_status table is consistant -# with what is in the binlog - -# since insert is done with transactional engine, expect a BEGIN -# at - -show binlog events from limit 1; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN - -# Now the insert, one step after - -show binlog events from limit 1,1; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; insert into t1 values (1,2) - -# and the COMMIT should be at - -show binlog events from limit 2,1; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Xid # # COMMIT /* XID */ - -begin; -insert into t1 values (2,3); -insert into t2 values (3,4); -commit; - -select @log_name:=log_name, @start_pos:=start_pos, @end_pos:=end_pos -from mysql.ndb_apply_status; -@log_name:=log_name @start_pos:=start_pos @end_pos:=end_pos - -show binlog events from limit 1; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN - -show binlog events from limit 1,2; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; insert into t1 values (2,3) -master-bin.000001 # Query # # use `test`; insert into t2 values (3,4) - -show binlog events from limit 3,1; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Xid # # COMMIT /* XID */ - -DROP TABLE test.t1, test.t2; -SHOW TABLES; -Tables_in_test - -*** Test 2 *** - -DROP DATABASE IF EXISTS tpcb; -CREATE DATABASE tpcb; - -CREATE TABLE tpcb.account (id INT, bid INT, balance DECIMAL(10,2), -filler CHAR(255), PRIMARY KEY(id)); - -CREATE TABLE tpcb.branch (bid INT, balance DECIMAL(10,2), filler VARCHAR(255), -PRIMARY KEY(bid)); - -CREATE TABLE tpcb.teller (tid INT, balance DECIMAL(10,2), filler VARCHAR(255), -PRIMARY KEY(tid)); - -CREATE TABLE tpcb.history (id MEDIUMINT NOT NULL AUTO_INCREMENT,aid INT, -tid INT, bid INT, amount DECIMAL(10,2), -tdate DATETIME, teller CHAR(20), uuidf LONGBLOB, -filler CHAR(80),PRIMARY KEY (id)); - ---- Create stored procedures & functions --- - - -*** Stored Procedures Created *** - -USE tpcb; -ALTER TABLE account ENGINE NDB; -ALTER TABLE branch ENGINE NDB; -ALTER TABLE teller ENGINE NDB; -ALTER TABLE history ENGINE NDB; - -select @log_name:=log_name, @start_pos:=start_pos, @end_pos:=end_pos -from mysql.ndb_apply_status; -@log_name:=log_name @start_pos:=start_pos @end_pos:=end_pos - - -show binlog events in 'master-bin.000001' from limit 9,1; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Xid 1 COMMIT /* XID */ - -** Test 3 ** - -FLUSH LOGS; - -select @log_name:=log_name, @start_pos:=start_pos, @end_pos:=end_pos -from mysql.ndb_apply_status; -@log_name:=log_name @start_pos:=start_pos @end_pos:=end_pos - - -show binlog events in 'master-bin.000002' from limit 9,1; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000002 # Xid 1 COMMIT /* XID */ - -** Test 4 ** - -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; - -select @log_name:=log_name, @start_pos:=start_pos, @end_pos:=end_pos -from mysql.ndb_apply_status; -@log_name:=log_name @start_pos:=start_pos @end_pos:=end_pos - - -show binlog events in 'master-bin.000001' from limit 9,1; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Xid 1 COMMIT /* XID */ - -*** DUMP MASTER & SLAVE FOR COMPARE ******** -DROP DATABASE tpcb; -****** Do dumps compare ************ diff --git a/mysql-test/suite/ndb_team/t/disabled.def b/mysql-test/suite/ndb_team/t/disabled.def deleted file mode 100644 index 714f1014a10..00000000000 --- a/mysql-test/suite/ndb_team/t/disabled.def +++ /dev/null @@ -1,20 +0,0 @@ -############################################################################## -# -# List the test cases that are to be disabled temporarily. -# -# Separate the test case name and the comment with ':'. -# -# : BUG# -# -# Do not use any TAB characters for whitespace. -# -############################################################################## -ndb_autodiscover : BUG#18952 2006-02-16 jmiller Needs to be fixed w.r.t binlog -ndb_autodiscover2 : BUG#18952 2006-02-16 jmiller Needs to be fixed w.r.t binlog - -# the below testcase have been reworked to avoid the bug, test contains comment, keep bug open -#ndb_autodiscover3 : bug#21806 -#ndb_autodiscover3 : Bug#20872 2007-07-15 ingo master*.err: miscellaneous error messages -#rpl_ndb_extraColMaster : BUG#30854 : Tables name show as binary in slave err msg on vm-win2003-64-b and Solaris -#rpl_ndb_mix_innodb : Bug #32720 Test rpl_ndb_mix_innodb fails on SPARC and PowerPC -#rpl_ndb_dd_advance : Bug #30222 rpl_ndb_dd_advance.test fails diff --git a/mysql-test/suite/ndb_team/t/ndb_autodiscover.test b/mysql-test/suite/ndb_team/t/ndb_autodiscover.test deleted file mode 100644 index 9ded27cea31..00000000000 --- a/mysql-test/suite/ndb_team/t/ndb_autodiscover.test +++ /dev/null @@ -1,555 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - -# Bug#41308: Test main.ndb_autodiscover.test doesn't work on Windows due -# to 'grep' calls -# Test is currently disabled on Windows via the next line until this bug -# can be resolved. ---source include/not_windows.inc - ---disable_warnings -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; ---enable_warnings - -################################################ -# Test that a table that does not exist as a -# frm file on disk can be "discovered" from a -# connected NDB Cluster -# - -flush status; - -# -# Test discover + SELECT -# - -create table t1( - id int not null primary key, - name char(20) -) engine=ndb; - -insert into t1 values(1, "Autodiscover"); -flush tables; ---remove_file $MYSQLTEST_VARDIR/master-data/test/t1.frm -select * from t1; -show status like 'handler_discover%'; - -# -# Test discover + INSERT -# - -flush tables; ---remove_file $MYSQLTEST_VARDIR/master-data/test/t1.frm -insert into t1 values (2, "Auto 2"); -show status like 'handler_discover%'; -insert into t1 values (3, "Discover 3"); -show status like 'handler_discover%'; -flush tables; ---remove_file $MYSQLTEST_VARDIR/master-data/test/t1.frm -select * from t1 order by id; -show status like 'handler_discover%'; - -# -# Test discover + UPDATE -# - -flush tables; ---remove_file $MYSQLTEST_VARDIR/master-data/test/t1.frm -update t1 set name="Autodiscover" where id = 2; -show status like 'handler_discover%'; -select * from t1 order by id; -show status like 'handler_discover%'; - -# -# Test discover + DELETE -# - -flush tables; ---remove_file $MYSQLTEST_VARDIR/master-data/test/t1.frm -delete from t1 where id = 3; -select * from t1 order by id; -show status like 'handler_discover%'; - -drop table t1; - - - -###################################################### -# Test that a table that is outdated on disk -# can be "discovered" from a connected NDB Cluster -# - -flush status; - -create table t2( - id int not null primary key, - name char(22) -) engine=ndb; -insert into t2 values (1, "Discoverer"); -select * from t2; -show status like 'handler_discover%'; -flush tables; - -# Modify the frm file on disk -system echo "blaj" >> $MYSQLTEST_VARDIR/master-data/test/t2.frm ; -select * from t2; - -show status like 'handler_discover%'; - -drop table t2; - - -################################################## -# Test that a table that already exists in NDB -# is only discovered if CREATE TABLE IF NOT EXISTS -# is used -# - -flush status; - -create table t3( - id int not null primary key, - name char(255) -) engine=ndb; -insert into t3 values (1, "Explorer"); -select * from t3; -show status like 'handler_discover%'; -flush tables; - -# Remove the frm file from disk ---remove_file $MYSQLTEST_VARDIR/master-data/test/t3.frm - ---error ER_TABLE_EXISTS_ERROR -create table t3( - id int not null primary key, - name char(20), a int, b float, c char(24) -) engine=ndb; - -# The table shall not have been discovered since -# IF NOT EXISTS wasn't specified - -show status like 'handler_discover%'; - -# now it should be discovered -create table IF NOT EXISTS t3( - id int not null primary key, - id2 int not null, - name char(20) -) engine=ndb; - -# NOTE! the table called t3 have now been updated to -# use the same frm as in NDB, thus it's not certain that -# the table schema is the same as was stated in the -# CREATE TABLE statement above - -show status like 'handler_discover%'; - -SHOW CREATE TABLE t3; - -select * from t3; -show status like 'handler_discover%'; - -drop table t3; - -################################################## -# Test that a table that already exists in NDB -# is discovered when SHOW TABLES -# is used -# - -flush status; - -create table t7( - id int not null primary key, - name char(255) -) engine=ndb; -create table t6( - id int not null primary key, - name char(255) -) engine=MyISAM; -insert into t7 values (1, "Explorer"); -insert into t6 values (2, "MyISAM table"); -select * from t7; -show status like 'handler_discover%'; - -# Remove the frm file from disk -flush tables; ---remove_file $MYSQLTEST_VARDIR/master-data/test/t7.frm - -show tables from test; -show status like 'handler_discover%'; - -# Remove the frm file from disk again -flush tables; ---remove_file $MYSQLTEST_VARDIR/master-data/test/t7.frm - ---replace_column 6 # 7 # 8 # 9 # 12 # 13 # 15 # 18 # -show table status; -show status like 'handler_discover%'; - -drop table t6, t7; - - -####################################################### -# Test that a table that has been dropped from NDB -# but still exists on disk, get a consistent error message -# saying "No such table existed" -# - -flush status; - -create table t4( - id int not null primary key, - name char(27) -) engine=ndb; -insert into t4 values (1, "Automatic"); -select * from t4; - -# Remove the table from NDB -system exec $NDB_TOOLS_DIR/ndb_drop_table --no-defaults -d test t4 >> $NDB_TOOLS_OUTPUT ; - -# -# Test that correct error is returned ---error ER_NO_SUCH_TABLE -select * from t4; ---error ER_NO_SUCH_TABLE -select * from t4; - -show status like 'handler_discover%'; ---error ER_BAD_TABLE_ERROR -drop table t4; - -create table t4( - id int not null primary key, - name char(27) -) engine=ndb; -insert into t4 values (1, "Automatic"); -select * from t4; - -# Remove the table from NDB -system exec $NDB_TOOLS_DIR/ndb_drop_table --no-defaults -d test t4 >> $NDB_TOOLS_OUTPUT ; - ---error ER_NO_SUCH_TABLE -select * from t4; - -drop table if exists t4; - -# Test that dropping a table that does not exists -# on disk or in NDB gives same result as above ---error ER_BAD_TABLE_ERROR -drop table t5; -drop table if exists t5; - - -####################################################### -# Test that a table that has been dropped from NDB -# but still exists on disk is deleted from disk -# when SHOW TABLES is called -# - -flush status; - -create table t4( - id int not null primary key, - id2 int, - name char(27) -) engine=ndb; -insert into t4 values (1, 76, "Automatic2"); -select * from t4; -flush tables; - -# Remove the table from NDB -system exec $NDB_TOOLS_DIR/ndb_drop_table --no-defaults -d test t4 >> $NDB_TOOLS_OUTPUT ; - -SHOW TABLES; - ---error ER_NO_SUCH_TABLE -select * from t4; - -####################################################### -# Test SHOW TABLES ability to detect new and delete old -# tables. Test all at once using many tables -# - -flush status; - -# Create tables -create table t1(id int) engine=ndbcluster; -create table t2(id int, b char(255)) engine=myisam; -create table t3(id int, c char(255)) engine=ndbcluster; -create table t4(id int) engine=myisam; -create table t5(id int, d char(56)) engine=ndbcluster; -create table t6(id int) engine=ndbcluster; -create table t7(id int) engine=ndbcluster; -create table t8(id int, e char(34)) engine=myisam; -create table t9(id int) engine=myisam; - -# Populate tables -insert into t2 values (2, "myisam table 2"); -insert into t3 values (3, "ndb table 3"); -insert into t5 values (5, "ndb table 5"); -insert into t6 values (6); -insert into t8 values (8, "myisam table 8"); -insert into t9 values (9); - -# Remove t3, t5 from NDB -system exec $NDB_TOOLS_DIR/ndb_drop_table --no-defaults -d test t3 >> $NDB_TOOLS_OUTPUT ; -system exec $NDB_TOOLS_DIR/ndb_drop_table --no-defaults -d test t5 >> $NDB_TOOLS_OUTPUT ; -# Remove t6, t7 from disk ---remove_file $MYSQLTEST_VARDIR/master-data/test/t6.frm ---remove_file $MYSQLTEST_VARDIR/master-data/test/t7.frm - -SHOW TABLES; - -select * from t6; -select * from t7; - -show status like 'handler_discover%'; - -drop table t1, t2, t4, t6, t7, t8, t9; - -####################################################### -# Test SHOW TABLES LIKE ability to detect new and delete old -# tables. Test all at once using many tables. -# - -flush status; - -# Create tables -create table t1(id int) engine=ndbcluster; -create table t2(id int, b char(255)) engine=myisam; -create table t3(id int, c char(255)) engine=ndbcluster; -create table t4(id int) engine=myisam; -create table t5(id int, d char(56)) engine=ndbcluster; -create table t6(id int) engine=ndbcluster; -create table t7(id int) engine=ndbcluster; -create table t8(id int, e char(34)) engine=myisam; -create table t9(id int) engine=myisam; - -# Populate tables -insert into t2 values (2, "myisam table 2"); -insert into t3 values (3, "ndb table 3"); -insert into t5 values (5, "ndb table 5"); -insert into t6 values (6); -insert into t8 values (8, "myisam table 8"); -insert into t9 values (9); - -# Remove t3, t5 from NDB -system exec $NDB_TOOLS_DIR/ndb_drop_table --no-defaults -d test t3 > /dev/null ; -system exec $NDB_TOOLS_DIR/ndb_drop_table --no-defaults -d test t5 > /dev/null ; -# Remove t6, t7 from disk ---remove_file $MYSQLTEST_VARDIR/master-data/test/t6.frm ---remove_file $MYSQLTEST_VARDIR/master-data/test/t7.frm - - -SHOW TABLES LIKE 't6'; - -show status like 'handler_discover%'; - -# Check that t3 or t5 can't be created -# frm files for these tables is stilll on disk ---error ER_TABLE_EXISTS_ERROR -create table t3(a int); ---error ER_TABLE_EXISTS_ERROR -create table t5(a int); - -SHOW TABLES LIKE 't%'; - -show status like 'handler_discover%'; - -drop table t1, t2, t4, t6, t7, t8, t9; - - - -###################################################### -# Test that several tables can be discovered when -# one statement access several table at once. -# - -flush status; - -# Create tables -create table t1(id int) engine=ndbcluster; -create table t2(id int, b char(255)) engine=ndbcluster; -create table t3(id int, c char(255)) engine=ndbcluster; -create table t4(id int) engine=myisam; - -# Populate tables -insert into t1 values (1); -insert into t2 values (2, "table 2"); -insert into t3 values (3, "ndb table 3"); -insert into t4 values (4); - -# Remove t1, t2, t3 from disk ---remove_file $MYSQLTEST_VARDIR/master-data/test/t1.frm ---remove_file $MYSQLTEST_VARDIR/master-data/test/t2.frm ---remove_file $MYSQLTEST_VARDIR/master-data/test/t3.frm -flush tables; - -# Select from the table which only exists in NDB. -select * from t1, t2, t3, t4; - -# 3 table should have been discovered -show status like 'handler_discover%'; - -drop table t1, t2, t3, t4; - - -######################################################### -# Test that a table that has been changed in NDB -# since it's been opened will be refreshed and discovered -# again -# - -flush status; - -show status like 'handler_discover%'; - -create table t5( - id int not null primary key, - name char(200) -) engine=ndb; -insert into t5 values (1, "Magnus"); -select * from t5; - -ALTER TABLE t5 ADD COLUMN adress char(255) FIRST; - -select * from t5; - -insert into t5 values - ("Adress for record 2", 2, "Carl-Gustav"), - ("Adress for record 3", 3, "Karl-Emil"); -update t5 set name="Bertil" where id = 2; -select * from t5 order by id; - -show status like 'handler_discover%'; - -drop table t5; - - -################################################################ -# Test that a table that has been changed with ALTER TABLE -# can be used from the same thread -# - -flush status; - -show status like 'handler_discover%'; - -create table t6( - id int not null primary key, - name char(20) -) engine=ndb; -insert into t6 values (1, "Magnus"); -select * from t6; - -ALTER TABLE t6 ADD COLUMN adress char(255) FIRST; - -select * from t6; -insert into t6 values - ("Adress for record 2", 2, "Carl-Gustav"), - ("Adress for record 3", 3, "Karl-Emil"); -update t6 set name="Bertil" where id = 2; -select * from t6 order by id; - -show status like 'handler_discover%'; - -drop table t6; - -##################################################### -# Test that only tables in the current database shows -# up in SHOW TABLES -# - -show tables; - -create table t1 (a int,b longblob) engine=ndb; -show tables; -create database test2; -use test2; -show tables; ---error ER_NO_SUCH_TABLE -select * from t1; -create table t2 (b int,c longblob) engine=ndb; -use test; -select * from t1; -show tables; -drop table t1; -use test2; -drop table t2; -drop database test2; -use test; - -######################################################### -# Bug#8035 -# mysqld would segfault on second select * before bug was fixed -# ---disable_warnings -drop database if exists test_only_ndb_tables; ---enable_warnings -create database test_only_ndb_tables; -use test_only_ndb_tables; -create table t1 (a int primary key) engine=ndb; -select * from t1; ---exec $NDB_MGM --no-defaults -e "all restart -n" > /dev/null ---exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults --not-started > /dev/null ---error ER_CANT_LOCK -select * from t1; ---exec $NDB_MGM --no-defaults -e "all start" > /dev/null ---exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults > /dev/null ---source include/ndb_wait_connected.inc -use test; -drop database test_only_ndb_tables; - -##################################################### -# Test that it's not possible to create tables -# with same name as NDB internal tables -# This will also test that it's not possible to create -# a table with tha same name as a table that can't be -# discovered( for example a table created via NDBAPI) - -# Test disabled since it doesn't work on case insensitive systems -#--error ER_TABLE_EXISTS_ERROR -#CREATE TABLE sys.SYSTAB_0 (a int); -#--error ER_UNKNOWN_ERROR -#select * from sys.SYSTAB_0; - -#CREATE TABLE IF NOT EXISTS sys.SYSTAB_0 (a int); -#show warnings; -#--error ER_UNKNOWN_ERROR -#select * from sys.SYSTAB_0; - -#--error ER_BAD_TABLE_ERROR -#drop table sys.SYSTAB_0; -#drop table IF EXISTS sys.SYSTAB_0; - -###################################################### -# Note! This should always be the last step in this -# file, the table t9 will be used and dropped -# by ndb_autodiscover2 -# - -CREATE TABLE t9 ( - a int NOT NULL PRIMARY KEY, - b int -) engine=ndb; - -insert t9 values(1, 2), (2,3), (3, 4), (4, 5); - -#Don't drop the table, instead remove the frm file ---remove_file $MYSQLTEST_VARDIR/master-data/test/t9.frm - -# Now leave test case, when ndb_autodiscover2 will run, this -# MySQL Server will have been restarted because it has a -# ndb_autodiscover2-master.opt file. - -create table t10 ( - a int not null primary key, - b blob -) engine=ndb; - -insert into t10 values (1, 'kalle'); - ---exec $NDB_TOOLS_DIR/ndb_drop_table --no-defaults -d test `$NDB_TOOLS_DIR/ndb_show_tables --no-defaults | grep BLOB | while read a b c d e f g; do echo $g; done` >> $NDB_TOOLS_OUTPUT 2>&1 || true - -# End of 4.1 tests diff --git a/mysql-test/suite/ndb_team/t/ndb_autodiscover2-master.opt b/mysql-test/suite/ndb_team/t/ndb_autodiscover2-master.opt deleted file mode 100644 index e0d075c3fbd..00000000000 --- a/mysql-test/suite/ndb_team/t/ndb_autodiscover2-master.opt +++ /dev/null @@ -1 +0,0 @@ ---skip-external-locking diff --git a/mysql-test/suite/ndb_team/t/ndb_autodiscover2.test b/mysql-test/suite/ndb_team/t/ndb_autodiscover2.test deleted file mode 100644 index ebe14696cd2..00000000000 --- a/mysql-test/suite/ndb_team/t/ndb_autodiscover2.test +++ /dev/null @@ -1,21 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - -# -# Simple test to show use of discover when the server has been restarted -# The previous step has simply removed the frm file -# from disk, but left the table in NDB -# ---sleep 3 -select * from t9 order by a; - -# handler_discover should be 1 -show status like 'handler_discover%'; - -drop table t9; - ---error 1296 -select * from t10; -drop table t10; - -# End of 4.1 tests diff --git a/mysql-test/suite/ndb_team/t/ndb_autodiscover3.test b/mysql-test/suite/ndb_team/t/ndb_autodiscover3.test deleted file mode 100644 index 10416aee11f..00000000000 --- a/mysql-test/suite/ndb_team/t/ndb_autodiscover3.test +++ /dev/null @@ -1,104 +0,0 @@ --- source include/have_multi_ndb.inc --- source include/ndb_default_cluster.inc --- source include/not_embedded.inc - -# see bug#21563 --- source include/have_binlog_format_mixed_or_row.inc - ---disable_warnings -drop table if exists t1, t2; ---enable_warnings - -connect (con1,127.0.0.1,root,,test,$MASTER_MYPORT,); -connect (con2,127.0.0.1,root,,test,$MASTER_MYPORT1,); - -# Workaround for Bug#27644 -# ndb: connecting api node/mysqld may "steal" node_id from running mysqld -# - let ndb_waiter use a fixed node id so "steal" cannot happen ---let connect_str = "nodeid=6;$NDB_CONNECTSTRING" - -# -# Transaction ongoing while cluster is restarted -# ---connection server1 -create table t1 (a int key) engine=ndbcluster; - -begin; -insert into t1 values (1); - ---exec $NDB_MGM --no-defaults -e "all restart" >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults -c $connect_str >> $NDB_TOOLS_OUTPUT -# Wait for mysqld to reconnect and exit from readonly mode ---disable_query_log ---connection con1 ---source include/ndb_not_readonly.inc ---connection con2 ---source include/ndb_not_readonly.inc ---enable_query_log - ---connection server1 ---error 1297 -insert into t1 values (2); ---error 1296 -commit; - -drop table t1; - -# -# Stale cache after restart -i -# ---connection server1 -create table t2 (a int, b int, primary key(a,b)) engine=ndbcluster; -insert into t2 values (1,1),(2,1),(3,1),(4,1),(5,1),(6,1),(7,1),(8,1),(9,1),(10,1); -select * from t2 order by a limit 3; - ---exec $NDB_MGM --no-defaults -e "all restart -i" >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults -c $connect_str >> $NDB_TOOLS_OUTPUT -# to ensure mysqld has connected again, and recreated system tables ---disable_query_log ---connection con1 ---source include/ndb_not_readonly.inc ---connection con2 ---source include/ndb_not_readonly.inc ---enable_query_log - ---connection server2 ---error ER_NO_SUCH_TABLE -select * from t2; -show tables like 't2'; -reset master; -create table t2 (a int key) engine=ndbcluster; -insert into t2 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); -select * from t2 order by a limit 3; - -# server 1 should have a stale cache, and in this case wrong frm, transaction must be retried ---connection server1 -select * from t2 order by a limit 3; -reset master; - ---exec $NDB_MGM --no-defaults -e "all restart -i" >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults -c $connect_str >> $NDB_TOOLS_OUTPUT -# to ensure mysqld has connected again, and recreated system tables ---disable_query_log ---connection con1 ---source include/ndb_not_readonly.inc ---connection con2 ---source include/ndb_not_readonly.inc ---enable_query_log - ---connection server1 ---error ER_NO_SUCH_TABLE -select * from t2; -show tables like 't2'; -reset master; -create table t2 (a int key) engine=ndbcluster; -insert into t2 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); -select * from t2 order by a limit 3; - -# server 2 should have a stale cache, but with right frm, transaction need not be retried ---connection server2 -select * from t2 order by a limit 3; -reset master; - -drop table t2; -# End of 4.1 tests diff --git a/mysql-test/suite/ndb_team/t/ndb_backup_print.test b/mysql-test/suite/ndb_team/t/ndb_backup_print.test deleted file mode 100644 index cf869fd56f5..00000000000 --- a/mysql-test/suite/ndb_team/t/ndb_backup_print.test +++ /dev/null @@ -1,68 +0,0 @@ --- source include/have_ndb.inc --- source include/ndb_default_cluster.inc --- source include/not_embedded.inc - ---disable_warnings -use test; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; ---enable_warnings - -#NO.1 test output of backup ---exec $NDB_MGM --no-defaults -e "start backup" |sed -e 's/[0-9]//g' |sed -e 's/localhost//g' |sed -e 's/\.\.\.*//g' - -create table t1 - (pk int key - ,a1 BIT(1), a2 BIT(5), a3 BIT(33), a4 BIT(63), a5 BIT(64) - ,b1 TINYINT, b2 TINYINT UNSIGNED - ,c1 SMALLINT, c2 SMALLINT UNSIGNED - ,d1 INT, d2 INT UNSIGNED - ,e1 BIGINT, e2 BIGINT UNSIGNED - ,f1 CHAR(1) BINARY, f2 CHAR(32) BINARY, f3 CHAR(255) BINARY - ,g1 VARCHAR(32) BINARY, g2 VARCHAR(255) BINARY, g3 VARCHAR(1000) BINARY - ,h1 BINARY(1), h2 BINARY(8), h3 BINARY(255) - ,i1 VARBINARY(32), i2 VARBINARY(255), i3 VARBINARY(1000) - ) engine ndb; - -insert into t1 values - (1 - ,0x1, 0x17, 0x789a, 0x789abcde, 0xfedc0001 - ,127, 255 - ,32767, 65535 - ,2147483647, 4294967295 - ,9223372036854775807, 18446744073709551615 - ,'1','12345678901234567890123456789012','123456789' - ,'1','12345678901234567890123456789012','123456789' - ,0x12,0x123456789abcdef0, 0x012345 - ,0x12,0x123456789abcdef0, 0x00123450 - ); - -insert into t1 values - (2 - ,0, 0, 0, 0, 0 - ,-128, 0 - ,-32768, 0 - ,-2147483648, 0 - ,-9223372036854775808, 0 - ,'','','' - ,'','','' - ,0x0,0x0,0x0 - ,0x0,0x0,0x0 - ); - -insert into t1 values - (3 - ,NULL,NULL,NULL,NULL,NULL - ,NULL,NULL - ,NULL,NULL - ,NULL,NULL - ,NULL,NULL - ,NULL,NULL,NULL - ,NULL,NULL,NULL - ,NULL,NULL,NULL - ,NULL,NULL,NULL - ); - -#NO.2 test output of backup after some simple SQL operations ---exec $NDB_MGM --no-defaults -e "start backup" |sed -e 's/[0-9]//g' |sed -e 's/localhost//g' |sed -e 's/\.\.\.*//g' - -drop table t1; diff --git a/mysql-test/suite/ndb_team/t/ndb_dd_backuprestore.test b/mysql-test/suite/ndb_team/t/ndb_dd_backuprestore.test deleted file mode 100644 index 48db8ec3e0b..00000000000 --- a/mysql-test/suite/ndb_team/t/ndb_dd_backuprestore.test +++ /dev/null @@ -1,349 +0,0 @@ -######################################## -# Author: JBM -# Date: 2006-01-24 -# Purpose: Test CDD backup and restore -######################################## - --- source include/have_ndb.inc --- source include/ndb_default_cluster.inc --- source include/not_embedded.inc - ---disable_query_log -set new=on; ---enable_query_log - ---disable_warnings -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -DROP TABLE IF EXISTS test.t3; -DROP TABLE IF EXISTS test.t4; -DROP TABLE IF EXISTS test.t5; -DROP TABLE IF EXISTS test.t6; ---enable_warnings - -############ Test 1 Simple DD backup and restore ############# --- echo **** Test 1 Simple DD backup and restore **** - -CREATE LOGFILE GROUP log_group1 -ADD UNDOFILE './log_group1/undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; - -CREATE TABLESPACE table_space1 -ADD DATAFILE './table_space1/datafile.dat' -USE LOGFILE GROUP log_group1 -INITIAL_SIZE 12M -ENGINE NDB; - - -CREATE TABLE test.t1 -(pk1 MEDIUMINT NOT NULL AUTO_INCREMENT PRIMARY KEY, c2 CHAR(50) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL) TABLESPACE table_space1 STORAGE DISK ENGINE=NDB; - -let $j= 500; ---disable_query_log -while ($j) -{ - eval INSERT INTO test.t1 VALUES (NULL, "Sweden", $j, b'1'); - dec $j; -} ---enable_query_log -SELECT COUNT(*) FROM test.t1; -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY pk1 LIMIT 5; - --- source include/ndb_backup.inc - -DROP TABLE test.t1; - -ALTER TABLESPACE table_space1 -DROP DATAFILE './table_space1/datafile.dat' -ENGINE = NDB; - -DROP TABLESPACE table_space1 -ENGINE = NDB; - -DROP LOGFILE GROUP log_group1 -ENGINE =NDB; - --- source include/ndb_restore_master.inc - -SELECT COUNT(*) FROM test.t1; - -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY pk1 LIMIT 5; - -################# Mixed Cluster Test ############################ --- echo **** Test 2 Mixed Cluster Test backup and restore **** - -CREATE TABLE test.t2 -(pk1 MEDIUMINT NOT NULL AUTO_INCREMENT PRIMARY KEY, c2 VARCHAR(200) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL)ENGINE=NDB; - -let $j= 500; ---disable_query_log -while ($j) -{ - eval INSERT INTO test.t2 VALUES (NULL, "Sweden, Texas", $j, b'0'); - dec $j; -} ---enable_query_log - -CREATE TABLE test.t3 (c1 int not null auto_increment, data LONGBLOB, PRIMARY KEY(c1))TABLESPACE table_space1 STORAGE DISK ENGINE=NDB; - -CREATE TABLE test.t4 (c1 int not null auto_increment, data LONGBLOB, PRIMARY KEY(c1))ENGINE=NDB; - -let $j= 50; ---disable_query_log -while ($j) -{ - INSERT INTO test.t3 VALUES (NULL, repeat('a',1*1024)); - INSERT INTO test.t3 VALUES (NULL, repeat('b',16*1024)); - INSERT INTO test.t4 VALUES (NULL, repeat('a',1*1024)); - INSERT INTO test.t4 VALUES (NULL, repeat('b',16*1024)); - dec $j; -} ---enable_query_log - -SELECT COUNT(*) FROM test.t1; - -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY pk1 LIMIT 5; - -SELECT COUNT(*) FROM test.t2; - -SELECT pk1, c2, c3, hex(c4) FROM test.t2 ORDER BY pk1 LIMIT 5; - -SELECT COUNT(*) FROM test.t3; - -SELECT LENGTH(data) FROM test.t3 WHERE c1 = 1; - -SELECT LENGTH(data) FROM test.t3 WHERE c1 = 2; - -SELECT COUNT(*) FROM test.t4; - -SELECT LENGTH(data) FROM test.t4 WHERE c1 = 1; - -SELECT LENGTH(data) FROM test.t4 WHERE c1 = 2; - --- source include/ndb_backup.inc - -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; -DROP TABLE test.t4; - -ALTER TABLESPACE table_space1 -DROP DATAFILE './table_space1/datafile.dat' -ENGINE = NDB; - -DROP TABLESPACE table_space1 -ENGINE = NDB; - -DROP LOGFILE GROUP log_group1 -ENGINE =NDB; - --- source include/ndb_restore_master.inc - -SELECT COUNT(*) FROM test.t1; - -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY pk1 LIMIT 5; - -SELECT COUNT(*) FROM test.t2; - -SELECT pk1, c2, c3, hex(c4) FROM test.t2 ORDER BY pk1 LIMIT 5; - -SELECT COUNT(*) FROM test.t3; - -SELECT LENGTH(data) FROM test.t3 WHERE c1 = 1; - -SELECT LENGTH(data) FROM test.t3 WHERE c1 = 2; - -SELECT COUNT(*) FROM test.t4; - -SELECT LENGTH(data) FROM test.t4 WHERE c1 = 1; - -SELECT LENGTH(data) FROM test.t4 WHERE c1 = 2; - -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; -DROP TABLE test.t4; -###################### Adding partition ################################# --- echo **** Test 3 Adding partition Test backup and restore **** - -CREATE TABLESPACE table_space2 -ADD DATAFILE './table_space2/datafile.dat' -USE LOGFILE GROUP log_group1 -INITIAL_SIZE 12M -ENGINE NDB; - -CREATE TABLE test.t1 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 VARCHAR(150) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))TABLESPACE table_space1 STORAGE DISK ENGINE=NDB PARTITION BY HASH(c3) PARTITIONS 4; - -CREATE TABLE test.t4 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 VARCHAR(180) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))ENGINE=NDB PARTITION BY HASH(c3) PARTITIONS 2; - -CREATE TABLE test.t2 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 TEXT NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))TABLESPACE table_space2 STORAGE DISK ENGINE=NDB PARTITION BY KEY(c3) (PARTITION p0 ENGINE = NDB, PARTITION p1 ENGINE = NDB); - -CREATE TABLE test.t5 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 TEXT NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))ENGINE=NDB PARTITION BY KEY(pk1) (PARTITION p0 ENGINE = NDB, PARTITION p1 ENGINE = NDB); - -CREATE TABLE test.t3 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 VARCHAR(202) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))TABLESPACE table_space2 STORAGE DISK ENGINE=NDB PARTITION BY RANGE (c3) PARTITIONS 3 (PARTITION x1 VALUES LESS THAN (105), PARTITION x2 VALUES LESS THAN (333), PARTITION x3 VALUES LESS THAN (720)); - -CREATE TABLE test.t6 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 VARCHAR(220) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))ENGINE=NDB PARTITION BY RANGE (pk1) PARTITIONS 2 (PARTITION x1 VALUES LESS THAN (333), PARTITION x2 VALUES LESS THAN (720)); - -SHOW CREATE TABLE test.t1; - -SHOW CREATE TABLE test.t2; - -SHOW CREATE TABLE test.t3; - -SHOW CREATE TABLE test.t4; - -SHOW CREATE TABLE test.t5; - -SHOW CREATE TABLE test.t6; - -SELECT * FROM information_schema.partitions WHERE table_name= 't1'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't2'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't3'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't4'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't5'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't6'; - - -let $j= 500; ---disable_query_log -while ($j) -{ - eval INSERT INTO test.t1 VALUES (NULL, "Sweden, Texas", $j, b'0'); - eval INSERT INTO test.t4 VALUES (NULL, "Sweden, Texas", $j, b'0'); - dec $j; - eval INSERT INTO test.t2 VALUES (NULL, "Sweden, Texas, ITALY, Kyle, JO, JBM,TU", $j, b'1'); - eval INSERT INTO test.t5 VALUES (NULL, "Sweden, Texas, ITALY, Kyle, JO, JBM,TU", $j, b'1'); - dec $j; - eval INSERT INTO test.t3 VALUES (NULL, "TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU", $j, b'1'); - eval INSERT INTO test.t6 VALUES (NULL, "TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU", $j, b'1'); } --enable_query_log - -SELECT COUNT(*) FROM test.t1; - -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t2; - -SELECT pk1, c2, c3, hex(c4) FROM test.t2 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t3; - -SELECT pk1, c2, c3, hex(c4) FROM test.t3 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t4; - -SELECT pk1, c2, c3, hex(c4) FROM test.t4 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t5; - -SELECT pk1, c2, c3, hex(c4) FROM test.t5 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t6; - -SELECT pk1, c2, c3, hex(c4) FROM test.t6 ORDER BY c3 LIMIT 5; - --- source include/ndb_backup.inc - -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; -DROP TABLE test.t4; -DROP TABLE test.t5; -DROP TABLE test.t6; - -ALTER TABLESPACE table_space1 -DROP DATAFILE './table_space1/datafile.dat' -ENGINE = NDB; - -ALTER TABLESPACE table_space2 -DROP DATAFILE './table_space2/datafile.dat' -ENGINE = NDB; - -DROP TABLESPACE table_space1 -ENGINE = NDB; - -DROP TABLESPACE table_space2 -ENGINE = NDB; - -DROP LOGFILE GROUP log_group1 -ENGINE =NDB; - --- source include/ndb_restore_master.inc - - -SHOW CREATE TABLE test.t1; - -SHOW CREATE TABLE test.t2; - -SHOW CREATE TABLE test.t3; - -SHOW CREATE TABLE test.t4; - -SHOW CREATE TABLE test.t5; - -SHOW CREATE TABLE test.t6; - -SELECT * FROM information_schema.partitions WHERE table_name= 't1'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't2'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't3'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't4'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't5'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't6'; - -SELECT COUNT(*) FROM test.t1; - -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t2; - -SELECT pk1, c2, c3, hex(c4) FROM test.t2 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t3; - -SELECT pk1, c2, c3, hex(c4) FROM test.t3 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t4; - -SELECT pk1, c2, c3, hex(c4) FROM test.t4 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t5; - -SELECT pk1, c2, c3, hex(c4) FROM test.t5 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t6; - -SELECT pk1, c2, c3, hex(c4) FROM test.t6 ORDER BY c3 LIMIT 5; - -# Cleanup - -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; -DROP TABLE test.t4; -DROP TABLE test.t5; -DROP TABLE test.t6; - -ALTER TABLESPACE table_space1 DROP DATAFILE './table_space1/datafile.dat' ENGINE=NDB; - -ALTER TABLESPACE table_space2 DROP DATAFILE './table_space2/datafile.dat' ENGINE=NDB; - -DROP TABLESPACE table_space1 ENGINE = NDB; - -DROP TABLESPACE table_space2 ENGINE = NDB; - -DROP LOGFILE GROUP log_group1 ENGINE = NDB; - -#End 5.1 test case - - diff --git a/mysql-test/suite/ndb_team/t/rpl_ndb_dd_advance.test b/mysql-test/suite/ndb_team/t/rpl_ndb_dd_advance.test deleted file mode 100644 index e08b1b6f701..00000000000 --- a/mysql-test/suite/ndb_team/t/rpl_ndb_dd_advance.test +++ /dev/null @@ -1,410 +0,0 @@ -############################################### -# Author: JBM # -# Date: 2006-03-07 # -# Purpose: To test advance DD and replication # -############################################### - -#### Include Section #### ---source include/have_ndb.inc ---source include/have_binlog_format_mixed_or_row.inc ---source include/ndb_default_cluster.inc ---source include/not_embedded.inc ---source include/ndb_master-slave.inc - -#### Test start cleanup section ##### ---disable_warnings -DROP TABLE IF EXISTS t1, t2, t3; ---enable_warnings - -###################################################### -# Requirment: Cluster DD and replication must be able# -# to handle ALTER tables and indexes and must rpl # -# to the slave correctly # -###################################################### - -## Test #1 replication of CDD and Alter Tables ##### ---echo ***** Test 1 RPL of CDD and Alter ***** ---echo ***** Test 1 setup ***** - -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; - -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE 4M -ENGINE=NDB; - -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE=NDB; - -ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile02.dat' -INITIAL_SIZE 4M -ENGINE=NDB; - -CREATE TABLE t1 - (c1 INT NOT NULL PRIMARY KEY, - c2 INT NOT NULL, - c3 INT NOT NULL) - TABLESPACE ts1 STORAGE DISK - ENGINE=NDB; - ---echo ***** insert some data ***** - -let $j= 900; ---disable_query_log -while ($j) -{ - eval INSERT INTO t1 VALUES($j,$j*2,$j+3); - dec $j; -} ---enable_query_log - ---echo ***** Select from Master ***** - -SELECT * FROM t1 ORDER BY c1 LIMIT 5; - ---echo ***** Select from Slave ***** ---sync_slave_with_master -connection slave; -SELECT * FROM t1 ORDER BY c1 LIMIT 5; - -################################### -# Just to some File Schema check # -################################### - ---disable_query_log -SELECT DISTINCT FILE_NAME, FILE_TYPE, TABLESPACE_NAME, LOGFILE_GROUP_NAME - FROM INFORMATION_SCHEMA.FILES - WHERE ENGINE="ndbcluster" ORDER BY FILE_NAME; ---enable_query_log - ---echo **** Do First Set of ALTERs in the master table **** -################################################### -# On this first set of alters I expect: -# 1. To be able to create and index on 2 columns -# 2. To be able to create a unique index -# 3. To be able to add two columns and have -# it all replicated correctly to the slave cluster. -################################################### -connection master; -CREATE INDEX t1_i ON t1(c2, c3); -#Bug 18039 -CREATE UNIQUE INDEX t1_i2 ON t1(c2); -ALTER TABLE t1 ADD c4 TIMESTAMP; -ALTER TABLE t1 ADD c5 DOUBLE; -ALTER TABLE t1 ADD INDEX (c5); -SHOW CREATE TABLE t1; - ---echo **** Show first set of ALTERs on SLAVE **** ---sync_slave_with_master -connection slave; -SHOW CREATE TABLE t1; - ---echo **** Second set of alters test 1 **** -############################################ -# With this next set of alters we have had -# Some issues with renames of tables. So this -# test renames our main table, drop and index off -# of it, creates another table with then name -# of the orginal table, inserts a row, drops -# the table and renames the orginal table back. -# I want to make sure that 1) the cluster does -# okay with this and 2) that it is replicated -# correctly. -############################################# -connection master; -ALTER TABLE t1 RENAME t2; -ALTER TABLE t2 DROP INDEX c5; -CREATE TABLE t1(c1 INT)ENGINE=NDB; -INSERT INTO t1 VALUES(1); -DROP TABLE t1; -ALTER TABLE t2 RENAME t1; - ---echo **** Show second set of ALTERs on MASTER **** - -SHOW CREATE TABLE t1; - ---echo **** Show second set of ALTERs on SLAVE **** ---sync_slave_with_master -connection slave; -SHOW CREATE TABLE t1; - ---echo **** Third and last set of alters for test1 **** -######################################################### -# In this last set of alters, we are messing with the -# cluster ability to rebuild indexes, drop a column that make up -# an index with another column and change types several times in -# a row. I have choosen the BLOB as it seems to have had many -# issues in this release. I want to make sure that the cluster -# deals with these radical changes and that the replication to -# the slave cluster is dones correctly. -########################################################### -connection master; -ALTER TABLE t1 CHANGE c1 c1 DOUBLE; -ALTER TABLE t1 CHANGE c2 c2 DECIMAL(10,2); -ALTER TABLE t1 DROP COLUMN c3; -ALTER TABLE t1 CHANGE c4 c4 TEXT CHARACTER SET utf8; -ALTER TABLE t1 CHANGE c4 c4 BLOB; -ALTER TABLE t1 CHANGE c4 c3 BLOB; -set @b1 = 'b1'; -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -UPDATE t1 SET c3=@b1 where c1 = 1; -UPDATE t1 SET c3=@b1 where c1 = 2; - ---echo **** Show last set of ALTERs on MASTER **** - -SHOW CREATE TABLE t1; -SELECT * FROM t1 ORDER BY c1 LIMIT 5; - ---echo **** Show last set of ALTERs on SLAVE **** ---sync_slave_with_master -connection slave; -SHOW CREATE TABLE t1; -# Bug 18094 -SELECT * FROM t1 ORDER BY c1 LIMIT 5; -SELECT * FROM t1 where c1 = 1; - -connection master; -DROP TABLE t1; ---sync_slave_with_master -connection slave; -STOP SLAVE; -RESET SLAVE; -connection master; -RESET MASTER; -connection slave; -START SLAVE; - -################### TEST 2 TPCB for disk data ########################### -# Requirement: To have Stored Procedures and Functions that are used to # -# populate and post transactions to the data base using CDD that span # -# 2 tables spaces and also use a memory only cluster tables. In addition# -# The slave is to be stopped, cleaned and restored and synced with the # -# Master cluster # -######################################################################### - ---echo ******** Create additional TABLESPACE test 2 ************** - -connection master; -CREATE TABLESPACE ts2 -ADD DATAFILE 'datafile03.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 10M -ENGINE=NDB; - -ALTER TABLESPACE ts2 -ADD DATAFILE 'datafile04.dat' -INITIAL_SIZE 5M -ENGINE=NDB; - -let engine_type=NDBCLUSTER; -let table_space=ts2; -let format='RBR'; - ---source include/tpcb_disk_data.inc - ---echo ****** TEST 2 test time ********************************* -USE tpcb; - ---echo *********** Load up the database ****************** -CALL tpcb.load(); - ---echo ********** Check load master and slave ************** -SELECT COUNT(*) FROM account; ---sync_slave_with_master -connection slave; -USE tpcb; -SELECT COUNT(*) FROM account; - ---echo ******** Run in some transactions *************** - -connection master; -let $j= 100; ---disable_query_log -while ($j) -{ - eval CALL tpcb.trans($format); - dec $j; -} ---enable_query_log - - ---echo ***** Time to try slave sync *********** ---echo **** Must make sure slave is clean ***** ---connection slave -STOP SLAVE; -RESET SLAVE; -DROP PROCEDURE IF EXISTS tpcb.load; -DROP PROCEDURE IF EXISTS tpcb.trans; -DROP TABLE IF EXISTS tpcb.account; -DROP TABLE IF EXISTS tpcb.teller; -DROP TABLE IF EXISTS tpcb.branch; -DROP TABLE IF EXISTS tpcb.history; -DROP DATABASE tpcb; - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE=NDB; - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile02.dat' -ENGINE=NDB; - -DROP TABLESPACE ts1 ENGINE=NDB; - -ALTER TABLESPACE ts2 -DROP DATAFILE 'datafile03.dat' -ENGINE=NDB; - -ALTER TABLESPACE ts2 -DROP DATAFILE 'datafile04.dat' -ENGINE=NDB; - -DROP TABLESPACE ts2 ENGINE=NDB; - -DROP LOGFILE GROUP lg1 ENGINE=NDB; - ---echo ********** Take a backup of the Master ************* -connection master; - -SELECT COUNT(*) FROM history; - -let $j= 100; ---disable_query_log -while ($j) -{ - eval CALL tpcb.trans($format); - dec $j; -} ---enable_query_log - -SELECT COUNT(*) FROM history; - ---source include/ndb_backup.inc - ---echo ************ Restore the slave ************************ -connection slave; -CREATE DATABASE tpcb; ---source include/ndb_restore_slave_eoption.inc - ---echo ***** Check a few slave restore values *************** -connection slave; -USE tpcb; -SELECT COUNT(*) FROM account; - ---echo ***** Add some more records to master ********* -connection master; -let $j= 100; ---disable_query_log -while ($j) -{ - eval CALL tpcb.trans($format); - dec $j; -} ---enable_query_log - -# -# now setup replication to continue from last epoch -# 1. get apply_status epoch from slave -# 2. get corresponding _next_ binlog postition from master -# 3. change master on slave -# 4. add some transaction for slave to process -# 5. start the replication - ---echo ***** Finsh the slave sync process ******* ---disable_query_log -# 1. 2. 3. ---sync_slave_with_master ---source include/ndb_setup_slave.inc ---enable_query_log - -# 4. ---echo * 4. * -connection master; -let $j= 100; ---disable_query_log -while ($j) -{ - eval CALL tpcb.trans($format); - dec $j; -} ---enable_query_log - -# 5. ---echo * 5. * -connection slave; -START SLAVE; - ---echo **** We should be ready to continue on ************* - -connection master; ---echo ****** Let's make sure we match ******* ---echo ***** MASTER ******* -USE tpcb; -SELECT COUNT(*) FROM history; - ---echo ****** SLAVE ******** ---sync_slave_with_master -connection slave; -USE tpcb; -SELECT COUNT(*) FROM history; - ---echo *** DUMP MASTER & SLAVE FOR COMPARE ******** - ---exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert tpcb account teller branch history > $MYSQLTEST_VARDIR/tmp/RPL_DD_ADV_M.sql - ---exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert tpcb account teller branch history > $MYSQLTEST_VARDIR/tmp/RPL_DD_ADV_S.sql - ---echo *************** TEST 2 CLEANUP SECTION ******************** -connection master; -DROP PROCEDURE IF EXISTS tpcb.load; -DROP PROCEDURE IF EXISTS tpcb.trans; -DROP TABLE tpcb.account; -DROP TABLE tpcb.teller; -DROP TABLE tpcb.branch; -DROP TABLE tpcb.history; -DROP DATABASE tpcb; - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE=NDB; - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile02.dat' -ENGINE=NDB; - -DROP TABLESPACE ts1 ENGINE=NDB; - -ALTER TABLESPACE ts2 -DROP DATAFILE 'datafile03.dat' -ENGINE=NDB; - -ALTER TABLESPACE ts2 -DROP DATAFILE 'datafile04.dat' -ENGINE=NDB; - -DROP TABLESPACE ts2 ENGINE=NDB; - -DROP LOGFILE GROUP lg1 ENGINE=NDB; - ---sync_slave_with_master - -connection master; - ---echo ****** Do dumps compare ************ - -diff_files $MYSQLTEST_VARDIR/tmp/RPL_DD_ADV_M.sql $MYSQLTEST_VARDIR/tmp/RPL_DD_ADV_S.sql; - -## Note: Ths files should only get removed, if the above diff succeeds. - -remove_file $MYSQLTEST_VARDIR/tmp/RPL_DD_ADV_M.sql; -remove_file $MYSQLTEST_VARDIR/tmp/RPL_DD_ADV_S.sql; - -# End 5.1 test case diff --git a/mysql-test/suite/ndb_team/t/rpl_ndb_extraColMaster.test b/mysql-test/suite/ndb_team/t/rpl_ndb_extraColMaster.test deleted file mode 100644 index d78eda7eef1..00000000000 --- a/mysql-test/suite/ndb_team/t/rpl_ndb_extraColMaster.test +++ /dev/null @@ -1,14 +0,0 @@ -############################################################# -# Purpose: To test having extra columns on the master WL#3915 -############################################################# --- source include/have_ndb.inc --- source include/ndb_master-slave.inc --- source include/have_binlog_format_mixed_or_row.inc - -let $engine_type = 'NDB'; - -set binlog_format=row; --- source extra/rpl_tests/rpl_extraMaster_Col.test - -set binlog_format=mixed; --- source extra/rpl_tests/rpl_extraMaster_Col.test diff --git a/mysql-test/suite/ndb_team/t/rpl_ndb_mix_innodb-master.opt b/mysql-test/suite/ndb_team/t/rpl_ndb_mix_innodb-master.opt deleted file mode 100644 index 3596fc4d3bd..00000000000 --- a/mysql-test/suite/ndb_team/t/rpl_ndb_mix_innodb-master.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb --default-storage-engine=innodb diff --git a/mysql-test/suite/ndb_team/t/rpl_ndb_mix_innodb.test b/mysql-test/suite/ndb_team/t/rpl_ndb_mix_innodb.test deleted file mode 100644 index b730bcc08e0..00000000000 --- a/mysql-test/suite/ndb_team/t/rpl_ndb_mix_innodb.test +++ /dev/null @@ -1,36 +0,0 @@ -############################################# -#Authors: TU and Jeb -#Date: 2007/04 -#Purpose: Generic replication to cluster -# and ensuring that the ndb_apply_status -# table is updated. -############################################# -# Notes: -# include/select_ndb_apply_status.inc -# Selects out the log name, start & end pos -# from the ndb_apply_status table -# -# include/show_binlog_using_logname.inc -# To select out 1 row from offset 1 -# from the start position in the binlog whose -# name is = log_name -# -# include/tpcb.inc -# Creates DATABASE tpcb, the tables and -# stored procedures for loading the DB -# and for running transactions against DB. -############################################## - - -## Includes ## - ---disable_query_log ---source include/have_ndb.inc ---source include/have_innodb.inc ---source include/have_binlog_format_mixed.inc ---source include/ndb_master-slave.inc ---enable_query_log -let $off_set = 9; -let $rpl_format = 'MIX'; ---source extra/rpl_tests/rpl_ndb_apply_status.test - diff --git a/mysql-test/suite/parts/r/ndb_dd_backuprestore.result b/mysql-test/suite/parts/r/ndb_dd_backuprestore.result deleted file mode 100644 index 12a65a433a3..00000000000 --- a/mysql-test/suite/parts/r/ndb_dd_backuprestore.result +++ /dev/null @@ -1,512 +0,0 @@ -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -DROP TABLE IF EXISTS test.t3; -DROP TABLE IF EXISTS test.t4; -DROP TABLE IF EXISTS test.t5; -DROP TABLE IF EXISTS test.t6; -**** Test 1 Simple DD backup and restore **** -CREATE LOGFILE GROUP log_group1 -ADD UNDOFILE './log_group1/undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; -CREATE TABLESPACE table_space1 -ADD DATAFILE './table_space1/datafile.dat' -USE LOGFILE GROUP log_group1 -INITIAL_SIZE 12M -ENGINE NDB; -CREATE TABLE test.t1 -(pk1 MEDIUMINT NOT NULL AUTO_INCREMENT PRIMARY KEY, c2 CHAR(50) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL) TABLESPACE table_space1 STORAGE DISK ENGINE=NDB; -SELECT COUNT(*) FROM test.t1; -COUNT(*) -500 -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY pk1 LIMIT 5; -pk1 c2 c3 hex(c4) -1 Sweden 500 1 -2 Sweden 499 1 -3 Sweden 498 1 -4 Sweden 497 1 -5 Sweden 496 1 -CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info -(id INT, backup_id INT) ENGINE = MEMORY; -LOAD DATA INFILE '/tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; -DROP TABLE test.backup_info; -DROP TABLE test.t1; -ALTER TABLESPACE table_space1 -DROP DATAFILE './table_space1/datafile.dat' -ENGINE = NDB; -DROP TABLESPACE table_space1 -ENGINE = NDB; -DROP LOGFILE GROUP log_group1 -ENGINE =NDB; -SELECT COUNT(*) FROM test.t1; -COUNT(*) -500 -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY pk1 LIMIT 5; -pk1 c2 c3 hex(c4) -1 Sweden 500 1 -2 Sweden 499 1 -3 Sweden 498 1 -4 Sweden 497 1 -5 Sweden 496 1 -**** Test 2 Mixed Cluster Test backup and restore **** -CREATE TABLE test.t2 -(pk1 MEDIUMINT NOT NULL AUTO_INCREMENT PRIMARY KEY, c2 VARCHAR(200) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL)ENGINE=NDB; -CREATE TABLE test.t3 (c1 int not null auto_increment, data LONGBLOB, PRIMARY KEY(c1))TABLESPACE table_space1 STORAGE DISK ENGINE=NDB; -CREATE TABLE test.t4 (c1 int not null auto_increment, data LONGBLOB, PRIMARY KEY(c1))ENGINE=NDB; -SELECT COUNT(*) FROM test.t1; -COUNT(*) -500 -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY pk1 LIMIT 5; -pk1 c2 c3 hex(c4) -1 Sweden 500 1 -2 Sweden 499 1 -3 Sweden 498 1 -4 Sweden 497 1 -5 Sweden 496 1 -SELECT COUNT(*) FROM test.t2; -COUNT(*) -500 -SELECT pk1, c2, c3, hex(c4) FROM test.t2 ORDER BY pk1 LIMIT 5; -pk1 c2 c3 hex(c4) -1 Sweden, Texas 500 0 -2 Sweden, Texas 499 0 -3 Sweden, Texas 498 0 -4 Sweden, Texas 497 0 -5 Sweden, Texas 496 0 -SELECT COUNT(*) FROM test.t3; -COUNT(*) -100 -SELECT LENGTH(data) FROM test.t3 WHERE c1 = 1; -LENGTH(data) -1024 -SELECT LENGTH(data) FROM test.t3 WHERE c1 = 2; -LENGTH(data) -16384 -SELECT COUNT(*) FROM test.t4; -COUNT(*) -100 -SELECT LENGTH(data) FROM test.t4 WHERE c1 = 1; -LENGTH(data) -1024 -SELECT LENGTH(data) FROM test.t4 WHERE c1 = 2; -LENGTH(data) -16384 -CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info -(id INT, backup_id INT) ENGINE = MEMORY; -LOAD DATA INFILE '/tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; -DROP TABLE test.backup_info; -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; -DROP TABLE test.t4; -ALTER TABLESPACE table_space1 -DROP DATAFILE './table_space1/datafile.dat' -ENGINE = NDB; -DROP TABLESPACE table_space1 -ENGINE = NDB; -DROP LOGFILE GROUP log_group1 -ENGINE =NDB; -SELECT COUNT(*) FROM test.t1; -COUNT(*) -500 -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY pk1 LIMIT 5; -pk1 c2 c3 hex(c4) -1 Sweden 500 1 -2 Sweden 499 1 -3 Sweden 498 1 -4 Sweden 497 1 -5 Sweden 496 1 -SELECT COUNT(*) FROM test.t2; -COUNT(*) -500 -SELECT pk1, c2, c3, hex(c4) FROM test.t2 ORDER BY pk1 LIMIT 5; -pk1 c2 c3 hex(c4) -1 Sweden, Texas 500 0 -2 Sweden, Texas 499 0 -3 Sweden, Texas 498 0 -4 Sweden, Texas 497 0 -5 Sweden, Texas 496 0 -SELECT COUNT(*) FROM test.t3; -COUNT(*) -100 -SELECT LENGTH(data) FROM test.t3 WHERE c1 = 1; -LENGTH(data) -1024 -SELECT LENGTH(data) FROM test.t3 WHERE c1 = 2; -LENGTH(data) -16384 -SELECT COUNT(*) FROM test.t4; -COUNT(*) -100 -SELECT LENGTH(data) FROM test.t4 WHERE c1 = 1; -LENGTH(data) -1024 -SELECT LENGTH(data) FROM test.t4 WHERE c1 = 2; -LENGTH(data) -16384 -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; -DROP TABLE test.t4; -**** Test 3 Adding partition Test backup and restore **** -CREATE TABLESPACE table_space2 -ADD DATAFILE './table_space2/datafile.dat' -USE LOGFILE GROUP log_group1 -INITIAL_SIZE 12M -ENGINE NDB; -CREATE TABLE test.t1 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 VARCHAR(150) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))TABLESPACE table_space1 STORAGE DISK ENGINE=NDB PARTITION BY HASH(c3) PARTITIONS 4; -CREATE TABLE test.t4 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 VARCHAR(180) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))ENGINE=NDB PARTITION BY HASH(c3) PARTITIONS 2; -CREATE TABLE test.t2 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 TEXT NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))TABLESPACE table_space2 STORAGE DISK ENGINE=NDB PARTITION BY KEY(c3) (PARTITION p0 ENGINE = NDB, PARTITION p1 ENGINE = NDB); -CREATE TABLE test.t5 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 TEXT NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))ENGINE=NDB PARTITION BY KEY(pk1) (PARTITION p0 ENGINE = NDB, PARTITION p1 ENGINE = NDB); -CREATE TABLE test.t3 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 VARCHAR(202) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))TABLESPACE table_space2 STORAGE DISK ENGINE=NDB PARTITION BY RANGE (c3) PARTITIONS 3 (PARTITION x1 VALUES LESS THAN (105), PARTITION x2 VALUES LESS THAN (333), PARTITION x3 VALUES LESS THAN (720)); -CREATE TABLE test.t6 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 VARCHAR(220) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))ENGINE=NDB PARTITION BY RANGE (pk1) PARTITIONS 2 (PARTITION x1 VALUES LESS THAN (333), PARTITION x2 VALUES LESS THAN (720)); -SHOW CREATE TABLE test.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` varchar(150) NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) /*!50100 TABLESPACE table_space1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (c3) -PARTITIONS 4 */ -SHOW CREATE TABLE test.t2; -Table Create Table -t2 CREATE TABLE `t2` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` text NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) /*!50100 TABLESPACE table_space2 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (c3) -(PARTITION p0 ENGINE = ndbcluster, - PARTITION p1 ENGINE = ndbcluster) */ -SHOW CREATE TABLE test.t3; -Table Create Table -t3 CREATE TABLE `t3` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` varchar(202) NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) /*!50100 TABLESPACE table_space2 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (c3) -(PARTITION x1 VALUES LESS THAN (105) ENGINE = ndbcluster, - PARTITION x2 VALUES LESS THAN (333) ENGINE = ndbcluster, - PARTITION x3 VALUES LESS THAN (720) ENGINE = ndbcluster) */ -SHOW CREATE TABLE test.t4; -Table Create Table -t4 CREATE TABLE `t4` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` varchar(180) NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (c3) -PARTITIONS 2 */ -SHOW CREATE TABLE test.t5; -Table Create Table -t5 CREATE TABLE `t5` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` text NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (pk1) -(PARTITION p0 ENGINE = ndbcluster, - PARTITION p1 ENGINE = ndbcluster) */ -SHOW CREATE TABLE test.t6; -Table Create Table -t6 CREATE TABLE `t6` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` varchar(220) NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (pk1) -(PARTITION x1 VALUES LESS THAN (333) ENGINE = ndbcluster, - PARTITION x2 VALUES LESS THAN (720) ENGINE = ndbcluster) */ -SELECT * FROM information_schema.partitions WHERE table_name= 't1'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t1 p0 NULL 1 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space1 -NULL test t1 p1 NULL 2 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space1 -NULL test t1 p2 NULL 3 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space1 -NULL test t1 p3 NULL 4 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space1 -SELECT * FROM information_schema.partitions WHERE table_name= 't2'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t2 p0 NULL 1 NULL KEY NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 -NULL test t2 p1 NULL 2 NULL KEY NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 -SELECT * FROM information_schema.partitions WHERE table_name= 't3'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t3 x1 NULL 1 NULL RANGE NULL c3 NULL 105 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 -NULL test t3 x2 NULL 2 NULL RANGE NULL c3 NULL 333 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 -NULL test t3 x3 NULL 3 NULL RANGE NULL c3 NULL 720 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 -SELECT * FROM information_schema.partitions WHERE table_name= 't4'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t4 p0 NULL 1 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -NULL test t4 p1 NULL 2 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -SELECT * FROM information_schema.partitions WHERE table_name= 't5'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t5 p0 NULL 1 NULL KEY NULL pk1 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -NULL test t5 p1 NULL 2 NULL KEY NULL pk1 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -SELECT * FROM information_schema.partitions WHERE table_name= 't6'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t6 x1 NULL 1 NULL RANGE NULL pk1 NULL 333 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -NULL test t6 x2 NULL 2 NULL RANGE NULL pk1 NULL 720 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -SELECT COUNT(*) FROM test.t1; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 Sweden, Texas 2 0 -249 Sweden, Texas 4 0 -248 Sweden, Texas 6 0 -247 Sweden, Texas 8 0 -246 Sweden, Texas 10 0 -SELECT COUNT(*) FROM test.t2; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t2 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 1 1 -249 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 3 1 -248 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 5 1 -247 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 7 1 -246 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 9 1 -SELECT COUNT(*) FROM test.t3; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t3 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 0 1 -249 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 2 1 -248 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 4 1 -247 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 6 1 -246 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 8 1 -SELECT COUNT(*) FROM test.t4; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t4 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 Sweden, Texas 2 0 -249 Sweden, Texas 4 0 -248 Sweden, Texas 6 0 -247 Sweden, Texas 8 0 -246 Sweden, Texas 10 0 -SELECT COUNT(*) FROM test.t5; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t5 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 1 1 -249 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 3 1 -248 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 5 1 -247 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 7 1 -246 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 9 1 -SELECT COUNT(*) FROM test.t6; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t6 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 0 1 -249 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 2 1 -248 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 4 1 -247 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 6 1 -246 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 8 1 -CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info -(id INT, backup_id INT) ENGINE = MEMORY; -LOAD DATA INFILE '/tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; -DROP TABLE test.backup_info; -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; -DROP TABLE test.t4; -DROP TABLE test.t5; -DROP TABLE test.t6; -ALTER TABLESPACE table_space1 -DROP DATAFILE './table_space1/datafile.dat' -ENGINE = NDB; -ALTER TABLESPACE table_space2 -DROP DATAFILE './table_space2/datafile.dat' -ENGINE = NDB; -DROP TABLESPACE table_space1 -ENGINE = NDB; -DROP TABLESPACE table_space2 -ENGINE = NDB; -DROP LOGFILE GROUP log_group1 -ENGINE =NDB; -SHOW CREATE TABLE test.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` varchar(150) NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) /*!50100 TABLESPACE table_space1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (c3) -PARTITIONS 4 */ -SHOW CREATE TABLE test.t2; -Table Create Table -t2 CREATE TABLE `t2` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` text NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) /*!50100 TABLESPACE table_space2 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (c3) -(PARTITION p0 ENGINE = ndbcluster, - PARTITION p1 ENGINE = ndbcluster) */ -SHOW CREATE TABLE test.t3; -Table Create Table -t3 CREATE TABLE `t3` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` varchar(202) NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) /*!50100 TABLESPACE table_space2 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (c3) -(PARTITION x1 VALUES LESS THAN (105) ENGINE = ndbcluster, - PARTITION x2 VALUES LESS THAN (333) ENGINE = ndbcluster, - PARTITION x3 VALUES LESS THAN (720) ENGINE = ndbcluster) */ -SHOW CREATE TABLE test.t4; -Table Create Table -t4 CREATE TABLE `t4` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` varchar(180) NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (c3) -PARTITIONS 2 */ -SHOW CREATE TABLE test.t5; -Table Create Table -t5 CREATE TABLE `t5` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` text NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (pk1) -(PARTITION p0 ENGINE = ndbcluster, - PARTITION p1 ENGINE = ndbcluster) */ -SHOW CREATE TABLE test.t6; -Table Create Table -t6 CREATE TABLE `t6` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` varchar(220) NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (pk1) -(PARTITION x1 VALUES LESS THAN (333) ENGINE = ndbcluster, - PARTITION x2 VALUES LESS THAN (720) ENGINE = ndbcluster) */ -SELECT * FROM information_schema.partitions WHERE table_name= 't1'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t1 p0 NULL 1 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space1 -NULL test t1 p1 NULL 2 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space1 -NULL test t1 p2 NULL 3 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space1 -NULL test t1 p3 NULL 4 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space1 -SELECT * FROM information_schema.partitions WHERE table_name= 't2'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t2 p0 NULL 1 NULL KEY NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 -NULL test t2 p1 NULL 2 NULL KEY NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 -SELECT * FROM information_schema.partitions WHERE table_name= 't3'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t3 x1 NULL 1 NULL RANGE NULL c3 NULL 105 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 -NULL test t3 x2 NULL 2 NULL RANGE NULL c3 NULL 333 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 -NULL test t3 x3 NULL 3 NULL RANGE NULL c3 NULL 720 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 -SELECT * FROM information_schema.partitions WHERE table_name= 't4'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t4 p0 NULL 1 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -NULL test t4 p1 NULL 2 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -SELECT * FROM information_schema.partitions WHERE table_name= 't5'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t5 p0 NULL 1 NULL KEY NULL pk1 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -NULL test t5 p1 NULL 2 NULL KEY NULL pk1 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -SELECT * FROM information_schema.partitions WHERE table_name= 't6'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t6 x1 NULL 1 NULL RANGE NULL pk1 NULL 333 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -NULL test t6 x2 NULL 2 NULL RANGE NULL pk1 NULL 720 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -SELECT COUNT(*) FROM test.t1; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 Sweden, Texas 2 0 -249 Sweden, Texas 4 0 -248 Sweden, Texas 6 0 -247 Sweden, Texas 8 0 -246 Sweden, Texas 10 0 -SELECT COUNT(*) FROM test.t2; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t2 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 1 1 -249 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 3 1 -248 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 5 1 -247 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 7 1 -246 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 9 1 -SELECT COUNT(*) FROM test.t3; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t3 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 0 1 -249 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 2 1 -248 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 4 1 -247 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 6 1 -246 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 8 1 -SELECT COUNT(*) FROM test.t4; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t4 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 Sweden, Texas 2 0 -249 Sweden, Texas 4 0 -248 Sweden, Texas 6 0 -247 Sweden, Texas 8 0 -246 Sweden, Texas 10 0 -SELECT COUNT(*) FROM test.t5; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t5 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 1 1 -249 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 3 1 -248 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 5 1 -247 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 7 1 -246 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 9 1 -SELECT COUNT(*) FROM test.t6; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t6 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 0 1 -249 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 2 1 -248 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 4 1 -247 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 6 1 -246 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 8 1 -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; -DROP TABLE test.t4; -DROP TABLE test.t5; -DROP TABLE test.t6; -ALTER TABLESPACE table_space1 DROP DATAFILE './table_space1/datafile.dat' ENGINE=NDB; -ALTER TABLESPACE table_space2 DROP DATAFILE './table_space2/datafile.dat' ENGINE=NDB; -DROP TABLESPACE table_space1 ENGINE = NDB; -DROP TABLESPACE table_space2 ENGINE = NDB; -DROP LOGFILE GROUP log_group1 ENGINE = NDB; diff --git a/mysql-test/suite/parts/r/part_supported_sql_func_ndb.result b/mysql-test/suite/parts/r/part_supported_sql_func_ndb.result deleted file mode 100644 index a1e10ee4a9c..00000000000 --- a/mysql-test/suite/parts/r/part_supported_sql_func_ndb.result +++ /dev/null @@ -1,9918 +0,0 @@ -------------------------------------------------------------------------- ---- abs(col1) in partition with coltype int -------------------------------------------------------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -------------------------------------------------------------------------- ---- Create tables with abs(col1) -------------------------------------------------------------------------- -create table t1 (col1 int) engine='NDB' -partition by range(abs(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t2 (col1 int) engine='NDB' -partition by list(abs(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t3 (col1 int) engine='NDB' -partition by hash(abs(col1)); -create table t4 (colint int, col1 int) engine='NDB' -partition by range(colint) -subpartition by hash(abs(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t5 (colint int, col1 int) engine='NDB' -partition by list(colint) -subpartition by hash(abs(col1)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -create table t6 (colint int, col1 int) engine='NDB' -partition by range(colint) -(partition p0 values less than (abs(15)), -partition p1 values less than maxvalue); -------------------------------------------------------------------------- ---- Access tables with abs(col1) -------------------------------------------------------------------------- -insert into t1 values (5 ); -insert into t1 values (13 ); -insert into t2 values (5 ); -insert into t2 values (13 ); -insert into t2 values (17 ); -insert into t3 values (5 ); -insert into t3 values (13 ); -insert into t3 values (17 ); -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_int.inc' into table t4; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_int.inc' into table t5; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_int.inc' into table t6; -select abs(col1) from t1 order by col1; -abs(col1) -5 -13 -select * from t1 order by col1; -col1 -5 -13 -select * from t2 order by col1; -col1 -5 -13 -17 -select * from t3 order by col1; -col1 -5 -13 -17 -select * from t4 order by colint; -colint col1 -1 5 -2 13 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 5 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -select * from t5 order by colint; -colint col1 -1 5 -2 13 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 5 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -select * from t6 order by colint; -colint col1 -1 5 -2 13 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 5 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -update t1 set col1=15 where col1=5 ; -update t2 set col1=15 where col1=5 ; -update t3 set col1=15 where col1=5 ; -update t4 set col1=15 where col1=5 ; -update t5 set col1=15 where col1=5 ; -update t6 set col1=15 where col1=5 ; -select * from t1 order by col1; -col1 -13 -15 -select * from t2 order by col1; -col1 -13 -15 -17 -select * from t3 order by col1; -col1 -13 -15 -17 -select * from t4 order by colint; -colint col1 -1 15 -2 13 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -select * from t5 order by colint; -colint col1 -1 15 -2 13 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -select * from t6 order by colint; -colint col1 -1 15 -2 13 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -------------------------------------------------------------------------- ---- Alter tables with abs(col1) -------------------------------------------------------------------------- -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -create table t11 engine='NDB' as select * from t1; -create table t22 engine='NDB' as select * from t2; -create table t33 engine='NDB' as select * from t3; -create table t44 engine='NDB' as select * from t4; -create table t55 engine='NDB' as select * from t5; -create table t66 engine='NDB' as select * from t6; -alter table t11 -partition by range(abs(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t22 -partition by list(abs(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t33 -partition by hash(abs(col1)); -alter table t44 -partition by range(colint) -subpartition by hash(abs(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t55 -partition by list(colint) -subpartition by hash(abs(col1)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -alter table t66 -partition by range(colint) -(partition p0 values less than (abs(15)), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -13 -15 -select * from t22 order by col1; -col1 -13 -15 -17 -select * from t33 order by col1; -col1 -13 -15 -17 -select * from t44 order by colint; -colint col1 -1 15 -2 13 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -select * from t55 order by colint; -colint col1 -1 15 -2 13 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -select * from t66 order by colint; -colint col1 -1 15 -2 13 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 ---------------------------- ----- some alter table begin ---------------------------- -alter table t55 -partition by list(colint) -subpartition by hash(abs(col1)) subpartitions 4 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p1 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -show create table t55; -Table Create Table -t55 CREATE TABLE `t55` ( - `colint` int(11) DEFAULT NULL, - `col1` int(11) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (abs(col1)) -SUBPARTITIONS 4 -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) ENGINE = ndbcluster) */ -select * from t55 order by colint; -colint col1 -1 15 -2 13 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with abs(col1) -------------------------------------------------------------------------- -delete from t1 where col1=13 ; -delete from t2 where col1=13 ; -delete from t3 where col1=13 ; -delete from t4 where col1=13 ; -delete from t5 where col1=13 ; -delete from t6 where col1=13 ; -select * from t1 order by col1; -col1 -15 -select * from t2 order by col1; -col1 -15 -17 -select * from t3 order by col1; -col1 -15 -17 -select * from t4 order by colint; -colint col1 -1 15 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -select * from t5 order by colint; -colint col1 -1 15 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -insert into t1 values (13 ); -insert into t2 values (13 ); -insert into t3 values (13 ); -insert into t4 values (60,13 ); -insert into t5 values (60,13 ); -insert into t6 values (60,13 ); -select * from t1 order by col1; -col1 -13 -15 -select * from t2 order by col1; -col1 -13 -15 -17 -select * from t3 order by col1; -col1 -13 -15 -17 -select * from t4 order by colint; -colint col1 -1 15 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -60 13 -select * from t5 order by colint; -colint col1 -1 15 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -60 13 -select * from t6 order by colint; -colint col1 -1 15 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -60 13 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with abs(col1) -------------------------------------------------------------------------- -delete from t11 where col1=13 ; -delete from t22 where col1=13 ; -delete from t33 where col1=13 ; -delete from t44 where col1=13 ; -delete from t55 where col1=13 ; -delete from t66 where col1=13 ; -select * from t11 order by col1; -col1 -15 -select * from t22 order by col1; -col1 -15 -17 -select * from t33 order by col1; -col1 -15 -17 -select * from t44 order by colint; -colint col1 -1 15 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -select * from t55 order by colint; -colint col1 -1 15 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -insert into t11 values (13 ); -insert into t22 values (13 ); -insert into t33 values (13 ); -insert into t44 values (60,13 ); -insert into t55 values (60,13 ); -insert into t66 values (60,13 ); -select * from t11 order by col1; -col1 -13 -15 -select * from t22 order by col1; -col1 -13 -15 -17 -select * from t33 order by col1; -col1 -13 -15 -17 -select * from t44 order by colint; -colint col1 -1 15 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -60 13 -select * from t55 order by colint; -colint col1 -1 15 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -60 13 -select * from t66 order by colint; -colint col1 -1 15 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -60 13 -------------------------- ----- some alter table end -------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -------------------------------------------------------------------------- ---- mod(col1,10) in partition with coltype int -------------------------------------------------------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -------------------------------------------------------------------------- ---- Create tables with mod(col1,10) -------------------------------------------------------------------------- -create table t1 (col1 int) engine='NDB' -partition by range(mod(col1,10)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t2 (col1 int) engine='NDB' -partition by list(mod(col1,10)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t3 (col1 int) engine='NDB' -partition by hash(mod(col1,10)); -create table t4 (colint int, col1 int) engine='NDB' -partition by range(colint) -subpartition by hash(mod(col1,10)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t5 (colint int, col1 int) engine='NDB' -partition by list(colint) -subpartition by hash(mod(col1,10)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -create table t6 (colint int, col1 int) engine='NDB' -partition by range(colint) -(partition p0 values less than (mod(15,10)), -partition p1 values less than maxvalue); -------------------------------------------------------------------------- ---- Access tables with mod(col1,10) -------------------------------------------------------------------------- -insert into t1 values (5); -insert into t1 values (19); -insert into t2 values (5); -insert into t2 values (19); -insert into t2 values (17); -insert into t3 values (5); -insert into t3 values (19); -insert into t3 values (17); -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_int.inc' into table t4; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_int.inc' into table t5; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_int.inc' into table t6; -select mod(col1,10) from t1 order by col1; -mod(col1,10) -5 -9 -select * from t1 order by col1; -col1 -5 -19 -select * from t2 order by col1; -col1 -5 -17 -19 -select * from t3 order by col1; -col1 -5 -17 -19 -select * from t4 order by colint; -colint col1 -1 5 -2 13 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 5 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -select * from t5 order by colint; -colint col1 -1 5 -2 13 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 5 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -select * from t6 order by colint; -colint col1 -1 5 -2 13 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 5 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -update t1 set col1=15 where col1=5; -update t2 set col1=15 where col1=5; -update t3 set col1=15 where col1=5; -update t4 set col1=15 where col1=5; -update t5 set col1=15 where col1=5; -update t6 set col1=15 where col1=5; -select * from t1 order by col1; -col1 -15 -19 -select * from t2 order by col1; -col1 -15 -17 -19 -select * from t3 order by col1; -col1 -15 -17 -19 -select * from t4 order by colint; -colint col1 -1 15 -2 13 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -select * from t5 order by colint; -colint col1 -1 15 -2 13 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -select * from t6 order by colint; -colint col1 -1 15 -2 13 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -------------------------------------------------------------------------- ---- Alter tables with mod(col1,10) -------------------------------------------------------------------------- -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -create table t11 engine='NDB' as select * from t1; -create table t22 engine='NDB' as select * from t2; -create table t33 engine='NDB' as select * from t3; -create table t44 engine='NDB' as select * from t4; -create table t55 engine='NDB' as select * from t5; -create table t66 engine='NDB' as select * from t6; -alter table t11 -partition by range(mod(col1,10)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t22 -partition by list(mod(col1,10)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t33 -partition by hash(mod(col1,10)); -alter table t44 -partition by range(colint) -subpartition by hash(mod(col1,10)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t55 -partition by list(colint) -subpartition by hash(mod(col1,10)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -alter table t66 -partition by range(colint) -(partition p0 values less than (mod(15,10)), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -15 -19 -select * from t22 order by col1; -col1 -15 -17 -19 -select * from t33 order by col1; -col1 -15 -17 -19 -select * from t44 order by colint; -colint col1 -1 15 -2 13 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -select * from t55 order by colint; -colint col1 -1 15 -2 13 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -select * from t66 order by colint; -colint col1 -1 15 -2 13 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 ---------------------------- ----- some alter table begin ---------------------------- -alter table t55 -partition by list(colint) -subpartition by hash(mod(col1,10)) subpartitions 4 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p1 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -show create table t55; -Table Create Table -t55 CREATE TABLE `t55` ( - `colint` int(11) DEFAULT NULL, - `col1` int(11) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (mod(col1,10)) -SUBPARTITIONS 4 -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) ENGINE = ndbcluster) */ -select * from t55 order by colint; -colint col1 -1 15 -2 13 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with mod(col1,10) -------------------------------------------------------------------------- -delete from t1 where col1=19; -delete from t2 where col1=19; -delete from t3 where col1=19; -delete from t4 where col1=19; -delete from t5 where col1=19; -delete from t6 where col1=19; -select * from t1 order by col1; -col1 -15 -select * from t2 order by col1; -col1 -15 -17 -select * from t3 order by col1; -col1 -15 -17 -select * from t4 order by colint; -colint col1 -1 15 -2 13 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -select * from t5 order by colint; -colint col1 -1 15 -2 13 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -insert into t1 values (19); -insert into t2 values (19); -insert into t3 values (19); -insert into t4 values (60,19); -insert into t5 values (60,19); -insert into t6 values (60,19); -select * from t1 order by col1; -col1 -15 -19 -select * from t2 order by col1; -col1 -15 -17 -19 -select * from t3 order by col1; -col1 -15 -17 -19 -select * from t4 order by colint; -colint col1 -1 15 -2 13 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -60 19 -select * from t5 order by colint; -colint col1 -1 15 -2 13 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -60 19 -select * from t6 order by colint; -colint col1 -1 15 -2 13 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -60 19 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with mod(col1,10) -------------------------------------------------------------------------- -delete from t11 where col1=19; -delete from t22 where col1=19; -delete from t33 where col1=19; -delete from t44 where col1=19; -delete from t55 where col1=19; -delete from t66 where col1=19; -select * from t11 order by col1; -col1 -15 -select * from t22 order by col1; -col1 -15 -17 -select * from t33 order by col1; -col1 -15 -17 -select * from t44 order by colint; -colint col1 -1 15 -2 13 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -select * from t55 order by colint; -colint col1 -1 15 -2 13 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -insert into t11 values (19); -insert into t22 values (19); -insert into t33 values (19); -insert into t44 values (60,19); -insert into t55 values (60,19); -insert into t66 values (60,19); -select * from t11 order by col1; -col1 -15 -19 -select * from t22 order by col1; -col1 -15 -17 -19 -select * from t33 order by col1; -col1 -15 -17 -19 -select * from t44 order by colint; -colint col1 -1 15 -2 13 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -60 19 -select * from t55 order by colint; -colint col1 -1 15 -2 13 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -60 19 -select * from t66 order by colint; -colint col1 -1 15 -2 13 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -60 19 -------------------------- ----- some alter table end -------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -------------------------------------------------------------------------- ---- day(col1) in partition with coltype date -------------------------------------------------------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -------------------------------------------------------------------------- ---- Create tables with day(col1) -------------------------------------------------------------------------- -create table t1 (col1 date) engine='NDB' -partition by range(day(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t2 (col1 date) engine='NDB' -partition by list(day(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t3 (col1 date) engine='NDB' -partition by hash(day(col1)); -create table t4 (colint int, col1 date) engine='NDB' -partition by range(colint) -subpartition by hash(day(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t5 (colint int, col1 date) engine='NDB' -partition by list(colint) -subpartition by hash(day(col1)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -create table t6 (colint int, col1 date) engine='NDB' -partition by range(colint) -(partition p0 values less than (day('2006-12-21')), -partition p1 values less than maxvalue); -------------------------------------------------------------------------- ---- Access tables with day(col1) -------------------------------------------------------------------------- -insert into t1 values ('2006-02-03'); -insert into t1 values ('2006-01-17'); -insert into t2 values ('2006-02-03'); -insert into t2 values ('2006-01-17'); -insert into t2 values ('2006-01-25'); -insert into t3 values ('2006-02-03'); -insert into t3 values ('2006-01-17'); -insert into t3 values ('2006-01-25'); -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t4; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t5; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t6; -select day(col1) from t1 order by col1; -day(col1) -17 -3 -select * from t1 order by col1; -col1 -2006-01-17 -2006-02-03 -select * from t2 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-03 -select * from t3 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-03 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -update t1 set col1='2006-02-05' where col1='2006-02-03'; -update t2 set col1='2006-02-05' where col1='2006-02-03'; -update t3 set col1='2006-02-05' where col1='2006-02-03'; -update t4 set col1='2006-02-05' where col1='2006-02-03'; -update t5 set col1='2006-02-05' where col1='2006-02-03'; -update t6 set col1='2006-02-05' where col1='2006-02-03'; -select * from t1 order by col1; -col1 -2006-01-17 -2006-02-05 -select * from t2 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-05 -select * from t3 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-05 -select * from t4 order by colint; -colint col1 -1 2006-02-05 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-05 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-05 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Alter tables with day(col1) -------------------------------------------------------------------------- -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -create table t11 engine='NDB' as select * from t1; -create table t22 engine='NDB' as select * from t2; -create table t33 engine='NDB' as select * from t3; -create table t44 engine='NDB' as select * from t4; -create table t55 engine='NDB' as select * from t5; -create table t66 engine='NDB' as select * from t6; -alter table t11 -partition by range(day(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t22 -partition by list(day(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t33 -partition by hash(day(col1)); -alter table t44 -partition by range(colint) -subpartition by hash(day(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t55 -partition by list(colint) -subpartition by hash(day(col1)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -alter table t66 -partition by range(colint) -(partition p0 values less than (day('2006-12-21')), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -2006-01-17 -2006-02-05 -select * from t22 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-05 -select * from t33 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-05 -select * from t44 order by colint; -colint col1 -1 2006-02-05 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-05 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t66 order by colint; -colint col1 -1 2006-02-05 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 ---------------------------- ----- some alter table begin ---------------------------- -alter table t55 -partition by list(colint) -subpartition by hash(day(col1)) subpartitions 4 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p1 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -show create table t55; -Table Create Table -t55 CREATE TABLE `t55` ( - `colint` int(11) DEFAULT NULL, - `col1` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (day(col1)) -SUBPARTITIONS 4 -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) ENGINE = ndbcluster) */ -select * from t55 order by colint; -colint col1 -1 2006-02-05 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with day(col1) -------------------------------------------------------------------------- -delete from t1 where col1='2006-01-17'; -delete from t2 where col1='2006-01-17'; -delete from t3 where col1='2006-01-17'; -delete from t4 where col1='2006-01-17'; -delete from t5 where col1='2006-01-17'; -delete from t6 where col1='2006-01-17'; -select * from t1 order by col1; -col1 -2006-02-05 -select * from t2 order by col1; -col1 -2006-01-25 -2006-02-05 -select * from t3 order by col1; -col1 -2006-01-25 -2006-02-05 -select * from t4 order by colint; -colint col1 -1 2006-02-05 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-05 -3 2006-01-25 -4 2006-02-05 -insert into t1 values ('2006-01-17'); -insert into t2 values ('2006-01-17'); -insert into t3 values ('2006-01-17'); -insert into t4 values (60,'2006-01-17'); -insert into t5 values (60,'2006-01-17'); -insert into t6 values (60,'2006-01-17'); -select * from t1 order by col1; -col1 -2006-01-17 -2006-02-05 -select * from t2 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-05 -select * from t3 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-05 -select * from t4 order by colint; -colint col1 -1 2006-02-05 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -select * from t5 order by colint; -colint col1 -1 2006-02-05 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -select * from t6 order by colint; -colint col1 -1 2006-02-05 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with day(col1) -------------------------------------------------------------------------- -delete from t11 where col1='2006-01-17'; -delete from t22 where col1='2006-01-17'; -delete from t33 where col1='2006-01-17'; -delete from t44 where col1='2006-01-17'; -delete from t55 where col1='2006-01-17'; -delete from t66 where col1='2006-01-17'; -select * from t11 order by col1; -col1 -2006-02-05 -select * from t22 order by col1; -col1 -2006-01-25 -2006-02-05 -select * from t33 order by col1; -col1 -2006-01-25 -2006-02-05 -select * from t44 order by colint; -colint col1 -1 2006-02-05 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-05 -3 2006-01-25 -4 2006-02-05 -insert into t11 values ('2006-01-17'); -insert into t22 values ('2006-01-17'); -insert into t33 values ('2006-01-17'); -insert into t44 values (60,'2006-01-17'); -insert into t55 values (60,'2006-01-17'); -insert into t66 values (60,'2006-01-17'); -select * from t11 order by col1; -col1 -2006-01-17 -2006-02-05 -select * from t22 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-05 -select * from t33 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-05 -select * from t44 order by colint; -colint col1 -1 2006-02-05 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -select * from t55 order by colint; -colint col1 -1 2006-02-05 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -select * from t66 order by colint; -colint col1 -1 2006-02-05 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -------------------------- ----- some alter table end -------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -------------------------------------------------------------------------- ---- dayofmonth(col1) in partition with coltype date -------------------------------------------------------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -------------------------------------------------------------------------- ---- Create tables with dayofmonth(col1) -------------------------------------------------------------------------- -create table t1 (col1 date) engine='NDB' -partition by range(dayofmonth(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t2 (col1 date) engine='NDB' -partition by list(dayofmonth(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t3 (col1 date) engine='NDB' -partition by hash(dayofmonth(col1)); -create table t4 (colint int, col1 date) engine='NDB' -partition by range(colint) -subpartition by hash(dayofmonth(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t5 (colint int, col1 date) engine='NDB' -partition by list(colint) -subpartition by hash(dayofmonth(col1)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -create table t6 (colint int, col1 date) engine='NDB' -partition by range(colint) -(partition p0 values less than (dayofmonth('2006-12-24')), -partition p1 values less than maxvalue); -------------------------------------------------------------------------- ---- Access tables with dayofmonth(col1) -------------------------------------------------------------------------- -insert into t1 values ('2006-02-03'); -insert into t1 values ('2006-01-17'); -insert into t2 values ('2006-02-03'); -insert into t2 values ('2006-01-17'); -insert into t2 values ('2006-01-25'); -insert into t3 values ('2006-02-03'); -insert into t3 values ('2006-01-17'); -insert into t3 values ('2006-01-25'); -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t4; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t5; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t6; -select dayofmonth(col1) from t1 order by col1; -dayofmonth(col1) -17 -3 -select * from t1 order by col1; -col1 -2006-01-17 -2006-02-03 -select * from t2 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-03 -select * from t3 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-03 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -update t1 set col1='2006-02-05' where col1='2006-02-03'; -update t2 set col1='2006-02-05' where col1='2006-02-03'; -update t3 set col1='2006-02-05' where col1='2006-02-03'; -update t4 set col1='2006-02-05' where col1='2006-02-03'; -update t5 set col1='2006-02-05' where col1='2006-02-03'; -update t6 set col1='2006-02-05' where col1='2006-02-03'; -select * from t1 order by col1; -col1 -2006-01-17 -2006-02-05 -select * from t2 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-05 -select * from t3 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-05 -select * from t4 order by colint; -colint col1 -1 2006-02-05 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-05 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-05 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Alter tables with dayofmonth(col1) -------------------------------------------------------------------------- -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -create table t11 engine='NDB' as select * from t1; -create table t22 engine='NDB' as select * from t2; -create table t33 engine='NDB' as select * from t3; -create table t44 engine='NDB' as select * from t4; -create table t55 engine='NDB' as select * from t5; -create table t66 engine='NDB' as select * from t6; -alter table t11 -partition by range(dayofmonth(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t22 -partition by list(dayofmonth(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t33 -partition by hash(dayofmonth(col1)); -alter table t44 -partition by range(colint) -subpartition by hash(dayofmonth(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t55 -partition by list(colint) -subpartition by hash(dayofmonth(col1)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -alter table t66 -partition by range(colint) -(partition p0 values less than (dayofmonth('2006-12-24')), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -2006-01-17 -2006-02-05 -select * from t22 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-05 -select * from t33 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-05 -select * from t44 order by colint; -colint col1 -1 2006-02-05 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-05 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t66 order by colint; -colint col1 -1 2006-02-05 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 ---------------------------- ----- some alter table begin ---------------------------- -alter table t55 -partition by list(colint) -subpartition by hash(dayofmonth(col1)) subpartitions 4 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p1 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -show create table t55; -Table Create Table -t55 CREATE TABLE `t55` ( - `colint` int(11) DEFAULT NULL, - `col1` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (dayofmonth(col1)) -SUBPARTITIONS 4 -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) ENGINE = ndbcluster) */ -select * from t55 order by colint; -colint col1 -1 2006-02-05 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with dayofmonth(col1) -------------------------------------------------------------------------- -delete from t1 where col1='2006-01-17'; -delete from t2 where col1='2006-01-17'; -delete from t3 where col1='2006-01-17'; -delete from t4 where col1='2006-01-17'; -delete from t5 where col1='2006-01-17'; -delete from t6 where col1='2006-01-17'; -select * from t1 order by col1; -col1 -2006-02-05 -select * from t2 order by col1; -col1 -2006-01-25 -2006-02-05 -select * from t3 order by col1; -col1 -2006-01-25 -2006-02-05 -select * from t4 order by colint; -colint col1 -1 2006-02-05 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-05 -3 2006-01-25 -4 2006-02-05 -insert into t1 values ('2006-01-17'); -insert into t2 values ('2006-01-17'); -insert into t3 values ('2006-01-17'); -insert into t4 values (60,'2006-01-17'); -insert into t5 values (60,'2006-01-17'); -insert into t6 values (60,'2006-01-17'); -select * from t1 order by col1; -col1 -2006-01-17 -2006-02-05 -select * from t2 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-05 -select * from t3 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-05 -select * from t4 order by colint; -colint col1 -1 2006-02-05 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -select * from t5 order by colint; -colint col1 -1 2006-02-05 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -select * from t6 order by colint; -colint col1 -1 2006-02-05 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with dayofmonth(col1) -------------------------------------------------------------------------- -delete from t11 where col1='2006-01-17'; -delete from t22 where col1='2006-01-17'; -delete from t33 where col1='2006-01-17'; -delete from t44 where col1='2006-01-17'; -delete from t55 where col1='2006-01-17'; -delete from t66 where col1='2006-01-17'; -select * from t11 order by col1; -col1 -2006-02-05 -select * from t22 order by col1; -col1 -2006-01-25 -2006-02-05 -select * from t33 order by col1; -col1 -2006-01-25 -2006-02-05 -select * from t44 order by colint; -colint col1 -1 2006-02-05 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-05 -3 2006-01-25 -4 2006-02-05 -insert into t11 values ('2006-01-17'); -insert into t22 values ('2006-01-17'); -insert into t33 values ('2006-01-17'); -insert into t44 values (60,'2006-01-17'); -insert into t55 values (60,'2006-01-17'); -insert into t66 values (60,'2006-01-17'); -select * from t11 order by col1; -col1 -2006-01-17 -2006-02-05 -select * from t22 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-05 -select * from t33 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-05 -select * from t44 order by colint; -colint col1 -1 2006-02-05 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -select * from t55 order by colint; -colint col1 -1 2006-02-05 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -select * from t66 order by colint; -colint col1 -1 2006-02-05 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -------------------------- ----- some alter table end -------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -------------------------------------------------------------------------- ---- dayofweek(col1) in partition with coltype date -------------------------------------------------------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -------------------------------------------------------------------------- ---- Create tables with dayofweek(col1) -------------------------------------------------------------------------- -create table t1 (col1 date) engine='NDB' -partition by range(dayofweek(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t2 (col1 date) engine='NDB' -partition by list(dayofweek(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t3 (col1 date) engine='NDB' -partition by hash(dayofweek(col1)); -create table t4 (colint int, col1 date) engine='NDB' -partition by range(colint) -subpartition by hash(dayofweek(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t5 (colint int, col1 date) engine='NDB' -partition by list(colint) -subpartition by hash(dayofweek(col1)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -create table t6 (colint int, col1 date) engine='NDB' -partition by range(colint) -(partition p0 values less than (dayofweek('2006-12-24')), -partition p1 values less than maxvalue); -------------------------------------------------------------------------- ---- Access tables with dayofweek(col1) -------------------------------------------------------------------------- -insert into t1 values ('2006-01-03'); -insert into t1 values ('2006-02-17'); -insert into t2 values ('2006-01-03'); -insert into t2 values ('2006-02-17'); -insert into t2 values ('2006-01-25'); -insert into t3 values ('2006-01-03'); -insert into t3 values ('2006-02-17'); -insert into t3 values ('2006-01-25'); -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t4; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t5; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t6; -select dayofweek(col1) from t1 order by col1; -dayofweek(col1) -3 -6 -select * from t1 order by col1; -col1 -2006-01-03 -2006-02-17 -select * from t2 order by col1; -col1 -2006-01-03 -2006-01-25 -2006-02-17 -select * from t3 order by col1; -col1 -2006-01-03 -2006-01-25 -2006-02-17 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -update t1 set col1='2006-02-05' where col1='2006-01-03'; -update t2 set col1='2006-02-05' where col1='2006-01-03'; -update t3 set col1='2006-02-05' where col1='2006-01-03'; -update t4 set col1='2006-02-05' where col1='2006-01-03'; -update t5 set col1='2006-02-05' where col1='2006-01-03'; -update t6 set col1='2006-02-05' where col1='2006-01-03'; -select * from t1 order by col1; -col1 -2006-02-05 -2006-02-17 -select * from t2 order by col1; -col1 -2006-01-25 -2006-02-05 -2006-02-17 -select * from t3 order by col1; -col1 -2006-01-25 -2006-02-05 -2006-02-17 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Alter tables with dayofweek(col1) -------------------------------------------------------------------------- -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -create table t11 engine='NDB' as select * from t1; -create table t22 engine='NDB' as select * from t2; -create table t33 engine='NDB' as select * from t3; -create table t44 engine='NDB' as select * from t4; -create table t55 engine='NDB' as select * from t5; -create table t66 engine='NDB' as select * from t6; -alter table t11 -partition by range(dayofweek(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t22 -partition by list(dayofweek(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t33 -partition by hash(dayofweek(col1)); -alter table t44 -partition by range(colint) -subpartition by hash(dayofweek(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t55 -partition by list(colint) -subpartition by hash(dayofweek(col1)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -alter table t66 -partition by range(colint) -(partition p0 values less than (dayofweek('2006-12-24')), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -2006-02-05 -2006-02-17 -select * from t22 order by col1; -col1 -2006-01-25 -2006-02-05 -2006-02-17 -select * from t33 order by col1; -col1 -2006-01-25 -2006-02-05 -2006-02-17 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t66 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 ---------------------------- ----- some alter table begin ---------------------------- -alter table t55 -partition by list(colint) -subpartition by hash(dayofweek(col1)) subpartitions 4 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p1 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -show create table t55; -Table Create Table -t55 CREATE TABLE `t55` ( - `colint` int(11) DEFAULT NULL, - `col1` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (dayofweek(col1)) -SUBPARTITIONS 4 -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) ENGINE = ndbcluster) */ -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with dayofweek(col1) -------------------------------------------------------------------------- -delete from t1 where col1='2006-02-17'; -delete from t2 where col1='2006-02-17'; -delete from t3 where col1='2006-02-17'; -delete from t4 where col1='2006-02-17'; -delete from t5 where col1='2006-02-17'; -delete from t6 where col1='2006-02-17'; -select * from t1 order by col1; -col1 -2006-02-05 -select * from t2 order by col1; -col1 -2006-01-25 -2006-02-05 -select * from t3 order by col1; -col1 -2006-01-25 -2006-02-05 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -insert into t1 values ('2006-02-17'); -insert into t2 values ('2006-02-17'); -insert into t3 values ('2006-02-17'); -insert into t4 values (60,'2006-02-17'); -insert into t5 values (60,'2006-02-17'); -insert into t6 values (60,'2006-02-17'); -select * from t1 order by col1; -col1 -2006-02-05 -2006-02-17 -select * from t2 order by col1; -col1 -2006-01-25 -2006-02-05 -2006-02-17 -select * from t3 order by col1; -col1 -2006-01-25 -2006-02-05 -2006-02-17 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-02-17 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-02-17 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-02-17 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with dayofweek(col1) -------------------------------------------------------------------------- -delete from t11 where col1='2006-02-17'; -delete from t22 where col1='2006-02-17'; -delete from t33 where col1='2006-02-17'; -delete from t44 where col1='2006-02-17'; -delete from t55 where col1='2006-02-17'; -delete from t66 where col1='2006-02-17'; -select * from t11 order by col1; -col1 -2006-02-05 -select * from t22 order by col1; -col1 -2006-01-25 -2006-02-05 -select * from t33 order by col1; -col1 -2006-01-25 -2006-02-05 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -insert into t11 values ('2006-02-17'); -insert into t22 values ('2006-02-17'); -insert into t33 values ('2006-02-17'); -insert into t44 values (60,'2006-02-17'); -insert into t55 values (60,'2006-02-17'); -insert into t66 values (60,'2006-02-17'); -select * from t11 order by col1; -col1 -2006-02-05 -2006-02-17 -select * from t22 order by col1; -col1 -2006-01-25 -2006-02-05 -2006-02-17 -select * from t33 order by col1; -col1 -2006-01-25 -2006-02-05 -2006-02-17 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-02-17 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-02-17 -select * from t66 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-02-17 -------------------------- ----- some alter table end -------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -------------------------------------------------------------------------- ---- dayofyear(col1) in partition with coltype date -------------------------------------------------------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -------------------------------------------------------------------------- ---- Create tables with dayofyear(col1) -------------------------------------------------------------------------- -create table t1 (col1 date) engine='NDB' -partition by range(dayofyear(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t2 (col1 date) engine='NDB' -partition by list(dayofyear(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t3 (col1 date) engine='NDB' -partition by hash(dayofyear(col1)); -create table t4 (colint int, col1 date) engine='NDB' -partition by range(colint) -subpartition by hash(dayofyear(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t5 (colint int, col1 date) engine='NDB' -partition by list(colint) -subpartition by hash(dayofyear(col1)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -create table t6 (colint int, col1 date) engine='NDB' -partition by range(colint) -(partition p0 values less than (dayofyear('2006-12-25')), -partition p1 values less than maxvalue); -------------------------------------------------------------------------- ---- Access tables with dayofyear(col1) -------------------------------------------------------------------------- -insert into t1 values ('2006-01-03'); -insert into t1 values ('2006-01-17'); -insert into t2 values ('2006-01-03'); -insert into t2 values ('2006-01-17'); -insert into t2 values ('2006-02-25'); -insert into t3 values ('2006-01-03'); -insert into t3 values ('2006-01-17'); -insert into t3 values ('2006-02-25'); -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t4; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t5; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t6; -select dayofyear(col1) from t1 order by col1; -dayofyear(col1) -3 -17 -select * from t1 order by col1; -col1 -2006-01-03 -2006-01-17 -select * from t2 order by col1; -col1 -2006-01-03 -2006-01-17 -2006-02-25 -select * from t3 order by col1; -col1 -2006-01-03 -2006-01-17 -2006-02-25 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -update t1 set col1='2006-02-05' where col1='2006-01-03'; -update t2 set col1='2006-02-05' where col1='2006-01-03'; -update t3 set col1='2006-02-05' where col1='2006-01-03'; -update t4 set col1='2006-02-05' where col1='2006-01-03'; -update t5 set col1='2006-02-05' where col1='2006-01-03'; -update t6 set col1='2006-02-05' where col1='2006-01-03'; -select * from t1 order by col1; -col1 -2006-01-17 -2006-02-05 -select * from t2 order by col1; -col1 -2006-01-17 -2006-02-05 -2006-02-25 -select * from t3 order by col1; -col1 -2006-01-17 -2006-02-05 -2006-02-25 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Alter tables with dayofyear(col1) -------------------------------------------------------------------------- -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -create table t11 engine='NDB' as select * from t1; -create table t22 engine='NDB' as select * from t2; -create table t33 engine='NDB' as select * from t3; -create table t44 engine='NDB' as select * from t4; -create table t55 engine='NDB' as select * from t5; -create table t66 engine='NDB' as select * from t6; -alter table t11 -partition by range(dayofyear(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t22 -partition by list(dayofyear(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t33 -partition by hash(dayofyear(col1)); -alter table t44 -partition by range(colint) -subpartition by hash(dayofyear(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t55 -partition by list(colint) -subpartition by hash(dayofyear(col1)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -alter table t66 -partition by range(colint) -(partition p0 values less than (dayofyear('2006-12-25')), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -2006-01-17 -2006-02-05 -select * from t22 order by col1; -col1 -2006-01-17 -2006-02-05 -2006-02-25 -select * from t33 order by col1; -col1 -2006-01-17 -2006-02-05 -2006-02-25 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t66 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 ---------------------------- ----- some alter table begin ---------------------------- -alter table t55 -partition by list(colint) -subpartition by hash(dayofyear(col1)) subpartitions 4 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p1 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -show create table t55; -Table Create Table -t55 CREATE TABLE `t55` ( - `colint` int(11) DEFAULT NULL, - `col1` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (dayofyear(col1)) -SUBPARTITIONS 4 -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) ENGINE = ndbcluster) */ -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with dayofyear(col1) -------------------------------------------------------------------------- -delete from t1 where col1='2006-01-17'; -delete from t2 where col1='2006-01-17'; -delete from t3 where col1='2006-01-17'; -delete from t4 where col1='2006-01-17'; -delete from t5 where col1='2006-01-17'; -delete from t6 where col1='2006-01-17'; -select * from t1 order by col1; -col1 -2006-02-05 -select * from t2 order by col1; -col1 -2006-02-05 -2006-02-25 -select * from t3 order by col1; -col1 -2006-02-05 -2006-02-25 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -3 2006-01-25 -4 2006-02-05 -insert into t1 values ('2006-01-17'); -insert into t2 values ('2006-01-17'); -insert into t3 values ('2006-01-17'); -insert into t4 values (60,'2006-01-17'); -insert into t5 values (60,'2006-01-17'); -insert into t6 values (60,'2006-01-17'); -select * from t1 order by col1; -col1 -2006-01-17 -2006-02-05 -select * from t2 order by col1; -col1 -2006-01-17 -2006-02-05 -2006-02-25 -select * from t3 order by col1; -col1 -2006-01-17 -2006-02-05 -2006-02-25 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with dayofyear(col1) -------------------------------------------------------------------------- -delete from t11 where col1='2006-01-17'; -delete from t22 where col1='2006-01-17'; -delete from t33 where col1='2006-01-17'; -delete from t44 where col1='2006-01-17'; -delete from t55 where col1='2006-01-17'; -delete from t66 where col1='2006-01-17'; -select * from t11 order by col1; -col1 -2006-02-05 -select * from t22 order by col1; -col1 -2006-02-05 -2006-02-25 -select * from t33 order by col1; -col1 -2006-02-05 -2006-02-25 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -3 2006-01-25 -4 2006-02-05 -insert into t11 values ('2006-01-17'); -insert into t22 values ('2006-01-17'); -insert into t33 values ('2006-01-17'); -insert into t44 values (60,'2006-01-17'); -insert into t55 values (60,'2006-01-17'); -insert into t66 values (60,'2006-01-17'); -select * from t11 order by col1; -col1 -2006-01-17 -2006-02-05 -select * from t22 order by col1; -col1 -2006-01-17 -2006-02-05 -2006-02-25 -select * from t33 order by col1; -col1 -2006-01-17 -2006-02-05 -2006-02-25 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -select * from t66 order by colint; -colint col1 -1 2006-02-03 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -------------------------- ----- some alter table end -------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -------------------------------------------------------------------------- ---- dayofyear(col1) in partition with coltype char(30) -------------------------------------------------------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -------------------------------------------------------------------------- ---- Create tables with dayofyear(col1) -------------------------------------------------------------------------- -create table t1 (col1 char(30)) engine='NDB' -partition by range(dayofyear(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t2 (col1 char(30)) engine='NDB' -partition by list(dayofyear(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t3 (col1 char(30)) engine='NDB' -partition by hash(dayofyear(col1)); -create table t4 (colint int, col1 char(30)) engine='NDB' -partition by range(colint) -subpartition by hash(dayofyear(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t5 (colint int, col1 char(30)) engine='NDB' -partition by list(colint) -subpartition by hash(dayofyear(col1)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -create table t6 (colint int, col1 char(30)) engine='NDB' -partition by range(colint) -(partition p0 values less than (dayofyear('2006-12-25')), -partition p1 values less than maxvalue); -------------------------------------------------------------------------- ---- Access tables with dayofyear(col1) -------------------------------------------------------------------------- -insert into t1 values ('2006-01-03'); -insert into t1 values ('2006-01-17'); -insert into t2 values ('2006-01-03'); -insert into t2 values ('2006-01-17'); -insert into t2 values ('2006-02-25'); -insert into t3 values ('2006-01-03'); -insert into t3 values ('2006-01-17'); -insert into t3 values ('2006-02-25'); -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t4; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t5; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t6; -select dayofyear(col1) from t1 order by col1; -dayofyear(col1) -3 -17 -select * from t1 order by col1; -col1 -2006-01-03 -2006-01-17 -select * from t2 order by col1; -col1 -2006-01-03 -2006-01-17 -2006-02-25 -select * from t3 order by col1; -col1 -2006-01-03 -2006-01-17 -2006-02-25 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -update t1 set col1='2006-02-05' where col1='2006-01-03'; -update t2 set col1='2006-02-05' where col1='2006-01-03'; -update t3 set col1='2006-02-05' where col1='2006-01-03'; -update t4 set col1='2006-02-05' where col1='2006-01-03'; -update t5 set col1='2006-02-05' where col1='2006-01-03'; -update t6 set col1='2006-02-05' where col1='2006-01-03'; -select * from t1 order by col1; -col1 -2006-01-17 -2006-02-05 -select * from t2 order by col1; -col1 -2006-01-17 -2006-02-05 -2006-02-25 -select * from t3 order by col1; -col1 -2006-01-17 -2006-02-05 -2006-02-25 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Alter tables with dayofyear(col1) -------------------------------------------------------------------------- -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -create table t11 engine='NDB' as select * from t1; -create table t22 engine='NDB' as select * from t2; -create table t33 engine='NDB' as select * from t3; -create table t44 engine='NDB' as select * from t4; -create table t55 engine='NDB' as select * from t5; -create table t66 engine='NDB' as select * from t6; -alter table t11 -partition by range(dayofyear(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t22 -partition by list(dayofyear(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t33 -partition by hash(dayofyear(col1)); -alter table t44 -partition by range(colint) -subpartition by hash(dayofyear(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t55 -partition by list(colint) -subpartition by hash(dayofyear(col1)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -alter table t66 -partition by range(colint) -(partition p0 values less than (dayofyear('2006-12-25')), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -2006-01-17 -2006-02-05 -select * from t22 order by col1; -col1 -2006-01-17 -2006-02-05 -2006-02-25 -select * from t33 order by col1; -col1 -2006-01-17 -2006-02-05 -2006-02-25 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t66 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 ---------------------------- ----- some alter table begin ---------------------------- -alter table t55 -partition by list(colint) -subpartition by hash(dayofyear(col1)) subpartitions 4 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p1 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -show create table t55; -Table Create Table -t55 CREATE TABLE `t55` ( - `colint` int(11) DEFAULT NULL, - `col1` char(30) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (dayofyear(col1)) -SUBPARTITIONS 4 -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) ENGINE = ndbcluster) */ -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with dayofyear(col1) -------------------------------------------------------------------------- -delete from t1 where col1='2006-01-17'; -delete from t2 where col1='2006-01-17'; -delete from t3 where col1='2006-01-17'; -delete from t4 where col1='2006-01-17'; -delete from t5 where col1='2006-01-17'; -delete from t6 where col1='2006-01-17'; -select * from t1 order by col1; -col1 -2006-02-05 -select * from t2 order by col1; -col1 -2006-02-05 -2006-02-25 -select * from t3 order by col1; -col1 -2006-02-05 -2006-02-25 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -3 2006-01-25 -4 2006-02-05 -insert into t1 values ('2006-01-17'); -insert into t2 values ('2006-01-17'); -insert into t3 values ('2006-01-17'); -insert into t4 values (60,'2006-01-17'); -insert into t5 values (60,'2006-01-17'); -insert into t6 values (60,'2006-01-17'); -select * from t1 order by col1; -col1 -2006-01-17 -2006-02-05 -select * from t2 order by col1; -col1 -2006-01-17 -2006-02-05 -2006-02-25 -select * from t3 order by col1; -col1 -2006-01-17 -2006-02-05 -2006-02-25 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with dayofyear(col1) -------------------------------------------------------------------------- -delete from t11 where col1='2006-01-17'; -delete from t22 where col1='2006-01-17'; -delete from t33 where col1='2006-01-17'; -delete from t44 where col1='2006-01-17'; -delete from t55 where col1='2006-01-17'; -delete from t66 where col1='2006-01-17'; -select * from t11 order by col1; -col1 -2006-02-05 -select * from t22 order by col1; -col1 -2006-02-05 -2006-02-25 -select * from t33 order by col1; -col1 -2006-02-05 -2006-02-25 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -3 2006-01-25 -4 2006-02-05 -insert into t11 values ('2006-01-17'); -insert into t22 values ('2006-01-17'); -insert into t33 values ('2006-01-17'); -insert into t44 values (60,'2006-01-17'); -insert into t55 values (60,'2006-01-17'); -insert into t66 values (60,'2006-01-17'); -select * from t11 order by col1; -col1 -2006-01-17 -2006-02-05 -select * from t22 order by col1; -col1 -2006-01-17 -2006-02-05 -2006-02-25 -select * from t33 order by col1; -col1 -2006-01-17 -2006-02-05 -2006-02-25 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -select * from t66 order by colint; -colint col1 -1 2006-02-03 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -------------------------- ----- some alter table end -------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -------------------------------------------------------------------------- ---- extract(month from col1) in partition with coltype date -------------------------------------------------------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -------------------------------------------------------------------------- ---- Create tables with extract(month from col1) -------------------------------------------------------------------------- -create table t1 (col1 date) engine='NDB' -partition by range(extract(month from col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t2 (col1 date) engine='NDB' -partition by list(extract(month from col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t3 (col1 date) engine='NDB' -partition by hash(extract(month from col1)); -create table t4 (colint int, col1 date) engine='NDB' -partition by range(colint) -subpartition by hash(extract(month from col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t5 (colint int, col1 date) engine='NDB' -partition by list(colint) -subpartition by hash(extract(month from col1)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -create table t6 (colint int, col1 date) engine='NDB' -partition by range(colint) -(partition p0 values less than (extract(year from '1998-11-23')), -partition p1 values less than maxvalue); -------------------------------------------------------------------------- ---- Access tables with extract(month from col1) -------------------------------------------------------------------------- -insert into t1 values ('2006-01-03'); -insert into t1 values ('2006-02-17'); -insert into t2 values ('2006-01-03'); -insert into t2 values ('2006-02-17'); -insert into t2 values ('2006-01-25'); -insert into t3 values ('2006-01-03'); -insert into t3 values ('2006-02-17'); -insert into t3 values ('2006-01-25'); -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t4; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t5; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t6; -select extract(month from col1) from t1 order by col1; -extract(month from col1) -1 -2 -select * from t1 order by col1; -col1 -2006-01-03 -2006-02-17 -select * from t2 order by col1; -col1 -2006-01-03 -2006-01-25 -2006-02-17 -select * from t3 order by col1; -col1 -2006-01-03 -2006-01-25 -2006-02-17 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -update t1 set col1='2006-02-05' where col1='2006-01-03'; -update t2 set col1='2006-02-05' where col1='2006-01-03'; -update t3 set col1='2006-02-05' where col1='2006-01-03'; -update t4 set col1='2006-02-05' where col1='2006-01-03'; -update t5 set col1='2006-02-05' where col1='2006-01-03'; -update t6 set col1='2006-02-05' where col1='2006-01-03'; -select * from t1 order by col1; -col1 -2006-02-05 -2006-02-17 -select * from t2 order by col1; -col1 -2006-01-25 -2006-02-05 -2006-02-17 -select * from t3 order by col1; -col1 -2006-01-25 -2006-02-05 -2006-02-17 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Alter tables with extract(month from col1) -------------------------------------------------------------------------- -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -create table t11 engine='NDB' as select * from t1; -create table t22 engine='NDB' as select * from t2; -create table t33 engine='NDB' as select * from t3; -create table t44 engine='NDB' as select * from t4; -create table t55 engine='NDB' as select * from t5; -create table t66 engine='NDB' as select * from t6; -alter table t11 -partition by range(extract(month from col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t22 -partition by list(extract(month from col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t33 -partition by hash(extract(month from col1)); -alter table t44 -partition by range(colint) -subpartition by hash(extract(month from col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t55 -partition by list(colint) -subpartition by hash(extract(month from col1)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -alter table t66 -partition by range(colint) -(partition p0 values less than (extract(year from '1998-11-23')), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -2006-02-05 -2006-02-17 -select * from t22 order by col1; -col1 -2006-01-25 -2006-02-05 -2006-02-17 -select * from t33 order by col1; -col1 -2006-01-25 -2006-02-05 -2006-02-17 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t66 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 ---------------------------- ----- some alter table begin ---------------------------- -alter table t55 -partition by list(colint) -subpartition by hash(extract(month from col1)) subpartitions 4 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p1 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -show create table t55; -Table Create Table -t55 CREATE TABLE `t55` ( - `colint` int(11) DEFAULT NULL, - `col1` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (extract(month from col1)) -SUBPARTITIONS 4 -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) ENGINE = ndbcluster) */ -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with extract(month from col1) -------------------------------------------------------------------------- -delete from t1 where col1='2006-02-17'; -delete from t2 where col1='2006-02-17'; -delete from t3 where col1='2006-02-17'; -delete from t4 where col1='2006-02-17'; -delete from t5 where col1='2006-02-17'; -delete from t6 where col1='2006-02-17'; -select * from t1 order by col1; -col1 -2006-02-05 -select * from t2 order by col1; -col1 -2006-01-25 -2006-02-05 -select * from t3 order by col1; -col1 -2006-01-25 -2006-02-05 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -insert into t1 values ('2006-02-17'); -insert into t2 values ('2006-02-17'); -insert into t3 values ('2006-02-17'); -insert into t4 values (60,'2006-02-17'); -insert into t5 values (60,'2006-02-17'); -insert into t6 values (60,'2006-02-17'); -select * from t1 order by col1; -col1 -2006-02-05 -2006-02-17 -select * from t2 order by col1; -col1 -2006-01-25 -2006-02-05 -2006-02-17 -select * from t3 order by col1; -col1 -2006-01-25 -2006-02-05 -2006-02-17 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-02-17 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-02-17 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-02-17 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with extract(month from col1) -------------------------------------------------------------------------- -delete from t11 where col1='2006-02-17'; -delete from t22 where col1='2006-02-17'; -delete from t33 where col1='2006-02-17'; -delete from t44 where col1='2006-02-17'; -delete from t55 where col1='2006-02-17'; -delete from t66 where col1='2006-02-17'; -select * from t11 order by col1; -col1 -2006-02-05 -select * from t22 order by col1; -col1 -2006-01-25 -2006-02-05 -select * from t33 order by col1; -col1 -2006-01-25 -2006-02-05 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -insert into t11 values ('2006-02-17'); -insert into t22 values ('2006-02-17'); -insert into t33 values ('2006-02-17'); -insert into t44 values (60,'2006-02-17'); -insert into t55 values (60,'2006-02-17'); -insert into t66 values (60,'2006-02-17'); -select * from t11 order by col1; -col1 -2006-02-05 -2006-02-17 -select * from t22 order by col1; -col1 -2006-01-25 -2006-02-05 -2006-02-17 -select * from t33 order by col1; -col1 -2006-01-25 -2006-02-05 -2006-02-17 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-02-17 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-02-17 -select * from t66 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-02-17 -------------------------- ----- some alter table end -------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -------------------------------------------------------------------------- ---- hour(col1) in partition with coltype time -------------------------------------------------------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -------------------------------------------------------------------------- ---- Create tables with hour(col1) -------------------------------------------------------------------------- -create table t1 (col1 time) engine='NDB' -partition by range(hour(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t2 (col1 time) engine='NDB' -partition by list(hour(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t3 (col1 time) engine='NDB' -partition by hash(hour(col1)); -create table t4 (colint int, col1 time) engine='NDB' -partition by range(colint) -subpartition by hash(hour(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t5 (colint int, col1 time) engine='NDB' -partition by list(colint) -subpartition by hash(hour(col1)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -create table t6 (colint int, col1 time) engine='NDB' -partition by range(colint) -(partition p0 values less than (hour('18:30')), -partition p1 values less than maxvalue); -------------------------------------------------------------------------- ---- Access tables with hour(col1) -------------------------------------------------------------------------- -insert into t1 values ('09:09'); -insert into t1 values ('14:30'); -insert into t2 values ('09:09'); -insert into t2 values ('14:30'); -insert into t2 values ('21:59'); -insert into t3 values ('09:09'); -insert into t3 values ('14:30'); -insert into t3 values ('21:59'); -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t4; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t5; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t6; -select hour(col1) from t1 order by col1; -hour(col1) -9 -14 -select * from t1 order by col1; -col1 -09:09:00 -14:30:00 -select * from t2 order by col1; -col1 -09:09:00 -14:30:00 -21:59:00 -select * from t3 order by col1; -col1 -09:09:00 -14:30:00 -21:59:00 -select * from t4 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t5 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t6 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -update t1 set col1='10:30' where col1='09:09'; -update t2 set col1='10:30' where col1='09:09'; -update t3 set col1='10:30' where col1='09:09'; -update t4 set col1='10:30' where col1='09:09'; -update t5 set col1='10:30' where col1='09:09'; -update t6 set col1='10:30' where col1='09:09'; -select * from t1 order by col1; -col1 -10:30:00 -14:30:00 -select * from t2 order by col1; -col1 -10:30:00 -14:30:00 -21:59:00 -select * from t3 order by col1; -col1 -10:30:00 -14:30:00 -21:59:00 -select * from t4 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t5 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t6 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -------------------------------------------------------------------------- ---- Alter tables with hour(col1) -------------------------------------------------------------------------- -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -create table t11 engine='NDB' as select * from t1; -create table t22 engine='NDB' as select * from t2; -create table t33 engine='NDB' as select * from t3; -create table t44 engine='NDB' as select * from t4; -create table t55 engine='NDB' as select * from t5; -create table t66 engine='NDB' as select * from t6; -alter table t11 -partition by range(hour(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t22 -partition by list(hour(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t33 -partition by hash(hour(col1)); -alter table t44 -partition by range(colint) -subpartition by hash(hour(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t55 -partition by list(colint) -subpartition by hash(hour(col1)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -alter table t66 -partition by range(colint) -(partition p0 values less than (hour('18:30')), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -10:30:00 -14:30:00 -select * from t22 order by col1; -col1 -10:30:00 -14:30:00 -21:59:00 -select * from t33 order by col1; -col1 -10:30:00 -14:30:00 -21:59:00 -select * from t44 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t55 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t66 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 ---------------------------- ----- some alter table begin ---------------------------- -alter table t55 -partition by list(colint) -subpartition by hash(hour(col1)) subpartitions 4 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p1 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -show create table t55; -Table Create Table -t55 CREATE TABLE `t55` ( - `colint` int(11) DEFAULT NULL, - `col1` time DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (hour(col1)) -SUBPARTITIONS 4 -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) ENGINE = ndbcluster) */ -select * from t55 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with hour(col1) -------------------------------------------------------------------------- -delete from t1 where col1='14:30'; -delete from t2 where col1='14:30'; -delete from t3 where col1='14:30'; -delete from t4 where col1='14:30'; -delete from t5 where col1='14:30'; -delete from t6 where col1='14:30'; -select * from t1 order by col1; -col1 -10:30:00 -select * from t2 order by col1; -col1 -10:30:00 -21:59:00 -select * from t3 order by col1; -col1 -10:30:00 -21:59:00 -select * from t4 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t5 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -insert into t1 values ('14:30'); -insert into t2 values ('14:30'); -insert into t3 values ('14:30'); -insert into t4 values (60,'14:30'); -insert into t5 values (60,'14:30'); -insert into t6 values (60,'14:30'); -select * from t1 order by col1; -col1 -10:30:00 -14:30:00 -select * from t2 order by col1; -col1 -10:30:00 -14:30:00 -21:59:00 -select * from t3 order by col1; -col1 -10:30:00 -14:30:00 -21:59:00 -select * from t4 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:00 -select * from t5 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:00 -select * from t6 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:00 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with hour(col1) -------------------------------------------------------------------------- -delete from t11 where col1='14:30'; -delete from t22 where col1='14:30'; -delete from t33 where col1='14:30'; -delete from t44 where col1='14:30'; -delete from t55 where col1='14:30'; -delete from t66 where col1='14:30'; -select * from t11 order by col1; -col1 -10:30:00 -select * from t22 order by col1; -col1 -10:30:00 -21:59:00 -select * from t33 order by col1; -col1 -10:30:00 -21:59:00 -select * from t44 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t55 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -insert into t11 values ('14:30'); -insert into t22 values ('14:30'); -insert into t33 values ('14:30'); -insert into t44 values (60,'14:30'); -insert into t55 values (60,'14:30'); -insert into t66 values (60,'14:30'); -select * from t11 order by col1; -col1 -10:30:00 -14:30:00 -select * from t22 order by col1; -col1 -10:30:00 -14:30:00 -21:59:00 -select * from t33 order by col1; -col1 -10:30:00 -14:30:00 -21:59:00 -select * from t44 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:00 -select * from t55 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:00 -select * from t66 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:00 -------------------------- ----- some alter table end -------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -------------------------------------------------------------------------- ---- microsecond(col1) in partition with coltype time -------------------------------------------------------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -------------------------------------------------------------------------- ---- Create tables with microsecond(col1) -------------------------------------------------------------------------- -create table t1 (col1 time) engine='NDB' -partition by range(microsecond(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t2 (col1 time) engine='NDB' -partition by list(microsecond(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t3 (col1 time) engine='NDB' -partition by hash(microsecond(col1)); -create table t4 (colint int, col1 time) engine='NDB' -partition by range(colint) -subpartition by hash(microsecond(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t5 (colint int, col1 time) engine='NDB' -partition by list(colint) -subpartition by hash(microsecond(col1)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -create table t6 (colint int, col1 time) engine='NDB' -partition by range(colint) -(partition p0 values less than (microsecond('10:30:10.000010')), -partition p1 values less than maxvalue); -------------------------------------------------------------------------- ---- Access tables with microsecond(col1) -------------------------------------------------------------------------- -insert into t1 values ('09:09:15.000002'); -insert into t1 values ('04:30:01.000018'); -insert into t2 values ('09:09:15.000002'); -insert into t2 values ('04:30:01.000018'); -insert into t2 values ('00:59:22.000024'); -insert into t3 values ('09:09:15.000002'); -insert into t3 values ('04:30:01.000018'); -insert into t3 values ('00:59:22.000024'); -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t4; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t5; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t6; -select microsecond(col1) from t1 order by col1; -microsecond(col1) -0 -0 -select * from t1 order by col1; -col1 -04:30:01 -09:09:15 -select * from t2 order by col1; -col1 -00:59:22 -04:30:01 -09:09:15 -select * from t3 order by col1; -col1 -00:59:22 -04:30:01 -09:09:15 -select * from t4 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t5 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t6 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -update t1 set col1='05:30:34.000037' where col1='09:09:15.000002'; -update t2 set col1='05:30:34.000037' where col1='09:09:15.000002'; -update t3 set col1='05:30:34.000037' where col1='09:09:15.000002'; -update t4 set col1='05:30:34.000037' where col1='09:09:15.000002'; -update t5 set col1='05:30:34.000037' where col1='09:09:15.000002'; -update t6 set col1='05:30:34.000037' where col1='09:09:15.000002'; -select * from t1 order by col1; -col1 -04:30:01 -05:30:34 -select * from t2 order by col1; -col1 -00:59:22 -04:30:01 -05:30:34 -select * from t3 order by col1; -col1 -00:59:22 -04:30:01 -05:30:34 -select * from t4 order by colint; -colint col1 -1 05:30:34 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t5 order by colint; -colint col1 -1 05:30:34 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t6 order by colint; -colint col1 -1 05:30:34 -2 04:30:01 -3 00:59:22 -4 05:30:34 -------------------------------------------------------------------------- ---- Alter tables with microsecond(col1) -------------------------------------------------------------------------- -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -create table t11 engine='NDB' as select * from t1; -create table t22 engine='NDB' as select * from t2; -create table t33 engine='NDB' as select * from t3; -create table t44 engine='NDB' as select * from t4; -create table t55 engine='NDB' as select * from t5; -create table t66 engine='NDB' as select * from t6; -alter table t11 -partition by range(microsecond(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t22 -partition by list(microsecond(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t33 -partition by hash(microsecond(col1)); -alter table t44 -partition by range(colint) -subpartition by hash(microsecond(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t55 -partition by list(colint) -subpartition by hash(microsecond(col1)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -alter table t66 -partition by range(colint) -(partition p0 values less than (microsecond('10:30:10.000010')), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -04:30:01 -05:30:34 -select * from t22 order by col1; -col1 -00:59:22 -04:30:01 -05:30:34 -select * from t33 order by col1; -col1 -00:59:22 -04:30:01 -05:30:34 -select * from t44 order by colint; -colint col1 -1 05:30:34 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t55 order by colint; -colint col1 -1 05:30:34 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t66 order by colint; -colint col1 -1 05:30:34 -2 04:30:01 -3 00:59:22 -4 05:30:34 ---------------------------- ----- some alter table begin ---------------------------- -alter table t55 -partition by list(colint) -subpartition by hash(microsecond(col1)) subpartitions 4 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p1 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -show create table t55; -Table Create Table -t55 CREATE TABLE `t55` ( - `colint` int(11) DEFAULT NULL, - `col1` time DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (microsecond(col1)) -SUBPARTITIONS 4 -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) ENGINE = ndbcluster) */ -select * from t55 order by colint; -colint col1 -1 05:30:34 -2 04:30:01 -3 00:59:22 -4 05:30:34 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with microsecond(col1) -------------------------------------------------------------------------- -delete from t1 where col1='04:30:01.000018'; -delete from t2 where col1='04:30:01.000018'; -delete from t3 where col1='04:30:01.000018'; -delete from t4 where col1='04:30:01.000018'; -delete from t5 where col1='04:30:01.000018'; -delete from t6 where col1='04:30:01.000018'; -select * from t1 order by col1; -col1 -05:30:34 -select * from t2 order by col1; -col1 -00:59:22 -05:30:34 -select * from t3 order by col1; -col1 -00:59:22 -05:30:34 -select * from t4 order by colint; -colint col1 -1 05:30:34 -3 00:59:22 -4 05:30:34 -select * from t5 order by colint; -colint col1 -1 05:30:34 -3 00:59:22 -4 05:30:34 -insert into t1 values ('04:30:01.000018'); -insert into t2 values ('04:30:01.000018'); -insert into t3 values ('04:30:01.000018'); -insert into t4 values (60,'04:30:01.000018'); -insert into t5 values (60,'04:30:01.000018'); -insert into t6 values (60,'04:30:01.000018'); -select * from t1 order by col1; -col1 -04:30:01 -05:30:34 -select * from t2 order by col1; -col1 -00:59:22 -04:30:01 -05:30:34 -select * from t3 order by col1; -col1 -00:59:22 -04:30:01 -05:30:34 -select * from t4 order by colint; -colint col1 -1 05:30:34 -3 00:59:22 -4 05:30:34 -60 04:30:01 -select * from t5 order by colint; -colint col1 -1 05:30:34 -3 00:59:22 -4 05:30:34 -60 04:30:01 -select * from t6 order by colint; -colint col1 -1 05:30:34 -3 00:59:22 -4 05:30:34 -60 04:30:01 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with microsecond(col1) -------------------------------------------------------------------------- -delete from t11 where col1='04:30:01.000018'; -delete from t22 where col1='04:30:01.000018'; -delete from t33 where col1='04:30:01.000018'; -delete from t44 where col1='04:30:01.000018'; -delete from t55 where col1='04:30:01.000018'; -delete from t66 where col1='04:30:01.000018'; -select * from t11 order by col1; -col1 -05:30:34 -select * from t22 order by col1; -col1 -00:59:22 -05:30:34 -select * from t33 order by col1; -col1 -00:59:22 -05:30:34 -select * from t44 order by colint; -colint col1 -1 05:30:34 -3 00:59:22 -4 05:30:34 -select * from t55 order by colint; -colint col1 -1 05:30:34 -3 00:59:22 -4 05:30:34 -insert into t11 values ('04:30:01.000018'); -insert into t22 values ('04:30:01.000018'); -insert into t33 values ('04:30:01.000018'); -insert into t44 values (60,'04:30:01.000018'); -insert into t55 values (60,'04:30:01.000018'); -insert into t66 values (60,'04:30:01.000018'); -select * from t11 order by col1; -col1 -04:30:01 -05:30:34 -select * from t22 order by col1; -col1 -00:59:22 -04:30:01 -05:30:34 -select * from t33 order by col1; -col1 -00:59:22 -04:30:01 -05:30:34 -select * from t44 order by colint; -colint col1 -1 05:30:34 -3 00:59:22 -4 05:30:34 -60 04:30:01 -select * from t55 order by colint; -colint col1 -1 05:30:34 -3 00:59:22 -4 05:30:34 -60 04:30:01 -select * from t66 order by colint; -colint col1 -1 05:30:34 -3 00:59:22 -4 05:30:34 -60 04:30:01 -------------------------- ----- some alter table end -------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -------------------------------------------------------------------------- ---- minute(col1) in partition with coltype time -------------------------------------------------------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -------------------------------------------------------------------------- ---- Create tables with minute(col1) -------------------------------------------------------------------------- -create table t1 (col1 time) engine='NDB' -partition by range(minute(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t2 (col1 time) engine='NDB' -partition by list(minute(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t3 (col1 time) engine='NDB' -partition by hash(minute(col1)); -create table t4 (colint int, col1 time) engine='NDB' -partition by range(colint) -subpartition by hash(minute(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t5 (colint int, col1 time) engine='NDB' -partition by list(colint) -subpartition by hash(minute(col1)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -create table t6 (colint int, col1 time) engine='NDB' -partition by range(colint) -(partition p0 values less than (minute('18:30')), -partition p1 values less than maxvalue); -------------------------------------------------------------------------- ---- Access tables with minute(col1) -------------------------------------------------------------------------- -insert into t1 values ('09:09:15'); -insert into t1 values ('14:30:45'); -insert into t2 values ('09:09:15'); -insert into t2 values ('14:30:45'); -insert into t2 values ('21:59:22'); -insert into t3 values ('09:09:15'); -insert into t3 values ('14:30:45'); -insert into t3 values ('21:59:22'); -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t4; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t5; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t6; -select minute(col1) from t1 order by col1; -minute(col1) -9 -30 -select * from t1 order by col1; -col1 -09:09:15 -14:30:45 -select * from t2 order by col1; -col1 -09:09:15 -14:30:45 -21:59:22 -select * from t3 order by col1; -col1 -09:09:15 -14:30:45 -21:59:22 -select * from t4 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t5 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t6 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -update t1 set col1='10:24:23' where col1='09:09:15'; -update t2 set col1='10:24:23' where col1='09:09:15'; -update t3 set col1='10:24:23' where col1='09:09:15'; -update t4 set col1='10:24:23' where col1='09:09:15'; -update t5 set col1='10:24:23' where col1='09:09:15'; -update t6 set col1='10:24:23' where col1='09:09:15'; -select * from t1 order by col1; -col1 -10:24:23 -14:30:45 -select * from t2 order by col1; -col1 -10:24:23 -14:30:45 -21:59:22 -select * from t3 order by col1; -col1 -10:24:23 -14:30:45 -21:59:22 -select * from t4 order by colint; -colint col1 -1 10:24:23 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t5 order by colint; -colint col1 -1 10:24:23 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t6 order by colint; -colint col1 -1 10:24:23 -2 04:30:01 -3 00:59:22 -4 05:30:34 -------------------------------------------------------------------------- ---- Alter tables with minute(col1) -------------------------------------------------------------------------- -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -create table t11 engine='NDB' as select * from t1; -create table t22 engine='NDB' as select * from t2; -create table t33 engine='NDB' as select * from t3; -create table t44 engine='NDB' as select * from t4; -create table t55 engine='NDB' as select * from t5; -create table t66 engine='NDB' as select * from t6; -alter table t11 -partition by range(minute(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t22 -partition by list(minute(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t33 -partition by hash(minute(col1)); -alter table t44 -partition by range(colint) -subpartition by hash(minute(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t55 -partition by list(colint) -subpartition by hash(minute(col1)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -alter table t66 -partition by range(colint) -(partition p0 values less than (minute('18:30')), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -10:24:23 -14:30:45 -select * from t22 order by col1; -col1 -10:24:23 -14:30:45 -21:59:22 -select * from t33 order by col1; -col1 -10:24:23 -14:30:45 -21:59:22 -select * from t44 order by colint; -colint col1 -1 10:24:23 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t55 order by colint; -colint col1 -1 10:24:23 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t66 order by colint; -colint col1 -1 10:24:23 -2 04:30:01 -3 00:59:22 -4 05:30:34 ---------------------------- ----- some alter table begin ---------------------------- -alter table t55 -partition by list(colint) -subpartition by hash(minute(col1)) subpartitions 4 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p1 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -show create table t55; -Table Create Table -t55 CREATE TABLE `t55` ( - `colint` int(11) DEFAULT NULL, - `col1` time DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (minute(col1)) -SUBPARTITIONS 4 -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) ENGINE = ndbcluster) */ -select * from t55 order by colint; -colint col1 -1 10:24:23 -2 04:30:01 -3 00:59:22 -4 05:30:34 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with minute(col1) -------------------------------------------------------------------------- -delete from t1 where col1='14:30:45'; -delete from t2 where col1='14:30:45'; -delete from t3 where col1='14:30:45'; -delete from t4 where col1='14:30:45'; -delete from t5 where col1='14:30:45'; -delete from t6 where col1='14:30:45'; -select * from t1 order by col1; -col1 -10:24:23 -select * from t2 order by col1; -col1 -10:24:23 -21:59:22 -select * from t3 order by col1; -col1 -10:24:23 -21:59:22 -select * from t4 order by colint; -colint col1 -1 10:24:23 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t5 order by colint; -colint col1 -1 10:24:23 -2 04:30:01 -3 00:59:22 -4 05:30:34 -insert into t1 values ('14:30:45'); -insert into t2 values ('14:30:45'); -insert into t3 values ('14:30:45'); -insert into t4 values (60,'14:30:45'); -insert into t5 values (60,'14:30:45'); -insert into t6 values (60,'14:30:45'); -select * from t1 order by col1; -col1 -10:24:23 -14:30:45 -select * from t2 order by col1; -col1 -10:24:23 -14:30:45 -21:59:22 -select * from t3 order by col1; -col1 -10:24:23 -14:30:45 -21:59:22 -select * from t4 order by colint; -colint col1 -1 10:24:23 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:45 -select * from t5 order by colint; -colint col1 -1 10:24:23 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:45 -select * from t6 order by colint; -colint col1 -1 10:24:23 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:45 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with minute(col1) -------------------------------------------------------------------------- -delete from t11 where col1='14:30:45'; -delete from t22 where col1='14:30:45'; -delete from t33 where col1='14:30:45'; -delete from t44 where col1='14:30:45'; -delete from t55 where col1='14:30:45'; -delete from t66 where col1='14:30:45'; -select * from t11 order by col1; -col1 -10:24:23 -select * from t22 order by col1; -col1 -10:24:23 -21:59:22 -select * from t33 order by col1; -col1 -10:24:23 -21:59:22 -select * from t44 order by colint; -colint col1 -1 10:24:23 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t55 order by colint; -colint col1 -1 10:24:23 -2 04:30:01 -3 00:59:22 -4 05:30:34 -insert into t11 values ('14:30:45'); -insert into t22 values ('14:30:45'); -insert into t33 values ('14:30:45'); -insert into t44 values (60,'14:30:45'); -insert into t55 values (60,'14:30:45'); -insert into t66 values (60,'14:30:45'); -select * from t11 order by col1; -col1 -10:24:23 -14:30:45 -select * from t22 order by col1; -col1 -10:24:23 -14:30:45 -21:59:22 -select * from t33 order by col1; -col1 -10:24:23 -14:30:45 -21:59:22 -select * from t44 order by colint; -colint col1 -1 10:24:23 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:45 -select * from t55 order by colint; -colint col1 -1 10:24:23 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:45 -select * from t66 order by colint; -colint col1 -1 10:24:23 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:45 -------------------------- ----- some alter table end -------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -------------------------------------------------------------------------- ---- second(col1) in partition with coltype time -------------------------------------------------------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -------------------------------------------------------------------------- ---- Create tables with second(col1) -------------------------------------------------------------------------- -create table t1 (col1 time) engine='NDB' -partition by range(second(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t2 (col1 time) engine='NDB' -partition by list(second(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t3 (col1 time) engine='NDB' -partition by hash(second(col1)); -create table t4 (colint int, col1 time) engine='NDB' -partition by range(colint) -subpartition by hash(second(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t5 (colint int, col1 time) engine='NDB' -partition by list(colint) -subpartition by hash(second(col1)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -create table t6 (colint int, col1 time) engine='NDB' -partition by range(colint) -(partition p0 values less than (second('18:30:14')), -partition p1 values less than maxvalue); -------------------------------------------------------------------------- ---- Access tables with second(col1) -------------------------------------------------------------------------- -insert into t1 values ('09:09:09'); -insert into t1 values ('14:30:20'); -insert into t2 values ('09:09:09'); -insert into t2 values ('14:30:20'); -insert into t2 values ('21:59:22'); -insert into t3 values ('09:09:09'); -insert into t3 values ('14:30:20'); -insert into t3 values ('21:59:22'); -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t4; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t5; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t6; -select second(col1) from t1 order by col1; -second(col1) -9 -20 -select * from t1 order by col1; -col1 -09:09:09 -14:30:20 -select * from t2 order by col1; -col1 -09:09:09 -14:30:20 -21:59:22 -select * from t3 order by col1; -col1 -09:09:09 -14:30:20 -21:59:22 -select * from t4 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t5 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t6 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -update t1 set col1='10:22:33' where col1='09:09:09'; -update t2 set col1='10:22:33' where col1='09:09:09'; -update t3 set col1='10:22:33' where col1='09:09:09'; -update t4 set col1='10:22:33' where col1='09:09:09'; -update t5 set col1='10:22:33' where col1='09:09:09'; -update t6 set col1='10:22:33' where col1='09:09:09'; -select * from t1 order by col1; -col1 -10:22:33 -14:30:20 -select * from t2 order by col1; -col1 -10:22:33 -14:30:20 -21:59:22 -select * from t3 order by col1; -col1 -10:22:33 -14:30:20 -21:59:22 -select * from t4 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t5 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t6 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -------------------------------------------------------------------------- ---- Alter tables with second(col1) -------------------------------------------------------------------------- -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -create table t11 engine='NDB' as select * from t1; -create table t22 engine='NDB' as select * from t2; -create table t33 engine='NDB' as select * from t3; -create table t44 engine='NDB' as select * from t4; -create table t55 engine='NDB' as select * from t5; -create table t66 engine='NDB' as select * from t6; -alter table t11 -partition by range(second(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t22 -partition by list(second(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t33 -partition by hash(second(col1)); -alter table t44 -partition by range(colint) -subpartition by hash(second(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t55 -partition by list(colint) -subpartition by hash(second(col1)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -alter table t66 -partition by range(colint) -(partition p0 values less than (second('18:30:14')), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -10:22:33 -14:30:20 -select * from t22 order by col1; -col1 -10:22:33 -14:30:20 -21:59:22 -select * from t33 order by col1; -col1 -10:22:33 -14:30:20 -21:59:22 -select * from t44 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t55 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t66 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 ---------------------------- ----- some alter table begin ---------------------------- -alter table t55 -partition by list(colint) -subpartition by hash(second(col1)) subpartitions 4 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p1 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -show create table t55; -Table Create Table -t55 CREATE TABLE `t55` ( - `colint` int(11) DEFAULT NULL, - `col1` time DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (second(col1)) -SUBPARTITIONS 4 -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) ENGINE = ndbcluster) */ -select * from t55 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with second(col1) -------------------------------------------------------------------------- -delete from t1 where col1='14:30:20'; -delete from t2 where col1='14:30:20'; -delete from t3 where col1='14:30:20'; -delete from t4 where col1='14:30:20'; -delete from t5 where col1='14:30:20'; -delete from t6 where col1='14:30:20'; -select * from t1 order by col1; -col1 -10:22:33 -select * from t2 order by col1; -col1 -10:22:33 -21:59:22 -select * from t3 order by col1; -col1 -10:22:33 -21:59:22 -select * from t4 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t5 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -insert into t1 values ('14:30:20'); -insert into t2 values ('14:30:20'); -insert into t3 values ('14:30:20'); -insert into t4 values (60,'14:30:20'); -insert into t5 values (60,'14:30:20'); -insert into t6 values (60,'14:30:20'); -select * from t1 order by col1; -col1 -10:22:33 -14:30:20 -select * from t2 order by col1; -col1 -10:22:33 -14:30:20 -21:59:22 -select * from t3 order by col1; -col1 -10:22:33 -14:30:20 -21:59:22 -select * from t4 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:20 -select * from t5 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:20 -select * from t6 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:20 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with second(col1) -------------------------------------------------------------------------- -delete from t11 where col1='14:30:20'; -delete from t22 where col1='14:30:20'; -delete from t33 where col1='14:30:20'; -delete from t44 where col1='14:30:20'; -delete from t55 where col1='14:30:20'; -delete from t66 where col1='14:30:20'; -select * from t11 order by col1; -col1 -10:22:33 -select * from t22 order by col1; -col1 -10:22:33 -21:59:22 -select * from t33 order by col1; -col1 -10:22:33 -21:59:22 -select * from t44 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t55 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -insert into t11 values ('14:30:20'); -insert into t22 values ('14:30:20'); -insert into t33 values ('14:30:20'); -insert into t44 values (60,'14:30:20'); -insert into t55 values (60,'14:30:20'); -insert into t66 values (60,'14:30:20'); -select * from t11 order by col1; -col1 -10:22:33 -14:30:20 -select * from t22 order by col1; -col1 -10:22:33 -14:30:20 -21:59:22 -select * from t33 order by col1; -col1 -10:22:33 -14:30:20 -21:59:22 -select * from t44 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:20 -select * from t55 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:20 -select * from t66 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:20 -------------------------- ----- some alter table end -------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -------------------------------------------------------------------------- ---- second(col1) in partition with coltype char(30) -------------------------------------------------------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -------------------------------------------------------------------------- ---- Create tables with second(col1) -------------------------------------------------------------------------- -create table t1 (col1 char(30)) engine='NDB' -partition by range(second(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t2 (col1 char(30)) engine='NDB' -partition by list(second(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t3 (col1 char(30)) engine='NDB' -partition by hash(second(col1)); -create table t4 (colint int, col1 char(30)) engine='NDB' -partition by range(colint) -subpartition by hash(second(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t5 (colint int, col1 char(30)) engine='NDB' -partition by list(colint) -subpartition by hash(second(col1)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -create table t6 (colint int, col1 char(30)) engine='NDB' -partition by range(colint) -(partition p0 values less than (second('18:30:14')), -partition p1 values less than maxvalue); -------------------------------------------------------------------------- ---- Access tables with second(col1) -------------------------------------------------------------------------- -insert into t1 values ('09:09:09'); -insert into t1 values ('14:30:20'); -insert into t2 values ('09:09:09'); -insert into t2 values ('14:30:20'); -insert into t2 values ('21:59:22'); -insert into t3 values ('09:09:09'); -insert into t3 values ('14:30:20'); -insert into t3 values ('21:59:22'); -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t4; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t5; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t6; -select second(col1) from t1 order by col1; -second(col1) -9 -20 -select * from t1 order by col1; -col1 -09:09:09 -14:30:20 -select * from t2 order by col1; -col1 -09:09:09 -14:30:20 -21:59:22 -select * from t3 order by col1; -col1 -09:09:09 -14:30:20 -21:59:22 -select * from t4 order by colint; -colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 -select * from t5 order by colint; -colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 -select * from t6 order by colint; -colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 -update t1 set col1='10:22:33' where col1='09:09:09'; -update t2 set col1='10:22:33' where col1='09:09:09'; -update t3 set col1='10:22:33' where col1='09:09:09'; -update t4 set col1='10:22:33' where col1='09:09:09'; -update t5 set col1='10:22:33' where col1='09:09:09'; -update t6 set col1='10:22:33' where col1='09:09:09'; -select * from t1 order by col1; -col1 -10:22:33 -14:30:20 -select * from t2 order by col1; -col1 -10:22:33 -14:30:20 -21:59:22 -select * from t3 order by col1; -col1 -10:22:33 -14:30:20 -21:59:22 -select * from t4 order by colint; -colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 -select * from t5 order by colint; -colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 -select * from t6 order by colint; -colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 -------------------------------------------------------------------------- ---- Alter tables with second(col1) -------------------------------------------------------------------------- -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -create table t11 engine='NDB' as select * from t1; -create table t22 engine='NDB' as select * from t2; -create table t33 engine='NDB' as select * from t3; -create table t44 engine='NDB' as select * from t4; -create table t55 engine='NDB' as select * from t5; -create table t66 engine='NDB' as select * from t6; -alter table t11 -partition by range(second(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t22 -partition by list(second(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t33 -partition by hash(second(col1)); -alter table t44 -partition by range(colint) -subpartition by hash(second(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t55 -partition by list(colint) -subpartition by hash(second(col1)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -alter table t66 -partition by range(colint) -(partition p0 values less than (second('18:30:14')), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -10:22:33 -14:30:20 -select * from t22 order by col1; -col1 -10:22:33 -14:30:20 -21:59:22 -select * from t33 order by col1; -col1 -10:22:33 -14:30:20 -21:59:22 -select * from t44 order by colint; -colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 -select * from t55 order by colint; -colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 -select * from t66 order by colint; -colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 ---------------------------- ----- some alter table begin ---------------------------- -alter table t55 -partition by list(colint) -subpartition by hash(second(col1)) subpartitions 4 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p1 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -show create table t55; -Table Create Table -t55 CREATE TABLE `t55` ( - `colint` int(11) DEFAULT NULL, - `col1` char(30) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (second(col1)) -SUBPARTITIONS 4 -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) ENGINE = ndbcluster) */ -select * from t55 order by colint; -colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with second(col1) -------------------------------------------------------------------------- -delete from t1 where col1='14:30:20'; -delete from t2 where col1='14:30:20'; -delete from t3 where col1='14:30:20'; -delete from t4 where col1='14:30:20'; -delete from t5 where col1='14:30:20'; -delete from t6 where col1='14:30:20'; -select * from t1 order by col1; -col1 -10:22:33 -select * from t2 order by col1; -col1 -10:22:33 -21:59:22 -select * from t3 order by col1; -col1 -10:22:33 -21:59:22 -select * from t4 order by colint; -colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 -select * from t5 order by colint; -colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 -insert into t1 values ('14:30:20'); -insert into t2 values ('14:30:20'); -insert into t3 values ('14:30:20'); -insert into t4 values (60,'14:30:20'); -insert into t5 values (60,'14:30:20'); -insert into t6 values (60,'14:30:20'); -select * from t1 order by col1; -col1 -10:22:33 -14:30:20 -select * from t2 order by col1; -col1 -10:22:33 -14:30:20 -21:59:22 -select * from t3 order by col1; -col1 -10:22:33 -14:30:20 -21:59:22 -select * from t4 order by colint; -colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 -60 14:30:20 -select * from t5 order by colint; -colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 -60 14:30:20 -select * from t6 order by colint; -colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 -60 14:30:20 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with second(col1) -------------------------------------------------------------------------- -delete from t11 where col1='14:30:20'; -delete from t22 where col1='14:30:20'; -delete from t33 where col1='14:30:20'; -delete from t44 where col1='14:30:20'; -delete from t55 where col1='14:30:20'; -delete from t66 where col1='14:30:20'; -select * from t11 order by col1; -col1 -10:22:33 -select * from t22 order by col1; -col1 -10:22:33 -21:59:22 -select * from t33 order by col1; -col1 -10:22:33 -21:59:22 -select * from t44 order by colint; -colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 -select * from t55 order by colint; -colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 -insert into t11 values ('14:30:20'); -insert into t22 values ('14:30:20'); -insert into t33 values ('14:30:20'); -insert into t44 values (60,'14:30:20'); -insert into t55 values (60,'14:30:20'); -insert into t66 values (60,'14:30:20'); -select * from t11 order by col1; -col1 -10:22:33 -14:30:20 -select * from t22 order by col1; -col1 -10:22:33 -14:30:20 -21:59:22 -select * from t33 order by col1; -col1 -10:22:33 -14:30:20 -21:59:22 -select * from t44 order by colint; -colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 -60 14:30:20 -select * from t55 order by colint; -colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 -60 14:30:20 -select * from t66 order by colint; -colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 -60 14:30:20 -------------------------- ----- some alter table end -------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -------------------------------------------------------------------------- ---- month(col1) in partition with coltype date -------------------------------------------------------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -------------------------------------------------------------------------- ---- Create tables with month(col1) -------------------------------------------------------------------------- -create table t1 (col1 date) engine='NDB' -partition by range(month(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t2 (col1 date) engine='NDB' -partition by list(month(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t3 (col1 date) engine='NDB' -partition by hash(month(col1)); -create table t4 (colint int, col1 date) engine='NDB' -partition by range(colint) -subpartition by hash(month(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t5 (colint int, col1 date) engine='NDB' -partition by list(colint) -subpartition by hash(month(col1)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -create table t6 (colint int, col1 date) engine='NDB' -partition by range(colint) -(partition p0 values less than (month('2006-10-14')), -partition p1 values less than maxvalue); -------------------------------------------------------------------------- ---- Access tables with month(col1) -------------------------------------------------------------------------- -insert into t1 values ('2006-01-03'); -insert into t1 values ('2006-12-17'); -insert into t2 values ('2006-01-03'); -insert into t2 values ('2006-12-17'); -insert into t2 values ('2006-05-25'); -insert into t3 values ('2006-01-03'); -insert into t3 values ('2006-12-17'); -insert into t3 values ('2006-05-25'); -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t4; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t5; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t6; -select month(col1) from t1 order by col1; -month(col1) -1 -12 -select * from t1 order by col1; -col1 -2006-01-03 -2006-12-17 -select * from t2 order by col1; -col1 -2006-01-03 -2006-05-25 -2006-12-17 -select * from t3 order by col1; -col1 -2006-01-03 -2006-05-25 -2006-12-17 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -update t1 set col1='2006-11-06' where col1='2006-01-03'; -update t2 set col1='2006-11-06' where col1='2006-01-03'; -update t3 set col1='2006-11-06' where col1='2006-01-03'; -update t4 set col1='2006-11-06' where col1='2006-01-03'; -update t5 set col1='2006-11-06' where col1='2006-01-03'; -update t6 set col1='2006-11-06' where col1='2006-01-03'; -select * from t1 order by col1; -col1 -2006-11-06 -2006-12-17 -select * from t2 order by col1; -col1 -2006-05-25 -2006-11-06 -2006-12-17 -select * from t3 order by col1; -col1 -2006-05-25 -2006-11-06 -2006-12-17 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Alter tables with month(col1) -------------------------------------------------------------------------- -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -create table t11 engine='NDB' as select * from t1; -create table t22 engine='NDB' as select * from t2; -create table t33 engine='NDB' as select * from t3; -create table t44 engine='NDB' as select * from t4; -create table t55 engine='NDB' as select * from t5; -create table t66 engine='NDB' as select * from t6; -alter table t11 -partition by range(month(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t22 -partition by list(month(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t33 -partition by hash(month(col1)); -alter table t44 -partition by range(colint) -subpartition by hash(month(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t55 -partition by list(colint) -subpartition by hash(month(col1)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -alter table t66 -partition by range(colint) -(partition p0 values less than (month('2006-10-14')), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -2006-11-06 -2006-12-17 -select * from t22 order by col1; -col1 -2006-05-25 -2006-11-06 -2006-12-17 -select * from t33 order by col1; -col1 -2006-05-25 -2006-11-06 -2006-12-17 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t66 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 ---------------------------- ----- some alter table begin ---------------------------- -alter table t55 -partition by list(colint) -subpartition by hash(month(col1)) subpartitions 4 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p1 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -show create table t55; -Table Create Table -t55 CREATE TABLE `t55` ( - `colint` int(11) DEFAULT NULL, - `col1` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (month(col1)) -SUBPARTITIONS 4 -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) ENGINE = ndbcluster) */ -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with month(col1) -------------------------------------------------------------------------- -delete from t1 where col1='2006-12-17'; -delete from t2 where col1='2006-12-17'; -delete from t3 where col1='2006-12-17'; -delete from t4 where col1='2006-12-17'; -delete from t5 where col1='2006-12-17'; -delete from t6 where col1='2006-12-17'; -select * from t1 order by col1; -col1 -2006-11-06 -select * from t2 order by col1; -col1 -2006-05-25 -2006-11-06 -select * from t3 order by col1; -col1 -2006-05-25 -2006-11-06 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -insert into t1 values ('2006-12-17'); -insert into t2 values ('2006-12-17'); -insert into t3 values ('2006-12-17'); -insert into t4 values (60,'2006-12-17'); -insert into t5 values (60,'2006-12-17'); -insert into t6 values (60,'2006-12-17'); -select * from t1 order by col1; -col1 -2006-11-06 -2006-12-17 -select * from t2 order by col1; -col1 -2006-05-25 -2006-11-06 -2006-12-17 -select * from t3 order by col1; -col1 -2006-05-25 -2006-11-06 -2006-12-17 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-12-17 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-12-17 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-12-17 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with month(col1) -------------------------------------------------------------------------- -delete from t11 where col1='2006-12-17'; -delete from t22 where col1='2006-12-17'; -delete from t33 where col1='2006-12-17'; -delete from t44 where col1='2006-12-17'; -delete from t55 where col1='2006-12-17'; -delete from t66 where col1='2006-12-17'; -select * from t11 order by col1; -col1 -2006-11-06 -select * from t22 order by col1; -col1 -2006-05-25 -2006-11-06 -select * from t33 order by col1; -col1 -2006-05-25 -2006-11-06 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -insert into t11 values ('2006-12-17'); -insert into t22 values ('2006-12-17'); -insert into t33 values ('2006-12-17'); -insert into t44 values (60,'2006-12-17'); -insert into t55 values (60,'2006-12-17'); -insert into t66 values (60,'2006-12-17'); -select * from t11 order by col1; -col1 -2006-11-06 -2006-12-17 -select * from t22 order by col1; -col1 -2006-05-25 -2006-11-06 -2006-12-17 -select * from t33 order by col1; -col1 -2006-05-25 -2006-11-06 -2006-12-17 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-12-17 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-12-17 -select * from t66 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-12-17 -------------------------- ----- some alter table end -------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -------------------------------------------------------------------------- ---- quarter(col1) in partition with coltype date -------------------------------------------------------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -------------------------------------------------------------------------- ---- Create tables with quarter(col1) -------------------------------------------------------------------------- -create table t1 (col1 date) engine='NDB' -partition by range(quarter(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t2 (col1 date) engine='NDB' -partition by list(quarter(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t3 (col1 date) engine='NDB' -partition by hash(quarter(col1)); -create table t4 (colint int, col1 date) engine='NDB' -partition by range(colint) -subpartition by hash(quarter(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t5 (colint int, col1 date) engine='NDB' -partition by list(colint) -subpartition by hash(quarter(col1)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -create table t6 (colint int, col1 date) engine='NDB' -partition by range(colint) -(partition p0 values less than (quarter('2006-10-14')), -partition p1 values less than maxvalue); -------------------------------------------------------------------------- ---- Access tables with quarter(col1) -------------------------------------------------------------------------- -insert into t1 values ('2006-01-03'); -insert into t1 values ('2006-12-17'); -insert into t2 values ('2006-01-03'); -insert into t2 values ('2006-12-17'); -insert into t2 values ('2006-09-25'); -insert into t3 values ('2006-01-03'); -insert into t3 values ('2006-12-17'); -insert into t3 values ('2006-09-25'); -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t4; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t5; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t6; -select quarter(col1) from t1 order by col1; -quarter(col1) -1 -4 -select * from t1 order by col1; -col1 -2006-01-03 -2006-12-17 -select * from t2 order by col1; -col1 -2006-01-03 -2006-09-25 -2006-12-17 -select * from t3 order by col1; -col1 -2006-01-03 -2006-09-25 -2006-12-17 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -update t1 set col1='2006-07-30' where col1='2006-01-03'; -update t2 set col1='2006-07-30' where col1='2006-01-03'; -update t3 set col1='2006-07-30' where col1='2006-01-03'; -update t4 set col1='2006-07-30' where col1='2006-01-03'; -update t5 set col1='2006-07-30' where col1='2006-01-03'; -update t6 set col1='2006-07-30' where col1='2006-01-03'; -select * from t1 order by col1; -col1 -2006-07-30 -2006-12-17 -select * from t2 order by col1; -col1 -2006-07-30 -2006-09-25 -2006-12-17 -select * from t3 order by col1; -col1 -2006-07-30 -2006-09-25 -2006-12-17 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Alter tables with quarter(col1) -------------------------------------------------------------------------- -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -create table t11 engine='NDB' as select * from t1; -create table t22 engine='NDB' as select * from t2; -create table t33 engine='NDB' as select * from t3; -create table t44 engine='NDB' as select * from t4; -create table t55 engine='NDB' as select * from t5; -create table t66 engine='NDB' as select * from t6; -alter table t11 -partition by range(quarter(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t22 -partition by list(quarter(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t33 -partition by hash(quarter(col1)); -alter table t44 -partition by range(colint) -subpartition by hash(quarter(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t55 -partition by list(colint) -subpartition by hash(quarter(col1)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -alter table t66 -partition by range(colint) -(partition p0 values less than (quarter('2006-10-14')), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -2006-07-30 -2006-12-17 -select * from t22 order by col1; -col1 -2006-07-30 -2006-09-25 -2006-12-17 -select * from t33 order by col1; -col1 -2006-07-30 -2006-09-25 -2006-12-17 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t66 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 ---------------------------- ----- some alter table begin ---------------------------- -alter table t55 -partition by list(colint) -subpartition by hash(quarter(col1)) subpartitions 4 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p1 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -show create table t55; -Table Create Table -t55 CREATE TABLE `t55` ( - `colint` int(11) DEFAULT NULL, - `col1` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (quarter(col1)) -SUBPARTITIONS 4 -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) ENGINE = ndbcluster) */ -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with quarter(col1) -------------------------------------------------------------------------- -delete from t1 where col1='2006-12-17'; -delete from t2 where col1='2006-12-17'; -delete from t3 where col1='2006-12-17'; -delete from t4 where col1='2006-12-17'; -delete from t5 where col1='2006-12-17'; -delete from t6 where col1='2006-12-17'; -select * from t1 order by col1; -col1 -2006-07-30 -select * from t2 order by col1; -col1 -2006-07-30 -2006-09-25 -select * from t3 order by col1; -col1 -2006-07-30 -2006-09-25 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -insert into t1 values ('2006-12-17'); -insert into t2 values ('2006-12-17'); -insert into t3 values ('2006-12-17'); -insert into t4 values (60,'2006-12-17'); -insert into t5 values (60,'2006-12-17'); -insert into t6 values (60,'2006-12-17'); -select * from t1 order by col1; -col1 -2006-07-30 -2006-12-17 -select * from t2 order by col1; -col1 -2006-07-30 -2006-09-25 -2006-12-17 -select * from t3 order by col1; -col1 -2006-07-30 -2006-09-25 -2006-12-17 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-12-17 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-12-17 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-12-17 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with quarter(col1) -------------------------------------------------------------------------- -delete from t11 where col1='2006-12-17'; -delete from t22 where col1='2006-12-17'; -delete from t33 where col1='2006-12-17'; -delete from t44 where col1='2006-12-17'; -delete from t55 where col1='2006-12-17'; -delete from t66 where col1='2006-12-17'; -select * from t11 order by col1; -col1 -2006-07-30 -select * from t22 order by col1; -col1 -2006-07-30 -2006-09-25 -select * from t33 order by col1; -col1 -2006-07-30 -2006-09-25 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -insert into t11 values ('2006-12-17'); -insert into t22 values ('2006-12-17'); -insert into t33 values ('2006-12-17'); -insert into t44 values (60,'2006-12-17'); -insert into t55 values (60,'2006-12-17'); -insert into t66 values (60,'2006-12-17'); -select * from t11 order by col1; -col1 -2006-07-30 -2006-12-17 -select * from t22 order by col1; -col1 -2006-07-30 -2006-09-25 -2006-12-17 -select * from t33 order by col1; -col1 -2006-07-30 -2006-09-25 -2006-12-17 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-12-17 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-12-17 -select * from t66 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-12-17 -------------------------- ----- some alter table end -------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -------------------------------------------------------------------------- ---- time_to_sec(col1)-(time_to_sec(col1)-20) in partition with coltype time -------------------------------------------------------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -------------------------------------------------------------------------- ---- Create tables with time_to_sec(col1)-(time_to_sec(col1)-20) -------------------------------------------------------------------------- -create table t1 (col1 time) engine='NDB' -partition by range(time_to_sec(col1)-(time_to_sec(col1)-20)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t2 (col1 time) engine='NDB' -partition by list(time_to_sec(col1)-(time_to_sec(col1)-20)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t3 (col1 time) engine='NDB' -partition by hash(time_to_sec(col1)-(time_to_sec(col1)-20)); -create table t4 (colint int, col1 time) engine='NDB' -partition by range(colint) -subpartition by hash(time_to_sec(col1)-(time_to_sec(col1)-20)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t5 (colint int, col1 time) engine='NDB' -partition by list(colint) -subpartition by hash(time_to_sec(col1)-(time_to_sec(col1)-20)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -create table t6 (colint int, col1 time) engine='NDB' -partition by range(colint) -(partition p0 values less than (time_to_sec('18:30:14')-(time_to_sec('17:59:59'))), -partition p1 values less than maxvalue); -------------------------------------------------------------------------- ---- Access tables with time_to_sec(col1)-(time_to_sec(col1)-20) -------------------------------------------------------------------------- -insert into t1 values ('09:09:15'); -insert into t1 values ('14:30:45'); -insert into t2 values ('09:09:15'); -insert into t2 values ('14:30:45'); -insert into t2 values ('21:59:22'); -insert into t3 values ('09:09:15'); -insert into t3 values ('14:30:45'); -insert into t3 values ('21:59:22'); -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t4; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t5; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t6; -select time_to_sec(col1)-(time_to_sec(col1)-20) from t1 order by col1; -time_to_sec(col1)-(time_to_sec(col1)-20) -20 -20 -select * from t1 order by col1; -col1 -09:09:15 -14:30:45 -select * from t2 order by col1; -col1 -09:09:15 -14:30:45 -21:59:22 -select * from t3 order by col1; -col1 -09:09:15 -14:30:45 -21:59:22 -select * from t4 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t5 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t6 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -update t1 set col1='10:33:11' where col1='09:09:15'; -update t2 set col1='10:33:11' where col1='09:09:15'; -update t3 set col1='10:33:11' where col1='09:09:15'; -update t4 set col1='10:33:11' where col1='09:09:15'; -update t5 set col1='10:33:11' where col1='09:09:15'; -update t6 set col1='10:33:11' where col1='09:09:15'; -select * from t1 order by col1; -col1 -10:33:11 -14:30:45 -select * from t2 order by col1; -col1 -10:33:11 -14:30:45 -21:59:22 -select * from t3 order by col1; -col1 -10:33:11 -14:30:45 -21:59:22 -select * from t4 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t5 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t6 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -------------------------------------------------------------------------- ---- Alter tables with time_to_sec(col1)-(time_to_sec(col1)-20) -------------------------------------------------------------------------- -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -create table t11 engine='NDB' as select * from t1; -create table t22 engine='NDB' as select * from t2; -create table t33 engine='NDB' as select * from t3; -create table t44 engine='NDB' as select * from t4; -create table t55 engine='NDB' as select * from t5; -create table t66 engine='NDB' as select * from t6; -alter table t11 -partition by range(time_to_sec(col1)-(time_to_sec(col1)-20)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t22 -partition by list(time_to_sec(col1)-(time_to_sec(col1)-20)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t33 -partition by hash(time_to_sec(col1)-(time_to_sec(col1)-20)); -alter table t44 -partition by range(colint) -subpartition by hash(time_to_sec(col1)-(time_to_sec(col1)-20)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t55 -partition by list(colint) -subpartition by hash(time_to_sec(col1)-(time_to_sec(col1)-20)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -alter table t66 -partition by range(colint) -(partition p0 values less than (time_to_sec('18:30:14')-(time_to_sec('17:59:59'))), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -10:33:11 -14:30:45 -select * from t22 order by col1; -col1 -10:33:11 -14:30:45 -21:59:22 -select * from t33 order by col1; -col1 -10:33:11 -14:30:45 -21:59:22 -select * from t44 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t55 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t66 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 ---------------------------- ----- some alter table begin ---------------------------- -alter table t55 -partition by list(colint) -subpartition by hash(time_to_sec(col1)-(time_to_sec(col1)-20)) subpartitions 4 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p1 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -show create table t55; -Table Create Table -t55 CREATE TABLE `t55` ( - `colint` int(11) DEFAULT NULL, - `col1` time DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (time_to_sec(col1)-(time_to_sec(col1)-20)) -SUBPARTITIONS 4 -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) ENGINE = ndbcluster) */ -select * from t55 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with time_to_sec(col1)-(time_to_sec(col1)-20) -------------------------------------------------------------------------- -delete from t1 where col1='14:30:45'; -delete from t2 where col1='14:30:45'; -delete from t3 where col1='14:30:45'; -delete from t4 where col1='14:30:45'; -delete from t5 where col1='14:30:45'; -delete from t6 where col1='14:30:45'; -select * from t1 order by col1; -col1 -10:33:11 -select * from t2 order by col1; -col1 -10:33:11 -21:59:22 -select * from t3 order by col1; -col1 -10:33:11 -21:59:22 -select * from t4 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t5 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -insert into t1 values ('14:30:45'); -insert into t2 values ('14:30:45'); -insert into t3 values ('14:30:45'); -insert into t4 values (60,'14:30:45'); -insert into t5 values (60,'14:30:45'); -insert into t6 values (60,'14:30:45'); -select * from t1 order by col1; -col1 -10:33:11 -14:30:45 -select * from t2 order by col1; -col1 -10:33:11 -14:30:45 -21:59:22 -select * from t3 order by col1; -col1 -10:33:11 -14:30:45 -21:59:22 -select * from t4 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:45 -select * from t5 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:45 -select * from t6 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:45 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with time_to_sec(col1)-(time_to_sec(col1)-20) -------------------------------------------------------------------------- -delete from t11 where col1='14:30:45'; -delete from t22 where col1='14:30:45'; -delete from t33 where col1='14:30:45'; -delete from t44 where col1='14:30:45'; -delete from t55 where col1='14:30:45'; -delete from t66 where col1='14:30:45'; -select * from t11 order by col1; -col1 -10:33:11 -select * from t22 order by col1; -col1 -10:33:11 -21:59:22 -select * from t33 order by col1; -col1 -10:33:11 -21:59:22 -select * from t44 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t55 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -insert into t11 values ('14:30:45'); -insert into t22 values ('14:30:45'); -insert into t33 values ('14:30:45'); -insert into t44 values (60,'14:30:45'); -insert into t55 values (60,'14:30:45'); -insert into t66 values (60,'14:30:45'); -select * from t11 order by col1; -col1 -10:33:11 -14:30:45 -select * from t22 order by col1; -col1 -10:33:11 -14:30:45 -21:59:22 -select * from t33 order by col1; -col1 -10:33:11 -14:30:45 -21:59:22 -select * from t44 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:45 -select * from t55 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:45 -select * from t66 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:45 -------------------------- ----- some alter table end -------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -------------------------------------------------------------------------- ---- to_days(col1)-to_days('2006-01-01') in partition with coltype date -------------------------------------------------------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -------------------------------------------------------------------------- ---- Create tables with to_days(col1)-to_days('2006-01-01') -------------------------------------------------------------------------- -create table t1 (col1 date) engine='NDB' -partition by range(to_days(col1)-to_days('2006-01-01')) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t2 (col1 date) engine='NDB' -partition by list(to_days(col1)-to_days('2006-01-01')) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t3 (col1 date) engine='NDB' -partition by hash(to_days(col1)-to_days('2006-01-01')); -create table t4 (colint int, col1 date) engine='NDB' -partition by range(colint) -subpartition by hash(to_days(col1)-to_days('2006-01-01')) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t5 (colint int, col1 date) engine='NDB' -partition by list(colint) -subpartition by hash(to_days(col1)-to_days('2006-01-01')) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -create table t6 (colint int, col1 date) engine='NDB' -partition by range(colint) -(partition p0 values less than (to_days('2006-02-02')-to_days('2006-01-01')), -partition p1 values less than maxvalue); -------------------------------------------------------------------------- ---- Access tables with to_days(col1)-to_days('2006-01-01') -------------------------------------------------------------------------- -insert into t1 values ('2006-02-03'); -insert into t1 values ('2006-01-17'); -insert into t2 values ('2006-02-03'); -insert into t2 values ('2006-01-17'); -insert into t2 values ('2006-01-25'); -insert into t3 values ('2006-02-03'); -insert into t3 values ('2006-01-17'); -insert into t3 values ('2006-01-25'); -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t4; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t5; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t6; -select to_days(col1)-to_days('2006-01-01') from t1 order by col1; -to_days(col1)-to_days('2006-01-01') -16 -33 -select * from t1 order by col1; -col1 -2006-01-17 -2006-02-03 -select * from t2 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-03 -select * from t3 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-03 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -update t1 set col1='2006-02-06' where col1='2006-02-03'; -update t2 set col1='2006-02-06' where col1='2006-02-03'; -update t3 set col1='2006-02-06' where col1='2006-02-03'; -update t4 set col1='2006-02-06' where col1='2006-02-03'; -update t5 set col1='2006-02-06' where col1='2006-02-03'; -update t6 set col1='2006-02-06' where col1='2006-02-03'; -select * from t1 order by col1; -col1 -2006-01-17 -2006-02-06 -select * from t2 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-06 -select * from t3 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-06 -select * from t4 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Alter tables with to_days(col1)-to_days('2006-01-01') -------------------------------------------------------------------------- -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -create table t11 engine='NDB' as select * from t1; -create table t22 engine='NDB' as select * from t2; -create table t33 engine='NDB' as select * from t3; -create table t44 engine='NDB' as select * from t4; -create table t55 engine='NDB' as select * from t5; -create table t66 engine='NDB' as select * from t6; -alter table t11 -partition by range(to_days(col1)-to_days('2006-01-01')) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t22 -partition by list(to_days(col1)-to_days('2006-01-01')) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t33 -partition by hash(to_days(col1)-to_days('2006-01-01')); -alter table t44 -partition by range(colint) -subpartition by hash(to_days(col1)-to_days('2006-01-01')) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t55 -partition by list(colint) -subpartition by hash(to_days(col1)-to_days('2006-01-01')) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -alter table t66 -partition by range(colint) -(partition p0 values less than (to_days('2006-02-02')-to_days('2006-01-01')), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -2006-01-17 -2006-02-06 -select * from t22 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-06 -select * from t33 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-06 -select * from t44 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t66 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 ---------------------------- ----- some alter table begin ---------------------------- -alter table t55 -partition by list(colint) -subpartition by hash(to_days(col1)-to_days('2006-01-01')) subpartitions 4 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p1 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -show create table t55; -Table Create Table -t55 CREATE TABLE `t55` ( - `colint` int(11) DEFAULT NULL, - `col1` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (to_days(col1)-to_days('2006-01-01')) -SUBPARTITIONS 4 -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) ENGINE = ndbcluster) */ -select * from t55 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with to_days(col1)-to_days('2006-01-01') -------------------------------------------------------------------------- -delete from t1 where col1='2006-01-17'; -delete from t2 where col1='2006-01-17'; -delete from t3 where col1='2006-01-17'; -delete from t4 where col1='2006-01-17'; -delete from t5 where col1='2006-01-17'; -delete from t6 where col1='2006-01-17'; -select * from t1 order by col1; -col1 -2006-02-06 -select * from t2 order by col1; -col1 -2006-01-25 -2006-02-06 -select * from t3 order by col1; -col1 -2006-01-25 -2006-02-06 -select * from t4 order by colint; -colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -insert into t1 values ('2006-01-17'); -insert into t2 values ('2006-01-17'); -insert into t3 values ('2006-01-17'); -insert into t4 values (60,'2006-01-17'); -insert into t5 values (60,'2006-01-17'); -insert into t6 values (60,'2006-01-17'); -select * from t1 order by col1; -col1 -2006-01-17 -2006-02-06 -select * from t2 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-06 -select * from t3 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-06 -select * from t4 order by colint; -colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -select * from t5 order by colint; -colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -select * from t6 order by colint; -colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with to_days(col1)-to_days('2006-01-01') -------------------------------------------------------------------------- -delete from t11 where col1='2006-01-17'; -delete from t22 where col1='2006-01-17'; -delete from t33 where col1='2006-01-17'; -delete from t44 where col1='2006-01-17'; -delete from t55 where col1='2006-01-17'; -delete from t66 where col1='2006-01-17'; -select * from t11 order by col1; -col1 -2006-02-06 -select * from t22 order by col1; -col1 -2006-01-25 -2006-02-06 -select * from t33 order by col1; -col1 -2006-01-25 -2006-02-06 -select * from t44 order by colint; -colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -insert into t11 values ('2006-01-17'); -insert into t22 values ('2006-01-17'); -insert into t33 values ('2006-01-17'); -insert into t44 values (60,'2006-01-17'); -insert into t55 values (60,'2006-01-17'); -insert into t66 values (60,'2006-01-17'); -select * from t11 order by col1; -col1 -2006-01-17 -2006-02-06 -select * from t22 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-06 -select * from t33 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-06 -select * from t44 order by colint; -colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -select * from t55 order by colint; -colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -select * from t66 order by colint; -colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -------------------------- ----- some alter table end -------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -------------------------------------------------------------------------- ---- datediff(col1, '2006-01-01') in partition with coltype date -------------------------------------------------------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -------------------------------------------------------------------------- ---- Create tables with datediff(col1, '2006-01-01') -------------------------------------------------------------------------- -create table t1 (col1 date) engine='NDB' -partition by range(datediff(col1, '2006-01-01')) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t2 (col1 date) engine='NDB' -partition by list(datediff(col1, '2006-01-01')) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t3 (col1 date) engine='NDB' -partition by hash(datediff(col1, '2006-01-01')); -create table t4 (colint int, col1 date) engine='NDB' -partition by range(colint) -subpartition by hash(datediff(col1, '2006-01-01')) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t5 (colint int, col1 date) engine='NDB' -partition by list(colint) -subpartition by hash(datediff(col1, '2006-01-01')) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -create table t6 (colint int, col1 date) engine='NDB' -partition by range(colint) -(partition p0 values less than (datediff('2006-02-02', '2006-01-01')), -partition p1 values less than maxvalue); -------------------------------------------------------------------------- ---- Access tables with datediff(col1, '2006-01-01') -------------------------------------------------------------------------- -insert into t1 values ('2006-02-03'); -insert into t1 values ('2006-01-17'); -insert into t2 values ('2006-02-03'); -insert into t2 values ('2006-01-17'); -insert into t2 values ('2006-01-25'); -insert into t3 values ('2006-02-03'); -insert into t3 values ('2006-01-17'); -insert into t3 values ('2006-01-25'); -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t4; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t5; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t6; -select datediff(col1, '2006-01-01') from t1 order by col1; -datediff(col1, '2006-01-01') -16 -33 -select * from t1 order by col1; -col1 -2006-01-17 -2006-02-03 -select * from t2 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-03 -select * from t3 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-03 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -update t1 set col1='2006-02-06' where col1='2006-02-03'; -update t2 set col1='2006-02-06' where col1='2006-02-03'; -update t3 set col1='2006-02-06' where col1='2006-02-03'; -update t4 set col1='2006-02-06' where col1='2006-02-03'; -update t5 set col1='2006-02-06' where col1='2006-02-03'; -update t6 set col1='2006-02-06' where col1='2006-02-03'; -select * from t1 order by col1; -col1 -2006-01-17 -2006-02-06 -select * from t2 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-06 -select * from t3 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-06 -select * from t4 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Alter tables with datediff(col1, '2006-01-01') -------------------------------------------------------------------------- -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -create table t11 engine='NDB' as select * from t1; -create table t22 engine='NDB' as select * from t2; -create table t33 engine='NDB' as select * from t3; -create table t44 engine='NDB' as select * from t4; -create table t55 engine='NDB' as select * from t5; -create table t66 engine='NDB' as select * from t6; -alter table t11 -partition by range(datediff(col1, '2006-01-01')) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t22 -partition by list(datediff(col1, '2006-01-01')) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t33 -partition by hash(datediff(col1, '2006-01-01')); -alter table t44 -partition by range(colint) -subpartition by hash(datediff(col1, '2006-01-01')) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t55 -partition by list(colint) -subpartition by hash(datediff(col1, '2006-01-01')) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -alter table t66 -partition by range(colint) -(partition p0 values less than (datediff('2006-02-02', '2006-01-01')), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -2006-01-17 -2006-02-06 -select * from t22 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-06 -select * from t33 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-06 -select * from t44 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t66 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 ---------------------------- ----- some alter table begin ---------------------------- -alter table t55 -partition by list(colint) -subpartition by hash(datediff(col1, '2006-01-01')) subpartitions 4 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p1 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -show create table t55; -Table Create Table -t55 CREATE TABLE `t55` ( - `colint` int(11) DEFAULT NULL, - `col1` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (datediff(col1, '2006-01-01')) -SUBPARTITIONS 4 -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) ENGINE = ndbcluster) */ -select * from t55 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with datediff(col1, '2006-01-01') -------------------------------------------------------------------------- -delete from t1 where col1='2006-01-17'; -delete from t2 where col1='2006-01-17'; -delete from t3 where col1='2006-01-17'; -delete from t4 where col1='2006-01-17'; -delete from t5 where col1='2006-01-17'; -delete from t6 where col1='2006-01-17'; -select * from t1 order by col1; -col1 -2006-02-06 -select * from t2 order by col1; -col1 -2006-01-25 -2006-02-06 -select * from t3 order by col1; -col1 -2006-01-25 -2006-02-06 -select * from t4 order by colint; -colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -insert into t1 values ('2006-01-17'); -insert into t2 values ('2006-01-17'); -insert into t3 values ('2006-01-17'); -insert into t4 values (60,'2006-01-17'); -insert into t5 values (60,'2006-01-17'); -insert into t6 values (60,'2006-01-17'); -select * from t1 order by col1; -col1 -2006-01-17 -2006-02-06 -select * from t2 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-06 -select * from t3 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-06 -select * from t4 order by colint; -colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -select * from t5 order by colint; -colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -select * from t6 order by colint; -colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with datediff(col1, '2006-01-01') -------------------------------------------------------------------------- -delete from t11 where col1='2006-01-17'; -delete from t22 where col1='2006-01-17'; -delete from t33 where col1='2006-01-17'; -delete from t44 where col1='2006-01-17'; -delete from t55 where col1='2006-01-17'; -delete from t66 where col1='2006-01-17'; -select * from t11 order by col1; -col1 -2006-02-06 -select * from t22 order by col1; -col1 -2006-01-25 -2006-02-06 -select * from t33 order by col1; -col1 -2006-01-25 -2006-02-06 -select * from t44 order by colint; -colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -insert into t11 values ('2006-01-17'); -insert into t22 values ('2006-01-17'); -insert into t33 values ('2006-01-17'); -insert into t44 values (60,'2006-01-17'); -insert into t55 values (60,'2006-01-17'); -insert into t66 values (60,'2006-01-17'); -select * from t11 order by col1; -col1 -2006-01-17 -2006-02-06 -select * from t22 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-06 -select * from t33 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-06 -select * from t44 order by colint; -colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -select * from t55 order by colint; -colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -select * from t66 order by colint; -colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -------------------------- ----- some alter table end -------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -------------------------------------------------------------------------- ---- weekday(col1) in partition with coltype date -------------------------------------------------------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -------------------------------------------------------------------------- ---- Create tables with weekday(col1) -------------------------------------------------------------------------- -create table t1 (col1 date) engine='NDB' -partition by range(weekday(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t2 (col1 date) engine='NDB' -partition by list(weekday(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t3 (col1 date) engine='NDB' -partition by hash(weekday(col1)); -create table t4 (colint int, col1 date) engine='NDB' -partition by range(colint) -subpartition by hash(weekday(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t5 (colint int, col1 date) engine='NDB' -partition by list(colint) -subpartition by hash(weekday(col1)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -create table t6 (colint int, col1 date) engine='NDB' -partition by range(colint) -(partition p0 values less than (weekday('2006-10-14')), -partition p1 values less than maxvalue); -------------------------------------------------------------------------- ---- Access tables with weekday(col1) -------------------------------------------------------------------------- -insert into t1 values ('2006-12-03'); -insert into t1 values ('2006-11-17'); -insert into t2 values ('2006-12-03'); -insert into t2 values ('2006-11-17'); -insert into t2 values ('2006-05-25'); -insert into t3 values ('2006-12-03'); -insert into t3 values ('2006-11-17'); -insert into t3 values ('2006-05-25'); -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t4; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t5; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t6; -select weekday(col1) from t1 order by col1; -weekday(col1) -4 -6 -select * from t1 order by col1; -col1 -2006-11-17 -2006-12-03 -select * from t2 order by col1; -col1 -2006-05-25 -2006-11-17 -2006-12-03 -select * from t3 order by col1; -col1 -2006-05-25 -2006-11-17 -2006-12-03 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -update t1 set col1='2006-02-06' where col1='2006-12-03'; -update t2 set col1='2006-02-06' where col1='2006-12-03'; -update t3 set col1='2006-02-06' where col1='2006-12-03'; -update t4 set col1='2006-02-06' where col1='2006-12-03'; -update t5 set col1='2006-02-06' where col1='2006-12-03'; -update t6 set col1='2006-02-06' where col1='2006-12-03'; -select * from t1 order by col1; -col1 -2006-02-06 -2006-11-17 -select * from t2 order by col1; -col1 -2006-02-06 -2006-05-25 -2006-11-17 -select * from t3 order by col1; -col1 -2006-02-06 -2006-05-25 -2006-11-17 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Alter tables with weekday(col1) -------------------------------------------------------------------------- -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -create table t11 engine='NDB' as select * from t1; -create table t22 engine='NDB' as select * from t2; -create table t33 engine='NDB' as select * from t3; -create table t44 engine='NDB' as select * from t4; -create table t55 engine='NDB' as select * from t5; -create table t66 engine='NDB' as select * from t6; -alter table t11 -partition by range(weekday(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t22 -partition by list(weekday(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t33 -partition by hash(weekday(col1)); -alter table t44 -partition by range(colint) -subpartition by hash(weekday(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t55 -partition by list(colint) -subpartition by hash(weekday(col1)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -alter table t66 -partition by range(colint) -(partition p0 values less than (weekday('2006-10-14')), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -2006-02-06 -2006-11-17 -select * from t22 order by col1; -col1 -2006-02-06 -2006-05-25 -2006-11-17 -select * from t33 order by col1; -col1 -2006-02-06 -2006-05-25 -2006-11-17 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t66 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 ---------------------------- ----- some alter table begin ---------------------------- -alter table t55 -partition by list(colint) -subpartition by hash(weekday(col1)) subpartitions 4 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p1 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -show create table t55; -Table Create Table -t55 CREATE TABLE `t55` ( - `colint` int(11) DEFAULT NULL, - `col1` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (weekday(col1)) -SUBPARTITIONS 4 -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) ENGINE = ndbcluster) */ -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with weekday(col1) -------------------------------------------------------------------------- -delete from t1 where col1='2006-11-17'; -delete from t2 where col1='2006-11-17'; -delete from t3 where col1='2006-11-17'; -delete from t4 where col1='2006-11-17'; -delete from t5 where col1='2006-11-17'; -delete from t6 where col1='2006-11-17'; -select * from t1 order by col1; -col1 -2006-02-06 -select * from t2 order by col1; -col1 -2006-02-06 -2006-05-25 -select * from t3 order by col1; -col1 -2006-02-06 -2006-05-25 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -insert into t1 values ('2006-11-17'); -insert into t2 values ('2006-11-17'); -insert into t3 values ('2006-11-17'); -insert into t4 values (60,'2006-11-17'); -insert into t5 values (60,'2006-11-17'); -insert into t6 values (60,'2006-11-17'); -select * from t1 order by col1; -col1 -2006-02-06 -2006-11-17 -select * from t2 order by col1; -col1 -2006-02-06 -2006-05-25 -2006-11-17 -select * from t3 order by col1; -col1 -2006-02-06 -2006-05-25 -2006-11-17 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-11-17 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-11-17 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-11-17 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with weekday(col1) -------------------------------------------------------------------------- -delete from t11 where col1='2006-11-17'; -delete from t22 where col1='2006-11-17'; -delete from t33 where col1='2006-11-17'; -delete from t44 where col1='2006-11-17'; -delete from t55 where col1='2006-11-17'; -delete from t66 where col1='2006-11-17'; -select * from t11 order by col1; -col1 -2006-02-06 -select * from t22 order by col1; -col1 -2006-02-06 -2006-05-25 -select * from t33 order by col1; -col1 -2006-02-06 -2006-05-25 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -insert into t11 values ('2006-11-17'); -insert into t22 values ('2006-11-17'); -insert into t33 values ('2006-11-17'); -insert into t44 values (60,'2006-11-17'); -insert into t55 values (60,'2006-11-17'); -insert into t66 values (60,'2006-11-17'); -select * from t11 order by col1; -col1 -2006-02-06 -2006-11-17 -select * from t22 order by col1; -col1 -2006-02-06 -2006-05-25 -2006-11-17 -select * from t33 order by col1; -col1 -2006-02-06 -2006-05-25 -2006-11-17 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-11-17 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-11-17 -select * from t66 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-11-17 -------------------------- ----- some alter table end -------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -------------------------------------------------------------------------- ---- year(col1)-1990 in partition with coltype date -------------------------------------------------------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -------------------------------------------------------------------------- ---- Create tables with year(col1)-1990 -------------------------------------------------------------------------- -create table t1 (col1 date) engine='NDB' -partition by range(year(col1)-1990) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t2 (col1 date) engine='NDB' -partition by list(year(col1)-1990) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t3 (col1 date) engine='NDB' -partition by hash(year(col1)-1990); -create table t4 (colint int, col1 date) engine='NDB' -partition by range(colint) -subpartition by hash(year(col1)-1990) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t5 (colint int, col1 date) engine='NDB' -partition by list(colint) -subpartition by hash(year(col1)-1990) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -create table t6 (colint int, col1 date) engine='NDB' -partition by range(colint) -(partition p0 values less than (year('2005-10-14')-1990), -partition p1 values less than maxvalue); -------------------------------------------------------------------------- ---- Access tables with year(col1)-1990 -------------------------------------------------------------------------- -insert into t1 values ('1996-01-03'); -insert into t1 values ('2000-02-17'); -insert into t2 values ('1996-01-03'); -insert into t2 values ('2000-02-17'); -insert into t2 values ('2004-05-25'); -insert into t3 values ('1996-01-03'); -insert into t3 values ('2000-02-17'); -insert into t3 values ('2004-05-25'); -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t4; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t5; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t6; -select year(col1)-1990 from t1 order by col1; -year(col1)-1990 -6 -10 -select * from t1 order by col1; -col1 -1996-01-03 -2000-02-17 -select * from t2 order by col1; -col1 -1996-01-03 -2000-02-17 -2004-05-25 -select * from t3 order by col1; -col1 -1996-01-03 -2000-02-17 -2004-05-25 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -update t1 set col1='2002-02-15' where col1='1996-01-03'; -update t2 set col1='2002-02-15' where col1='1996-01-03'; -update t3 set col1='2002-02-15' where col1='1996-01-03'; -update t4 set col1='2002-02-15' where col1='1996-01-03'; -update t5 set col1='2002-02-15' where col1='1996-01-03'; -update t6 set col1='2002-02-15' where col1='1996-01-03'; -select * from t1 order by col1; -col1 -2000-02-17 -2002-02-15 -select * from t2 order by col1; -col1 -2000-02-17 -2002-02-15 -2004-05-25 -select * from t3 order by col1; -col1 -2000-02-17 -2002-02-15 -2004-05-25 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Alter tables with year(col1)-1990 -------------------------------------------------------------------------- -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -create table t11 engine='NDB' as select * from t1; -create table t22 engine='NDB' as select * from t2; -create table t33 engine='NDB' as select * from t3; -create table t44 engine='NDB' as select * from t4; -create table t55 engine='NDB' as select * from t5; -create table t66 engine='NDB' as select * from t6; -alter table t11 -partition by range(year(col1)-1990) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t22 -partition by list(year(col1)-1990) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t33 -partition by hash(year(col1)-1990); -alter table t44 -partition by range(colint) -subpartition by hash(year(col1)-1990) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t55 -partition by list(colint) -subpartition by hash(year(col1)-1990) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -alter table t66 -partition by range(colint) -(partition p0 values less than (year('2005-10-14')-1990), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -2000-02-17 -2002-02-15 -select * from t22 order by col1; -col1 -2000-02-17 -2002-02-15 -2004-05-25 -select * from t33 order by col1; -col1 -2000-02-17 -2002-02-15 -2004-05-25 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t66 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 ---------------------------- ----- some alter table begin ---------------------------- -alter table t55 -partition by list(colint) -subpartition by hash(year(col1)-1990) subpartitions 4 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p1 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -show create table t55; -Table Create Table -t55 CREATE TABLE `t55` ( - `colint` int(11) DEFAULT NULL, - `col1` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (year(col1)-1990) -SUBPARTITIONS 4 -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) ENGINE = ndbcluster) */ -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with year(col1)-1990 -------------------------------------------------------------------------- -delete from t1 where col1='2000-02-17'; -delete from t2 where col1='2000-02-17'; -delete from t3 where col1='2000-02-17'; -delete from t4 where col1='2000-02-17'; -delete from t5 where col1='2000-02-17'; -delete from t6 where col1='2000-02-17'; -select * from t1 order by col1; -col1 -2002-02-15 -select * from t2 order by col1; -col1 -2002-02-15 -2004-05-25 -select * from t3 order by col1; -col1 -2002-02-15 -2004-05-25 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -insert into t1 values ('2000-02-17'); -insert into t2 values ('2000-02-17'); -insert into t3 values ('2000-02-17'); -insert into t4 values (60,'2000-02-17'); -insert into t5 values (60,'2000-02-17'); -insert into t6 values (60,'2000-02-17'); -select * from t1 order by col1; -col1 -2000-02-17 -2002-02-15 -select * from t2 order by col1; -col1 -2000-02-17 -2002-02-15 -2004-05-25 -select * from t3 order by col1; -col1 -2000-02-17 -2002-02-15 -2004-05-25 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2000-02-17 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2000-02-17 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2000-02-17 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with year(col1)-1990 -------------------------------------------------------------------------- -delete from t11 where col1='2000-02-17'; -delete from t22 where col1='2000-02-17'; -delete from t33 where col1='2000-02-17'; -delete from t44 where col1='2000-02-17'; -delete from t55 where col1='2000-02-17'; -delete from t66 where col1='2000-02-17'; -select * from t11 order by col1; -col1 -2002-02-15 -select * from t22 order by col1; -col1 -2002-02-15 -2004-05-25 -select * from t33 order by col1; -col1 -2002-02-15 -2004-05-25 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -insert into t11 values ('2000-02-17'); -insert into t22 values ('2000-02-17'); -insert into t33 values ('2000-02-17'); -insert into t44 values (60,'2000-02-17'); -insert into t55 values (60,'2000-02-17'); -insert into t66 values (60,'2000-02-17'); -select * from t11 order by col1; -col1 -2000-02-17 -2002-02-15 -select * from t22 order by col1; -col1 -2000-02-17 -2002-02-15 -2004-05-25 -select * from t33 order by col1; -col1 -2000-02-17 -2002-02-15 -2004-05-25 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2000-02-17 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2000-02-17 -select * from t66 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2000-02-17 -------------------------- ----- some alter table end -------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -------------------------------------------------------------------------- ---- yearweek(col1)-200600 in partition with coltype date -------------------------------------------------------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -------------------------------------------------------------------------- ---- Create tables with yearweek(col1)-200600 -------------------------------------------------------------------------- -create table t1 (col1 date) engine='NDB' -partition by range(yearweek(col1)-200600) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t2 (col1 date) engine='NDB' -partition by list(yearweek(col1)-200600) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t3 (col1 date) engine='NDB' -partition by hash(yearweek(col1)-200600); -create table t4 (colint int, col1 date) engine='NDB' -partition by range(colint) -subpartition by hash(yearweek(col1)-200600) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t5 (colint int, col1 date) engine='NDB' -partition by list(colint) -subpartition by hash(yearweek(col1)-200600) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -create table t6 (colint int, col1 date) engine='NDB' -partition by range(colint) -(partition p0 values less than (yearweek('2006-10-14')-200600), -partition p1 values less than maxvalue); -------------------------------------------------------------------------- ---- Access tables with yearweek(col1)-200600 -------------------------------------------------------------------------- -insert into t1 values ('2006-01-03'); -insert into t1 values ('2006-08-17'); -insert into t2 values ('2006-01-03'); -insert into t2 values ('2006-08-17'); -insert into t2 values ('2006-03-25'); -insert into t3 values ('2006-01-03'); -insert into t3 values ('2006-08-17'); -insert into t3 values ('2006-03-25'); -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t4; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t5; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t6; -select yearweek(col1)-200600 from t1 order by col1; -yearweek(col1)-200600 -1 -33 -select * from t1 order by col1; -col1 -2006-01-03 -2006-08-17 -select * from t2 order by col1; -col1 -2006-01-03 -2006-03-25 -2006-08-17 -select * from t3 order by col1; -col1 -2006-01-03 -2006-03-25 -2006-08-17 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -update t1 set col1='2006-11-15' where col1='2006-01-03'; -update t2 set col1='2006-11-15' where col1='2006-01-03'; -update t3 set col1='2006-11-15' where col1='2006-01-03'; -update t4 set col1='2006-11-15' where col1='2006-01-03'; -update t5 set col1='2006-11-15' where col1='2006-01-03'; -update t6 set col1='2006-11-15' where col1='2006-01-03'; -select * from t1 order by col1; -col1 -2006-08-17 -2006-11-15 -select * from t2 order by col1; -col1 -2006-03-25 -2006-08-17 -2006-11-15 -select * from t3 order by col1; -col1 -2006-03-25 -2006-08-17 -2006-11-15 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Alter tables with yearweek(col1)-200600 -------------------------------------------------------------------------- -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -create table t11 engine='NDB' as select * from t1; -create table t22 engine='NDB' as select * from t2; -create table t33 engine='NDB' as select * from t3; -create table t44 engine='NDB' as select * from t4; -create table t55 engine='NDB' as select * from t5; -create table t66 engine='NDB' as select * from t6; -alter table t11 -partition by range(yearweek(col1)-200600) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t22 -partition by list(yearweek(col1)-200600) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t33 -partition by hash(yearweek(col1)-200600); -alter table t44 -partition by range(colint) -subpartition by hash(yearweek(col1)-200600) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t55 -partition by list(colint) -subpartition by hash(yearweek(col1)-200600) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -alter table t66 -partition by range(colint) -(partition p0 values less than (yearweek('2006-10-14')-200600), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -2006-08-17 -2006-11-15 -select * from t22 order by col1; -col1 -2006-03-25 -2006-08-17 -2006-11-15 -select * from t33 order by col1; -col1 -2006-03-25 -2006-08-17 -2006-11-15 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t66 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 ---------------------------- ----- some alter table begin ---------------------------- -alter table t55 -partition by list(colint) -subpartition by hash(yearweek(col1)-200600) subpartitions 4 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p1 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -show create table t55; -Table Create Table -t55 CREATE TABLE `t55` ( - `colint` int(11) DEFAULT NULL, - `col1` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (yearweek(col1)-200600) -SUBPARTITIONS 4 -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) ENGINE = ndbcluster) */ -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with yearweek(col1)-200600 -------------------------------------------------------------------------- -delete from t1 where col1='2006-08-17'; -delete from t2 where col1='2006-08-17'; -delete from t3 where col1='2006-08-17'; -delete from t4 where col1='2006-08-17'; -delete from t5 where col1='2006-08-17'; -delete from t6 where col1='2006-08-17'; -select * from t1 order by col1; -col1 -2006-11-15 -select * from t2 order by col1; -col1 -2006-03-25 -2006-11-15 -select * from t3 order by col1; -col1 -2006-03-25 -2006-11-15 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -insert into t1 values ('2006-08-17'); -insert into t2 values ('2006-08-17'); -insert into t3 values ('2006-08-17'); -insert into t4 values (60,'2006-08-17'); -insert into t5 values (60,'2006-08-17'); -insert into t6 values (60,'2006-08-17'); -select * from t1 order by col1; -col1 -2006-08-17 -2006-11-15 -select * from t2 order by col1; -col1 -2006-03-25 -2006-08-17 -2006-11-15 -select * from t3 order by col1; -col1 -2006-03-25 -2006-08-17 -2006-11-15 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-08-17 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-08-17 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-08-17 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with yearweek(col1)-200600 -------------------------------------------------------------------------- -delete from t11 where col1='2006-08-17'; -delete from t22 where col1='2006-08-17'; -delete from t33 where col1='2006-08-17'; -delete from t44 where col1='2006-08-17'; -delete from t55 where col1='2006-08-17'; -delete from t66 where col1='2006-08-17'; -select * from t11 order by col1; -col1 -2006-11-15 -select * from t22 order by col1; -col1 -2006-03-25 -2006-11-15 -select * from t33 order by col1; -col1 -2006-03-25 -2006-11-15 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -insert into t11 values ('2006-08-17'); -insert into t22 values ('2006-08-17'); -insert into t33 values ('2006-08-17'); -insert into t44 values (60,'2006-08-17'); -insert into t55 values (60,'2006-08-17'); -insert into t66 values (60,'2006-08-17'); -select * from t11 order by col1; -col1 -2006-08-17 -2006-11-15 -select * from t22 order by col1; -col1 -2006-03-25 -2006-08-17 -2006-11-15 -select * from t33 order by col1; -col1 -2006-03-25 -2006-08-17 -2006-11-15 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-08-17 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-08-17 -select * from t66 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-08-17 -------------------------- ----- some alter table end -------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; diff --git a/mysql-test/suite/parts/r/partition_alter1_1_2_ndb.result b/mysql-test/suite/parts/r/partition_alter1_1_2_ndb.result deleted file mode 100644 index c2095bffd5e..00000000000 --- a/mysql-test/suite/parts/r/partition_alter1_1_2_ndb.result +++ /dev/null @@ -1,27726 +0,0 @@ -SET @max_row = 20; -SET @@session.storage_engine = 'ndbcluster'; - -#------------------------------------------------------------------------ -# 0. Setting of auxiliary variables + Creation of an auxiliary tables -# needed in many testcases -#------------------------------------------------------------------------ -SELECT @max_row DIV 2 INTO @max_row_div2; -SELECT @max_row DIV 3 INTO @max_row_div3; -SELECT @max_row DIV 4 INTO @max_row_div4; -SET @max_int_4 = 2147483647; -DROP TABLE IF EXISTS t0_template; -CREATE TABLE t0_template ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) , -PRIMARY KEY(f_int1)) -ENGINE = MEMORY; -# Logging of INSERTs into t0_template suppressed -DROP TABLE IF EXISTS t0_definition; -CREATE TABLE t0_definition ( -state CHAR(3), -create_command VARBINARY(5000), -file_list VARBINARY(10000), -PRIMARY KEY (state) -) ENGINE = MEMORY; -DROP TABLE IF EXISTS t0_aux; -CREATE TABLE t0_aux ( f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) ) -ENGINE = MEMORY; -SET AUTOCOMMIT= 1; -SET @@session.sql_mode= ''; -# End of basic preparations needed for all tests -#----------------------------------------------- - -#======================================================================== -# 1. ALTER TABLE ADD PRIMARY KEY and/or UNIQUE INDEX -#======================================================================== -#------------------------------------------------------------------------ -# 1.2 ADD PRIMARY KEY or UNIQUE INDEX to table with two columns -# (f_int1 and f_int2) within the partitioning function -#------------------------------------------------------------------------ -# 1.2.1 PRIMARY KEY consisting of two columns -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -# 1.2.2 UNIQUE INDEX consisting of two columns -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -# 1.2.3 PRIMARY KEY and UNIQUE INDEX consisting of two columns -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2), ADD PRIMARY KEY(f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int2`,`f_int1`), - UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2), ADD PRIMARY KEY(f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int2`,`f_int1`), - UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2), ADD PRIMARY KEY(f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int2`,`f_int1`), - UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2), ADD PRIMARY KEY(f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int2`,`f_int1`), - UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2), ADD PRIMARY KEY(f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int2`,`f_int1`), - UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2), ADD PRIMARY KEY(f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int2`,`f_int1`), - UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2), ADD PRIMARY KEY(f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int2`,`f_int1`), - UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2), ADD PRIMARY KEY(f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int2`,`f_int1`), - UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1), ADD PRIMARY KEY(f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int1`,`f_int2`), - UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1), ADD PRIMARY KEY(f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int1`,`f_int2`), - UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1), ADD PRIMARY KEY(f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int1`,`f_int2`), - UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1), ADD PRIMARY KEY(f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int1`,`f_int2`), - UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1), ADD PRIMARY KEY(f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int1`,`f_int2`), - UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1), ADD PRIMARY KEY(f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int1`,`f_int2`), - UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1), ADD PRIMARY KEY(f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int1`,`f_int2`), - UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1), ADD PRIMARY KEY(f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int1`,`f_int2`), - UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1), ADD PRIMARY KEY(f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int1`,`f_int2`), - UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1), ADD PRIMARY KEY(f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int1`,`f_int2`), - UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1), ADD PRIMARY KEY(f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int1`,`f_int2`), - UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1), ADD PRIMARY KEY(f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int1`,`f_int2`), - UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1), ADD PRIMARY KEY(f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int1`,`f_int2`), - UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1), ADD PRIMARY KEY(f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int1`,`f_int2`), - UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1), ADD PRIMARY KEY(f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int1`,`f_int2`), - UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1), ADD PRIMARY KEY(f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int1`,`f_int2`), - UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -DROP VIEW IF EXISTS v1; -DROP TABLE IF EXISTS t1; -DROP TABLE IF EXISTS t0_aux; -DROP TABLE IF EXISTS t0_definition; -DROP TABLE IF EXISTS t0_template; diff --git a/mysql-test/suite/parts/r/partition_alter1_1_ndb.result b/mysql-test/suite/parts/r/partition_alter1_1_ndb.result deleted file mode 100644 index 86608ece057..00000000000 --- a/mysql-test/suite/parts/r/partition_alter1_1_ndb.result +++ /dev/null @@ -1,24316 +0,0 @@ -SET @max_row = 20; -SET @@session.storage_engine = 'ndbcluster'; - -#------------------------------------------------------------------------ -# 0. Setting of auxiliary variables + Creation of an auxiliary tables -# needed in many testcases -#------------------------------------------------------------------------ -SELECT @max_row DIV 2 INTO @max_row_div2; -SELECT @max_row DIV 3 INTO @max_row_div3; -SELECT @max_row DIV 4 INTO @max_row_div4; -SET @max_int_4 = 2147483647; -DROP TABLE IF EXISTS t0_template; -CREATE TABLE t0_template ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) , -PRIMARY KEY(f_int1)) -ENGINE = MEMORY; -# Logging of INSERTs into t0_template suppressed -DROP TABLE IF EXISTS t0_definition; -CREATE TABLE t0_definition ( -state CHAR(3), -create_command VARBINARY(5000), -file_list VARBINARY(10000), -PRIMARY KEY (state) -) ENGINE = MEMORY; -DROP TABLE IF EXISTS t0_aux; -CREATE TABLE t0_aux ( f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) ) -ENGINE = MEMORY; -SET AUTOCOMMIT= 1; -SET @@session.sql_mode= ''; -# End of basic preparations needed for all tests -#----------------------------------------------- - -#======================================================================== -# 1. ALTER TABLE ADD PRIMARY KEY and/or UNIQUE INDEX -#======================================================================== -#------------------------------------------------------------------------ -# 1.1 ADD PRIMARY KEY or UNIQUE INDEX to table with one column (f_int1) -# within the partitioning function -#------------------------------------------------------------------------ -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-2-a success: 1 - -# check unique-2-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-2-a success: 1 - -# check unique-2-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-2-a success: 1 - -# check unique-2-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-2-a success: 1 - -# check unique-2-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-2-a success: 1 - -# check unique-2-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-2-a success: 1 - -# check unique-2-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-2-a success: 1 - -# check unique-2-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-2-a success: 1 - -# check unique-2-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-2-a success: 1 - -# check unique-2-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-2-a success: 1 - -# check unique-2-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-2-a success: 1 - -# check unique-2-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-2-a success: 1 - -# check unique-2-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-2-a success: 1 - -# check unique-2-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-2-a success: 1 - -# check unique-2-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-2-a success: 1 - -# check unique-2-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-2-a success: 1 - -# check unique-2-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -# 1.1.3 PRIMARY KEY consisting of two columns -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -# 1.1.4 UNIQUE INDEX consisting of two columns -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -DROP VIEW IF EXISTS v1; -DROP TABLE IF EXISTS t1; -DROP TABLE IF EXISTS t0_aux; -DROP TABLE IF EXISTS t0_definition; -DROP TABLE IF EXISTS t0_template; diff --git a/mysql-test/suite/parts/r/partition_alter1_2_ndb.result b/mysql-test/suite/parts/r/partition_alter1_2_ndb.result deleted file mode 100644 index e3f3f6f41c1..00000000000 --- a/mysql-test/suite/parts/r/partition_alter1_2_ndb.result +++ /dev/null @@ -1,35540 +0,0 @@ -SET @max_row = 20; -SET @@session.storage_engine = 'ndbcluster'; - -#------------------------------------------------------------------------ -# 0. Setting of auxiliary variables + Creation of an auxiliary tables -# needed in many testcases -#------------------------------------------------------------------------ -SELECT @max_row DIV 2 INTO @max_row_div2; -SELECT @max_row DIV 3 INTO @max_row_div3; -SELECT @max_row DIV 4 INTO @max_row_div4; -SET @max_int_4 = 2147483647; -DROP TABLE IF EXISTS t0_template; -CREATE TABLE t0_template ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) , -PRIMARY KEY(f_int1)) -ENGINE = MEMORY; -# Logging of INSERTs into t0_template suppressed -DROP TABLE IF EXISTS t0_definition; -CREATE TABLE t0_definition ( -state CHAR(3), -create_command VARBINARY(5000), -file_list VARBINARY(10000), -PRIMARY KEY (state) -) ENGINE = MEMORY; -DROP TABLE IF EXISTS t0_aux; -CREATE TABLE t0_aux ( f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) ) -ENGINE = MEMORY; -SET AUTOCOMMIT= 1; -SET @@session.sql_mode= ''; -# End of basic preparations needed for all tests -#----------------------------------------------- - -#======================================================================== -# 2 DROP PRIMARY KEY or UNIQUE INDEX -#======================================================================== -#------------------------------------------------------------------------ -# 2.1 Partitioning function contains one column(f_int1) -#------------------------------------------------------------------------ -# 2.1.5 DROP PRIMARY KEY + UNIQUE INDEX consisting of two columns -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), PRIMARY KEY(f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), PRIMARY KEY(f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), PRIMARY KEY(f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), PRIMARY KEY(f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), PRIMARY KEY(f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), PRIMARY KEY(f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), PRIMARY KEY(f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), PRIMARY KEY(f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int2,f_int1), PRIMARY KEY(f_int1,f_int2) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int2,f_int1), PRIMARY KEY(f_int1,f_int2) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int2,f_int1), PRIMARY KEY(f_int1,f_int2) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int2,f_int1), PRIMARY KEY(f_int1,f_int2) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int2,f_int1), PRIMARY KEY(f_int1,f_int2) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int2,f_int1), PRIMARY KEY(f_int1,f_int2) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int2,f_int1), PRIMARY KEY(f_int1,f_int2) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int2,f_int1), PRIMARY KEY(f_int1,f_int2) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -#------------------------------------------------------------------------ -# 2.2 Partitioning function contains two columns (f_int1,f_int2) -#------------------------------------------------------------------------ -# 2.2.1 DROP PRIMARY KEY consisting of two columns -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, PRIMARY KEY(f_int1,f_int2) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, PRIMARY KEY(f_int1,f_int2) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, PRIMARY KEY(f_int1,f_int2) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, PRIMARY KEY(f_int1,f_int2) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, PRIMARY KEY(f_int1,f_int2) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, PRIMARY KEY(f_int1,f_int2) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, PRIMARY KEY(f_int1,f_int2) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, PRIMARY KEY(f_int1,f_int2) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, PRIMARY KEY(f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, PRIMARY KEY(f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, PRIMARY KEY(f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, PRIMARY KEY(f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, PRIMARY KEY(f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, PRIMARY KEY(f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, PRIMARY KEY(f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, PRIMARY KEY(f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -# 2.2.2 DROP UNIQUE INDEX consisting of two columns -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -# 2.2.3 DROP PRIMARY KEY + UNIQUE INDEX consisting of two columns -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), PRIMARY KEY(f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), PRIMARY KEY(f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), PRIMARY KEY(f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), PRIMARY KEY(f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), PRIMARY KEY(f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), PRIMARY KEY(f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), PRIMARY KEY(f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), PRIMARY KEY(f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int2,f_int1), PRIMARY KEY(f_int1,f_int2) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int2,f_int1), PRIMARY KEY(f_int1,f_int2) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int2,f_int1), PRIMARY KEY(f_int1,f_int2) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int2,f_int1), PRIMARY KEY(f_int1,f_int2) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int2,f_int1), PRIMARY KEY(f_int1,f_int2) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int2,f_int1), PRIMARY KEY(f_int1,f_int2) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int2,f_int1), PRIMARY KEY(f_int1,f_int2) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int2,f_int1), PRIMARY KEY(f_int1,f_int2) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -DROP VIEW IF EXISTS v1; -DROP TABLE IF EXISTS t1; -DROP TABLE IF EXISTS t0_aux; -DROP TABLE IF EXISTS t0_definition; -DROP TABLE IF EXISTS t0_template; diff --git a/mysql-test/suite/parts/r/partition_auto_increment_ndb.result b/mysql-test/suite/parts/r/partition_auto_increment_ndb.result deleted file mode 100644 index 40387b9777a..00000000000 --- a/mysql-test/suite/parts/r/partition_auto_increment_ndb.result +++ /dev/null @@ -1,1047 +0,0 @@ -SET new=on; -DROP TABLE IF EXISTS t1; -# test without partitioning for reference -CREATE TABLE t1 ( -c1 INT NOT NULL AUTO_INCREMENT, -PRIMARY KEY (c1)) -ENGINE='NDB'; -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL AUTO_INCREMENT, - PRIMARY KEY (`c1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' -AND TABLE_NAME='t1'; -AUTO_INCREMENT -1 -INSERT INTO t1 VALUES (2); -INSERT INTO t1 VALUES (4); -INSERT INTO t1 VALUES (NULL); -SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' -AND TABLE_NAME='t1'; -AUTO_INCREMENT -6 -SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' -AND TABLE_NAME='t1'; -AUTO_INCREMENT -6 -INSERT INTO t1 VALUES (0); -INSERT INTO t1 VALUES (5), (16); -INSERT INTO t1 VALUES (17); -INSERT INTO t1 VALUES (19), (NULL); -INSERT INTO t1 VALUES (NULL), (10), (NULL); -INSERT INTO t1 VALUES (NULL); -SET INSERT_ID = 30; -INSERT INTO t1 VALUES (NULL); -SET INSERT_ID = 29; -INSERT INTO t1 VALUES (NULL), (NULL), (NULL); -INSERT INTO t1 VALUES (NULL); -UPDATE t1 SET c1 = 50 WHERE c1 = 17; -UPDATE t1 SET c1 = 51 WHERE c1 = 19; -FLUSH TABLES; -UPDATE t1 SET c1 = 40 WHERE c1 = 50; -SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' - AND TABLE_NAME='t1'; -AUTO_INCREMENT -52 -UPDATE t1 SET c1 = NULL WHERE c1 = 4; -Warnings: -Warning 1048 Column 'c1' cannot be null -INSERT INTO t1 VALUES (NULL); -INSERT INTO t1 VALUES (NULL); -SELECT * FROM t1 ORDER BY c1; -c1 -0 -2 -5 -6 -10 -20 -21 -22 -23 -24 -30 -40 -51 -52 -53 -DROP TABLE t1; -CREATE TABLE t1 ( -c1 INT NOT NULL AUTO_INCREMENT, -PRIMARY KEY (c1)) -ENGINE='NDB'; -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL AUTO_INCREMENT, - PRIMARY KEY (`c1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -FLUSH TABLE; -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL AUTO_INCREMENT, - PRIMARY KEY (`c1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -INSERT INTO t1 VALUES (4); -FLUSH TABLE; -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL AUTO_INCREMENT, - PRIMARY KEY (`c1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -INSERT INTO t1 VALUES (NULL); -FLUSH TABLE; -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL AUTO_INCREMENT, - PRIMARY KEY (`c1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -DELETE FROM t1; -INSERT INTO t1 VALUES (NULL); -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL AUTO_INCREMENT, - PRIMARY KEY (`c1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -SELECT * FROM t1 ORDER BY c1; -c1 -6 -TRUNCATE TABLE t1; -INSERT INTO t1 VALUES (NULL); -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL AUTO_INCREMENT, - PRIMARY KEY (`c1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -SELECT * FROM t1 ORDER BY c1; -c1 -1 -INSERT INTO t1 VALUES (100); -INSERT INTO t1 VALUES (NULL); -DELETE FROM t1 WHERE c1 >= 100; -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL AUTO_INCREMENT, - PRIMARY KEY (`c1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -DROP TABLE t1; -# Simple test with NULL -CREATE TABLE t1 ( -c1 INT NOT NULL AUTO_INCREMENT, -PRIMARY KEY (c1)) -ENGINE='NDB' -PARTITION BY HASH(c1) -PARTITIONS 2; -INSERT INTO t1 VALUES (NULL); -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL AUTO_INCREMENT, - PRIMARY KEY (`c1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (c1) -PARTITIONS 2 */ -SELECT * FROM t1; -c1 -1 -DROP TABLE t1; -# Test with sql_mode and first insert as 0 -CREATE TABLE t1 ( -c1 INT, -c2 INT NOT NULL AUTO_INCREMENT, -PRIMARY KEY (c2)) -ENGINE='NDB' -PARTITION BY HASH(c2) -PARTITIONS 2; -INSERT INTO t1 VALUES (1, NULL); -INSERT INTO t1 VALUES (1, 1), (99, 99); -INSERT INTO t1 VALUES (1, NULL); -SET @@session.sql_mode = 'NO_AUTO_VALUE_ON_ZERO'; -INSERT INTO t1 VALUES (1, 0); -SELECT * FROM t1 ORDER BY c1, c2; -c1 c2 -1 0 -1 1 -1 100 -DROP TABLE t1; -CREATE TABLE t1 ( -c1 INT, -c2 INT NOT NULL AUTO_INCREMENT, -PRIMARY KEY (c2)) -ENGINE='NDB' -PARTITION BY HASH(c2) -PARTITIONS 2; -INSERT INTO t1 VALUES (1, 0); -INSERT INTO t1 VALUES (1, 1), (1, NULL); -INSERT INTO t1 VALUES (2, NULL), (4, 7); -INSERT INTO t1 VALUES (1, NULL); -SELECT * FROM t1 ORDER BY c1, c2; -c1 c2 -1 0 -1 1 -1 2 -1 8 -2 3 -4 7 -SET @@session.sql_mode = ''; -DROP TABLE t1; -# Simple test with NULL, 0 and explicit values both incr. and desc. -CREATE TABLE t1 ( -c1 INT NOT NULL AUTO_INCREMENT, -PRIMARY KEY (c1)) -ENGINE='NDB' -PARTITION BY HASH(c1) -PARTITIONS 2; -INSERT INTO t1 VALUES (2), (4), (NULL); -INSERT INTO t1 VALUES (0); -INSERT INTO t1 VALUES (5), (16); -INSERT INTO t1 VALUES (17), (19), (NULL); -INSERT INTO t1 VALUES (NULL), (10), (NULL); -INSERT INTO t1 VALUES (NULL), (9); -INSERT INTO t1 VALUES (59), (55); -INSERT INTO t1 VALUES (NULL), (90); -INSERT INTO t1 VALUES (NULL); -UPDATE t1 SET c1 = 150 WHERE c1 = 17; -UPDATE t1 SET c1 = 151 WHERE c1 = 19; -FLUSH TABLES; -UPDATE t1 SET c1 = 140 WHERE c1 = 150; -SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' - AND TABLE_NAME='t1'; -AUTO_INCREMENT -152 -UPDATE t1 SET c1 = NULL WHERE c1 = 4; -Warnings: -Warning 1048 Column 'c1' cannot be null -INSERT INTO t1 VALUES (NULL); -INSERT INTO t1 VALUES (NULL); -SELECT * FROM t1 ORDER BY c1; -c1 -0 -2 -5 -6 -9 -10 -20 -21 -22 -23 -55 -59 -60 -90 -91 -140 -151 -152 -153 -DROP TABLE t1; -# Test with auto_increment_increment and auto_increment_offset. -CREATE TABLE t1 ( -c1 INT NOT NULL AUTO_INCREMENT, -PRIMARY KEY (c1)) -ENGINE='NDB' -PARTITION BY HASH(c1) -PARTITIONS 2; -SET @@session.auto_increment_increment = 10; -SET @@session.auto_increment_offset = 5; -INSERT INTO t1 VALUES (1); -INSERT INTO t1 VALUES (NULL), (NULL), (NULL); -SET @@session.auto_increment_increment = 5; -SET @@session.auto_increment_offset = 3; -INSERT INTO t1 VALUES (NULL); -INSERT INTO t1 VALUES (33 + 1); -INSERT INTO t1 VALUES (NULL); -INSERT INTO t1 VALUES (38 + 2); -INSERT INTO t1 VALUES (NULL); -INSERT INTO t1 VALUES (43 + 3); -INSERT INTO t1 VALUES (NULL); -INSERT INTO t1 VALUES (48 + 4); -INSERT INTO t1 VALUES (NULL); -INSERT INTO t1 VALUES (53 + 5); -INSERT INTO t1 VALUES (NULL); -INSERT INTO t1 VALUES (63 + 6); -INSERT INTO t1 VALUES (NULL); -SET @@session.auto_increment_increment = 1; -SET @@session.auto_increment_offset = 1; -SELECT * FROM t1 ORDER BY c1; -c1 -1 -5 -15 -25 -33 -34 -38 -40 -43 -46 -48 -52 -53 -58 -63 -69 -73 -DROP TABLE t1; -# Test reported auto_increment value -CREATE TABLE t1 ( -c1 INT NOT NULL AUTO_INCREMENT, -PRIMARY KEY (c1)) -ENGINE='NDB' -PARTITION BY HASH (c1) -PARTITIONS 2; -SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' -AND TABLE_NAME='t1'; -AUTO_INCREMENT -1 -INSERT INTO t1 VALUES (2); -SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' -AND TABLE_NAME='t1'; -AUTO_INCREMENT -3 -INSERT INTO t1 VALUES (4); -INSERT INTO t1 VALUES (NULL); -SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' -AND TABLE_NAME='t1'; -AUTO_INCREMENT -6 -INSERT INTO t1 VALUES (NULL); -INSERT INTO t1 VALUES (17); -INSERT INTO t1 VALUES (19); -INSERT INTO t1 VALUES (NULL); -INSERT INTO t1 VALUES (NULL); -SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' -AND TABLE_NAME='t1'; -AUTO_INCREMENT -22 -SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' -AND TABLE_NAME='t1'; -AUTO_INCREMENT -22 -INSERT INTO t1 VALUES (10); -SELECT * FROM t1 ORDER BY c1; -c1 -2 -4 -5 -6 -10 -17 -19 -20 -21 -INSERT INTO t1 VALUES (NULL); -SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' -AND TABLE_NAME='t1'; -AUTO_INCREMENT -23 -INSERT INTO t1 VALUES (NULL); -INSERT INTO t1 VALUES (15); -INSERT INTO t1 VALUES (NULL); -SELECT * FROM t1 ORDER BY c1; -c1 -2 -4 -5 -6 -10 -15 -17 -19 -20 -21 -22 -23 -24 -INSERT INTO t1 VALUES (NULL); -DELETE FROM t1; -INSERT INTO t1 VALUES (NULL); -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL AUTO_INCREMENT, - PRIMARY KEY (`c1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (c1) -PARTITIONS 2 */ -SELECT * FROM t1 ORDER BY c1; -c1 -26 -TRUNCATE TABLE t1; -INSERT INTO t1 VALUES (NULL); -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL AUTO_INCREMENT, - PRIMARY KEY (`c1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (c1) -PARTITIONS 2 */ -SELECT * FROM t1 ORDER BY c1; -c1 -1 -INSERT INTO t1 VALUES (100); -INSERT INTO t1 VALUES (NULL); -DELETE FROM t1 WHERE c1 >= 100; -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL AUTO_INCREMENT, - PRIMARY KEY (`c1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (c1) -PARTITIONS 2 */ -DROP TABLE t1; -# Test with two threads -# con default -CREATE TABLE t1 (c1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (c1)) -ENGINE = 'NDB' -PARTITION BY HASH(c1) -PARTITIONS 2; -INSERT INTO t1 (c1) VALUES (2); -INSERT INTO t1 (c1) VALUES (4); -# con1 -INSERT INTO t1 (c1) VALUES (NULL); -INSERT INTO t1 (c1) VALUES (10); -# con default -INSERT INTO t1 (c1) VALUES (NULL); -INSERT INTO t1 (c1) VALUES (NULL); -INSERT INTO t1 (c1) VALUES (19); -INSERT INTO t1 (c1) VALUES (21); -# con1 -INSERT INTO t1 (c1) VALUES (NULL); -# con default -INSERT INTO t1 (c1) VALUES (16); -# con1 -INSERT INTO t1 (c1) VALUES (NULL); -# con default -INSERT INTO t1 (c1) VALUES (NULL); -SELECT * FROM t1 ORDER BY c1; -c1 -2 -4 -5 -10 -11 -12 -16 -19 -21 -22 -23 -24 -DROP TABLE t1; -# Test with two threads + start transaction NO PARTITIONING -# con default -CREATE TABLE t1 (c1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (c1)) -ENGINE = 'NDB'; -START TRANSACTION; -INSERT INTO t1 (c1) VALUES (2); -INSERT INTO t1 (c1) VALUES (4); -# con1 -START TRANSACTION; -INSERT INTO t1 (c1) VALUES (NULL); -INSERT INTO t1 (c1) VALUES (10); -# con default -INSERT INTO t1 (c1) VALUES (NULL); -INSERT INTO t1 (c1) VALUES (NULL); -INSERT INTO t1 (c1) VALUES (19); -INSERT INTO t1 (c1) VALUES (21); -# con1 -INSERT INTO t1 (c1) VALUES (NULL); -# con default -INSERT INTO t1 (c1) VALUES (16); -# con1 -INSERT INTO t1 (c1) VALUES (NULL); -SELECT * FROM t1 ORDER BY c1; -c1 -5 -10 -22 -23 -COMMIT; -SELECT * FROM t1 ORDER BY c1; -c1 -5 -10 -22 -23 -# con default -INSERT INTO t1 (c1) VALUES (NULL); -SELECT * FROM t1 ORDER BY c1; -c1 -2 -4 -5 -10 -11 -12 -16 -19 -21 -22 -23 -24 -COMMIT; -SELECT * FROM t1 ORDER BY c1; -c1 -2 -4 -5 -10 -11 -12 -16 -19 -21 -22 -23 -24 -DROP TABLE t1; -# Test with two threads + start transaction -# con default -CREATE TABLE t1 (c1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (c1)) -ENGINE = 'NDB' -PARTITION BY HASH(c1) -PARTITIONS 2; -START TRANSACTION; -INSERT INTO t1 (c1) VALUES (2); -INSERT INTO t1 (c1) VALUES (4); -# con1 -START TRANSACTION; -INSERT INTO t1 (c1) VALUES (NULL), (10); -# con default -INSERT INTO t1 (c1) VALUES (NULL), (NULL), (19); -INSERT INTO t1 (c1) VALUES (21); -# con1 -INSERT INTO t1 (c1) VALUES (NULL); -# con default -INSERT INTO t1 (c1) VALUES (16); -# con1 -INSERT INTO t1 (c1) VALUES (NULL); -SELECT * FROM t1 ORDER BY c1; -c1 -5 -10 -22 -23 -COMMIT; -SELECT * FROM t1 ORDER BY c1; -c1 -5 -10 -22 -23 -# con default -INSERT INTO t1 (c1) VALUES (NULL); -SELECT * FROM t1 ORDER BY c1; -c1 -2 -4 -5 -10 -11 -12 -16 -19 -21 -22 -23 -24 -COMMIT; -SELECT * FROM t1 ORDER BY c1; -c1 -2 -4 -5 -10 -11 -12 -16 -19 -21 -22 -23 -24 -DROP TABLE t1; -# Test with another column after -CREATE TABLE t1 ( -c1 INT NOT NULL AUTO_INCREMENT, -c2 INT, -PRIMARY KEY (c1,c2)) -ENGINE = 'NDB' -PARTITION BY HASH(c2) -PARTITIONS 2; -INSERT INTO t1 VALUES (1, 0); -INSERT INTO t1 VALUES (1, 1); -INSERT INTO t1 VALUES (NULL, 1), (NULL, 2), (NULL, 3); -INSERT INTO t1 VALUES (NULL, 3); -INSERT INTO t1 VALUES (2, 0), (NULL, 2); -INSERT INTO t1 VALUES (2, 2); -INSERT INTO t1 VALUES (2, 22); -INSERT INTO t1 VALUES (NULL, 2); -SELECT * FROM t1 ORDER BY c1,c2; -c1 c2 -1 0 -1 1 -2 0 -2 1 -2 2 -2 22 -3 2 -4 3 -5 3 -6 2 -7 2 -DROP TABLE t1; -# Test with another column before -CREATE TABLE t1 ( -c1 INT, -c2 INT NOT NULL AUTO_INCREMENT, -PRIMARY KEY (c2)) -ENGINE = 'NDB' -PARTITION BY HASH(c2) -PARTITIONS 2; -INSERT INTO t1 VALUES (1, 0); -INSERT INTO t1 VALUES (1, 1); -INSERT INTO t1 VALUES (1, NULL); -INSERT INTO t1 VALUES (2, NULL), (3, 11), (3, NULL), (2, 0); -INSERT INTO t1 VALUES (2, NULL); -INSERT INTO t1 VALUES (2, 2); -INSERT INTO t1 VALUES (2, 22); -INSERT INTO t1 VALUES (2, NULL); -SELECT * FROM t1 ORDER BY c1,c2; -c1 c2 -1 1 -1 2 -2 3 -2 13 -2 14 -2 22 -2 23 -3 11 -3 12 -DROP TABLE t1; -# Test with auto_increment on secondary column in multi-column-index -CREATE TABLE t1 ( -c1 INT, -c2 INT NOT NULL AUTO_INCREMENT, -PRIMARY KEY (c1,c2)) -ENGINE = 'NDB' -PARTITION BY HASH(c2) -PARTITIONS 2; -INSERT INTO t1 VALUES (1, 0); -INSERT INTO t1 VALUES (1, 1); -INSERT INTO t1 VALUES (1, NULL); -INSERT INTO t1 VALUES (2, NULL); -INSERT INTO t1 VALUES (3, NULL); -INSERT INTO t1 VALUES (3, NULL), (2, 0), (2, NULL); -INSERT INTO t1 VALUES (2, 2); -# ERROR (only OK if Blackhole/NDB) should give ER_DUP_KEY or ER_DUP_ENTRY -# mysql_errno: 0 -INSERT INTO t1 VALUES (2, 22), (2, NULL); -SELECT * FROM t1 ORDER BY c1,c2; -c1 c2 -1 1 -1 2 -2 2 -2 3 -2 6 -2 7 -2 22 -2 23 -3 4 -3 5 -DROP TABLE t1; -# Test AUTO_INCREMENT in CREATE -CREATE TABLE t1 (c1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (c1)) -ENGINE = 'NDB' -AUTO_INCREMENT = 15 -PARTITION BY HASH(c1) -PARTITIONS 2; -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL AUTO_INCREMENT, - PRIMARY KEY (`c1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (c1) -PARTITIONS 2 */ -INSERT INTO t1 (c1) VALUES (4); -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL AUTO_INCREMENT, - PRIMARY KEY (`c1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (c1) -PARTITIONS 2 */ -INSERT INTO t1 (c1) VALUES (0); -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL AUTO_INCREMENT, - PRIMARY KEY (`c1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (c1) -PARTITIONS 2 */ -INSERT INTO t1 (c1) VALUES (NULL); -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL AUTO_INCREMENT, - PRIMARY KEY (`c1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (c1) -PARTITIONS 2 */ -SELECT * FROM t1 ORDER BY c1; -c1 -4 -15 -16 -# Test sql_mode 'NO_AUTO_VALUE_ON_ZERO' -SET @@session.sql_mode = 'NO_AUTO_VALUE_ON_ZERO'; -INSERT INTO t1 (c1) VALUES (300); -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL AUTO_INCREMENT, - PRIMARY KEY (`c1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (c1) -PARTITIONS 2 */ -INSERT INTO t1 (c1) VALUES (0); -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL AUTO_INCREMENT, - PRIMARY KEY (`c1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (c1) -PARTITIONS 2 */ -INSERT INTO t1 (c1) VALUES (NULL); -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL AUTO_INCREMENT, - PRIMARY KEY (`c1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (c1) -PARTITIONS 2 */ -SELECT * FROM t1 ORDER BY c1; -c1 -0 -4 -15 -16 -300 -301 -SET @@session.sql_mode = ''; -DROP TABLE t1; -# Test SET INSERT_ID -CREATE TABLE t1 (c1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (c1)) -ENGINE = 'NDB' -PARTITION BY HASH(c1) -PARTITIONS 2; -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL AUTO_INCREMENT, - PRIMARY KEY (`c1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (c1) -PARTITIONS 2 */ -INSERT INTO t1 (c1) VALUES (NULL); -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL AUTO_INCREMENT, - PRIMARY KEY (`c1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (c1) -PARTITIONS 2 */ -SELECT * FROM t1; -c1 -1 -SET INSERT_ID = 23; -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL AUTO_INCREMENT, - PRIMARY KEY (`c1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (c1) -PARTITIONS 2 */ -INSERT INTO t1 (c1) VALUES (NULL); -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL AUTO_INCREMENT, - PRIMARY KEY (`c1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (c1) -PARTITIONS 2 */ -SET INSERT_ID = 22; -INSERT INTO t1 VALUES (NULL), (NULL), (NULL); -INSERT INTO t1 VALUES (NULL); -SELECT * FROM t1 ORDER BY c1; -c1 -1 -2 -23 -DROP TABLE t1; -# Testing with FLUSH TABLE -CREATE TABLE t1 ( -c1 INT NOT NULL AUTO_INCREMENT, -PRIMARY KEY (c1)) -ENGINE='NDB' -PARTITION BY HASH(c1) -PARTITIONS 2; -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL AUTO_INCREMENT, - PRIMARY KEY (`c1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (c1) -PARTITIONS 2 */ -FLUSH TABLE; -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL AUTO_INCREMENT, - PRIMARY KEY (`c1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (c1) -PARTITIONS 2 */ -INSERT INTO t1 VALUES (4); -FLUSH TABLE; -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL AUTO_INCREMENT, - PRIMARY KEY (`c1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (c1) -PARTITIONS 2 */ -INSERT INTO t1 VALUES (NULL); -FLUSH TABLE; -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL AUTO_INCREMENT, - PRIMARY KEY (`c1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (c1) -PARTITIONS 2 */ -SELECT * FROM t1 ORDER BY c1; -c1 -4 -5 -DROP TABLE t1; -############################################################################# -# Bug #45823 - Assertion failure in file row/row0mysql.c line 1386 -# Bug #43988 - AUTO_INCREMENT errors with partitioned InnoDB tables in 5.1.31 -############################################################################## -# Inserting negative autoincrement values into a partition table (partitions >= 4) -CREATE TABLE t (c1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(c1), -c2 INT) ENGINE='NDB' PARTITION BY HASH(c1) PARTITIONS 4; -INSERT INTO t(c2) VALUES (10); -INSERT INTO t(c2) VALUES (20); -INSERT INTO t VALUES (-1,-10); -INSERT INTO t(c2) VALUES (30); -INSERT INTO t(c2) VALUES (40); -SELECT * FROM t ORDER BY c1 ASC; -c1 c2 --1 -10 -1 10 -2 20 -3 30 -4 40 -DROP TABLE t; -# Reading from a partition table (partitions >= 2 ) after inserting a negative -# value into the auto increment column -CREATE TABLE t (c1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(c1), -c2 INT) ENGINE='NDB' PARTITION BY HASH(c1) PARTITIONS 2; -INSERT INTO t VALUES (-2,-20); -INSERT INTO t(c2) VALUES (30); -SELECT * FROM t ORDER BY c1 ASC; -c1 c2 --2 -20 -1 30 -DROP TABLE t; -# Inserting negative auto increment value into a partition table (partitions >= 2) -# auto increment value > 2. -CREATE TABLE t (c1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(c1), -c2 INT) ENGINE='NDB' PARTITION BY HASH(c1) PARTITIONS 2; -INSERT INTO t VALUES (-4,-20); -INSERT INTO t(c2) VALUES (30); -INSERT INTO t(c2) VALUES (40); -SELECT * FROM t ORDER BY c1 ASC; -c1 c2 --4 -20 -1 30 -2 40 -DROP TABLE t; -# Inserting -1 into autoincrement column of a partition table (partition >= 4) -CREATE TABLE t (c1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(c1), -c2 INT) ENGINE='NDB' PARTITION BY HASH(c1) PARTITIONS 4; -INSERT INTO t(c2) VALUES (10); -INSERT INTO t(c2) VALUES (20); -INSERT INTO t VALUES (-1,-10); -SELECT * FROM t ORDER BY c1 ASC; -c1 c2 --1 -10 -1 10 -2 20 -INSERT INTO t(c2) VALUES (30); -SELECT * FROM t ORDER BY c1 ASC; -c1 c2 --1 -10 -1 10 -2 20 -3 30 -DROP TABLE t; -# Deleting from an auto increment table after inserting negative values -CREATE TABLE t (c1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(c1), -c2 INT) ENGINE='NDB' PARTITION BY HASH(c1) PARTITIONS 4; -INSERT INTO t(c2) VALUES (10); -INSERT INTO t(c2) VALUES (20); -INSERT INTO t VALUES (-1,-10); -INSERT INTO t(c2) VALUES (30); -INSERT INTO t VALUES (-3,-20); -INSERT INTO t(c2) VALUES (40); -SELECT * FROM t ORDER BY c1 ASC; -c1 c2 --3 -20 --1 -10 -1 10 -2 20 -3 30 -4 40 -DELETE FROM t WHERE c1 > 1; -SELECT * FROM t ORDER BY c1 ASC; -c1 c2 --3 -20 --1 -10 -1 10 -DROP TABLE t; -# Inserting a positive value that exceeds maximum allowed value for an -# Auto Increment column (positive maximum) -CREATE TABLE t (c1 TINYINT NOT NULL AUTO_INCREMENT, PRIMARY KEY(c1), -c2 INT) ENGINE='NDB' PARTITION BY HASH(c1) PARTITIONS 4; -INSERT INTO t(c2) VALUES (10); -INSERT INTO t(c2) VALUES (20); -INSERT INTO t VALUES (126,30); -INSERT INTO t VALUES (127,40); -INSERT INTO t VALUES (128,50); -ERROR 23000: Duplicate entry '127' for key 'PRIMARY' -INSERT INTO t VALUES (129,60); -ERROR 23000: Duplicate entry '127' for key 'PRIMARY' -SELECT * FROM t ORDER BY c1 ASC; -c1 c2 -1 10 -2 20 -126 30 -127 40 -DROP TABLE t; -# Inserting a negative value that goes below minimum allowed value for an -# Auto Increment column (negative minimum) -CREATE TABLE t (c1 TINYINT NOT NULL AUTO_INCREMENT, PRIMARY KEY(c1), -c2 INT) ENGINE='NDB' PARTITION BY HASH(c1) PARTITIONS 4; -INSERT INTO t(c2) VALUES (10); -INSERT INTO t(c2) VALUES (20); -INSERT INTO t VALUES (-127,30); -INSERT INTO t VALUES (-128,40); -INSERT INTO t VALUES (-129,50); -ERROR 23000: Duplicate entry '-128' for key 'PRIMARY' -INSERT INTO t VALUES (-130,60); -ERROR 23000: Duplicate entry '-128' for key 'PRIMARY' -SELECT * FROM t ORDER BY c1 ASC; -c1 c2 --128 40 --127 30 -1 10 -2 20 -DROP TABLE t; -# Updating the partition table with a negative Auto Increment value -CREATE TABLE t (c1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(c1), -c2 INT) ENGINE='NDB' PARTITION BY HASH(c1) PARTITIONS 4; -INSERT INTO t(c2) VALUES (10); -INSERT INTO t(c2) VALUES (20); -INSERT INTO t VALUES (-1,-10); -INSERT INTO t(c2) VALUES (30); -SELECT * FROM t ORDER BY c1 ASC; -c1 c2 --1 -10 -1 10 -2 20 -3 30 -UPDATE t SET c1 = -6 WHERE c1 = 2; -SELECT * FROM t ORDER BY c1 ASC; -c1 c2 --6 20 --1 -10 -1 10 -3 30 -INSERT INTO t(c2) VALUES (40); -INSERT INTO t(c2) VALUES (50); -UPDATE t SET c1 = -6 WHERE c1 = 2; -SELECT * FROM t ORDER BY c1 ASC; -c1 c2 --6 20 --1 -10 -1 10 -3 30 -4 40 -5 50 -DROP TABLE t; -# Updating the partition table with a value that crosses the upper limits -# on both the positive and the negative side. -CREATE TABLE t (c1 TINYINT NOT NULL AUTO_INCREMENT, PRIMARY KEY(c1), -c2 INT) ENGINE='NDB' PARTITION BY HASH(c1) PARTITIONS 4; -INSERT INTO t(c2) VALUES (10); -INSERT INTO t(c2) VALUES (20); -INSERT INTO t VALUES (126,30); -INSERT INTO t VALUES (127,40); -SELECT * FROM t ORDER BY c1 ASC; -c1 c2 -1 10 -2 20 -126 30 -127 40 -UPDATE t SET c1 = 130 where c1 = 127; -Warnings: -Warning 1264 Out of range value for column 'c1' at row 1 -SELECT * FROM t ORDER BY c1 ASC; -c1 c2 -1 10 -2 20 -126 30 -127 40 -UPDATE t SET c1 = -140 where c1 = 126; -Warnings: -Warning 1264 Out of range value for column 'c1' at row 1 -SELECT * FROM t ORDER BY c1 ASC; -c1 c2 --128 30 -1 10 -2 20 -127 40 -DROP TABLE t; -############################################################################## diff --git a/mysql-test/suite/parts/r/partition_engine_ndb.result b/mysql-test/suite/parts/r/partition_engine_ndb.result deleted file mode 100644 index 6662032ef53..00000000000 --- a/mysql-test/suite/parts/r/partition_engine_ndb.result +++ /dev/null @@ -1,5203 +0,0 @@ -SET @max_row = 20; -SET @@session.storage_engine = 'ndbcluster'; - -#------------------------------------------------------------------------ -# 0. Setting of auxiliary variables + Creation of an auxiliary tables -# needed in many testcases -#------------------------------------------------------------------------ -SELECT @max_row DIV 2 INTO @max_row_div2; -SELECT @max_row DIV 3 INTO @max_row_div3; -SELECT @max_row DIV 4 INTO @max_row_div4; -SET @max_int_4 = 2147483647; -DROP TABLE IF EXISTS t0_template; -CREATE TABLE t0_template ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) , -PRIMARY KEY(f_int1)) -ENGINE = MEMORY; -# Logging of INSERTs into t0_template suppressed -DROP TABLE IF EXISTS t0_definition; -CREATE TABLE t0_definition ( -state CHAR(3), -create_command VARBINARY(5000), -file_list VARBINARY(10000), -PRIMARY KEY (state) -) ENGINE = MEMORY; -DROP TABLE IF EXISTS t0_aux; -CREATE TABLE t0_aux ( f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) ) -ENGINE = MEMORY; -SET AUTOCOMMIT= 1; -SET @@session.sql_mode= ''; -# End of basic preparations needed for all tests -#----------------------------------------------- - -#======================================================================== -# Checks where the engine is assigned on all supported (CREATE TABLE -# statement) positions + basic operations on the tables -# Storage engine mixups are currently (2005-12-23) not supported -#======================================================================== -DROP TABLE IF EXISTS t1; -#------------------------------------------------------------------------ -# 1 Assignment of storage engine just after column list only -#------------------------------------------------------------------------ -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) ENGINE = 'ndbcluster' -PARTITION BY HASH(f_int1) PARTITIONS 2; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1) -PARTITIONS 2 */ - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -#------------------------------------------------------------------------ -# 2 Assignment of storage engine just after partition or subpartition -# name only -#------------------------------------------------------------------------ -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) -( PARTITION part1 STORAGE ENGINE = 'ndbcluster', -PARTITION part2 STORAGE ENGINE = 'ndbcluster' -); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1) -(PARTITION part1 ENGINE = ndbcluster, - PARTITION part2 ENGINE = ndbcluster) */ - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) -SUBPARTITION BY HASH(f_int1) -( PARTITION part1 VALUES LESS THAN (10) -(SUBPARTITION subpart11 STORAGE ENGINE = 'ndbcluster', -SUBPARTITION subpart12 STORAGE ENGINE = 'ndbcluster'), -PARTITION part2 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart21 STORAGE ENGINE = 'ndbcluster', -SUBPARTITION subpart22 STORAGE ENGINE = 'ndbcluster') -); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) -SUBPARTITION BY HASH (f_int1) -(PARTITION part1 VALUES LESS THAN (10) - (SUBPARTITION subpart11 ENGINE = ndbcluster, - SUBPARTITION subpart12 ENGINE = ndbcluster), - PARTITION part2 VALUES LESS THAN (2147483646) - (SUBPARTITION subpart21 ENGINE = ndbcluster, - SUBPARTITION subpart22 ENGINE = ndbcluster)) */ - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; -ERROR HY000: Table has no partition for value 2147483647 -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -#------------------------------------------------------------------------ -# 3 Some but not all named partitions or subpartitions get a storage -# engine assigned -#------------------------------------------------------------------------ -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) -( PARTITION part1 STORAGE ENGINE = 'ndbcluster', -PARTITION part2 -); -ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) -( PARTITION part1 , -PARTITION part2 STORAGE ENGINE = 'ndbcluster' -); -ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) -SUBPARTITION BY HASH(f_int1) -( PARTITION part1 VALUES LESS THAN (10) -(SUBPARTITION subpart11, -SUBPARTITION subpart12 STORAGE ENGINE = 'ndbcluster'), -PARTITION part2 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart21 STORAGE ENGINE = 'ndbcluster', -SUBPARTITION subpart22 STORAGE ENGINE = 'ndbcluster') -); -ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) -SUBPARTITION BY HASH(f_int1) -( PARTITION part1 VALUES LESS THAN (10) -(SUBPARTITION subpart11 STORAGE ENGINE = 'ndbcluster', -SUBPARTITION subpart12 STORAGE ENGINE = 'ndbcluster'), -PARTITION part2 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart21, -SUBPARTITION subpart22 ) -); -ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -ENGINE = 'ndbcluster' -PARTITION BY RANGE(f_int1) -SUBPARTITION BY HASH(f_int1) -( PARTITION part1 VALUES LESS THAN (10) -(SUBPARTITION subpart11 STORAGE ENGINE = 'ndbcluster', -SUBPARTITION subpart12 STORAGE ENGINE = 'ndbcluster'), -PARTITION part2 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart21, -SUBPARTITION subpart22 ) -); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) -SUBPARTITION BY HASH (f_int1) -(PARTITION part1 VALUES LESS THAN (10) - (SUBPARTITION subpart11 ENGINE = ndbcluster, - SUBPARTITION subpart12 ENGINE = ndbcluster), - PARTITION part2 VALUES LESS THAN (2147483646) - (SUBPARTITION subpart21 ENGINE = ndbcluster, - SUBPARTITION subpart22 ENGINE = ndbcluster)) */ - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; -ERROR HY000: Table has no partition for value 2147483647 -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -#------------------------------------------------------------------------ -# 4 Storage engine assignment after partition name + after name of -# subpartitions belonging to another partition -#------------------------------------------------------------------------ -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) -SUBPARTITION BY HASH(f_int1) -( PARTITION part1 VALUES LESS THAN (10) -(SUBPARTITION subpart11, -SUBPARTITION subpart12), -PARTITION part2 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart21 STORAGE ENGINE = 'ndbcluster', -SUBPARTITION subpart22 STORAGE ENGINE = 'ndbcluster') -); -ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -ENGINE = 'ndbcluster' -PARTITION BY RANGE(f_int1) -SUBPARTITION BY HASH(f_int1) -( PARTITION part1 VALUES LESS THAN (10) ENGINE = 'ndbcluster' -(SUBPARTITION subpart11, -SUBPARTITION subpart12), -PARTITION part2 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart21, -SUBPARTITION subpart22 STORAGE ENGINE = 'ndbcluster') -); -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) -SUBPARTITION BY HASH(f_int1) -( PARTITION part1 VALUES LESS THAN (10) ENGINE = 'ndbcluster' -(SUBPARTITION subpart11, -SUBPARTITION subpart12), -PARTITION part2 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart21 STORAGE ENGINE = 'ndbcluster', -SUBPARTITION subpart22 STORAGE ENGINE = 'ndbcluster') -); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) -SUBPARTITION BY HASH (f_int1) -(PARTITION part1 VALUES LESS THAN (10) - (SUBPARTITION subpart11 ENGINE = ndbcluster, - SUBPARTITION subpart12 ENGINE = ndbcluster), - PARTITION part2 VALUES LESS THAN (2147483646) - (SUBPARTITION subpart21 ENGINE = ndbcluster, - SUBPARTITION subpart22 ENGINE = ndbcluster)) */ - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; -ERROR HY000: Table has no partition for value 2147483647 -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) -SUBPARTITION BY HASH(f_int1) -( PARTITION part1 VALUES LESS THAN (10) -(SUBPARTITION subpart11 STORAGE ENGINE = 'ndbcluster', -SUBPARTITION subpart12 STORAGE ENGINE = 'ndbcluster'), -PARTITION part2 VALUES LESS THAN (2147483646) ENGINE = 'ndbcluster' -(SUBPARTITION subpart21 ENGINE = 'ndbcluster', -SUBPARTITION subpart22) -); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) -SUBPARTITION BY HASH (f_int1) -(PARTITION part1 VALUES LESS THAN (10) - (SUBPARTITION subpart11 ENGINE = ndbcluster, - SUBPARTITION subpart12 ENGINE = ndbcluster), - PARTITION part2 VALUES LESS THAN (2147483646) - (SUBPARTITION subpart21 ENGINE = ndbcluster, - SUBPARTITION subpart22 ENGINE = ndbcluster)) */ - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; -ERROR HY000: Table has no partition for value 2147483647 -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -#------------------------------------------------------------------------ -# 5 Precedence of storage engine assignments (if there is any) -#------------------------------------------------------------------------ -# 5.1 Storage engine assignment after column list + after partition -# or subpartition name -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) ENGINE = 'ndbcluster' -PARTITION BY HASH(f_int1) -( PARTITION part1 STORAGE ENGINE = 'ndbcluster', -PARTITION part2 STORAGE ENGINE = 'ndbcluster' -); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1) -(PARTITION part1 ENGINE = ndbcluster, - PARTITION part2 ENGINE = ndbcluster) */ - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) -SUBPARTITION BY HASH(f_int1) -( PARTITION part1 VALUES LESS THAN (10) -(SUBPARTITION subpart11 STORAGE ENGINE = 'ndbcluster', -SUBPARTITION subpart12 STORAGE ENGINE = 'ndbcluster'), -PARTITION part2 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart21 STORAGE ENGINE = 'ndbcluster', -SUBPARTITION subpart22 STORAGE ENGINE = 'ndbcluster') -); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) -SUBPARTITION BY HASH (f_int1) -(PARTITION part1 VALUES LESS THAN (10) - (SUBPARTITION subpart11 ENGINE = ndbcluster, - SUBPARTITION subpart12 ENGINE = ndbcluster), - PARTITION part2 VALUES LESS THAN (2147483646) - (SUBPARTITION subpart21 ENGINE = ndbcluster, - SUBPARTITION subpart22 ENGINE = ndbcluster)) */ - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; -ERROR HY000: Table has no partition for value 2147483647 -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -# 6.2 Storage engine assignment after partition name + after -# subpartition name -# in partition part + in sub partition part -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) -SUBPARTITION BY HASH(f_int1) -( PARTITION part1 VALUES LESS THAN (10) STORAGE ENGINE = 'ndbcluster' -(SUBPARTITION subpart11 STORAGE ENGINE = 'ndbcluster', -SUBPARTITION subpart12 STORAGE ENGINE = 'ndbcluster'), -PARTITION part2 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart21 STORAGE ENGINE = 'ndbcluster', -SUBPARTITION subpart22 STORAGE ENGINE = 'ndbcluster') -); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) -SUBPARTITION BY HASH (f_int1) -(PARTITION part1 VALUES LESS THAN (10) - (SUBPARTITION subpart11 ENGINE = ndbcluster, - SUBPARTITION subpart12 ENGINE = ndbcluster), - PARTITION part2 VALUES LESS THAN (2147483646) - (SUBPARTITION subpart21 ENGINE = ndbcluster, - SUBPARTITION subpart22 ENGINE = ndbcluster)) */ - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; -ERROR HY000: Table has no partition for value 2147483647 -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -#------------------------------------------------------------------------ -# 6 Session default engine differs from engine used within create table -#------------------------------------------------------------------------ -SET SESSION storage_engine='MEMORY'; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) ( PARTITION part1 ENGINE = 'ndbcluster'); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1) -(PARTITION part1 ENGINE = ndbcluster) */ - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be not transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) -SUBPARTITION BY HASH(f_int1) -( PARTITION part1 VALUES LESS THAN (1000) -(SUBPARTITION subpart11 STORAGE ENGINE = 'ndbcluster', -SUBPARTITION subpart12 STORAGE ENGINE = 'ndbcluster')); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) -SUBPARTITION BY HASH (f_int1) -(PARTITION part1 VALUES LESS THAN (1000) - (SUBPARTITION subpart11 ENGINE = ndbcluster, - SUBPARTITION subpart12 ENGINE = ndbcluster)) */ - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be not transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -SET SESSION storage_engine='ndbcluster'; -DROP VIEW IF EXISTS v1; -DROP TABLE IF EXISTS t1; -DROP TABLE IF EXISTS t0_aux; -DROP TABLE IF EXISTS t0_definition; -DROP TABLE IF EXISTS t0_template; diff --git a/mysql-test/suite/parts/r/partition_int_ndb.result b/mysql-test/suite/parts/r/partition_int_ndb.result deleted file mode 100644 index d3c2d80d6b4..00000000000 --- a/mysql-test/suite/parts/r/partition_int_ndb.result +++ /dev/null @@ -1,557 +0,0 @@ -create table t1 (a tinyint unsigned not null, primary key(a)) engine='NDB' -partition by key (a) ( -partition pa1 max_rows=20 min_rows=2, -partition pa2 max_rows=30 min_rows=3, -partition pa3 max_rows=30 min_rows=4, -partition pa4 max_rows=40 min_rows=2); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` tinyint(3) unsigned NOT NULL, - PRIMARY KEY (`a`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) -(PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = ndbcluster, - PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = ndbcluster, - PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = ndbcluster, - PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = ndbcluster) */ -insert into t1 values (255), (254), (253), (252), (1), (2), (128); -select * from t1; -a -1 -128 -2 -252 -253 -254 -255 -select * from t1 where a=253; -a -253 -delete from t1 where a=253; -select * from t1; -a -1 -128 -2 -252 -254 -255 -drop table t1; -create table t2 (a tinyint unsigned not null, primary key(a)) engine='NDB' -partition by key (a) partitions 8; -show create table t2; -Table Create Table -t2 CREATE TABLE `t2` ( - `a` tinyint(3) unsigned NOT NULL, - PRIMARY KEY (`a`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) -PARTITIONS 8 */ -insert into t2 values (255), (254), (253), (252); -select * from t2; -a -252 -253 -254 -255 -select * from t2 where a=253; -a -253 -delete from t2 where a=253; -select * from t2; -a -252 -254 -255 -delete from t2; -255 inserts; -select count(*) from t2; -count(*) -255 -drop table t2; -create table t3 (a tinyint not null, primary key(a)) engine='NDB' -partition by key (a) partitions 7; -show create table t3; -Table Create Table -t3 CREATE TABLE `t3` ( - `a` tinyint(4) NOT NULL, - PRIMARY KEY (`a`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) -PARTITIONS 7 */ -insert into t3 values (127), (126), (125), (124), (-128), (-127), (1), (-1), (0); -select * from t3; -a --1 --127 --128 -0 -1 -124 -125 -126 -127 -select * from t3 where a=125; -a -125 -delete from t3 where a=125; -select * from t3; -a --1 --127 --128 -0 -1 -124 -126 -127 -drop table t3; -create table t1 (a smallint unsigned not null, primary key(a)) engine='NDB' -partition by key (a) ( -partition pa1 max_rows=20 min_rows=2, -partition pa2 max_rows=30 min_rows=3, -partition pa3 max_rows=30 min_rows=4, -partition pa4 max_rows=40 min_rows=2); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` smallint(5) unsigned NOT NULL, - PRIMARY KEY (`a`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) -(PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = ndbcluster, - PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = ndbcluster, - PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = ndbcluster, - PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = ndbcluster) */ -insert into t1 values (65535), (65534), (65533), (65532), (1), (2), (256); -select * from t1; -a -1 -2 -256 -65532 -65533 -65534 -65535 -select * from t1 where a=65533; -a -65533 -delete from t1 where a=65533; -select * from t1; -a -1 -2 -256 -65532 -65534 -65535 -drop table t1; -create table t2 (a smallint unsigned not null, primary key(a)) engine='NDB' -partition by key (a) partitions 8; -show create table t2; -Table Create Table -t2 CREATE TABLE `t2` ( - `a` smallint(5) unsigned NOT NULL, - PRIMARY KEY (`a`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) -PARTITIONS 8 */ -insert into t2 values (65535), (65534), (65533), (65532); -select * from t2; -a -65532 -65533 -65534 -65535 -select * from t2 where a=65533; -a -65533 -delete from t2 where a=65533; -select * from t2; -a -65532 -65534 -65535 -delete from t2; -1024 inserts; -select count(*) from t2; -count(*) -1024 -drop table t2; -create table t3 (a smallint not null, primary key(a)) engine='NDB' -partition by key (a) partitions 7; -show create table t3; -Table Create Table -t3 CREATE TABLE `t3` ( - `a` smallint(6) NOT NULL, - PRIMARY KEY (`a`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) -PARTITIONS 7 */ -insert into t3 values (32767), (32766), (32765), (32764), (-32768), (-32767), (1), (-1), (0); -select * from t3; -a --1 --32767 --32768 -0 -1 -32764 -32765 -32766 -32767 -select * from t3 where a=32765; -a -32765 -delete from t3 where a=32765; -select * from t3; -a --1 --32767 --32768 -0 -1 -32764 -32766 -32767 -drop table t3; -create table t1 (a int unsigned not null, primary key(a)) engine='NDB' -partition by key (a) ( -partition pa1 max_rows=20 min_rows=2, -partition pa2 max_rows=30 min_rows=3, -partition pa3 max_rows=30 min_rows=4, -partition pa4 max_rows=40 min_rows=2); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(10) unsigned NOT NULL, - PRIMARY KEY (`a`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) -(PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = ndbcluster, - PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = ndbcluster, - PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = ndbcluster, - PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = ndbcluster) */ -insert into t1 values (4294967295), (4294967294), (4294967293), (4294967292), (1), (2), (65535); -select * from t1; -a -1 -2 -4294967292 -4294967293 -4294967294 -4294967295 -65535 -select * from t1 where a=4294967293; -a -4294967293 -delete from t1 where a=4294967293; -select * from t1; -a -1 -2 -4294967292 -4294967294 -4294967295 -65535 -drop table t1; -create table t2 (a int unsigned not null, primary key(a)) engine='NDB' -partition by key (a) partitions 8; -show create table t2; -Table Create Table -t2 CREATE TABLE `t2` ( - `a` int(10) unsigned NOT NULL, - PRIMARY KEY (`a`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) -PARTITIONS 8 */ -insert into t2 values (4294967295), (4294967294), (4294967293), (4294967292); -select * from t2; -a -4294967292 -4294967293 -4294967294 -4294967295 -select * from t2 where a=4294967293; -a -4294967293 -delete from t2 where a=4294967293; -select * from t2; -a -4294967292 -4294967294 -4294967295 -delete from t2; -1024 inserts; -select count(*) from t2; -count(*) -1024 -drop table t2; -create table t3 (a int not null, primary key(a)) engine='NDB' -partition by key (a) partitions 7; -show create table t3; -Table Create Table -t3 CREATE TABLE `t3` ( - `a` int(11) NOT NULL, - PRIMARY KEY (`a`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) -PARTITIONS 7 */ -insert into t3 values (2147483647), (2147483646), (2147483645), (2147483644), (-2147483648), (-2147483647), (1), (-1), (0); -select * from t3; -a --1 --2147483647 --2147483648 -0 -1 -2147483644 -2147483645 -2147483646 -2147483647 -select * from t3 where a=2147483645; -a -2147483645 -delete from t3 where a=2147483645; -select * from t3; -a --1 --2147483647 --2147483648 -0 -1 -2147483644 -2147483646 -2147483647 -drop table t3; -create table t1 (a mediumint unsigned not null, primary key(a)) engine='NDB' -partition by key (a) ( -partition pa1 max_rows=20 min_rows=2, -partition pa2 max_rows=30 min_rows=3, -partition pa3 max_rows=30 min_rows=4, -partition pa4 max_rows=40 min_rows=2); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` mediumint(8) unsigned NOT NULL, - PRIMARY KEY (`a`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) -(PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = ndbcluster, - PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = ndbcluster, - PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = ndbcluster, - PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = ndbcluster) */ -insert into t1 values (16777215), (16777214), (16777213), (16777212), (1), (2), (65535); -select * from t1; -a -1 -16777212 -16777213 -16777214 -16777215 -2 -65535 -select * from t1 where a=16777213; -a -16777213 -delete from t1 where a=16777213; -select * from t1; -a -1 -16777212 -16777214 -16777215 -2 -65535 -drop table t1; -create table t2 (a mediumint unsigned not null, primary key(a)) engine='NDB' -partition by key (a) partitions 8; -show create table t2; -Table Create Table -t2 CREATE TABLE `t2` ( - `a` mediumint(8) unsigned NOT NULL, - PRIMARY KEY (`a`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) -PARTITIONS 8 */ -insert into t2 values (16777215), (16777214), (16777213), (16777212); -select * from t2; -a -16777212 -16777213 -16777214 -16777215 -select * from t2 where a=16777213; -a -16777213 -delete from t2 where a=16777213; -select * from t2; -a -16777212 -16777214 -16777215 -delete from t2; -1024 inserts; -select count(*) from t2; -count(*) -1024 -drop table t2; -create table t3 (a mediumint not null, primary key(a)) engine='NDB' -partition by key (a) partitions 7; -show create table t3; -Table Create Table -t3 CREATE TABLE `t3` ( - `a` mediumint(9) NOT NULL, - PRIMARY KEY (`a`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) -PARTITIONS 7 */ -insert into t3 values (8388607), (8388606), (8388605), (8388604), (-8388608), (-8388607), (1), (-1), (0); -select * from t3; -a --1 --8388607 --8388608 -0 -1 -8388604 -8388605 -8388606 -8388607 -select * from t3 where a=8388605; -a -8388605 -delete from t3 where a=8388605; -select * from t3; -a --1 --8388607 --8388608 -0 -1 -8388604 -8388606 -8388607 -drop table t3; -create table t1 (a bigint unsigned not null, primary key(a)) engine='NDB' -partition by key (a) ( -partition pa1 max_rows=20 min_rows=2, -partition pa2 max_rows=30 min_rows=3, -partition pa3 max_rows=30 min_rows=4, -partition pa4 max_rows=40 min_rows=2); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` bigint(20) unsigned NOT NULL, - PRIMARY KEY (`a`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) -(PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = ndbcluster, - PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = ndbcluster, - PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = ndbcluster, - PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = ndbcluster) */ -insert into t1 values (18446744073709551615), (0xFFFFFFFFFFFFFFFE), (18446744073709551613), (18446744073709551612), (1), (2), (65535); -select * from t1; -a -1 -18446744073709551612 -18446744073709551613 -18446744073709551614 -18446744073709551615 -2 -65535 -select * from t1 where a=-2; -a -delete from t1 where a=-2; -select * from t1; -a -1 -18446744073709551612 -18446744073709551613 -18446744073709551614 -18446744073709551615 -2 -65535 -select * from t1 where a=18446744073709551615; -a -18446744073709551615 -delete from t1 where a=18446744073709551615; -select * from t1; -a -1 -18446744073709551612 -18446744073709551613 -18446744073709551614 -2 -65535 -drop table t1; -create table t2 (a bigint unsigned not null, primary key(a)) engine='NDB' -partition by key (a) partitions 8; -show create table t2; -Table Create Table -t2 CREATE TABLE `t2` ( - `a` bigint(20) unsigned NOT NULL, - PRIMARY KEY (`a`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) -PARTITIONS 8 */ -insert into t2 values (18446744073709551615), (0xFFFFFFFFFFFFFFFE), (18446744073709551613), (18446744073709551612); -select * from t2; -a -18446744073709551612 -18446744073709551613 -18446744073709551614 -18446744073709551615 -select * from t2 where a=18446744073709551615; -a -18446744073709551615 -delete from t2 where a=18446744073709551615; -select * from t2; -a -18446744073709551612 -18446744073709551613 -18446744073709551614 -delete from t2; -1024 inserts; -select count(*) from t2; -count(*) -1024 -drop table t2; -create table t3 (a bigint not null, primary key(a)) engine='NDB' -partition by key (a) partitions 7; -show create table t3; -Table Create Table -t3 CREATE TABLE `t3` ( - `a` bigint(20) NOT NULL, - PRIMARY KEY (`a`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) -PARTITIONS 7 */ -insert into t3 values (9223372036854775807), (9223372036854775806), (9223372036854775805), (9223372036854775804), (-9223372036854775808), (-9223372036854775807), (1), (-1), (0); -select * from t3; -a --1 --9223372036854775807 --9223372036854775808 -0 -1 -9223372036854775804 -9223372036854775805 -9223372036854775806 -9223372036854775807 -select * from t3 where a=9223372036854775806; -a -9223372036854775806 -delete from t3 where a=9223372036854775806; -select * from t3; -a --1 --9223372036854775807 --9223372036854775808 -0 -1 -9223372036854775804 -9223372036854775805 -9223372036854775807 -drop table t3; diff --git a/mysql-test/suite/parts/r/partition_mgm_lc0_ndb.result b/mysql-test/suite/parts/r/partition_mgm_lc0_ndb.result deleted file mode 100644 index 15b3f424527..00000000000 --- a/mysql-test/suite/parts/r/partition_mgm_lc0_ndb.result +++ /dev/null @@ -1,198 +0,0 @@ -# Creating database MySQL_TEST_DB -CREATE DATABASE MySQL_Test_DB; -USE MySQL_Test_DB; -# 1.0 KEY partitioning mgm -# Creating KEY partitioned table -CREATE TABLE TableA (a INT) -ENGINE = 'NDBCluster' -PARTITION BY KEY (a) -(PARTITION parta , -PARTITION partB , -PARTITION Partc , -PARTITION PartD ); -INSERT INTO TableA VALUES (1), (2), (7), (8), (9), (10); -INSERT INTO TableA VALUES (3), (4), (5), (6), (11), (12); -SELECT * FROM TableA; -a -1 -10 -11 -12 -2 -3 -4 -5 -6 -7 -8 -9 -# Test of ADD/COALESCE PARTITIONS -# expecting duplicate partition name -ALTER TABLE TableA ADD PARTITION -(PARTITION partA, -PARTITION Parta, -PARTITION PartA); -ERROR HY000: Duplicate partition name parta -ALTER TABLE TableA ADD PARTITION -(PARTITION partE, -PARTITION Partf, -PARTITION PartG); -SELECT * FROM TableA; -a -1 -10 -11 -12 -2 -3 -4 -5 -6 -7 -8 -9 -SHOW CREATE TABLE TableA; -Table Create Table -TableA CREATE TABLE `TableA` ( - `a` int(11) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) -(PARTITION parta ENGINE = ndbcluster, - PARTITION partB ENGINE = ndbcluster, - PARTITION Partc ENGINE = ndbcluster, - PARTITION PartD ENGINE = ndbcluster, - PARTITION partE ENGINE = ndbcluster, - PARTITION Partf ENGINE = ndbcluster, - PARTITION PartG ENGINE = ndbcluster) */ -ALTER TABLE TableA COALESCE PARTITION 4; -SELECT * FROM TableA; -a -1 -10 -11 -12 -2 -3 -4 -5 -6 -7 -8 -9 -SHOW CREATE TABLE TableA; -Table Create Table -TableA CREATE TABLE `TableA` ( - `a` int(11) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) -(PARTITION parta ENGINE = ndbcluster, - PARTITION partB ENGINE = ndbcluster, - PARTITION Partc ENGINE = ndbcluster) */ -# Test of REORGANIZE PARTITIONS -# Should not work on HASH/KEY -ALTER TABLE TableA REORGANIZE PARTITION parta,partB,Partc INTO -(PARTITION PARTA , -PARTITION partc ); -ERROR HY000: REORGANIZE PARTITION can only be used to reorganize partitions not to change their numbers -ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO -(PARTITION partB , -PARTITION parta ); -ERROR HY000: When reorganizing a set of partitions they must be in consecutive order -ALTER TABLE TableA REORGANIZE PARTITION parta,partB INTO -(PARTITION partB COMMENT="Previusly named parta", -PARTITION parta COMMENT="Previusly named partB"); -SELECT * FROM TableA; -a -1 -10 -11 -12 -2 -3 -4 -5 -6 -7 -8 -9 -SHOW CREATE TABLE TableA; -Table Create Table -TableA CREATE TABLE `TableA` ( - `a` int(11) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) -(PARTITION partB COMMENT = 'Previusly named parta' ENGINE = ndbcluster, - PARTITION parta COMMENT = 'Previusly named partB' ENGINE = ndbcluster, - PARTITION Partc ENGINE = ndbcluster) */ -# Test of RENAME TABLE -RENAME TABLE TableA to TableB; -SELECT * FROM TableB; -a -1 -10 -11 -12 -2 -3 -4 -5 -6 -7 -8 -9 -RENAME TABLE TableB to TableA; -SELECT * FROM TableA; -a -1 -10 -11 -12 -2 -3 -4 -5 -6 -7 -8 -9 -# Checking name comparision Upper vs Lower case -# Error if lower_case_table_names != 0 -# lower_case_table_names: 0 -# Test of REMOVE PARTITIONING -ALTER TABLE TableA REMOVE PARTITIONING; -SELECT * FROM TableA; -a -1 -10 -11 -12 -2 -3 -4 -5 -6 -7 -8 -9 -SHOW CREATE TABLE TableA; -Table Create Table -TableA CREATE TABLE `TableA` ( - `a` int(11) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -# Cleaning up after KEY PARTITIONING test -DROP TABLE TableA; -# Verify that TRUNCATE PARTITION gives error -CREATE TABLE t1 -(a BIGINT AUTO_INCREMENT PRIMARY KEY, -b VARCHAR(255)) -ENGINE = 'NDBCluster' -PARTITION BY KEY (a) -(PARTITION LT1000, -PARTITION LT2000, -PARTITION MAX); -INSERT INTO t1 VALUES (NULL, "First"), (NULL, "Second"), (999, "Last in LT1000"), (NULL, "First in LT2000"), (NULL, "Second in LT2000"), (1999, "Last in LT2000"), (NULL, "First in MAX"), (NULL, "Second in MAX"); -ALTER TABLE t1 TRUNCATE PARTITION MAX; -Got one of the listed errors -# Cleaning up before exit -USE test; -DROP DATABASE MySQL_Test_DB; diff --git a/mysql-test/suite/parts/r/partition_mgm_lc1_ndb.result b/mysql-test/suite/parts/r/partition_mgm_lc1_ndb.result deleted file mode 100644 index 1d221caa163..00000000000 --- a/mysql-test/suite/parts/r/partition_mgm_lc1_ndb.result +++ /dev/null @@ -1,236 +0,0 @@ -# Creating database MySQL_TEST_DB -CREATE DATABASE MySQL_Test_DB; -USE MySQL_Test_DB; -# 1.0 KEY partitioning mgm -# Creating KEY partitioned table -CREATE TABLE TableA (a INT) -ENGINE = 'NDBCluster' -PARTITION BY KEY (a) -(PARTITION parta , -PARTITION partB , -PARTITION Partc , -PARTITION PartD ); -INSERT INTO TableA VALUES (1), (2), (7), (8), (9), (10); -INSERT INTO TableA VALUES (3), (4), (5), (6), (11), (12); -SELECT * FROM TableA; -a -1 -10 -11 -12 -2 -3 -4 -5 -6 -7 -8 -9 -# Test of ADD/COALESCE PARTITIONS -# expecting duplicate partition name -ALTER TABLE TableA ADD PARTITION -(PARTITION partA, -PARTITION Parta, -PARTITION PartA); -ERROR HY000: Duplicate partition name parta -ALTER TABLE TableA ADD PARTITION -(PARTITION partE, -PARTITION Partf, -PARTITION PartG); -SELECT * FROM TableA; -a -1 -10 -11 -12 -2 -3 -4 -5 -6 -7 -8 -9 -SHOW CREATE TABLE TableA; -Table Create Table -TableA CREATE TABLE `tablea` ( - `a` int(11) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) -(PARTITION parta ENGINE = ndbcluster, - PARTITION partB ENGINE = ndbcluster, - PARTITION Partc ENGINE = ndbcluster, - PARTITION PartD ENGINE = ndbcluster, - PARTITION partE ENGINE = ndbcluster, - PARTITION Partf ENGINE = ndbcluster, - PARTITION PartG ENGINE = ndbcluster) */ -ALTER TABLE TableA COALESCE PARTITION 4; -SELECT * FROM TableA; -a -1 -10 -11 -12 -2 -3 -4 -5 -6 -7 -8 -9 -SHOW CREATE TABLE TableA; -Table Create Table -TableA CREATE TABLE `tablea` ( - `a` int(11) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) -(PARTITION parta ENGINE = ndbcluster, - PARTITION partB ENGINE = ndbcluster, - PARTITION Partc ENGINE = ndbcluster) */ -# Test of REORGANIZE PARTITIONS -# Should not work on HASH/KEY -ALTER TABLE TableA REORGANIZE PARTITION parta,partB,Partc INTO -(PARTITION PARTA , -PARTITION partc ); -ERROR HY000: REORGANIZE PARTITION can only be used to reorganize partitions not to change their numbers -ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO -(PARTITION partB , -PARTITION parta ); -ERROR HY000: When reorganizing a set of partitions they must be in consecutive order -ALTER TABLE TableA REORGANIZE PARTITION parta,partB INTO -(PARTITION partB COMMENT="Previusly named parta", -PARTITION parta COMMENT="Previusly named partB"); -SELECT * FROM TableA; -a -1 -10 -11 -12 -2 -3 -4 -5 -6 -7 -8 -9 -SHOW CREATE TABLE TableA; -Table Create Table -TableA CREATE TABLE `tablea` ( - `a` int(11) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) -(PARTITION partB COMMENT = 'Previusly named parta' ENGINE = ndbcluster, - PARTITION parta COMMENT = 'Previusly named partB' ENGINE = ndbcluster, - PARTITION Partc ENGINE = ndbcluster) */ -# Test of RENAME TABLE -RENAME TABLE TableA to TableB; -SELECT * FROM TableB; -a -1 -10 -11 -12 -2 -3 -4 -5 -6 -7 -8 -9 -RENAME TABLE TableB to TableA; -SELECT * FROM TableA; -a -1 -10 -11 -12 -2 -3 -4 -5 -6 -7 -8 -9 -# Checking name comparision Upper vs Lower case -# Error if lower_case_table_names != 0 -# lower_case_table_names: 1 -CREATE TABLE tablea (a INT) -ENGINE = 'NDBCluster' -PARTITION BY KEY (a) -(PARTITION parta , -PARTITION partB , -PARTITION Partc , -PARTITION PartD ); -ERROR 42S01: Table 'tablea' already exists -SHOW TABLES; -Tables_in_mysql_test_db -tablea -RENAME TABLE TableA to tablea; -ERROR 42S01: Table 'tablea' already exists -RENAME TABLE tablea to TableA; -ERROR 42S01: Table 'tablea' already exists -SELECT * FROM tablea; -a -1 -10 -11 -12 -2 -3 -4 -5 -6 -7 -8 -9 -SHOW CREATE TABLE tablea; -Table Create Table -tablea CREATE TABLE `tablea` ( - `a` int(11) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) -(PARTITION partB COMMENT = 'Previusly named parta' ENGINE = ndbcluster, - PARTITION parta COMMENT = 'Previusly named partB' ENGINE = ndbcluster, - PARTITION Partc ENGINE = ndbcluster) */ -# Test of REMOVE PARTITIONING -ALTER TABLE TableA REMOVE PARTITIONING; -SELECT * FROM TableA; -a -1 -10 -11 -12 -2 -3 -4 -5 -6 -7 -8 -9 -SHOW CREATE TABLE TableA; -Table Create Table -TableA CREATE TABLE `tablea` ( - `a` int(11) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -# Cleaning up after KEY PARTITIONING test -DROP TABLE TableA; -# Verify that TRUNCATE PARTITION gives error -CREATE TABLE t1 -(a BIGINT AUTO_INCREMENT PRIMARY KEY, -b VARCHAR(255)) -ENGINE = 'NDBCluster' -PARTITION BY KEY (a) -(PARTITION LT1000, -PARTITION LT2000, -PARTITION MAX); -INSERT INTO t1 VALUES (NULL, "First"), (NULL, "Second"), (999, "Last in LT1000"), (NULL, "First in LT2000"), (NULL, "Second in LT2000"), (1999, "Last in LT2000"), (NULL, "First in MAX"), (NULL, "Second in MAX"); -ALTER TABLE t1 TRUNCATE PARTITION MAX; -Got one of the listed errors -# Cleaning up before exit -USE test; -DROP DATABASE MySQL_Test_DB; diff --git a/mysql-test/suite/parts/r/partition_mgm_lc2_ndb.result b/mysql-test/suite/parts/r/partition_mgm_lc2_ndb.result deleted file mode 100644 index 2f5dfe5e08e..00000000000 --- a/mysql-test/suite/parts/r/partition_mgm_lc2_ndb.result +++ /dev/null @@ -1,236 +0,0 @@ -# Creating database MySQL_TEST_DB -CREATE DATABASE MySQL_Test_DB; -USE MySQL_Test_DB; -# 1.0 KEY partitioning mgm -# Creating KEY partitioned table -CREATE TABLE TableA (a INT) -ENGINE = 'NDBCluster' -PARTITION BY KEY (a) -(PARTITION parta , -PARTITION partB , -PARTITION Partc , -PARTITION PartD ); -INSERT INTO TableA VALUES (1), (2), (7), (8), (9), (10); -INSERT INTO TableA VALUES (3), (4), (5), (6), (11), (12); -SELECT * FROM TableA; -a -1 -10 -11 -12 -2 -3 -4 -5 -6 -7 -8 -9 -# Test of ADD/COALESCE PARTITIONS -# expecting duplicate partition name -ALTER TABLE TableA ADD PARTITION -(PARTITION partA, -PARTITION Parta, -PARTITION PartA); -ERROR HY000: Duplicate partition name parta -ALTER TABLE TableA ADD PARTITION -(PARTITION partE, -PARTITION Partf, -PARTITION PartG); -SELECT * FROM TableA; -a -1 -10 -11 -12 -2 -3 -4 -5 -6 -7 -8 -9 -SHOW CREATE TABLE TableA; -Table Create Table -TableA CREATE TABLE `TableA` ( - `a` int(11) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) -(PARTITION parta ENGINE = ndbcluster, - PARTITION partB ENGINE = ndbcluster, - PARTITION Partc ENGINE = ndbcluster, - PARTITION PartD ENGINE = ndbcluster, - PARTITION partE ENGINE = ndbcluster, - PARTITION Partf ENGINE = ndbcluster, - PARTITION PartG ENGINE = ndbcluster) */ -ALTER TABLE TableA COALESCE PARTITION 4; -SELECT * FROM TableA; -a -1 -10 -11 -12 -2 -3 -4 -5 -6 -7 -8 -9 -SHOW CREATE TABLE TableA; -Table Create Table -TableA CREATE TABLE `TableA` ( - `a` int(11) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) -(PARTITION parta ENGINE = ndbcluster, - PARTITION partB ENGINE = ndbcluster, - PARTITION Partc ENGINE = ndbcluster) */ -# Test of REORGANIZE PARTITIONS -# Should not work on HASH/KEY -ALTER TABLE TableA REORGANIZE PARTITION parta,partB,Partc INTO -(PARTITION PARTA , -PARTITION partc ); -ERROR HY000: REORGANIZE PARTITION can only be used to reorganize partitions not to change their numbers -ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO -(PARTITION partB , -PARTITION parta ); -ERROR HY000: When reorganizing a set of partitions they must be in consecutive order -ALTER TABLE TableA REORGANIZE PARTITION parta,partB INTO -(PARTITION partB COMMENT="Previusly named parta", -PARTITION parta COMMENT="Previusly named partB"); -SELECT * FROM TableA; -a -1 -10 -11 -12 -2 -3 -4 -5 -6 -7 -8 -9 -SHOW CREATE TABLE TableA; -Table Create Table -TableA CREATE TABLE `TableA` ( - `a` int(11) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) -(PARTITION partB COMMENT = 'Previusly named parta' ENGINE = ndbcluster, - PARTITION parta COMMENT = 'Previusly named partB' ENGINE = ndbcluster, - PARTITION Partc ENGINE = ndbcluster) */ -# Test of RENAME TABLE -RENAME TABLE TableA to TableB; -SELECT * FROM TableB; -a -1 -10 -11 -12 -2 -3 -4 -5 -6 -7 -8 -9 -RENAME TABLE TableB to TableA; -SELECT * FROM TableA; -a -1 -10 -11 -12 -2 -3 -4 -5 -6 -7 -8 -9 -# Checking name comparision Upper vs Lower case -# Error if lower_case_table_names != 0 -# lower_case_table_names: 2 -CREATE TABLE tablea (a INT) -ENGINE = 'NDBCluster' -PARTITION BY KEY (a) -(PARTITION parta , -PARTITION partB , -PARTITION Partc , -PARTITION PartD ); -ERROR 42S01: Table 'tablea' already exists -SHOW TABLES; -Tables_in_mysql_test_db -TableA -RENAME TABLE TableA to tablea; -ERROR 42S01: Table 'tablea' already exists -RENAME TABLE tablea to TableA; -ERROR 42S01: Table 'TableA' already exists -SELECT * FROM tablea; -a -1 -10 -11 -12 -2 -3 -4 -5 -6 -7 -8 -9 -SHOW CREATE TABLE tablea; -Table Create Table -tablea CREATE TABLE `tablea` ( - `a` int(11) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) -(PARTITION partB COMMENT = 'Previusly named parta' ENGINE = ndbcluster, - PARTITION parta COMMENT = 'Previusly named partB' ENGINE = ndbcluster, - PARTITION Partc ENGINE = ndbcluster) */ -# Test of REMOVE PARTITIONING -ALTER TABLE TableA REMOVE PARTITIONING; -SELECT * FROM TableA; -a -1 -10 -11 -12 -2 -3 -4 -5 -6 -7 -8 -9 -SHOW CREATE TABLE TableA; -Table Create Table -TableA CREATE TABLE `TableA` ( - `a` int(11) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -# Cleaning up after KEY PARTITIONING test -DROP TABLE TableA; -# Verify that TRUNCATE PARTITION gives error -CREATE TABLE t1 -(a BIGINT AUTO_INCREMENT PRIMARY KEY, -b VARCHAR(255)) -ENGINE = 'NDBCluster' -PARTITION BY KEY (a) -(PARTITION LT1000, -PARTITION LT2000, -PARTITION MAX); -INSERT INTO t1 VALUES (NULL, "First"), (NULL, "Second"), (999, "Last in LT1000"), (NULL, "First in LT2000"), (NULL, "Second in LT2000"), (1999, "Last in LT2000"), (NULL, "First in MAX"), (NULL, "Second in MAX"); -ALTER TABLE t1 TRUNCATE PARTITION MAX; -Got one of the listed errors -# Cleaning up before exit -USE test; -DROP DATABASE MySQL_Test_DB; diff --git a/mysql-test/suite/parts/r/partition_syntax_ndb.result b/mysql-test/suite/parts/r/partition_syntax_ndb.result deleted file mode 100644 index 2b0899fe53a..00000000000 --- a/mysql-test/suite/parts/r/partition_syntax_ndb.result +++ /dev/null @@ -1,1820 +0,0 @@ -SET @max_row = 20; -SET @@session.storage_engine = 'ndbcluster'; - -#------------------------------------------------------------------------ -# There are several testcases disabled because of the open bugs -# #15890 -# #18730, Bug#18735 -# The expected results suffer from the following bugs -# harmless #17455, #19305 -# which cannot be suppressed because of technical reasons. -#------------------------------------------------------------------------ - -#------------------------------------------------------------------------ -# 0. Setting of auxiliary variables + Creation of an auxiliary tables -# needed in many testcases -#------------------------------------------------------------------------ -SELECT @max_row DIV 2 INTO @max_row_div2; -SELECT @max_row DIV 3 INTO @max_row_div3; -SELECT @max_row DIV 4 INTO @max_row_div4; -SET @max_int_4 = 2147483647; -DROP TABLE IF EXISTS t0_template; -CREATE TABLE t0_template ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) , -PRIMARY KEY(f_int1)) -ENGINE = MEMORY; -# Logging of INSERTs into t0_template suppressed -DROP TABLE IF EXISTS t0_definition; -CREATE TABLE t0_definition ( -state CHAR(3), -create_command VARBINARY(5000), -file_list VARBINARY(5000), -PRIMARY KEY (state) -) ENGINE = MEMORY; -DROP TABLE IF EXISTS t0_aux; -CREATE TABLE t0_aux ( f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) ) -ENGINE = MEMORY; -SET AUTOCOMMIT= 1; -SET @@session.sql_mode= ''; -# End of basic preparations needed for all tests -#----------------------------------------------- - -#======================================================================== -# 1. Any PRIMARY KEYs or UNIQUE INDEXes must contain the columns used -# within the partitioning functions -#======================================================================== -DROP TABLE IF EXISTS t1; -#------------------------------------------------------------------------ -# 1.1 column of partitioning function not included in PRIMARY KEY -# PARTITION BY HASH/KEY/LIST/RANGE -#------------------------------------------------------------------------ -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -PRIMARY KEY (f_int2) -) -PARTITION BY HASH(f_int1) PARTITIONS 2; -ERROR HY000: A PRIMARY KEY need to include all fields in the partition function -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -PRIMARY KEY (f_int2) -) -PARTITION BY HASH(f_int1 + f_int2) PARTITIONS 2; -ERROR HY000: A PRIMARY KEY need to include all fields in the partition function -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -PRIMARY KEY (f_int2) -) -PARTITION BY KEY(f_int1) PARTITIONS 2; -ERROR HY000: A PRIMARY KEY need to include all fields in the partition function -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -PRIMARY KEY (f_int2) -) -PARTITION BY KEY(f_int1,f_int2) PARTITIONS 2; -ERROR HY000: A PRIMARY KEY need to include all fields in the partition function -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -PRIMARY KEY (f_int2) -) -PARTITION BY LIST(f_int1) -(PARTITION part1 VALUES IN (1)); -ERROR HY000: A PRIMARY KEY need to include all fields in the partition function -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -PRIMARY KEY (f_int2) -) -PARTITION BY LIST(f_int1 + f_int2) -(PARTITION part1 VALUES IN (1)); -ERROR HY000: A PRIMARY KEY need to include all fields in the partition function -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -PRIMARY KEY (f_int2) -) -PARTITION BY RANGE(f_int1) -(PARTITION part1 VALUES LESS THAN (1)); -ERROR HY000: A PRIMARY KEY need to include all fields in the partition function -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -PRIMARY KEY (f_int2) -) -PARTITION BY RANGE(f_int1 + f_int2) -(PARTITION part1 VALUES LESS THAN (1)); -ERROR HY000: A PRIMARY KEY need to include all fields in the partition function -#------------------------------------------------------------------------ -# 1.2 column of partitioning function not included in UNIQUE INDEX -# PARTITION BY HASH/KEY/LIST/RANGE -# Variant a) Without additional PRIMARY KEY -# Variant b) With correct additional PRIMARY KEY -# Variant 1) one column in partitioning function -# Variant 2) two columns in partitioning function -#------------------------------------------------------------------------ -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -UNIQUE INDEX (f_int2) -) -PARTITION BY HASH(f_int1) PARTITIONS 2; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -PRIMARY KEY(f_int1,f_int2), UNIQUE INDEX (f_int2) -) -PARTITION BY HASH(f_int1) PARTITIONS 2; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -UNIQUE INDEX (f_int2) -) -PARTITION BY HASH(f_int1 + f_int2) PARTITIONS 2; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -PRIMARY KEY(f_int1,f_int2), UNIQUE INDEX (f_int2) -) -PARTITION BY HASH(f_int1 + f_int2) PARTITIONS 2; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -UNIQUE INDEX (f_int2) -) -PARTITION BY KEY(f_int1) PARTITIONS 2; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -PRIMARY KEY(f_int1,f_int2), UNIQUE INDEX (f_int2) -) -PARTITION BY KEY(f_int1) PARTITIONS 2; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -UNIQUE INDEX (f_int2) -) -PARTITION BY KEY(f_int1,f_int2) PARTITIONS 2; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -PRIMARY KEY(f_int1,f_int2), UNIQUE INDEX (f_int2) -) -PARTITION BY KEY(f_int1,f_int2) PARTITIONS 2; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -UNIQUE INDEX (f_int2) -) -PARTITION BY LIST(MOD(f_int1,3)) -(PARTITION partN VALUES IN (NULL), -PARTITION part0 VALUES IN (0), -PARTITION part1 VALUES IN (1), -PARTITION part2 VALUES IN (2)); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -PRIMARY KEY(f_int1,f_int2), UNIQUE INDEX (f_int2) -) -PARTITION BY LIST(MOD(f_int1,3)) -(PARTITION partN VALUES IN (NULL), -PARTITION part0 VALUES IN (0), -PARTITION part1 VALUES IN (1), -PARTITION part2 VALUES IN (2)); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -UNIQUE INDEX (f_int2) -) -PARTITION BY LIST(MOD(f_int1 + f_int2,3)) -(PARTITION partN VALUES IN (NULL), -PARTITION part0 VALUES IN (0), -PARTITION part1 VALUES IN (1), -PARTITION part2 VALUES IN (2)); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -PRIMARY KEY(f_int1,f_int2), UNIQUE INDEX (f_int2) -) -PARTITION BY LIST(MOD(f_int1 + f_int2,3)) -(PARTITION partN VALUES IN (NULL), -PARTITION part0 VALUES IN (0), -PARTITION part1 VALUES IN (1), -PARTITION part2 VALUES IN (2)); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -UNIQUE INDEX (f_int2) -) -PARTITION BY RANGE(f_int1) -(PARTITION part1 VALUES LESS THAN (1), -PARTITION part2 VALUES LESS THAN (2147483646)); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -PRIMARY KEY(f_int1,f_int2), UNIQUE INDEX (f_int2) -) -PARTITION BY RANGE(f_int1) -(PARTITION part1 VALUES LESS THAN (1), -PARTITION part2 VALUES LESS THAN (2147483646)); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -UNIQUE INDEX (f_int2) -) -PARTITION BY RANGE(f_int1 + f_int2) -(PARTITION part1 VALUES LESS THAN (1), -PARTITION part2 VALUES LESS THAN (2147483646)); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -PRIMARY KEY(f_int1,f_int2), UNIQUE INDEX (f_int2) -) -PARTITION BY RANGE(f_int1 + f_int2) -(PARTITION part1 VALUES LESS THAN (1), -PARTITION part2 VALUES LESS THAN (2147483646)); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -DROP TABLE t1; -#------------------------------------------------------------------------ -# 1.3 column of subpartitioning function not included in PRIMARY KEY -# PARTITION BY RANGE/LIST -- SUBPARTITION BY HASH/KEY -#------------------------------------------------------------------------ -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -PRIMARY KEY (f_int2) -) -PARTITION BY RANGE(f_int2) SUBPARTITION BY HASH(f_int1) -(PARTITION part1 VALUES LESS THAN (1) -(SUBPARTITION subpart1)); -ERROR HY000: A PRIMARY KEY need to include all fields in the partition function -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -PRIMARY KEY (f_int2) -) -PARTITION BY RANGE(f_int2) SUBPARTITION BY KEY(f_int1) -(PARTITION part1 VALUES LESS THAN (1) -(SUBPARTITION subpart1)); -ERROR HY000: A PRIMARY KEY need to include all fields in the partition function -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -PRIMARY KEY (f_int2) -) -PARTITION BY LIST(f_int2) SUBPARTITION BY HASH(f_int1) -(PARTITION part1 VALUES IN (1) -(SUBPARTITION subpart1)); -ERROR HY000: A PRIMARY KEY need to include all fields in the partition function -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -PRIMARY KEY (f_int2) -) -PARTITION BY LIST(f_int2) SUBPARTITION BY KEY(f_int1) -(PARTITION part1 VALUES IN (1) -(SUBPARTITION subpart1)); -ERROR HY000: A PRIMARY KEY need to include all fields in the partition function -#------------------------------------------------------------------------ -# 1.4 column of subpartitioning function not included in UNIQUE INDEX -# PARTITION BY RANGE/LIST -- SUBPARTITION BY HASH/KEY -# Variant a) Without additional PRIMARY KEY -# Variant b) With correct additional PRIMARY KEY -#------------------------------------------------------------------------ -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -UNIQUE INDEX (f_int2) -) -PARTITION BY RANGE(f_int2) -SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 3 -(PARTITION part1 VALUES LESS THAN (1), -PARTITION part2 VALUES LESS THAN (2147483646)); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -PRIMARY KEY(f_int1,f_int2), UNIQUE INDEX (f_int2) -) -PARTITION BY RANGE(f_int2) -SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 3 -(PARTITION part1 VALUES LESS THAN (1), -PARTITION part2 VALUES LESS THAN (2147483646)); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -UNIQUE INDEX (f_int2) -) -PARTITION BY RANGE(f_int2) -SUBPARTITION BY KEY(f_int1) SUBPARTITIONS 3 -(PARTITION part1 VALUES LESS THAN (1), -PARTITION part2 VALUES LESS THAN (2147483646)); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -PRIMARY KEY(f_int1,f_int2), UNIQUE INDEX (f_int2) -) -PARTITION BY RANGE(f_int2) -SUBPARTITION BY KEY(f_int1) SUBPARTITIONS 3 -(PARTITION part1 VALUES LESS THAN (1), -PARTITION part2 VALUES LESS THAN (2147483646)); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -UNIQUE INDEX (f_int2) -) -PARTITION BY LIST(MOD(f_int2,3)) -SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2 -(PARTITION partN VALUES IN (NULL), -PARTITION part0 VALUES IN (0), -PARTITION part1 VALUES IN (1), -PARTITION part2 VALUES IN (2)); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -PRIMARY KEY(f_int1,f_int2), UNIQUE INDEX (f_int2) -) -PARTITION BY LIST(MOD(f_int2,3)) -SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2 -(PARTITION partN VALUES IN (NULL), -PARTITION part0 VALUES IN (0), -PARTITION part1 VALUES IN (1), -PARTITION part2 VALUES IN (2)); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -UNIQUE INDEX (f_int2) -) -PARTITION BY LIST(MOD(f_int2,3)) -SUBPARTITION BY KEY(f_int1) SUBPARTITIONS 2 -(PARTITION partN VALUES IN (NULL), -PARTITION part0 VALUES IN (0), -PARTITION part1 VALUES IN (1), -PARTITION part2 VALUES IN (2)); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -PRIMARY KEY(f_int1,f_int2), UNIQUE INDEX (f_int2) -) -PARTITION BY LIST(MOD(f_int2,3)) -SUBPARTITION BY KEY(f_int1) SUBPARTITIONS 2 -(PARTITION partN VALUES IN (NULL), -PARTITION part0 VALUES IN (0), -PARTITION part1 VALUES IN (1), -PARTITION part2 VALUES IN (2)); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -DROP TABLE t1; - -#======================================================================== -# 2 Some properties around subpartitioning -#======================================================================== -#------------------------------------------------------------------------ -# 2.1 Subpartioned table without subpartitioning rule must be rejected -#------------------------------------------------------------------------ -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) -( PARTITION part1 VALUES LESS THAN (1000) (SUBPARTITION subpart11)); -ERROR HY000: It is only possible to mix RANGE/LIST partitioning with HASH/KEY partitioning for subpartitioning -#------------------------------------------------------------------------ -# 2.2 Every partition must have the same number of subpartitions. -# This is a limitation of MySQL 5.1, which could be removed in -# later releases. -#------------------------------------------------------------------------ -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -PRIMARY KEY (f_int1) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY KEY(f_int1) -( -PARTITION part1 VALUES LESS THAN (0) -(SUBPARTITION subpart1), -PARTITION part2 VALUES LESS THAN (5) -(SUBPARTITION subpart1, SUBPARTITION subpart2)); -ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near '))' at line 14 - -#======================================================================== -# 3 VALUES clauses -#======================================================================== -#------------------------------------------------------------------------ -# 3.1 The constants in VALUES IN clauses must differ -#------------------------------------------------------------------------ -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY LIST(MOD(f_int1,2)) -( PARTITION part1 VALUES IN (-1), -PARTITION part2 VALUES IN (0), -PARTITION part3 VALUES IN (-1)); -ERROR HY000: Multiple definition of same constant in list partitioning -CREATE TABLE t1 (f1 BIGINT, f2 BIGINT) -PARTITION BY RANGE(f1) -(PARTITION part1 VALUES LESS THAN (0), -PARTITION part2 VALUES LESS THAN (0), -PARTITION part3 VALUES LESS THAN (10000)); -ERROR HY000: VALUES LESS THAN value must be strictly increasing for each partition -#------------------------------------------------------------------------ -# 3.2 The constants in VALUES LESS must be in increasing order -#------------------------------------------------------------------------ -CREATE TABLE t1 (f1 BIGINT, f2 BIGINT) -PARTITION BY RANGE(f1) -(PARTITION part1 VALUES LESS THAN (0), -PARTITION part2 VALUES LESS THAN (-1), -PARTITION part3 VALUES LESS THAN (10000)); -ERROR HY000: VALUES LESS THAN value must be strictly increasing for each partition -#------------------------------------------------------------------------ -# 3.3 LIST partitions must be defined with VALUES IN -#------------------------------------------------------------------------ -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY LIST(MOD(f_int1,2)) -( PARTITION part1 VALUES LESS THAN (-1), -PARTITION part2 VALUES LESS THAN (0), -PARTITION part3 VALUES LESS THAN (1000)); -ERROR HY000: Only RANGE PARTITIONING can use VALUES LESS THAN in partition definition -#------------------------------------------------------------------------ -# 3.4 RANGE partitions must be defined with VALUES LESS THAN -#------------------------------------------------------------------------ -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) -( PARTITION part1 VALUES IN (-1), -PARTITION part2 VALUES IN (0), -PARTITION part3 VALUES IN (1000)); -ERROR HY000: Only LIST PARTITIONING can use VALUES IN in partition definition -#------------------------------------------------------------------------ -# 3.5 Use of NULL in VALUES clauses -#------------------------------------------------------------------------ -# 3.5.1 NULL in RANGE partitioning clause -# 3.5.1.1 VALUE LESS THAN (NULL) is not allowed -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) -( PARTITION part1 VALUES LESS THAN (NULL), -PARTITION part2 VALUES LESS THAN (1000)); -ERROR 42000: Not allowed to use NULL value in VALUES LESS THAN near '), -PARTITION part2 VALUES LESS THAN (1000))' at line 9 -# 3.5.1.2 VALUE LESS THAN (CAST(NULL AS SIGNED INTEGER)) is not allowed -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) -( PARTITION part1 VALUES LESS THAN (CAST(NULL AS SIGNED INTEGER)), -PARTITION part2 VALUES LESS THAN (1000)); -ERROR 42000: Not allowed to use NULL value in VALUES LESS THAN near '), -PARTITION part2 VALUES LESS THAN (1000))' at line 9 -# 3.5.2 NULL in LIST partitioning clause -# 3.5.2.1 VALUE IN (NULL) -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY LIST(MOD(f_int1,2)) -( PARTITION part1 VALUES IN (NULL), -PARTITION part2 VALUES IN (0), -PARTITION part3 VALUES IN (1)); -DROP TABLE t1; -# 3.5.2.2 VALUE IN (CAST(NULL AS SIGNED INTEGER)) -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY LIST(MOD(f_int1,2)) -( PARTITION part1 VALUES IN (CAST(NULL AS SIGNED INTEGER)), -PARTITION part3 VALUES IN (1)); -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY LIST (MOD(f_int1,2)) (PARTITION part1 VALUES IN (NULL) ENGINE = ndbcluster, PARTITION part3 VALUES IN (1) ENGINE = ndbcluster) - -DROP TABLE t1; -# 3.5.3 Reveal that IN (...NULL) is not mapped to IN(0) -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY LIST(MOD(f_int1,2)) -( PARTITION part1 VALUES IN (CAST(NULL AS SIGNED INTEGER)), -PARTITION part2 VALUES IN (0), -PARTITION part3 VALUES IN (1)); -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY LIST (MOD(f_int1,2)) (PARTITION part1 VALUES IN (NULL) ENGINE = ndbcluster, PARTITION part2 VALUES IN (0) ENGINE = ndbcluster, PARTITION part3 VALUES IN (1) ENGINE = ndbcluster) - -DROP TABLE t1; - -#======================================================================== -# 4. Check assigning the number of partitions and subpartitions -# with and without named partitions/subpartitions -#======================================================================== -DROP TABLE IF EXISTS t1; -#------------------------------------------------------------------------ -# 4.1 (positive) without partition/subpartition number assignment -#------------------------------------------------------------------------ -# 4.1.1 no partition number, no named partitions -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1); -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY HASH (f_int1) - -DROP TABLE t1; -# 4.1.2 no partition number, named partitions -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) (PARTITION part1, PARTITION part2); -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY HASH (f_int1) (PARTITION part1 ENGINE = ndbcluster, PARTITION part2 ENGINE = ndbcluster) - -DROP TABLE t1; -# 4.1.3 variations on no partition/subpartition number, named partitions, -# different subpartitions are/are not named -CREATE TABLE t1 ( f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) ) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) (PARTITION part1 VALUES LESS THAN (10), PARTITION part2 VALUES LESS THAN (20), PARTITION part3 VALUES LESS THAN (2147483646)) ; -DROP TABLE t1; -CREATE TABLE t1 ( f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) ) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) (PARTITION part1 VALUES LESS THAN (10), PARTITION part2 VALUES LESS THAN (20), PARTITION part3 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart31 , SUBPARTITION subpart32 )) ; -ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near '))' at line 7 -CREATE TABLE t1 ( f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) ) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) (PARTITION part1 VALUES LESS THAN (10), PARTITION part2 VALUES LESS THAN (20) -(SUBPARTITION subpart21 , SUBPARTITION subpart22 ), PARTITION part3 VALUES LESS THAN (2147483646)) ; -ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near '), PARTITION part3 VALUES LESS THAN (2147483646))' at line 7 -CREATE TABLE t1 ( f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) ) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) (PARTITION part1 VALUES LESS THAN (10), PARTITION part2 VALUES LESS THAN (20) -(SUBPARTITION subpart21 , SUBPARTITION subpart22 ), PARTITION part3 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart31 , SUBPARTITION subpart32 )) ; -ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near '), PARTITION part3 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart31 , SUBPA' at line 7 -CREATE TABLE t1 ( f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) ) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) (PARTITION part1 VALUES LESS THAN (10) -(SUBPARTITION subpart11 , SUBPARTITION subpart12 ), PARTITION part2 VALUES LESS THAN (20), PARTITION part3 VALUES LESS THAN (2147483646)) ; -ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near ' PARTITION part3 VALUES LESS THAN (2147483646))' at line 7 -CREATE TABLE t1 ( f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) ) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) (PARTITION part1 VALUES LESS THAN (10) -(SUBPARTITION subpart11 , SUBPARTITION subpart12 ), PARTITION part2 VALUES LESS THAN (20), PARTITION part3 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart31 , SUBPARTITION subpart32 )) ; -ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near ' PARTITION part3 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart31 , SUBPART' at line 7 -CREATE TABLE t1 ( f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) ) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) (PARTITION part1 VALUES LESS THAN (10) -(SUBPARTITION subpart11 , SUBPARTITION subpart12 ), PARTITION part2 VALUES LESS THAN (20) -(SUBPARTITION subpart21 , SUBPARTITION subpart22 ), PARTITION part3 VALUES LESS THAN (2147483646)) ; -ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near ')' at line 8 -CREATE TABLE t1 ( f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) ) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) (PARTITION part1 VALUES LESS THAN (10) -(SUBPARTITION subpart11 , SUBPARTITION subpart12 ), PARTITION part2 VALUES LESS THAN (20) -(SUBPARTITION subpart21 , SUBPARTITION subpart22 ), PARTITION part3 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart31 , SUBPARTITION subpart32 )) ; -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int1) (PARTITION part1 VALUES LESS THAN (10) (SUBPARTITION subpart11 ENGINE = ndbcluster, SUBPARTITION subpart12 ENGINE = ndbcluster), PARTITION part2 VALUES LESS THAN (20) (SUBPARTITION subpart21 ENGINE = ndbcluster, SUBPARTITION subpart22 ENGINE = ndbcluster), PARTITION part3 VALUES LESS THAN (2147483646) (SUBPARTITION subpart31 ENGINE = ndbcluster, SUBPARTITION subpart32 ENGINE = ndbcluster)) - -DROP TABLE t1; -#------------------------------------------------------------------------ -# 4.2 partition/subpartition numbers good and bad values and notations -#------------------------------------------------------------------------ -DROP TABLE IF EXISTS t1; -# 4.2.1 partition/subpartition numbers INTEGER notation -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) PARTITIONS 2; -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY HASH (f_int1) PARTITIONS 2 - -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) -SUBPARTITIONS 2 -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2147483646)); -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION part1 VALUES LESS THAN (10) , PARTITION part2 VALUES LESS THAN (2147483646) ) - -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) PARTITIONS 1; -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY HASH (f_int1) PARTITIONS 1 - -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) -SUBPARTITIONS 1 -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2147483646)); -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 1 (PARTITION part1 VALUES LESS THAN (10) , PARTITION part2 VALUES LESS THAN (2147483646) ) - -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) PARTITIONS 0; -ERROR HY000: Number of partitions = 0 is not an allowed value -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) -SUBPARTITIONS 0 -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2147483646)); -ERROR HY000: Number of subpartitions = 0 is not an allowed value -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) PARTITIONS -1; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-1' at line 8 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) -SUBPARTITIONS -1 -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2147483646)); -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-1 -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (214' at line 9 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) PARTITIONS 1000000; -ERROR HY000: Too many partitions (including subpartitions) were defined -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) -SUBPARTITIONS 1000000 -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2147483646)); -ERROR HY000: Too many partitions (including subpartitions) were defined -# 4.2.2 partition/subpartition numbers DECIMAL notation -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) PARTITIONS 2.0; -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY HASH (f_int1) PARTITIONS 2 - -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) -SUBPARTITIONS 2.0 -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2147483646)); -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION part1 VALUES LESS THAN (10) , PARTITION part2 VALUES LESS THAN (2147483646) ) - -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) PARTITIONS -2.0; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-2.0' at line 8 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) -SUBPARTITIONS -2.0 -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2147483646)); -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-2.0 -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2' at line 9 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) PARTITIONS 0.0; -ERROR HY000: Number of partitions = 0 is not an allowed value -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) -SUBPARTITIONS 0.0 -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2147483646)); -ERROR HY000: Number of subpartitions = 0 is not an allowed value -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) PARTITIONS 999999999999999999999999999999.999999999999999999999999999999; -ERROR HY000: Too many partitions (including subpartitions) were defined -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) -SUBPARTITIONS 999999999999999999999999999999.999999999999999999999999999999 -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2147483646)); -ERROR HY000: Too many partitions (including subpartitions) were defined -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) PARTITIONS 0.000000000000000000000000000001; -ERROR HY000: Number of partitions = 0 is not an allowed value -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) -SUBPARTITIONS 0.000000000000000000000000000001 -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2147483646)); -ERROR HY000: Number of subpartitions = 0 is not an allowed value -# 4.2.3 partition/subpartition numbers FLOAT notation -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) PARTITIONS 2.0E+0; -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY HASH (f_int1) PARTITIONS 2 - -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) -SUBPARTITIONS 2.0E+0 -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2147483646)); -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION part1 VALUES LESS THAN (10) , PARTITION part2 VALUES LESS THAN (2147483646) ) - -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) PARTITIONS -2.0E+0; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-2.0E+0' at line 8 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) -SUBPARTITIONS -2.0E+0 -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2147483646)); -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-2.0E+0 -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN' at line 9 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) PARTITIONS 0.0E+300; -ERROR HY000: Number of partitions = 0 is not an allowed value -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) -SUBPARTITIONS 0.0E+300 -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2147483646)); -ERROR HY000: Number of subpartitions = 0 is not an allowed value -# 4.2.4 partition/subpartition numbers STRING notation -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) PARTITIONS '2'; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''2'' at line 8 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) -SUBPARTITIONS '2' -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2147483646)); -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''2' -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (21' at line 9 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) PARTITIONS '2.0'; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''2.0'' at line 8 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) -SUBPARTITIONS '2.0' -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2147483646)); -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''2.0' -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (' at line 9 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) PARTITIONS '0.2E+1'; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''0.2E+1'' at line 8 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) -SUBPARTITIONS '0.2E+1' -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2147483646)); -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''0.2E+1' -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THA' at line 9 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) PARTITIONS '2A'; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''2A'' at line 8 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) -SUBPARTITIONS '2A' -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2147483646)); -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''2A' -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2' at line 9 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) PARTITIONS 'A2'; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''A2'' at line 8 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) -SUBPARTITIONS 'A2' -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2147483646)); -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''A2' -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2' at line 9 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) PARTITIONS ''; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '''' at line 8 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) -SUBPARTITIONS '' -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2147483646)); -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''' -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (214' at line 9 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) PARTITIONS 'GARBAGE'; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''GARBAGE'' at line 8 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) -SUBPARTITIONS 'GARBAGE' -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2147483646)); -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''GARBAGE' -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS TH' at line 9 -# 4.2.5 partition/subpartition numbers other notations -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) PARTITIONS 2A; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '2A' at line 8 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) -SUBPARTITIONS 2A -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2147483646)); -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '2A -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (214' at line 9 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) PARTITIONS A2; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'A2' at line 8 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) -SUBPARTITIONS A2 -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2147483646)); -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'A2 -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (214' at line 9 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) PARTITIONS GARBAGE; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GARBAGE' at line 8 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) -SUBPARTITIONS GARBAGE -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2147483646)); -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GARBAGE -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN' at line 9 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) PARTITIONS "2"; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"2"' at line 8 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) -SUBPARTITIONS "2" -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2147483646)); -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"2" -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (21' at line 9 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) PARTITIONS "2A"; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"2A"' at line 8 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) -SUBPARTITIONS "2A" -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2147483646)); -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"2A" -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2' at line 9 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) PARTITIONS "A2"; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"A2"' at line 8 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) -SUBPARTITIONS "A2" -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2147483646)); -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"A2" -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2' at line 9 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) PARTITIONS "GARBAGE"; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"GARBAGE"' at line 8 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) -SUBPARTITIONS "GARBAGE" -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2147483646)); -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"GARBAGE" -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS TH' at line 9 -# 4.2.6 (negative) partition/subpartition numbers per @variables -SET @aux = 5; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) PARTITIONS @aux; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@aux' at line 8 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) -SUBPARTITIONS @aux = 5 -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2147483646)); -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@aux = 5 -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THA' at line 9 -#------------------------------------------------------------------------ -# 4.3 Mixups of assigned partition/subpartition numbers and names -#------------------------------------------------------------------------ -# 4.3.1 (positive) number of partition/subpartition -# = number of named partition/subpartition -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) PARTITIONS 2 ( PARTITION part1, PARTITION part2 ) ; -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY HASH (f_int1) (PARTITION part1 ENGINE = ndbcluster, PARTITION part2 ENGINE = ndbcluster) - -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) PARTITIONS 2 -SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2 -( PARTITION part1 VALUES LESS THAN (1000) -(SUBPARTITION subpart11, SUBPARTITION subpart12), -PARTITION part2 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart21, SUBPARTITION subpart22) -); -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int1) (PARTITION part1 VALUES LESS THAN (1000) (SUBPARTITION subpart11 ENGINE = ndbcluster, SUBPARTITION subpart12 ENGINE = ndbcluster), PARTITION part2 VALUES LESS THAN (2147483646) (SUBPARTITION subpart21 ENGINE = ndbcluster, SUBPARTITION subpart22 ENGINE = ndbcluster)) - -DROP TABLE t1; -# 4.3.2 (positive) number of partition/subpartition , -# 0 (= no) named partition/subpartition -# already checked above -# 4.3.3 (negative) number of partitions/subpartitions -# > number of named partitions/subpartitions -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) PARTITIONS 2 ( PARTITION part1 ) ; -ERROR 42000: Wrong number of partitions defined, mismatch with previous setting near ')' at line 8 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) -SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2 -( PARTITION part1 VALUES LESS THAN (1000) -(SUBPARTITION subpart11 ), -PARTITION part2 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart21, SUBPARTITION subpart22) -); -ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near '), -PARTITION part2 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart21, SUBPAR' at line 11 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) -SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2 -( PARTITION part1 VALUES LESS THAN (1000) -(SUBPARTITION subpart11, SUBPARTITION subpart12), -PARTITION part2 VALUES LESS THAN (2000) -(SUBPARTITION subpart21 ), -PARTITION part3 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart31, SUBPARTITION subpart32) -); -ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near '), -PARTITION part3 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart31, SUBPAR' at line 13 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) PARTITIONS 2 -SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2 -( PARTITION part1 VALUES LESS THAN (1000) -(SUBPARTITION subpart11, SUBPARTITION subpart12), -PARTITION part2 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart21 ) -); -ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near ') -)' at line 13 -# 4.3.4 (negative) number of partitions < number of named partitions -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) PARTITIONS 1 ( PARTITION part1, PARTITION part2 ) ; -ERROR 42000: Wrong number of partitions defined, mismatch with previous setting near ')' at line 8 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) -SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 1 -( PARTITION part1 VALUES LESS THAN (1000) -(SUBPARTITION subpart11, SUBPARTITION subpart12), -PARTITION part2 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart21, SUBPARTITION subpart22) -); -ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near '), -PARTITION part2 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart21, SUBPAR' at line 11 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) -SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 1 -( PARTITION part1 VALUES LESS THAN (1000) -(SUBPARTITION subpart11, SUBPARTITION subpart12), -PARTITION part2 VALUES LESS THAN (2000) -(SUBPARTITION subpart21 ), -PARTITION part3 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart31, SUBPARTITION subpart32) -); -ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near '), -PARTITION part2 VALUES LESS THAN (2000) -(SUBPARTITION subpart21 ' at line 11 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) -SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 1 -( PARTITION part1 VALUES LESS THAN (1000) -(SUBPARTITION subpart11, SUBPARTITION subpart12), -PARTITION part2 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart21, SUBPARTITION subpart22) -); -ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near '), -PARTITION part2 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart21, SUBPAR' at line 11 - -#======================================================================== -# 5. Checks of logical partition/subpartition name -# file name clashes during CREATE TABLE -#======================================================================== -DROP TABLE IF EXISTS t1; -#------------------------------------------------------------------------ -# 5.1 (negative) A partition/subpartition name used more than once -#------------------------------------------------------------------------ -# 5.1.1 duplicate partition name -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) (PARTITION part1, PARTITION part1); -ERROR HY000: Duplicate partition name part1 -# 5.1.2 duplicate subpartition name -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) -SUBPARTITION BY HASH(f_int1) -( PARTITION part1 VALUES LESS THAN (1000) -(SUBPARTITION subpart11, SUBPARTITION subpart11) -); -ERROR HY000: Duplicate partition name subpart11 -DROP VIEW IF EXISTS v1; -DROP TABLE IF EXISTS t1; -DROP TABLE IF EXISTS t0_aux; -DROP TABLE IF EXISTS t0_definition; -DROP TABLE IF EXISTS t0_template; diff --git a/mysql-test/suite/parts/r/partition_value_ndb.result b/mysql-test/suite/parts/r/partition_value_ndb.result deleted file mode 100644 index 0787df5f5ac..00000000000 --- a/mysql-test/suite/parts/r/partition_value_ndb.result +++ /dev/null @@ -1,189 +0,0 @@ -SET @max_row = 20; -SET @@session.storage_engine = 'ndbcluster'; - -#------------------------------------------------------------------------ -# There are several testcases disabled because of the open bugs -# #15890 -# #18730, Bug#18735 -# The expected results suffer from the following bugs -# harmless #17455, #19305 -# which cannot be suppressed because of technical reasons. -#------------------------------------------------------------------------ - -#------------------------------------------------------------------------ -# 0. Setting of auxiliary variables + Creation of an auxiliary tables -# needed in many testcases -#------------------------------------------------------------------------ -SELECT @max_row DIV 2 INTO @max_row_div2; -SELECT @max_row DIV 3 INTO @max_row_div3; -SELECT @max_row DIV 4 INTO @max_row_div4; -SET @max_int_4 = 2147483647; -DROP TABLE IF EXISTS t0_template; -CREATE TABLE t0_template ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) , -PRIMARY KEY(f_int1)) -ENGINE = MEMORY; -# Logging of INSERTs into t0_template suppressed -DROP TABLE IF EXISTS t0_definition; -CREATE TABLE t0_definition ( -state CHAR(3), -create_command VARBINARY(5000), -file_list VARBINARY(5000), -PRIMARY KEY (state) -) ENGINE = MEMORY; -DROP TABLE IF EXISTS t0_aux; -CREATE TABLE t0_aux ( f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) ) -ENGINE = MEMORY; -SET AUTOCOMMIT= 1; -SET @@session.sql_mode= ''; -# End of basic preparations needed for all tests -#----------------------------------------------- - -#======================================================================== -# Calculation of "exotic" results within the partition function -# outside of SIGNED BIGINT value range, 0, NULL -# column used in partitioning function has type CHAR -#======================================================================== -# 1. HASH() -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(CAST(f_char1 AS SIGNED INTEGER) * CAST(5.0E+18 AS SIGNED INTEGER)) PARTITIONS 8; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -VALUES(2147483646,2147483646,'2147483646','2147483646','#2147483646#'); -SELECT COUNT(*) = 1 FROM t1 WHERE f_char1 = '2147483646'; -COUNT(*) = 1 -1 -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -VALUES(-2147483646,-2147483646,'-2147483646','-2147483646','#-2147483646#'); -SELECT COUNT(*) = 1 FROM t1 WHERE f_char1 = '-2147483646'; -COUNT(*) = 1 -1 -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -VALUES(0,0,'0','0','#0#'); -SELECT COUNT(*) = 1 FROM t1 WHERE f_char1 = '0'; -COUNT(*) = 1 -1 -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -VALUES(NULL,NULL,NULL,NULL,NULL); -SELECT COUNT(*) = 1 FROM t1 WHERE f_char1 IS NULL; -COUNT(*) = 1 -1 -DROP TABLE t1; -# 2. RANGE() -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(CAST(f_char1 AS SIGNED INTEGER) * CAST(5.0E+18 AS SIGNED INTEGER)) -(PARTITION p0 VALUES LESS THAN (0), -PARTITION p1 VALUES LESS THAN (1000000), -PARTITION p2 VALUES LESS THAN MAXVALUE); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -VALUES(2147483646,2147483646,'2147483646','2147483646','#2147483646#'); -SELECT COUNT(*) = 1 FROM t1 WHERE f_char1 = '2147483646'; -COUNT(*) = 1 -1 -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -VALUES(-2147483646,-2147483646,'-2147483646','-2147483646','#-2147483646#'); -SELECT COUNT(*) = 1 FROM t1 WHERE f_char1 = '-2147483646'; -COUNT(*) = 1 -1 -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -VALUES(0,0,'0','0','#0#'); -SELECT COUNT(*) = 1 FROM t1 WHERE f_char1 = '0'; -COUNT(*) = 1 -1 -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -VALUES(NULL,NULL,NULL,NULL,NULL); -SELECT COUNT(*) = 1 FROM t1 WHERE f_char1 IS NULL; -COUNT(*) = 1 -1 -DROP TABLE t1; -# 4. Partition by RANGE(...) subpartition by HASH() -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(CAST(f_char1 AS SIGNED INTEGER)) -SUBPARTITION BY HASH(CAST(f_char2 AS SIGNED INTEGER) * CAST(5.0E+18 AS SIGNED INTEGER)) SUBPARTITIONS 4 -(PARTITION p0 VALUES LESS THAN (0), -PARTITION p1 VALUES LESS THAN MAXVALUE); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -VALUES(2147483646,2147483646,'1','2147483646','#2147483646#'); -SELECT COUNT(*) = 1 FROM t1 WHERE f_char2 = '2147483646'; -COUNT(*) = 1 -1 -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -VALUES(-2147483646,-2147483646,'-1','-2147483646','#-2147483646#'); -SELECT COUNT(*) = 1 FROM t1 WHERE f_char2 = '-2147483646'; -COUNT(*) = 1 -1 -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -VALUES(0,0,'0','0','#0#'); -SELECT COUNT(*) = 1 FROM t1 WHERE f_char2 = '0'; -COUNT(*) = 1 -1 -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -VALUES(NULL,NULL,NULL,NULL,NULL); -SELECT COUNT(*) = 1 FROM t1 WHERE f_char2 IS NULL; -COUNT(*) = 1 -1 -DROP TABLE t1; -# 5. Partition by LIST(...) subpartition by HASH() -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY LIST(CAST(f_char1 AS SIGNED INTEGER)) -SUBPARTITION BY HASH(CAST(f_char2 AS SIGNED INTEGER) * CAST(5.0E+18 AS SIGNED INTEGER)) SUBPARTITIONS 4 -(PARTITION p0 VALUES IN (NULL), -PARTITION p1 VALUES IN (1)); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -VALUES(2147483646,2147483646,'1','2147483646','#2147483646#'); -SELECT COUNT(*) = 1 FROM t1 WHERE f_char2 = '2147483646'; -COUNT(*) = 1 -1 -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -VALUES(-2147483646,-2147483646,'1','-2147483646','#-2147483646#'); -SELECT COUNT(*) = 1 FROM t1 WHERE f_char2 = '-2147483646'; -COUNT(*) = 1 -1 -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -VALUES(0,0,'1','0','#0#'); -SELECT COUNT(*) = 1 FROM t1 WHERE f_char2 = '0'; -COUNT(*) = 1 -1 -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -VALUES(NULL,NULL,NULL,NULL,NULL); -SELECT COUNT(*) = 1 FROM t1 WHERE f_char2 IS NULL; -COUNT(*) = 1 -1 -DROP TABLE t1; -DROP VIEW IF EXISTS v1; -DROP TABLE IF EXISTS t1; -DROP TABLE IF EXISTS t0_aux; -DROP TABLE IF EXISTS t0_definition; -DROP TABLE IF EXISTS t0_template; diff --git a/mysql-test/suite/parts/r/rpl_partition.result b/mysql-test/suite/parts/r/rpl_partition.result index abd3f7924df..70de17e6556 100644 --- a/mysql-test/suite/parts/r/rpl_partition.result +++ b/mysql-test/suite/parts/r/rpl_partition.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] set @old_global_binlog_format= @@global.binlog_format; set @old_session_binlog_format= @@session.binlog_format; SET GLOBAL binlog_format = 'ROW'; @@ -22,10 +18,6 @@ select @@global.binlog_format, @@session.binlog_format; include/stop_slave.inc include/start_slave.inc [on master] -DROP TABLE IF EXISTS t1, t2, t3; -DROP PROCEDURE IF EXISTS p1; -DROP PROCEDURE IF EXISTS p2; -DROP PROCEDURE IF EXISTS p3; CREATE TABLE t1(id MEDIUMINT NOT NULL AUTO_INCREMENT, dt TIMESTAMP, user CHAR(255), uuidf LONGBLOB, fkid MEDIUMINT, filler VARCHAR(255), @@ -149,7 +141,7 @@ SUBPARTITIONS 2 PARTITION pa9 VALUES LESS THAN (90) ENGINE = InnoDB, PARTITION pa10 VALUES LESS THAN (100) ENGINE = InnoDB, PARTITION pa11 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */ -Checking that both slave threads are running. +include/check_slave_is_running.inc SELECT count(*) "Slave norm" FROM t1; Slave norm 500 SELECT count(*) "Slave bykey" FROM t2; @@ -159,9 +151,10 @@ Slave byrange 500 set @@global.binlog_format= @old_global_binlog_format; set @@session.binlog_format= @old_session_binlog_format; DROP TABLE t1, t2, t3; -DROP PROCEDURE IF EXISTS p1; -DROP PROCEDURE IF EXISTS p2; -DROP PROCEDURE IF EXISTS p3; +DROP PROCEDURE p1; +DROP PROCEDURE p2; +DROP PROCEDURE p3; [on slave] set @@global.binlog_format= @old_global_binlog_format; set @@session.binlog_format= @old_session_binlog_format; +include/rpl_end.inc diff --git a/mysql-test/suite/parts/t/disabled.def b/mysql-test/suite/parts/t/disabled.def index 8a1dafe59a2..e69de29bb2d 100644 --- a/mysql-test/suite/parts/t/disabled.def +++ b/mysql-test/suite/parts/t/disabled.def @@ -1,3 +0,0 @@ -partition_basic_ndb : Bug#44919 parts-suite in mtr tries to use features not supported by ndb -# http://dev.mysql.com/doc/refman/5.1/en/mysql-cluster-limitations-syntax.html -partition_syntax_ndb : Bug#36735 Not supported diff --git a/mysql-test/suite/parts/t/ndb_dd_backuprestore.test b/mysql-test/suite/parts/t/ndb_dd_backuprestore.test deleted file mode 100644 index d2f79028c3f..00000000000 --- a/mysql-test/suite/parts/t/ndb_dd_backuprestore.test +++ /dev/null @@ -1,347 +0,0 @@ -######################################## -# Author: JBM -# Date: 2006-01-24 -# Purpose: Test CDD backup and restore -######################################## - --- source include/have_ndb.inc -# range, list and hash partitioning in ndb requires new_mode ---disable_query_log -set new=on; ---enable_query_log - ---disable_warnings -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -DROP TABLE IF EXISTS test.t3; -DROP TABLE IF EXISTS test.t4; -DROP TABLE IF EXISTS test.t5; -DROP TABLE IF EXISTS test.t6; ---enable_warnings - -############ Test 1 Simple DD backup and restore ############# --- echo **** Test 1 Simple DD backup and restore **** - -CREATE LOGFILE GROUP log_group1 -ADD UNDOFILE './log_group1/undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; - -CREATE TABLESPACE table_space1 -ADD DATAFILE './table_space1/datafile.dat' -USE LOGFILE GROUP log_group1 -INITIAL_SIZE 12M -ENGINE NDB; - - -CREATE TABLE test.t1 -(pk1 MEDIUMINT NOT NULL AUTO_INCREMENT PRIMARY KEY, c2 CHAR(50) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL) TABLESPACE table_space1 STORAGE DISK ENGINE=NDB; - -let $j= 500; ---disable_query_log -while ($j) -{ - eval INSERT INTO test.t1 VALUES (NULL, "Sweden", $j, b'1'); - dec $j; -} ---enable_query_log -SELECT COUNT(*) FROM test.t1; -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY pk1 LIMIT 5; - --- source include/ndb_backup.inc - -DROP TABLE test.t1; - -ALTER TABLESPACE table_space1 -DROP DATAFILE './table_space1/datafile.dat' -ENGINE = NDB; - -DROP TABLESPACE table_space1 -ENGINE = NDB; - -DROP LOGFILE GROUP log_group1 -ENGINE =NDB; - --- source include/ndb_restore_master.inc - -SELECT COUNT(*) FROM test.t1; - -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY pk1 LIMIT 5; - -################# Mixed Cluster Test ############################ --- echo **** Test 2 Mixed Cluster Test backup and restore **** - -CREATE TABLE test.t2 -(pk1 MEDIUMINT NOT NULL AUTO_INCREMENT PRIMARY KEY, c2 VARCHAR(200) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL)ENGINE=NDB; - -let $j= 500; ---disable_query_log -while ($j) -{ - eval INSERT INTO test.t2 VALUES (NULL, "Sweden, Texas", $j, b'0'); - dec $j; -} ---enable_query_log - -CREATE TABLE test.t3 (c1 int not null auto_increment, data LONGBLOB, PRIMARY KEY(c1))TABLESPACE table_space1 STORAGE DISK ENGINE=NDB; - -CREATE TABLE test.t4 (c1 int not null auto_increment, data LONGBLOB, PRIMARY KEY(c1))ENGINE=NDB; - -let $j= 50; ---disable_query_log -while ($j) -{ - INSERT INTO test.t3 VALUES (NULL, repeat('a',1*1024)); - INSERT INTO test.t3 VALUES (NULL, repeat('b',16*1024)); - INSERT INTO test.t4 VALUES (NULL, repeat('a',1*1024)); - INSERT INTO test.t4 VALUES (NULL, repeat('b',16*1024)); - dec $j; -} ---enable_query_log - -SELECT COUNT(*) FROM test.t1; - -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY pk1 LIMIT 5; - -SELECT COUNT(*) FROM test.t2; - -SELECT pk1, c2, c3, hex(c4) FROM test.t2 ORDER BY pk1 LIMIT 5; - -SELECT COUNT(*) FROM test.t3; - -SELECT LENGTH(data) FROM test.t3 WHERE c1 = 1; - -SELECT LENGTH(data) FROM test.t3 WHERE c1 = 2; - -SELECT COUNT(*) FROM test.t4; - -SELECT LENGTH(data) FROM test.t4 WHERE c1 = 1; - -SELECT LENGTH(data) FROM test.t4 WHERE c1 = 2; - --- source include/ndb_backup.inc - -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; -DROP TABLE test.t4; - -ALTER TABLESPACE table_space1 -DROP DATAFILE './table_space1/datafile.dat' -ENGINE = NDB; - -DROP TABLESPACE table_space1 -ENGINE = NDB; - -DROP LOGFILE GROUP log_group1 -ENGINE =NDB; - --- source include/ndb_restore_master.inc - -SELECT COUNT(*) FROM test.t1; - -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY pk1 LIMIT 5; - -SELECT COUNT(*) FROM test.t2; - -SELECT pk1, c2, c3, hex(c4) FROM test.t2 ORDER BY pk1 LIMIT 5; - -SELECT COUNT(*) FROM test.t3; - -SELECT LENGTH(data) FROM test.t3 WHERE c1 = 1; - -SELECT LENGTH(data) FROM test.t3 WHERE c1 = 2; - -SELECT COUNT(*) FROM test.t4; - -SELECT LENGTH(data) FROM test.t4 WHERE c1 = 1; - -SELECT LENGTH(data) FROM test.t4 WHERE c1 = 2; - -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; -DROP TABLE test.t4; -###################### Adding partition ################################# --- echo **** Test 3 Adding partition Test backup and restore **** - -CREATE TABLESPACE table_space2 -ADD DATAFILE './table_space2/datafile.dat' -USE LOGFILE GROUP log_group1 -INITIAL_SIZE 12M -ENGINE NDB; - -CREATE TABLE test.t1 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 VARCHAR(150) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))TABLESPACE table_space1 STORAGE DISK ENGINE=NDB PARTITION BY HASH(c3) PARTITIONS 4; - -CREATE TABLE test.t4 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 VARCHAR(180) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))ENGINE=NDB PARTITION BY HASH(c3) PARTITIONS 2; - -CREATE TABLE test.t2 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 TEXT NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))TABLESPACE table_space2 STORAGE DISK ENGINE=NDB PARTITION BY KEY(c3) (PARTITION p0 ENGINE = NDB, PARTITION p1 ENGINE = NDB); - -CREATE TABLE test.t5 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 TEXT NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))ENGINE=NDB PARTITION BY KEY(pk1) (PARTITION p0 ENGINE = NDB, PARTITION p1 ENGINE = NDB); - -CREATE TABLE test.t3 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 VARCHAR(202) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))TABLESPACE table_space2 STORAGE DISK ENGINE=NDB PARTITION BY RANGE (c3) PARTITIONS 3 (PARTITION x1 VALUES LESS THAN (105), PARTITION x2 VALUES LESS THAN (333), PARTITION x3 VALUES LESS THAN (720)); - -CREATE TABLE test.t6 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 VARCHAR(220) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))ENGINE=NDB PARTITION BY RANGE (pk1) PARTITIONS 2 (PARTITION x1 VALUES LESS THAN (333), PARTITION x2 VALUES LESS THAN (720)); - -SHOW CREATE TABLE test.t1; - -SHOW CREATE TABLE test.t2; - -SHOW CREATE TABLE test.t3; - -SHOW CREATE TABLE test.t4; - -SHOW CREATE TABLE test.t5; - -SHOW CREATE TABLE test.t6; - -SELECT * FROM information_schema.partitions WHERE table_name= 't1'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't2'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't3'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't4'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't5'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't6'; - - -let $j= 500; ---disable_query_log -while ($j) -{ - eval INSERT INTO test.t1 VALUES (NULL, "Sweden, Texas", $j, b'0'); - eval INSERT INTO test.t4 VALUES (NULL, "Sweden, Texas", $j, b'0'); - dec $j; - eval INSERT INTO test.t2 VALUES (NULL, "Sweden, Texas, ITALY, Kyle, JO, JBM,TU", $j, b'1'); - eval INSERT INTO test.t5 VALUES (NULL, "Sweden, Texas, ITALY, Kyle, JO, JBM,TU", $j, b'1'); - dec $j; - eval INSERT INTO test.t3 VALUES (NULL, "TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU", $j, b'1'); - eval INSERT INTO test.t6 VALUES (NULL, "TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU", $j, b'1'); } --enable_query_log - -SELECT COUNT(*) FROM test.t1; - -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t2; - -SELECT pk1, c2, c3, hex(c4) FROM test.t2 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t3; - -SELECT pk1, c2, c3, hex(c4) FROM test.t3 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t4; - -SELECT pk1, c2, c3, hex(c4) FROM test.t4 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t5; - -SELECT pk1, c2, c3, hex(c4) FROM test.t5 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t6; - -SELECT pk1, c2, c3, hex(c4) FROM test.t6 ORDER BY c3 LIMIT 5; - --- source include/ndb_backup.inc - -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; -DROP TABLE test.t4; -DROP TABLE test.t5; -DROP TABLE test.t6; - -ALTER TABLESPACE table_space1 -DROP DATAFILE './table_space1/datafile.dat' -ENGINE = NDB; - -ALTER TABLESPACE table_space2 -DROP DATAFILE './table_space2/datafile.dat' -ENGINE = NDB; - -DROP TABLESPACE table_space1 -ENGINE = NDB; - -DROP TABLESPACE table_space2 -ENGINE = NDB; - -DROP LOGFILE GROUP log_group1 -ENGINE =NDB; - --- source include/ndb_restore_master.inc - - -SHOW CREATE TABLE test.t1; - -SHOW CREATE TABLE test.t2; - -SHOW CREATE TABLE test.t3; - -SHOW CREATE TABLE test.t4; - -SHOW CREATE TABLE test.t5; - -SHOW CREATE TABLE test.t6; - -SELECT * FROM information_schema.partitions WHERE table_name= 't1'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't2'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't3'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't4'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't5'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't6'; - -SELECT COUNT(*) FROM test.t1; - -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t2; - -SELECT pk1, c2, c3, hex(c4) FROM test.t2 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t3; - -SELECT pk1, c2, c3, hex(c4) FROM test.t3 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t4; - -SELECT pk1, c2, c3, hex(c4) FROM test.t4 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t5; - -SELECT pk1, c2, c3, hex(c4) FROM test.t5 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t6; - -SELECT pk1, c2, c3, hex(c4) FROM test.t6 ORDER BY c3 LIMIT 5; - -# Cleanup - -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; -DROP TABLE test.t4; -DROP TABLE test.t5; -DROP TABLE test.t6; - -ALTER TABLESPACE table_space1 DROP DATAFILE './table_space1/datafile.dat' ENGINE=NDB; - -ALTER TABLESPACE table_space2 DROP DATAFILE './table_space2/datafile.dat' ENGINE=NDB; - -DROP TABLESPACE table_space1 ENGINE = NDB; - -DROP TABLESPACE table_space2 ENGINE = NDB; - -DROP LOGFILE GROUP log_group1 ENGINE = NDB; - -#End 5.1 test case - - diff --git a/mysql-test/suite/parts/t/part_supported_sql_func_ndb.test b/mysql-test/suite/parts/t/part_supported_sql_func_ndb.test deleted file mode 100644 index 5ac6b2a504f..00000000000 --- a/mysql-test/suite/parts/t/part_supported_sql_func_ndb.test +++ /dev/null @@ -1,46 +0,0 @@ -################################################################################ -# t/part_supported_sql_funcs_ndb.test # -# # -# Purpose: # -# Tests which SQL functions are allowed in partinioning clauses with # -# NDB. # -# # -#------------------------------------------------------------------------------# -# Original Author: HH # -# Original Date: 2006-11-22 # -# Change Author: # -# Change Date: # -# Change: # -################################################################################ - -# -# NOTE: PLEASE DO NOT ADD NOT NDB SPECIFIC TESTCASES HERE ! -# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN -# THE SOURCED FILES ONLY. -#------------------------------------------------------------------------------# -# General not engine specific settings and requirements - -##### Options, for debugging support ##### -let $debug= 0; -let $do_long_tests= 1; - -# The server must support partitioning. ---source include/have_partition.inc - -#------------------------------------------------------------------------------# -# Engine specific settings and requirements - -##### Storage engine to be tested ---source include/have_ndb.inc -let $engine= 'NDB'; -connection default; - -# range, list and hash partitioning in ndb requires new_mode ---disable_query_log -set new=on; ---enable_query_log -let $max_8_partitions= 1; -let $no_reorg_partition= 1; -let $drop_partition_not_supported= 1; -#------------------------------------------------------------------------------# ---source suite/parts/inc/part_supported_sql_funcs_main.inc diff --git a/mysql-test/suite/parts/t/partition_alter1_1_2_ndb.test b/mysql-test/suite/parts/t/partition_alter1_1_2_ndb.test deleted file mode 100644 index 1a8f1f311b6..00000000000 --- a/mysql-test/suite/parts/t/partition_alter1_1_2_ndb.test +++ /dev/null @@ -1,88 +0,0 @@ -################################################################################ -# t/partition_alter1_1_2_ndb.test # -# # -# Purpose: # -# Tests around ADD/DROP PRIMARY KEY and/or UNIQUE INDEX # -# NDB branch # -# # -#------------------------------------------------------------------------------# -# Original Author: mleich # -# Original Date: 2006-03-05 # -# Change Author: pcrews # -# Change Date: 2008-05-05 # -# Change: Split up original partition_alter1.test file to better accommodate # -# PushBuild machines' workloads. Total run time for all components # -# is essentially the same, but max. single run time is significantly # -# reduced # -################################################################################ -# -# NOTE: PLEASE DO NOT ADD NOT NDB SPECIFIC TESTCASES HERE ! -# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN -# THE SOURCED FILES ONLY. -# -# Please read the README at the end of inc/partition.pre before changing -# any of the variables. -# - -#------------------------------------------------------------------------------# -# General not engine specific settings and requirements ---source include/big_test.inc - -##### Options, for debugging support ##### -let $debug= 0; - -##### Option, for displaying files ##### -let $ls= 1; - -##### Number of rows for the INSERT/UPDATE/DELETE/SELECT experiments ##### -# on partioned tables -SET @max_row = 20; - -##### Execute more tests ##### -let $more_trigger_tests= 0; -let $more_pk_ui_tests= 0; - -# The server must support partitioning. But NDB is partitioned from the start. -# Thats why the next line is set to comment. -# --source include/have_partition.inc - -#------------------------------------------------------------------------------# -# Engine specific settings and requirements - -##### Storage engine to be tested ---source include/have_ndb.inc -let $engine= 'ndbcluster'; -connection default; - -##### Execute the test of "table" files -# NDB has no files per PK, UI, ... -let $do_file_tests= 0; - -##### Execute PRIMARY KEY tests ##### -# AFAIK NDB is always partitioned using the explicit defined PRIMARY KEY -# or uses an internal one. -let $do_pk_tests= 1; - -##### Assign a big number smaller than the maximum value for partitions ##### -# and smaller than the maximum value of SIGNED INTEGER -# The NDB handler only supports 32 bit integers in VALUES -# 2147483647 seems to be too big. -let $MAX_VALUE= (2147483646); - -# Generate the prerequisites ($variables, @variables, tables) needed ---source suite/parts/inc/partition.pre - -##### Workarounds for known open engine specific bugs -# Bug#18735: Partitions: NDB, UNIQUE INDEX, UPDATE, strange server response -let $fixed_bug18735= 1; - -#------------------------------------------------------------------------------# -# Execute the tests to be applied to all storage engines ---source suite/parts/inc/partition_alter1_1_2.inc - -#------------------------------------------------------------------------------# -# Execute storage engine specific tests - -#------------------------------------------------------------------------------# -# Cleanup ---source suite/parts/inc/partition_cleanup.inc diff --git a/mysql-test/suite/parts/t/partition_alter1_1_ndb.test b/mysql-test/suite/parts/t/partition_alter1_1_ndb.test deleted file mode 100644 index 1a031f0ef79..00000000000 --- a/mysql-test/suite/parts/t/partition_alter1_1_ndb.test +++ /dev/null @@ -1,88 +0,0 @@ -################################################################################ -# t/partition_alter1_1_ndb.test # -# # -# Purpose: # -# Tests around ADD/DROP PRIMARY KEY and/or UNIQUE INDEX # -# NDB branch # -# # -#------------------------------------------------------------------------------# -# Original Author: mleich # -# Original Date: 2006-03-05 # -# Change Author: pcrews # -# Change Date: 2008-05-05 # -# Change: Split up original partition_alter1.test file to better accommodate # -# PushBuild machines' workloads. Total run time for all components # -# is essentially the same, but max. single run time is significantly # -# reduced # -################################################################################ -# -# NOTE: PLEASE DO NOT ADD NOT NDB SPECIFIC TESTCASES HERE ! -# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN -# THE SOURCED FILES ONLY. -# -# Please read the README at the end of inc/partition.pre before changing -# any of the variables. -# - -#------------------------------------------------------------------------------# -# General not engine specific settings and requirements ---source include/big_test.inc - -##### Options, for debugging support ##### -let $debug= 0; - -##### Option, for displaying files ##### -let $ls= 1; - -##### Number of rows for the INSERT/UPDATE/DELETE/SELECT experiments ##### -# on partioned tables -SET @max_row = 20; - -##### Execute more tests ##### -let $more_trigger_tests= 0; -let $more_pk_ui_tests= 0; - -# The server must support partitioning. But NDB is partitioned from the start. -# Thats why the next line is set to comment. -# --source include/have_partition.inc - -#------------------------------------------------------------------------------# -# Engine specific settings and requirements - -##### Storage engine to be tested ---source include/have_ndb.inc -let $engine= 'ndbcluster'; -connection default; - -##### Execute the test of "table" files -# NDB has no files per PK, UI, ... -let $do_file_tests= 0; - -##### Execute PRIMARY KEY tests ##### -# AFAIK NDB is always partitioned using the explicit defined PRIMARY KEY -# or uses an internal one. -let $do_pk_tests= 1; - -##### Assign a big number smaller than the maximum value for partitions ##### -# and smaller than the maximum value of SIGNED INTEGER -# The NDB handler only supports 32 bit integers in VALUES -# 2147483647 seems to be too big. -let $MAX_VALUE= (2147483646); - -# Generate the prerequisites ($variables, @variables, tables) needed ---source suite/parts/inc/partition.pre - -##### Workarounds for known open engine specific bugs -# Bug#18735: Partitions: NDB, UNIQUE INDEX, UPDATE, strange server response -let $fixed_bug18735= 1; - -#------------------------------------------------------------------------------# -# Execute the tests to be applied to all storage engines ---source suite/parts/inc/partition_alter1_1.inc - -#------------------------------------------------------------------------------# -# Execute storage engine specific tests - -#------------------------------------------------------------------------------# -# Cleanup ---source suite/parts/inc/partition_cleanup.inc diff --git a/mysql-test/suite/parts/t/partition_alter1_2_ndb.test b/mysql-test/suite/parts/t/partition_alter1_2_ndb.test deleted file mode 100644 index 497898fb089..00000000000 --- a/mysql-test/suite/parts/t/partition_alter1_2_ndb.test +++ /dev/null @@ -1,89 +0,0 @@ -################################################################################ -# t/partition_alter1_2_ndb.test # -# # -# Purpose: # -# Tests around ADD/DROP PRIMARY KEY and/or UNIQUE INDEX # -# NDB branch # -# # -#------------------------------------------------------------------------------# -# Original Author: mleich # -# Original Date: 2006-03-05 # -# Change Author: pcrews # -# Change Date: 2008-05-05 # -# Change: Split up original partition_alter1.test file to better accommodate # -# PushBuild machines' workloads. Total run time for all components # -# is essentially the same, but max. single run time is significantly # -# reduced # -################################################################################ - -# -# NOTE: PLEASE DO NOT ADD NOT NDB SPECIFIC TESTCASES HERE ! -# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN -# THE SOURCED FILES ONLY. -# -# Please read the README at the end of inc/partition.pre before changing -# any of the variables. -# - -#------------------------------------------------------------------------------# -# General not engine specific settings and requirements ---source include/big_test.inc - -##### Options, for debugging support ##### -let $debug= 0; - -##### Option, for displaying files ##### -let $ls= 1; - -##### Number of rows for the INSERT/UPDATE/DELETE/SELECT experiments ##### -# on partioned tables -SET @max_row = 20; - -##### Execute more tests ##### -let $more_trigger_tests= 0; -let $more_pk_ui_tests= 0; - -# The server must support partitioning. But NDB is partitioned from the start. -# Thats why the next line is set to comment. -# --source include/have_partition.inc - -#------------------------------------------------------------------------------# -# Engine specific settings and requirements - -##### Storage engine to be tested ---source include/have_ndb.inc -let $engine= 'ndbcluster'; -connection default; - -##### Execute the test of "table" files -# NDB has no files per PK, UI, ... -let $do_file_tests= 0; - -##### Execute PRIMARY KEY tests ##### -# AFAIK NDB is always partitioned using the explicit defined PRIMARY KEY -# or uses an internal one. -let $do_pk_tests= 1; - -##### Assign a big number smaller than the maximum value for partitions ##### -# and smaller than the maximum value of SIGNED INTEGER -# The NDB handler only supports 32 bit integers in VALUES -# 2147483647 seems to be too big. -let $MAX_VALUE= (2147483646); - -# Generate the prerequisites ($variables, @variables, tables) needed ---source suite/parts/inc/partition.pre - -##### Workarounds for known open engine specific bugs -# Bug#18735: Partitions: NDB, UNIQUE INDEX, UPDATE, strange server response -let $fixed_bug18735= 1; - -#------------------------------------------------------------------------------# -# Execute the tests to be applied to all storage engines ---source suite/parts/inc/partition_alter1_2.inc - -#------------------------------------------------------------------------------# -# Execute storage engine specific tests - -#------------------------------------------------------------------------------# -# Cleanup ---source suite/parts/inc/partition_cleanup.inc diff --git a/mysql-test/suite/parts/t/partition_auto_increment_ndb.test b/mysql-test/suite/parts/t/partition_auto_increment_ndb.test deleted file mode 100644 index 7aa3839762d..00000000000 --- a/mysql-test/suite/parts/t/partition_auto_increment_ndb.test +++ /dev/null @@ -1,41 +0,0 @@ -################################################################################ -# t/partition_auto_increment_ndb.test # -# # -# Purpose: # -# Tests around auto increment column # -# NDB branch # -# # -# Note: NDB behavior for auto_increment on secondary column in # -# multi-column-index is NOT like MyISAM, instead it uses the same # -# behavior as if it was the primary column. # -#------------------------------------------------------------------------------# -# Original Author: MattiasJ # -# Original Date: 2008-09-02 # -# Change Author: # -# Change Date: # -# Change: # -################################################################################ - -# -# NOTE: PLEASE DO NOT ADD NOT MYISAM SPECIFIC TESTCASES HERE ! -# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN -# THE SOURCED FILES ONLY. -# - -# The server must support partitioning. ---source include/have_partition.inc - -#------------------------------------------------------------------------------# -# Engine specific settings and requirements ---source include/have_ndb.inc - -##### Storage engine to be tested -let $engine= 'NDB'; -connection default; -#enable hash partitioning -SET new=on; - -#------------------------------------------------------------------------------# -# Execute the tests to be applied to all storage engines ---source suite/parts/inc/partition_auto_increment.inc - diff --git a/mysql-test/suite/parts/t/partition_basic_ndb.test b/mysql-test/suite/parts/t/partition_basic_ndb.test deleted file mode 100644 index 48e569006de..00000000000 --- a/mysql-test/suite/parts/t/partition_basic_ndb.test +++ /dev/null @@ -1,92 +0,0 @@ -################################################################################ -# t/partition_basic_ndb.test # -# # -# Purpose: # -# Tests around Create Partitioned table # -# NDB branch # -# # -#------------------------------------------------------------------------------# -# Original Author: mleich # -# Original Date: 2006-03-05 # -# Change Author: # -# Change Date: # -# Change: # -################################################################################ - -# -# NOTE: PLEASE DO NOT ADD NOT NDB SPECIFIC TESTCASES HERE ! -# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN -# THE SOURCED FILES ONLY. -# -# Please read the README at the end of inc/partition.pre before changing -# any of the variables. -# - -#------------------------------------------------------------------------------# -# General not engine specific settings and requirements - -##### Options, for debugging support ##### -let $debug= 0; -let $with_partitioning= 1; - -##### Option, for displaying files ##### -let $ls= 1; - -##### Number of rows for the INSERT/UPDATE/DELETE/SELECT experiments ##### -# on partioned tables -SET @max_row = 20; - -##### Execute more tests ##### -let $more_trigger_tests= 0; -let $more_pk_ui_tests= 0; - -# The server must support partitioning. But NDB is partitioned from the start. -# Thats why the next line is set to comment. -# --source include/have_partition.inc - -#------------------------------------------------------------------------------# -# Engine specific settings and requirements - -##### Storage engine to be tested ---source include/have_ndb.inc -let $engine= 'ndbcluster'; -connection default; - -# range, list and hash partitioning in ndb requires new_mode ---disable_query_log -set new=on; ---enable_query_log -##### Execute the test of "table" files -# NDB has no files per PK, UI, ... -let $do_file_tests= 0; - -##### Execute PRIMARY KEY tests ##### -# AFAIK NDB is always partitioned using the explicit defined PRIMARY KEY -# or uses an internal one. -let $do_pk_tests= 1; - -##### Assign a big number smaller than the maximum value for partitions ##### -# and smaller than the maximum value of SIGNED INTEGER -# The NDB handler only supports 32 bit integers in VALUES -# 2147483647 seems to be too big. -let $MAX_VALUE= (2147483646); - -# Generate the prerequisites ($variables, @variables, tables) needed ---source suite/parts/inc/partition.pre - -##### Workarounds for known open engine specific bugs -# Bug#18730 Partitions: NDB, crash on SELECT MIN() -let $fixed_bug18730= 1; -# Bug#18735: Partitions: NDB, UNIQUE INDEX, UPDATE, strange server response -let $fixed_bug18735= 0; - -#------------------------------------------------------------------------------# -# Execute the tests to be applied to all storage engines ---source suite/parts/inc/partition_basic.inc - -#------------------------------------------------------------------------------# -# Execute storage engine specific tests - -#------------------------------------------------------------------------------# -# Cleanup ---source suite/parts/inc/partition_cleanup.inc diff --git a/mysql-test/suite/parts/t/partition_engine_ndb.test b/mysql-test/suite/parts/t/partition_engine_ndb.test deleted file mode 100644 index 40d031eab69..00000000000 --- a/mysql-test/suite/parts/t/partition_engine_ndb.test +++ /dev/null @@ -1,88 +0,0 @@ -################################################################################ -# t/partition_engine_ndb.test # -# # -# Purpose: # -# Tests around Create/Alter partitioned tables and storage engine settings # -# NDB branch # -# # -#------------------------------------------------------------------------------# -# Original Author: mleich # -# Original Date: 2006-03-05 # -# Change Author: # -# Change Date: # -# Change: # -################################################################################ - -# -# NOTE: PLEASE DO NOT ADD NOT NDB SPECIFIC TESTCASES HERE ! -# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN -# THE SOURCED FILES ONLY. -# -# Please read the README at the end of inc/partition.pre before changing -# any of the variables. -# - -#------------------------------------------------------------------------------# -# General not engine specific settings and requirements - -##### Options, for debugging support ##### -let $debug= 0; - -##### Option, for displaying files ##### -let $ls= 1; - -##### Number of rows for the INSERT/UPDATE/DELETE/SELECT experiments ##### -# on partioned tables -SET @max_row = 20; - -##### Execute more tests ##### -let $more_trigger_tests= 0; -let $more_pk_ui_tests= 0; - -# The server must support partitioning. But NDB is partitioned from the start. -# Thats why the next line is set to comment. -# --source include/have_partition.inc - -#------------------------------------------------------------------------------# -# Engine specific settings and requirements - -##### Storage engine to be tested -let $engine= 'ndbcluster'; ---source include/have_ndb.inc -connection default; - -# range, list and hash partitioning in ndb requires new_mode ---disable_query_log -set new=on; ---enable_query_log -##### Execute the test of "table" files -# NDB has no files per PK, UI, ... -let $do_file_tests= 0; - -##### Execute PRIMARY KEY tests ##### -# AFAIK NDB is always partitioned using the explicit defined PRIMARY KEY -# or uses an internal one. -let $do_pk_tests= 1; - -##### Assign a big number smaller than the maximum value for partitions ##### -# and smaller than the maximum value of SIGNED INTEGER -# The NDB handler only supports 32 bit integers in VALUES -# 2147483647 seems to be too big. -let $MAX_VALUE= (2147483646); - -# Generate the prerequisites ($variables, @variables, tables) needed ---source suite/parts/inc/partition.pre - -##### Workarounds for known open engine specific bugs -# none - -#------------------------------------------------------------------------------# -# Execute the tests to be applied to all storage engines ---source suite/parts/inc/partition_engine.inc - -#------------------------------------------------------------------------------# -# Execute storage engine specific tests - -#------------------------------------------------------------------------------# -# Cleanup ---source suite/parts/inc/partition_cleanup.inc diff --git a/mysql-test/suite/parts/t/partition_int_ndb.test b/mysql-test/suite/parts/t/partition_int_ndb.test deleted file mode 100644 index 5e464ff75b5..00000000000 --- a/mysql-test/suite/parts/t/partition_int_ndb.test +++ /dev/null @@ -1,54 +0,0 @@ -################################################################################ -# t/partition_int_ndb.test # -# # -# Purpose: # -# Tests around integer type # -# NDB branch # -# # -#------------------------------------------------------------------------------# -# Original Author: HH # -# Original Date: 2006-08-01 # -# Change Author: # -# Change Date: # -# Change: # -################################################################################ - -# -# NOTE: PLEASE DO NOT ADD NOT NDB SPECIFIC TESTCASES HERE ! -# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN -# THE SOURCED FILES ONLY. -# -# Please read the README at the end of inc/partition.pre before changing -# any of the variables. -# - -#------------------------------------------------------------------------------# -# General not engine specific settings and requirements - -##### Options, for debugging support ##### -let $debug= 0; - -# The server must support partitioning. ---source include/have_partition.inc - -#------------------------------------------------------------------------------# -# Engine specific settings and requirements - -##### Storage engine to be tested ---source include/have_ndb.inc -let $engine= 'NDB'; -connection default; - -##### max rows to be inserted -let $maxrows=1024; -# range, list and hash partitioning in ndb requires new_mode ---disable_query_log -set new=on; ---enable_query_log -#------------------------------------------------------------------------------# -# Execute the tests to be applied to all storage engines ---source suite/parts/inc/partition_tinyint.inc ---source suite/parts/inc/partition_smallint.inc ---source suite/parts/inc/partition_int.inc ---source suite/parts/inc/partition_mediumint.inc ---source suite/parts/inc/partition_bigint.inc diff --git a/mysql-test/suite/parts/t/partition_mgm_lc0_ndb.test b/mysql-test/suite/parts/t/partition_mgm_lc0_ndb.test deleted file mode 100644 index 736e45067bc..00000000000 --- a/mysql-test/suite/parts/t/partition_mgm_lc0_ndb.test +++ /dev/null @@ -1,49 +0,0 @@ -################################################################################ -# t/partition_mgm_lc0_ndb.test # -# # -# Purpose: # -# Test of partitioning management functions (incl upper/lower case names): # -# NDB branch + lower_case_table_names = 0 # -# (usually Unix like, apart from Mac OS X) # -# Also requires lower_case_file_system OFF # -# # -#------------------------------------------------------------------------------# -# Original Author: mattiasj # -# Original Date: 2008-06-27 # -################################################################################ - -# The server must support partitioning. ---source include/have_partition.inc - -# -# NOTE: PLEASE DO NOT ADD NOT INNODB SPECIFIC TESTCASES HERE ! -# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN -# THE SOURCED FILES ONLY. -# -# Please read the README at the end of inc/partition.pre before changing -# any of the variables. -# - -#------------------------------------------------------------------------------# -# General not engine specific settings and requirements ---source include/have_lowercase0.inc ---source include/have_case_sensitive_file_system.inc - -#------------------------------------------------------------------------------# -# Engine specific settings and requirements -let $have_bug33158= 1; - -##### Storage engine to be tested ---source include/have_ndb.inc -connection default; -# Use either $can_only_key or new=on option to run test. -let $can_only_key= 1; -# Allow hash/list/range partitioning with ndb -#SET new=on; -let $engine= 'NDBCluster'; -# NDB does not yet support TRUNCATE PARTITION -let $no_truncate= 1; - -#------------------------------------------------------------------------------# -# Execute the tests to be applied to all storage engines ---source suite/parts/inc/partition_mgm.inc diff --git a/mysql-test/suite/parts/t/partition_mgm_lc1_ndb-master.opt b/mysql-test/suite/parts/t/partition_mgm_lc1_ndb-master.opt deleted file mode 100644 index 62ab6dad1e0..00000000000 --- a/mysql-test/suite/parts/t/partition_mgm_lc1_ndb-master.opt +++ /dev/null @@ -1 +0,0 @@ ---lower_case_table_names=1 diff --git a/mysql-test/suite/parts/t/partition_mgm_lc1_ndb.test b/mysql-test/suite/parts/t/partition_mgm_lc1_ndb.test deleted file mode 100644 index ac425eb84ff..00000000000 --- a/mysql-test/suite/parts/t/partition_mgm_lc1_ndb.test +++ /dev/null @@ -1,46 +0,0 @@ -################################################################################ -# t/partition_mgm_lc1_ndb.test # -# # -# Purpose: # -# Test of partitioning management functions (incl upper/lower case names): # -# NDB branch + lower_case_table_names = 1 (usually Windows) # -# # -#------------------------------------------------------------------------------# -# Original Author: mattiasj # -# Original Date: 2008-06-27 # -################################################################################ - -# The server must support partitioning. ---source include/have_partition.inc - -# -# NOTE: PLEASE DO NOT ADD NOT INNODB SPECIFIC TESTCASES HERE ! -# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN -# THE SOURCED FILES ONLY. -# -# Please read the README at the end of inc/partition.pre before changing -# any of the variables. -# - -#------------------------------------------------------------------------------# -# General not engine specific settings and requirements ---source include/have_lowercase1.inc - -#------------------------------------------------------------------------------# -# Engine specific settings and requirements -let $have_bug33158= 1; - -##### Storage engine to be tested ---source include/have_ndb.inc -connection default; -# Use either $can_only_key or new=on option to run test. -let $can_only_key= 1; -# Allow hash/list/range partitioning with ndb -#SET new=on; -let $engine= 'NDBCluster'; -# NDB does not yet support TRUNCATE PARTITION -let $no_truncate= 1; - -#------------------------------------------------------------------------------# -# Execute the tests to be applied to all storage engines ---source suite/parts/inc/partition_mgm.inc diff --git a/mysql-test/suite/parts/t/partition_mgm_lc2_ndb-master.opt b/mysql-test/suite/parts/t/partition_mgm_lc2_ndb-master.opt deleted file mode 100644 index f18979f5a6a..00000000000 --- a/mysql-test/suite/parts/t/partition_mgm_lc2_ndb-master.opt +++ /dev/null @@ -1 +0,0 @@ ---lower_case_table_names=2 diff --git a/mysql-test/suite/parts/t/partition_mgm_lc2_ndb.test b/mysql-test/suite/parts/t/partition_mgm_lc2_ndb.test deleted file mode 100644 index 725ba3b5e74..00000000000 --- a/mysql-test/suite/parts/t/partition_mgm_lc2_ndb.test +++ /dev/null @@ -1,45 +0,0 @@ -################################################################################ -# t/partition_mgm_lc2_ndb.test # -# # -# Purpose: # -# Test of partitioning management functions (incl upper/lower case names): # -# NDB branch + lower_case_table_names = 2 (usually Mac OS X) # -# # -#------------------------------------------------------------------------------# -# Original Author: mattiasj # -# Original Date: 2008-06-27 # -################################################################################ - -# The server must support partitioning. ---source include/have_partition.inc - -# -# NOTE: PLEASE DO NOT ADD NOT INNODB SPECIFIC TESTCASES HERE ! -# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN -# THE SOURCED FILES ONLY. -# -# Please read the README at the end of inc/partition.pre before changing -# any of the variables. -# - -#------------------------------------------------------------------------------# -# General not engine specific settings and requirements ---source include/have_lowercase2.inc - -#------------------------------------------------------------------------------# -# Engine specific settings and requirements - -##### Storage engine to be tested ---source include/have_ndb.inc -connection default; -# Use either $can_only_key or new=on option to run test. -let $can_only_key= 1; -# Allow hash/list/range partitioning with ndb -#SET new=on; -let $engine= 'NDBCluster'; -# NDB does not yet support TRUNCATE PARTITION -let $no_truncate= 1; - -#------------------------------------------------------------------------------# -# Execute the tests to be applied to all storage engines ---source suite/parts/inc/partition_mgm.inc diff --git a/mysql-test/suite/parts/t/partition_syntax_ndb.test b/mysql-test/suite/parts/t/partition_syntax_ndb.test deleted file mode 100644 index c783e9f602e..00000000000 --- a/mysql-test/suite/parts/t/partition_syntax_ndb.test +++ /dev/null @@ -1,89 +0,0 @@ -################################################################################ -# t/partition_syntax_ndb.test # -# # -# Purpose: # -# Tests around Create Partitioned table syntax # -# NDB branch # -# # -#------------------------------------------------------------------------------# -# Original Author: mleich # -# Original Date: 2006-03-05 # -# Change Author: # -# Change Date: # -# Change: # -################################################################################ - -# -# NOTE: PLEASE DO NOT ADD NOT NDB SPECIFIC TESTCASES HERE ! -# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN -# THE SOURCED FILES ONLY. -# -# Please read the README at the end of inc/partition.pre before changing -# any of the variables. -# - -#------------------------------------------------------------------------------# -# General not engine specific settings and requirements - -##### Options, for debugging support ##### -let $debug= 0; - -##### Option, for displaying files ##### -let $ls= 1; - -##### Number of rows for the INSERT/UPDATE/DELETE/SELECT experiments ##### -# on partioned tables -SET @max_row = 20; - -##### Execute more tests ##### -let $more_trigger_tests= 0; -let $more_pk_ui_tests= 0; - -# The server must support partitioning. But NDB is partitioned from the start. -# Thats why the next line is set to comment. -# --source include/have_partition.inc - -#------------------------------------------------------------------------------# -# Engine specific settings and requirements - -##### Storage engine to be tested ---source include/have_ndb.inc -let $engine= 'ndbcluster'; -connection default; - -# range, list and hash partitioning in ndb requires new_mode ---disable_query_log -set new=on; ---enable_query_log -##### Execute the test of "table" files -# NDB has no files per PK, UI, ... -let $do_file_tests= 0; - -##### Execute PRIMARY KEY tests ##### -# AFAIK NDB is always partitioned using the explicit defined PRIMARY KEY -# or uses an internal one. -let $do_pk_tests= 1; - -##### Assign a big number smaller than the maximum value for partitions ##### -# and smaller than the maximum value of SIGNED INTEGER -# The NDB handler only supports 32 bit integers in VALUES -# 2147483647 seems to be too big. -let $MAX_VALUE= (2147483646); - -# Generate the prerequisites ($variables, @variables, tables) needed ---source suite/parts/inc/partition.pre - -##### Workarounds for known open engine specific bugs -# Bug#18735: Partitions: NDB, UNIQUE INDEX, UPDATE, strange server response -let $fixed_bug18735= 0; - -#------------------------------------------------------------------------------# -# Execute the tests to be applied to all storage engines ---source suite/parts/inc/partition_syntax.inc - -#------------------------------------------------------------------------------# -# Execute storage engine specific tests - -#------------------------------------------------------------------------------# -# Cleanup ---source suite/parts/inc/partition_cleanup.inc diff --git a/mysql-test/suite/parts/t/partition_value_ndb.test b/mysql-test/suite/parts/t/partition_value_ndb.test deleted file mode 100644 index 80b4ba6fb64..00000000000 --- a/mysql-test/suite/parts/t/partition_value_ndb.test +++ /dev/null @@ -1,94 +0,0 @@ -################################################################################ -# t/partition_value_ndb.test # -# # -# Purpose: # -# Tests around "exotic" values calculated by the partitioning function # -# NDB branch # -# # -#------------------------------------------------------------------------------# -# Original Author: mleich # -# Original Date: 2006-04-11 # -# Change Author: mleich # -# Change Date: 2008-12-08 # -# Change: Remove test from disabled.def + change test that it gets skipped # -################################################################################ - -# -# NOTE: PLEASE DO NOT ADD NOT NDB SPECIFIC TESTCASES HERE ! -# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN -# THE SOURCED FILES ONLY. -# -# Please read the README at the end of inc/partition.pre before changing -# any of the variables. -# - -# -# CAST() within the partitioning function si no more supported, but we get -# this functionality probably soon again. Therefor we do not delete this test. ---skip # CAST() in partitioning function is currently not supported. - - -#------------------------------------------------------------------------------# -# General not engine specific settings and requirements - -##### Options, for debugging support ##### -let $debug= 0; - -##### Option, for displaying files ##### -let $ls= 1; - -##### Number of rows for the INSERT/UPDATE/DELETE/SELECT experiments ##### -# on partioned tables -SET @max_row = 20; - -##### Execute more tests ##### -let $more_trigger_tests= 0; -let $more_pk_ui_tests= 0; - -# The server must support partitioning. But NDB is partitioned from the start. -# Thats why the next line is set to comment. -# --source include/have_partition.inc - -#------------------------------------------------------------------------------# -# Engine specific settings and requirements - -##### Storage engine to be tested ---source include/have_ndb.inc -let $engine= 'ndbcluster'; -connection default; - -# range, list and hash partitioning in ndb requires new_mode ---disable_query_log -set new=on; ---enable_query_log -##### Execute the test of "table" files -# NDB has no files per PK, UI, ... -let $do_file_tests= 0; - -##### Execute PRIMARY KEY tests ##### -# AFAIK NDB is always partitioned using the explicit defined PRIMARY KEY -# or uses an internal one. -let $do_pk_tests= 1; - -##### Assign a big number smaller than the maximum value for partitions ##### -# and smaller than the maximum value of SIGNED INTEGER -# The NDB handler only supports 32 bit integers in VALUES -# 2147483647 seems to be too big. -let $MAX_VALUE= (2147483646); - -# Generate the prerequisites ($variables, @variables, tables) needed ---source suite/parts/inc/partition.pre - -##### Workarounds for known open engine specific bugs -# none - -#------------------------------------------------------------------------------# -# Execute the tests to be applied to all storage engines ---source suite/parts/inc/partition_value.inc - -#------------------------------------------------------------------------------# -# Execute storage engine specific tests - -#------------------------------------------------------------------------------# -# Cleanup ---source suite/parts/inc/partition_cleanup.inc diff --git a/mysql-test/suite/parts/t/rpl_partition.test b/mysql-test/suite/parts/t/rpl_partition.test index 6be0a47e43f..659fd34b7e4 100644 --- a/mysql-test/suite/parts/t/rpl_partition.test +++ b/mysql-test/suite/parts/t/rpl_partition.test @@ -25,13 +25,6 @@ select @@global.binlog_format, @@session.binlog_format; --echo [on master] connection master; ---disable_warnings -DROP TABLE IF EXISTS t1, t2, t3; -DROP PROCEDURE IF EXISTS p1; -DROP PROCEDURE IF EXISTS p2; -DROP PROCEDURE IF EXISTS p3; ---enable_warnings - eval CREATE TABLE t1(id MEDIUMINT NOT NULL AUTO_INCREMENT, dt TIMESTAMP, user CHAR(255), uuidf LONGBLOB, fkid MEDIUMINT, filler VARCHAR(255), @@ -153,7 +146,6 @@ SELECT count(*) as "Master bykey" FROM t2; CALL p3(); SELECT count(*) as "Master byrange" FROM t3; -#--source include/master-slave-end.inc --sync_slave_with_master connection slave; show create table t3; @@ -166,12 +158,13 @@ connection master; set @@global.binlog_format= @old_global_binlog_format; set @@session.binlog_format= @old_session_binlog_format; DROP TABLE t1, t2, t3; -DROP PROCEDURE IF EXISTS p1; -DROP PROCEDURE IF EXISTS p2; -DROP PROCEDURE IF EXISTS p3; +DROP PROCEDURE p1; +DROP PROCEDURE p2; +DROP PROCEDURE p3; --echo [on slave] sync_slave_with_master; set @@global.binlog_format= @old_global_binlog_format; set @@session.binlog_format= @old_session_binlog_format; # End of 5.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/include/rpl_mixed_ddl.inc b/mysql-test/suite/rpl/include/rpl_mixed_ddl.inc index 79825016448..89db1c3545d 100644 --- a/mysql-test/suite/rpl/include/rpl_mixed_ddl.inc +++ b/mysql-test/suite/rpl/include/rpl_mixed_ddl.inc @@ -1,6 +1,4 @@ ######################################### -# Author: Serge Kozlov skozlov@mysql.com -# Date: 07/10/2006 # Purpose: testing the replication in mixed mode # Requirements: define binlog format for mysqld as in example below: # ./mysql-test-run.pl --mysqld=--binlog-format=mixed @@ -82,3 +80,4 @@ sync_slave_with_master; # the files your self to see what is not matching --diff_files $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_master.sql $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_slave.sql +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/include/rpl_mixed_dml.inc b/mysql-test/suite/rpl/include/rpl_mixed_dml.inc index d953397c0cb..dc245b8d38c 100644 --- a/mysql-test/suite/rpl/include/rpl_mixed_dml.inc +++ b/mysql-test/suite/rpl/include/rpl_mixed_dml.inc @@ -1,6 +1,4 @@ ######################################### -# Author: Serge Kozlov skozlov@mysql.com -# Date: 07/10/2006 # Purpose: testing the replication in mixed mode # Requirements: define binlog format for mysqld as in example below: # ./mysql-test-run.pl --mysqld=--binlog-format=mixed @@ -342,3 +340,4 @@ sync_slave_with_master; # the files your self to see what is not matching --diff_files $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_master.sql $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_slave.sql +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl000011.result b/mysql-test/suite/rpl/r/rpl000011.result deleted file mode 100644 index dd0fa2fbe74..00000000000 --- a/mysql-test/suite/rpl/r/rpl000011.result +++ /dev/null @@ -1,16 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -create table t1 (n int); -insert into t1 values(1); -stop slave; -start slave; -insert into t1 values(2); -select * from t1; -n -1 -2 -drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl000010.result b/mysql-test/suite/rpl/r/rpl_000010.result similarity index 50% rename from mysql-test/suite/rpl/r/rpl000010.result rename to mysql-test/suite/rpl/r/rpl_000010.result index 65191ea411f..4bb87a765cd 100644 --- a/mysql-test/suite/rpl/r/rpl000010.result +++ b/mysql-test/suite/rpl/r/rpl_000010.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create table t1 (n int not null auto_increment primary key); insert into t1 values(NULL); insert into t1 values(2); @@ -12,3 +8,4 @@ n 1 2 drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_000011.result b/mysql-test/suite/rpl/r/rpl_000011.result new file mode 100644 index 00000000000..8a59eb746ad --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_000011.result @@ -0,0 +1,15 @@ +include/master-slave.inc +[connection master] +create table t1 (n int); +insert into t1 values(1); +stop slave; +include/wait_for_slave_to_stop.inc +start slave; +include/wait_for_slave_to_start.inc +insert into t1 values(2); +select * from t1; +n +1 +2 +drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl000013.result b/mysql-test/suite/rpl/r/rpl_000013.result similarity index 74% rename from mysql-test/suite/rpl/r/rpl000013.result rename to mysql-test/suite/rpl/r/rpl_000013.result index 37838bb88e0..e94a469e970 100644 --- a/mysql-test/suite/rpl/r/rpl000013.result +++ b/mysql-test/suite/rpl/r/rpl_000013.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create table t2(n int); create temporary table t1 (n int); insert into t1 values(1),(2),(3); @@ -26,3 +22,4 @@ Slave_open_temp_tables 0 drop table if exists t1,t2; Warnings: Note 1051 Unknown table 't1' +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl000017.result b/mysql-test/suite/rpl/r/rpl_000017.result similarity index 62% rename from mysql-test/suite/rpl/r/rpl000017.result rename to mysql-test/suite/rpl/r/rpl_000017.result index 39f46c41217..1b4f9f1e8a3 100644 --- a/mysql-test/suite/rpl/r/rpl000017.result +++ b/mysql-test/suite/rpl/r/rpl_000017.result @@ -1,11 +1,8 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +include/master-slave.inc +[connection master] grant replication slave on *.* to replicate@localhost identified by 'aaaaaaaaaaaaaaab'; grant replication slave on *.* to replicate@127.0.0.1 identified by 'aaaaaaaaaaaaaaab'; -start slave; -drop table if exists t1; +include/start_slave.inc create table t1(n int); insert into t1 values(24); select * from t1; @@ -13,4 +10,4 @@ n 24 drop table t1; delete from mysql.user where user="replicate"; -call mtr.force_restart(); +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_EE_err.result b/mysql-test/suite/rpl/r/rpl_EE_err.result index 8c1277445b2..8220f4e0c8d 100644 --- a/mysql-test/suite/rpl/r/rpl_EE_err.result +++ b/mysql-test/suite/rpl/r/rpl_EE_err.result @@ -1,11 +1,8 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create table t1 (a int) engine=myisam; flush tables; drop table if exists t1; Warnings: Warning 2 Can't find file: 't1' (errno: 2) +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_LD_INFILE.result b/mysql-test/suite/rpl/r/rpl_LD_INFILE.result index b092dd9e088..3280d4bbaf7 100644 --- a/mysql-test/suite/rpl/r/rpl_LD_INFILE.result +++ b/mysql-test/suite/rpl/r/rpl_LD_INFILE.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP TABLE IF EXISTS test.t1; CREATE TABLE test.t1 (a VARCHAR(255), PRIMARY KEY(a)); LOAD DATA INFILE '../../std_data/words2.dat' INTO TABLE test.t1; @@ -115,3 +111,4 @@ abasement abased abase DROP TABLE test.t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_alter.result b/mysql-test/suite/rpl/r/rpl_alter.result index 6ef5ce3462a..2cffa70d778 100644 --- a/mysql-test/suite/rpl/r/rpl_alter.result +++ b/mysql-test/suite/rpl/r/rpl_alter.result @@ -1,10 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -drop database if exists mysqltest; +include/master-slave.inc +[connection master] create database mysqltest; create table mysqltest.t1 ( n int); alter table mysqltest.t1 add m int; @@ -19,3 +14,4 @@ select * from mysqltest.t3; n 45 drop database mysqltest; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_alter_db.result b/mysql-test/suite/rpl/r/rpl_alter_db.result index 60c07d0dede..55adbfeda79 100644 --- a/mysql-test/suite/rpl/r/rpl_alter_db.result +++ b/mysql-test/suite/rpl/r/rpl_alter_db.result @@ -1,12 +1,9 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] ==== Verify that alter database does not stop replication ==== create database temp_db; use temp_db; alter database collate latin1_bin; ==== Clean up ==== drop database temp_db; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_auto_increment.result b/mysql-test/suite/rpl/r/rpl_auto_increment.result index fdd94264041..03b413e1b12 100644 --- a/mysql-test/suite/rpl/r/rpl_auto_increment.result +++ b/mysql-test/suite/rpl/r/rpl_auto_increment.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create table t1 (a int not null auto_increment,b int, primary key (a)) engine=myisam auto_increment=3; insert into t1 values (NULL,1),(NULL,2),(NULL,3); select * from t1; @@ -244,12 +240,7 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1 drop table t1; -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t2; CREATE TABLE t1 (id INT NOT NULL AUTO_INCREMENT PRIMARY KEY) ENGINE=innodb; @@ -303,12 +294,30 @@ id INSERT INTO t1 VALUES(4); INSERT INTO t2 VALUES(4); FLUSH LOGS; -Comparing tables master:test.t1 and slave:test.t1 -Comparing tables master:test.t2 and slave:test.t2 +include/diff_tables.inc [master:t1, slave:t1] +include/diff_tables.inc [master:t2, slave:t2] DROP TABLE t1; DROP TABLE t2; -Comparing tables master:test.t1 and slave:test.t1 -Comparing tables master:test.t2 and slave:test.t2 +include/diff_tables.inc [master:t1, slave:t1] +include/diff_tables.inc [master:t2, slave:t2] DROP TABLE t1; DROP TABLE t2; SET SQL_MODE=''; +CREATE TABLE t1 (id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, data INT) ENGINE=innodb; +BEGIN; +# Set sql_mode with NO_AUTO_VALUE_ON_ZERO for allowing +# zero to fill the auto_increment field. +SET SQL_MODE=NO_AUTO_VALUE_ON_ZERO; +INSERT INTO t1(id,data) VALUES(0,2); +# Resetting sql_mode without NO_AUTO_VALUE_ON_ZERO to +# affect the execution of the transaction on slave. +SET SQL_MODE=0; +COMMIT; +SELECT * FROM t1; +id data +0 2 +SELECT * FROM t1; +id data +0 2 +DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_auto_increment_11932.result b/mysql-test/suite/rpl/r/rpl_auto_increment_11932.result index 25eda6ee454..62ff28e7159 100644 --- a/mysql-test/suite/rpl/r/rpl_auto_increment_11932.result +++ b/mysql-test/suite/rpl/r/rpl_auto_increment_11932.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] drop database if exists test1; create database test1; use test1; @@ -44,4 +40,4 @@ id fname 1 testtest 1 2 test drop database test1; -drop database test1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_auto_increment_bug33029.result b/mysql-test/suite/rpl/r/rpl_auto_increment_bug33029.result new file mode 100644 index 00000000000..71c6ff57f80 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_auto_increment_bug33029.result @@ -0,0 +1,45 @@ +include/master-slave.inc +[connection master] +==== Initialize ==== +SET @old_relay_log_purge= @@global.relay_log_purge; +include/setup_fake_relay_log.inc +Setting up fake replication from MYSQL_TEST_DIR/std_data/bug33029-slave-relay-bin.000001 +==== Test ==== +start slave sql_thread; +include/wait_for_slave_param.inc [Exec_Master_Log_Pos] +# Result on slave +SELECT * FROM t1; +id +5 +6 +7 +8 +9 +10 +11 +SELECT * FROM t2; +id +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +==== Clean up ==== +stop slave sql_thread; +include/cleanup_fake_relay_log.inc +DROP TABLE t1, t2; +DROP PROCEDURE p1; +DROP PROCEDURE p2; +DROP FUNCTION f1; +SET @@global.relay_log_purge= @old_relay_log_purge; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_auto_increment_update_failure.result b/mysql-test/suite/rpl/r/rpl_auto_increment_update_failure.result index b2cc92491c3..af84978dc80 100644 --- a/mysql-test/suite/rpl/r/rpl_auto_increment_update_failure.result +++ b/mysql-test/suite/rpl/r/rpl_auto_increment_update_failure.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] # Test case1: INVOKES A TRIGGER with after insert action create table t1(a int, b int) engine=innodb; create table t2(i1 int not null auto_increment, a int, primary key(i1)) engine=innodb; @@ -110,9 +106,9 @@ master-bin.000001 # Xid # # COMMIT /* XID */ commit; #Test if the results are consistent on master and slave #for 'INVOKES A TRIGGER with after insert action' -Comparing tables master:test.t2 and slave:test.t2 -Comparing tables master:test.t4 and slave:test.t4 -Comparing tables master:test.t6 and slave:test.t6 +include/diff_tables.inc [master:t2, slave:t2] +include/diff_tables.inc [master:t4, slave:t4] +include/diff_tables.inc [master:t6, slave:t6] DROP TABLE t1; DROP TABLE t2; DROP TABLE t3; @@ -226,9 +222,9 @@ master-bin.000001 # Xid # # COMMIT /* XID */ commit; #Test if the results are consistent on master and slave #for 'INVOKES A TRIGGER with before insert action' -Comparing tables master:test.t2 and slave:test.t2 -Comparing tables master:test.t4 and slave:test.t4 -Comparing tables master:test.t6 and slave:test.t6 +include/diff_tables.inc [master:t2, slave:t2] +include/diff_tables.inc [master:t4, slave:t4] +include/diff_tables.inc [master:t6, slave:t6] DROP TABLE t1; DROP TABLE t2; DROP TABLE t3; @@ -342,9 +338,9 @@ master-bin.000001 # Xid # # COMMIT /* XID */ commit; #Test if the results are consistent on master and slave #for 'INVOKES A TRIGGER with after update action' -Comparing tables master:test.t2 and slave:test.t2 -Comparing tables master:test.t4 and slave:test.t4 -Comparing tables master:test.t6 and slave:test.t6 +include/diff_tables.inc [master:t2, slave:t2] +include/diff_tables.inc [master:t4, slave:t4] +include/diff_tables.inc [master:t6, slave:t6] DROP TABLE t1; DROP TABLE t2; DROP TABLE t3; @@ -458,9 +454,9 @@ master-bin.000001 # Xid # # COMMIT /* XID */ commit; #Test if the results are consistent on master and slave #for 'INVOKES A TRIGGER with before update action' -Comparing tables master:test.t2 and slave:test.t2 -Comparing tables master:test.t4 and slave:test.t4 -Comparing tables master:test.t6 and slave:test.t6 +include/diff_tables.inc [master:t2, slave:t2] +include/diff_tables.inc [master:t4, slave:t4] +include/diff_tables.inc [master:t6, slave:t6] DROP TABLE t1; DROP TABLE t2; DROP TABLE t3; @@ -574,9 +570,9 @@ master-bin.000001 # Xid # # COMMIT /* XID */ commit; #Test if the results are consistent on master and slave #for 'INVOKES A TRIGGER with after delete action' -Comparing tables master:test.t2 and slave:test.t2 -Comparing tables master:test.t4 and slave:test.t4 -Comparing tables master:test.t6 and slave:test.t6 +include/diff_tables.inc [master:t2, slave:t2] +include/diff_tables.inc [master:t4, slave:t4] +include/diff_tables.inc [master:t6, slave:t6] DROP TABLE t1; DROP TABLE t2; DROP TABLE t3; @@ -690,9 +686,9 @@ master-bin.000001 # Xid # # COMMIT /* XID */ commit; #Test if the results are consistent on master and slave #for 'INVOKES A TRIGGER with before delete action' -Comparing tables master:test.t2 and slave:test.t2 -Comparing tables master:test.t4 and slave:test.t4 -Comparing tables master:test.t6 and slave:test.t6 +include/diff_tables.inc [master:t2, slave:t2] +include/diff_tables.inc [master:t4, slave:t4] +include/diff_tables.inc [master:t6, slave:t6] DROP TABLE t1; DROP TABLE t2; DROP TABLE t3; @@ -761,8 +757,8 @@ master-bin.000001 # Xid # # COMMIT /* XID */ commit; #Test if the results are consistent on master and slave #for 'CALLS A FUNCTION which INVOKES A TRIGGER with after insert action' -Comparing tables master:test.t2 and slave:test.t2 -Comparing tables master:test.t3 and slave:test.t3 +include/diff_tables.inc [master:t2, slave:t2] +include/diff_tables.inc [master:t3, slave:t3] drop table t1; drop table t2; drop table t3; @@ -828,8 +824,8 @@ master-bin.000001 # Xid # # COMMIT /* XID */ commit; #Test if the results are consistent on master and slave #for 'CALLS A FUNCTION which INVOKES A TRIGGER with before insert action' -Comparing tables master:test.t2 and slave:test.t2 -Comparing tables master:test.t3 and slave:test.t3 +include/diff_tables.inc [master:t2, slave:t2] +include/diff_tables.inc [master:t3, slave:t3] drop table t1; drop table t2; drop table t3; @@ -853,7 +849,7 @@ INSERT INTO v16(c1) VALUES (25), (26); commit; #Test if the results are consistent on master and slave #for 'INSERT DATA INTO VIEW WHICH INVOKES TRIGGERS' -Comparing tables master:test.t3 and slave:test.t3 +include/diff_tables.inc [master:t3, slave:t3] DROP TABLE t1; DROP TABLE t2; DROP TABLE t3; @@ -877,7 +873,7 @@ INSERT INTO v16(c1) VALUES (25), (26); commit; #Test if the results are consistent on master and slave #for 'INSERT DATA INTO VIEW WHICH INVOKES TRIGGERS' -Comparing tables master:test.t3 and slave:test.t3 +include/diff_tables.inc [master:t3, slave:t3] DROP TABLE t1; DROP TABLE t2; DROP TABLE t3; @@ -980,8 +976,8 @@ master-bin.000001 # Query # # use `test`; insert into t2(a,b) values(3,3) master-bin.000001 # Xid # # COMMIT /* XID */ #Test if the results are consistent on master and slave #for 'UPDATE MORE THAN ONE TABLES ON TOP-STATEMENT' -Comparing tables master:test.t1 and slave:test.t1 -Comparing tables master:test.t2 and slave:test.t2 +include/diff_tables.inc [master:t1, slave:t1] +include/diff_tables.inc [master:t2, slave:t2] drop table t1; drop table t2; # Test case14: INSERT DATA INTO VIEW WHICH INVOLVED MORE THAN ONE TABLES @@ -1034,8 +1030,9 @@ master-bin.000001 # Query # # use `test`; INSERT INTO v15(c2) VALUES (25), (26) master-bin.000001 # Xid # # COMMIT /* XID */ #Test if the results are consistent on master and slave #for 'INSERT DATA INTO VIEW WHICH INVOLVED MORE THAN ONE TABLES' -Comparing tables master:test.t1 and slave:test.t1 -Comparing tables master:test.t2 and slave:test.t2 +include/diff_tables.inc [master:t1, slave:t1] +include/diff_tables.inc [master:t2, slave:t2] drop table t1; drop table t2; drop view v15; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_begin_commit_rollback.result b/mysql-test/suite/rpl/r/rpl_begin_commit_rollback.result index 94c4e31d584..4cddb7d2cc7 100644 --- a/mysql-test/suite/rpl/r/rpl_begin_commit_rollback.result +++ b/mysql-test/suite/rpl/r/rpl_begin_commit_rollback.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] 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"); SET @@session.binlog_direct_non_transactional_updates= FALSE; @@ -52,6 +48,7 @@ before call db1.p1() after call db1.p1() [on slave] start slave until master_log_file='master-bin.000001', master_log_pos=MASTER_POS; +include/wait_for_slave_sql_to_stop.inc # # If we got non-zero here, then we're suffering BUG#43263 # @@ -92,6 +89,7 @@ executed db1.p2() after call db1.p2() [on slave] start slave until master_log_file='master-bin.000001', master_log_pos=MASTER_POS; +include/wait_for_slave_sql_to_stop.inc # # If we got non-zero here, then we're suffering BUG#43263 # @@ -110,6 +108,7 @@ s before call db1.p1() executed db1.p2() START SLAVE; +include/wait_for_slave_sql_to_start.inc # # SAVEPOINT and ROLLBACK TO have the same problem in BUG#43263 # This was reported by BUG#50407 @@ -178,3 +177,4 @@ a # DROP DATABASE db1; DROP DATABASE db2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_binlog_auto_inc_bug33029.result b/mysql-test/suite/rpl/r/rpl_binlog_auto_inc_bug33029.result deleted file mode 100644 index f0fdd5eaa1f..00000000000 --- a/mysql-test/suite/rpl/r/rpl_binlog_auto_inc_bug33029.result +++ /dev/null @@ -1,37 +0,0 @@ -Setting up fake replication from MYSQL_TEST_DIR/std_data/bug33029-slave-relay-bin.000001 -start slave sql_thread; -select MASTER_POS_WAIT('master-bin.000001', 3776); -# Result on slave -SELECT * FROM t1; -id -5 -6 -7 -8 -9 -10 -11 -SELECT * FROM t2; -id -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -DROP TABLE IF EXISTS t1, t2; -DROP PROCEDURE IF EXISTS p1; -DROP PROCEDURE IF EXISTS p2; -DROP FUNCTION IF EXISTS f1; -DROP TRIGGER IF EXISTS tr1; -stop slave sql_thread; -Cleaning up after setup_fake_relay_log.inc diff --git a/mysql-test/suite/rpl/r/rpl_binlog_corruption.result b/mysql-test/suite/rpl/r/rpl_binlog_corruption.result index f94d2833603..4f1eca42e1a 100644 --- a/mysql-test/suite/rpl/r/rpl_binlog_corruption.result +++ b/mysql-test/suite/rpl/r/rpl_binlog_corruption.result @@ -1,8 +1,15 @@ +include/master-slave.inc +[connection master] call mtr.add_suppression('Found invalid event in binary log'); ==== Initialize ==== +include/stop_slave.inc +RESET SLAVE; +include/setup_fake_relay_log.inc Setting up fake replication from MYSQL_TEST_DIR/std_data/bug40482-bin.000001 ==== Test ==== START SLAVE SQL_THREAD; +include/wait_for_slave_sql_error.inc [errno=1594] Last_SQL_Error = Relay log read failure: Could not parse relay log event entry. The possible reasons are: the master's binary log is corrupted (you can check this by running 'mysqlbinlog' on the binary log), the slave's relay log is corrupted (you can check this by running 'mysqlbinlog' on the relay log), a network problem, or a bug in the master's or slave's MySQL code. If you want to check the master's binary log or slave's relay log, you will be able to know their names by issuing 'SHOW SLAVE STATUS' on this slave. ==== Clean up ==== -Cleaning up after setup_fake_relay_log.inc +include/cleanup_fake_relay_log.inc +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_binlog_errors.result b/mysql-test/suite/rpl/r/rpl_binlog_errors.result index 6c8c750bc79..be1b3b150bc 100644 --- a/mysql-test/suite/rpl/r/rpl_binlog_errors.result +++ b/mysql-test/suite/rpl/r/rpl_binlog_errors.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] ####################################################################### ####################### PART 1: MASTER TESTS ########################## ####################################################################### @@ -192,6 +188,7 @@ DELETE FROM t4; DELETE FROM t2; DROP TABLE t5; ###################### TEST #11 +include/rpl_restart_server.inc [server_number=1] SET GLOBAL debug="+d,fault_injection_openning_index"; FLUSH LOGS; ERROR HY000: Can't open file: 'master-bin.index' (errno: 1) @@ -204,6 +201,7 @@ INSERT INTO t2 VALUES ('aaaaa'); DELETE FROM t4; DELETE FROM t2; DROP TABLE t5; +include/rpl_restart_server.inc [server_number=1] ###################### TEST #12 SET GLOBAL debug="+d,fault_injection_new_file_rotate_event"; FLUSH LOGS; @@ -217,6 +215,7 @@ INSERT INTO t2 VALUES ('aaaaa'); DELETE FROM t4; DELETE FROM t2; DROP TABLE t5; +include/rpl_restart_server.inc [server_number=1] SET GLOBAL debug= @old_debug; DROP TABLE t1, t2, t4; RESET MASTER; @@ -224,12 +223,7 @@ include/start_slave.inc ####################################################################### ####################### PART 2: SLAVE TESTS ########################### ####################################################################### -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc call mtr.add_suppression("Slave I/O: Relay log write failure: could not queue event from master.*"); call mtr.add_suppression("Error writing file .*"); call mtr.add_suppression("Could not open .*"); @@ -240,35 +234,45 @@ SET @old_debug=@@global.debug; include/stop_slave.inc SET GLOBAL debug="+d,error_unique_log_filename"; START SLAVE io_thread; -Last_IO_Error = Relay log write failure: could not queue event from master +include/wait_for_slave_io_error.inc [errno=1595] +Last_IO_Error = 'Relay log write failure: could not queue event from master' SET GLOBAL debug="-d,error_unique_log_filename"; SET GLOBAL debug=@old_debug; +include/rpl_restart_server.inc [server_number=2] ###################### TEST #14 SET @old_debug=@@global.debug; include/stop_slave.inc SET GLOBAL debug="+d,fault_injection_new_file_rotate_event"; START SLAVE io_thread; -Last_IO_Error = Relay log write failure: could not queue event from master +include/wait_for_slave_io_error.inc [errno=1595] +Last_IO_Error = 'Relay log write failure: could not queue event from master' SET GLOBAL debug="-d,fault_injection_new_file_rotate_event"; SET GLOBAL debug=@old_debug; +include/rpl_restart_server.inc [server_number=2] ###################### TEST #15 SET @old_debug=@@global.debug; include/stop_slave.inc SET GLOBAL debug="+d,fault_injection_registering_index"; START SLAVE io_thread; -Last_IO_Error = Relay log write failure: could not queue event from master +include/wait_for_slave_io_error.inc [errno=1595] +Last_IO_Error = 'Relay log write failure: could not queue event from master' SET GLOBAL debug="-d,fault_injection_registering_index"; SET GLOBAL debug=@old_debug; +include/rpl_restart_server.inc [server_number=2] ###################### TEST #16 SET @old_debug=@@global.debug; include/stop_slave.inc SET GLOBAL debug="+d,fault_injection_openning_index"; START SLAVE io_thread; -Last_IO_Error = Relay log write failure: could not queue event from master +include/wait_for_slave_io_error.inc [errno=1595] +Last_IO_Error = 'Relay log write failure: could not queue event from master' SET GLOBAL debug="-d,fault_injection_openning_index"; SET GLOBAL debug=@old_debug; -include/stop_slave.inc +include/rpl_restart_server.inc [server_number=2] +include/stop_slave_sql.inc +Warnings: +Note 1255 Slave already has been stopped SET GLOBAL debug=@old_debug; RESET SLAVE; RESET MASTER; -include/start_slave.inc +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_binlog_grant.result b/mysql-test/suite/rpl/r/rpl_binlog_grant.result index 7a2e3183d5b..ccc7116a949 100644 --- a/mysql-test/suite/rpl/r/rpl_binlog_grant.result +++ b/mysql-test/suite/rpl/r/rpl_binlog_grant.result @@ -1,10 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -drop database if exists d1; +include/master-slave.inc +[connection master] create database d1; use d1; create table t (s1 int) engine=innodb; @@ -30,3 +25,4 @@ Grants for x@y GRANT USAGE ON *.* TO 'x'@'y' drop user x@y; drop database d1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_bit.result b/mysql-test/suite/rpl/r/rpl_bit.result index 924de8a65f8..fa935cd9e56 100644 --- a/mysql-test/suite/rpl/r/rpl_bit.result +++ b/mysql-test/suite/rpl/r/rpl_bit.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP TABLE IF EXISTS test.t1; CREATE TABLE test.t1 ( dummyKey INTEGER NOT NULL, @@ -136,3 +132,4 @@ hex(bit3) 24 35 DROP TABLE IF EXISTS test.t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_bit_npk.result b/mysql-test/suite/rpl/r/rpl_bit_npk.result index 9599660f18f..13c9985614e 100644 --- a/mysql-test/suite/rpl/r/rpl_bit_npk.result +++ b/mysql-test/suite/rpl/r/rpl_bit_npk.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP TABLE IF EXISTS test.t1; CREATE TABLE test.t1 ( dummyKey INTEGER NOT NULL, @@ -167,3 +163,4 @@ a b DROP TABLE IF EXISTS test.t1; DROP TABLE IF EXISTS test.t2; DROP TABLE IF EXISTS test.t3; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_blackhole.result b/mysql-test/suite/rpl/r/rpl_blackhole.result index d75b94769fb..1fb8dd6d125 100644 --- a/mysql-test/suite/rpl/r/rpl_blackhole.result +++ b/mysql-test/suite/rpl/r/rpl_blackhole.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); CREATE TABLE t1 (a INT, b INT, c INT); CREATE TABLE t2 (a INT, b INT, c INT); @@ -92,3 +88,4 @@ COUNT(*) 0 >>> Something was written to binary log <<< DROP TABLE t1,t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_bug26395.result b/mysql-test/suite/rpl/r/rpl_bug26395.result index c6dd2d01ed3..a3725f34a55 100644 --- a/mysql-test/suite/rpl/r/rpl_bug26395.result +++ b/mysql-test/suite/rpl/r/rpl_bug26395.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] ==== Initialize ==== [on master] CREATE TABLE tinnodb (a INT) ENGINE = INNODB; @@ -20,6 +16,7 @@ SELECT * FROM tinnodb ORDER BY a; a 1 [on slave] +include/sync_slave_io_with_master.inc ==== Verify results on slave ==== include/stop_slave.inc SELECT "" AS Slave_IO_State; @@ -39,3 +36,4 @@ DROP TABLE tinnodb; set @@debug= @old_debug; [on slave] DROP TABLE tinnodb; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_bug31076.result b/mysql-test/suite/rpl/r/rpl_bug31076.result index 76bce39fc43..1cf8b87f68d 100644 --- a/mysql-test/suite/rpl/r/rpl_bug31076.result +++ b/mysql-test/suite/rpl/r/rpl_bug31076.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] SET @saved_slave_type_conversions = @@slave_type_conversions; SET GLOBAL SLAVE_TYPE_CONVERSIONS = 'ALL_NON_LOSSY'; CREATE DATABASE track; @@ -70,3 +66,4 @@ event_id visit_id timestamp src data visits_events_id SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions; DROP DATABASE track; End of 5.1 tests +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_bug33931.result b/mysql-test/suite/rpl/r/rpl_bug33931.result index a7f398f4546..d27308db1d5 100644 --- a/mysql-test/suite/rpl/r/rpl_bug33931.result +++ b/mysql-test/suite/rpl/r/rpl_bug33931.result @@ -1,7 +1,12 @@ -reset master; -reset slave; +include/master-slave.inc +[connection master] call mtr.add_suppression("Failed during slave I/O thread initialization"); +include/stop_slave.inc +reset slave; SET GLOBAL debug="d,simulate_io_slave_error_on_init,simulate_sql_slave_error_on_init"; start slave; -Last_SQL_Error = Failed during slave thread initialization +include/wait_for_slave_sql_error.inc [errno=1593] +Last_SQL_Error = 'Failed during slave thread initialization' SET GLOBAL debug=""; +RESET SLAVE; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_bug38694.result b/mysql-test/suite/rpl/r/rpl_bug38694.result index 711c4a91c03..b666d9a9155 100644 --- a/mysql-test/suite/rpl/r/rpl_bug38694.result +++ b/mysql-test/suite/rpl/r/rpl_bug38694.result @@ -1,6 +1,3 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_bug41902.result b/mysql-test/suite/rpl/r/rpl_bug41902.result index c65773708cc..5331d4334fa 100644 --- a/mysql-test/suite/rpl/r/rpl_bug41902.result +++ b/mysql-test/suite/rpl/r/rpl_bug41902.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] stop slave; SET @@debug="d,simulate_find_log_pos_error"; reset slave; @@ -31,4 +27,6 @@ purge binary logs to 'master-bin.000001'; ERROR HY000: Target log not found in binlog index SET @@debug=""; purge binary logs to 'master-bin.000001'; -End of the tests +==== clean up ==== +CHANGE MASTER TO MASTER_HOST = '127.0.0.1'; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_change_master.result b/mysql-test/suite/rpl/r/rpl_change_master.result index af09bed8dce..6674ab168ef 100644 --- a/mysql-test/suite/rpl/r/rpl_change_master.result +++ b/mysql-test/suite/rpl/r/rpl_change_master.result @@ -1,15 +1,12 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create table t1(n int); select * from t1; n stop slave sql_thread; insert into t1 values(1); insert into t1 values(2); +include/wait_for_slave_param.inc [Read_Master_Log_Pos] include/stop_slave.inc change master to master_user='root'; start slave; @@ -18,20 +15,4 @@ n 1 2 drop table t1; -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -create table t1 (a int); -insert into t1 values (1); -flush logs; -insert into t1 values (2); -include/stop_slave.inc -delete from t1 where a=2; -CHANGE MASTER TO relay_log_file='slave-relay-bin.000005', relay_log_pos=4; -start slave sql_thread; -start slave io_thread; -set global relay_log_purge=1; -drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_charset.result b/mysql-test/suite/rpl/r/rpl_charset.result index a4841b0baf3..5b025445050 100644 --- a/mysql-test/suite/rpl/r/rpl_charset.result +++ b/mysql-test/suite/rpl/r/rpl_charset.result @@ -1,12 +1,6 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] set timestamp=1000000000; -drop database if exists mysqltest2; -drop database if exists mysqltest3; create database mysqltest2 character set latin2; set @@character_set_server=latin5; create database mysqltest3; @@ -141,3 +135,4 @@ primary key (`pk`) set @p=_latin1 'test'; update t1 set pk='test' where pk=@p; drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_charset_sjis.result b/mysql-test/suite/rpl/r/rpl_charset_sjis.result index 770ad0588d1..b31bad28a59 100644 --- a/mysql-test/suite/rpl/r/rpl_charset_sjis.result +++ b/mysql-test/suite/rpl/r/rpl_charset_sjis.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] drop table if exists t1; drop procedure if exists p1; create table t1 (a varchar(255) character set sjis); @@ -24,3 +20,4 @@ hex(a) 965C drop table t1; drop procedure p1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_circular_for_4_hosts.result b/mysql-test/suite/rpl/r/rpl_circular_for_4_hosts.result index c3ccc76d1bc..fb1d3f8258e 100644 --- a/mysql-test/suite/rpl/r/rpl_circular_for_4_hosts.result +++ b/mysql-test/suite/rpl/r/rpl_circular_for_4_hosts.result @@ -1,60 +1,10 @@ -*** Set up circular ring by schema A->B->C->D->A *** -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -STOP SLAVE; -RESET SLAVE; -RESET MASTER; -STOP SLAVE; -RESET SLAVE; -SET auto_increment_increment = 4; -SET auto_increment_offset = 1; -RESET MASTER; -RESET SLAVE; -CHANGE MASTER TO master_host='127.0.0.1',master_port=MASTER_A_PORT,master_user='root',MASTER_LOG_FILE='MASTER_A_LOG_FILE'; -SET auto_increment_increment = 4; -SET auto_increment_offset = 2; -RESET MASTER; -STOP SLAVE; -RESET SLAVE; -CHANGE MASTER TO master_host='127.0.0.1',master_port=MASTER_B_PORT,master_user='root',MASTER_LOG_FILE='MASTER_B_LOG_FILE'; -SET auto_increment_increment = 4; -SET auto_increment_offset = 3; -RESET MASTER; -STOP SLAVE; -RESET SLAVE; -CHANGE MASTER TO master_host='127.0.0.1',master_port=MASTER_C_PORT,master_user='root',MASTER_LOG_FILE='MASTER_C_LOG_FILE'; -SET auto_increment_increment = 4; -SET auto_increment_offset = 4; -CHANGE MASTER TO master_host='127.0.0.1',master_port=MASTER_D_PORT,master_user='root',MASTER_LOG_FILE='MASTER_D_LOG_FILE'; -SHOW VARIABLES LIKE 'auto_increment_%'; -Variable_name Value -auto_increment_increment 4 -auto_increment_offset 1 -SHOW VARIABLES LIKE 'auto_increment_%'; -Variable_name Value -auto_increment_increment 4 -auto_increment_offset 2 -SHOW VARIABLES LIKE 'auto_increment_%'; -Variable_name Value -auto_increment_increment 4 -auto_increment_offset 3 -SHOW VARIABLES LIKE 'auto_increment_%'; -Variable_name Value -auto_increment_increment 4 -auto_increment_offset 4 -1 -START SLAVE; -START SLAVE; -START SLAVE; -START SLAVE; +*** Set up circular replication on four servers *** +include/rpl_init.inc [topology=1->2->3->4->1] *** Preparing data *** CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT, b VARCHAR(100), c INT NOT NULL, PRIMARY KEY(a)) ENGINE=MyISAM; CREATE TABLE t2 (a INT NOT NULL AUTO_INCREMENT, b VARCHAR(100), c INT NOT NULL, PRIMARY KEY(a)) ENGINE=InnoDB; +include/rpl_sync.inc *** Testing schema A->B->C->D->A *** @@ -62,6 +12,7 @@ INSERT INTO t1(b,c) VALUES('A',1); INSERT INTO t1(b,c) VALUES('B',1); INSERT INTO t1(b,c) VALUES('C',1); INSERT INTO t1(b,c) VALUES('D',1); +include/rpl_sync.inc SELECT 'Master A',a,b FROM t1 WHERE c = 1 ORDER BY a,b; Master A a b Master A 1 A @@ -95,6 +46,7 @@ SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1; include/start_slave.inc INSERT INTO t1 VALUES(6,'C',2); INSERT INTO t1(b,c) VALUES('B',2); +include/wait_for_slave_sql_error.inc [errno=1062] INSERT INTO t1(b,c) VALUES('A',2); INSERT INTO t1(b,c) VALUES('D',2); @@ -116,9 +68,9 @@ Master D a b Master D 8 D * Reconfigure replication to schema A->B->D->A * -STOP SLAVE; -STOP SLAVE; -CHANGE MASTER TO master_host='127.0.0.1',master_port=MASTER_B_PORT,master_user='root',master_log_file='LOG_FILE',master_log_pos=LOG_POS; +include/stop_slave_io.inc +include/stop_slave.inc +include/rpl_change_topology.inc [new topology=1->2->4->1,2->3] include/start_slave.inc * Check data inserted before failure * @@ -145,6 +97,7 @@ Master D 8 D INSERT INTO t1(b,c) VALUES('A',3); INSERT INTO t1(b,c) VALUES('B',3); INSERT INTO t1(b,c) VALUES('D',3); +include/rpl_sync.inc SELECT 'Master A',a,b FROM t1 WHERE c = 3 ORDER BY a,b; Master A a b Master A 9 A @@ -171,8 +124,9 @@ DELETE FROM t1 WHERE a = 6; START SLAVE; RESET MASTER; RESET SLAVE; -CHANGE MASTER TO master_host='127.0.0.1',master_port=MASTER_C_PORT,master_user='root',master_log_file='LOG_FILE',master_log_pos=LOG_POS; +include/rpl_change_topology.inc [new topology=1->2->3->4->1] START SLAVE; +include/rpl_sync.inc * Check data inserted before restoring schema A->B->C->D->A * SELECT 'Master A',a,b FROM t1 WHERE c IN (2,3) ORDER BY a,b; @@ -213,6 +167,7 @@ INSERT INTO t1(b,c) VALUES('A',4); INSERT INTO t1(b,c) VALUES('B',4); INSERT INTO t1(b,c) VALUES('C',4); INSERT INTO t1(b,c) VALUES('D',4); +include/rpl_sync.inc SELECT 'Master A',a,b FROM t1 WHERE c = 4 ORDER BY a,b; Master A a b Master A 13 A @@ -241,6 +196,7 @@ Master D 16 D * Transactions with commits * BEGIN; BEGIN; +include/rpl_sync.inc SELECT 'Master A',b,COUNT(*) FROM t2 WHERE c = 1 GROUP BY b ORDER BY b; Master A b COUNT(*) Master A A 100 @@ -269,6 +225,7 @@ Master D D 100 * Transactions with rollbacks * BEGIN; BEGIN; +include/rpl_sync.inc SELECT 'Master A',b,COUNT(*) FROM t2 WHERE c = 2 GROUP BY b ORDER BY b; Master A b COUNT(*) Master A B 100 @@ -288,11 +245,4 @@ Master D D 100 *** Clean up *** DROP TABLE t1,t2; -STOP SLAVE; -RESET SLAVE; -STOP SLAVE; -RESET SLAVE; -STOP SLAVE; -RESET SLAVE; -STOP SLAVE; -RESET SLAVE; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_colSize.result b/mysql-test/suite/rpl/r/rpl_colSize.result index ae1ac3c7fed..0f701e32d9b 100644 --- a/mysql-test/suite/rpl/r/rpl_colSize.result +++ b/mysql-test/suite/rpl/r/rpl_colSize.result @@ -1,13 +1,10 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP TABLE IF EXISTS t1; **** Testing WL#3228 changes. **** *** Create "wider" table on slave *** STOP SLAVE; +include/wait_for_slave_to_stop.inc RESET SLAVE; SET @saved_slave_type_conversions = @@slave_type_conversions; SET GLOBAL SLAVE_TYPE_CONVERSIONS = 'ALL_NON_LOSSY'; @@ -57,6 +54,7 @@ t LONGTEXT RESET MASTER; *** Start replication *** START SLAVE; +include/wait_for_slave_to_start.inc *** Insert data on master and display it. *** INSERT INTO t1 () VALUES ( 17.567, @@ -180,3 +178,4 @@ t1 CREATE TABLE `t1` ( *** Cleanup *** DROP TABLE t1; SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_commit_after_flush.result b/mysql-test/suite/rpl/r/rpl_commit_after_flush.result index eaddda63b6a..b91b273e64e 100644 --- a/mysql-test/suite/rpl/r/rpl_commit_after_flush.result +++ b/mysql-test/suite/rpl/r/rpl_commit_after_flush.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CREATE TABLE t1 (a INT) ENGINE=innodb; begin; insert into t1 values(1); @@ -11,3 +7,4 @@ flush tables with read lock; commit; unlock tables; drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_concurrency_error.result b/mysql-test/suite/rpl/r/rpl_concurrency_error.result index eb303c46f28..b6ed9db6c66 100644 --- a/mysql-test/suite/rpl/r/rpl_concurrency_error.result +++ b/mysql-test/suite/rpl/r/rpl_concurrency_error.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); ######################################################################## # Environment @@ -118,11 +114,12 @@ master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'dark blue 1' WHERE f = 'red' master-bin.000001 # Query # # use `test`; INSERT INTO t VALUES (6 + (1 * 10),"brown") master-bin.000001 # Xid # # COMMIT /* XID */ -source include/diff_master_slave.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc +include/rpl_diff.inc ######################################################################## # Cleanup ######################################################################## DROP TRIGGER tr; DROP TABLE t; DROP TABLE n; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_conditional_comments.result b/mysql-test/suite/rpl/r/rpl_conditional_comments.result index 0a2f4d60e6f..fca7d941718 100644 --- a/mysql-test/suite/rpl/r/rpl_conditional_comments.result +++ b/mysql-test/suite/rpl/r/rpl_conditional_comments.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CREATE TABLE t1(c1 INT); show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info @@ -19,7 +15,7 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; /* 99999 --- */INSERT /*!INTO*/ /*!10000 t1 */ VALUES(10) /* 99999 ,(11)*/ master-bin.000001 # Query # # COMMIT -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1,slave:t1] # Case 2: # ----------------------------------------------------------------- @@ -30,7 +26,7 @@ EXECUTE stmt; DROP TABLE t1; CREATE TABLE t1(c1 INT); EXECUTE stmt; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1,slave:t1] SET @value=62; PREPARE stmt FROM 'INSERT INTO /*!99999 blabla */ t1 VALUES(?) /*!99999 ,(63)*/'; @@ -56,7 +52,7 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE t1(c1 INT) master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO /* 99999 blabla */ t1 VALUES(62) /* 99999 ,(63)*/ master-bin.000001 # Query # # COMMIT -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1,slave:t1] # Case 3: # ----------------------------------------------------------------- @@ -65,3 +61,4 @@ Comparing tables master:test.t1 and slave:test.t1 SELECT c1 FROM /*!99999 t1 WHEREN; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '/*!99999 t1 WHEREN' at line 1 DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_create_database.result b/mysql-test/suite/rpl/r/rpl_create_database.result index 9780b65f334..6bb950483ed 100644 --- a/mysql-test/suite/rpl/r/rpl_create_database.result +++ b/mysql-test/suite/rpl/r/rpl_create_database.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP DATABASE IF EXISTS mysqltest_prometheus; DROP DATABASE IF EXISTS mysqltest_sisyfos; DROP DATABASE IF EXISTS mysqltest_bob; @@ -60,3 +56,4 @@ t2 DROP DATABASE IF EXISTS mysqltest_prometheus; DROP DATABASE IF EXISTS mysqltest_sisyfos; DROP DATABASE IF EXISTS mysqltest_bob; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_create_if_not_exists.result b/mysql-test/suite/rpl/r/rpl_create_if_not_exists.result index 0d3fc1b79a7..d12f3ff1360 100644 --- a/mysql-test/suite/rpl/r/rpl_create_if_not_exists.result +++ b/mysql-test/suite/rpl/r/rpl_create_if_not_exists.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP DATABASE IF EXISTS mysqltest; CREATE DATABASE IF NOT EXISTS mysqltest; USE mysqltest; @@ -69,12 +65,7 @@ DROP TABLE t3; # After the worklog, it will insert nothing and the statement will not be # binlogged if the table already exists. # After the worklog, some bugs will disappear automotically. -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc # Case 1: BUG#47132 call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT.*"); @@ -126,3 +117,4 @@ show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info DROP VIEW v1; DROP TABLE t1, t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_create_tmp_table_if_not_exists.result b/mysql-test/suite/rpl/r/rpl_create_tmp_table_if_not_exists.result index 7459a977cf8..6bafbb32897 100644 --- a/mysql-test/suite/rpl/r/rpl_create_tmp_table_if_not_exists.result +++ b/mysql-test/suite/rpl/r/rpl_create_tmp_table_if_not_exists.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP DATABASE IF EXISTS mysqltest; CREATE TEMPORARY TABLE IF NOT EXISTS tmp(c1 int); CREATE TEMPORARY TABLE IF NOT EXISTS tmp(c1 int); @@ -19,3 +15,4 @@ master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE IF NOT EXISTS t master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE IF NOT EXISTS tmp1 LIKE tmp master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE IF NOT EXISTS tmp1 LIKE tmp master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE IF NOT EXISTS tmp2 SELECT * FROM tmp +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_cross_version.result b/mysql-test/suite/rpl/r/rpl_cross_version.result index de5dd134516..ddb97ffa8c5 100644 --- a/mysql-test/suite/rpl/r/rpl_cross_version.result +++ b/mysql-test/suite/rpl/r/rpl_cross_version.result @@ -1,12 +1,19 @@ +include/master-slave.inc +[connection master] ==== Initialize ==== +include/stop_slave.inc +RESET SLAVE; +include/setup_fake_relay_log.inc Setting up fake replication from MYSQL_TEST_DIR/suite/binlog/std_data/binlog_old_version_4_1.000001 ==== Test ==== start slave sql_thread; +include/wait_for_slave_param.inc [Exec_Master_Log_Pos] ==== a prove that the fake has been processed successfully ==== SELECT COUNT(*) - 17920 as zero FROM t3; zero 0 ==== Clean up ==== -stop slave sql_thread; -Cleaning up after setup_fake_relay_log.inc +include/stop_slave_sql.inc +include/cleanup_fake_relay_log.inc drop table t1, t3; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_current_user.result b/mysql-test/suite/rpl/r/rpl_current_user.result index 69c20078531..ecf8fc851d8 100644 --- a/mysql-test/suite/rpl/r/rpl_current_user.result +++ b/mysql-test/suite/rpl/r/rpl_current_user.result @@ -1,26 +1,6 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT.*"); - -# On slave2 -# Connect slave2 to slave -CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=SLAVE_MYPORT;, -MASTER_LOG_FILE='slave-bin.000001', MASTER_USER='root'; -START SLAVE; - -# [On master] -DROP VIEW IF EXISTS v_user; -DROP VIEW IF EXISTS v_tables_priv; -DROP VIEW IF EXISTS v_procs_priv; -DROP PROCEDURE IF EXISTS p1; -DROP PROCEDURE IF EXISTS my_grant; -DROP PROCEDURE IF EXISTS my_revoke; -DROP FUNCTION IF EXISTS my_user; -DROP EVENT IF EXISTS e1; +include/rpl_init.inc [topology=1->2->3] +include/rpl_connect.inc [creating master] +include/rpl_connect.inc [creating slave] CREATE TABLE t1(c1 char(100)); CREATE VIEW test.v_user AS SELECT * FROM mysql.user WHERE User LIKE 'bug48321%'; CREATE VIEW test.v_tables_priv AS SELECT * FROM mysql.tables_priv WHERE User LIKE 'bug48321%'; @@ -42,76 +22,76 @@ ERROR HY000: String '01234567890123456789012345678901234567890123456789012345678 # [On conn1] # Verify 'REVOKE ALL' statement REVOKE ALL PRIVILEGES, GRANT OPTION FROM CURRENT_USER(); -Comparing tables master:test.v_user and slave:test.v_user -Comparing tables master:test.v_user and slave2:test.v_user +include/rpl_sync.inc +include/diff_tables.inc [server_1:v_user, server_2:v_user, server_3:v_user] # Verify 'GRANT ... ON TABLE ...' statement GRANT CREATE, INSERT, SELECT ON TABLE test.t1 TO CURRENT_USER(); -Comparing tables master:test.v_tables_priv and slave:test.v_tables_priv -Comparing tables master:test.v_tables_priv and slave2:test.v_tables_priv +include/rpl_sync.inc +include/diff_tables.inc [server_1:v_tables_priv, server_2:v_tables_priv, server_3:v_tables_priv] # Verify 'GRANT ... ON PROCEDURE...' statement GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO CURRENT_USER(); -Comparing tables master:test.v_procs_priv and slave:test.v_procs_priv -Comparing tables master:test.v_procs_priv and slave2:test.v_procs_priv +include/rpl_sync.inc +include/diff_tables.inc [server_1:v_procs_priv, server_2:v_procs_priv, server_3:v_procs_priv] # Verify 'GRANT ... ON *.* ...' statement GRANT ALL PRIVILEGES ON *.* TO CURRENT_USER() WITH GRANT OPTION; -Comparing tables master:test.v_procs_priv and slave:test.v_procs_priv -Comparing tables master:test.v_procs_priv and slave2:test.v_procs_priv +include/rpl_sync.inc +include/diff_tables.inc [server_1:v_procs_priv, server_2:v_procs_priv, server_3:v_procs_priv] # Verify 'REVOKE ... ON TABLE ...' statement REVOKE CREATE, INSERT, SELECT ON TABLE t1 FROM CURRENT_USER(); -Comparing tables master:test.v_tables_priv and slave:test.v_tables_priv -Comparing tables master:test.v_tables_priv and slave2:test.v_tables_priv +include/rpl_sync.inc +include/diff_tables.inc [server_1:v_tables_priv, server_2:v_tables_priv, server_3:v_tables_priv] # Verify 'REVOKE ... ON PROCEDURE...' statement REVOKE ALTER ROUTINE, EXECUTE ON PROCEDURE p1 FROM CURRENT_USER(); -Comparing tables master:test.v_procs_priv and slave:test.v_procs_priv -Comparing tables master:test.v_procs_priv and slave2:test.v_procs_priv +include/rpl_sync.inc +include/diff_tables.inc [server_1:v_procs_priv, server_2:v_procs_priv, server_3:v_procs_priv] # Verify 'REVOKE ... ON *.* ...' statement REVOKE ALL PRIVILEGES ON *.* FROM CURRENT_USER(); -Comparing tables master:test.v_user and slave:test.v_user -Comparing tables master:test.v_user and slave2:test.v_user +include/rpl_sync.inc +include/diff_tables.inc [server_1:v_user, server_2:v_user, server_3:v_user] # Verify 'GRANT ...' statement in the procedure CREATE PROCEDURE my_grant() GRANT CREATE, INSERT, SELECT ON TABLE test.t1 TO CURRENT_USER(); call my_grant; -Comparing tables master:test.v_tables_priv and slave:test.v_tables_priv -Comparing tables master:test.v_tables_priv and slave2:test.v_tables_priv +include/rpl_sync.inc +include/diff_tables.inc [server_1:v_tables_priv, server_2:v_tables_priv, server_3:v_tables_priv] # Verify 'REVOKE ... ON TABLE ...' statement in the procedure CREATE PROCEDURE my_revoke() REVOKE CREATE, INSERT, SELECT ON TABLE t1 FROM CURRENT_USER(); call my_revoke; -Comparing tables master:test.v_tables_priv and slave:test.v_tables_priv -Comparing tables master:test.v_tables_priv and slave2:test.v_tables_priv +include/rpl_sync.inc +include/diff_tables.inc [server_1:v_tables_priv, server_2:v_tables_priv, server_3:v_tables_priv] # Verify 'RENAME USER ...' statement RENAME USER CURRENT_USER TO 'bug48321_2'@'localhost'; -Comparing tables master:test.v_user and slave:test.v_user -Comparing tables master:test.v_user and slave2:test.v_user +include/rpl_sync.inc +include/diff_tables.inc [server_1:v_user, server_2:v_user, server_3:v_user] # Verify 'DROP USER ...' statement GRANT CREATE USER ON *.* TO 'bug48321_2'@'localhost'; DROP USER CURRENT_USER(); -Comparing tables master:test.v_user and slave:test.v_user -Comparing tables master:test.v_user and slave2:test.v_user +include/rpl_sync.inc +include/diff_tables.inc [server_1:v_user, server_2:v_user, server_3:v_user] # Verify 'ALTER EVENT...' statement CREATE EVENT e1 ON SCHEDULE EVERY 1 DAY DO SELECT * FROM t1; # Explicitly assign CURRENT_USER() to definer ALTER DEFINER=CURRENT_USER() EVENT e1 ENABLE; -Comparing tables master:test.v_event and slave:test.v_event -Comparing tables master:test.v_event and slave2:test.v_event +include/rpl_sync.inc +include/diff_tables.inc [server_1:v_event, server_2:v_event, server_3:v_event] # Session user will be set as definer, if the statement does not assign # a definer ALTER EVENT e1 ENABLE; -Comparing tables master:test.v_event and slave:test.v_event -Comparing tables master:test.v_event and slave2:test.v_event +include/rpl_sync.inc +include/diff_tables.inc [server_1:v_event, server_2:v_event, server_3:v_event] # Verify that this patch does not affect the calling of CURRENT_USER() # in the other statements @@ -128,7 +108,7 @@ SELECT * FROM t1; c1 @ 1234 -# [On slave2] +# [On server_3] SELECT * FROM t1; c1 @ @@ -146,7 +126,7 @@ SELECT * FROM t1; c1 @ @ -# [On slave2] +# [On server_3] SELECT * FROM t1; c1 @ @@ -160,7 +140,7 @@ c1 # [On slave] SELECT * FROM t1; c1 -# [On slave2] +# [On server_3] SELECT * FROM t1; c1 # [On master] @@ -187,7 +167,7 @@ c1 SELECT * FROM t2; c1 @ -# [On slave2] +# [On server_3] SELECT * FROM t1; c1 @ @@ -203,3 +183,4 @@ DROP PROCEDURE my_grant; DROP PROCEDURE my_revoke; DROP FUNCTION my_user; DROP EVENT e1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_deadlock_innodb.result b/mysql-test/suite/rpl/r/rpl_deadlock_innodb.result index 1485389204b..c399b408d5c 100644 --- a/mysql-test/suite/rpl/r/rpl_deadlock_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_deadlock_innodb.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] *** Prepare tables and data *** CREATE TABLE t1 (a INT NOT NULL, KEY(a)) ENGINE=innodb; CREATE TABLE t2 (a INT) ENGINE=innodb; @@ -50,7 +46,7 @@ a SELECT * FROM t3; a 3 -Checking that both slave threads are running. +include/check_slave_is_running.inc *** Test lock wait timeout *** include/stop_slave.inc @@ -61,6 +57,7 @@ SELECT * FROM t1 FOR UPDATE; a 1 START SLAVE; +include/wait_for_slave_sql_error.inc [errno=1205] SELECT COUNT(*) FROM t2; COUNT(*) 0 @@ -74,7 +71,7 @@ SELECT * FROM t3; a 3 3 -Checking that both slave threads are running. +include/check_slave_is_running.inc *** Test lock wait timeout and purged relay logs *** SET @my_max_relay_log_size= @@global.max_relay_log_size; @@ -88,6 +85,7 @@ a 1 1 START SLAVE; +include/wait_for_slave_sql_error.inc [errno=1205] SELECT COUNT(*) FROM t2; COUNT(*) 0 @@ -103,9 +101,10 @@ a 3 3 3 -Checking that both slave threads are running. +include/check_slave_is_running.inc *** Clean up *** DROP TABLE t1,t2,t3; SET global max_relay_log_size= @my_max_relay_log_size; End of 5.1 tests +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_delete_no_where.result b/mysql-test/suite/rpl/r/rpl_delete_no_where.result index 78edf4bf3fa..923cd428aec 100644 --- a/mysql-test/suite/rpl/r/rpl_delete_no_where.result +++ b/mysql-test/suite/rpl/r/rpl_delete_no_where.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create table t1 (a int, b int) engine=myisam; insert into t1 values(1,1); select * from t1; @@ -13,3 +9,4 @@ delete from t1; select * from t1; a b drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_do_grant.result b/mysql-test/suite/rpl/r/rpl_do_grant.result index 0739fcbcc5c..671af1dce58 100644 --- a/mysql-test/suite/rpl/r/rpl_do_grant.result +++ b/mysql-test/suite/rpl/r/rpl_do_grant.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] delete from mysql.user where user=_binary'rpl_do_grant'; delete from mysql.db where user=_binary'rpl_do_grant'; flush privileges; @@ -166,21 +162,13 @@ USE bug42217_db; DROP FUNCTION upgrade_del_func; DROP FUNCTION upgrade_alter_func; DROP DATABASE bug42217_db; +SET SQL_LOG_BIN= 0; DROP USER 'create_rout_db'@'localhost'; -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +SET SQL_LOG_BIN= 1; +include/rpl_reset.inc +USE test; ######## BUG#49119 ####### ### i) test case from the 'how to repeat section' -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; CREATE TABLE t1(c1 INT); CREATE PROCEDURE p1() SELECT * FROM t1 | REVOKE EXECUTE ON PROCEDURE p1 FROM 'root'@'localhost'; @@ -188,12 +176,7 @@ ERROR 42000: There is no such grant defined for user 'root' on host 'localhost' DROP TABLE t1; DROP PROCEDURE p1; ### ii) Test case in which REVOKE partially succeeds -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc CREATE TABLE t1(c1 INT); CREATE PROCEDURE p1() SELECT * FROM t1 | CREATE USER 'user49119'@'localhost'; @@ -250,12 +233,7 @@ GRANT PROXY ON ''@'' TO 'root'@'localhost' WITH GRANT OPTION DROP TABLE t1; DROP PROCEDURE p1; DROP USER 'user49119'@'localhost'; -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc grant all on *.* to foo@"1.2.3.4"; revoke all privileges, grant option from "foo"; ERROR HY000: Can't revoke all privileges for one or more of the requested users @@ -263,15 +241,11 @@ show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # use `test`; grant all on *.* to foo@"1.2.3.4" master-bin.000001 # Query # # use `test`; revoke all privileges, grant option from "foo" +include/check_slave_no_error.inc DROP USER foo@"1.2.3.4"; # Bug#27606 GRANT statement should be replicated with DEFINER information -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc GRANT SELECT, INSERT ON mysql.user TO user_bug27606@localhost; SELECT Grantor FROM mysql.tables_priv WHERE User='user_bug27606'; Grantor @@ -287,4 +261,4 @@ SELECT Grantor FROM mysql.tables_priv WHERE User='user_bug27606'; Grantor root@localhost DROP USER user_bug27606@localhost; -"End of test" +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_drop.result b/mysql-test/suite/rpl/r/rpl_drop.result index b83594c9bb1..bdba42e1d34 100644 --- a/mysql-test/suite/rpl/r/rpl_drop.result +++ b/mysql-test/suite/rpl/r/rpl_drop.result @@ -1,10 +1,6 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -drop table if exists t1, t2; +include/master-slave.inc +[connection master] create table t1 (a int); drop table t1, t2; ERROR 42S02: Unknown table 't2' +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_drop_db.result b/mysql-test/suite/rpl/r/rpl_drop_db.result index 8825797f80d..8a88f01a444 100644 --- a/mysql-test/suite/rpl/r/rpl_drop_db.result +++ b/mysql-test/suite/rpl/r/rpl_drop_db.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] drop database if exists mysqltest1; create database mysqltest1; create table mysqltest1.t1 (n int); @@ -34,4 +30,4 @@ n use test; drop table t1; drop database mysqltest1; -include/stop_slave.inc +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_drop_temp.result b/mysql-test/suite/rpl/r/rpl_drop_temp.result index 726b8f2fe54..ffabd514b0f 100644 --- a/mysql-test/suite/rpl/r/rpl_drop_temp.result +++ b/mysql-test/suite/rpl/r/rpl_drop_temp.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create database if not exists mysqltest; use mysqltest; create temporary table mysqltest.t1 (n int)ENGINE=MyISAM; @@ -26,12 +22,7 @@ CREATE TEMPORARY TABLE tmp3 (a int); DROP TEMPORARY TABLE tmp3; SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; START SLAVE; -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc CREATE TABLE t1 ( i INT ); SHOW STATUS LIKE 'Slave_open_temp_tables'; Variable_name Value @@ -47,3 +38,4 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE t1 ( i INT ) master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE ttmp1 ( i INT ) master-bin.000001 # Query # # use `test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `ttmp1` DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_drop_view.result b/mysql-test/suite/rpl/r/rpl_drop_view.result index c359011612a..0688ce42bc2 100644 --- a/mysql-test/suite/rpl/r/rpl_drop_view.result +++ b/mysql-test/suite/rpl/r/rpl_drop_view.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] drop table if exists t1, t2; drop view if exists v1, v2, v3, not_exist_view; create table t1 (a int); @@ -27,3 +23,4 @@ select * from v3; ERROR 42S02: Table 'test.v3' doesn't exist ==== clean up ==== drop table t1, t2, t3; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_dual_pos_advance.result b/mysql-test/suite/rpl/r/rpl_dual_pos_advance.result index aa1a573d052..3a3bed1a6fd 100644 --- a/mysql-test/suite/rpl/r/rpl_dual_pos_advance.result +++ b/mysql-test/suite/rpl/r/rpl_dual_pos_advance.result @@ -1,12 +1,4 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -reset master; -change master to master_host="127.0.0.1",master_port=SLAVE_PORT,master_user="root"; -include/start_slave.inc +include/rpl_init.inc [topology=1->2->1] create table t1 (n int); include/stop_slave.inc create table t2 (n int); @@ -25,6 +17,7 @@ insert into t3 values(4); start slave until master_log_file="MASTER_LOG_FILE",master_log_pos=MASTER_LOG_POS; Warnings: Note 1278 It is recommended to use --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you will get problems if you get an unexpected slave's mysqld restart +include/wait_for_slave_sql_to_stop.inc show tables; Tables_in_test t1 @@ -32,12 +25,14 @@ t2 start slave until master_log_file="MASTER_LOG_FILE",master_log_pos=MASTER_LOG_POS; Warnings: Note 1278 It is recommended to use --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you will get problems if you get an unexpected slave's mysqld restart +include/wait_for_slave_sql_to_stop.inc select * from t3; n 1 start slave until master_log_file="MASTER_LOG_FILE",master_log_pos=MASTER_LOG_POS; Warnings: Note 1278 It is recommended to use --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you will get problems if you get an unexpected slave's mysqld restart +include/wait_for_slave_sql_to_stop.inc select * from t3; n 1 @@ -55,6 +50,5 @@ t3 t4 t5 t6 -include/stop_slave.inc -reset slave; -drop table t1,t2,t3,t4,t5,t6; +drop table t1, t2, t3, t4, t5, t6; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_empty_master_host.result b/mysql-test/suite/rpl/r/rpl_empty_master_host.result index 46ef32d415b..8b0b4ec30df 100644 --- a/mysql-test/suite/rpl/r/rpl_empty_master_host.result +++ b/mysql-test/suite/rpl/r/rpl_empty_master_host.result @@ -1,10 +1,7 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] STOP SLAVE; +include/wait_for_slave_to_stop.inc Master_Host = '127.0.0.1' (expected '127.0.0.1') CHANGE MASTER TO MASTER_HOST=""; ERROR HY000: Incorrect arguments to MASTER_HOST @@ -14,3 +11,5 @@ Master_Host = 'foo' (expected 'foo') CHANGE MASTER TO MASTER_HOST="127.0.0.1"; Master_Host = '127.0.0.1' (expected '127.0.0.1') START SLAVE; +include/wait_for_slave_to_start.inc +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_err_ignoredtable.result b/mysql-test/suite/rpl/r/rpl_err_ignoredtable.result index f211d5d9a2f..c2ec7eb4ba4 100644 --- a/mysql-test/suite/rpl/r/rpl_err_ignoredtable.result +++ b/mysql-test/suite/rpl/r/rpl_err_ignoredtable.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create table t1 (a int primary key); create table t4 (a int primary key); insert into t1 values (1),(1); @@ -40,3 +36,4 @@ a 3 4 DROP TABLE test.t4; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_events.result b/mysql-test/suite/rpl/r/rpl_events.result index 7d4e8a208eb..23dcfab57f0 100644 --- a/mysql-test/suite/rpl/r/rpl_events.result +++ b/mysql-test/suite/rpl/r/rpl_events.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] SET @old_event_scheduler = @@global.event_scheduler; set global event_scheduler=1; DROP EVENT IF EXISTS test.justonce; @@ -167,3 +163,4 @@ DROP EVENT event44331_1; DROP EVENT event44331_2; DROP EVENT event44331_3; DROP EVENT event44331_4; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result b/mysql-test/suite/rpl/r/rpl_extra_col_master_innodb.result similarity index 95% rename from mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result rename to mysql-test/suite/rpl/r/rpl_extra_col_master_innodb.result index 137253e68c0..e5e690bdf52 100644 --- a/mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_extra_col_master_innodb.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] *********************************************************** *********************************************************** @@ -90,7 +86,7 @@ f1 f2 f3 f4 27 27 27 next 29 29 29 second 30 30 30 next -Checking that both slave threads are running. +include/check_slave_is_running.inc ***** Testing Altering table def scenario ***** @@ -427,7 +423,7 @@ f1 f2 f3 f4 ** Check slave status ** -Checking that both slave threads are running. +include/check_slave_is_running.inc **************************************** * columns in master at middle of table * @@ -463,10 +459,8 @@ INSERT INTO t10 () VALUES(1,@b1,DEFAULT,'Kyle',DEFAULT), *** Expect slave to fail with Error 1677 *** ******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Column 2 of table 'test.t10' cannot be converted from type 'double' to type 'char(5)' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1677] +Last_SQL_Error = 'Column 2 of table 'test.t10' cannot be converted from type 'double' to type 'char(5)'' *** Drop t10 *** DROP TABLE t10; @@ -501,10 +495,8 @@ INSERT INTO t11 () VALUES(1,@b1,'Testing is fun','Kyle',DEFAULT), *** Expect slave to fail with Error 1677 *** ******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Column 2 of table 'test.t11' cannot be converted from type 'tinyblob' to type 'varchar(254)' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1677] +Last_SQL_Error = 'Column 2 of table 'test.t11' cannot be converted from type 'tinyblob' to type 'varchar(254)'' *** Drop t11 *** DROP TABLE t11; @@ -615,7 +607,8 @@ c1 c3 hex(c4) c5 c6 ************ * Bug30415 * ************ -Last_SQL_Error = Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7' +include/wait_for_slave_sql_error.inc [errno=1091] +Last_SQL_Error = 'Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'' STOP SLAVE; RESET SLAVE; @@ -663,7 +656,8 @@ c1 hex(c4) c5 c6 c7 c2 *** Expect slave to fail with Error 1054 *** ******************************************** -Last_SQL_Error = Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7' +include/wait_for_slave_sql_error.inc [errno=1054] +Last_SQL_Error = 'Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7'' STOP SLAVE; RESET SLAVE; @@ -711,7 +705,8 @@ c1 hex(c4) c5 c6 c7 *** BUG 30434 *** ***************** -Last_SQL_Error = Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)' +include/wait_for_slave_sql_error.inc [errno=1072] +Last_SQL_Error = 'Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)'' STOP SLAVE; RESET SLAVE; @@ -875,4 +870,4 @@ c1 hex(c4) c5 2 6231623162316231 JOE 3 6231623162316231 QA DROP TABLE t5; - +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result b/mysql-test/suite/rpl/r/rpl_extra_col_master_myisam.result similarity index 95% rename from mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result rename to mysql-test/suite/rpl/r/rpl_extra_col_master_myisam.result index d55a6bcbbf2..9247ceb1030 100644 --- a/mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result +++ b/mysql-test/suite/rpl/r/rpl_extra_col_master_myisam.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] *********************************************************** *********************************************************** @@ -90,7 +86,7 @@ f1 f2 f3 f4 27 27 27 next 29 29 29 second 30 30 30 next -Checking that both slave threads are running. +include/check_slave_is_running.inc ***** Testing Altering table def scenario ***** @@ -427,7 +423,7 @@ f1 f2 f3 f4 ** Check slave status ** -Checking that both slave threads are running. +include/check_slave_is_running.inc **************************************** * columns in master at middle of table * @@ -463,10 +459,8 @@ INSERT INTO t10 () VALUES(1,@b1,DEFAULT,'Kyle',DEFAULT), *** Expect slave to fail with Error 1677 *** ******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Column 2 of table 'test.t10' cannot be converted from type 'double' to type 'char(5)' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1677] +Last_SQL_Error = 'Column 2 of table 'test.t10' cannot be converted from type 'double' to type 'char(5)'' *** Drop t10 *** DROP TABLE t10; @@ -501,10 +495,8 @@ INSERT INTO t11 () VALUES(1,@b1,'Testing is fun','Kyle',DEFAULT), *** Expect slave to fail with Error 1677 *** ******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Column 2 of table 'test.t11' cannot be converted from type 'tinyblob' to type 'varchar(254)' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1677] +Last_SQL_Error = 'Column 2 of table 'test.t11' cannot be converted from type 'tinyblob' to type 'varchar(254)'' *** Drop t11 *** DROP TABLE t11; @@ -615,7 +607,8 @@ c1 c3 hex(c4) c5 c6 ************ * Bug30415 * ************ -Last_SQL_Error = Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7' +include/wait_for_slave_sql_error.inc [errno=1091] +Last_SQL_Error = 'Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'' STOP SLAVE; RESET SLAVE; @@ -663,7 +656,8 @@ c1 hex(c4) c5 c6 c7 c2 *** Expect slave to fail with Error 1054 *** ******************************************** -Last_SQL_Error = Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7' +include/wait_for_slave_sql_error.inc [errno=1054] +Last_SQL_Error = 'Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7'' STOP SLAVE; RESET SLAVE; @@ -711,7 +705,8 @@ c1 hex(c4) c5 c6 c7 *** BUG 30434 *** ***************** -Last_SQL_Error = Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)' +include/wait_for_slave_sql_error.inc [errno=1072] +Last_SQL_Error = 'Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)'' STOP SLAVE; RESET SLAVE; @@ -875,4 +870,4 @@ c1 hex(c4) c5 2 6231623162316231 JOE 3 6231623162316231 QA DROP TABLE t5; - +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_extraCol_innodb.result b/mysql-test/suite/rpl/r/rpl_extra_col_slave_innodb.result similarity index 89% rename from mysql-test/suite/rpl/r/rpl_extraCol_innodb.result rename to mysql-test/suite/rpl/r/rpl_extra_col_slave_innodb.result index 3f2256a65e0..e6be72ccbef 100644 --- a/mysql-test/suite/rpl/r/rpl_extraCol_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_extra_col_slave_innodb.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] call mtr.add_suppression("Slave: Unknown table 't6' Error_code: 1051"); **** Diff Table Def Start **** *** On Slave *** @@ -57,7 +53,8 @@ a b c 3 4 QA TESTING *** Start Slave *** START SLAVE; -Last_SQL_Error = Column 2 of table 'test.t2' cannot be converted from type 'char(10)' to type 'char(5)' +include/wait_for_slave_sql_error.inc [errno=1677] +Last_SQL_Error = 'Column 2 of table 'test.t2' cannot be converted from type 'char(10)' to type 'char(5)'' STOP SLAVE; RESET SLAVE; SELECT * FROM t2 ORDER BY a; @@ -86,10 +83,8 @@ INSERT INTO t3 () VALUES(@b1,2,'Kyle, TEX'),(@b1,1,'JOE AUSTIN'),(@b1,4,'QA TEST ******************************************** *** Expect slave to fail with Error 1677 *** ******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Column 0 of table 'test.t3' cannot be converted from type 'tinyblob' to type 'int(11)' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1677] +Last_SQL_Error = 'Column 0 of table 'test.t3' cannot be converted from type 'tinyblob' to type 'int(11)'' *** Drop t3 *** DROP TABLE t3; *** Create t4 on slave *** @@ -111,10 +106,8 @@ INSERT INTO t4 () VALUES(100.22,2,'Kyle, TEX'),(200.26,1,'JOE AUSTIN'), ******************************************** *** Expect slave to fail with Error 1677 *** ******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Column 0 of table 'test.t4' cannot be converted from type 'decimal(8,2)' to type 'int(11)' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1677] +Last_SQL_Error = 'Column 0 of table 'test.t4' cannot be converted from type 'decimal(8,2)' to type 'int(11)'' *** Drop t4 *** DROP TABLE t4; *** Create t5 on slave *** @@ -136,10 +129,8 @@ INSERT INTO t5 () VALUES(1,'Kyle',200.23,1,'b1b1',23.00098), ******************************************** *** Expect slave to fail with Error 1677 *** ******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Column 1 of table 'test.t5' cannot be converted from type 'varchar(6)' to type 'char(5)' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1677] +Last_SQL_Error = 'Column 1 of table 'test.t5' cannot be converted from type 'varchar(6)' to type 'char(5)'' *** Drop t5 *** DROP TABLE t5; *** Create t6 on slave *** @@ -160,12 +151,11 @@ INSERT INTO t6 () VALUES(1,'Kyle',200.23,1), ******************************************** *** Expect slave to fail with Error 1677 *** ******************************************** -Last_SQL_Error = Column 1 of table 'test.t6' cannot be converted from type 'varchar(6)' to type 'char(5)' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3; +include/wait_for_slave_sql_error.inc [errno=1677] +Last_SQL_Error = 'Column 1 of table 'test.t6' cannot be converted from type 'varchar(6)' to type 'char(5)'' *** Drop t6 *** +include/rpl_reset.inc DROP TABLE t6; -DROP TABLE t6; -START SLAVE; **** Diff Table Def End **** **** Extra Colums Start **** *** Create t7 on slave *** @@ -240,6 +230,7 @@ a b c d e f g h i 1 b1b1b1b1b1b1b1b1 Kyle 0000-00-00 00:00:00 0 NULL NULL 2 b1b1b1b1b1b1b1b1 JOE 0000-00-00 00:00:00 0 NULL NULL 3 b1b1b1b1b1b1b1b1 QA 0000-00-00 00:00:00 0 NULL NULL +DROP TABLE t9; *** Create t10 on slave *** STOP SLAVE; RESET SLAVE; @@ -258,10 +249,8 @@ INSERT INTO t10 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); ******************************************** *** Expect slave to fail with Error 1677 *** ******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Column 2 of table 'test.t10' cannot be converted from type 'char(5)' to type 'double' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1677] +Last_SQL_Error = 'Column 2 of table 'test.t10' cannot be converted from type 'char(5)' to type 'double'' *** Drop t10 *** DROP TABLE t10; *** Create t11 on slave *** @@ -282,10 +271,8 @@ INSERT INTO t11 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); ******************************************** *** Expect slave to fail with Error 1677 *** ******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Column 2 of table 'test.t11' cannot be converted from type 'varchar(254)' to type 'int(11)' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1677] +Last_SQL_Error = 'Column 2 of table 'test.t11' cannot be converted from type 'varchar(254)' to type 'int(11)'' *** Drop t11 *** DROP TABLE t11; *** Create t12 on slave *** @@ -442,6 +429,7 @@ c1 c4 c5 c6 c7 4 b1b1b1b1b1b1b1b1 NULL 1 CURRENT_TIMESTAMP 5 b1b1b1b1b1b1b1b1 NULL 1 CURRENT_TIMESTAMP 6 b1b1b1b1b1b1b1b1 NULL 1 CURRENT_TIMESTAMP +DROP TABLE t14a; *** connect to master and drop columns *** ALTER TABLE t14 DROP COLUMN c2; ALTER TABLE t14 DROP COLUMN c4; @@ -495,10 +483,8 @@ ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5; ******************************************** *** Expect slave to fail with Error 1060 *** ******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Error 'Duplicate column name 'c6'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1060] +Last_SQL_Error = 'Error 'Duplicate column name 'c6'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5'' *** Try to insert in master **** INSERT INTO t15 () VALUES(5,2.00,'Replication Testing',@b1,'Buda',2); SELECT * FROM t15 ORDER BY c1; @@ -598,9 +584,8 @@ INSERT INTO t17 () VALUES(9223372036854775807,2,'Kyle, TEX'); ******************************************** *** Expect slave to fail with Error 1677 *** ******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Column 0 of table 'test.t17' cannot be converted from type 'bigint' to type 'smallint(6)' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1677] +Last_SQL_Error = 'Column 0 of table 'test.t17' cannot be converted from type 'bigint' to type 'smallint(6)'' ** DROP table t17 *** DROP TABLE t17; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_extraCol_myisam.result b/mysql-test/suite/rpl/r/rpl_extra_col_slave_myisam.result similarity index 89% rename from mysql-test/suite/rpl/r/rpl_extraCol_myisam.result rename to mysql-test/suite/rpl/r/rpl_extra_col_slave_myisam.result index af5d8539b7e..b064aad9c05 100644 --- a/mysql-test/suite/rpl/r/rpl_extraCol_myisam.result +++ b/mysql-test/suite/rpl/r/rpl_extra_col_slave_myisam.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] call mtr.add_suppression("Slave: Unknown table 't6' Error_code: 1051"); **** Diff Table Def Start **** *** On Slave *** @@ -57,7 +53,8 @@ a b c 3 4 QA TESTING *** Start Slave *** START SLAVE; -Last_SQL_Error = Column 2 of table 'test.t2' cannot be converted from type 'char(10)' to type 'char(5)' +include/wait_for_slave_sql_error.inc [errno=1677] +Last_SQL_Error = 'Column 2 of table 'test.t2' cannot be converted from type 'char(10)' to type 'char(5)'' STOP SLAVE; RESET SLAVE; SELECT * FROM t2 ORDER BY a; @@ -86,10 +83,8 @@ INSERT INTO t3 () VALUES(@b1,2,'Kyle, TEX'),(@b1,1,'JOE AUSTIN'),(@b1,4,'QA TEST ******************************************** *** Expect slave to fail with Error 1677 *** ******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Column 0 of table 'test.t3' cannot be converted from type 'tinyblob' to type 'int(11)' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1677] +Last_SQL_Error = 'Column 0 of table 'test.t3' cannot be converted from type 'tinyblob' to type 'int(11)'' *** Drop t3 *** DROP TABLE t3; *** Create t4 on slave *** @@ -111,10 +106,8 @@ INSERT INTO t4 () VALUES(100.22,2,'Kyle, TEX'),(200.26,1,'JOE AUSTIN'), ******************************************** *** Expect slave to fail with Error 1677 *** ******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Column 0 of table 'test.t4' cannot be converted from type 'decimal(8,2)' to type 'int(11)' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1677] +Last_SQL_Error = 'Column 0 of table 'test.t4' cannot be converted from type 'decimal(8,2)' to type 'int(11)'' *** Drop t4 *** DROP TABLE t4; *** Create t5 on slave *** @@ -136,10 +129,8 @@ INSERT INTO t5 () VALUES(1,'Kyle',200.23,1,'b1b1',23.00098), ******************************************** *** Expect slave to fail with Error 1677 *** ******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Column 1 of table 'test.t5' cannot be converted from type 'varchar(6)' to type 'char(5)' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1677] +Last_SQL_Error = 'Column 1 of table 'test.t5' cannot be converted from type 'varchar(6)' to type 'char(5)'' *** Drop t5 *** DROP TABLE t5; *** Create t6 on slave *** @@ -160,12 +151,11 @@ INSERT INTO t6 () VALUES(1,'Kyle',200.23,1), ******************************************** *** Expect slave to fail with Error 1677 *** ******************************************** -Last_SQL_Error = Column 1 of table 'test.t6' cannot be converted from type 'varchar(6)' to type 'char(5)' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3; +include/wait_for_slave_sql_error.inc [errno=1677] +Last_SQL_Error = 'Column 1 of table 'test.t6' cannot be converted from type 'varchar(6)' to type 'char(5)'' *** Drop t6 *** +include/rpl_reset.inc DROP TABLE t6; -DROP TABLE t6; -START SLAVE; **** Diff Table Def End **** **** Extra Colums Start **** *** Create t7 on slave *** @@ -240,6 +230,7 @@ a b c d e f g h i 1 b1b1b1b1b1b1b1b1 Kyle 0000-00-00 00:00:00 0 NULL NULL 2 b1b1b1b1b1b1b1b1 JOE 0000-00-00 00:00:00 0 NULL NULL 3 b1b1b1b1b1b1b1b1 QA 0000-00-00 00:00:00 0 NULL NULL +DROP TABLE t9; *** Create t10 on slave *** STOP SLAVE; RESET SLAVE; @@ -258,10 +249,8 @@ INSERT INTO t10 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); ******************************************** *** Expect slave to fail with Error 1677 *** ******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Column 2 of table 'test.t10' cannot be converted from type 'char(5)' to type 'double' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1677] +Last_SQL_Error = 'Column 2 of table 'test.t10' cannot be converted from type 'char(5)' to type 'double'' *** Drop t10 *** DROP TABLE t10; *** Create t11 on slave *** @@ -282,10 +271,8 @@ INSERT INTO t11 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); ******************************************** *** Expect slave to fail with Error 1677 *** ******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Column 2 of table 'test.t11' cannot be converted from type 'varchar(254)' to type 'int(11)' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1677] +Last_SQL_Error = 'Column 2 of table 'test.t11' cannot be converted from type 'varchar(254)' to type 'int(11)'' *** Drop t11 *** DROP TABLE t11; *** Create t12 on slave *** @@ -442,6 +429,7 @@ c1 c4 c5 c6 c7 4 b1b1b1b1b1b1b1b1 NULL 1 CURRENT_TIMESTAMP 5 b1b1b1b1b1b1b1b1 NULL 1 CURRENT_TIMESTAMP 6 b1b1b1b1b1b1b1b1 NULL 1 CURRENT_TIMESTAMP +DROP TABLE t14a; *** connect to master and drop columns *** ALTER TABLE t14 DROP COLUMN c2; ALTER TABLE t14 DROP COLUMN c4; @@ -495,10 +483,8 @@ ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5; ******************************************** *** Expect slave to fail with Error 1060 *** ******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Error 'Duplicate column name 'c6'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1060] +Last_SQL_Error = 'Error 'Duplicate column name 'c6'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5'' *** Try to insert in master **** INSERT INTO t15 () VALUES(5,2.00,'Replication Testing',@b1,'Buda',2); SELECT * FROM t15 ORDER BY c1; @@ -598,9 +584,8 @@ INSERT INTO t17 () VALUES(9223372036854775807,2,'Kyle, TEX'); ******************************************** *** Expect slave to fail with Error 1677 *** ******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Column 0 of table 'test.t17' cannot be converted from type 'bigint' to type 'smallint(6)' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1677] +Last_SQL_Error = 'Column 0 of table 'test.t17' cannot be converted from type 'bigint' to type 'smallint(6)'' ** DROP table t17 *** DROP TABLE t17; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_failed_optimize.result b/mysql-test/suite/rpl/r/rpl_failed_optimize.result index 7210898d521..b0c331fa557 100644 --- a/mysql-test/suite/rpl/r/rpl_failed_optimize.result +++ b/mysql-test/suite/rpl/r/rpl_failed_optimize.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CREATE TABLE t1 ( a int ) ENGINE=InnoDB; BEGIN; INSERT INTO t1 VALUES (1); @@ -23,3 +19,4 @@ a 1 commit; drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_filter_tables_not_exist.result b/mysql-test/suite/rpl/r/rpl_filter_tables_not_exist.result index 5f1f72a9a3a..4eaf61e5f9e 100644 --- a/mysql-test/suite/rpl/r/rpl_filter_tables_not_exist.result +++ b/mysql-test/suite/rpl/r/rpl_filter_tables_not_exist.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CREATE TABLE t1 (id int, a int); CREATE TABLE t2 (id int, b int); CREATE TABLE t3 (id int, c int); @@ -47,85 +43,53 @@ UPDATE t4 LEFT JOIN (t1, t6, t7) ON (t4.id=t1.id and t4.id=t6.id and t4.id=t7.id UPDATE t7 LEFT JOIN (t4, t1, t2) ON (t7.id=t4.id and t7.id=t1.id and t7.id=t2.id) SET a=0, b=0, d=0, g=0 where t7.id=1; UPDATE t7 LEFT JOIN (t8, t4, t1) ON (t7.id=t8.id and t7.id=t4.id and t7.id=t1.id) SET a=0, d=0, g=0, h=0 where t7.id=1; UPDATE t1 LEFT JOIN t4 ON (t1.id=t4.id) SET a=0 where t1.id=1; ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN t4 ON (t1.id=t4.id) SET a=0 where t1.id=1' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1146] +Last_SQL_Error = 'Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN t4 ON (t1.id=t4.id) SET a=0 where t1.id=1'' UPDATE t1 LEFT JOIN (t4, t7) ON (t1.id=t4.id and t1.id=t7.id) SET a=0 where t1.id=1; ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t4, t7) ON (t1.id=t4.id and t1.id=t7.id) SET a=0 where t1.id=1' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1146] +Last_SQL_Error = 'Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t4, t7) ON (t1.id=t4.id and t1.id=t7.id) SET a=0 where t1.id=1'' UPDATE t1 LEFT JOIN (t2, t4, t7) ON (t1.id=t2.id and t1.id=t4.id and t1.id=t7.id) SET a=0, b=0 where t1.id=1; ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t2, t4, t7) ON (t1.id=t2.id and t1.id=t4.id and t1.id=t7.id) SET a=0, b=0 where t1.id=1' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1146] +Last_SQL_Error = 'Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t2, t4, t7) ON (t1.id=t2.id and t1.id=t4.id and t1.id=t7.id) SET a=0, b=0 where t1.id=1'' UPDATE t1 LEFT JOIN (t2, t3, t7) ON (t1.id=t2.id and t1.id=t3.id and t1.id=t7.id) SET a=0, b=0, c=0 where t1.id=1; ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t2, t3, t7) ON (t1.id=t2.id and t1.id=t3.id and t1.id=t7.id) SET a=0, b=0, c=0 where t1.id=1' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1146] +Last_SQL_Error = 'Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t2, t3, t7) ON (t1.id=t2.id and t1.id=t3.id and t1.id=t7.id) SET a=0, b=0, c=0 where t1.id=1'' UPDATE t1 LEFT JOIN t7 ON (t1.id=t7.id) SET a=0, g=0 where t1.id=1; ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN t7 ON (t1.id=t7.id) SET a=0, g=0 where t1.id=1' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1146] +Last_SQL_Error = 'Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN t7 ON (t1.id=t7.id) SET a=0, g=0 where t1.id=1'' UPDATE t7 LEFT JOIN t1 ON (t1.id=t7.id) SET a=0, g=0 where t7.id=1; ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t7 LEFT JOIN t1 ON (t1.id=t7.id) SET a=0, g=0 where t7.id=1' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1146] +Last_SQL_Error = 'Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t7 LEFT JOIN t1 ON (t1.id=t7.id) SET a=0, g=0 where t7.id=1'' UPDATE t1 LEFT JOIN (t4, t5, t7) ON (t1.id=t4.id and t1.id=t5.id and t1.id=t7.id) SET a=0, g=0 where t1.id=1; ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t4, t5, t7) ON (t1.id=t4.id and t1.id=t5.id and t1.id=t7.id) SET a=0, g=0 where t1.id=1' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1146] +Last_SQL_Error = 'Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t4, t5, t7) ON (t1.id=t4.id and t1.id=t5.id and t1.id=t7.id) SET a=0, g=0 where t1.id=1'' UPDATE t1 LEFT JOIN (t4, t7, t8) ON (t1.id=t4.id and t1.id=t7.id and t1.id=t8.id) SET a=0, g=0 where t1.id=1; ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t4, t7, t8) ON (t1.id=t4.id and t1.id=t7.id and t1.id=t8.id) SET a=0, g=0 where t1.id=1' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1146] +Last_SQL_Error = 'Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t4, t7, t8) ON (t1.id=t4.id and t1.id=t7.id and t1.id=t8.id) SET a=0, g=0 where t1.id=1'' UPDATE t1 LEFT JOIN (t7, t8, t9) ON (t1.id=t7.id and t1.id=t8.id and t1.id=t9.id) SET a=0, g=0, h=0, i=0 where t1.id=1; ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t7, t8, t9) ON (t1.id=t7.id and t1.id=t8.id and t1.id=t9.id) SET a=0, g=0, h=0, i=0 where t1.id=1' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1146] +Last_SQL_Error = 'Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t7, t8, t9) ON (t1.id=t7.id and t1.id=t8.id and t1.id=t9.id) SET a=0, g=0, h=0, i=0 where t1.id=1'' UPDATE t7 LEFT JOIN (t1, t2, t3) ON (t7.id=t1.id and t7.id=t2.id and t7.id=t3.id) SET g=0, a=0, b=0, c=0 where t7.id=1; ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t7 LEFT JOIN (t1, t2, t3) ON (t7.id=t1.id and t7.id=t2.id and t7.id=t3.id) SET g=0, a=0, b=0, c=0 where t7.id=1' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1146] +Last_SQL_Error = 'Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t7 LEFT JOIN (t1, t2, t3) ON (t7.id=t1.id and t7.id=t2.id and t7.id=t3.id) SET g=0, a=0, b=0, c=0 where t7.id=1'' UPDATE t7 LEFT JOIN (t4, t5, t3) ON (t7.id=t4.id and t7.id=t5.id and t7.id=t3.id) SET g=0, c=0 where t7.id=1; ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t7 LEFT JOIN (t4, t5, t3) ON (t7.id=t4.id and t7.id=t5.id and t7.id=t3.id) SET g=0, c=0 where t7.id=1' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1146] +Last_SQL_Error = 'Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t7 LEFT JOIN (t4, t5, t3) ON (t7.id=t4.id and t7.id=t5.id and t7.id=t3.id) SET g=0, c=0 where t7.id=1'' UPDATE t7 LEFT JOIN (t8, t9, t3) ON (t7.id=t8.id and t7.id=t9.id and t7.id=t3.id) SET g=0, h=0, i=0, c=0 where t7.id=1; ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t7 LEFT JOIN (t8, t9, t3) ON (t7.id=t8.id and t7.id=t9.id and t7.id=t3.id) SET g=0, h=0, i=0, c=0 where t7.id=1' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1146] +Last_SQL_Error = 'Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t7 LEFT JOIN (t8, t9, t3) ON (t7.id=t8.id and t7.id=t9.id and t7.id=t3.id) SET g=0, h=0, i=0, c=0 where t7.id=1'' UPDATE t1 LEFT JOIN t4 ON (t1.id=t4.id) SET a=0, d=0 where t1.id=1; ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN t4 ON (t1.id=t4.id) SET a=0, d=0 where t1.id=1' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1146] +Last_SQL_Error = 'Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN t4 ON (t1.id=t4.id) SET a=0, d=0 where t1.id=1'' UPDATE t1 LEFT JOIN (t4, t5, t6) ON (t1.id=t4.id and t1.id=t5.id and t1.id=t6.id) SET a=0, d=0, e=0, f=0 where t1.id=1; ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t4, t5, t6) ON (t1.id=t4.id and t1.id=t5.id and t1.id=t6.id) SET a=0, d=0, e=0, f=0 where t1.id=1' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1146] +Last_SQL_Error = 'Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t4, t5, t6) ON (t1.id=t4.id and t1.id=t5.id and t1.id=t6.id) SET a=0, d=0, e=0, f=0 where t1.id=1'' UPDATE t4 LEFT JOIN (t1, t5, t6) ON (t4.id=t1.id and t4.id=t5.id and t4.id=t6.id) SET a=0, e=0, f=0 where t4.id=1; ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t4 LEFT JOIN (t1, t5, t6) ON (t4.id=t1.id and t4.id=t5.id and t4.id=t6.id) SET a=0, e=0, f=0 where t4.id=1' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1146] +Last_SQL_Error = 'Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t4 LEFT JOIN (t1, t5, t6) ON (t4.id=t1.id and t4.id=t5.id and t4.id=t6.id) SET a=0, e=0, f=0 where t4.id=1'' UPDATE t7 LEFT JOIN (t1, t4, t2) ON (t7.id=t1.id and t7.id=t4.id and t7.id=t2.id) SET a=0, b=0, d=0, g=0 where t7.id=1; ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t7 LEFT JOIN (t1, t4, t2) ON (t7.id=t1.id and t7.id=t4.id and t7.id=t2.id) SET a=0, b=0, d=0, g=0 where t7.id=1' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1146] +Last_SQL_Error = 'Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t7 LEFT JOIN (t1, t4, t2) ON (t7.id=t1.id and t7.id=t4.id and t7.id=t2.id) SET a=0, b=0, d=0, g=0 where t7.id=1'' [on slave] show tables like 't%'; Tables_in_test (t%) @@ -149,3 +113,4 @@ id c 3 3 [on master] drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_flush_logs.result b/mysql-test/suite/rpl/r/rpl_flush_logs.result index 4c3352559c4..4fce91a7234 100644 --- a/mysql-test/suite/rpl/r/rpl_flush_logs.result +++ b/mysql-test/suite/rpl/r/rpl_flush_logs.result @@ -1,20 +1,14 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] # Test if support 'flush error logs' statement. flush error logs; # Make sure binary logs was not be flushed # after execute 'flush error logs' statement. # Make sure relay logs was not be flushed # after execute 'flush error logs' statement. -# Make sure the 'slave-relay-bin.000004' file does not -# exist before execute 'flush relay logs' statement. # Test if support 'flush relay logs' statement. flush relay logs; -# Check the 'slave-relay-bin.000004' file is created +# Check the 'slave-relay-bin.000003' file is created # after executed 'flush relay logs' statement. # Make sure binary logs was not be flushed # after execute 'flush relay logs' statement. @@ -36,20 +30,21 @@ flush engine logs; flush binary logs; # Check the 'master-bin.000002' file is created # after executed 'flush binary logs' statement. -# Make sure the 'slave-relay-bin.000007' file does not exist +# Make sure the 'slave-relay-bin.000006' file does not exist # exist before execute 'flush error logs, relay logs' statement. # Test if support to combine all kinds of logs into one statement. flush error logs, relay logs; # Make sure binary logs was not be flushed # after execute 'flush error logs, relay logs' statement. -# Check the 'slave-relay-bin.000007' file is created after +# Check the 'slave-relay-bin.000006' file is created after # execute 'flush error logs, relay logs' statement. -# Make sure the 'slave-relay-bin.000008' and 'slave-relay-bin.000009' -# files do not exist before execute 'flush error logs, relay logs' +# Make sure the 'slave-relay-bin.000007' and 'slave-relay-bin.000008' +# files do not exist before execute 'flush error logs, relay logs' # statement. # Test if 'flush logs' statement works fine and flush all the logs. flush logs; # Check 'master-bin.000003' is created # after execute 'flush logs' statement. -# Check the 'slave-relay-bin.000008' and 'slave-relay-bin.000009' +# Check the 'slave-relay-bin.000007' and 'slave-relay-bin.000008' # files are created after execute 'flush logs' statement. +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_flushlog_loop.result b/mysql-test/suite/rpl/r/rpl_flushlog_loop.result index 93e74c20e28..931335fb95c 100644 --- a/mysql-test/suite/rpl/r/rpl_flushlog_loop.result +++ b/mysql-test/suite/rpl/r/rpl_flushlog_loop.result @@ -1,28 +1,16 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_init.inc [topology=1->2->1] show variables like 'relay_log%'; Variable_name Value -relay_log MYSQLD_DATADIR/relay-log +relay_log relay_log_index relay_log_info_file relay-log.info relay_log_purge ON relay_log_recovery OFF relay_log_space_limit 0 -stop slave; -change master to master_host='127.0.0.1',master_user='root', -master_password='',master_port=MASTER_PORT; -start slave; -stop slave; -change master to master_host='127.0.0.1',master_user='root', -master_password='',master_port=SLAVE_PORT; -include/start_slave.inc CREATE TABLE t1 (a INT KEY) ENGINE= MyISAM; INSERT INTO t1 VALUE(1); FLUSH LOGS; INSERT INTO t1 VALUE(2); -Checking that both slave threads are running. -Relay_Log_File relay-log.000003 +include/check_slave_is_running.inc +Relay_Log_File = 'mysqld-relay-bin.000003' +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_foreign_key_innodb.result b/mysql-test/suite/rpl/r/rpl_foreign_key_innodb.result index 960833b85d8..f778e76adc0 100644 --- a/mysql-test/suite/rpl/r/rpl_foreign_key_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_foreign_key_innodb.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CREATE TABLE t1 (a INT AUTO_INCREMENT KEY) ENGINE=INNODB; CREATE TABLE t2 (b INT AUTO_INCREMENT KEY, c INT, FOREIGN KEY(b) REFERENCES t1(a)) ENGINE=INNODB; SET FOREIGN_KEY_CHECKS=0; @@ -52,3 +48,4 @@ select count(*) from t1 /* must be zero */; count(*) 0 drop table t2,t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_free_items.result b/mysql-test/suite/rpl/r/rpl_free_items.result index 91c1e2aa6e5..416f597aebc 100644 --- a/mysql-test/suite/rpl/r/rpl_free_items.result +++ b/mysql-test/suite/rpl/r/rpl_free_items.result @@ -1,10 +1,7 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create table t1 (a int); create table t2 (a int); drop table t1; drop table t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_geometry.result b/mysql-test/suite/rpl/r/rpl_geometry.result index 9b48dba4f22..7ec119c9ae8 100644 --- a/mysql-test/suite/rpl/r/rpl_geometry.result +++ b/mysql-test/suite/rpl/r/rpl_geometry.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create table t1(a varchar(100), b multipoint not null, c varchar(256)); @@ -16,3 +12,4 @@ b geometrycollection default null, c decimal(10,0)); insert into t2(c) values (null); drop table t1, t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_get_lock.result b/mysql-test/suite/rpl/r/rpl_get_lock.result index 2adda3cfc18..757ce9bba17 100644 --- a/mysql-test/suite/rpl/r/rpl_get_lock.result +++ b/mysql-test/suite/rpl/r/rpl_get_lock.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); create table t1(n int); insert into t1 values(get_lock("lock",2)); @@ -34,3 +30,4 @@ select is_free_lock(NULL); is_free_lock(NULL) NULL drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_get_master_version_and_clock.result b/mysql-test/suite/rpl/r/rpl_get_master_version_and_clock.result index ba7db2d11e3..2997d4eb426 100644 --- a/mysql-test/suite/rpl/r/rpl_get_master_version_and_clock.result +++ b/mysql-test/suite/rpl/r/rpl_get_master_version_and_clock.result @@ -1,34 +1,33 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] call mtr.add_suppression("Slave I/O: Master command COM_REGISTER_SLAVE failed: .*"); call mtr.add_suppression("Slave I/O: .* failed with error: Lost connection to MySQL server at 'reading initial communication packet'"); call mtr.add_suppression("Fatal error: The slave I/O thread stops because master and slave have equal MySQL server ids; .*"); call mtr.add_suppression("Slave I/O thread .* register on master"); -stop slave; +include/stop_slave.inc SET @@global.debug= "+d,'debug_lock.before_get_UNIX_TIMESTAMP'"; -start slave; +include/start_slave.inc slave is going to hang in get_master_version_and_clock +include/rpl_stop_server.inc [server_number=1] slave is unblocked SET DEBUG_SYNC='now SIGNAL signal.get_unix_timestamp'; Check network error happened here +include/wait_for_slave_io_error.inc [errno=1040, 1053, 2002, 2003, 2006, 2013] set @@global.debug = "-d,'debug_lock.before_get_UNIX_TIMESTAMP'"; -stop slave; +include/rpl_start_server.inc [server_number=1] +include/wait_for_slave_param.inc [Slave_IO_Running] +include/stop_slave.inc SET @@global.debug= "+d,'debug_lock.before_get_SERVER_ID'"; -start slave; +include/start_slave.inc slave is going to hang in get_master_version_and_clock +include/rpl_stop_server.inc [server_number=1] slave is unblocked SET DEBUG_SYNC='now SIGNAL signal.get_server_id'; Check network error happened here +include/wait_for_slave_io_error.inc [errno=1040, 1053, 2002, 2003, 2006, 2013] set @@global.debug = "-d,'debug_lock.before_get_SERVER_ID'"; +include/rpl_start_server.inc [server_number=1] +include/wait_for_slave_param.inc [Slave_IO_Running] set global debug= ''; -reset master; -include/stop_slave.inc -change master to master_port=SLAVE_PORT; -start slave; -*** must be having the replicate-same-server-id IO thread error *** -Last_IO_Error = Fatal error: The slave I/O thread stops because master and slave have equal MySQL server ids; these ids must be different for replication to work (or the --replicate-same-server-id option must be used on slave but this does not always make sense; please check the manual before using it). SET DEBUG_SYNC= 'RESET'; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_grant.result b/mysql-test/suite/rpl/r/rpl_grant.result index 285d52b7678..4ec8c51a5dc 100644 --- a/mysql-test/suite/rpl/r/rpl_grant.result +++ b/mysql-test/suite/rpl/r/rpl_grant.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] **** On Master **** CREATE USER dummy@localhost; CREATE USER dummy1@localhost, dummy2@localhost; @@ -41,3 +37,4 @@ user host SELECT COUNT(*) FROM mysql.user WHERE user like 'dummy%'; COUNT(*) 0 +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_heartbeat.result b/mysql-test/suite/rpl/r/rpl_heartbeat.result index 1b6a5059448..d4bdb77ef0b 100644 --- a/mysql-test/suite/rpl/r/rpl_heartbeat.result +++ b/mysql-test/suite/rpl/r/rpl_heartbeat.result @@ -52,10 +52,12 @@ Variable_name Slave_heartbeat_period Value 0.500 start slave; create table t1 (f1 int); +include/check_slave_param.inc [Relay_Log_File] show status like 'Slave_heartbeat_period';; Variable_name Slave_heartbeat_period Value 0.500 A heartbeat has been received by the slave drop table t1; set @@global.slave_net_timeout= @restore_slave_net_timeout; +include/stop_slave.inc End of tests diff --git a/mysql-test/suite/rpl/r/rpl_heartbeat_2slaves.result b/mysql-test/suite/rpl/r/rpl_heartbeat_2slaves.result index ecb7c62c488..198d89ae3d6 100644 --- a/mysql-test/suite/rpl/r/rpl_heartbeat_2slaves.result +++ b/mysql-test/suite/rpl/r/rpl_heartbeat_2slaves.result @@ -1,55 +1,33 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; - -*** Preparing *** -[on slave] -include/stop_slave.inc -RESET SLAVE; -CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=0.1, MASTER_LOG_FILE='MASTER_BINLOG'; -include/start_slave.inc -[on slave1] -STOP SLAVE; -RESET SLAVE; -CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=1, MASTER_LOG_FILE='MASTER_BINLOG'; -include/start_slave.inc - -*** 2 slaves *** +include/rpl_init.inc [topology=1->2,1->3] +include/rpl_connect.inc [creating master] +include/rpl_connect.inc [creating slave_1] +include/rpl_connect.inc [creating slave_2] Slave has received heartbeat event -Slave1 has received heartbeat event -Slave has received more heartbeats than Slave1 (1 means 'yes'): 1 +slave_2 has received heartbeat event +slave_1 has received more heartbeats than slave_2 (1 means 'yes'): 0 -*** Master->data->Slave1->heartbeat->Slave: *** -[on slave1] -RESET MASTER; -[on slave] -include/stop_slave.inc -RESET SLAVE; -CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=SLAVE1_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=0.2, MASTER_LOG_FILE='SLAVE1_BINLOG'; -include/start_slave.inc -Slave has received heartbeat event +include/rpl_stop_slaves.inc +include/rpl_change_topology.inc [new topology=1->3->2] +include/rpl_start_slaves.inc +slave_1 has received heartbeat event [on master] CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(10), c LONGTEXT); INSERT INTO t1 VALUES (1, 'on master', ''); SHOW TABLES; Tables_in_test t1 -[on slave1] +[on slave_2] SHOW TABLES; Tables_in_test t1 -[on slave] +[on slave_1] SHOW TABLES; Tables_in_test [on master] -creating updates on master and send to slave1 during 5 second -[on slave] -Slave has received heartbeats (1 means 'yes'): 1 +creating updates on master and send to slave_2 during 5 second +[on slave_1] +slave_1 has received heartbeats (1 means 'yes'): 0 *** Clean up *** DROP TABLE t1; - -End of 6.0 test +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_heartbeat_basic.result b/mysql-test/suite/rpl/r/rpl_heartbeat_basic.result index f0fa060c676..ccef60d6323 100644 --- a/mysql-test/suite/rpl/r/rpl_heartbeat_basic.result +++ b/mysql-test/suite/rpl/r/rpl_heartbeat_basic.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] *** Preparing *** include/stop_slave.inc @@ -99,7 +95,7 @@ Slave_heartbeat_period 20.000 *** Reload slave *** SET @@global.slave_net_timeout=50; CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=30; -Reload slave +include/rpl_restart_server.inc [server_number=2] SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period'; Variable_name Value Slave_heartbeat_period 30.000 @@ -189,19 +185,21 @@ include/start_slave.inc Heartbeat event received *** Stopped IO thread *** -STOP SLAVE IO_THREAD; +include/stop_slave_io.inc Number of received heartbeat events while io thread stopped: 0 *** Started IO thread *** START SLAVE IO_THREAD; +include/wait_for_slave_io_to_start.inc Heartbeat event received *** Stopped SQL thread *** -STOP SLAVE SQL_THREAD; +include/stop_slave_sql.inc Heartbeat events are received while sql thread stopped (1 means 'yes'): 1 *** Started SQL thread *** START SLAVE SQL_THREAD; +include/wait_for_slave_sql_to_start.inc Heartbeat event received *** Stopped SQL thread by error *** @@ -259,21 +257,17 @@ Heartbeat events are received after reset of master (1 means 'yes'): 1 *** Reload master *** STOP SLAVE; RESET SLAVE; -CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=0.1; +CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=0.1, MASTER_CONNECT_RETRY = 5; include/start_slave.inc Heartbeat event received -Reload master +include/rpl_restart_server.inc [server_number=1] +include/wait_for_slave_io_to_start.inc Heartbeat event received *** Circular replication *** -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc include/stop_slave.inc -CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=SLAVE_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=1, MASTER_LOG_FILE='SLAVE_BINLOG'; +include/rpl_change_topology.inc [new topology=1->2->1] include/start_slave.inc CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(10)); INSERT INTO t1 VALUES(1, 'on master'); @@ -291,9 +285,6 @@ a b Heartbeat event received on master Heartbeat event received on slave *** Clean up *** -include/stop_slave.inc DROP TABLE t1; -include/stop_slave.inc SET @@global.slave_net_timeout=@restore_slave_net_timeout; - -End of tests +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_heartbeat_ssl.result b/mysql-test/suite/rpl/r/rpl_heartbeat_ssl.result index 42de3c459cb..a73c99bd99b 100644 --- a/mysql-test/suite/rpl/r/rpl_heartbeat_ssl.result +++ b/mysql-test/suite/rpl/r/rpl_heartbeat_ssl.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] *** Heartbeat over SSL *** include/stop_slave.inc @@ -23,5 +19,10 @@ Master_SSL_Allowed: Yes Heartbeat event has received *** Clean up *** - -End of 6.0 test +include/stop_slave.inc +CHANGE MASTER TO +MASTER_SSL=0, +MASTER_SSL_CA='', +MASTER_SSL_CERT='', +MASTER_SSL_KEY=''; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_idempotency.result b/mysql-test/suite/rpl/r/rpl_idempotency.result index 5e37e7a1f5e..95b79926234 100644 --- a/mysql-test/suite/rpl/r/rpl_idempotency.result +++ b/mysql-test/suite/rpl/r/rpl_idempotency.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] call mtr.add_suppression("Slave: Can't find record in 't.' Error_code: 1032"); call mtr.add_suppression("Slave: Cannot delete or update a parent row: a foreign key constraint fails .* Error_code: 1451"); call mtr.add_suppression("Slave: Cannot add or update a child row: a foreign key constraint fails .* Error_code: 1452"); @@ -33,8 +29,7 @@ SELECT * FROM t2 ORDER BY a; a -3 -1 -Last_SQL_Error -0 +include/check_slave_no_error.inc INSERT IGNORE INTO t1 VALUES (-2); INSERT IGNORE INTO t1 VALUES (-2); SELECT * FROM t1 ORDER BY a; @@ -47,8 +42,7 @@ a -3 -2 -1 -Last_SQL_Error -0 +include/check_slave_no_error.inc UPDATE t1 SET a = 1 WHERE a = -1; UPDATE t2 SET a = 1 WHERE a = -1; UPDATE t1 SET a = 1 WHERE a = -1; @@ -71,7 +65,7 @@ SELECT * FROM t2 ORDER BY a; a -3 1 -Last_SQL_Error -0 +include/check_slave_no_error.inc DROP TABLE t1, t2; SET @@global.slave_exec_mode= @old_slave_exec_mode; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_ignore_grant.result b/mysql-test/suite/rpl/r/rpl_ignore_grant.result index 5169cc8e888..ae6d6ddfc8d 100644 --- a/mysql-test/suite/rpl/r/rpl_ignore_grant.result +++ b/mysql-test/suite/rpl/r/rpl_ignore_grant.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] delete from mysql.user where user=_binary'rpl_ignore_grant'; delete from mysql.db where user=_binary'rpl_ignore_grant'; flush privileges; @@ -35,3 +31,4 @@ flush privileges; delete from mysql.user where user=_binary'rpl_ignore_grant'; delete from mysql.db where user=_binary'rpl_ignore_grant'; flush privileges; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_ignore_revoke.result b/mysql-test/suite/rpl/r/rpl_ignore_revoke.result index b1ccd2f0442..84e1a3b40c7 100644 --- a/mysql-test/suite/rpl/r/rpl_ignore_revoke.result +++ b/mysql-test/suite/rpl/r/rpl_ignore_revoke.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] grant select on *.* to 'user_foo'@'%' identified by 'user_foopass'; revoke select on *.* from 'user_foo'@'%'; select select_priv from mysql.user where user='user_foo' /* master:must be N */; @@ -28,3 +24,4 @@ Y revoke select on *.* FROM 'user_foo'; delete from mysql.user where user="user_foo"; delete from mysql.user where user="user_foo"; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_ignore_table.result b/mysql-test/suite/rpl/r/rpl_ignore_table.result index 37f27ab0e4b..e3f0416a9f9 100644 --- a/mysql-test/suite/rpl/r/rpl_ignore_table.result +++ b/mysql-test/suite/rpl/r/rpl_ignore_table.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] **** Test case for BUG#16487 **** **** Master **** CREATE TABLE test.t4 (a int); @@ -142,4 +138,4 @@ HEX(word) SELECT * FROM tmptbl504451f4258$1; ERROR 42S02: Table 'test.tmptbl504451f4258$1' doesn't exist DROP TABLE t5; -call mtr.force_restart(); +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_ignore_table_update.result b/mysql-test/suite/rpl/r/rpl_ignore_table_update.result index a88a3c690ed..c3882d0b98f 100644 --- a/mysql-test/suite/rpl/r/rpl_ignore_table_update.result +++ b/mysql-test/suite/rpl/r/rpl_ignore_table_update.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] use test; drop table if exists mysqltest_foo; drop table if exists mysqltest_bar; @@ -21,3 +17,4 @@ n m k 4 15 55 drop table mysqltest_foo,mysqltest_bar,t1; drop table mysqltest_foo,mysqltest_bar,t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_incident.result b/mysql-test/suite/rpl/r/rpl_incident.result index 6c226aaf2f7..b54d7d400f7 100644 --- a/mysql-test/suite/rpl/r/rpl_incident.result +++ b/mysql-test/suite/rpl/r/rpl_incident.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] **** On Master **** CREATE TABLE t1 (a INT); INSERT INTO t1 VALUES (1),(2),(3); @@ -19,7 +15,8 @@ a 2 3 4 -Last_SQL_Error = The incident LOST_EVENTS occured on the master. Message: +include/wait_for_slave_sql_error.inc [errno=1590] +Last_SQL_Error = 'The incident LOST_EVENTS occured on the master. Message: ' **** On Slave **** SELECT * FROM t1; a @@ -34,5 +31,6 @@ a 2 3 4 -Checking that both slave threads are running. +include/check_slave_is_running.inc DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_init_slave.result b/mysql-test/suite/rpl/r/rpl_init_slave.result index 908abf56c1f..fcf7114879c 100644 --- a/mysql-test/suite/rpl/r/rpl_init_slave.result +++ b/mysql-test/suite/rpl/r/rpl_init_slave.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] set global max_connections=151; include/stop_slave.inc include/start_slave.inc @@ -25,6 +21,6 @@ set global init_connect="set @c=1"; show variables like 'init_connect'; Variable_name Value init_connect set @c=1 -include/stop_slave.inc set global init_connect= @my_global_init_connect; set global max_connections= default; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_init_slave_errors.result b/mysql-test/suite/rpl/r/rpl_init_slave_errors.result index c6ee82b13f3..46bc66cbb65 100644 --- a/mysql-test/suite/rpl/r/rpl_init_slave_errors.result +++ b/mysql-test/suite/rpl/r/rpl_init_slave_errors.result @@ -1,19 +1,19 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] stop slave; reset slave; SET GLOBAL debug= "d,simulate_io_slave_error_on_init,simulate_sql_slave_error_on_init"; start slave; -Reporting the following error: Failed during slave thread initialization +include/wait_for_slave_sql_error.inc [errno=1593] +Last_SQL_Error = 'Failed during slave thread initialization' call mtr.add_suppression("Failed during slave I/O thread initialization"); SET GLOBAL debug= ""; -stop slave; reset slave; SET GLOBAL init_slave= "garbage"; start slave; -Reporting the following error: Slave SQL thread aborted. Can't execute init_slave query +include/wait_for_slave_sql_error.inc [errno=1064] +Last_SQL_Error = 'Slave SQL thread aborted. Can't execute init_slave query' SET GLOBAL init_slave= ""; +include/stop_slave_io.inc +RESET SLAVE; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_innodb_bug28430.result b/mysql-test/suite/rpl/r/rpl_innodb_bug28430.result index 6ad22c368b4..f8734b48295 100644 --- a/mysql-test/suite/rpl/r/rpl_innodb_bug28430.result +++ b/mysql-test/suite/rpl/r/rpl_innodb_bug28430.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] use test; CREATE TABLE test.regular_tbl(id MEDIUMINT NOT NULL AUTO_INCREMENT, dt TIMESTAMP, user CHAR(255), uuidf LONGBLOB, @@ -140,3 +136,4 @@ DROP PROCEDURE test.proc_byrange; DROP TABLE test.regular_tbl; DROP TABLE test.bykey_tbl; DROP TABLE test.byrange_tbl; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_innodb_bug30888.result b/mysql-test/suite/rpl/r/rpl_innodb_bug30888.result index abff02b4b07..d06e6681e81 100644 --- a/mysql-test/suite/rpl/r/rpl_innodb_bug30888.result +++ b/mysql-test/suite/rpl/r/rpl_innodb_bug30888.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] use test; CREATE TABLE test.regular_tbl(id MEDIUMINT NOT NULL AUTO_INCREMENT, dt TIMESTAMP, user CHAR(255), uuidf LONGBLOB, @@ -33,3 +29,4 @@ END| CALL test.proc_norm(); DROP PROCEDURE test.proc_norm; DROP TABLE test.regular_tbl; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_innodb_mixed_ddl.result b/mysql-test/suite/rpl/r/rpl_innodb_mixed_ddl.result index 549842198e8..36294a4333b 100644 --- a/mysql-test/suite/rpl/r/rpl_innodb_mixed_ddl.result +++ b/mysql-test/suite/rpl/r/rpl_innodb_mixed_ddl.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] ==========MASTER========== show global variables like 'binlog_format%'; Variable_name Value @@ -157,3 +153,4 @@ master-bin.000001 # Query # # use `test_rpl`; CREATE INDEX index2 on t2 (d) master-bin.000001 # Query # # use `test_rpl`; CREATE INDEX index3 on t2 (a, d) master-bin.000001 # Query # # use `test_rpl`; ALTER TABLE t2 DROP COLUMN d drop database test_rpl; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result b/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result index 818a883a602..d89bce479e5 100644 --- a/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result +++ b/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] ==========MASTER========== show global variables like 'binlog_format%'; Variable_name Value @@ -1102,3 +1098,4 @@ master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t2 master-bin.000001 # Xid # # COMMIT /* XID */ drop database test_rpl; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_insert.result b/mysql-test/suite/rpl/r/rpl_insert.result index b6a97926f73..8ab90fceed2 100644 --- a/mysql-test/suite/rpl/r/rpl_insert.result +++ b/mysql-test/suite/rpl/r/rpl_insert.result @@ -1,12 +1,8 @@ # # Bug#20821: INSERT DELAYED fails to write some rows to binlog # -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CREATE SCHEMA IF NOT EXISTS mysqlslap; USE mysqlslap; CREATE TABLE t1 (id INT, name VARCHAR(64)); @@ -21,3 +17,4 @@ COUNT(*) # USE test; DROP SCHEMA mysqlslap; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_insert_id.result b/mysql-test/suite/rpl/r/rpl_insert_id.result index f8a8e9eed32..05ef04e8a1d 100644 --- a/mysql-test/suite/rpl/r/rpl_insert_id.result +++ b/mysql-test/suite/rpl/r/rpl_insert_id.result @@ -1,21 +1,14 @@ -call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); # # Setup # -use test; -drop table if exists t1, t2, t3; # # See if queries that use both auto_increment and LAST_INSERT_ID() # are replicated well # # We also check how the foreign_key_check variable is replicated # -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] SET @old_concurrent_insert= @@global.concurrent_insert; SET @@global.concurrent_insert= 0; create table t1(a int auto_increment, key(a)) engine=myisam; @@ -534,4 +527,4 @@ drop table t1, t2; drop procedure foo; SET @@global.concurrent_insert= @old_concurrent_insert; set @@session.sql_auto_is_null=default; -call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_insert_id_pk.result b/mysql-test/suite/rpl/r/rpl_insert_id_pk.result index 79815355332..c2d6d2c9b0c 100644 --- a/mysql-test/suite/rpl/r/rpl_insert_id_pk.result +++ b/mysql-test/suite/rpl/r/rpl_insert_id_pk.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create table t1(a int auto_increment, primary key(a)); create table t2(b int auto_increment, c int, primary key(b)); insert into t1 values (1),(2),(3); @@ -74,3 +70,4 @@ SET FOREIGN_KEY_CHECKS=0; INSERT INTO t1 VALUES (1),(1); Got one of the listed errors drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_insert_ignore.result b/mysql-test/suite/rpl/r/rpl_insert_ignore.result index e3e85c5e4c4..e31272f5300 100644 --- a/mysql-test/suite/rpl/r/rpl_insert_ignore.result +++ b/mysql-test/suite/rpl/r/rpl_insert_ignore.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); CREATE TABLE t1 ( a int unsigned not null auto_increment primary key, @@ -69,3 +65,4 @@ a b 5 5 6 6 drop table t1, t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_insert_select.result b/mysql-test/suite/rpl/r/rpl_insert_select.result index 1aff39e0026..d98ae2538fa 100644 --- a/mysql-test/suite/rpl/r/rpl_insert_select.result +++ b/mysql-test/suite/rpl/r/rpl_insert_select.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create table t1 (n int not null primary key); insert into t1 values (1); create table t2 (n int); @@ -15,3 +11,4 @@ n 1 2 drop table t1,t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_invoked_features.result b/mysql-test/suite/rpl/r/rpl_invoked_features.result index be9169c785b..514483e7995 100644 --- a/mysql-test/suite/rpl/r/rpl_invoked_features.result +++ b/mysql-test/suite/rpl/r/rpl_invoked_features.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] USE test; DROP VIEW IF EXISTS v1,v11; DROP TABLE IF EXISTS t1,t2,t3,t11,t12,t13; @@ -447,3 +443,4 @@ DROP FUNCTION IF EXISTS f1; DROP FUNCTION IF EXISTS f2; DROP EVENT IF EXISTS e1; DROP EVENT IF EXISTS e11; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_ip_mix.result b/mysql-test/suite/rpl/r/rpl_ip_mix.result index ddd7a008a97..4d3999549b3 100644 --- a/mysql-test/suite/rpl/r/rpl_ip_mix.result +++ b/mysql-test/suite/rpl/r/rpl_ip_mix.result @@ -63,6 +63,4 @@ change master to master_host='127.0.0.1'; Master-Host: 127.0.0.1 change master to master_host='0:0:0:0:0:0:0:1'; Master-Host: 0:0:0:0:0:0:0:1 -disconnect slave; -disconnect master; -connection default; +CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root'; diff --git a/mysql-test/suite/rpl/r/rpl_ip_mix2.result b/mysql-test/suite/rpl/r/rpl_ip_mix2.result index e1011bf85ee..3f536fc3efd 100644 --- a/mysql-test/suite/rpl/r/rpl_ip_mix2.result +++ b/mysql-test/suite/rpl/r/rpl_ip_mix2.result @@ -63,6 +63,4 @@ change master to master_host='127.0.0.1'; Master-Host: 127.0.0.1 change master to master_host='0:0:0:0:0:0:0:1'; Master-Host: 0:0:0:0:0:0:0:1 -disconnect slave; -disconnect master; -connection default; +CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root'; diff --git a/mysql-test/suite/rpl/r/rpl_ipv4_as_ipv6.result b/mysql-test/suite/rpl/r/rpl_ipv4_as_ipv6.result index 0393cfa483c..e1a0c6d4772 100644 --- a/mysql-test/suite/rpl/r/rpl_ipv4_as_ipv6.result +++ b/mysql-test/suite/rpl/r/rpl_ipv4_as_ipv6.result @@ -105,6 +105,4 @@ change master to master_host='127.0.0.1'; Master-Host: 127.0.0.1 change master to master_host='0:0000:0000:0:0000:FFFF:127.0.0.1'; Master-Host: 0:0000:0000:0:0000:FFFF:127.0.0.1 -disconnect slave; -disconnect master; -connection default; +CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root'; diff --git a/mysql-test/suite/rpl/r/rpl_ipv6.result b/mysql-test/suite/rpl/r/rpl_ipv6.result index 6ae946d197b..04f0727b87f 100644 --- a/mysql-test/suite/rpl/r/rpl_ipv6.result +++ b/mysql-test/suite/rpl/r/rpl_ipv6.result @@ -60,6 +60,4 @@ change master to master_host='127.0.0.1'; Master-Host: 127.0.0.1 change master to master_host='0:0:0:0:0:0:0:1'; Master-Host: 0:0:0:0:0:0:0:1 -disconnect slave; -disconnect master; -connection default; +CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root'; diff --git a/mysql-test/suite/rpl/r/rpl_killed_ddl.result b/mysql-test/suite/rpl/r/rpl_killed_ddl.result index c3cde16b9d2..a02c9b599bf 100644 --- a/mysql-test/suite/rpl/r/rpl_killed_ddl.result +++ b/mysql-test/suite/rpl/r/rpl_killed_ddl.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP DATABASE IF EXISTS d1; DROP DATABASE IF EXISTS d2; DROP DATABASE IF EXISTS d3; @@ -59,62 +55,62 @@ CREATE VIEW v1 AS SELECT a FROM t1 WHERE a < 100; [on master1] CREATE DATABASE d2; source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc DROP DATABASE d1; source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc DROP DATABASE IF EXISTS d2; source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc CREATE EVENT e2 ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 DAY DO INSERT INTO test.t1 VALUES (2); source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc DROP EVENT e1; source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc DROP EVENT IF EXISTS e2; source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc CREATE FUNCTION f2 () RETURNS INT DETERMINISTIC RETURN 1; source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc ALTER FUNCTION f1 SQL SECURITY INVOKER; source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc DROP FUNCTION f1; source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc CREATE PROCEDURE p2 (OUT rows INT) BEGIN SELECT COUNT(*) INTO rows FROM t2; END; // source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc ALTER PROCEDURE p1 SQL SECURITY INVOKER COMMENT 'return rows of table t1'; source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc DROP PROCEDURE p1; source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc CREATE TABLE t2 (b int); source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc ALTER TABLE t1 ADD (d int); source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc RENAME TABLE t3 TO t4; source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc CREATE INDEX i2 on t1 (a); source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc DROP INDEX i1 on t1; source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc CREATE TABLE IF NOT EXISTS t4 (a int); CREATE TRIGGER tr2 BEFORE INSERT ON t4 FOR EACH ROW BEGIN @@ -122,28 +118,28 @@ DELETE FROM t1 WHERE a=NEW.a; END; // source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc DROP TRIGGER tr1; source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc DROP TRIGGER IF EXISTS tr2; source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc CREATE VIEW v2 AS SELECT a FROM t1 WHERE a > 100; source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc DROP VIEW v1; source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc DROP VIEW IF EXISTS v2; source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc DROP TABLE t1; source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc DROP TABLE IF EXISTS t2; source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc DROP DATABASE IF EXISTS d1; DROP DATABASE IF EXISTS d2; DROP DATABASE IF EXISTS d3; @@ -168,3 +164,4 @@ DROP PROCEDURE IF EXISTS p1; DROP PROCEDURE IF EXISTS p2; DROP PROCEDURE IF EXISTS p3; DROP PROCEDURE IF EXISTS p4; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_known_bugs_detection.result b/mysql-test/suite/rpl/r/rpl_known_bugs_detection.result index daefee9c669..2e6919ef813 100644 --- a/mysql-test/suite/rpl/r/rpl_known_bugs_detection.result +++ b/mysql-test/suite/rpl/r/rpl_known_bugs_detection.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY AUTO_INCREMENT, b INT, UNIQUE(b)); INSERT INTO t1(b) VALUES(1),(1),(2) ON DUPLICATE KEY UPDATE t1.b=10; @@ -11,14 +7,17 @@ SELECT * FROM t1; a b 1 10 2 2 -Last_SQL_Error = Error 'master may suffer from http://bugs.mysql.com/bug.php?id=24432 so slave stops; check error log on slave for more info' on query. Default database: 'test'. Query: 'INSERT INTO t1(b) VALUES(1),(1),(2) ON DUPLICATE KEY UPDATE t1.b=10' +include/wait_for_slave_sql_error.inc [errno=1105] +Last_SQL_Error = 'Error 'master may suffer from http://bugs.mysql.com/bug.php?id=24432 so slave stops; check error log on slave for more info' on query. Default database: 'test'. Query: 'INSERT INTO t1(b) VALUES(1),(1),(2) ON DUPLICATE KEY UPDATE t1.b=10'' SELECT * FROM t1; a b stop slave; +include/wait_for_slave_to_stop.inc reset slave; reset master; drop table t1; start slave; +include/wait_for_slave_to_start.inc CREATE TABLE t1 ( id bigint(20) unsigned NOT NULL auto_increment, field_1 int(10) unsigned NOT NULL, @@ -56,12 +55,16 @@ id field_1 field_2 field_3 4 4 d 4d 5 5 e 5e 6 6 f 6f -Last_SQL_Error = Error 'master may suffer from http://bugs.mysql.com/bug.php?id=24432 so slave stops; check error log on slave for more info' on query. Default database: 'test'. Query: 'INSERT INTO t1 (field_1, field_2, field_3) +include/wait_for_slave_sql_error.inc [errno=1105] +Last_SQL_Error = 'Error 'master may suffer from http://bugs.mysql.com/bug.php?id=24432 so slave stops; check error log on slave for more info' on query. Default database: 'test'. Query: 'INSERT INTO t1 (field_1, field_2, field_3) SELECT t2.field_a, t2.field_b, t2.field_c FROM t2 ON DUPLICATE KEY UPDATE -t1.field_3 = t2.field_c' +t1.field_3 = t2.field_c'' SELECT * FROM t1; id field_1 field_2 field_3 drop table t1, t2; drop table t1, t2; +include/stop_slave_io.inc +RESET SLAVE; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_loaddata.result b/mysql-test/suite/rpl/r/rpl_loaddata.result index 32ec2e624e2..41c36414c75 100644 --- a/mysql-test/suite/rpl/r/rpl_loaddata.result +++ b/mysql-test/suite/rpl/r/rpl_loaddata.result @@ -1,10 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -reset master; +include/master-slave.inc +[connection master] select last_insert_id(); last_insert_id() 0 @@ -32,32 +27,27 @@ drop table t3; create table t1(a int, b int, unique(b)); insert into t1 values(1,10); load data infile '../../std_data/rpl_loaddata.dat' into table t1; -set global sql_slave_skip_counter=1; -start slave; -Last_SQL_Errno=0 -Last_SQL_Error - +include/wait_for_slave_sql_error_and_skip.inc [errno=1062] +include/check_slave_no_error.inc set sql_log_bin=0; delete from t1; set sql_log_bin=1; load data infile '../../std_data/rpl_loaddata.dat' into table t1; -stop slave; +include/wait_for_slave_sql_error.inc [errno=1062] +include/stop_slave_io.inc change master to master_user='test'; change master to master_user='root'; -Last_SQL_Errno=0 -Last_SQL_Error - +include/check_slave_no_error.inc set global sql_slave_skip_counter=1; start slave; set sql_log_bin=0; delete from t1; set sql_log_bin=1; load data infile '../../std_data/rpl_loaddata.dat' into table t1; +include/wait_for_slave_sql_error.inc [errno=1062] stop slave; reset slave; -Last_SQL_Errno=0 -Last_SQL_Error - +include/check_slave_no_error.inc reset master; create table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60), unique(day)) engine=MyISAM; @@ -80,18 +70,14 @@ load data infile '../../std_data/rpl_loaddata2.dat' into table t2 fields terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by '\n##\n' starting by '>' ignore 1 lines; ERROR 23000: Duplicate entry '2003-03-22' for key 'day' +include/wait_for_slave_sql_error.inc [errno=0] drop table t1, t2; drop table t1, t2; CREATE TABLE t1 (word CHAR(20) NOT NULL PRIMARY KEY) ENGINE=INNODB; LOAD DATA INFILE "../../std_data/words.dat" INTO TABLE t1; ERROR 23000: Duplicate entry 'Aarhus' for key 'PRIMARY' -DROP TABLE IF EXISTS t1; -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +DROP TABLE t1; +include/rpl_reset.inc drop database if exists b48297_db1; drop database if exists b42897_db2; create database b48297_db1; @@ -112,15 +98,10 @@ LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/std_data/loaddata5.dat' INTO TABLE t1; LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/std_data/loaddata5.dat' INTO TABLE b48297_db1.t1; ### disconnect and switch back to master connection use b48297_db1; -Comparing tables master:b48297_db1.t1 and slave:b48297_db1.t1 +include/diff_tables.inc [master:b48297_db1.t1, slave:b48297_db1.t1] DROP DATABASE b48297_db1; DROP DATABASE b42897_db2; -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc use test; CREATE TABLE t1 (`key` TEXT, `text` TEXT); LOAD DATA INFILE '../../std_data/loaddata2.dat' REPLACE INTO TABLE `t1` FIELDS TERMINATED BY ','; @@ -132,3 +113,4 @@ Field 3 'Field 4' 'Field 5' 'Field 6' Field 6 'Field 7' DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_loaddata_charset.result b/mysql-test/suite/rpl/r/rpl_loaddata_charset.result index e0971b84e3d..6b60bffa365 100644 --- a/mysql-test/suite/rpl/r/rpl_loaddata_charset.result +++ b/mysql-test/suite/rpl/r/rpl_loaddata_charset.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create table t1 (a varchar(10) character set utf8); load data infile '../../std_data/loaddata6.dat' into table t1; set @@character_set_database=koi8r; @@ -76,3 +72,4 @@ E4B880E4BA8CE4B889 E59B9BE4BA94E585AD E4B883E585ABE4B99D DROP DATABASE mysqltest; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_loaddata_fatal.result b/mysql-test/suite/rpl/r/rpl_loaddata_fatal.result index 9acc1ad93ac..a81813de19f 100644 --- a/mysql-test/suite/rpl/r/rpl_loaddata_fatal.result +++ b/mysql-test/suite/rpl/r/rpl_loaddata_fatal.result @@ -1,14 +1,9 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CREATE TABLE t1 (a INT, b INT); INSERT INTO t1 VALUES (1,10); LOAD DATA INFILE '../../std_data/rpl_loaddata.dat' INTO TABLE t1; ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Fatal error: Not enough memory -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1593] +Last_SQL_Error = 'Fatal error: Not enough memory' DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_loaddata_m.result b/mysql-test/suite/rpl/r/rpl_loaddata_m.result index 4639c717cea..c34021b1fef 100644 --- a/mysql-test/suite/rpl/r/rpl_loaddata_m.result +++ b/mysql-test/suite/rpl/r/rpl_loaddata_m.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] drop database if exists mysqltest; USE test; CREATE TABLE t1(a INT, b INT, UNIQUE(b)); @@ -38,3 +34,4 @@ COUNT(*) 2 DROP DATABASE mysqltest; DROP TABLE test.t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_loaddata_map.result b/mysql-test/suite/rpl/r/rpl_loaddata_map.result index 0588ae657ab..38e553e0117 100644 --- a/mysql-test/suite/rpl/r/rpl_loaddata_map.result +++ b/mysql-test/suite/rpl/r/rpl_loaddata_map.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] ==== Create a big file ==== ==== Load our big file into a table ==== create table t2 (id int not null primary key auto_increment); @@ -31,3 +27,4 @@ count(*) ==== Clean up ==== [on master] drop table t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_loaddata_s.result b/mysql-test/suite/rpl/r/rpl_loaddata_s.result index 779a3af9631..351c5b584c5 100644 --- a/mysql-test/suite/rpl/r/rpl_loaddata_s.result +++ b/mysql-test/suite/rpl/r/rpl_loaddata_s.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] reset master; create table test.t1(a int, b int, unique(b)); load data infile '../../std_data/rpl_loaddata.dat' into table test.t1; @@ -13,3 +9,4 @@ count(*) show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info drop table test.t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_loaddata_simple.result b/mysql-test/suite/rpl/r/rpl_loaddata_simple.result index 5e3923616ed..24a1a35470d 100644 --- a/mysql-test/suite/rpl/r/rpl_loaddata_simple.result +++ b/mysql-test/suite/rpl/r/rpl_loaddata_simple.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CREATE TABLE t1 (word CHAR(20) NOT NULL); LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE t1; SELECT * FROM t1 ORDER BY word; @@ -151,3 +147,4 @@ Abernathy aberrant aberration drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_loaddata_symlink.result b/mysql-test/suite/rpl/r/rpl_loaddata_symlink.result index c7806f5ecce..c3b3c2232a6 100644 --- a/mysql-test/suite/rpl/r/rpl_loaddata_symlink.result +++ b/mysql-test/suite/rpl/r/rpl_loaddata_symlink.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create table t1(a int not null auto_increment, b int, primary key(a) ); load data infile '../../std_data/rpl_loaddata.dat' into table t1; select * from t1; @@ -15,3 +11,4 @@ a b 1 10 2 15 drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_loaddatalocal.result b/mysql-test/suite/rpl/r/rpl_loaddatalocal.result index 6dccaa3d74c..37936871993 100644 --- a/mysql-test/suite/rpl/r/rpl_loaddatalocal.result +++ b/mysql-test/suite/rpl/r/rpl_loaddatalocal.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create table t1(a int); select * into outfile 'MYSQLD_DATADIR/rpl_loaddatalocal.select_outfile' from t1; truncate table t1; @@ -82,3 +78,4 @@ LOAD DATA LOCAL INFILE 'MYSQLD_DATADIR/bug43746.sql' INTO TABLE t1; DROP TABLE t1; SET SESSION sql_mode=@old_mode; [slave] +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_loadfile.result b/mysql-test/suite/rpl/r/rpl_loadfile.result index 22f65c0b5e5..640d1f72bf5 100644 --- a/mysql-test/suite/rpl/r/rpl_loadfile.result +++ b/mysql-test/suite/rpl/r/rpl_loadfile.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP PROCEDURE IF EXISTS test.p1; DROP TABLE IF EXISTS test.t1; CREATE TABLE test.t1 (a INT, blob_column LONGBLOB, PRIMARY KEY(a)); @@ -225,11 +221,7 @@ aberration DROP PROCEDURE IF EXISTS test.p1; DROP TABLE test.t1; -**** Resetting master and slave **** -include/stop_slave.inc -RESET SLAVE; -RESET MASTER; -include/start_slave.inc +include/rpl_reset.inc SELECT repeat('x',20) INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/bug_39701.data'; DROP TABLE IF EXISTS t1; CREATE TABLE t1 (t text); @@ -240,6 +232,7 @@ END| include/stop_slave.inc CALL p('MYSQLTEST_VARDIR/tmp/bug_39701.data'); include/start_slave.inc -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DROP TABLE t1; DROP PROCEDURE p; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_locale.result b/mysql-test/suite/rpl/r/rpl_locale.result index b7396084663..1f6bd40cd16 100644 --- a/mysql-test/suite/rpl/r/rpl_locale.result +++ b/mysql-test/suite/rpl/r/rpl_locale.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create table t1 (s1 char(10)); set lc_time_names= 'de_DE'; insert into t1 values (date_format('2001-01-01','%W')); @@ -18,3 +14,4 @@ s1 Montag Monday drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_log_pos.result b/mysql-test/suite/rpl/r/rpl_log_pos.result index 9cbe22bfa56..b2224dcd725 100644 --- a/mysql-test/suite/rpl/r/rpl_log_pos.result +++ b/mysql-test/suite/rpl/r/rpl_log_pos.result @@ -1,19 +1,16 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] call mtr.add_suppression ("Slave I/O: Got fatal error 1236 from master when reading data from binary"); show master status; File Position Binlog_Do_DB Binlog_Ignore_DB master-bin.000001 # include/stop_slave.inc change master to master_log_pos=MASTER_LOG_POS; -Read_Master_Log_Pos 75 +Read_Master_Log_Pos = '75' start slave; -Last_IO_Error = Got fatal error 1236 from master when reading data from binary log: 'binlog truncated in the middle of event' -include/stop_slave.inc +include/wait_for_slave_io_error.inc [errno=1236] +Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'binlog truncated in the middle of event'' +include/stop_slave_sql.inc show master status; File Position Binlog_Do_DB Binlog_Ignore_DB master-bin.000001 # @@ -30,3 +27,4 @@ n 3 drop table t1; End of 5.0 tests +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_manual_change_index_file.result b/mysql-test/suite/rpl/r/rpl_manual_change_index_file.result index 9061abca477..23238d9c97b 100644 --- a/mysql-test/suite/rpl/r/rpl_manual_change_index_file.result +++ b/mysql-test/suite/rpl/r/rpl_manual_change_index_file.result @@ -1,21 +1,18 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] FLUSH LOGS; CREATE TABLE t1(c1 INT); FLUSH LOGS; call mtr.add_suppression('Got fatal error 1236 from master when reading data from binary log: .*could not find next log'); -Last_IO_Error -Got fatal error 1236 from master when reading data from binary log: 'could not find next log' +include/wait_for_slave_io_error.inc [errno=1236] +Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'could not find next log'' CREATE TABLE t2(c1 INT); FLUSH LOGS; CREATE TABLE t3(c1 INT); FLUSH LOGS; CREATE TABLE t4(c1 INT); START SLAVE IO_THREAD; +include/wait_for_slave_io_to_start.inc SHOW TABLES; Tables_in_test t1 @@ -23,3 +20,4 @@ t2 t3 t4 DROP TABLE t1, t2, t3, t4; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_many_optimize.result b/mysql-test/suite/rpl/r/rpl_many_optimize.result index b2148892591..53be9b48c7b 100644 --- a/mysql-test/suite/rpl/r/rpl_many_optimize.result +++ b/mysql-test/suite/rpl/r/rpl_many_optimize.result @@ -1,9 +1,6 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create table t1 (a int not null auto_increment primary key, b int, key(b)); INSERT INTO t1 (a) VALUES (1),(2); drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_master_pos_wait.result b/mysql-test/suite/rpl/r/rpl_master_pos_wait.result index edcae6e7506..bf4347757f7 100644 --- a/mysql-test/suite/rpl/r/rpl_master_pos_wait.result +++ b/mysql-test/suite/rpl/r/rpl_master_pos_wait.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] select master_pos_wait('master-bin.999999',0,2); master_pos_wait('master-bin.999999',0,2) -1 @@ -22,3 +18,4 @@ show slave status; select master_pos_wait('foo', 98); master_pos_wait('foo', 98) NULL +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_misc_functions.result b/mysql-test/suite/rpl/r/rpl_misc_functions.result index 8e39aa0135a..61006ecd714 100644 --- a/mysql-test/suite/rpl/r/rpl_misc_functions.result +++ b/mysql-test/suite/rpl/r/rpl_misc_functions.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CALL mtr.add_suppression('Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT'); create table t1(id int, i int, r1 int, r2 int, p varchar(100)); insert into t1 values(1, connection_id(), 0, 0, ""); @@ -54,3 +50,4 @@ DROP TABLE t1, t1_slave; DROP PROCEDURE test_replication_sp1; DROP PROCEDURE test_replication_sp2; DROP FUNCTION test_replication_sf; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_mix_found_rows.result b/mysql-test/suite/rpl/r/rpl_mix_found_rows.result index a3bc1934a70..40e80e23047 100644 --- a/mysql-test/suite/rpl/r/rpl_mix_found_rows.result +++ b/mysql-test/suite/rpl/r/rpl_mix_found_rows.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] ==== Initialize ==== **** On Master **** CREATE TABLE t1 (a INT); @@ -136,3 +132,4 @@ DROP PROCEDURE just_log; DROP PROCEDURE log_me; DROP PROCEDURE log_me_inner; DROP FUNCTION log_rows; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_mix_insert_delayed.result b/mysql-test/suite/rpl/r/rpl_mix_insert_delayed.result index b336fc12d42..15fb7ea6f71 100644 --- a/mysql-test/suite/rpl/r/rpl_mix_insert_delayed.result +++ b/mysql-test/suite/rpl/r/rpl_mix_insert_delayed.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CREATE SCHEMA IF NOT EXISTS mysqlslap; USE mysqlslap; select @@global.binlog_format; @@ -60,3 +56,4 @@ drop table t1; FLUSH LOGS; FLUSH LOGS; End of 5.0 tests +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_mixed_binlog_max_cache_size.result b/mysql-test/suite/rpl/r/rpl_mixed_binlog_max_cache_size.result index c7f2ffab47a..fb4d1e1ba44 100644 --- a/mysql-test/suite/rpl/r/rpl_mixed_binlog_max_cache_size.result +++ b/mysql-test/suite/rpl/r/rpl_mixed_binlog_max_cache_size.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); SET GLOBAL max_binlog_cache_size = 4096; SET GLOBAL binlog_cache_size = 4096; @@ -19,14 +15,11 @@ CREATE TABLE t3(a INT PRIMARY KEY, data VARCHAR(30000)) ENGINE=Innodb; Got one of the listed errors *** Single statement on non-transactional table *** Got one of the listed errors ---source include/wait_for_slave_sql_error_and_skip.inc -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1590] *** Single statement on both transactional and non-transactional tables. *** Got one of the listed errors ---source include/wait_for_slave_sql_error_and_skip.inc -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1590] +include/diff_tables.inc [master:t1,slave:t1] ######################################################################################## # 2 - BEGIN - IMPLICIT COMMIT by DDL ######################################################################################## @@ -43,7 +36,7 @@ Got one of the listed errors BEGIN; Got one of the listed errors Got one of the listed errors -source include/diff_master_slave.inc; +include/diff_tables.inc [master:t1,slave:t1] ######################################################################################## # 3 - BEGIN - COMMIT ######################################################################################## @@ -55,7 +48,7 @@ Got one of the listed errors Got one of the listed errors Got one of the listed errors COMMIT; -source include/diff_master_slave.inc; +include/diff_tables.inc [master:t1,slave:t1] ######################################################################################## # 4 - BEGIN - ROLLBACK ######################################################################################## @@ -69,7 +62,7 @@ Got one of the listed errors ROLLBACK; Warnings: Warning 1196 Some non-transactional changed tables couldn't be rolled back -source include/diff_master_slave.inc; +include/diff_tables.inc [master:t1,slave:t1] ######################################################################################## # 5 - PROCEDURE ######################################################################################## @@ -93,7 +86,7 @@ TRUNCATE TABLE t1; BEGIN; Got one of the listed errors ROLLBACK; -source include/diff_master_slave.inc; +include/diff_tables.inc [master:t1,slave:t1] ######################################################################################## # 6 - XID ######################################################################################## @@ -108,7 +101,7 @@ ROLLBACK TO sv; Warnings: Warning 1196 Some non-transactional changed tables couldn't be rolled back COMMIT; -source include/diff_master_slave.inc; +include/diff_tables.inc [master:t1,slave:t1] ######################################################################################## # 7 - NON-TRANS TABLE ######################################################################################## @@ -123,7 +116,7 @@ COMMIT; BEGIN; Got one of the listed errors COMMIT; -source include/diff_master_slave.inc; +include/diff_tables.inc [master:t1,slave:t1] ######################################################################## # 8 - Bug#55375(Regression Bug) Transaction bigger than # max_binlog_cache_size crashes slave @@ -146,6 +139,7 @@ SET GLOBAL binlog_stmt_cache_size= ORIGINAL_VALUE; BEGIN; Repeat statement 'INSERT INTO t1 VALUES($n, repeat("a", 32))' 128 times COMMIT; +include/wait_for_slave_sql_error.inc [errno=1197] SELECT count(*) FROM t1; count(*) 0 @@ -167,8 +161,6 @@ DROP TABLE t1; DROP TABLE t2; DROP TABLE t3; DROP TABLE IF EXISTS t4; -DROP TABLE IF EXISTS t5; -DROP TABLE IF EXISTS t6; -Warnings: -Note 1051 Unknown table 't6' +DROP TABLE t5; DROP PROCEDURE p1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_mixed_bit_pk.result b/mysql-test/suite/rpl/r/rpl_mixed_bit_pk.result index f1b0b2ae5cb..2b5b31201cb 100644 --- a/mysql-test/suite/rpl/r/rpl_mixed_bit_pk.result +++ b/mysql-test/suite/rpl/r/rpl_mixed_bit_pk.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8; CREATE TABLE t1 (`bit_key` bit, `bit` bit, key (`bit_key` )) ENGINE=MyISAM; CREATE TABLE t2 (`bit_key` bit(4), `bit` bit, key (`bit_key` )) ENGINE=MyISAM; @@ -30,3 +26,4 @@ DELETE FROM `t7` WHERE `bit` < 2 LIMIT 4; INSERT INTO `t8` ( `bit` ) VALUES ( 0 ); DELETE FROM `t8` WHERE `bit` < 2 LIMIT 4; DROP TABLE t1, t2, t3, t4, t5, t6, t7, t8; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_mixed_ddl_dml.result b/mysql-test/suite/rpl/r/rpl_mixed_ddl_dml.result index a353ee73d3f..99c5846cea0 100644 --- a/mysql-test/suite/rpl/r/rpl_mixed_ddl_dml.result +++ b/mysql-test/suite/rpl/r/rpl_mixed_ddl_dml.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create table t1 (n int auto_increment primary key); set insert_id = 2000; insert into t1 values (NULL),(NULL),(NULL); @@ -17,6 +13,7 @@ Server_id Host Port Master_id 2 127.0.0.1 9999 1 drop table t1; stop slave; +include/wait_for_slave_to_stop.inc create table t2(id int auto_increment primary key, created datetime); set timestamp=12345; insert into t2 set created=now(); @@ -27,6 +24,7 @@ create table t3 like t2; create temporary table t4 like t2; create table t5 select * from t4; start slave; +include/wait_for_slave_to_start.inc select * from t2; id created 1 1970-01-01 06:25:45 @@ -44,3 +42,4 @@ t5 CREATE TABLE `t5` ( `created` datetime DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t2,t3,t5; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_mixed_drop_create_temp_table.result b/mysql-test/suite/rpl/r/rpl_mixed_drop_create_temp_table.result index b749778bcc2..541234fb5af 100644 --- a/mysql-test/suite/rpl/r/rpl_mixed_drop_create_temp_table.result +++ b/mysql-test/suite/rpl/r/rpl_mixed_drop_create_temp_table.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] ######################################################################### # CONFIGURATION ######################################################################### @@ -1563,3 +1559,4 @@ DROP TABLE IF EXISTS nt_1; DROP TABLE IF EXISTS tt_2; DROP TABLE IF EXISTS tt_1; SET @commands= ''; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_mixed_implicit_commit_binlog.result b/mysql-test/suite/rpl/r/rpl_mixed_implicit_commit_binlog.result index 47ce547fcac..baeefe7c6ea 100644 --- a/mysql-test/suite/rpl/r/rpl_mixed_implicit_commit_binlog.result +++ b/mysql-test/suite/rpl/r/rpl_mixed_implicit_commit_binlog.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] ######################################################################### # CONFIGURATION ######################################################################### @@ -524,10 +520,8 @@ master-bin.000001 # Query # # DROP DATABASE IF EXISTS db ################################################################################### # CHECK CONSISTENCY ################################################################################### -Comparing tables master:test.tt_1 and slave:test.tt_1 +include/diff_tables.inc [master:tt_1,slave:tt_1] ################################################################################### # CLEAN ################################################################################### -DROP TABLE tt_1; -DROP TABLE tt_2; -DROP TABLE nt_1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_mixed_mixing_engines.result b/mysql-test/suite/rpl/r/rpl_mixed_mixing_engines.result index 5e42ca3d6da..5982d439a3e 100644 --- a/mysql-test/suite/rpl/r/rpl_mixed_mixing_engines.result +++ b/mysql-test/suite/rpl/r/rpl_mixed_mixing_engines.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] ######################################################################### # CONFIGURATION ######################################################################### @@ -11561,3 +11557,4 @@ master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `tt_xx_ ################################################################################### # CLEAN ################################################################################### +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_multi_delete.result b/mysql-test/suite/rpl/r/rpl_multi_delete.result index 4831502eb88..ea1d87a3960 100644 --- a/mysql-test/suite/rpl/r/rpl_multi_delete.result +++ b/mysql-test/suite/rpl/r/rpl_multi_delete.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create table t1 (a int primary key); create table t2 (a int); insert into t1 values (1); @@ -20,3 +16,4 @@ select * from t2; a 1 drop table t1,t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_multi_delete2.result b/mysql-test/suite/rpl/r/rpl_multi_delete2.result index 8e6a6a3d4d0..c693a43a550 100644 --- a/mysql-test/suite/rpl/r/rpl_multi_delete2.result +++ b/mysql-test/suite/rpl/r/rpl_multi_delete2.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] set sql_log_bin=0; create database mysqltest_from; set sql_log_bin=1; @@ -42,3 +38,4 @@ set sql_log_bin=0; drop database mysqltest_from; set sql_log_bin=1; drop database mysqltest_to; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_multi_engine.result b/mysql-test/suite/rpl/r/rpl_multi_engine.result index e26777c15ce..7815fa88c93 100644 --- a/mysql-test/suite/rpl/r/rpl_multi_engine.result +++ b/mysql-test/suite/rpl/r/rpl_multi_engine.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] drop table if exists t1; CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, f FLOAT DEFAULT @@ -360,3 +356,4 @@ id hex(b1) vc bc d f total y t select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; id hex(b1) vc bc d f total y t DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_multi_update.result b/mysql-test/suite/rpl/r/rpl_multi_update.result index 524278be042..8634e86afed 100644 --- a/mysql-test/suite/rpl/r/rpl_multi_update.result +++ b/mysql-test/suite/rpl/r/rpl_multi_update.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CREATE TABLE t1 ( a int unsigned not null auto_increment primary key, b int unsigned @@ -25,3 +21,4 @@ a b 2 1 UPDATE t1, t2 SET t1.b = t2.b WHERE t1.a = t2.a; drop table t1, t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_multi_update2.result b/mysql-test/suite/rpl/r/rpl_multi_update2.result index 5bb262764fa..a3cab693322 100644 --- a/mysql-test/suite/rpl/r/rpl_multi_update2.result +++ b/mysql-test/suite/rpl/r/rpl_multi_update2.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] drop table if exists t1,t2; CREATE TABLE t1 ( a int unsigned not null auto_increment primary key, @@ -53,3 +49,4 @@ select * from t1; a 3 drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_multi_update3.result b/mysql-test/suite/rpl/r/rpl_multi_update3.result index dba7f770ba2..6b9ec5c3947 100644 --- a/mysql-test/suite/rpl/r/rpl_multi_update3.result +++ b/mysql-test/suite/rpl/r/rpl_multi_update3.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] -------- Test for BUG#9361 -------- CREATE TABLE t1 ( @@ -195,3 +191,4 @@ idpro price nbprice 2 1.0000 2 3 2.0000 1 DROP TABLE t1, t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_multi_update4.result b/mysql-test/suite/rpl/r/rpl_multi_update4.result index f6dde65a35d..0c4857bed60 100644 --- a/mysql-test/suite/rpl/r/rpl_multi_update4.result +++ b/mysql-test/suite/rpl/r/rpl_multi_update4.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] drop database if exists d1; drop database if exists d2; drop database if exists d2; @@ -23,3 +19,4 @@ id 0 drop database d1; drop database d2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_mysql_upgrade.result b/mysql-test/suite/rpl/r/rpl_mysql_upgrade.result index 26c3e545293..632529ce2b9 100644 --- a/mysql-test/suite/rpl/r/rpl_mysql_upgrade.result +++ b/mysql-test/suite/rpl/r/rpl_mysql_upgrade.result @@ -1,14 +1,12 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); DROP DATABASE IF EXISTS `#mysql50#mysqltest-1`; CREATE DATABASE `#mysql50#mysqltest-1`; Master position is not changed STOP SLAVE SQL_THREAD; +include/wait_for_slave_sql_to_stop.inc Master position has been changed DROP DATABASE `mysqltest-1`; DROP DATABASE `#mysql50#mysqltest-1`; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_name_const.result b/mysql-test/suite/rpl/r/rpl_name_const.result index acb2684d2c8..89a48bad09b 100644 --- a/mysql-test/suite/rpl/r/rpl_name_const.result +++ b/mysql-test/suite/rpl/r/rpl_name_const.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] ==== Initialize ==== [on master] create table t1 (id int); @@ -26,3 +22,4 @@ id [on master] drop table t1; drop procedure test_procedure; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_non_direct_mixed_mixing_engines.result b/mysql-test/suite/rpl/r/rpl_non_direct_mixed_mixing_engines.result index 1f62ea7b100..9a72eba851f 100644 --- a/mysql-test/suite/rpl/r/rpl_non_direct_mixed_mixing_engines.result +++ b/mysql-test/suite/rpl/r/rpl_non_direct_mixed_mixing_engines.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] ######################################################################### # CONFIGURATION ######################################################################### @@ -11933,3 +11929,4 @@ master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `tt_xx_ ################################################################################### # CLEAN ################################################################################### +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_non_direct_row_mixing_engines.result b/mysql-test/suite/rpl/r/rpl_non_direct_row_mixing_engines.result index 7390d5fd316..4106dc93198 100644 --- a/mysql-test/suite/rpl/r/rpl_non_direct_row_mixing_engines.result +++ b/mysql-test/suite/rpl/r/rpl_non_direct_row_mixing_engines.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] ######################################################################### # CONFIGURATION ######################################################################### @@ -13801,3 +13797,4 @@ master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `tt_xx_ ################################################################################### # CLEAN ################################################################################### +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_non_direct_stm_mixing_engines.result b/mysql-test/suite/rpl/r/rpl_non_direct_stm_mixing_engines.result index 213a50f97ac..21031190660 100644 --- a/mysql-test/suite/rpl/r/rpl_non_direct_stm_mixing_engines.result +++ b/mysql-test/suite/rpl/r/rpl_non_direct_stm_mixing_engines.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] ######################################################################### # CONFIGURATION ######################################################################### @@ -11123,3 +11119,4 @@ master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `tt_xx_ ################################################################################### # CLEAN ################################################################################### +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_nondeterministic_functions.result b/mysql-test/suite/rpl/r/rpl_nondeterministic_functions.result index 1b7ac567936..ebbc657fcfd 100644 --- a/mysql-test/suite/rpl/r/rpl_nondeterministic_functions.result +++ b/mysql-test/suite/rpl/r/rpl_nondeterministic_functions.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CALL mtr.add_suppression('Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT'); CREATE TABLE t1 (a VARCHAR(1000)); INSERT INTO t1 VALUES (CONNECTION_ID()); @@ -23,5 +19,6 @@ INSERT INTO t1 VALUES (UTC_TIMESTAMP()); INSERT INTO t1 VALUES (RAND()); INSERT INTO t1 VALUES (LAST_INSERT_ID()); -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_not_null_innodb.result b/mysql-test/suite/rpl/r/rpl_not_null_innodb.result index b09fbab905a..1eaeaba05bb 100644 --- a/mysql-test/suite/rpl/r/rpl_not_null_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_not_null_innodb.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] SET SQL_LOG_BIN= 0; CREATE TABLE t1(`a` INT, `b` DATE DEFAULT NULL, `c` INT DEFAULT NULL, @@ -45,8 +41,8 @@ INSERT INTO t4(a,c) VALUES (4, 4); INSERT INTO t4(a) VALUES (5); ************* SHOWING THE RESULT SETS WITH INSERTS ************* TABLES t1 and t2 must be equal otherwise an error will be thrown. -Comparing tables master:test.t1 and slave:test.t1 -Comparing tables master:test.t2 and slave:test.t2 +include/diff_tables.inc [master:t1, slave:t1] +include/diff_tables.inc [master:t2, slave:t2] TABLES t2 and t3 must be different. SELECT * FROM t3 ORDER BY a; a b @@ -80,7 +76,7 @@ UPDATE t1 set b= NULL, c= 300 where a= 1; REPLACE INTO t1(a,b,c) VALUES (2, NULL, 300); ************* SHOWING THE RESULT SETS WITH UPDATES and REPLACES ************* TABLES t1 and t2 must be equal otherwise an error will be thrown. -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] ************* CLEANING ************* DROP TABLE t1; DROP TABLE t2; @@ -122,7 +118,7 @@ UPDATE t1 set b= NULL, c= b'00' where a= 1; REPLACE INTO t1(a,b,c) VALUES (2, NULL, b'00'); ************* SHOWING THE RESULT SETS WITH UPDATES and REPLACES ************* TABLES t1 and t2 must be equal otherwise an error will be thrown. -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DROP TABLE t1; ################################################################################ # NULL ---> NOT NULL (STRICT MODE) @@ -200,3 +196,4 @@ a b c DROP TABLE t1; DROP TABLE t2; DROP TABLE t3; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_not_null_myisam.result b/mysql-test/suite/rpl/r/rpl_not_null_myisam.result index 09611dc6480..ec17e3bfafa 100644 --- a/mysql-test/suite/rpl/r/rpl_not_null_myisam.result +++ b/mysql-test/suite/rpl/r/rpl_not_null_myisam.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] SET SQL_LOG_BIN= 0; CREATE TABLE t1(`a` INT, `b` DATE DEFAULT NULL, `c` INT DEFAULT NULL, @@ -45,8 +41,8 @@ INSERT INTO t4(a,c) VALUES (4, 4); INSERT INTO t4(a) VALUES (5); ************* SHOWING THE RESULT SETS WITH INSERTS ************* TABLES t1 and t2 must be equal otherwise an error will be thrown. -Comparing tables master:test.t1 and slave:test.t1 -Comparing tables master:test.t2 and slave:test.t2 +include/diff_tables.inc [master:t1, slave:t1] +include/diff_tables.inc [master:t2, slave:t2] TABLES t2 and t3 must be different. SELECT * FROM t3 ORDER BY a; a b @@ -80,7 +76,7 @@ UPDATE t1 set b= NULL, c= 300 where a= 1; REPLACE INTO t1(a,b,c) VALUES (2, NULL, 300); ************* SHOWING THE RESULT SETS WITH UPDATES and REPLACES ************* TABLES t1 and t2 must be equal otherwise an error will be thrown. -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] ************* CLEANING ************* DROP TABLE t1; DROP TABLE t2; @@ -122,7 +118,7 @@ UPDATE t1 set b= NULL, c= b'00' where a= 1; REPLACE INTO t1(a,b,c) VALUES (2, NULL, b'00'); ************* SHOWING THE RESULT SETS WITH UPDATES and REPLACES ************* TABLES t1 and t2 must be equal otherwise an error will be thrown. -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DROP TABLE t1; ################################################################################ # NULL ---> NOT NULL (STRICT MODE) @@ -200,3 +196,4 @@ a b c DROP TABLE t1; DROP TABLE t2; DROP TABLE t3; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_optimize.result b/mysql-test/suite/rpl/r/rpl_optimize.result index 79891169fbc..b606e47a55f 100644 --- a/mysql-test/suite/rpl/r/rpl_optimize.result +++ b/mysql-test/suite/rpl/r/rpl_optimize.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create table t1 (a int not null auto_increment primary key, b int, key(b)); INSERT INTO t1 (a) VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); INSERT INTO t1 (a) SELECT null FROM t1; @@ -25,3 +21,4 @@ optimize table t1; Table Op Msg_type Msg_text test.t1 optimize status OK drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_packet.result b/mysql-test/suite/rpl/r/rpl_packet.result index 1ec9259a1fb..9239a718504 100644 --- a/mysql-test/suite/rpl/r/rpl_packet.result +++ b/mysql-test/suite/rpl/r/rpl_packet.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] call mtr.add_suppression("Slave I/O: Got a packet bigger than 'max_allowed_packet' bytes, Error_code: 1153"); call mtr.add_suppression("Slave I/O: Got fatal error 1236 from master when reading data from binary log:"); drop database if exists DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________; @@ -33,22 +29,15 @@ include/stop_slave.inc include/start_slave.inc CREATE TABLE `t1` (`f1` LONGTEXT) ENGINE=MyISAM; INSERT INTO `t1`(`f1`) VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa2048'); -Slave_IO_Running = No (expect No) -SELECT "Got a packet bigger than 'max_allowed_packet' bytes" AS Last_IO_Error; -Last_IO_Error -Got a packet bigger than 'max_allowed_packet' bytes -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/wait_for_slave_io_error.inc [errno=1153] +Last_IO_Error = 'Got a packet bigger than 'max_allowed_packet' bytes' +include/stop_slave_sql.inc +include/rpl_reset.inc +DROP TABLE t1; CREATE TABLE t1 (f1 int PRIMARY KEY, f2 LONGTEXT, f3 LONGTEXT) ENGINE=MyISAM; INSERT INTO t1(f1, f2, f3) VALUES(1, REPEAT('a', @@global.max_allowed_packet), REPEAT('b', @@global.max_allowed_packet)); -Slave_IO_Running = No (expect No) -SELECT "Got fatal error 1236 from master when reading data from binary log: 'log event entry exceeded max_allowed_packet; Increase max_allowed_packet on master'" AS Last_IO_Error; -Last_IO_Error -Got fatal error 1236 from master when reading data from binary log: 'log event entry exceeded max_allowed_packet; Increase max_allowed_packet on master' +include/wait_for_slave_io_error.inc [errno=1236] +Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'log event entry exceeded max_allowed_packet; Increase max_allowed_packet on master'' STOP SLAVE; RESET SLAVE; RESET MASTER; @@ -62,3 +51,5 @@ DROP TABLE t1; SET @@global.max_allowed_packet= 1024; SET @@global.net_buffer_length= 1024; DROP TABLE t1; +RESET SLAVE; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_plugin_load.result b/mysql-test/suite/rpl/r/rpl_plugin_load.result index 43e171a97c9..b33e29ef668 100644 --- a/mysql-test/suite/rpl/r/rpl_plugin_load.result +++ b/mysql-test/suite/rpl/r/rpl_plugin_load.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] Verify that example engine is not installed. SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE ENGINE='EXAMPLE'; ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS @@ -33,4 +29,5 @@ Delta Verify that example engine is not installed. SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE ENGINE='EXAMPLE'; ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS +include/rpl_end.inc End of test diff --git a/mysql-test/suite/rpl/r/rpl_ps.result b/mysql-test/suite/rpl/r/rpl_ps.result index 89e822b3eb6..ca46f373610 100644 --- a/mysql-test/suite/rpl/r/rpl_ps.result +++ b/mysql-test/suite/rpl/r/rpl_ps.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] drop table if exists t1; create table t1(n char(30)); prepare stmt1 from 'insert into t1 values (?)'; @@ -26,6 +22,7 @@ from-master-2-'', from-var-from-master-3 drop table t1; stop slave; +include/wait_for_slave_to_stop.inc ######################################################################## # @@ -33,49 +30,22 @@ stop slave; # statement breaks binlog. # ######################################################################## - # Connection: slave - - START SLAVE; - # Connection: master - - CREATE DATABASE mysqltest1; CREATE TABLE t1(db_name CHAR(32), db_col_name CHAR(32)); - PREPARE stmt_d_1 FROM 'INSERT INTO t1 VALUES(DATABASE(), @@collation_database)'; - EXECUTE stmt_d_1; - use mysqltest1; - EXECUTE stmt_d_1; - - # Connection: slave - - SELECT * FROM t1; db_name db_col_name test latin1_swedish_ci test latin1_swedish_ci - # Connection: master - - DROP DATABASE mysqltest1; - use test; DROP TABLE t1; - - -# Connection: slave - - -STOP SLAVE; - -######################################################################## -reset master; -reset slave; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result b/mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result index 7f43869c3b7..e41c16110dc 100644 --- a/mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result +++ b/mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] **** On Master **** CREATE TABLE t1 (a INT, b LONG); INSERT INTO t1 VALUES (1,1), (2,2); @@ -30,3 +26,4 @@ slave-bin.000001 # Table_map # # table_id: # (test.t1) slave-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F slave-bin.000001 # Query # # COMMIT DROP TABLE IF EXISTS t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_read_only.result b/mysql-test/suite/rpl/r/rpl_read_only.result index 971b20fcf3a..f75ddd62d76 100644 --- a/mysql-test/suite/rpl/r/rpl_read_only.result +++ b/mysql-test/suite/rpl/r/rpl_read_only.result @@ -1,10 +1,6 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -call mtr.add_suppression("Unsafe statement written to the binary log in statement format since BINLOG_FORMAT = STATEMENT"); +include/master-slave.inc +[connection master] +call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); create user test; create table t1(a int) engine=InnoDB; create table t2(a int) engine=MyISAM; @@ -115,3 +111,4 @@ drop user test; drop table t1; drop table t2; set global read_only=0; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_relay_space_innodb.result b/mysql-test/suite/rpl/r/rpl_relay_space_innodb.result index 54aac2eca35..4f10ac50f9a 100644 --- a/mysql-test/suite/rpl/r/rpl_relay_space_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_relay_space_innodb.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] SHOW VARIABLES LIKE 'relay_log_space_limit'; Variable_name Value relay_log_space_limit 0 @@ -23,3 +19,4 @@ Andy 31 00000001 Jacob 2 00000002 Caleb 1 00000003 DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_relay_space_myisam.result b/mysql-test/suite/rpl/r/rpl_relay_space_myisam.result index e8d2d63e46e..4c1a50b2f33 100644 --- a/mysql-test/suite/rpl/r/rpl_relay_space_myisam.result +++ b/mysql-test/suite/rpl/r/rpl_relay_space_myisam.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] SHOW VARIABLES LIKE 'relay_log_space_limit'; Variable_name Value relay_log_space_limit 0 @@ -23,3 +19,4 @@ Andy 31 00000001 Jacob 2 00000002 Caleb 1 00000003 DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_relayrotate.result b/mysql-test/suite/rpl/r/rpl_relayrotate.result index 20f19973d83..ea00aee0085 100644 --- a/mysql-test/suite/rpl/r/rpl_relayrotate.result +++ b/mysql-test/suite/rpl/r/rpl_relayrotate.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] stop slave; create table t1 (a int) engine=innodb; reset slave; @@ -14,3 +10,4 @@ select max(a) from t1; max(a) 8000 drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_relayspace.result b/mysql-test/suite/rpl/r/rpl_relayspace.result index 1f2a739d3e3..2815974c78f 100644 --- a/mysql-test/suite/rpl/r/rpl_relayspace.result +++ b/mysql-test/suite/rpl/r/rpl_relayspace.result @@ -1,19 +1,18 @@ +include/master-slave.inc +[connection master] stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -stop slave; +include/wait_for_slave_to_stop.inc create table t1 (a int); drop table t1; create table t1 (a int); drop table t1; reset slave; start slave io_thread; +include/wait_for_slave_param.inc [Slave_IO_State] stop slave io_thread; reset slave; start slave; select master_pos_wait('master-bin.001',200,6)=-1; master_pos_wait('master-bin.001',200,6)=-1 0 +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_replicate_do.result b/mysql-test/suite/rpl/r/rpl_replicate_do.result index 637047a883b..6f85fc15b1e 100644 --- a/mysql-test/suite/rpl/r/rpl_replicate_do.result +++ b/mysql-test/suite/rpl/r/rpl_replicate_do.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] drop table if exists t11; drop table if exists t11; create table t2 (n int); @@ -26,7 +22,7 @@ n select * from t11; ERROR 42S02: Table 'test.t11' doesn't exist drop table if exists t1,t2,t11; -Replicate_Do_Table test.t1 +Replicate_Do_Table = 'test.t1' create table t1 (ts timestamp); set one_shot time_zone='met'; insert into t1 values('2005-08-12 00:00:00'); @@ -73,3 +69,4 @@ Trigger Event Table Statement Timing Created sql_mode Definer character_set_clie *** master *** drop table t1; drop table t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_replicate_ignore_db.result b/mysql-test/suite/rpl/r/rpl_replicate_ignore_db.result index 0135804c02d..f0c46b0b966 100644 --- a/mysql-test/suite/rpl/r/rpl_replicate_ignore_db.result +++ b/mysql-test/suite/rpl/r/rpl_replicate_ignore_db.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] drop database if exists mysqltest1; drop database if exists mysqltest2; create database mysqltest1; @@ -21,3 +17,4 @@ a 1 drop database mysqltest1; drop database mysqltest2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_report.result b/mysql-test/suite/rpl/r/rpl_report.result index e129d7c8f22..b979d1faf5d 100644 --- a/mysql-test/suite/rpl/r/rpl_report.result +++ b/mysql-test/suite/rpl/r/rpl_report.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] select * from Information_schema.GLOBAL_VARIABLES where variable_name like 'report_host'; VARIABLE_NAME VARIABLE_VALUE REPORT_HOST 127.0.0.1 @@ -31,3 +27,4 @@ Value my_password set @@global.report_host='my.new.address.net'; ERROR HY000: Variable 'report_host' is a read only variable end of tests +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_rewrt_db.result b/mysql-test/suite/rpl/r/rpl_rewrt_db.result index dae72d83b51..12071faecfd 100644 --- a/mysql-test/suite/rpl/r/rpl_rewrt_db.result +++ b/mysql-test/suite/rpl/r/rpl_rewrt_db.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] drop database if exists mysqltest1; create database mysqltest1; use mysqltest1; @@ -219,3 +215,4 @@ DROP DATABASE database_slave_temp_01; DROP DATABASE database_slave_temp_02; DROP DATABASE database_slave_temp_03; SET sql_log_bin= 1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_rotate_logs.result b/mysql-test/suite/rpl/r/rpl_rotate_logs.result index 70e1d2f06e8..d8d28108330 100644 --- a/mysql-test/suite/rpl/r/rpl_rotate_logs.result +++ b/mysql-test/suite/rpl/r/rpl_rotate_logs.result @@ -1,5 +1,3 @@ -drop table if exists t1, t2, t3, t4; -drop table if exists t1, t2, t3, t4; start slave; Got one of the listed errors start slave; @@ -10,13 +8,14 @@ reset slave; change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root'; reset master; start slave; +include/wait_for_slave_to_start.inc create temporary table temp_table (a char(80) not null); insert into temp_table values ("testing temporary tables"); create table t1 (s text); insert into t1 values('Could not break slave'),('Tried hard'); -Master_Log_File master-bin.000001 -Relay_Master_Log_File master-bin.000001 -Checking that both slave threads are running. +Master_Log_File = 'master-bin.000001' +Relay_Master_Log_File = 'master-bin.000001' +include/check_slave_is_running.inc select * from t1; s Could not break slave @@ -38,8 +37,7 @@ drop table temp_table, t3; insert into t2 values(1234); set insert_id=1234; insert into t2 values(NULL); -set global sql_slave_skip_counter=1; -start slave; +include/wait_for_slave_sql_error_and_skip.inc [errno=1062] purge master logs to 'master-bin.000002'; show master logs; Log_name master-bin.000002 @@ -57,9 +55,9 @@ show binary logs; Log_name File_size master-bin.000003 # insert into t2 values (65); -Master_Log_File master-bin.000003 -Relay_Master_Log_File master-bin.000003 -Checking that both slave threads are running. +Master_Log_File = 'master-bin.000003' +Relay_Master_Log_File = 'master-bin.000003' +include/check_slave_is_running.inc select * from t2; m 34 @@ -88,9 +86,9 @@ master-bin.000008 # select * from t4; a testing temporary tables part 2 -Master_Log_File master-bin.000008 -Relay_Master_Log_File master-bin.000008 -Checking that both slave threads are running. +Master_Log_File = 'master-bin.000008' +Relay_Master_Log_File = 'master-bin.000008' +include/check_slave_is_running.inc lock tables t3 read; select count(*) from t3 where n >= 4; count(*) @@ -105,3 +103,4 @@ show binlog events in ''; ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log purge master logs before now(); End of 5.0 tests +include/stop_slave.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_001.result b/mysql-test/suite/rpl/r/rpl_row_001.result index 0d682eb82e1..b5f6aea9698 100644 --- a/mysql-test/suite/rpl/r/rpl_row_001.result +++ b/mysql-test/suite/rpl/r/rpl_row_001.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CREATE TABLE t1 (word CHAR(20) NOT NULL); LOAD DATA INFILE 'LOAD_FILE' INTO TABLE t1; LOAD DATA INFILE 'LOAD_FILE' INTO TABLE t1; @@ -53,3 +49,4 @@ SELECT n FROM t1; n 3456 DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_4_bytes.result b/mysql-test/suite/rpl/r/rpl_row_4_bytes.result index e2431364ed3..ef9602204a1 100644 --- a/mysql-test/suite/rpl/r/rpl_row_4_bytes.result +++ b/mysql-test/suite/rpl/r/rpl_row_4_bytes.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] drop database if exists mysqltest1; create database mysqltest1; use mysqltest1; @@ -25,3 +21,4 @@ ABE ANG LIL DROP DATABASE mysqltest1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_NOW.result b/mysql-test/suite/rpl/r/rpl_row_NOW.result index 23f95878608..eb6271d6e93 100644 --- a/mysql-test/suite/rpl/r/rpl_row_NOW.result +++ b/mysql-test/suite/rpl/r/rpl_row_NOW.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create database if not exists mysqltest1; DROP TABLE IF EXISTS mysqltest1.t1; CREATE TABLE mysqltest1.t1 (n MEDIUMINT NOT NULL AUTO_INCREMENT, @@ -27,3 +23,4 @@ INSERT INTO mysqltest1.t1 SET n = NULL, a = now(); DROP TABLE IF EXISTS mysqltest1.t1; DROP FUNCTION mysqltest1.f1; DROP DATABASE mysqltest1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_USER.result b/mysql-test/suite/rpl/r/rpl_row_USER.result index 98755fb4653..5298395da20 100644 --- a/mysql-test/suite/rpl/r/rpl_row_USER.result +++ b/mysql-test/suite/rpl/r/rpl_row_USER.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP DATABASE IF EXISTS mysqltest1; CREATE DATABASE mysqltest1; CREATE USER tester IDENTIFIED BY 'test'; @@ -36,3 +32,4 @@ REVOKE ALL ON mysqltest1.* FROM 'tester'@'%'; REVOKE ALL ON mysqltest1.* FROM ''@'localhost%'; DROP USER tester@'%'; DROP USER ''@'localhost%'; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_UUID.result b/mysql-test/suite/rpl/r/rpl_row_UUID.result index 02174a7ecae..b7d3f8914e0 100644 --- a/mysql-test/suite/rpl/r/rpl_row_UUID.result +++ b/mysql-test/suite/rpl/r/rpl_row_UUID.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP PROCEDURE IF EXISTS test.p1; DROP TABLE IF EXISTS test.t1; CREATE TABLE test.t1 (a INT, blob_column LONGBLOB, vchar_column VARCHAR(100), PRIMARY KEY(a)) engine=myisam; @@ -38,3 +34,4 @@ DROP PROCEDURE test.p1; DROP FUNCTION test.fn1; DROP TABLE test.t1; DROP TABLE test.t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result b/mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result index 1051d907b26..27f017a71ab 100644 --- a/mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result +++ b/mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CREATE DATABASE test_ignore; **** On Master **** SHOW DATABASES; @@ -48,11 +44,10 @@ t1 USE test_ignore; ERROR 42000: Unknown database 'test_ignore' DROP DATABASE test_ignore; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +USE test; +DROP TABLE t1; +USE test; +include/rpl_reset.inc CREATE TABLE t1 (a INT); DELETE FROM t1; INSERT INTO t1 VALUES (1),(2); @@ -67,11 +62,7 @@ master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT DROP TABLE t1; ================ Test for BUG#17620 ================ -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc **** On Slave **** SET GLOBAL QUERY_CACHE_SIZE=0; **** On Master **** @@ -105,12 +96,9 @@ a 8 9 SET GLOBAL QUERY_CACHE_SIZE=0; +DROP TABLE t1; ================ Test for BUG#22550 ================ -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc CREATE TABLE t1 (a BIT(1), b INT) ENGINE=MYISAM; INSERT INTO t1 VALUES(1,2); SELECT HEX(a),b FROM t1; @@ -128,11 +116,7 @@ HEX(a) b 0 2 DROP TABLE IF EXISTS t1; ================ Test for BUG#22583 ================ -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc **** On Master **** CREATE TABLE t1_myisam (k INT, a BIT(1), b BIT(9)) ENGINE=MYISAM; CREATE TABLE t1_innodb (k INT, a BIT(1), b BIT(9)) ENGINE=INNODB; @@ -249,13 +233,8 @@ a b 3 1 4 4 drop table t1,t2; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc **** On Master **** -SET SESSION BINLOG_FORMAT=ROW; CREATE TABLE t1 (a INT PRIMARY KEY, b SET('master','slave')); INSERT INTO t1 VALUES (1,'master,slave'), (2,'master,slave'); **** On Slave **** @@ -279,6 +258,6 @@ SELECT * FROM t1 ORDER BY a; a b 2 master,slave 5 slave -DROP TABLE t1; **** On Master **** DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result b/mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result index 350ce0ac2c9..a067193025f 100644 --- a/mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result +++ b/mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CREATE TABLE t1 (C1 CHAR(1), C2 CHAR(1), INDEX (C1)) ENGINE = 'MYISAM' ; SELECT * FROM t1; C1 C2 @@ -422,11 +418,7 @@ a b c **** Test for BUG#31552 **** **** On Master **** DELETE FROM t1; -**** Resetting master and slave **** -include/stop_slave.inc -RESET SLAVE; -RESET MASTER; -include/start_slave.inc +include/rpl_reset.inc **** On Master **** INSERT INTO t1 VALUES ('K','K'), ('L','L'), ('M','M'); **** On Master **** @@ -436,7 +428,7 @@ DELETE FROM t1; SELECT COUNT(*) FROM t1 ORDER BY c1,c2; COUNT(*) 0 set @@global.slave_exec_mode= default; -Checking that both slave threads are running. +include/check_slave_is_running.inc SELECT COUNT(*) FROM t1 ORDER BY c1,c2; COUNT(*) 0 **** Test for BUG#37076 **** @@ -480,47 +472,40 @@ SET GLOBAL SLAVE_TYPE_CONVERSIONS = 'ALL_NON_LOSSY'; [expecting slave to replicate correctly] INSERT INTO t1 VALUES (1, "", 1); INSERT INTO t1 VALUES (2, repeat(_utf8'a', 16), 2); -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] [expecting slave to replicate correctly] INSERT INTO t2 VALUES (1, "", 1); INSERT INTO t2 VALUES (2, repeat(_utf8'a', 16), 2); -Comparing tables master:test.t2 and slave:test.t2 +include/diff_tables.inc [master:t2, slave:t2] SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions; -RESET MASTER; -STOP SLAVE; -RESET SLAVE; -START SLAVE; +include/rpl_reset.inc [expecting slave to replicate correctly] INSERT INTO t4 VALUES (1, "", 1); INSERT INTO t4 VALUES (2, repeat(_utf8'a', 128), 2); -Comparing tables master:test.t4 and slave:test.t4 +include/diff_tables.inc [master:t4, slave:t4] [expecting slave to stop] INSERT INTO t5 VALUES (1, "", 1); INSERT INTO t5 VALUES (2, repeat(_utf8'a', 255), 2); -Last_SQL_Error = Column 1 of table 'test.t5' cannot be converted from type 'char(255)' to type 'char(16)' -RESET MASTER; -STOP SLAVE; -RESET SLAVE; -START SLAVE; +include/wait_for_slave_sql_error.inc [errno=1677 ] +Last_SQL_Error = 'Column 1 of table 'test.t5' cannot be converted from type 'char(255)' to type 'char(16)'' +include/rpl_reset.inc [expecting slave to stop] INSERT INTO t6 VALUES (1, "", 1); INSERT INTO t6 VALUES (2, repeat(_utf8'a', 255), 2); -Last_SQL_Error = Column 1 of table 'test.t6' cannot be converted from type 'char(255)' to type 'char(128)' -RESET MASTER; -STOP SLAVE; -RESET SLAVE; -START SLAVE; +include/wait_for_slave_sql_error.inc [errno=1677 ] +Last_SQL_Error = 'Column 1 of table 'test.t6' cannot be converted from type 'char(255)' to type 'char(128)'' +include/rpl_reset.inc [expecting slave to replicate correctly] INSERT INTO t7 VALUES (1, "", 1); INSERT INTO t7 VALUES (2, repeat(_utf8'a', 255), 2); -Comparing tables master:test.t7 and slave:test.t7 +include/diff_tables.inc [master:t7, slave:t7] drop table t1, t2, t3, t4, t5, t6, t7; CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE='MYISAM' ; INSERT INTO t1 VALUES (1), (2), (3); UPDATE t1 SET a = 10; ERROR 23000: Duplicate entry '10' for key 'PRIMARY' INSERT INTO t1 VALUES (4); -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] drop table t1; DROP TABLE IF EXISTS t1, t2; CREATE TABLE t1 ( @@ -574,7 +559,7 @@ ERROR 23000: Duplicate entry '6' for key 'PRIMARY' DELETE FROM t2 WHERE `pk` < 7 LIMIT 1; UPDATE t1 SET `int_key` = 4 ORDER BY `pk` LIMIT 6; *** results: t2 must be consistent **** -Comparing tables master:test.t2 and master:test.t2 +include/diff_tables.inc [master:t2, slave:t2] DROP TABLE t1, t2; EOF OF TESTS CREATE TABLE t1 (a int) ENGINE='MYISAM' ; @@ -590,7 +575,7 @@ UPDATE t1 SET a = 9 WHERE a < 3; INSERT INTO t1 ( a ) VALUES ( 3 ); UPDATE t1 SET a = 0 WHERE a < 4; UPDATE t1 SET a = 8 WHERE a < 5; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] drop table t1; CREATE TABLE t1 (a bit) ENGINE='MYISAM' ; INSERT IGNORE INTO t1 VALUES (NULL); @@ -632,5 +617,6 @@ DELETE FROM t1 WHERE a < 3 LIMIT 0; UPDATE t1 SET a = 8 WHERE a = 5 LIMIT 2; INSERT INTO t1 ( a ) VALUES ( 1 ); UPDATE t1 SET a = 9 WHERE a < 5 LIMIT 3; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result b/mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result index 59441ac5684..5bcce4f1af7 100644 --- a/mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result +++ b/mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CREATE TABLE t1 (C1 CHAR(1), C2 CHAR(1), INDEX (C1)) ENGINE = 'INNODB' ; SELECT * FROM t1; C1 C2 @@ -425,11 +421,7 @@ a b c **** Test for BUG#31552 **** **** On Master **** DELETE FROM t1; -**** Resetting master and slave **** -include/stop_slave.inc -RESET SLAVE; -RESET MASTER; -include/start_slave.inc +include/rpl_reset.inc **** On Master **** INSERT INTO t1 VALUES ('K','K'), ('L','L'), ('M','M'); **** On Master **** @@ -439,7 +431,7 @@ DELETE FROM t1; SELECT COUNT(*) FROM t1 ORDER BY c1,c2; COUNT(*) 0 set @@global.slave_exec_mode= default; -Checking that both slave threads are running. +include/check_slave_is_running.inc SELECT COUNT(*) FROM t1 ORDER BY c1,c2; COUNT(*) 0 **** Test for BUG#37076 **** @@ -483,47 +475,40 @@ SET GLOBAL SLAVE_TYPE_CONVERSIONS = 'ALL_NON_LOSSY'; [expecting slave to replicate correctly] INSERT INTO t1 VALUES (1, "", 1); INSERT INTO t1 VALUES (2, repeat(_utf8'a', 16), 2); -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] [expecting slave to replicate correctly] INSERT INTO t2 VALUES (1, "", 1); INSERT INTO t2 VALUES (2, repeat(_utf8'a', 16), 2); -Comparing tables master:test.t2 and slave:test.t2 +include/diff_tables.inc [master:t2, slave:t2] SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions; -RESET MASTER; -STOP SLAVE; -RESET SLAVE; -START SLAVE; +include/rpl_reset.inc [expecting slave to replicate correctly] INSERT INTO t4 VALUES (1, "", 1); INSERT INTO t4 VALUES (2, repeat(_utf8'a', 128), 2); -Comparing tables master:test.t4 and slave:test.t4 +include/diff_tables.inc [master:t4, slave:t4] [expecting slave to stop] INSERT INTO t5 VALUES (1, "", 1); INSERT INTO t5 VALUES (2, repeat(_utf8'a', 255), 2); -Last_SQL_Error = Column 1 of table 'test.t5' cannot be converted from type 'char(255)' to type 'char(16)' -RESET MASTER; -STOP SLAVE; -RESET SLAVE; -START SLAVE; +include/wait_for_slave_sql_error.inc [errno=1677 ] +Last_SQL_Error = 'Column 1 of table 'test.t5' cannot be converted from type 'char(255)' to type 'char(16)'' +include/rpl_reset.inc [expecting slave to stop] INSERT INTO t6 VALUES (1, "", 1); INSERT INTO t6 VALUES (2, repeat(_utf8'a', 255), 2); -Last_SQL_Error = Column 1 of table 'test.t6' cannot be converted from type 'char(255)' to type 'char(128)' -RESET MASTER; -STOP SLAVE; -RESET SLAVE; -START SLAVE; +include/wait_for_slave_sql_error.inc [errno=1677 ] +Last_SQL_Error = 'Column 1 of table 'test.t6' cannot be converted from type 'char(255)' to type 'char(128)'' +include/rpl_reset.inc [expecting slave to replicate correctly] INSERT INTO t7 VALUES (1, "", 1); INSERT INTO t7 VALUES (2, repeat(_utf8'a', 255), 2); -Comparing tables master:test.t7 and slave:test.t7 +include/diff_tables.inc [master:t7, slave:t7] drop table t1, t2, t3, t4, t5, t6, t7; CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE='INNODB' ; INSERT INTO t1 VALUES (1), (2), (3); UPDATE t1 SET a = 10; ERROR 23000: Duplicate entry '10' for key 'PRIMARY' INSERT INTO t1 VALUES (4); -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] drop table t1; DROP TABLE IF EXISTS t1, t2; CREATE TABLE t1 ( @@ -577,7 +562,7 @@ ERROR 23000: Duplicate entry '6' for key 'PRIMARY' DELETE FROM t2 WHERE `pk` < 7 LIMIT 1; UPDATE t1 SET `int_key` = 4 ORDER BY `pk` LIMIT 6; *** results: t2 must be consistent **** -Comparing tables master:test.t2 and master:test.t2 +include/diff_tables.inc [master:t2, slave:t2] DROP TABLE t1, t2; EOF OF TESTS CREATE TABLE t1 (a int) ENGINE='INNODB' ; @@ -593,7 +578,7 @@ UPDATE t1 SET a = 9 WHERE a < 3; INSERT INTO t1 ( a ) VALUES ( 3 ); UPDATE t1 SET a = 0 WHERE a < 4; UPDATE t1 SET a = 8 WHERE a < 5; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] drop table t1; SET @saved_slave_type_conversions = @@SLAVE_TYPE_CONVERSIONS; SET GLOBAL SLAVE_TYPE_CONVERSIONS = 'ALL_LOSSY'; @@ -638,5 +623,6 @@ UPDATE t1 SET a = 8 WHERE a = 5 LIMIT 2; INSERT INTO t1 ( a ) VALUES ( 1 ); UPDATE t1 SET a = 9 WHERE a < 5 LIMIT 3; SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_basic_8partition.result b/mysql-test/suite/rpl/r/rpl_row_basic_8partition.result index 3443e704031..c7241c52353 100644 --- a/mysql-test/suite/rpl/r/rpl_row_basic_8partition.result +++ b/mysql-test/suite/rpl/r/rpl_row_basic_8partition.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP TABLE IF EXISTS t1; SET @@BINLOG_FORMAT = ROW; SELECT @@BINLOG_FORMAT; @@ -717,3 +713,4 @@ COUNT(*) 4 DELETE FROM t1; DROP TABLE IF EXISTS t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_binlog_max_cache_size.result b/mysql-test/suite/rpl/r/rpl_row_binlog_max_cache_size.result index f04c229a9b6..1b682d0b025 100644 --- a/mysql-test/suite/rpl/r/rpl_row_binlog_max_cache_size.result +++ b/mysql-test/suite/rpl/r/rpl_row_binlog_max_cache_size.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); SET GLOBAL max_binlog_cache_size = 4096; SET GLOBAL binlog_cache_size = 4096; @@ -19,14 +15,11 @@ CREATE TABLE t3(a INT PRIMARY KEY, data VARCHAR(30000)) ENGINE=Innodb; Got one of the listed errors *** Single statement on non-transactional table *** Got one of the listed errors ---source include/wait_for_slave_sql_error_and_skip.inc -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1590] *** Single statement on both transactional and non-transactional tables. *** Got one of the listed errors ---source include/wait_for_slave_sql_error_and_skip.inc -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1590] +include/diff_tables.inc [master:t1,slave:t1] ######################################################################################## # 2 - BEGIN - IMPLICIT COMMIT by DDL ######################################################################################## @@ -44,7 +37,7 @@ Got one of the listed errors BEGIN; Got one of the listed errors Got one of the listed errors -source include/diff_master_slave.inc; +include/diff_tables.inc [master:t1,slave:t1] ######################################################################################## # 3 - BEGIN - COMMIT ######################################################################################## @@ -56,7 +49,7 @@ Got one of the listed errors Got one of the listed errors Got one of the listed errors COMMIT; -source include/diff_master_slave.inc; +include/diff_tables.inc [master:t1,slave:t1] ######################################################################################## # 4 - BEGIN - ROLLBACK ######################################################################################## @@ -70,7 +63,7 @@ Got one of the listed errors ROLLBACK; Warnings: Warning 1196 Some non-transactional changed tables couldn't be rolled back -source include/diff_master_slave.inc; +include/diff_tables.inc [master:t1,slave:t1] ######################################################################################## # 5 - PROCEDURE ######################################################################################## @@ -94,7 +87,7 @@ TRUNCATE TABLE t1; BEGIN; Got one of the listed errors ROLLBACK; -source include/diff_master_slave.inc; +include/diff_tables.inc [master:t1,slave:t1] ######################################################################################## # 6 - XID ######################################################################################## @@ -109,7 +102,7 @@ ROLLBACK TO sv; Warnings: Warning 1196 Some non-transactional changed tables couldn't be rolled back COMMIT; -source include/diff_master_slave.inc; +include/diff_tables.inc [master:t1,slave:t1] ######################################################################################## # 7 - NON-TRANS TABLE ######################################################################################## @@ -124,7 +117,7 @@ COMMIT; BEGIN; Got one of the listed errors COMMIT; -source include/diff_master_slave.inc; +include/diff_tables.inc [master:t1,slave:t1] ######################################################################## # 8 - Bug#55375(Regression Bug) Transaction bigger than # max_binlog_cache_size crashes slave @@ -147,6 +140,7 @@ SET GLOBAL binlog_stmt_cache_size= ORIGINAL_VALUE; BEGIN; Repeat statement 'INSERT INTO t1 VALUES($n, repeat("a", 32))' 128 times COMMIT; +include/wait_for_slave_sql_error.inc [errno=1534] SELECT count(*) FROM t1; count(*) 0 @@ -168,10 +162,6 @@ DROP TABLE t1; DROP TABLE t2; DROP TABLE t3; DROP TABLE IF EXISTS t4; -Warnings: -Note 1051 Unknown table 't4' -DROP TABLE IF EXISTS t5; -DROP TABLE IF EXISTS t6; -Warnings: -Note 1051 Unknown table 't6' +DROP TABLE t5; DROP PROCEDURE p1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_blob_innodb.result b/mysql-test/suite/rpl/r/rpl_row_blob_innodb.result index 055efffbd6a..4fb33dc4b6b 100644 --- a/mysql-test/suite/rpl/r/rpl_row_blob_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_row_blob_innodb.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP TABLE IF EXISTS test.t1; DROP TABLE IF EXISTS test.t2; ***** Table Create Section **** @@ -154,3 +150,4 @@ c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) DROP TABLE IF EXISTS test.t1; DROP TABLE IF EXISTS test.t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_blob_myisam.result b/mysql-test/suite/rpl/r/rpl_row_blob_myisam.result index 055efffbd6a..4fb33dc4b6b 100644 --- a/mysql-test/suite/rpl/r/rpl_row_blob_myisam.result +++ b/mysql-test/suite/rpl/r/rpl_row_blob_myisam.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP TABLE IF EXISTS test.t1; DROP TABLE IF EXISTS test.t2; ***** Table Create Section **** @@ -154,3 +150,4 @@ c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) DROP TABLE IF EXISTS test.t1; DROP TABLE IF EXISTS test.t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_colSize.result b/mysql-test/suite/rpl/r/rpl_row_colSize.result index 0ef47b8752d..c41a5bb79e8 100644 --- a/mysql-test/suite/rpl/r/rpl_row_colSize.result +++ b/mysql-test/suite/rpl/r/rpl_row_colSize.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP TABLE IF EXISTS t1; **** Testing WL#3228 changes. **** *** Create "wider" table on slave *** @@ -18,7 +14,8 @@ CREATE TABLE t1 (a DECIMAL(20, 10)); RESET MASTER; INSERT INTO t1 VALUES (901251.90125); START SLAVE; -Last_SQL_Error = Column 0 of table 'test.t1' cannot be converted from type 'decimal(20,10)' to type 'decimal(5,2)' +include/wait_for_slave_sql_error.inc [errno=1677] +Last_SQL_Error = 'Column 0 of table 'test.t1' cannot be converted from type 'decimal(20,10)' to type 'decimal(5,2)'' SELECT COUNT(*) FROM t1; COUNT(*) 0 @@ -34,7 +31,8 @@ CREATE TABLE t1 (a DECIMAL(27, 18)); RESET MASTER; INSERT INTO t1 VALUES (901251.90125); START SLAVE; -Last_SQL_Error = Column 0 of table 'test.t1' cannot be converted from type 'decimal(27,18)' to type 'decimal(27,9)' +include/wait_for_slave_sql_error.inc [errno=1677] +Last_SQL_Error = 'Column 0 of table 'test.t1' cannot be converted from type 'decimal(27,18)' to type 'decimal(27,9)'' SELECT COUNT(*) FROM t1; COUNT(*) 0 @@ -50,7 +48,8 @@ CREATE TABLE t1 (a NUMERIC(20, 10)); RESET MASTER; INSERT INTO t1 VALUES (901251.90125); START SLAVE; -Last_SQL_Error = Column 0 of table 'test.t1' cannot be converted from type 'decimal(20,10)' to type 'decimal(5,2)' +include/wait_for_slave_sql_error.inc [errno=1677] +Last_SQL_Error = 'Column 0 of table 'test.t1' cannot be converted from type 'decimal(20,10)' to type 'decimal(5,2)'' SELECT COUNT(*) FROM t1; COUNT(*) 0 @@ -67,7 +66,8 @@ CREATE TABLE t1 (a FLOAT(47)); RESET MASTER; INSERT INTO t1 VALUES (901251.90125); START SLAVE; -Last_SQL_Error = Column 0 of table 'test.t1' cannot be converted from type 'double' to type 'float' +include/wait_for_slave_sql_error.inc [errno=1677] +Last_SQL_Error = 'Column 0 of table 'test.t1' cannot be converted from type 'double' to type 'float'' SELECT COUNT(*) FROM t1; COUNT(*) 0 @@ -84,7 +84,8 @@ CREATE TABLE t1 (a BIT(64)); RESET MASTER; INSERT INTO t1 VALUES (B'10101'); START SLAVE; -Last_SQL_Error = Column 0 of table 'test.t1' cannot be converted from type 'bit(64)' to type 'bit(5)' +include/wait_for_slave_sql_error.inc [errno=1677] +Last_SQL_Error = 'Column 0 of table 'test.t1' cannot be converted from type 'bit(64)' to type 'bit(5)'' SELECT COUNT(*) FROM t1; COUNT(*) 0 @@ -100,7 +101,8 @@ CREATE TABLE t1 (a BIT(12)); RESET MASTER; INSERT INTO t1 VALUES (B'10101'); START SLAVE; -Last_SQL_Error = Column 0 of table 'test.t1' cannot be converted from type 'bit(12)' to type 'bit(11)' +include/wait_for_slave_sql_error.inc [errno=1677] +Last_SQL_Error = 'Column 0 of table 'test.t1' cannot be converted from type 'bit(12)' to type 'bit(11)'' SELECT COUNT(*) FROM t1; COUNT(*) 0 @@ -117,7 +119,8 @@ CREATE TABLE t1 (a SET('1','2','3','4','5','6','7','8','9')); RESET MASTER; INSERT INTO t1 VALUES ('4'); START SLAVE; -Last_SQL_Error = Column 0 of table 'test.t1' cannot be converted from type 'set' to type 'set('4')' +include/wait_for_slave_sql_error.inc [errno=1677] +Last_SQL_Error = 'Column 0 of table 'test.t1' cannot be converted from type 'set' to type 'set('4')'' SELECT COUNT(*) FROM t1; COUNT(*) 0 @@ -134,7 +137,8 @@ CREATE TABLE t1 (a CHAR(20)); RESET MASTER; INSERT INTO t1 VALUES ('This is a test.'); START SLAVE; -Last_SQL_Error = Column 0 of table 'test.t1' cannot be converted from type 'char(20)' to type 'char(10)' +include/wait_for_slave_sql_error.inc [errno=1677] +Last_SQL_Error = 'Column 0 of table 'test.t1' cannot be converted from type 'char(20)' to type 'char(10)'' SELECT COUNT(*) FROM t1; COUNT(*) 0 @@ -182,7 +186,8 @@ CREATE TABLE t1 (a ENUM( RESET MASTER; INSERT INTO t1 VALUES ('44'); START SLAVE; -Last_SQL_Error = Column 0 of table 'test.t1' cannot be converted from type 'enum' to type 'enum('44','54')' +include/wait_for_slave_sql_error.inc [errno=1677] +Last_SQL_Error = 'Column 0 of table 'test.t1' cannot be converted from type 'enum' to type 'enum('44','54')'' SELECT COUNT(*) FROM t1; COUNT(*) 0 @@ -199,7 +204,8 @@ CREATE TABLE t1 (a VARCHAR(2000)); RESET MASTER; INSERT INTO t1 VALUES ('This is a test.'); START SLAVE; -Last_SQL_Error = Column 0 of table 'test.t1' cannot be converted from type 'varchar(2000)' to type 'varchar(100)' +include/wait_for_slave_sql_error.inc [errno=1677] +Last_SQL_Error = 'Column 0 of table 'test.t1' cannot be converted from type 'varchar(2000)' to type 'varchar(100)'' SELECT COUNT(*) FROM t1; COUNT(*) 0 @@ -215,7 +221,8 @@ CREATE TABLE t1 (a VARCHAR(200)); RESET MASTER; INSERT INTO t1 VALUES ('This is a test.'); START SLAVE; -Last_SQL_Error = Column 0 of table 'test.t1' cannot be converted from type 'varchar(200)' to type 'varchar(10)' +include/wait_for_slave_sql_error.inc [errno=1677] +Last_SQL_Error = 'Column 0 of table 'test.t1' cannot be converted from type 'varchar(200)' to type 'varchar(10)'' SELECT COUNT(*) FROM t1; COUNT(*) 0 @@ -231,7 +238,8 @@ CREATE TABLE t1 (a VARCHAR(2000)); RESET MASTER; INSERT INTO t1 VALUES ('This is a test.'); START SLAVE; -Last_SQL_Error = Column 0 of table 'test.t1' cannot be converted from type 'varchar(2000)' to type 'varchar(1000)' +include/wait_for_slave_sql_error.inc [errno=1677] +Last_SQL_Error = 'Column 0 of table 'test.t1' cannot be converted from type 'varchar(2000)' to type 'varchar(1000)'' SELECT COUNT(*) FROM t1; COUNT(*) 0 @@ -248,7 +256,8 @@ CREATE TABLE t1 (a LONGBLOB); RESET MASTER; INSERT INTO t1 VALUES ('This is a test.'); START SLAVE; -Last_SQL_Error = Column 0 of table 'test.t1' cannot be converted from type 'tinyblob' to type 'tinyblob' +include/wait_for_slave_sql_error.inc [errno=1677] +Last_SQL_Error = 'Column 0 of table 'test.t1' cannot be converted from type 'tinyblob' to type 'tinyblob'' SELECT COUNT(*) FROM t1; COUNT(*) 0 @@ -258,3 +267,4 @@ RESET MASTER; START SLAVE; *** Cleanup *** DROP TABLE IF EXISTS t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_conflicts.result b/mysql-test/suite/rpl/r/rpl_row_conflicts.result index 90ccae5d738..5481cbae77d 100644 --- a/mysql-test/suite/rpl/r/rpl_row_conflicts.result +++ b/mysql-test/suite/rpl/r/rpl_row_conflicts.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] call mtr.add_suppression("Slave: Can\'t find record in \'t1\' Error_code: .*"); [on slave] SET @old_slave_exec_mode= @@global.slave_exec_mode; @@ -24,6 +20,7 @@ a 1 [on slave] ---- Wait until slave stops with an error ---- +include/wait_for_slave_sql_error.inc [errno=1062] Last_SQL_Error (expected "duplicate key" error) Could not execute Write_rows event on table test.t1; Duplicate entry '1' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log master-bin.000001, end_log_pos END_LOG_POS SELECT * FROM t1; @@ -32,6 +29,7 @@ a ---- Resolve the conflict on the slave and restart SQL thread ---- DELETE FROM t1 WHERE a = 1; START SLAVE SQL_THREAD; +include/wait_for_slave_sql_to_start.inc ---- Sync slave and verify that there is no error ---- Last_SQL_Error = '' (expected no error) SELECT * FROM t1; @@ -51,12 +49,15 @@ SELECT * FROM t1; a [on slave] ---- Wait until slave stops with an error ---- -Last_SQL_Error = Could not execute Delete_rows event on table test.t1; Can't find record in 't1', Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND; the event's master log master-bin.000001, end_log_pos 983 (expected "can't find record" error) +include/wait_for_slave_sql_error.inc [errno=1032] +Last_SQL_Error (expected "duplicate key" error) +Could not execute Delete_rows event on table test.t1; Can't find record in 't1', Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND; the event's master log master-bin.000001, end_log_pos END_LOG_POS SELECT * FROM t1; a ---- Resolve the conflict on the slave and restart SQL thread ---- INSERT INTO t1 VALUES (1); START SLAVE SQL_THREAD; +include/wait_for_slave_sql_to_start.inc ---- Sync slave and verify that there is no error ---- Last_SQL_Error = (expected no error) SELECT * FROM t1; @@ -65,6 +66,7 @@ a [on master] DROP TABLE t1; [on slave] +include/rpl_reset.inc ######## Run with slave_exec_mode=IDEMPOTENT ######## set @@global.slave_exec_mode= 'IDEMPOTENT'; ==== Initialize ==== @@ -108,3 +110,4 @@ a DROP TABLE t1; [on slave] SET @@global.slave_exec_mode= @old_slave_exec_mode; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_delayed_ins.result b/mysql-test/suite/rpl/r/rpl_row_delayed_ins.result index 90b68428008..4575588b1ef 100644 --- a/mysql-test/suite/rpl/r/rpl_row_delayed_ins.result +++ b/mysql-test/suite/rpl/r/rpl_row_delayed_ins.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create table t1(a int not null primary key) engine=myisam; insert delayed into t1 values (1); insert delayed into t1 values (2); @@ -20,3 +16,4 @@ a 2 3 drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_drop.result b/mysql-test/suite/rpl/r/rpl_row_drop.result index 402d20e469b..be7b2d16a0b 100644 --- a/mysql-test/suite/rpl/r/rpl_row_drop.result +++ b/mysql-test/suite/rpl/r/rpl_row_drop.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] **** On Master **** CREATE TABLE t1 (a int); CREATE TABLE t2 (a int); @@ -55,3 +51,4 @@ t2 SHOW TABLES; Tables_in_test t2 +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_drop_create_temp_table.result b/mysql-test/suite/rpl/r/rpl_row_drop_create_temp_table.result index a0b7f74fea4..db38c2d8005 100644 --- a/mysql-test/suite/rpl/r/rpl_row_drop_create_temp_table.result +++ b/mysql-test/suite/rpl/r/rpl_row_drop_create_temp_table.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] ######################################################################### # CONFIGURATION ######################################################################### @@ -1628,3 +1624,4 @@ DROP TABLE IF EXISTS nt_1; DROP TABLE IF EXISTS tt_2; DROP TABLE IF EXISTS tt_1; SET @commands= ''; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_find_row.result b/mysql-test/suite/rpl/r/rpl_row_find_row.result index 69516b47b7d..fff1f1b0c35 100644 --- a/mysql-test/suite/rpl/r/rpl_row_find_row.result +++ b/mysql-test/suite/rpl/r/rpl_row_find_row.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] SET SQL_LOG_BIN=0; CREATE TABLE t (a int, b int, c int, key(b)); SET SQL_LOG_BIN=1; @@ -12,27 +8,18 @@ INSERT INTO t VALUES (1,2,4); INSERT INTO t VALUES (4,3,4); DELETE FROM t; DROP TABLE t; -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc CREATE TABLE t (a int, b int, c int, key(b)); ALTER TABLE t DISABLE KEYS; INSERT INTO t VALUES (1,2,4); INSERT INTO t VALUES (4,3,4); DELETE FROM t; DROP TABLE t; -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc CREATE TABLE t1 (c1 INT NOT NULL, c2 INT NOT NULL, c3 INT, UNIQUE KEY(c1,c3), KEY(c2)); INSERT INTO t1(c1,c2) VALUES(1,1); INSERT INTO t1(c1,c2) VALUES(1,2); UPDATE t1 SET c1=1000 WHERE c2=2; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result b/mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result index 61fee130d49..af44821a817 100644 --- a/mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result +++ b/mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create table t1 (a int); insert into t1 values (10); create table t2 (a int); @@ -21,10 +17,13 @@ flush tables; select * from t3; a stop slave; +include/wait_for_slave_to_stop.inc drop table t1; flush tables with read lock; start slave; +include/wait_for_slave_to_start.inc stop slave; ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction unlock tables; drop table t3, t4, t5; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_func001.result b/mysql-test/suite/rpl/r/rpl_row_func001.result index b20f3f724d0..74a053abb26 100644 --- a/mysql-test/suite/rpl/r/rpl_row_func001.result +++ b/mysql-test/suite/rpl/r/rpl_row_func001.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP FUNCTION test.f1; DROP TABLE IF EXISTS test.t1; create table test.t1 (a int, PRIMARY KEY(a)); @@ -28,3 +24,4 @@ a 2 DROP FUNCTION test.f1; DROP TABLE test.t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_func002.result b/mysql-test/suite/rpl/r/rpl_row_func002.result index 03f5b3115c3..69a732048b2 100644 --- a/mysql-test/suite/rpl/r/rpl_row_func002.result +++ b/mysql-test/suite/rpl/r/rpl_row_func002.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP FUNCTION test.f1; DROP TABLE IF EXISTS test.t1; DROP TABLE IF EXISTS test.t2; @@ -24,3 +20,4 @@ INSERT INTO test.t2 VALUES (null,f1(),CURRENT_TIMESTAMP); DROP FUNCTION test.f1; DROP TABLE test.t1; DROP TABLE test.t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_func003.result b/mysql-test/suite/rpl/r/rpl_row_func003.result index 94d01b50ce5..cdc5bf6afba 100644 --- a/mysql-test/suite/rpl/r/rpl_row_func003.result +++ b/mysql-test/suite/rpl/r/rpl_row_func003.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CALL mtr.add_suppression('Statement may not be safe to log in statement format.'); DROP FUNCTION IF EXISTS test.f1; DROP TABLE IF EXISTS test.t1; @@ -28,3 +24,4 @@ ROLLBACK; SET AUTOCOMMIT=1; DROP FUNCTION test.f1; DROP TABLE test.t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_idempotency.result b/mysql-test/suite/rpl/r/rpl_row_idempotency.result index fcc68cd4712..faf07e323d9 100644 --- a/mysql-test/suite/rpl/r/rpl_row_idempotency.result +++ b/mysql-test/suite/rpl/r/rpl_row_idempotency.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] call mtr.add_suppression("Slave: Can't find record in 't.' Error_code: 1032"); call mtr.add_suppression("Slave: Cannot delete or update a parent row: a foreign key constraint fails .* Error_code: 1451"); call mtr.add_suppression("Slave: Cannot add or update a child row: a foreign key constraint fails .* Error_code: 1452"); @@ -76,6 +72,7 @@ b 2 3 *** slave must stop (Trying to delete a referenced foreing key) +include/wait_for_slave_sql_to_stop.inc Last_SQL_Error 1451 select * from ti1 order by b /* must be (1),(2),(3) - not deleted */; @@ -94,6 +91,7 @@ set global slave_exec_mode='STRICT'; delete from ti1 where b=3; insert into ti2 set a=3, b=3 /* offending write event */; *** slave must stop (Trying to insert an invalid foreign key) +include/wait_for_slave_sql_to_stop.inc Last_SQL_Error 1452 select * from ti2 order by b /* must be (2,2) */; @@ -114,6 +112,7 @@ a b insert into ti1 set b=1; insert into ti1 set b=1 /* offending write event */; *** slave must stop (Trying to insert a dupliacte key) +include/wait_for_slave_sql_to_stop.inc Last_SQL_Error 1062 set foreign_key_checks= 0; @@ -130,6 +129,7 @@ DELETE FROM t1 WHERE a = -2; DELETE FROM t2 WHERE a = -2; DELETE FROM t1 WHERE a = -2; *** slave must stop (Key was not found) +include/wait_for_slave_sql_to_stop.inc Last_SQL_Error 1032 set global slave_exec_mode='IDEMPOTENT'; @@ -137,6 +137,7 @@ start slave sql_thread; set global slave_exec_mode='STRICT'; DELETE FROM t2 WHERE a = -2; *** slave must stop (Key was not found) +include/wait_for_slave_sql_to_stop.inc Last_SQL_Error 1032 set global slave_exec_mode='IDEMPOTENT'; @@ -146,6 +147,7 @@ UPDATE t1 SET a = 1 WHERE a = -1; UPDATE t2 SET a = 1 WHERE a = -1; UPDATE t1 SET a = 1 WHERE a = -1; *** slave must stop (Key was not found) +include/wait_for_slave_sql_to_stop.inc Last_SQL_Error 1032 set global slave_exec_mode='IDEMPOTENT'; @@ -153,6 +155,7 @@ start slave sql_thread; set global slave_exec_mode='STRICT'; UPDATE t2 SET a = 1 WHERE a = -1; *** slave must stop (Key was not found) +include/wait_for_slave_sql_to_stop.inc Last_SQL_Error 1032 set global slave_exec_mode='IDEMPOTENT'; @@ -161,3 +164,4 @@ SET @@global.slave_exec_mode= @old_slave_exec_mode; drop table t1,t2,ti2,ti1; set @@global.slave_exec_mode= @old_slave_exec_mode; *** end of tests +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_implicit_commit_binlog.result b/mysql-test/suite/rpl/r/rpl_row_implicit_commit_binlog.result index b9480abd4b8..f81e5db986e 100644 --- a/mysql-test/suite/rpl/r/rpl_row_implicit_commit_binlog.result +++ b/mysql-test/suite/rpl/r/rpl_row_implicit_commit_binlog.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] ######################################################################### # CONFIGURATION ######################################################################### @@ -562,10 +558,8 @@ master-bin.000001 # Query # # DROP DATABASE IF EXISTS db ################################################################################### # CHECK CONSISTENCY ################################################################################### -Comparing tables master:test.tt_1 and slave:test.tt_1 +include/diff_tables.inc [master:tt_1,slave:tt_1] ################################################################################### # CLEAN ################################################################################### -DROP TABLE tt_1; -DROP TABLE tt_2; -DROP TABLE nt_1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result b/mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result index 9a179478ecc..148840cc8c5 100644 --- a/mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result +++ b/mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] ==== Setup table on master but not on slave ==== [on master] CREATE TABLE t1 (a INT); @@ -14,8 +10,10 @@ DROP TABLE t1; INSERT INTO t1 VALUES (1); ==== Verify error on slave ==== [on slave] -Last_SQL_Error = Error executing row event: 'Table 'test.t1' doesn't exist' +include/wait_for_slave_sql_error.inc [errno=1146] ==== Clean up ==== -include/stop_slave.inc +include/stop_slave_io.inc +RESET SLAVE; [on master] DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_insert_delayed.result b/mysql-test/suite/rpl/r/rpl_row_insert_delayed.result index 1f3cd734451..525a4a9716f 100644 --- a/mysql-test/suite/rpl/r/rpl_row_insert_delayed.result +++ b/mysql-test/suite/rpl/r/rpl_row_insert_delayed.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CREATE SCHEMA IF NOT EXISTS mysqlslap; USE mysqlslap; select @@global.binlog_format; @@ -58,3 +54,4 @@ a 1 drop table t1; End of 5.0 tests +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_loaddata_concurrent.result b/mysql-test/suite/rpl/r/rpl_row_loaddata_concurrent.result index cb095ad561e..dc3ce85f16f 100644 --- a/mysql-test/suite/rpl/r/rpl_row_loaddata_concurrent.result +++ b/mysql-test/suite/rpl/r/rpl_row_loaddata_concurrent.result @@ -13,13 +13,8 @@ master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ DROP TABLE t1; -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -reset master; +include/master-slave.inc +[connection master] select last_insert_id(); last_insert_id() 0 @@ -47,32 +42,27 @@ drop table t3; create table t1(a int, b int, unique(b)); insert into t1 values(1,10); load data CONCURRENT infile '../../std_data/rpl_loaddata.dat' into table t1; -set global sql_slave_skip_counter=1; -start slave; -Last_SQL_Errno=0 -Last_SQL_Error - +include/wait_for_slave_sql_error_and_skip.inc [errno=1062] +include/check_slave_no_error.inc set sql_log_bin=0; delete from t1; set sql_log_bin=1; load data CONCURRENT infile '../../std_data/rpl_loaddata.dat' into table t1; -stop slave; +include/wait_for_slave_sql_error.inc [errno=1062] +include/stop_slave_io.inc change master to master_user='test'; change master to master_user='root'; -Last_SQL_Errno=0 -Last_SQL_Error - +include/check_slave_no_error.inc set global sql_slave_skip_counter=1; start slave; set sql_log_bin=0; delete from t1; set sql_log_bin=1; load data CONCURRENT infile '../../std_data/rpl_loaddata.dat' into table t1; +include/wait_for_slave_sql_error.inc [errno=1062] stop slave; reset slave; -Last_SQL_Errno=0 -Last_SQL_Error - +include/check_slave_no_error.inc reset master; create table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60), unique(day)) engine=MyISAM; @@ -99,13 +89,8 @@ drop table t1, t2; CREATE TABLE t1 (word CHAR(20) NOT NULL PRIMARY KEY) ENGINE=INNODB; LOAD DATA CONCURRENT INFILE "../../std_data/words.dat" INTO TABLE t1; ERROR 23000: Duplicate entry 'Aarhus' for key 'PRIMARY' -DROP TABLE IF EXISTS t1; -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +DROP TABLE t1; +include/rpl_reset.inc drop database if exists b48297_db1; drop database if exists b42897_db2; create database b48297_db1; @@ -126,15 +111,10 @@ LOAD DATA CONCURRENT LOCAL INFILE 'MYSQLTEST_VARDIR/std_data/loaddata5.dat' INTO LOAD DATA CONCURRENT LOCAL INFILE 'MYSQLTEST_VARDIR/std_data/loaddata5.dat' INTO TABLE b48297_db1.t1; ### disconnect and switch back to master connection use b48297_db1; -Comparing tables master:b48297_db1.t1 and slave:b48297_db1.t1 +include/diff_tables.inc [master:b48297_db1.t1, slave:b48297_db1.t1] DROP DATABASE b48297_db1; DROP DATABASE b42897_db2; -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc use test; CREATE TABLE t1 (`key` TEXT, `text` TEXT); LOAD DATA INFILE '../../std_data/loaddata2.dat' REPLACE INTO TABLE `t1` FIELDS TERMINATED BY ','; @@ -146,3 +126,4 @@ Field 3 'Field 4' 'Field 5' 'Field 6' Field 6 'Field 7' DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_log.result b/mysql-test/suite/rpl/r/rpl_row_log.result index dbb43b9415b..b9be2cd0144 100644 --- a/mysql-test/suite/rpl/r/rpl_row_log.result +++ b/mysql-test/suite/rpl/r/rpl_row_log.result @@ -1,13 +1,11 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] include/stop_slave.inc +include/wait_for_slave_to_stop.inc reset master; reset slave; start slave; +include/wait_for_slave_to_start.inc create table t1(n int not null auto_increment primary key)ENGINE=MyISAM; insert into t1 values (NULL); drop table t1; @@ -243,18 +241,13 @@ slave-bin.000002 # Query # # BEGIN slave-bin.000002 # Table_map # # table_id: # (test.t2) slave-bin.000002 # Write_rows # # table_id: # flags: STMT_END_F slave-bin.000002 # Query # # COMMIT -Checking that both slave threads are running. +include/check_slave_is_running.inc show binlog events in 'slave-bin.000005' from 4; ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log DROP TABLE t1; DROP TABLE t2; DROP TABLE t3; -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc create table t1(a int auto_increment primary key, b int); insert into t1 values (NULL, 1); set insert_id=5; @@ -276,3 +269,4 @@ a b 5 1 6 1 drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_log_innodb.result b/mysql-test/suite/rpl/r/rpl_row_log_innodb.result index ed6051829d4..15aa8f23b55 100644 --- a/mysql-test/suite/rpl/r/rpl_row_log_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_row_log_innodb.result @@ -1,13 +1,11 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] include/stop_slave.inc +include/wait_for_slave_to_stop.inc reset master; reset slave; start slave; +include/wait_for_slave_to_start.inc create table t1(n int not null auto_increment primary key)ENGINE=InnoDB; insert into t1 values (NULL); drop table t1; @@ -243,18 +241,13 @@ slave-bin.000002 # Query # # BEGIN slave-bin.000002 # Table_map # # table_id: # (test.t2) slave-bin.000002 # Write_rows # # table_id: # flags: STMT_END_F slave-bin.000002 # Xid # # COMMIT /* XID */ -Checking that both slave threads are running. +include/check_slave_is_running.inc show binlog events in 'slave-bin.000005' from 4; ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log DROP TABLE t1; DROP TABLE t2; DROP TABLE t3; -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc create table t1(a int auto_increment primary key, b int); insert into t1 values (NULL, 1); set insert_id=5; @@ -276,3 +269,4 @@ a b 5 1 6 1 drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_max_relay_size.result b/mysql-test/suite/rpl/r/rpl_row_max_relay_size.result index 547dd8e1541..379cea4d3fc 100644 --- a/mysql-test/suite/rpl/r/rpl_row_max_relay_size.result +++ b/mysql-test/suite/rpl/r/rpl_row_max_relay_size.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] stop slave; # # Generate a big enough master's binlog to cause relay log rotations @@ -23,7 +19,7 @@ select @@global.max_relay_log_size; @@global.max_relay_log_size 4096 start slave; -Checking that both slave threads are running. +include/check_slave_is_running.inc # # Test 2 # @@ -33,7 +29,7 @@ set global max_relay_log_size=(5*4096); select @@global.max_relay_log_size; @@global.max_relay_log_size 20480 start slave; -Checking that both slave threads are running. +include/check_slave_is_running.inc # # Test 3: max_relay_log_size = 0 # @@ -43,7 +39,7 @@ set global max_relay_log_size=0; select @@global.max_relay_log_size; @@global.max_relay_log_size 0 start slave; -Checking that both slave threads are running. +include/check_slave_is_running.inc # # Test 4: Tests below are mainly to ensure that we have not coded with wrong assumptions # @@ -57,13 +53,13 @@ reset slave; start slave; flush logs; create table t1 (a int); -Checking that both slave threads are running. +include/check_slave_is_running.inc # # Test 6: one more rotation, to be sure Relay_Log_Space is correctly updated # flush logs; drop table t1; -Checking that both slave threads are running. +include/check_slave_is_running.inc flush logs; show master status; File Position Binlog_Do_DB Binlog_Ignore_DB @@ -72,3 +68,4 @@ set global max_binlog_size= @my_max_binlog_size; # # End of 4.1 tests # +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_mixing_engines.result b/mysql-test/suite/rpl/r/rpl_row_mixing_engines.result index 7390d5fd316..4106dc93198 100644 --- a/mysql-test/suite/rpl/r/rpl_row_mixing_engines.result +++ b/mysql-test/suite/rpl/r/rpl_row_mixing_engines.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] ######################################################################### # CONFIGURATION ######################################################################### @@ -13801,3 +13797,4 @@ master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `tt_xx_ ################################################################################### # CLEAN ################################################################################### +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result b/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result index 0852d1048f2..9e3577e1d5c 100644 --- a/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result +++ b/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] ---Setup Section -- set timestamp=1000000000; @@ -83,9 +79,11 @@ DROP TABLE t1; DROP TABLE t2; DROP TABLE t3; stop slave; +include/wait_for_slave_to_stop.inc reset master; reset slave; start slave; +include/wait_for_slave_to_start.inc --- Test 1 Load from Dump binlog file -- @@ -209,9 +207,11 @@ DROP TABLE t1; DROP TABLE t2; DROP TABLE t3; stop slave; +include/wait_for_slave_to_stop.inc reset master; reset slave; start slave; +include/wait_for_slave_to_start.inc SELECT COUNT(*) from t1; COUNT(*) 352 @@ -337,9 +337,11 @@ ROLLBACK /* added by mysqlbinlog */; --- Test 8 switch internal charset -- stop slave; +include/wait_for_slave_to_stop.inc reset master; reset slave; start slave; +include/wait_for_slave_to_start.inc create table t4 (f text character set utf8); create table t5 (f text character set cp932); flush logs; @@ -378,3 +380,4 @@ a b 1 1 FLUSH LOGS; DROP TABLE IF EXISTS t1, t2, t3, t04, t05, t4, t5; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_rec_comp_innodb.result b/mysql-test/suite/rpl/r/rpl_row_rec_comp_innodb.result index c461cafbd7c..d9ebb52493b 100644 --- a/mysql-test/suite/rpl/r/rpl_row_rec_comp_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_row_rec_comp_innodb.result @@ -1,46 +1,28 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] ## case #1 - last_null_bit_pos==0 in record_compare without X bit -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc 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=InnoDB DEFAULT CHARSET=latin1; INSERT INTO t1 ( c5, c6 ) VALUES ( 1 , 35 ); INSERT INTO t1 ( c5, c6 ) VALUES ( NULL, 35 ); UPDATE t1 SET c5 = 'a'; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DROP TABLE t1; ## case #1.1 - last_null_bit_pos==0 in record_compare with X bit ## (1 column less and no varchar) -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc 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=InnoDB DEFAULT CHARSET=latin1; INSERT INTO t1 ( c5, c6 ) VALUES ( 1 , 35 ); INSERT INTO t1 ( c5, c6 ) VALUES ( NULL, 35 ); UPDATE t1 SET c5 = 'a'; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DROP TABLE t1; ## case #2 - X bit is wrongly set. -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc CREATE TABLE t1 (c1 int, c2 varchar(1) default '') ENGINE=InnoDB DEFAULT CHARSET= latin1; INSERT INTO t1(c1) VALUES (10); INSERT INTO t1(c1) VALUES (NULL); UPDATE t1 SET c1= 0; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_rec_comp_myisam.result b/mysql-test/suite/rpl/r/rpl_row_rec_comp_myisam.result index 38fbe486d2e..e9ffcc927be 100644 --- a/mysql-test/suite/rpl/r/rpl_row_rec_comp_myisam.result +++ b/mysql-test/suite/rpl/r/rpl_row_rec_comp_myisam.result @@ -1,60 +1,37 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] ## case #1 - last_null_bit_pos==0 in record_compare without X bit -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc 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=MyISAM DEFAULT CHARSET=latin1; INSERT INTO t1 ( c5, c6 ) VALUES ( 1 , 35 ); INSERT INTO t1 ( c5, c6 ) VALUES ( NULL, 35 ); UPDATE t1 SET c5 = 'a'; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DROP TABLE t1; ## case #1.1 - last_null_bit_pos==0 in record_compare with X bit ## (1 column less and no varchar) -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc 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=MyISAM DEFAULT CHARSET=latin1; INSERT INTO t1 ( c5, c6 ) VALUES ( 1 , 35 ); INSERT INTO t1 ( c5, c6 ) VALUES ( NULL, 35 ); UPDATE t1 SET c5 = 'a'; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DROP TABLE t1; ## case #2 - X bit is wrongly set. -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc CREATE TABLE t1 (c1 int, c2 varchar(1) default '') ENGINE=MyISAM DEFAULT CHARSET= latin1; INSERT INTO t1(c1) VALUES (10); INSERT INTO t1(c1) VALUES (NULL); UPDATE t1 SET c1= 0; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DROP TABLE t1; ## coverage purposes - Field_bits ## 1 X bit + 2 Null bits + 5 bits => last_null_bit_pos==0 -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bit(5)) ENGINE=MyISAM DEFAULT CHARSET=latin1; INSERT INTO t1(c1,c2) VALUES (10, b'1'); INSERT INTO t1(c1,c2) VALUES (NULL, b'1'); UPDATE t1 SET c1= 0; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_reset_slave.result b/mysql-test/suite/rpl/r/rpl_row_reset_slave.result index 5499d41bc1f..7dc94bab481 100644 --- a/mysql-test/suite/rpl/r/rpl_row_reset_slave.result +++ b/mysql-test/suite/rpl/r/rpl_row_reset_slave.result @@ -1,22 +1,18 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -Master_User root -Master_Host 127.0.0.1 +include/master-slave.inc +[connection master] +Master_User = 'root' +Master_Host = '127.0.0.1' include/stop_slave.inc change master to master_user='test'; -Master_User test -Master_Host 127.0.0.1 +Master_User = 'test' +Master_Host = '127.0.0.1' reset slave; -Master_User test -Master_Host 127.0.0.1 +Master_User = 'test' +Master_Host = '127.0.0.1' change master to master_user='root'; include/start_slave.inc -Master_User root -Master_Host 127.0.0.1 +Master_User = 'root' +Master_Host = '127.0.0.1' include/stop_slave.inc reset slave; include/start_slave.inc @@ -29,13 +25,20 @@ Variable_name Value Slave_open_temp_tables 0 include/stop_slave.inc reset slave; +include/check_slave_no_error.inc change master to master_user='impossible_user_name'; start slave; -stop slave; +include/wait_for_slave_io_error.inc [errno=1045] +include/stop_slave_sql.inc change master to master_user='root'; include/start_slave.inc +include/check_slave_no_error.inc stop slave; change master to master_user='impossible_user_name'; start slave; -stop slave; +include/wait_for_slave_io_error.inc [errno=1045] +include/stop_slave_sql.inc reset slave; +include/check_slave_no_error.inc +change master to master_user='root'; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_show_relaylog_events.result b/mysql-test/suite/rpl/r/rpl_row_show_relaylog_events.result index a05213217b2..71d1ca9a928 100644 --- a/mysql-test/suite/rpl/r/rpl_row_show_relaylog_events.result +++ b/mysql-test/suite/rpl/r/rpl_row_show_relaylog_events.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CREATE TABLE t1 (a INT); INSERT INTO t1 VALUES (1); INSERT INTO t1 VALUES (2); @@ -150,51 +146,51 @@ slave-bin.000001 # Table_map # # table_id: # (test.t1) slave-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F slave-bin.000001 # Query # # COMMIT [SLAVE] ********* SOW RELAYLOG EVENTS IN ... ********* -show relaylog events in 'slave-relay-bin.000003' from ; +show relaylog events in 'slave-relay-bin.000002' from ; Log_name Pos Event_type Server_id End_log_pos Info -slave-relay-bin.000003 # Rotate # # master-bin.000001;pos=4 -slave-relay-bin.000003 # Format_desc # # SERVER_VERSION, BINLOG_VERSION -slave-relay-bin.000003 # Query # # use `test`; CREATE TABLE t1 (a INT) -slave-relay-bin.000003 # Query # # BEGIN -slave-relay-bin.000003 # Table_map # # table_id: # (test.t1) -slave-relay-bin.000003 # Write_rows # # table_id: # flags: STMT_END_F -slave-relay-bin.000003 # Query # # COMMIT -slave-relay-bin.000003 # Query # # BEGIN -slave-relay-bin.000003 # Table_map # # table_id: # (test.t1) -slave-relay-bin.000003 # Write_rows # # table_id: # flags: STMT_END_F -slave-relay-bin.000003 # Query # # COMMIT -slave-relay-bin.000003 # Query # # BEGIN -slave-relay-bin.000003 # Table_map # # table_id: # (test.t1) -slave-relay-bin.000003 # Write_rows # # table_id: # flags: STMT_END_F -slave-relay-bin.000003 # Query # # COMMIT -slave-relay-bin.000003 # Query # # BEGIN -slave-relay-bin.000003 # Table_map # # table_id: # (test.t1) -slave-relay-bin.000003 # Write_rows # # table_id: # flags: STMT_END_F -slave-relay-bin.000003 # Query # # COMMIT -slave-relay-bin.000003 # Query # # BEGIN -slave-relay-bin.000003 # Table_map # # table_id: # (test.t1) -slave-relay-bin.000003 # Write_rows # # table_id: # flags: STMT_END_F -slave-relay-bin.000003 # Query # # COMMIT -slave-relay-bin.000003 # Query # # BEGIN -slave-relay-bin.000003 # Table_map # # table_id: # (test.t1) -slave-relay-bin.000003 # Write_rows # # table_id: # flags: STMT_END_F -slave-relay-bin.000003 # Query # # COMMIT +slave-relay-bin.000002 # Rotate # # master-bin.000001;pos=4 +slave-relay-bin.000002 # Format_desc # # SERVER_VERSION, BINLOG_VERSION +slave-relay-bin.000002 # Query # # use `test`; CREATE TABLE t1 (a INT) +slave-relay-bin.000002 # Query # # BEGIN +slave-relay-bin.000002 # Table_map # # table_id: # (test.t1) +slave-relay-bin.000002 # Write_rows # # table_id: # flags: STMT_END_F +slave-relay-bin.000002 # Query # # COMMIT +slave-relay-bin.000002 # Query # # BEGIN +slave-relay-bin.000002 # Table_map # # table_id: # (test.t1) +slave-relay-bin.000002 # Write_rows # # table_id: # flags: STMT_END_F +slave-relay-bin.000002 # Query # # COMMIT +slave-relay-bin.000002 # Query # # BEGIN +slave-relay-bin.000002 # Table_map # # table_id: # (test.t1) +slave-relay-bin.000002 # Write_rows # # table_id: # flags: STMT_END_F +slave-relay-bin.000002 # Query # # COMMIT +slave-relay-bin.000002 # Query # # BEGIN +slave-relay-bin.000002 # Table_map # # table_id: # (test.t1) +slave-relay-bin.000002 # Write_rows # # table_id: # flags: STMT_END_F +slave-relay-bin.000002 # Query # # COMMIT +slave-relay-bin.000002 # Query # # BEGIN +slave-relay-bin.000002 # Table_map # # table_id: # (test.t1) +slave-relay-bin.000002 # Write_rows # # table_id: # flags: STMT_END_F +slave-relay-bin.000002 # Query # # COMMIT +slave-relay-bin.000002 # Query # # BEGIN +slave-relay-bin.000002 # Table_map # # table_id: # (test.t1) +slave-relay-bin.000002 # Write_rows # # table_id: # flags: STMT_END_F +slave-relay-bin.000002 # Query # # COMMIT [SLAVE] ********* SOW RELAYLOG EVENTS ********* show relaylog events from ; Log_name Pos Event_type Server_id End_log_pos Info -slave-relay-bin.000002 # Rotate # # slave-relay-bin.000003;pos=4 +slave-relay-bin.000001 # Rotate # # slave-relay-bin.000002;pos=4 [MASTER] ********* SOW RELAYLOG EVENTS ... LIMIT rows ********* -show relaylog events in 'slave-relay-bin.000003' from limit 3; +show relaylog events in 'slave-relay-bin.000002' from limit 3; Log_name Pos Event_type Server_id End_log_pos Info -slave-relay-bin.000003 # Rotate # # master-bin.000001;pos=4 -slave-relay-bin.000003 # Format_desc # # SERVER_VERSION, BINLOG_VERSION -slave-relay-bin.000003 # Query # # use `test`; CREATE TABLE t1 (a INT) +slave-relay-bin.000002 # Rotate # # master-bin.000001;pos=4 +slave-relay-bin.000002 # Format_desc # # SERVER_VERSION, BINLOG_VERSION +slave-relay-bin.000002 # Query # # use `test`; CREATE TABLE t1 (a INT) [MASTER] ********* SOW RELAYLOG EVENTS ... LIMIT offset,rows ********* -show relaylog events in 'slave-relay-bin.000003' from limit 1,3; +show relaylog events in 'slave-relay-bin.000002' from limit 1,3; Log_name Pos Event_type Server_id End_log_pos Info -slave-relay-bin.000003 # Format_desc # # SERVER_VERSION, BINLOG_VERSION -slave-relay-bin.000003 # Query # # use `test`; CREATE TABLE t1 (a INT) -slave-relay-bin.000003 # Query # # BEGIN +slave-relay-bin.000002 # Format_desc # # SERVER_VERSION, BINLOG_VERSION +slave-relay-bin.000002 # Query # # use `test`; CREATE TABLE t1 (a INT) +slave-relay-bin.000002 # Query # # BEGIN FLUSH LOGS; FLUSH LOGS; DROP TABLE t1; @@ -267,10 +263,11 @@ slave-bin.000001 # Rotate # # slave-bin.000002;pos=4 [SLAVE] ********* SOW RELAYLOG EVENTS IN ... ********* show relaylog events from ; Log_name Pos Event_type Server_id End_log_pos Info -slave-relay-bin.000005 # Rotate # # master-bin.000002;pos=4 -slave-relay-bin.000005 # Rotate # # slave-relay-bin.000006;pos=4 +slave-relay-bin.000004 # Rotate # # master-bin.000002;pos=4 +slave-relay-bin.000004 # Rotate # # slave-relay-bin.000005;pos=4 [SLAVE] ********* SOW RELAYLOG EVENTS ********* show relaylog events from ; Log_name Pos Event_type Server_id End_log_pos Info -slave-relay-bin.000005 # Rotate # # master-bin.000002;pos=4 -slave-relay-bin.000005 # Rotate # # slave-relay-bin.000006;pos=4 +slave-relay-bin.000004 # Rotate # # master-bin.000002;pos=4 +slave-relay-bin.000004 # Rotate # # slave-relay-bin.000005;pos=4 +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_sp001.result b/mysql-test/suite/rpl/r/rpl_row_sp001.result index 8c26c061376..17117ce2fac 100644 --- a/mysql-test/suite/rpl/r/rpl_row_sp001.result +++ b/mysql-test/suite/rpl/r/rpl_row_sp001.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] --------------------------------------------- @@ -83,3 +79,4 @@ DROP PROCEDURE test.p1; DROP PROCEDURE test.p2; DROP TABLE test.t1; DROP TABLE test.t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_sp002_innodb.result b/mysql-test/suite/rpl/r/rpl_row_sp002_innodb.result index a42c9af988c..f368cf6e356 100644 --- a/mysql-test/suite/rpl/r/rpl_row_sp002_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_row_sp002_innodb.result @@ -1,15 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -DROP 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; +include/master-slave.inc +[connection master] CREATE TABLE test.t1 (a INT AUTO_INCREMENT KEY, t CHAR(6)) ENGINE=INNODB; CREATE TABLE test.t2 (a INT AUTO_INCREMENT KEY, f INT, FOREIGN KEY(a) REFERENCES test.t1(a) ON DELETE CASCADE) ENGINE=INNODB; create procedure test.p1(IN i CHAR(6)) @@ -231,9 +221,10 @@ a t 98 NONE SET AUTOCOMMIT=1; SET FOREIGN_KEY_CHECKS=0; -DROP PROCEDURE IF EXISTS test.p3; -DROP PROCEDURE IF EXISTS test.p1; -DROP PROCEDURE IF EXISTS test.p2; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -DROP TABLE IF EXISTS test.t3; +DROP PROCEDURE test.p3; +DROP PROCEDURE test.p1; +DROP PROCEDURE test.p2; +DROP TABLE test.t1; +DROP TABLE test.t2; +DROP TABLE test.t3; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_sp003.result b/mysql-test/suite/rpl/r/rpl_row_sp003.result index c3e2dc57740..42acf21c836 100644 --- a/mysql-test/suite/rpl/r/rpl_row_sp003.result +++ b/mysql-test/suite/rpl/r/rpl_row_sp003.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP PROCEDURE IF EXISTS test.p1; DROP PROCEDURE IF EXISTS test.p2; DROP TABLE IF EXISTS test.t1; @@ -55,3 +51,4 @@ a DROP PROCEDURE IF EXISTS test.p1; DROP PROCEDURE IF EXISTS test.p2; DROP TABLE IF EXISTS test.t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_sp005.result b/mysql-test/suite/rpl/r/rpl_row_sp005.result index 58c53b394b2..0496fd6fe46 100644 --- a/mysql-test/suite/rpl/r/rpl_row_sp005.result +++ b/mysql-test/suite/rpl/r/rpl_row_sp005.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP PROCEDURE IF EXISTS test.p1; DROP PROCEDURE IF EXISTS test.p2; DROP TABLE IF EXISTS test.t2; @@ -100,3 +96,4 @@ DROP PROCEDURE IF EXISTS test.p2; DROP TABLE IF EXISTS test.t1; DROP TABLE IF EXISTS test.t2; DROP TABLE IF EXISTS test.t3; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_sp006_InnoDB.result b/mysql-test/suite/rpl/r/rpl_row_sp006_InnoDB.result index 079e750e2eb..2b3348270f1 100644 --- a/mysql-test/suite/rpl/r/rpl_row_sp006_InnoDB.result +++ b/mysql-test/suite/rpl/r/rpl_row_sp006_InnoDB.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t2; DROP PROCEDURE IF EXISTS p1; @@ -44,3 +40,4 @@ DROP TABLE t1; DROP TABLE t2; DROP PROCEDURE p1; DROP PROCEDURE p2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_sp007_innodb.result b/mysql-test/suite/rpl/r/rpl_row_sp007_innodb.result index 5a6a9ace4c5..4f5008aae65 100644 --- a/mysql-test/suite/rpl/r/rpl_row_sp007_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_row_sp007_innodb.result @@ -1,11 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -DROP PROCEDURE IF EXISTS test.p1; -DROP TABLE IF EXISTS test.t1; +include/master-slave.inc +[connection master] CREATE PROCEDURE test.p1(IN i INT) BEGIN DECLARE CONTINUE HANDLER FOR sqlexception BEGIN END; @@ -44,5 +38,6 @@ num SELECT * FROM test.t1; num 13 -DROP PROCEDURE IF EXISTS test.p1; -DROP TABLE IF EXISTS test.t1; +DROP PROCEDURE test.p1; +DROP TABLE test.t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_sp008.result b/mysql-test/suite/rpl/r/rpl_row_sp008.result index 23197964a24..f817e9c5f1b 100644 --- a/mysql-test/suite/rpl/r/rpl_row_sp008.result +++ b/mysql-test/suite/rpl/r/rpl_row_sp008.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP PROCEDURE IF EXISTS test.p1; DROP TABLE IF EXISTS test.t2; CREATE TABLE test.t1 (a INT,PRIMARY KEY(a)); @@ -32,3 +28,4 @@ a DROP PROCEDURE IF EXISTS test.p1; DROP TABLE IF EXISTS test.t1; DROP TABLE IF EXISTS test.t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_sp009.result b/mysql-test/suite/rpl/r/rpl_row_sp009.result index 35ce0d7b420..8e9a2cbb8e9 100644 --- a/mysql-test/suite/rpl/r/rpl_row_sp009.result +++ b/mysql-test/suite/rpl/r/rpl_row_sp009.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP PROCEDURE IF EXISTS test.p1; DROP TABLE IF EXISTS test.t1; DROP TABLE IF EXISTS test.t2; @@ -75,3 +71,4 @@ a DROP PROCEDURE test.p1; DROP TABLE test.t1; DROP TABLE test.t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_sp010.result b/mysql-test/suite/rpl/r/rpl_row_sp010.result index 02567465428..d31f37d8411 100644 --- a/mysql-test/suite/rpl/r/rpl_row_sp010.result +++ b/mysql-test/suite/rpl/r/rpl_row_sp010.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP PROCEDURE IF EXISTS test.p1; DROP PROCEDURE IF EXISTS test.p2; DROP PROCEDURE IF EXISTS test.p3; @@ -54,3 +50,4 @@ DROP PROCEDURE IF EXISTS test.p3; DROP PROCEDURE IF EXISTS test.p4; DROP TABLE IF EXISTS test.t1; DROP TABLE IF EXISTS test.t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_sp011.result b/mysql-test/suite/rpl/r/rpl_row_sp011.result index e35c9f21adb..8588d739dff 100644 --- a/mysql-test/suite/rpl/r/rpl_row_sp011.result +++ b/mysql-test/suite/rpl/r/rpl_row_sp011.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP PROCEDURE IF EXISTS test.p1; DROP PROCEDURE IF EXISTS test.p2; DROP PROCEDURE IF EXISTS test.p3; @@ -67,3 +63,4 @@ DROP PROCEDURE IF EXISTS test.p6; DROP PROCEDURE IF EXISTS test.p7; DROP TABLE IF EXISTS test.t1; DROP TABLE IF EXISTS test.t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_sp012.result b/mysql-test/suite/rpl/r/rpl_row_sp012.result index b9c818bad9a..57d92386638 100644 --- a/mysql-test/suite/rpl/r/rpl_row_sp012.result +++ b/mysql-test/suite/rpl/r/rpl_row_sp012.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP PROCEDURE IF EXISTS test.p1; DROP PROCEDURE IF EXISTS test.p2; DROP PROCEDURE IF EXISTS test.p3; @@ -57,3 +53,4 @@ DROP PROCEDURE IF EXISTS test.p2; DROP TABLE IF EXISTS test.t1; DROP TABLE IF EXISTS test.t2; DROP USER user1@localhost; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result b/mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result index 0e745feb3cd..45aff587a9a 100644 --- a/mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result +++ b/mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] STOP SLAVE; SET @my_sql_mode= @@global.sql_mode; SET GLOBAL SQL_MODE='STRICT_ALL_TABLES'; @@ -118,27 +114,21 @@ a b SELECT * FROM t2; a 2 -Checking that both slave threads are running. +include/check_slave_is_running.inc INSERT INTO t9 VALUES (4); INSERT INTO t4 VALUES (4); ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Column 0 of table 'test.t4' cannot be converted from type 'int' to type 'float' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1677] +Last_SQL_Error = 'Column 0 of table 'test.t4' cannot be converted from type 'int' to type 'float'' INSERT INTO t9 VALUES (5); INSERT INTO t5 VALUES (5,10,25); ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Column 1 of table 'test.t5' cannot be converted from type 'int' to type 'float' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1677] +Last_SQL_Error = 'Column 1 of table 'test.t5' cannot be converted from type 'int' to type 'float'' INSERT INTO t9 VALUES (6); INSERT INTO t6 VALUES (6,12,36); ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Column 2 of table 'test.t6' cannot be converted from type 'int' to type 'float' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1677] +Last_SQL_Error = 'Column 2 of table 'test.t6' cannot be converted from type 'int' to type 'float'' INSERT INTO t9 VALUES (6); -Checking that both slave threads are running. +include/check_slave_is_running.inc INSERT INTO t7 VALUES (1),(2),(3); INSERT INTO t8 VALUES (1),(2),(3); SELECT * FROM t7 ORDER BY a; @@ -194,3 +184,4 @@ a b x y z DROP TABLE IF EXISTS t1_int,t1_bit,t1_char,t1_nodef; DROP TABLE IF EXISTS t2,t3,t4,t5,t6,t7,t8,t9; SET @@global.sql_mode= @my_sql_mode; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result b/mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result index 7bd3be78c60..d8b513818dc 100644 --- a/mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result +++ b/mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] STOP SLAVE; SET @my_sql_mode= @@global.sql_mode; SET GLOBAL SQL_MODE='STRICT_ALL_TABLES'; @@ -118,27 +114,21 @@ a b SELECT * FROM t2; a 2 -Checking that both slave threads are running. +include/check_slave_is_running.inc INSERT INTO t9 VALUES (4); INSERT INTO t4 VALUES (4); ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Column 0 of table 'test.t4' cannot be converted from type 'int' to type 'float' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1677] +Last_SQL_Error = 'Column 0 of table 'test.t4' cannot be converted from type 'int' to type 'float'' INSERT INTO t9 VALUES (5); INSERT INTO t5 VALUES (5,10,25); ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Column 1 of table 'test.t5' cannot be converted from type 'int' to type 'float' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1677] +Last_SQL_Error = 'Column 1 of table 'test.t5' cannot be converted from type 'int' to type 'float'' INSERT INTO t9 VALUES (6); INSERT INTO t6 VALUES (6,12,36); ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Column 2 of table 'test.t6' cannot be converted from type 'int' to type 'float' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1677] +Last_SQL_Error = 'Column 2 of table 'test.t6' cannot be converted from type 'int' to type 'float'' INSERT INTO t9 VALUES (6); -Checking that both slave threads are running. +include/check_slave_is_running.inc INSERT INTO t7 VALUES (1),(2),(3); INSERT INTO t8 VALUES (1),(2),(3); SELECT * FROM t7 ORDER BY a; @@ -194,3 +184,4 @@ a b x y z DROP TABLE IF EXISTS t1_int,t1_bit,t1_char,t1_nodef; DROP TABLE IF EXISTS t2,t3,t4,t5,t6,t7,t8,t9; SET @@global.sql_mode= @my_sql_mode; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_tabledefs_7ndb.result b/mysql-test/suite/rpl/r/rpl_row_tabledefs_7ndb.result deleted file mode 100644 index 5876a0e1b65..00000000000 --- a/mysql-test/suite/rpl/r/rpl_row_tabledefs_7ndb.result +++ /dev/null @@ -1,288 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -STOP SLAVE; -SET @my_sql_mode= @@global.sql_mode; -SET GLOBAL SQL_MODE='STRICT_ALL_TABLES'; -START SLAVE; -CREATE TABLE t1_int (a INT PRIMARY KEY, b INT) ENGINE='NDB'; -CREATE TABLE t1_bit (a INT PRIMARY KEY, b INT) ENGINE='NDB'; -CREATE TABLE t1_char (a INT PRIMARY KEY, b INT) ENGINE='NDB'; -CREATE TABLE t1_nodef (a INT PRIMARY KEY, b INT) ENGINE='NDB'; -CREATE TABLE t2 (a INT PRIMARY KEY, b INT) ENGINE='NDB'; -CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE='NDB'; -CREATE TABLE t4 (a INT) ENGINE='NDB'; -CREATE TABLE t5 (a INT, b INT, c INT) ENGINE='NDB'; -CREATE TABLE t6 (a INT, b INT, c INT) ENGINE='NDB'; -CREATE TABLE t9 (a INT) ENGINE='NDB'; -ALTER TABLE t1_int ADD x INT DEFAULT 42; -ALTER TABLE t1_bit -ADD x BIT(3) DEFAULT b'011', -ADD y BIT(5) DEFAULT b'10101', -ADD z BIT(2) DEFAULT b'10'; -ALTER TABLE t1_char ADD x CHAR(20) DEFAULT 'Just a test'; -ALTER TABLE t1_nodef ADD x INT NOT NULL; -ALTER TABLE t2 DROP b; -ALTER TABLE t4 MODIFY a FLOAT; -ALTER TABLE t5 MODIFY b FLOAT; -ALTER TABLE t6 MODIFY c FLOAT; -INSERT INTO t1_int VALUES (2, 4, 4711); -INSERT INTO t1_char VALUES (2, 4, 'Foo is a bar'); -INSERT INTO t1_bit VALUES (2, 4, b'101', b'11100', b'01'); -**** On Master **** -INSERT INTO t1_int VALUES (1,2); -INSERT INTO t1_int VALUES (2,5); -INSERT INTO t1_bit VALUES (1,2); -INSERT INTO t1_bit VALUES (2,5); -INSERT INTO t1_char VALUES (1,2); -INSERT INTO t1_char VALUES (2,5); -SELECT * FROM t1_int; -a b -1 2 -2 5 -SELECT * FROM t1_bit; -a b -1 2 -2 5 -SELECT * FROM t1_char; -a b -1 2 -2 5 -**** On Slave **** -SELECT a,b,x FROM t1_int; -a b x -1 2 42 -2 5 42 -SELECT a,b,HEX(x),HEX(y),HEX(z) FROM t1_bit; -a b HEX(x) HEX(y) HEX(z) -1 2 3 15 2 -2 5 3 15 2 -SELECT a,b,x FROM t1_char; -a b x -1 2 Just a test -2 5 Just a test -**** On Master **** -UPDATE t1_int SET b=2*b WHERE a=2; -UPDATE t1_char SET b=2*b WHERE a=2; -UPDATE t1_bit SET b=2*b WHERE a=2; -SELECT * FROM t1_int; -a b -1 2 -2 10 -SELECT * FROM t1_bit; -a b -1 2 -2 10 -SELECT * FROM t1_char; -a b -1 2 -2 10 -**** On Slave **** -SELECT a,b,x FROM t1_int; -a b x -1 2 42 -2 10 42 -SELECT a,b,HEX(x),HEX(y),HEX(z) FROM t1_bit; -a b HEX(x) HEX(y) HEX(z) -1 2 3 15 2 -2 10 3 15 2 -SELECT a,b,x FROM t1_char; -a b x -1 2 Just a test -2 10 Just a test -INSERT INTO t9 VALUES (2); -INSERT INTO t1_nodef VALUES (1,2); -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 1364 -Last_Error Error in Write_rows event: error during transaction execution on table test.t1_nodef -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; -START SLAVE; -INSERT INTO t9 VALUES (2); -INSERT INTO t2 VALUES (2,4); -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 1514 -Last_Error Table width mismatch - received 2 columns, test.t2 has 1 columns -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; -START SLAVE; -INSERT INTO t9 VALUES (4); -INSERT INTO t4 VALUES (4); -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 1514 -Last_Error Column 0 type mismatch - received type 3, test.t4 has type 4 -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; -START SLAVE; -INSERT INTO t9 VALUES (5); -INSERT INTO t5 VALUES (5,10,25); -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 1514 -Last_Error Column 1 type mismatch - received type 3, test.t5 has type 4 -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; -START SLAVE; -INSERT INTO t9 VALUES (6); -INSERT INTO t6 VALUES (6,12,36); -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 1514 -Last_Error Column 2 type mismatch - received type 3, test.t6 has type 4 -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; -START SLAVE; -DROP TABLE IF EXISTS t1_int,t1_bit,t1_char,t1_nodef; -DROP TABLE IF EXISTS t2,t3,t4,t5,t6,t9; -SET @@global.sql_mode= @my_sql_mode; diff --git a/mysql-test/suite/rpl/r/rpl_row_tbl_metadata.result b/mysql-test/suite/rpl/r/rpl_row_tbl_metadata.result index 711d0d063aa..eaee105a2d9 100644 --- a/mysql-test/suite/rpl/r/rpl_row_tbl_metadata.result +++ b/mysql-test/suite/rpl/r/rpl_row_tbl_metadata.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP TABLE IF EXISTS `t1`; ### TABLE with field_metadata_size == 290 CREATE TABLE `t1` ( @@ -159,15 +155,10 @@ LOCK TABLES `t1` WRITE; INSERT INTO `t1`(c2) VALUES ('1'); FLUSH LOGS; ### assertion: the slave replicated event successfully and tables match -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DROP TABLE `t1`; === Using mysqlbinlog to detect failure. Before the patch mysqlbinlog would find a corrupted event, thence would fail. -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc ### action: generating several tables with different metadata ### sizes (resorting to perl) ### testing table with 249 field metadata size. @@ -182,25 +173,26 @@ start slave; ### testing table with 258 field metadata size. FLUSH LOGS; ### assertion: the slave replicated event successfully and tables match for t10 -Comparing tables master:test.t10 and slave:test.t10 +include/diff_tables.inc [master:t10, slave:t10] ### assertion: the slave replicated event successfully and tables match for t9 -Comparing tables master:test.t9 and slave:test.t9 +include/diff_tables.inc [master:t9, slave:t9] ### assertion: the slave replicated event successfully and tables match for t8 -Comparing tables master:test.t8 and slave:test.t8 +include/diff_tables.inc [master:t8, slave:t8] ### assertion: the slave replicated event successfully and tables match for t7 -Comparing tables master:test.t7 and slave:test.t7 +include/diff_tables.inc [master:t7, slave:t7] ### assertion: the slave replicated event successfully and tables match for t6 -Comparing tables master:test.t6 and slave:test.t6 +include/diff_tables.inc [master:t6, slave:t6] ### assertion: the slave replicated event successfully and tables match for t5 -Comparing tables master:test.t5 and slave:test.t5 +include/diff_tables.inc [master:t5, slave:t5] ### assertion: the slave replicated event successfully and tables match for t4 -Comparing tables master:test.t4 and slave:test.t4 +include/diff_tables.inc [master:t4, slave:t4] ### assertion: the slave replicated event successfully and tables match for t3 -Comparing tables master:test.t3 and slave:test.t3 +include/diff_tables.inc [master:t3, slave:t3] ### assertion: the slave replicated event successfully and tables match for t2 -Comparing tables master:test.t2 and slave:test.t2 +include/diff_tables.inc [master:t2, slave:t2] ### assertion: the slave replicated event successfully and tables match for t1 -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] ### assertion: check that binlog is not corrupt. Using mysqlbinlog to ### detect failure. Before the patch mysqlbinlog would find ### a corrupted event, thence would fail. +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_trig001.result b/mysql-test/suite/rpl/r/rpl_row_trig001.result index ea0ef27fccd..d00da976d30 100644 --- a/mysql-test/suite/rpl/r/rpl_row_trig001.result +++ b/mysql-test/suite/rpl/r/rpl_row_trig001.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CREATE TABLE test.t1 (n MEDIUMINT NOT NULL, d DATETIME, PRIMARY KEY(n)); CREATE TABLE test.t2 (n MEDIUMINT NOT NULL AUTO_INCREMENT, f FLOAT, d DATETIME, PRIMARY KEY(n)); CREATE TABLE test.t3 (n MEDIUMINT NOT NULL AUTO_INCREMENT, d DATETIME, PRIMARY KEY(n)); @@ -29,3 +25,4 @@ DROP TRIGGER test.t3_bi_t2; DROP TABLE test.t1; DROP TABLE test.t2; DROP TABLE test.t3; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_trig002.result b/mysql-test/suite/rpl/r/rpl_row_trig002.result index 794104db750..b0be0316bf2 100644 --- a/mysql-test/suite/rpl/r/rpl_row_trig002.result +++ b/mysql-test/suite/rpl/r/rpl_row_trig002.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP TRIGGER test.t2_ai; DROP TABLE IF EXISTS test.t1; DROP TABLE IF EXISTS test.t2; @@ -67,3 +63,4 @@ DROP TRIGGER test.t2_ai; DROP TABLE test.t1; DROP TABLE test.t2; DROP TABLE test.t3; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_trig003.result b/mysql-test/suite/rpl/r/rpl_row_trig003.result index 43c2ecde2b4..68552ede1c0 100644 --- a/mysql-test/suite/rpl/r/rpl_row_trig003.result +++ b/mysql-test/suite/rpl/r/rpl_row_trig003.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP TRIGGER test.t1_bi; DROP TRIGGER test.t2_ai; DROP TRIGGER test.t1_bu; @@ -81,3 +77,4 @@ DROP TRIGGER test.t2_ad; DROP TABLE IF EXISTS test.t1; DROP TABLE IF EXISTS test.t2; DROP TABLE IF EXISTS test.t3; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_trig004.result b/mysql-test/suite/rpl/r/rpl_row_trig004.result index d0d0657f875..50317b55e2e 100644 --- a/mysql-test/suite/rpl/r/rpl_row_trig004.result +++ b/mysql-test/suite/rpl/r/rpl_row_trig004.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP TRIGGER test.t1_bi_t2; DROP TABLE IF EXISTS test.t1; DROP TABLE IF EXISTS test.t2; @@ -28,3 +24,4 @@ n f DROP TRIGGER test.t1_bi_t2; DROP TABLE test.t1; DROP TABLE test.t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_trunc_temp.result b/mysql-test/suite/rpl/r/rpl_row_trunc_temp.result index f9181be9bc0..d3b892326ac 100644 --- a/mysql-test/suite/rpl/r/rpl_row_trunc_temp.result +++ b/mysql-test/suite/rpl/r/rpl_row_trunc_temp.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CREATE TEMPORARY TABLE t1(c1 INTEGER); CREATE TABLE t2(c1 INTEGER); CREATE TABLE t1(c1 INTEGER); @@ -27,3 +23,4 @@ SELECT * FROM t2; c1 DROP TABLE t1; DROP TABLE t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_unsafe_funcs.result b/mysql-test/suite/rpl/r/rpl_row_unsafe_funcs.result index 800670b78ae..b9ae1893629 100644 --- a/mysql-test/suite/rpl/r/rpl_row_unsafe_funcs.result +++ b/mysql-test/suite/rpl/r/rpl_row_unsafe_funcs.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CREATE TABLE t1 (a INT); CREATE TABLE t2 (a INT, b INT); INSERT INTO t1 SELECT 1; @@ -20,3 +16,4 @@ b 1 3 DROP TABLE t1, t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_until.result b/mysql-test/suite/rpl/r/rpl_row_until.result index 81aeb0d645b..5629f5c8cdd 100644 --- a/mysql-test/suite/rpl/r/rpl_row_until.result +++ b/mysql-test/suite/rpl/r/rpl_row_until.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CREATE TABLE t1(n INT NOT NULL AUTO_INCREMENT PRIMARY KEY); INSERT INTO t1 VALUES (1),(2),(3),(4); DROP TABLE t1; @@ -14,27 +10,37 @@ DROP TABLE t2; include/stop_slave.inc RESET SLAVE; START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=master_pos_drop_t1 +include/wait_for_slave_sql_to_stop.inc SELECT * FROM t1; n 1 2 3 4 +include/check_slave_param.inc [Exec_Master_Log_Pos] START SLAVE UNTIL MASTER_LOG_FILE='master-no-such-bin.000001', MASTER_LOG_POS=MASTER_LOG_POS; +include/wait_for_slave_sql_to_stop.inc SELECT * FROM t1; n 1 2 3 4 +include/check_slave_param.inc [Exec_Master_Log_Pos] START SLAVE UNTIL RELAY_LOG_FILE='slave-relay-bin.000002', RELAY_LOG_POS=relay_pos_insert1_t2 +include/wait_for_slave_sql_to_stop.inc SELECT * FROM t2; n 1 2 +include/check_slave_param.inc [Exec_Master_Log_Pos] START SLAVE; +include/wait_for_slave_to_start.inc include/stop_slave.inc START SLAVE SQL_THREAD UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=master_pos_create_t2 +include/wait_for_slave_param.inc [Until_Log_Pos] +include/wait_for_slave_sql_to_stop.inc +include/check_slave_param.inc [Exec_Master_Log_Pos] START SLAVE UNTIL MASTER_LOG_FILE='master-bin', MASTER_LOG_POS=MASTER_LOG_POS; ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=MASTER_LOG_POS, RELAY_LOG_POS=RELAY_LOG_POS; @@ -49,3 +55,6 @@ START SLAVE; START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=MASTER_LOG_POS; Warnings: Note 1254 Slave is already running +include/stop_slave.inc +RESET SLAVE; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_utf16.result b/mysql-test/suite/rpl/r/rpl_row_utf16.result index f7e66dd92ee..cca69e1da82 100644 --- a/mysql-test/suite/rpl/r/rpl_row_utf16.result +++ b/mysql-test/suite/rpl/r/rpl_row_utf16.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CREATE TABLE t1(c1 CHAR(10) CHARACTER SET utf16 DEFAULT 'ola'); INSERT INTO t1 VALUES ('abc'); INSERT INTO t1 VALUES (); @@ -19,5 +15,6 @@ c1 abc hex(c1) 006100620063 c1 ola hex(c1) 006F006C0061 -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1,slave:t1] DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_utf32.result b/mysql-test/suite/rpl/r/rpl_row_utf32.result index e07db9c9e48..0a212544113 100644 --- a/mysql-test/suite/rpl/r/rpl_row_utf32.result +++ b/mysql-test/suite/rpl/r/rpl_row_utf32.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] SET SQL_LOG_BIN=0; CREATE TABLE t1 (c1 char(255) DEFAULT NULL, KEY c1 (c1)) DEFAULT CHARSET=utf32; Warnings: @@ -23,3 +19,4 @@ DROP TABLE t1; SET GLOBAL SLAVE_TYPE_CONVERSIONS= @saved_slave_type_conversions; include/stop_slave.inc include/start_slave.inc +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_view01.result b/mysql-test/suite/rpl/r/rpl_row_view01.result index 4dfe5826f32..471de20ea6d 100644 --- a/mysql-test/suite/rpl/r/rpl_row_view01.result +++ b/mysql-test/suite/rpl/r/rpl_row_view01.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create database if not exists mysqltest1; DROP VIEW IF EXISTS mysqltest1.v1; DROP VIEW IF EXISTS mysqltest1.v2; @@ -102,3 +98,4 @@ DROP TABLE IF EXISTS mysqltest1.t2; DROP TABLE IF EXISTS mysqltest1.t4; DROP TABLE IF EXISTS mysqltest1.t10; DROP DATABASE mysqltest1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_wide_table.result b/mysql-test/suite/rpl/r/rpl_row_wide_table.result index da96e84d1d5..f469a13837c 100644 --- a/mysql-test/suite/rpl/r/rpl_row_wide_table.result +++ b/mysql-test/suite/rpl/r/rpl_row_wide_table.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP TABLE IF EXISTS t300; create table t300 ( f1 int, @@ -316,3 +312,4 @@ one 1 *** Cleanup *** DROP TABLE t300; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_savepoint.result b/mysql-test/suite/rpl/r/rpl_savepoint.result index e1462f435a3..75eb0f307bb 100644 --- a/mysql-test/suite/rpl/r/rpl_savepoint.result +++ b/mysql-test/suite/rpl/r/rpl_savepoint.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] # # Bug#50124 Rpl failure on DROP table with concurrent txn/non-txn # DML flow and SAVEPOINT @@ -30,3 +26,4 @@ COMMIT; FLUSH LOGS; # Connection master DROP TABLE nt; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_semi_sync.result b/mysql-test/suite/rpl/r/rpl_semi_sync.result index 74eb14d33e0..0c3a98d5d90 100644 --- a/mysql-test/suite/rpl/r/rpl_semi_sync.result +++ b/mysql-test/suite/rpl/r/rpl_semi_sync.result @@ -1,21 +1,9 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] # # Uninstall semi-sync plugins on master and slave # include/stop_slave.inc -reset slave; -UNINSTALL PLUGIN rpl_semi_sync_slave; -UNINSTALL PLUGIN rpl_semi_sync_master; -reset master; -set sql_log_bin=0; -UNINSTALL PLUGIN rpl_semi_sync_slave; -UNINSTALL PLUGIN rpl_semi_sync_master; -set sql_log_bin=1; # # Main test of semi-sync replication start here # @@ -453,7 +441,9 @@ Rpl_semi_sync_slave_status OFF include/stop_slave.inc UNINSTALL PLUGIN rpl_semi_sync_slave; UNINSTALL PLUGIN rpl_semi_sync_master; +change master to master_user='root',master_password=''; include/start_slave.inc drop table t1; drop user rpl@127.0.0.1; flush privileges; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_semi_sync_event.result b/mysql-test/suite/rpl/r/rpl_semi_sync_event.result index f3f5aa1559d..1c6d73fe681 100644 --- a/mysql-test/suite/rpl/r/rpl_semi_sync_event.result +++ b/mysql-test/suite/rpl/r/rpl_semi_sync_event.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] include/stop_slave.inc include/start_slave.inc SET GLOBAL event_scheduler = ON; @@ -44,3 +40,4 @@ include/start_slave.inc DROP EVENT ev1; DROP EVENT ev2; DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_server_id1.result b/mysql-test/suite/rpl/r/rpl_server_id1.result index 76f187e3b01..80e5bbae146 100644 --- a/mysql-test/suite/rpl/r/rpl_server_id1.result +++ b/mysql-test/suite/rpl/r/rpl_server_id1.result @@ -1,13 +1,7 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -reset master; -include/stop_slave.inc -change master to master_port=SLAVE_PORT; -start slave; -*** must be having the replicate-same-server-id IO thread error *** -Slave_IO_Errno= 1593 -Slave_IO_Error= Fatal error: The slave I/O thread stops because master and slave have equal MySQL server ids; these ids must be different for replication to work (or the --replicate-same-server-id option must be used on slave but this does not always make sense; please check the manual before using it). +include/rpl_init.inc [topology=2->2] +START SLAVE; +include/wait_for_slave_io_error.inc [errno=1593] +Last_IO_Error = 'Fatal error: The slave I/O thread stops because master and slave have equal MySQL server ids; these ids must be different for replication to work (or the --replicate-same-server-id option must be used on slave but this does not always make sense; please check the manual before using it).' +include/stop_slave_sql.inc +RESET SLAVE; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_server_id2.result b/mysql-test/suite/rpl/r/rpl_server_id2.result index bb5a175fbfe..ce1f54dbf85 100644 --- a/mysql-test/suite/rpl/r/rpl_server_id2.result +++ b/mysql-test/suite/rpl/r/rpl_server_id2.result @@ -1,26 +1,27 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create table t1 (n int); reset master; stop slave; +include/wait_for_slave_to_stop.inc change master to master_port=SLAVE_PORT; start slave; +include/wait_for_slave_to_start.inc insert into t1 values (1); select * from t1; n 1 1 stop slave; +include/wait_for_slave_to_stop.inc drop table t1; reset master; create table t1(n int); create table t2(n int); change master to master_port=MASTER_PORT; start slave until master_log_file='master-bin.000001', master_log_pos=UNTIL_POS; +include/wait_for_slave_io_to_start.inc +include/wait_for_slave_sql_to_stop.inc *** checking until postion execution: must be only t1 in the list *** show tables; Tables_in_test @@ -28,3 +29,4 @@ t1 start slave sql_thread; drop table t1; drop table t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_server_id_ignore.result b/mysql-test/suite/rpl/r/rpl_server_id_ignore.result index cba6571eb1a..0a4f414ad6e 100644 --- a/mysql-test/suite/rpl/r/rpl_server_id_ignore.result +++ b/mysql-test/suite/rpl/r/rpl_server_id_ignore.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] master_id: 1 stop slave; *** --replicate-same-server-id and change master option can clash *** @@ -25,11 +21,13 @@ ignore server id list: 1, 3, 4, 5 *** ignore master (server 1) queries for a while *** start slave; create table t1 (n int); +include/wait_for_slave_param.inc [Exec_Master_Log_Pos] *** must be empty as the event is to be filtered out *** show tables; Tables_in_test *** allowing events from master *** stop slave; +include/wait_for_slave_to_stop.inc reset slave; change master to IGNORE_SERVER_IDS= (10, 100); *** the list must remain (10, 100) after reset slave *** @@ -44,3 +42,4 @@ Tables_in_test t1 drop table t1; end of the tests +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_session_var.result b/mysql-test/suite/rpl/r/rpl_session_var.result index 297a18a5931..030ae161b22 100644 --- a/mysql-test/suite/rpl/r/rpl_session_var.result +++ b/mysql-test/suite/rpl/r/rpl_session_var.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] drop table if exists t1; Warnings: Note 1051 Unknown table 't1' @@ -51,3 +47,4 @@ SELECT length(data) < 100 FROM t1; length(data) < 100 1 drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_set_charset.result b/mysql-test/suite/rpl/r/rpl_set_charset.result index 480d926fbba..fa30a361d13 100644 --- a/mysql-test/suite/rpl/r/rpl_set_charset.result +++ b/mysql-test/suite/rpl/r/rpl_set_charset.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] drop database if exists mysqltest1; create database mysqltest1 /*!40100 character set latin2 */; use mysqltest1; @@ -46,3 +42,4 @@ D0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF D0 E0E1E2E3E4E5E6E7E8E9EAEBECEDEEEF E0 F0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF F0 drop database mysqltest1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_set_null_innodb.result b/mysql-test/suite/rpl/r/rpl_set_null_innodb.result index 41600a5fe1b..f099b2b7691 100644 --- a/mysql-test/suite/rpl/r/rpl_set_null_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_set_null_innodb.result @@ -1,35 +1,22 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] +include/rpl_reset.inc CREATE TABLE t1 (c1 BIT, c2 INT) Engine=InnoDB; INSERT INTO `t1` VALUES ( 1, 1 ); UPDATE t1 SET c1=NULL where c2=1; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DELETE FROM t1 WHERE c2=1 LIMIT 1; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DROP TABLE t1; -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc CREATE TABLE t1 (c1 CHAR) Engine=InnoDB; INSERT INTO t1 ( c1 ) VALUES ( 'w' ) ; SELECT * FROM t1; c1 w UPDATE t1 SET c1=NULL WHERE c1='w'; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DELETE FROM t1 LIMIT 2; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_set_null_myisam.result b/mysql-test/suite/rpl/r/rpl_set_null_myisam.result index cbd7010664a..5698be4ff0c 100644 --- a/mysql-test/suite/rpl/r/rpl_set_null_myisam.result +++ b/mysql-test/suite/rpl/r/rpl_set_null_myisam.result @@ -1,35 +1,22 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] +include/rpl_reset.inc CREATE TABLE t1 (c1 BIT, c2 INT) Engine=MyISAM; INSERT INTO `t1` VALUES ( 1, 1 ); UPDATE t1 SET c1=NULL where c2=1; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DELETE FROM t1 WHERE c2=1 LIMIT 1; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DROP TABLE t1; -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc CREATE TABLE t1 (c1 CHAR) Engine=MyISAM; INSERT INTO t1 ( c1 ) VALUES ( 'w' ) ; SELECT * FROM t1; c1 w UPDATE t1 SET c1=NULL WHERE c1='w'; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DELETE FROM t1 LIMIT 2; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_show_slave_hosts.result b/mysql-test/suite/rpl/r/rpl_show_slave_hosts.result index 9838d8b08a8..107cd8f63cc 100644 --- a/mysql-test/suite/rpl/r/rpl_show_slave_hosts.result +++ b/mysql-test/suite/rpl/r/rpl_show_slave_hosts.result @@ -1,17 +1,16 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] RESET SLAVE; CHANGE MASTER TO master_host='127.0.0.1',master_port=MASTER_PORT,master_user='root'; START SLAVE IO_THREAD; +include/wait_for_slave_io_to_start.inc SHOW SLAVE HOSTS; Server_id Host Port Master_id 3 slave2 DEFAULT_PORT 1 2 SLAVE_PORT 1 STOP SLAVE IO_THREAD; +include/wait_for_slave_io_to_stop.inc SHOW SLAVE HOSTS; Server_id Host Port Master_id 2 SLAVE_PORT 1 +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_show_slave_running.result b/mysql-test/suite/rpl/r/rpl_show_slave_running.result index 556acb14e5c..599290ac776 100644 --- a/mysql-test/suite/rpl/r/rpl_show_slave_running.result +++ b/mysql-test/suite/rpl/r/rpl_show_slave_running.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] SET DEBUG_SYNC= 'RESET'; include/stop_slave.inc set global debug= 'd,dbug.before_get_running_status_yes'; @@ -21,6 +17,7 @@ Slave_running OFF Slave_IO_Running= Connecting Slave_SQL_Running= No SET DEBUG_SYNC='now SIGNAL signal.io_thread_let_running'; +include/wait_for_slave_param.inc [Slave_IO_Running] Slave_running, Slave_IO_Running, Slave_SQL_Running must be OFF YES NO in three following queries SHOW STATUS LIKE 'Slave_running'; Variable_name Value @@ -28,6 +25,7 @@ Slave_running OFF Slave_IO_Running= Yes Slave_SQL_Running= No start slave sql_thread; +include/wait_for_slave_sql_to_start.inc Slave_running, Slave_IO_Running, Slave_SQL_Running must be ON, YES, YES in three following queries SHOW STATUS LIKE 'Slave_running'; Variable_name Value @@ -37,3 +35,4 @@ Slave_SQL_Running= Yes set global debug= ''; SET DEBUG_SYNC= 'RESET'; End of tests +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_skip_error.result b/mysql-test/suite/rpl/r/rpl_skip_error.result index 0aa8069a38c..d46338fd5b0 100644 --- a/mysql-test/suite/rpl/r/rpl_skip_error.result +++ b/mysql-test/suite/rpl/r/rpl_skip_error.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] ==== Test Without sql_mode=strict_trans_tables ==== [on master] create table t1 (n int not null primary key); @@ -31,7 +27,7 @@ n 3 7 8 -Checking that both slave threads are running. +include/check_slave_is_running.inc ==== Clean Up ==== drop table t1; create table t1(a int primary key); @@ -46,7 +42,7 @@ select * from t1; a 1 2 -Checking that both slave threads are running. +include/check_slave_is_running.inc ==== Clean Up ==== drop table t1; ==== Using Innodb ==== @@ -112,3 +108,4 @@ UPDATE t2 SET id= id + 3, data = 2; ==== Clean Up ==== DROP TABLE t1; DROP TABLE t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_slave_grp_exec.result b/mysql-test/suite/rpl/r/rpl_slave_grp_exec.result index eb3c4ef5978..25deb65fa0f 100644 --- a/mysql-test/suite/rpl/r/rpl_slave_grp_exec.result +++ b/mysql-test/suite/rpl/r/rpl_slave_grp_exec.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] *** Preparing data *** CREATE TABLE t1 (a INT NOT NULL, b VARCHAR(10)) ENGINE=MyISAM; @@ -33,6 +29,7 @@ a b SELECT * FROM t3 ORDER BY a; a b 1 ZZ +include/wait_for_slave_sql_error.inc [errno=1146] SHOW TABLES LIKE 't%'; Tables_in_test (t%) t1 @@ -44,7 +41,7 @@ a b SELECT * FROM t2 ORDER BY a; a b 1 AA_for_row_or_YY_for_stmt_mixed -include/stop_slave.inc +include/stop_slave_io.inc RENAME TABLE t3_bak TO t3; include/start_slave.inc TRUNCATE t1; @@ -60,6 +57,7 @@ INSERT INTO t3 VALUES(2, 'B'); INSERT INTO t2 VALUES(2, 'B'); INSERT INTO t1 VALUES(2, 'B'); UPDATE t1 SET b = 'X' WHERE a = 2; +include/wait_for_slave_sql_error.inc [errno=1146] SELECT * FROM t1 ORDER BY a; a b 2 X @@ -78,7 +76,7 @@ SELECT * FROM t1 ORDER BY a; a b SELECT * FROM t2 ORDER BY a; a b -include/stop_slave.inc +include/stop_slave_io.inc RENAME TABLE t3_bak TO t3; include/start_slave.inc TRUNCATE t1; @@ -95,6 +93,7 @@ INSERT INTO t1 VALUES (3, 'C'), (4, 'D'); INSERT INTO t2 VALUES (3, 'C'), (4, 'D'); INSERT INTO t3 VALUES (3, 'C'), (4, 'D'); COMMIT; +include/wait_for_slave_sql_error.inc [errno=1146] SELECT * FROM t1 ORDER BY a; a b 3 C @@ -116,8 +115,9 @@ SELECT * FROM t1 ORDER BY a; a b SELECT * FROM t2 ORDER BY a; a b -include/stop_slave.inc +include/stop_slave_io.inc RENAME TABLE t3_bak TO t3; include/start_slave.inc *** Clean up *** DROP TABLE t1,t2,t3; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_slave_load_in.result b/mysql-test/suite/rpl/r/rpl_slave_load_in.result index 2cc83fd0a19..504f6f60d9e 100644 --- a/mysql-test/suite/rpl/r/rpl_slave_load_in.result +++ b/mysql-test/suite/rpl/r/rpl_slave_load_in.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create table t1(a int not null auto_increment, b int, primary key(a)); create table t2(a int not null auto_increment, b int, primary key(a)) engine=innodb; load data infile '../../std_data/rpl_loaddata.dat' into table t1; @@ -13,7 +9,8 @@ insert into t2(b) values (2); load data infile '../../std_data/rpl_loaddata.dat' into table t2; load data infile '../../std_data/rpl_loaddata.dat' into table t2; commit; -Comparing tables master:test.t1 and slave:test.t1 -Comparing tables master:test.t2 and slave:test.t2 +include/diff_tables.inc [master:t1, slave:t1] +include/diff_tables.inc [master:t2, slave:t2] drop table t1; drop table t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result b/mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result index 85fbcb69760..a7d745251d1 100644 --- a/mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result +++ b/mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result @@ -1,16 +1,17 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create table t1(a int not null auto_increment, b int, primary key(a)) engine=innodb; start transaction; insert into t1(b) values (1); insert into t1(b) values (2); load data infile '../../std_data/rpl_loaddata.dat' into table t1; commit; +include/wait_for_slave_sql_to_stop.inc drop table t1; +include/sync_slave_io_with_master.inc +include/stop_slave_io.inc +RESET SLAVE; drop table t1; call mtr.add_suppression("Slave: Can't get stat of .*"); call mtr.add_suppression("Slave: File.* not found.*"); +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_slave_load_tmpdir_not_exist.result b/mysql-test/suite/rpl/r/rpl_slave_load_tmpdir_not_exist.result index 3ed14a9cb6b..8cd6218dcdc 100644 --- a/mysql-test/suite/rpl/r/rpl_slave_load_tmpdir_not_exist.result +++ b/mysql-test/suite/rpl/r/rpl_slave_load_tmpdir_not_exist.result @@ -1,6 +1,7 @@ -CHANGE MASTER TO MASTER_USER='root', -MASTER_CONNECT_RETRY=1, -MASTER_HOST='127.0.0.1', -MASTER_PORT=MASTER_MYPORT; +include/master-slave.inc +[connection master] START SLAVE; -12 +include/wait_for_slave_sql_error.inc [errno=12] +include/stop_slave_io.inc +RESET SLAVE; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_slave_skip.result b/mysql-test/suite/rpl/r/rpl_slave_skip.result index 5feba69b64d..a1884731a3e 100644 --- a/mysql-test/suite/rpl/r/rpl_slave_skip.result +++ b/mysql-test/suite/rpl/r/rpl_slave_skip.result @@ -1,11 +1,8 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] **** On Slave **** STOP SLAVE; +include/wait_for_slave_to_stop.inc **** On Master **** SET SESSION BINLOG_FORMAT=ROW; CREATE TABLE t1 (a INT, b INT) ENGINE=MyISAM; @@ -43,8 +40,12 @@ c d 3 18 **** On Slave **** START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=MASTER_LOG_POS; +include/wait_for_slave_sql_to_stop.inc +include/check_slave_param.inc [Exec_Master_Log_Pos] +include/check_slave_no_error.inc SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; START SLAVE; +include/wait_for_slave_to_start.inc SELECT * FROM t1; a b 1 1 @@ -56,6 +57,7 @@ c d 2 8 3 27 STOP SLAVE; +include/wait_for_slave_to_stop.inc RESET SLAVE; RESET MASTER; SET SESSION BINLOG_FORMAT=STATEMENT; @@ -68,8 +70,10 @@ master-bin.000001 # User var # # @`foo`=12 master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES(@foo, 2*@foo) master-bin.000001 # Query # # COMMIT START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=MASTER_LOG_POS; +include/wait_for_slave_sql_to_stop.inc SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; START SLAVE; +include/wait_for_slave_to_start.inc **** On Master **** DROP TABLE t1, t2; SET SESSION BINLOG_FORMAT=ROW; @@ -281,3 +285,4 @@ include/start_slave.inc SELECT * FROM t10 ORDER BY a; a b DROP TABLE t10; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_slave_status.result b/mysql-test/suite/rpl/r/rpl_slave_status.result index 315008d559a..be978362c81 100644 --- a/mysql-test/suite/rpl/r/rpl_slave_status.result +++ b/mysql-test/suite/rpl/r/rpl_slave_status.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] ==== Create new replication user ==== [on master] GRANT REPLICATION SLAVE ON *.* TO rpl@127.0.0.1 IDENTIFIED BY 'rpl'; @@ -27,10 +23,14 @@ FLUSH PRIVILEGES; ==== Restart slave without privileges ===== include/stop_slave.inc START SLAVE; -==== Verify that Slave_IO_Running = No ==== -Slave_IO_Running = No (should be No) +include/wait_for_slave_sql_to_start.inc +include/wait_for_slave_io_to_stop.inc +==== Verify that Slave IO thread stopped with error ==== +include/wait_for_slave_io_error.inc [errno=1045] ==== Cleanup (Note that slave IO thread is not running) ==== -DROP TABLE t1; +include/stop_slave_sql.inc +CHANGE MASTER TO MASTER_USER = 'root', MASTER_PASSWORD = ''; +include/rpl_reset.inc [on master] DROP TABLE t1; -call mtr.force_restart(); +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_slow_query_log.result b/mysql-test/suite/rpl/r/rpl_slow_query_log.result index 0b35cf68e96..668a99ffe1b 100644 --- a/mysql-test/suite/rpl/r/rpl_slow_query_log.result +++ b/mysql-test/suite/rpl/r/rpl_slow_query_log.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); include/stop_slave.inc SET @old_log_output= @@log_output; @@ -46,12 +42,7 @@ include/stop_slave.inc SET GLOBAL long_query_time= @old_long_query_time; SET GLOBAL log_output= @old_log_output; include/start_slave.inc -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc SET @old_log_output= @@log_output; SET GLOBAL log_output= 'TABLE'; SET GLOBAL long_query_time= 2; @@ -89,3 +80,4 @@ SET @@global.long_query_time= @old_long_query_time; DROP TABLE t1; SET @@global.log_output= @old_log_output; SET @@global.long_query_time= @old_long_query_time; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_sp.result b/mysql-test/suite/rpl/r/rpl_sp.result index 7d1d050e56b..4b9e768861d 100644 --- a/mysql-test/suite/rpl/r/rpl_sp.result +++ b/mysql-test/suite/rpl/r/rpl_sp.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] drop database if exists mysqltest1; create database mysqltest1; use mysqltest1; @@ -1238,14 +1234,7 @@ ERROR 42000: FUNCTION test.f1 does not exist # # Bug #11918 Can't use a declared variable in LIMIT clause # -drop table if exists t1; -drop procedure if exists p1; -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc create table t1 (c1 int); insert into t1 (c1) values (1), (2), (3), (4), (5), (6), (7), (8), (9), (10); @@ -1281,3 +1270,4 @@ set @@session.binlog_format=@save_binlog_format; drop table t1; drop procedure p1; # End of 5.5 tests. +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_sp004.result b/mysql-test/suite/rpl/r/rpl_sp004.result index 1c0ed3cc50a..5b67d225490 100644 --- a/mysql-test/suite/rpl/r/rpl_sp004.result +++ b/mysql-test/suite/rpl/r/rpl_sp004.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP PROCEDURE IF EXISTS test.p1; DROP PROCEDURE IF EXISTS test.p2; DROP TABLE IF EXISTS test.t2; @@ -91,3 +87,4 @@ DROP PROCEDURE IF EXISTS test.p2; DROP TABLE IF EXISTS test.t1; DROP TABLE IF EXISTS test.t2; DROP TABLE IF EXISTS test.t3; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_sp_effects.result b/mysql-test/suite/rpl/r/rpl_sp_effects.result index d9cdfd81167..a6e3ae03963 100644 --- a/mysql-test/suite/rpl/r/rpl_sp_effects.result +++ b/mysql-test/suite/rpl/r/rpl_sp_effects.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] SET @old_log_bin_trust_function_creators= @@global.log_bin_trust_function_creators; drop procedure if exists p1; drop procedure if exists p2; @@ -278,3 +274,4 @@ drop procedure sp_bug26199; drop function sf_bug26199; SET @@global.log_bin_trust_function_creators= @old_log_bin_trust_function_creators; end of the tests +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_spec_variables.result b/mysql-test/suite/rpl/r/rpl_spec_variables.result index ea2778bf71c..785913134a7 100644 --- a/mysql-test/suite/rpl/r/rpl_spec_variables.result +++ b/mysql-test/suite/rpl/r/rpl_spec_variables.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] * auto_increment_increment, auto_increment_offset * SET @@global.auto_increment_increment=2; @@ -173,7 +169,7 @@ t1 CREATE TABLE `t1` ( `a` int(11) NOT NULL, `b` varchar(10) DEFAULT NULL, PRIMARY KEY (`a`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 +) ENGINE=InnoDB DEFAULT CHARSET=latin1 SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( @@ -223,3 +219,4 @@ SET @@global.max_heap_table_size=@restore_slave_max_heap_table_size; SET @@global.storage_engine=@restore_slave_storage_engine; call mtr.add_suppression("The table 't[12]' is full"); +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_sporadic_master.result b/mysql-test/suite/rpl/r/rpl_sporadic_master.result index 14fb673a081..1ec94964acf 100644 --- a/mysql-test/suite/rpl/r/rpl_sporadic_master.result +++ b/mysql-test/suite/rpl/r/rpl_sporadic_master.result @@ -1,16 +1,12 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create table t2(n int); create table t1(n int not null auto_increment primary key); insert into t1 values (NULL),(NULL); truncate table t1; insert into t1 values (4),(NULL); -stop slave; -start slave; +include/stop_slave.inc +include/start_slave.inc insert into t1 values (NULL),(NULL); flush logs; truncate table t1; @@ -24,3 +20,4 @@ n 14 15 drop table t1,t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_ssl.result b/mysql-test/suite/rpl/r/rpl_ssl.result index 1af4c5e227c..35aaabc8c56 100644 --- a/mysql-test/suite/rpl/r/rpl_ssl.result +++ b/mysql-test/suite/rpl/r/rpl_ssl.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] grant replication slave on *.* to replssl@localhost require ssl; create table t1 (t int auto_increment, KEY(t)); stop slave; @@ -19,23 +15,32 @@ insert into t1 values(1); select * from t1; t 1 -Master_SSL_Allowed Yes -Master_SSL_CA_Path -Master_SSL_CA_File MYSQL_TEST_DIR/std_data/cacert.pem -Master_SSL_Cert MYSQL_TEST_DIR/std_data/client-cert.pem -Master_SSL_Key MYSQL_TEST_DIR/std_data/client-key.pem -Checking that both slave threads are running. +Master_SSL_Allowed = 'Yes' +Master_SSL_CA_Path = '' +Master_SSL_CA_File = 'MYSQL_TEST_DIR/std_data/cacert.pem' +Master_SSL_Cert = 'MYSQL_TEST_DIR/std_data/client-cert.pem' +Master_SSL_Key = 'MYSQL_TEST_DIR/std_data/client-key.pem' +include/check_slave_is_running.inc STOP SLAVE; select * from t1; t 1 insert into t1 values (NULL); -Master_SSL_Allowed Yes -Master_SSL_CA_Path -Master_SSL_CA_File MYSQL_TEST_DIR/std_data/cacert.pem -Master_SSL_Cert MYSQL_TEST_DIR/std_data/client-cert.pem -Master_SSL_Key MYSQL_TEST_DIR/std_data/client-key.pem -Checking that both slave threads are running. +include/wait_for_slave_to_start.inc +Master_SSL_Allowed = 'Yes' +Master_SSL_CA_Path = '' +Master_SSL_CA_File = 'MYSQL_TEST_DIR/std_data/cacert.pem' +Master_SSL_Cert = 'MYSQL_TEST_DIR/std_data/client-cert.pem' +Master_SSL_Key = 'MYSQL_TEST_DIR/std_data/client-key.pem' +include/check_slave_is_running.inc drop user replssl@localhost; drop table t1; +include/stop_slave.inc +CHANGE MASTER TO +master_user = 'root', +master_ssl = 0, +master_ssl_ca = '', +master_ssl_cert = '', +master_ssl_key = ''; End of 5.0 tests +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_ssl1.result b/mysql-test/suite/rpl/r/rpl_ssl1.result index 5b4aa126c77..a7a56d7c5ee 100644 --- a/mysql-test/suite/rpl/r/rpl_ssl1.result +++ b/mysql-test/suite/rpl/r/rpl_ssl1.result @@ -1,41 +1,43 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] grant replication slave on *.* to replssl@localhost require ssl; create table t1 (t int); stop slave; +include/wait_for_slave_to_stop.inc change master to master_user='replssl',master_password=''; start slave; insert into t1 values (1); select * from t1; t stop slave; +include/wait_for_slave_to_stop.inc change master to master_ssl=1 , master_ssl_ca ='MYSQL_TEST_DIR/std_data/cacert.pem', master_ssl_cert='MYSQL_TEST_DIR/std_data/client-cert.pem', master_ssl_key='MYSQL_TEST_DIR/std_data/client-key.pem'; start slave; +include/wait_for_slave_to_start.inc select * from t1; t 1 -Master_SSL_Allowed Yes -Master_SSL_CA_Path -Master_SSL_CA_File MYSQL_TEST_DIR/std_data/cacert.pem -Master_SSL_Cert MYSQL_TEST_DIR/std_data/client-cert.pem -Master_SSL_Key MYSQL_TEST_DIR/std_data/client-key.pem -Checking that both slave threads are running. +Master_SSL_Allowed = 'Yes' +Master_SSL_CA_Path = '' +Master_SSL_CA_File = 'MYSQL_TEST_DIR/std_data/cacert.pem' +Master_SSL_Cert = 'MYSQL_TEST_DIR/std_data/client-cert.pem' +Master_SSL_Key = 'MYSQL_TEST_DIR/std_data/client-key.pem' +include/check_slave_is_running.inc stop slave; +include/wait_for_slave_to_stop.inc change master to master_user='root',master_password='', master_ssl=0; start slave; +include/wait_for_slave_to_start.inc drop user replssl@localhost; drop table t1; -Master_SSL_Allowed No -Master_SSL_CA_Path -Master_SSL_CA_File MYSQL_TEST_DIR/std_data/cacert.pem -Master_SSL_Cert MYSQL_TEST_DIR/std_data/client-cert.pem -Master_SSL_Key MYSQL_TEST_DIR/std_data/client-key.pem -Checking that both slave threads are running. +Master_SSL_Allowed = 'No' +Master_SSL_CA_Path = '' +Master_SSL_CA_File = 'MYSQL_TEST_DIR/std_data/cacert.pem' +Master_SSL_Cert = 'MYSQL_TEST_DIR/std_data/client-cert.pem' +Master_SSL_Key = 'MYSQL_TEST_DIR/std_data/client-key.pem' +include/check_slave_is_running.inc stop slave; +include/wait_for_slave_to_stop.inc change master to master_host="localhost", master_ssl=1 , @@ -44,16 +46,26 @@ master_ssl_cert='MYSQL_TEST_DIR/std_data/client-cert.pem', master_ssl_key='MYSQL_TEST_DIR/std_data/client-key.pem', master_ssl_verify_server_cert=1; start slave; +include/wait_for_slave_to_start.inc create table t1 (t int); insert into t1 values (1); on slave select * from t1; t 1 -Master_SSL_Allowed Yes -Master_SSL_CA_Path -Master_SSL_CA_File MYSQL_TEST_DIR/std_data/cacert.pem -Master_SSL_Cert MYSQL_TEST_DIR/std_data/client-cert.pem -Master_SSL_Key MYSQL_TEST_DIR/std_data/client-key.pem -Checking that both slave threads are running. +Master_SSL_Allowed = 'Yes' +Master_SSL_CA_Path = '' +Master_SSL_CA_File = 'MYSQL_TEST_DIR/std_data/cacert.pem' +Master_SSL_Cert = 'MYSQL_TEST_DIR/std_data/client-cert.pem' +Master_SSL_Key = 'MYSQL_TEST_DIR/std_data/client-key.pem' +include/check_slave_is_running.inc drop table t1; +include/stop_slave.inc +CHANGE MASTER TO +master_host="127.0.0.1", +master_ssl_ca ='', +master_ssl_cert='', +master_ssl_key='', +master_ssl_verify_server_cert=0, +master_ssl=0; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_stm_000001.result b/mysql-test/suite/rpl/r/rpl_stm_000001.result index e1761da2338..eb421d1adc4 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_000001.result +++ b/mysql-test/suite/rpl/r/rpl_stm_000001.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); create table t1 (word char(20) not null); load data infile '../../std_data/words.dat' into table t1; @@ -40,6 +36,7 @@ stop slave; reset slave; lock tables t1 read; start slave; +include/sync_slave_io_with_master.inc unlock tables; create table t2(id int); insert into t2 values(connection_id()); @@ -52,8 +49,7 @@ select (@id := id) - id from t2; kill @id; drop table t2; Got one of the listed errors -set global sql_slave_skip_counter=1; -start slave; +include/wait_for_slave_sql_error_and_skip.inc [errno=1053] select count(*) from t1; count(*) 5000 @@ -82,3 +78,4 @@ select_priv user Y blafasel2 drop table t1; delete from mysql.user where user="blafasel2"; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_stm_EE_err2.result b/mysql-test/suite/rpl/r/rpl_stm_EE_err2.result index 4bbbc0e99c6..0e83f1dfb67 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_EE_err2.result +++ b/mysql-test/suite/rpl/r/rpl_stm_EE_err2.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create table t1 (a int, unique(a)) engine=myisam; set sql_log_bin=0; insert into t1 values(2); @@ -11,6 +7,10 @@ set sql_log_bin=1; insert into t1 values(1),(2); ERROR 23000: Duplicate entry '2' for key 'a' drop table t1; +include/wait_for_slave_sql_to_stop.inc Error: "Query caused different errors on master and slave. Error on master: message (format)='Duplicate entry '%-.192s' for key %d' error code=1062 ; Error on slave: actual message='no error', error code=0. Default database: 'test'. Query: 'insert into t1 values(1),(2)'" (expected different error codes on master and slave) Errno: "0" (expected 0) drop table t1; +include/stop_slave.inc +RESET SLAVE; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_stm_auto_increment_bug33029.result b/mysql-test/suite/rpl/r/rpl_stm_auto_increment_bug33029.result index 7cbe1d73254..cade32bbfdd 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_auto_increment_bug33029.result +++ b/mysql-test/suite/rpl/r/rpl_stm_auto_increment_bug33029.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] 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"); CREATE TABLE t1 (id INT AUTO_INCREMENT PRIMARY KEY); @@ -206,3 +202,4 @@ DROP PROCEDURE IF EXISTS p1; DROP PROCEDURE IF EXISTS p2; DROP FUNCTION IF EXISTS f1; DROP TRIGGER IF EXISTS tr1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_stm_binlog_max_cache_size.result b/mysql-test/suite/rpl/r/rpl_stm_binlog_max_cache_size.result index c7f2ffab47a..fb4d1e1ba44 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_binlog_max_cache_size.result +++ b/mysql-test/suite/rpl/r/rpl_stm_binlog_max_cache_size.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); SET GLOBAL max_binlog_cache_size = 4096; SET GLOBAL binlog_cache_size = 4096; @@ -19,14 +15,11 @@ CREATE TABLE t3(a INT PRIMARY KEY, data VARCHAR(30000)) ENGINE=Innodb; Got one of the listed errors *** Single statement on non-transactional table *** Got one of the listed errors ---source include/wait_for_slave_sql_error_and_skip.inc -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1590] *** Single statement on both transactional and non-transactional tables. *** Got one of the listed errors ---source include/wait_for_slave_sql_error_and_skip.inc -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1590] +include/diff_tables.inc [master:t1,slave:t1] ######################################################################################## # 2 - BEGIN - IMPLICIT COMMIT by DDL ######################################################################################## @@ -43,7 +36,7 @@ Got one of the listed errors BEGIN; Got one of the listed errors Got one of the listed errors -source include/diff_master_slave.inc; +include/diff_tables.inc [master:t1,slave:t1] ######################################################################################## # 3 - BEGIN - COMMIT ######################################################################################## @@ -55,7 +48,7 @@ Got one of the listed errors Got one of the listed errors Got one of the listed errors COMMIT; -source include/diff_master_slave.inc; +include/diff_tables.inc [master:t1,slave:t1] ######################################################################################## # 4 - BEGIN - ROLLBACK ######################################################################################## @@ -69,7 +62,7 @@ Got one of the listed errors ROLLBACK; Warnings: Warning 1196 Some non-transactional changed tables couldn't be rolled back -source include/diff_master_slave.inc; +include/diff_tables.inc [master:t1,slave:t1] ######################################################################################## # 5 - PROCEDURE ######################################################################################## @@ -93,7 +86,7 @@ TRUNCATE TABLE t1; BEGIN; Got one of the listed errors ROLLBACK; -source include/diff_master_slave.inc; +include/diff_tables.inc [master:t1,slave:t1] ######################################################################################## # 6 - XID ######################################################################################## @@ -108,7 +101,7 @@ ROLLBACK TO sv; Warnings: Warning 1196 Some non-transactional changed tables couldn't be rolled back COMMIT; -source include/diff_master_slave.inc; +include/diff_tables.inc [master:t1,slave:t1] ######################################################################################## # 7 - NON-TRANS TABLE ######################################################################################## @@ -123,7 +116,7 @@ COMMIT; BEGIN; Got one of the listed errors COMMIT; -source include/diff_master_slave.inc; +include/diff_tables.inc [master:t1,slave:t1] ######################################################################## # 8 - Bug#55375(Regression Bug) Transaction bigger than # max_binlog_cache_size crashes slave @@ -146,6 +139,7 @@ SET GLOBAL binlog_stmt_cache_size= ORIGINAL_VALUE; BEGIN; Repeat statement 'INSERT INTO t1 VALUES($n, repeat("a", 32))' 128 times COMMIT; +include/wait_for_slave_sql_error.inc [errno=1197] SELECT count(*) FROM t1; count(*) 0 @@ -167,8 +161,6 @@ DROP TABLE t1; DROP TABLE t2; DROP TABLE t3; DROP TABLE IF EXISTS t4; -DROP TABLE IF EXISTS t5; -DROP TABLE IF EXISTS t6; -Warnings: -Note 1051 Unknown table 't6' +DROP TABLE t5; DROP PROCEDURE p1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_stm_conflicts.result b/mysql-test/suite/rpl/r/rpl_stm_conflicts.result index 6d9759b3562..62161901289 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_conflicts.result +++ b/mysql-test/suite/rpl/r/rpl_stm_conflicts.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] ==== Initialize ==== [on master] CREATE TABLE t1(a INT PRIMARY KEY); @@ -19,6 +15,7 @@ a 1 [on slave] ---- Wait until slave stops with an error ---- +include/wait_for_slave_sql_error.inc [errno=1062] Last_SQL_Error (expected "duplicate key" error) Error 'Duplicate entry '1' for key 'PRIMARY'' on query. Default database: 'test'. Query: 'INSERT INTO t1 VALUES (1)' SELECT * FROM t1; @@ -27,6 +24,7 @@ a ---- Resolve the conflict on the slave and restart SQL thread ---- DELETE FROM t1 WHERE a = 1; START SLAVE SQL_THREAD; +include/wait_for_slave_sql_to_start.inc ---- Sync slave and verify that there is no error ---- Last_SQL_Error = '' (expected no error) SELECT * FROM t1; @@ -53,3 +51,4 @@ a [on master] DROP TABLE t1; [on slave] +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_stm_drop_create_temp_table.result b/mysql-test/suite/rpl/r/rpl_stm_drop_create_temp_table.result index 75f668d8c08..3f72e281b0b 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_drop_create_temp_table.result +++ b/mysql-test/suite/rpl/r/rpl_stm_drop_create_temp_table.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] ######################################################################### # CONFIGURATION ######################################################################### @@ -1613,3 +1609,4 @@ DROP TABLE IF EXISTS nt_1; DROP TABLE IF EXISTS tt_2; DROP TABLE IF EXISTS tt_1; SET @commands= ''; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_stm_flsh_tbls.result b/mysql-test/suite/rpl/r/rpl_stm_flsh_tbls.result index 61fee130d49..af44821a817 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_flsh_tbls.result +++ b/mysql-test/suite/rpl/r/rpl_stm_flsh_tbls.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create table t1 (a int); insert into t1 values (10); create table t2 (a int); @@ -21,10 +17,13 @@ flush tables; select * from t3; a stop slave; +include/wait_for_slave_to_stop.inc drop table t1; flush tables with read lock; start slave; +include/wait_for_slave_to_start.inc stop slave; ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction unlock tables; drop table t3, t4, t5; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_stm_found_rows.result b/mysql-test/suite/rpl/r/rpl_stm_found_rows.result index 2388c4e4b7c..eff96952918 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_found_rows.result +++ b/mysql-test/suite/rpl/r/rpl_stm_found_rows.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] ==== Initialize ==== **** On Master **** CREATE TABLE t1 (a INT); @@ -100,8 +96,4 @@ DROP TABLE t1, logtbl; DROP PROCEDURE just_log; DROP PROCEDURE calc_and_log; DROP FUNCTION log_rows; -**** Resetting master and slave **** -include/stop_slave.inc -RESET SLAVE; -RESET MASTER; -include/start_slave.inc +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_stm_implicit_commit_binlog.result b/mysql-test/suite/rpl/r/rpl_stm_implicit_commit_binlog.result index 6f53ad68d76..e33a00ea0a2 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_implicit_commit_binlog.result +++ b/mysql-test/suite/rpl/r/rpl_stm_implicit_commit_binlog.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] ######################################################################### # CONFIGURATION ######################################################################### @@ -523,10 +519,8 @@ master-bin.000001 # Query # # DROP DATABASE IF EXISTS db ################################################################################### # CHECK CONSISTENCY ################################################################################### -Comparing tables master:test.tt_1 and slave:test.tt_1 +include/diff_tables.inc [master:tt_1,slave:tt_1] ################################################################################### # CLEAN ################################################################################### -DROP TABLE tt_1; -DROP TABLE tt_2; -DROP TABLE nt_1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_stm_innodb.result b/mysql-test/suite/rpl/r/rpl_stm_innodb.result index f99457faaf0..0e9531317b9 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_stm_innodb.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CREATE TABLE t4 ( id INT(5) unsigned NOT NULL auto_increment, name varchar(15) NOT NULL default '', @@ -130,3 +126,4 @@ id b DROP TABLE t1; DROP TABLE t3; End of 6.0 tests +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_stm_insert_delayed.result b/mysql-test/suite/rpl/r/rpl_stm_insert_delayed.result index 14ba6080ec0..058655e5154 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_insert_delayed.result +++ b/mysql-test/suite/rpl/r/rpl_stm_insert_delayed.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CREATE SCHEMA IF NOT EXISTS mysqlslap; USE mysqlslap; select @@global.binlog_format; @@ -72,3 +68,4 @@ drop table t1; FLUSH LOGS; FLUSH LOGS; End of 5.0 tests +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_stm_loaddata_concurrent.result b/mysql-test/suite/rpl/r/rpl_stm_loaddata_concurrent.result index 417da0e2237..b84bc33abef 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_loaddata_concurrent.result +++ b/mysql-test/suite/rpl/r/rpl_stm_loaddata_concurrent.result @@ -14,13 +14,8 @@ master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=# master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA CONCURRENT INFILE '../../std_data/words.dat' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`c1`) ;file_id=# master-bin.000001 # Query # # COMMIT DROP TABLE t1; -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -reset master; +include/master-slave.inc +[connection master] select last_insert_id(); last_insert_id() 0 @@ -48,32 +43,27 @@ drop table t3; create table t1(a int, b int, unique(b)); insert into t1 values(1,10); load data CONCURRENT infile '../../std_data/rpl_loaddata.dat' into table t1; -set global sql_slave_skip_counter=1; -start slave; -Last_SQL_Errno=0 -Last_SQL_Error - +include/wait_for_slave_sql_error_and_skip.inc [errno=1062] +include/check_slave_no_error.inc set sql_log_bin=0; delete from t1; set sql_log_bin=1; load data CONCURRENT infile '../../std_data/rpl_loaddata.dat' into table t1; -stop slave; +include/wait_for_slave_sql_error.inc [errno=1062] +include/stop_slave_io.inc change master to master_user='test'; change master to master_user='root'; -Last_SQL_Errno=0 -Last_SQL_Error - +include/check_slave_no_error.inc set global sql_slave_skip_counter=1; start slave; set sql_log_bin=0; delete from t1; set sql_log_bin=1; load data CONCURRENT infile '../../std_data/rpl_loaddata.dat' into table t1; +include/wait_for_slave_sql_error.inc [errno=1062] stop slave; reset slave; -Last_SQL_Errno=0 -Last_SQL_Error - +include/check_slave_no_error.inc reset master; create table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60), unique(day)) engine=MyISAM; @@ -96,18 +86,14 @@ load data CONCURRENT infile '../../std_data/rpl_loaddata2.dat' into table t2 fie terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by '\n##\n' starting by '>' ignore 1 lines; ERROR 23000: Duplicate entry '2003-03-22' for key 'day' +include/wait_for_slave_sql_error.inc [errno=0] drop table t1, t2; drop table t1, t2; CREATE TABLE t1 (word CHAR(20) NOT NULL PRIMARY KEY) ENGINE=INNODB; LOAD DATA CONCURRENT INFILE "../../std_data/words.dat" INTO TABLE t1; ERROR 23000: Duplicate entry 'Aarhus' for key 'PRIMARY' -DROP TABLE IF EXISTS t1; -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +DROP TABLE t1; +include/rpl_reset.inc drop database if exists b48297_db1; drop database if exists b42897_db2; create database b48297_db1; @@ -128,15 +114,10 @@ LOAD DATA CONCURRENT LOCAL INFILE 'MYSQLTEST_VARDIR/std_data/loaddata5.dat' INTO LOAD DATA CONCURRENT LOCAL INFILE 'MYSQLTEST_VARDIR/std_data/loaddata5.dat' INTO TABLE b48297_db1.t1; ### disconnect and switch back to master connection use b48297_db1; -Comparing tables master:b48297_db1.t1 and slave:b48297_db1.t1 +include/diff_tables.inc [master:b48297_db1.t1, slave:b48297_db1.t1] DROP DATABASE b48297_db1; DROP DATABASE b42897_db2; -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc use test; CREATE TABLE t1 (`key` TEXT, `text` TEXT); LOAD DATA INFILE '../../std_data/loaddata2.dat' REPLACE INTO TABLE `t1` FIELDS TERMINATED BY ','; @@ -148,3 +129,4 @@ Field 3 'Field 4' 'Field 5' 'Field 6' Field 6 'Field 7' DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_stm_loadfile.result b/mysql-test/suite/rpl/r/rpl_stm_loadfile.result index 1abb0d88bbe..72fae5ce6ee 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_loadfile.result +++ b/mysql-test/suite/rpl/r/rpl_stm_loadfile.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP PROCEDURE IF EXISTS test.p1; DROP TABLE IF EXISTS test.t1; CREATE TABLE test.t1 (a INT, blob_column LONGBLOB, PRIMARY KEY(a)); @@ -229,3 +225,4 @@ aberration DROP PROCEDURE IF EXISTS test.p1; DROP TABLE test.t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_stm_log.result b/mysql-test/suite/rpl/r/rpl_stm_log.result index 472be5ee607..3bb3f347a43 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_log.result +++ b/mysql-test/suite/rpl/r/rpl_stm_log.result @@ -1,13 +1,11 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] include/stop_slave.inc +include/wait_for_slave_to_stop.inc reset master; reset slave; start slave; +include/wait_for_slave_to_start.inc create table t1(n int not null auto_increment primary key)ENGINE=MyISAM; insert into t1 values (NULL); drop table t1; @@ -241,18 +239,13 @@ slave-bin.000002 # Query # # use `test`; create table t2 (n int)ENGINE=MyISAM slave-bin.000002 # Query # # BEGIN slave-bin.000002 # Query # # use `test`; insert into t2 values (1) slave-bin.000002 # Query # # COMMIT -Checking that both slave threads are running. +include/check_slave_is_running.inc show binlog events in 'slave-bin.000005' from 4; ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log DROP TABLE t1; DROP TABLE t2; DROP TABLE t3; -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc create table t1(a int auto_increment primary key, b int); insert into t1 values (NULL, 1); set insert_id=5; @@ -275,3 +268,4 @@ a b 5 1 6 1 drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_stm_max_relay_size.result b/mysql-test/suite/rpl/r/rpl_stm_max_relay_size.result index 547dd8e1541..379cea4d3fc 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_max_relay_size.result +++ b/mysql-test/suite/rpl/r/rpl_stm_max_relay_size.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] stop slave; # # Generate a big enough master's binlog to cause relay log rotations @@ -23,7 +19,7 @@ select @@global.max_relay_log_size; @@global.max_relay_log_size 4096 start slave; -Checking that both slave threads are running. +include/check_slave_is_running.inc # # Test 2 # @@ -33,7 +29,7 @@ set global max_relay_log_size=(5*4096); select @@global.max_relay_log_size; @@global.max_relay_log_size 20480 start slave; -Checking that both slave threads are running. +include/check_slave_is_running.inc # # Test 3: max_relay_log_size = 0 # @@ -43,7 +39,7 @@ set global max_relay_log_size=0; select @@global.max_relay_log_size; @@global.max_relay_log_size 0 start slave; -Checking that both slave threads are running. +include/check_slave_is_running.inc # # Test 4: Tests below are mainly to ensure that we have not coded with wrong assumptions # @@ -57,13 +53,13 @@ reset slave; start slave; flush logs; create table t1 (a int); -Checking that both slave threads are running. +include/check_slave_is_running.inc # # Test 6: one more rotation, to be sure Relay_Log_Space is correctly updated # flush logs; drop table t1; -Checking that both slave threads are running. +include/check_slave_is_running.inc flush logs; show master status; File Position Binlog_Do_DB Binlog_Ignore_DB @@ -72,3 +68,4 @@ set global max_binlog_size= @my_max_binlog_size; # # End of 4.1 tests # +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_stm_mix_show_relaylog_events.result b/mysql-test/suite/rpl/r/rpl_stm_mix_show_relaylog_events.result index 5dc86137635..0e34c0dfb19 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_mix_show_relaylog_events.result +++ b/mysql-test/suite/rpl/r/rpl_stm_mix_show_relaylog_events.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CREATE TABLE t1 (a INT); INSERT INTO t1 VALUES (1); INSERT INTO t1 VALUES (2); @@ -126,45 +122,45 @@ slave-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1) slave-bin.000001 # Query # # COMMIT slave-bin.000001 # Query # # BEGIN [SLAVE] ********* SOW RELAYLOG EVENTS IN ... ********* -show relaylog events in 'slave-relay-bin.000003' from ; +show relaylog events in 'slave-relay-bin.000002' from ; Log_name Pos Event_type Server_id End_log_pos Info -slave-relay-bin.000003 # Rotate # # master-bin.000001;pos=4 -slave-relay-bin.000003 # Format_desc # # SERVER_VERSION, BINLOG_VERSION -slave-relay-bin.000003 # Query # # use `test`; CREATE TABLE t1 (a INT) -slave-relay-bin.000003 # Query # # BEGIN -slave-relay-bin.000003 # Query # # use `test`; INSERT INTO t1 VALUES (1) -slave-relay-bin.000003 # Query # # COMMIT -slave-relay-bin.000003 # Query # # BEGIN -slave-relay-bin.000003 # Query # # use `test`; INSERT INTO t1 VALUES (2) -slave-relay-bin.000003 # Query # # COMMIT -slave-relay-bin.000003 # Query # # BEGIN -slave-relay-bin.000003 # Query # # use `test`; INSERT INTO t1 VALUES (3) -slave-relay-bin.000003 # Query # # COMMIT -slave-relay-bin.000003 # Query # # BEGIN -slave-relay-bin.000003 # Query # # use `test`; INSERT INTO t1 VALUES (4) -slave-relay-bin.000003 # Query # # COMMIT -slave-relay-bin.000003 # Query # # BEGIN -slave-relay-bin.000003 # Query # # use `test`; INSERT INTO t1 VALUES (5) -slave-relay-bin.000003 # Query # # COMMIT -slave-relay-bin.000003 # Query # # BEGIN -slave-relay-bin.000003 # Query # # use `test`; INSERT INTO t1 VALUES (6) -slave-relay-bin.000003 # Query # # COMMIT +slave-relay-bin.000002 # Rotate # # master-bin.000001;pos=4 +slave-relay-bin.000002 # Format_desc # # SERVER_VERSION, BINLOG_VERSION +slave-relay-bin.000002 # Query # # use `test`; CREATE TABLE t1 (a INT) +slave-relay-bin.000002 # Query # # BEGIN +slave-relay-bin.000002 # Query # # use `test`; INSERT INTO t1 VALUES (1) +slave-relay-bin.000002 # Query # # COMMIT +slave-relay-bin.000002 # Query # # BEGIN +slave-relay-bin.000002 # Query # # use `test`; INSERT INTO t1 VALUES (2) +slave-relay-bin.000002 # Query # # COMMIT +slave-relay-bin.000002 # Query # # BEGIN +slave-relay-bin.000002 # Query # # use `test`; INSERT INTO t1 VALUES (3) +slave-relay-bin.000002 # Query # # COMMIT +slave-relay-bin.000002 # Query # # BEGIN +slave-relay-bin.000002 # Query # # use `test`; INSERT INTO t1 VALUES (4) +slave-relay-bin.000002 # Query # # COMMIT +slave-relay-bin.000002 # Query # # BEGIN +slave-relay-bin.000002 # Query # # use `test`; INSERT INTO t1 VALUES (5) +slave-relay-bin.000002 # Query # # COMMIT +slave-relay-bin.000002 # Query # # BEGIN +slave-relay-bin.000002 # Query # # use `test`; INSERT INTO t1 VALUES (6) +slave-relay-bin.000002 # Query # # COMMIT [SLAVE] ********* SOW RELAYLOG EVENTS ********* show relaylog events from ; Log_name Pos Event_type Server_id End_log_pos Info -slave-relay-bin.000002 # Rotate # # slave-relay-bin.000003;pos=4 +slave-relay-bin.000001 # Rotate # # slave-relay-bin.000002;pos=4 [MASTER] ********* SOW RELAYLOG EVENTS ... LIMIT rows ********* -show relaylog events in 'slave-relay-bin.000003' from limit 3; +show relaylog events in 'slave-relay-bin.000002' from limit 3; Log_name Pos Event_type Server_id End_log_pos Info -slave-relay-bin.000003 # Rotate # # master-bin.000001;pos=4 -slave-relay-bin.000003 # Format_desc # # SERVER_VERSION, BINLOG_VERSION -slave-relay-bin.000003 # Query # # use `test`; CREATE TABLE t1 (a INT) +slave-relay-bin.000002 # Rotate # # master-bin.000001;pos=4 +slave-relay-bin.000002 # Format_desc # # SERVER_VERSION, BINLOG_VERSION +slave-relay-bin.000002 # Query # # use `test`; CREATE TABLE t1 (a INT) [MASTER] ********* SOW RELAYLOG EVENTS ... LIMIT offset,rows ********* -show relaylog events in 'slave-relay-bin.000003' from limit 1,3; +show relaylog events in 'slave-relay-bin.000002' from limit 1,3; Log_name Pos Event_type Server_id End_log_pos Info -slave-relay-bin.000003 # Format_desc # # SERVER_VERSION, BINLOG_VERSION -slave-relay-bin.000003 # Query # # use `test`; CREATE TABLE t1 (a INT) -slave-relay-bin.000003 # Query # # BEGIN +slave-relay-bin.000002 # Format_desc # # SERVER_VERSION, BINLOG_VERSION +slave-relay-bin.000002 # Query # # use `test`; CREATE TABLE t1 (a INT) +slave-relay-bin.000002 # Query # # BEGIN FLUSH LOGS; FLUSH LOGS; DROP TABLE t1; @@ -225,10 +221,11 @@ slave-bin.000001 # Rotate # # slave-bin.000002;pos=4 [SLAVE] ********* SOW RELAYLOG EVENTS IN ... ********* show relaylog events from ; Log_name Pos Event_type Server_id End_log_pos Info -slave-relay-bin.000005 # Rotate # # master-bin.000002;pos=4 -slave-relay-bin.000005 # Rotate # # slave-relay-bin.000006;pos=4 +slave-relay-bin.000004 # Rotate # # master-bin.000002;pos=4 +slave-relay-bin.000004 # Rotate # # slave-relay-bin.000005;pos=4 [SLAVE] ********* SOW RELAYLOG EVENTS ********* show relaylog events from ; Log_name Pos Event_type Server_id End_log_pos Info -slave-relay-bin.000005 # Rotate # # master-bin.000002;pos=4 -slave-relay-bin.000005 # Rotate # # slave-relay-bin.000006;pos=4 +slave-relay-bin.000004 # Rotate # # master-bin.000002;pos=4 +slave-relay-bin.000004 # Rotate # # slave-relay-bin.000005;pos=4 +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result b/mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result index c11f974ac2f..6e0ee695b41 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result +++ b/mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] ######################################################################### # CONFIGURATION ######################################################################### @@ -11266,23 +11262,6 @@ master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `tt_xx_ ################################################################################### # CLEAN ################################################################################### -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -CREATE TABLE `t1` ( -`c1` int(10) unsigned NOT NULL AUTO_INCREMENT, -`c2` tinyint(1) unsigned DEFAULT NULL, -`c3` varchar(300) DEFAULT NULL, -`c4` int(10) unsigned NOT NULL, -`c5` int(10) unsigned DEFAULT NULL, -PRIMARY KEY (`c1`)) ENGINE=MyISAM DEFAULT CHARSET=latin1; -ALTER TABLE `t1` Engine=InnoDB; -SET AUTOCOMMIT=0; -INSERT INTO t1 (c1,c2,c3,c4,c5) VALUES (1, 1, 'X', 1, NULL); -COMMIT; -ROLLBACK; -SET AUTOCOMMIT=1; -Comparing tables master:test.t1 and slave:test.t1 -DROP TABLE `t1`; +include/rpl_reset.inc +include/diff_tables.inc [master:t1, slave:t1] +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_stm_multi_query.result b/mysql-test/suite/rpl/r/rpl_stm_multi_query.result index 0bd57d4b78a..68c769a7ede 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_multi_query.result +++ b/mysql-test/suite/rpl/r/rpl_stm_multi_query.result @@ -1,10 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -drop database if exists mysqltest; +include/master-slave.inc +[connection master] create database mysqltest; create table mysqltest.t1 ( n int); insert into mysqltest.t1 values(1)/ @@ -21,7 +16,6 @@ n 5 show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # drop database if exists mysqltest master-bin.000001 # Query # # create database mysqltest master-bin.000001 # Query # # use `test`; create table mysqltest.t1 ( n int) master-bin.000001 # Query # # BEGIN @@ -40,3 +34,4 @@ master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; insert into mysqltest.t1 values(5) master-bin.000001 # Query # # COMMIT drop database mysqltest; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_stm_no_op.result b/mysql-test/suite/rpl/r/rpl_stm_no_op.result index 5a253d61fcb..cf5b03cdfa6 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_no_op.result +++ b/mysql-test/suite/rpl/r/rpl_stm_no_op.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create database mysqltest; drop database if exists mysqltest; Warnings: @@ -50,3 +46,4 @@ a b select * from t2; a b drop table t1, t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_stm_reset_slave.result b/mysql-test/suite/rpl/r/rpl_stm_reset_slave.result index c6c2c525098..aa8bc63a432 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_reset_slave.result +++ b/mysql-test/suite/rpl/r/rpl_stm_reset_slave.result @@ -1,22 +1,18 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -Master_User root -Master_Host 127.0.0.1 +include/master-slave.inc +[connection master] +Master_User = 'root' +Master_Host = '127.0.0.1' include/stop_slave.inc change master to master_user='test'; -Master_User test -Master_Host 127.0.0.1 +Master_User = 'test' +Master_Host = '127.0.0.1' reset slave; -Master_User test -Master_Host 127.0.0.1 +Master_User = 'test' +Master_Host = '127.0.0.1' change master to master_user='root'; include/start_slave.inc -Master_User root -Master_Host 127.0.0.1 +Master_User = 'root' +Master_Host = '127.0.0.1' include/stop_slave.inc reset slave; include/start_slave.inc @@ -29,13 +25,20 @@ Variable_name Value Slave_open_temp_tables 1 include/stop_slave.inc reset slave; +include/check_slave_no_error.inc change master to master_user='impossible_user_name'; start slave; -stop slave; +include/wait_for_slave_io_error.inc [errno=1045] +include/stop_slave_sql.inc change master to master_user='root'; include/start_slave.inc +include/check_slave_no_error.inc stop slave; change master to master_user='impossible_user_name'; start slave; -stop slave; +include/wait_for_slave_io_error.inc [errno=1045] +include/stop_slave_sql.inc reset slave; +include/check_slave_no_error.inc +change master to master_user='root'; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_stm_sql_mode.result b/mysql-test/suite/rpl/r/rpl_stm_sql_mode.result index fd143fc8a50..fa5ac2a0c85 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_sql_mode.result +++ b/mysql-test/suite/rpl/r/rpl_stm_sql_mode.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CREATE TABLE t1 (pk integer auto_increment , primary key (pk)); SET SESSION SQL_MODE='traditional'; # **** [MASTER] ***** @@ -16,3 +12,4 @@ DROP TABLE t1; # assertion: sync slave with master makes slave not to stop with # duplicate key error (because it has received event # with expected error code). +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_stm_start_stop_slave.result b/mysql-test/suite/rpl/r/rpl_stm_start_stop_slave.result index 8bb8b0bdf08..d4c687c36eb 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_start_stop_slave.result +++ b/mysql-test/suite/rpl/r/rpl_stm_start_stop_slave.result @@ -1,17 +1,19 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] +SET @old_innodb_flush_log_at_trx_commit= @@global.innodb_flush_log_at_trx_commit; +SET @@global.innodb_flush_log_at_trx_commit= 0; +SET @old_innodb_flush_log_at_trx_commit= @@global.innodb_flush_log_at_trx_commit; +SET @@global.innodb_flush_log_at_trx_commit= 0; SET @@session.binlog_direct_non_transactional_updates= FALSE; 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"); create table t1(n int); stop slave; +include/wait_for_slave_to_stop.inc start slave; stop slave io_thread; start slave io_thread; +include/wait_for_slave_to_start.inc drop table t1; create table t1i(n int primary key) engine=innodb; create table t2m(n int primary key) engine=myisam; @@ -33,6 +35,7 @@ zero 0 stop slave; rollback; +include/wait_for_slave_to_stop.inc *** sql thread is *not* running: No *** *** the prove: the stopped slave has finished the current transaction *** five @@ -61,7 +64,11 @@ STOP SLAVE; # Slave1: unlock the table UNLOCK TABLES; # Slave: wait for the slave to stop +include/wait_for_slave_to_stop.inc # Start slave again include/start_slave.inc # Clean up DROP TABLE t1; +SET @@global.innodb_flush_log_at_trx_commit= @old_innodb_flush_log_at_trx_commit; +SET @@global.innodb_flush_log_at_trx_commit= @old_innodb_flush_log_at_trx_commit; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_stm_stop_middle_group.result b/mysql-test/suite/rpl/r/rpl_stm_stop_middle_group.result index eb1d6689bfc..48e866cd2ad 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_stop_middle_group.result +++ b/mysql-test/suite/rpl/r/rpl_stm_stop_middle_group.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] SET @@session.binlog_direct_non_transactional_updates= FALSE; call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); create table tm (a int auto_increment primary key) engine=myisam; @@ -15,6 +11,7 @@ insert into tm set a=null; Warnings: Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction. commit; +include/wait_for_slave_sql_to_stop.inc SELECT "NO" AS Last_SQL_Error, @check as `true`; Last_SQL_Error true NO 1 @@ -36,6 +33,7 @@ insert into tm set a=null; Warnings: Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction. commit; +include/wait_for_slave_sql_to_stop.inc SELECT "Fatal error: ... The slave SQL is stopped, leaving the current group of events unfinished with a non-transaction table changed. If the group consists solely of Row-based events, you can try restarting the slave with --slave-exec-mode=IDEMPOTENT, which ignores duplicate key, key not found, and similar errors (see documentation for details)." AS Last_SQL_Error, @check as `true`; Last_SQL_Error true Fatal error: ... The slave SQL is stopped, leaving the current group of events unfinished with a non-transaction table changed. If the group consists solely of Row-based events, you can try restarting the slave with --slave-exec-mode=IDEMPOTENT, which ignores duplicate key, key not found, and similar errors (see documentation for details). 1 @@ -52,6 +50,7 @@ include/start_slave.inc set @@global.debug="+d,stop_slave_middle_group"; set @@global.debug="+d,incomplete_group_in_relay_log"; update tm as t1, ti as t2 set t1.a=t1.a * 2, t2.a=t2.a * 2; +include/wait_for_slave_sql_to_stop.inc SELECT "Fatal error: ... The slave SQL is stopped, leaving the current group of events unfinished with a non-transaction table changed. If the group consists solely of Row-based events, you can try restarting the slave with --slave-exec-mode=IDEMPOTENT, which ignores duplicate key, key not found, and similar errors (see documentation for details)." AS Last_SQL_Error, @check as `true`; Last_SQL_Error true Fatal error: ... The slave SQL is stopped, leaving the current group of events unfinished with a non-transaction table changed. If the group consists solely of Row-based events, you can try restarting the slave with --slave-exec-mode=IDEMPOTENT, which ignores duplicate key, key not found, and similar errors (see documentation for details). 1 @@ -62,6 +61,6 @@ select max(a) as one from ti; one 1 set @@global.debug="-d"; +include/rpl_reset.inc drop table tm, ti; -include/stop_slave.inc -drop table tm, ti; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_stm_until.result b/mysql-test/suite/rpl/r/rpl_stm_until.result index 36e06d1edd1..692a3b55da2 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_until.result +++ b/mysql-test/suite/rpl/r/rpl_stm_until.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] [on slave] include/stop_slave.inc ==== Create some events on master ==== @@ -18,29 +14,41 @@ drop table t2; ==== Replicate one event at a time on slave ==== [on slave] start slave until master_log_file='MASTER_LOG_FILE', master_log_pos=MASTER_LOG_POS; +include/wait_for_slave_io_to_start.inc +include/wait_for_slave_sql_to_stop.inc select * from t1; n 1 2 3 4 +include/check_slave_param.inc [Exec_Master_Log_Pos] start slave until master_log_file='master-no-such-bin.000001', master_log_pos=MASTER_LOG_POS; +include/wait_for_slave_io_to_start.inc +include/wait_for_slave_sql_to_stop.inc select * from t1; n 1 2 3 4 -start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=RELAY_LOG_POS; +include/check_slave_param.inc [Exec_Master_Log_Pos] +start slave until relay_log_file='slave-relay-bin.000003', relay_log_pos=RELAY_LOG_POS; +include/wait_for_slave_io_to_start.inc +include/wait_for_slave_sql_to_stop.inc select * from t2; n 1 2 +include/check_slave_param.inc [Exec_Master_Log_Pos] start slave; [on master] [on slave] include/stop_slave.inc start slave until master_log_file='MASTER_LOG_FILE', master_log_pos=MASTER_LOG_POS; +include/wait_for_slave_io_to_start.inc +include/wait_for_slave_sql_to_stop.inc +include/check_slave_param.inc [Exec_Master_Log_Pos] ==== Test various error conditions ==== start slave until master_log_file='master-bin', master_log_pos=MASTER_LOG_POS; ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL @@ -75,6 +83,7 @@ select count(*) as two from t1; two 2 start slave until master_log_file='MASTER_LOG_FILE', master_log_pos= UNTIL_POS;; +include/wait_for_slave_sql_to_stop.inc slave stopped at the prescribed position select 0 as zero; zero @@ -84,23 +93,15 @@ one 1 drop table t1; start slave; -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -drop table if exists t1; -Warnings: -Note 1051 Unknown table 't1' +include/rpl_reset.inc flush logs; stop slave; reset slave; start slave until master_log_file='master-bin.000001', master_log_pos=MASTER_LOG_POS; /* to stop right before DROP */; +include/wait_for_slave_sql_to_stop.inc show tables /* t1 must exist */; Tables_in_test t1 drop table t1; stop slave; -reset slave; -reset master; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_stm_user_variables.result b/mysql-test/suite/rpl/r/rpl_stm_user_variables.result index 8f43425b201..e59928af66d 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_user_variables.result +++ b/mysql-test/suite/rpl/r/rpl_stm_user_variables.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] SET @positive= 18446744073709551615; SET @negative= -9223372036854775808; CREATE TABLE t1 (`tinyint` TINYINT, @@ -58,7 +54,7 @@ real 18446744073709552000.00 decimal 18446744073709551615.00 ######################################### ## assertion: master and slave tables are in sync -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1,slave:t1] TRUNCATE t1; ### b) user var INSERT INTO t1 VALUES (@positive, @@ -110,7 +106,7 @@ real 18446744073709552000.00 decimal 18446744073709551615.00 ######################################### ## assertion: master and slave tables are in sync -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1,slave:t1] TRUNCATE t1; ### insert min signed ### a) declarative @@ -150,7 +146,7 @@ real -9223372036854776000.00 decimal -9223372036854775808.00 ######################################### ## assertion: master and slave tables are in sync -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1,slave:t1] TRUNCATE t1; ### b) user var INSERT INTO t1 VALUES (@negative, @@ -202,16 +198,11 @@ real -9223372036854776000.00 decimal -9223372036854775808.00 ######################################### ## assertion: master and slave tables are in sync -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1,slave:t1] TRUNCATE t1; ## check: contents of both tables master's and slave's DROP TABLE t1; -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc CREATE TABLE t1 ( c INT, PRIMARY KEY (c)) Engine=MyISAM; CREATE TRIGGER tr1 AFTER INSERT ON t1 FOR EACH ROW SET @aux = -1 ; SET @aux = 10294947273192243200; @@ -219,6 +210,7 @@ SET @aux1= @aux; INSERT INTO t1 VALUES (@aux) , (@aux1); ERROR 23000: Duplicate entry '2147483647' for key 'PRIMARY' ## assertion: master and slave tables are in sync -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1,slave:t1] DROP TRIGGER tr1; DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_stop_slave.result b/mysql-test/suite/rpl/r/rpl_stop_slave.result index 37870f3e028..97a53e025be 100644 --- a/mysql-test/suite/rpl/r/rpl_stop_slave.result +++ b/mysql-test/suite/rpl/r/rpl_stop_slave.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] # BUG#56118 STOP SLAVE does not wait till trx with CREATE TMP TABLE ends # @@ -41,10 +37,12 @@ SET DEBUG_SYNC= 'now SIGNAL signal.continue'; SET DEBUG_SYNC= 'RESET'; [ On Slave ] +include/wait_for_slave_sql_to_stop.inc # Slave should stop after the transaction has committed. # So t1 on master is same to t1 on slave. -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] START SLAVE SQL_THREAD; +include/wait_for_slave_sql_to_start.inc # CREATE TEMPORARY TABLE ... SELECT with InnoDB engine # ---------------------------------------------------- @@ -67,11 +65,14 @@ SET DEBUG_SYNC= 'now SIGNAL signal.continue'; SET DEBUG_SYNC= 'RESET'; [ On Slave ] +include/wait_for_slave_sql_to_stop.inc # Slave should stop after the transaction has committed. # So t1 on master is same to t1 on slave. -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] START SLAVE SQL_THREAD; +include/wait_for_slave_sql_to_start.inc # Test end SET GLOBAL debug= '$debug_save'; DROP TABLE t1, t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result b/mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result index 37781aeac0c..e616f38b344 100644 --- a/mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result +++ b/mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] drop database if exists mysqltest1; create database mysqltest1; use mysqltest1; @@ -427,3 +423,4 @@ INSERT INTO t13 VALUES (CURRENT_USER()); INSERT INTO t13 VALUES (my_current_user()); drop database mysqltest1; set global binlog_format =@my_binlog_format; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_sync.result b/mysql-test/suite/rpl/r/rpl_sync.result index edc20c46140..de3506465aa 100644 --- a/mysql-test/suite/rpl/r/rpl_sync.result +++ b/mysql-test/suite/rpl/r/rpl_sync.result @@ -1,10 +1,6 @@ =====Configuring the enviroment=======; -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] call mtr.add_suppression('Attempting backtrace'); call mtr.add_suppression("Recovery from master pos .* and file master-bin.000001"); CREATE TABLE t1(a INT, PRIMARY KEY(a)) engine=innodb; @@ -12,20 +8,21 @@ insert into t1(a) values(1); insert into t1(a) values(2); insert into t1(a) values(3); =====Inserting data on the master but without the SQL Thread being running=======; -stop slave SQL_THREAD; +include/stop_slave_sql.inc insert into t1(a) values(4); insert into t1(a) values(5); insert into t1(a) values(6); =====Removing relay log files and crashing/recoverying the slave=======; -stop slave IO_THREAD; +include/stop_slave_io.inc SET SESSION debug="d,crash_before_rotate_relaylog"; FLUSH LOGS; ERROR HY000: Lost connection to MySQL server during query +include/rpl_reconnect.inc =====Dumping and comparing tables=======; -start slave; -Comparing tables master:test.t1 and slave:test.t1 +include/start_slave.inc +include/diff_tables.inc [master:t1,slave:t1] =====Corrupting the master.info=======; -stop slave; +include/stop_slave.inc FLUSH LOGS; insert into t1(a) values(7); insert into t1(a) values(8); @@ -33,8 +30,10 @@ insert into t1(a) values(9); SET SESSION debug="d,crash_before_rotate_relaylog"; FLUSH LOGS; ERROR HY000: Lost connection to MySQL server during query +include/rpl_reconnect.inc =====Dumping and comparing tables=======; -start slave; -Comparing tables master:test.t1 and slave:test.t1 +include/start_slave.inc +include/diff_tables.inc [master:t1,slave:t1] =====Clean up=======; drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_temp_table.result b/mysql-test/suite/rpl/r/rpl_temp_table.result index e4ca31d8908..e7df070874a 100644 --- a/mysql-test/suite/rpl/r/rpl_temp_table.result +++ b/mysql-test/suite/rpl/r/rpl_temp_table.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create table t2 (n int, PRIMARY KEY(n)); create temporary table t1 (n int); create temporary table t3 (n int not null); @@ -46,3 +42,4 @@ Slave_open_temp_tables 0 drop table if exists t1,t2; Warnings: Note 1051 Unknown table 't1' +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_temp_table_mix_row.result b/mysql-test/suite/rpl/r/rpl_temp_table_mix_row.result index 4f9c9e09dfe..8fb910666dc 100644 --- a/mysql-test/suite/rpl/r/rpl_temp_table_mix_row.result +++ b/mysql-test/suite/rpl/r/rpl_temp_table_mix_row.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] ==== Initialize ==== [on master] CREATE TABLE t1 (a CHAR(48)); @@ -15,6 +11,7 @@ SHOW STATUS LIKE "Slave_open_temp_tables"; Variable_name Value Slave_open_temp_tables 1 [on master] +[on master1] [on slave] ==== Verify results on slave ==== SHOW STATUS LIKE "Slave_open_temp_tables"; @@ -22,14 +19,10 @@ Variable_name Value Slave_open_temp_tables 0 ==== Clean up ==== [on master] +include/rpl_connect.inc [creating master] DROP TABLE t1; [on slave] -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc CREATE TABLE t1 (a int); CREATE TABLE t2 ( i1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (i1) ); CREATE TABLE t3 ( i1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (i1) ); @@ -112,6 +105,7 @@ master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `t1` /* generated by server */ master-bin.000001 # Query # # COMMIT # Compare the base table. -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_temporary.result b/mysql-test/suite/rpl/r/rpl_temporary.result index bceece8d682..dfab66d074f 100644 --- a/mysql-test/suite/rpl/r/rpl_temporary.result +++ b/mysql-test/suite/rpl/r/rpl_temporary.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] call mtr.add_suppression("Slave: Can\'t find record in \'user\' Error_code: 1032"); reset master; DROP TABLE IF EXISTS t1; @@ -129,6 +125,8 @@ select * from t1; a 1 drop table t1; +include/stop_slave.inc +include/rpl_reset.inc -- Bug#43748 -- make a user on the slave that can list but not kill system threads. FLUSH PRIVILEGES; @@ -140,5 +138,5 @@ KILL @id; Got one of the listed errors -- throw out test-user on slave. DROP USER user43748@127.0.0.1; --- done. back to master. End of 5.1 tests +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_temporary_errors.result b/mysql-test/suite/rpl/r/rpl_temporary_errors.result index 64fa4ed14ea..947adee492b 100644 --- a/mysql-test/suite/rpl/r/rpl_temporary_errors.result +++ b/mysql-test/suite/rpl/r/rpl_temporary_errors.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] call mtr.add_suppression("Deadlock found"); **** On Master **** CREATE TABLE t1 (a INT PRIMARY KEY, b INT); @@ -39,7 +35,7 @@ a b 2 2 3 3 4 4 -Checking that both slave threads are running. -DROP TABLE t1; +include/check_slave_is_running.inc **** On Master **** DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_test_framework.result b/mysql-test/suite/rpl/r/rpl_test_framework.result new file mode 100644 index 00000000000..e45c12ba0ec --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_test_framework.result @@ -0,0 +1,170 @@ +==== Create t1 on all servers. ==== +include/rpl_init.inc [topology=1->2->3->4->5->6->7->8->9] +CREATE TABLE t1 (a INT); +include/rpl_end.inc +==== Test 3-server topologies ==== +include/rpl_init.inc [topology=1 -> 2] +include/rpl_generate_sync_chain.inc +rpl_sync_chain= ' 12' +[connection server_1] +DELETE FROM t1; +INSERT INTO t1 VALUES (1); +[connection server_3] +DELETE FROM t1; +INSERT INTO t1 VALUES (1); +include/rpl_sync.inc +include/diff_tables.inc [server_1:t1,server_2:t1,server_3:t1] +include/rpl_end.inc +include/rpl_init.inc [topology=2 -> 3] +include/rpl_generate_sync_chain.inc +rpl_sync_chain= ' 23' +[connection server_1] +DELETE FROM t1; +INSERT INTO t1 VALUES (2); +[connection server_2] +DELETE FROM t1; +INSERT INTO t1 VALUES (2); +include/rpl_sync.inc +include/diff_tables.inc [server_1:t1,server_2:t1,server_3:t1] +include/rpl_end.inc +include/rpl_init.inc [topology=none] +include/rpl_generate_sync_chain.inc +rpl_sync_chain= '' +[connection server_1] +DELETE FROM t1; +INSERT INTO t1 VALUES (3); +[connection server_2] +DELETE FROM t1; +INSERT INTO t1 VALUES (3); +[connection server_3] +DELETE FROM t1; +INSERT INTO t1 VALUES (3); +include/rpl_sync.inc +include/diff_tables.inc [server_1:t1,server_2:t1,server_3:t1] +include/rpl_end.inc +include/rpl_init.inc [topology=1->2, 2->1] +include/rpl_generate_sync_chain.inc +rpl_sync_chain= ' 212' +[connection server_1] +DELETE FROM t1; +INSERT INTO t1 VALUES (4); +[connection server_3] +DELETE FROM t1; +INSERT INTO t1 VALUES (4); +include/rpl_sync.inc +include/diff_tables.inc [server_1:t1,server_2:t1,server_3:t1] +include/rpl_end.inc +include/rpl_init.inc [topology=1->2->1] +include/rpl_generate_sync_chain.inc +rpl_sync_chain= ' 212' +[connection server_2] +DELETE FROM t1; +INSERT INTO t1 VALUES (5); +[connection server_3] +DELETE FROM t1; +INSERT INTO t1 VALUES (5); +include/rpl_sync.inc +include/diff_tables.inc [server_1:t1,server_2:t1,server_3:t1] +include/rpl_end.inc +include/rpl_init.inc [topology=2->1->2] +include/rpl_generate_sync_chain.inc +rpl_sync_chain= ' 212' +[connection server_1] +DELETE FROM t1; +INSERT INTO t1 VALUES (6); +[connection server_3] +DELETE FROM t1; +INSERT INTO t1 VALUES (6); +include/rpl_sync.inc +include/diff_tables.inc [server_1:t1,server_2:t1,server_3:t1] +include/rpl_end.inc +include/rpl_init.inc [topology=1->2->3] +include/rpl_generate_sync_chain.inc +rpl_sync_chain= ' 123' +[connection server_1] +DELETE FROM t1; +INSERT INTO t1 VALUES (7); +include/rpl_sync.inc +include/diff_tables.inc [server_1:t1,server_2:t1,server_3:t1] +include/rpl_end.inc +include/rpl_init.inc [topology=2->3->2->1] +include/rpl_generate_sync_chain.inc +rpl_sync_chain= ' 323 21' +[connection server_3] +DELETE FROM t1; +INSERT INTO t1 VALUES (8); +include/rpl_sync.inc +include/diff_tables.inc [server_1:t1,server_2:t1,server_3:t1] +include/rpl_end.inc +include/rpl_init.inc [topology=1->2,2->3,3->1] +include/rpl_generate_sync_chain.inc +rpl_sync_chain= ' 23123' +[connection server_3] +DELETE FROM t1; +INSERT INTO t1 VALUES (9); +include/rpl_sync.inc +include/diff_tables.inc [server_1:t1,server_2:t1,server_3:t1] +include/rpl_end.inc +include/rpl_init.inc [topology=1->3->2->1] +include/rpl_generate_sync_chain.inc +rpl_sync_chain= ' 13213' +[connection server_3] +DELETE FROM t1; +INSERT INTO t1 VALUES (10); +include/rpl_sync.inc +include/diff_tables.inc [server_1:t1,server_2:t1,server_3:t1] +include/rpl_end.inc +==== Test 6-server topologies ==== +include/rpl_init.inc [topology=1->2->3->4->1->5->6] +include/rpl_generate_sync_chain.inc +rpl_sync_chain= ' 341234156' +[connection server_1] +DELETE FROM t1; +INSERT INTO t1 VALUES (11); +include/rpl_sync.inc +include/diff_tables.inc [server_1:t1,server_2:t1,server_3:t1,server_4:t1,server_5:t1,server_6:t1] +include/rpl_end.inc +include/rpl_init.inc [topology=3->4->5->6->3->1->2] +include/rpl_generate_sync_chain.inc +rpl_sync_chain= ' 4563456 312' +[connection server_4] +DELETE FROM t1; +INSERT INTO t1 VALUES (12); +include/rpl_sync.inc +include/diff_tables.inc [server_1:t1,server_2:t1,server_3:t1,server_4:t1,server_5:t1,server_6:t1] +include/rpl_end.inc +include/rpl_init.inc [topology=6->5->4->3->2->1] +include/rpl_generate_sync_chain.inc +rpl_sync_chain= ' 65 54 43 32 21' +[connection server_6] +DELETE FROM t1; +INSERT INTO t1 VALUES (13); +include/rpl_sync.inc +include/diff_tables.inc [server_1:t1,server_2:t1,server_3:t1,server_4:t1,server_5:t1,server_6:t1] +include/rpl_end.inc +include/rpl_init.inc [topology=1->2->3->1,4->5->6] +include/rpl_generate_sync_chain.inc +rpl_sync_chain= ' 456 23123' +[connection server_3] +DELETE FROM t1; +INSERT INTO t1 VALUES (14); +[connection server_4] +DELETE FROM t1; +INSERT INTO t1 VALUES (14); +include/rpl_sync.inc +include/diff_tables.inc [server_1:t1,server_2:t1,server_3:t1,server_4:t1,server_5:t1,server_6:t1] +include/rpl_end.inc +==== Test 9-server topology ==== +include/rpl_init.inc [topology=1->2, 2->3, 3->4, 4->5, 5->1, 1->6, 6->7, 6->8, 8->9] +include/rpl_generate_sync_chain.inc +rpl_sync_chain= ' 345123451689 67' +[connection server_2] +DELETE FROM t1; +INSERT INTO t1 VALUES (15); +include/rpl_sync.inc +include/diff_tables.inc [server_1:t1,server_2:t1,server_3:t1,server_4:t1,server_5:t1,server_6:t1,server_7:t1,server_8:t1,server_9:t1] +include/rpl_end.inc +==== Clean up ==== +include/rpl_init.inc [topology=1->2->3->4->5->6->7->8->9] +DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_timezone.result b/mysql-test/suite/rpl/r/rpl_timezone.result index 0b5c03b5300..ce93c3030c0 100644 --- a/mysql-test/suite/rpl/r/rpl_timezone.result +++ b/mysql-test/suite/rpl/r/rpl_timezone.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] set @my_time_zone= @@global.time_zone; set timestamp=100000000; create table t1 (t timestamp, n int not null auto_increment, PRIMARY KEY(n)); @@ -122,6 +118,7 @@ a b SET @@session.time_zone = default; DROP TABLE t1; SET @@session.time_zone = default; +include/stop_slave.inc reset master; CREATE TABLE t1 (date timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, a int(11) default NULL); SET @@session.time_zone='+01:00'; @@ -141,4 +138,5 @@ date a 2008-12-23 19:39:39 2 DROP TABLE t1; SET @@session.time_zone = default; +include/rpl_end.inc End of 5.0 tests diff --git a/mysql-test/suite/rpl/r/rpl_tmp_table_and_DDL.result b/mysql-test/suite/rpl/r/rpl_tmp_table_and_DDL.result index 14af782a4d5..550b3f596e5 100644 --- a/mysql-test/suite/rpl/r/rpl_tmp_table_and_DDL.result +++ b/mysql-test/suite/rpl/r/rpl_tmp_table_and_DDL.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CREATE TEMPORARY TABLE t1 (a INT); CREATE TABLE t2 (a INT, b INT) ENGINE= MyISAM; INSERT INTO t1 VALUES (1); @@ -191,3 +187,4 @@ DROP FUNCTION f2; DROP PROCEDURE p2; DROP EVENT e2; DROP TABLE t1, t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_trigger.result b/mysql-test/suite/rpl/r/rpl_trigger.result index 01d886c4709..784cd1bcdff 100644 --- a/mysql-test/suite/rpl/r/rpl_trigger.result +++ b/mysql-test/suite/rpl/r/rpl_trigger.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t2; DROP TABLE IF EXISTS t3; @@ -862,8 +858,8 @@ drop table t21,t31; drop table t11; STOP SLAVE; FLUSH LOGS; ---> Stop master server ---> Start master server +include/rpl_stop_server.inc [server_number=1] +include/rpl_start_server.inc [server_number=1] --> Master binlog: Server ver: 5.0.16-debug-log, Binlog ver: 4 RESET SLAVE; START SLAVE; @@ -976,12 +972,7 @@ a b 2 b 3 c drop table t1; -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc create table t1 ( f int ) engine = innodb; create table log ( r int ) engine = myisam; create trigger tr @@ -992,6 +983,7 @@ insert into t1 values ( 1 ); rollback; Warnings: Warning 1196 Some non-transactional changed tables couldn't be rolled back -Comparing tables master:test.t1 and slave:test.t1 -Comparing tables master:test.log and slave:test.log +include/diff_tables.inc [master:t1, slave:t1] +include/diff_tables.inc [master:log, slave:log] drop table t1, log; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_trunc_temp.result b/mysql-test/suite/rpl/r/rpl_trunc_temp.result index 44624a38875..ae2c9973c9f 100644 --- a/mysql-test/suite/rpl/r/rpl_trunc_temp.result +++ b/mysql-test/suite/rpl/r/rpl_trunc_temp.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create temporary table t1 (n int); insert into t1 values(1); show status like 'Slave_open_temp_tables'; @@ -20,3 +16,4 @@ Slave_open_temp_tables 1 show status like 'Slave_open_temp_tables'; Variable_name Value Slave_open_temp_tables 0 +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_truncate_2myisam.result b/mysql-test/suite/rpl/r/rpl_truncate_2myisam.result index 38fb9e27764..da8db64cef4 100644 --- a/mysql-test/suite/rpl/r/rpl_truncate_2myisam.result +++ b/mysql-test/suite/rpl/r/rpl_truncate_2myisam.result @@ -1,20 +1,12 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -**** Resetting master and slave **** -include/stop_slave.inc -RESET SLAVE; -RESET MASTER; -include/start_slave.inc +include/master-slave.inc +[connection master] +include/rpl_reset.inc **** On Master **** CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM; INSERT INTO t1 VALUES (1,1), (2,2); **** On Master **** TRUNCATE TABLE t1; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] ==== Test using a table with delete triggers ==== **** On Master **** SET @count := 1; @@ -22,19 +14,15 @@ CREATE TABLE t2 (a INT, b LONG) ENGINE=MyISAM; CREATE TRIGGER trg1 BEFORE DELETE ON t1 FOR EACH ROW SET @count := @count + 1; **** On Master **** TRUNCATE TABLE t1; -Comparing tables master:test.t2 and slave:test.t2 +include/diff_tables.inc [master:t2, slave:t2] DROP TABLE t1,t2; -**** Resetting master and slave **** -include/stop_slave.inc -RESET SLAVE; -RESET MASTER; -include/start_slave.inc +include/rpl_reset.inc **** On Master **** CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM; INSERT INTO t1 VALUES (1,1), (2,2); **** On Master **** DELETE FROM t1; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] ==== Test using a table with delete triggers ==== **** On Master **** SET @count := 1; @@ -42,5 +30,6 @@ CREATE TABLE t2 (a INT, b LONG) ENGINE=MyISAM; CREATE TRIGGER trg1 BEFORE DELETE ON t1 FOR EACH ROW SET @count := @count + 1; **** On Master **** DELETE FROM t1; -Comparing tables master:test.t2 and slave:test.t2 +include/diff_tables.inc [master:t2, slave:t2] DROP TABLE t1,t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_truncate_3innodb.result b/mysql-test/suite/rpl/r/rpl_truncate_3innodb.result index b5e5936834d..d8a4443022d 100644 --- a/mysql-test/suite/rpl/r/rpl_truncate_3innodb.result +++ b/mysql-test/suite/rpl/r/rpl_truncate_3innodb.result @@ -1,20 +1,12 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -**** Resetting master and slave **** -include/stop_slave.inc -RESET SLAVE; -RESET MASTER; -include/start_slave.inc +include/master-slave.inc +[connection master] +include/rpl_reset.inc **** On Master **** CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB; INSERT INTO t1 VALUES (1,1), (2,2); **** On Master **** TRUNCATE TABLE t1; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] ==== Test using a table with delete triggers ==== **** On Master **** SET @count := 1; @@ -22,19 +14,15 @@ CREATE TABLE t2 (a INT, b LONG) ENGINE=InnoDB; CREATE TRIGGER trg1 BEFORE DELETE ON t1 FOR EACH ROW SET @count := @count + 1; **** On Master **** TRUNCATE TABLE t1; -Comparing tables master:test.t2 and slave:test.t2 +include/diff_tables.inc [master:t2, slave:t2] DROP TABLE t1,t2; -**** Resetting master and slave **** -include/stop_slave.inc -RESET SLAVE; -RESET MASTER; -include/start_slave.inc +include/rpl_reset.inc **** On Master **** CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB; INSERT INTO t1 VALUES (1,1), (2,2); **** On Master **** DELETE FROM t1; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] ==== Test using a table with delete triggers ==== **** On Master **** SET @count := 1; @@ -42,5 +30,6 @@ CREATE TABLE t2 (a INT, b LONG) ENGINE=InnoDB; CREATE TRIGGER trg1 BEFORE DELETE ON t1 FOR EACH ROW SET @count := @count + 1; **** On Master **** DELETE FROM t1; -Comparing tables master:test.t2 and slave:test.t2 +include/diff_tables.inc [master:t2, slave:t2] DROP TABLE t1,t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_typeconv.result b/mysql-test/suite/rpl/r/rpl_typeconv.result index 89096153c14..e27df2ea1db 100644 --- a/mysql-test/suite/rpl/r/rpl_typeconv.result +++ b/mysql-test/suite/rpl/r/rpl_typeconv.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] set @saved_slave_type_conversions = @@global.slave_type_conversions; CREATE TABLE type_conversions ( TestNo INT AUTO_INCREMENT PRIMARY KEY, @@ -41,32 +37,16 @@ SELECT @@global.slave_type_conversions; ALL_LOSSY,ALL_NON_LOSSY SET GLOBAL SLAVE_TYPE_CONVERSIONS=''; **** Running tests with @@SLAVE_TYPE_CONVERSIONS = '' **** -**** Resetting master and slave **** -include/stop_slave.inc -RESET SLAVE; -RESET MASTER; -include/start_slave.inc +include/rpl_reset.inc SET GLOBAL SLAVE_TYPE_CONVERSIONS='ALL_NON_LOSSY'; **** Running tests with @@SLAVE_TYPE_CONVERSIONS = 'ALL_NON_LOSSY' **** -**** Resetting master and slave **** -include/stop_slave.inc -RESET SLAVE; -RESET MASTER; -include/start_slave.inc +include/rpl_reset.inc SET GLOBAL SLAVE_TYPE_CONVERSIONS='ALL_LOSSY'; **** Running tests with @@SLAVE_TYPE_CONVERSIONS = 'ALL_LOSSY' **** -**** Resetting master and slave **** -include/stop_slave.inc -RESET SLAVE; -RESET MASTER; -include/start_slave.inc +include/rpl_reset.inc SET GLOBAL SLAVE_TYPE_CONVERSIONS='ALL_LOSSY,ALL_NON_LOSSY'; **** Running tests with @@SLAVE_TYPE_CONVERSIONS = 'ALL_LOSSY,ALL_NON_LOSSY' **** -**** Resetting master and slave **** -include/stop_slave.inc -RESET SLAVE; -RESET MASTER; -include/start_slave.inc +include/rpl_reset.inc **** Result of conversions **** Source_Type Target_Type All_Type_Conversion_Flags Value_On_Slave TINYBLOB TINYBLOB @@ -556,3 +536,4 @@ BIT(12) BIT(5) ALL_LOSSY,ALL_NON_LOSSY DROP TABLE type_conversions; DROP TABLE t1; set global slave_type_conversions = @saved_slave_type_conversions; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_typeconv_innodb.result b/mysql-test/suite/rpl/r/rpl_typeconv_innodb.result index 0b4286c54eb..67ac642bc5a 100644 --- a/mysql-test/suite/rpl/r/rpl_typeconv_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_typeconv_innodb.result @@ -1,18 +1,10 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -**** Resetting master and slave **** -include/stop_slave.inc -RESET SLAVE; -RESET MASTER; -include/start_slave.inc +include/master-slave.inc +[connection master] SET @saved_slave_type_conversions = @@GLOBAL.SLAVE_TYPE_CONVERSIONS; SET GLOBAL SLAVE_TYPE_CONVERSIONS = ''; CREATE TABLE t1(b1 BIT(1), b2 BIT(2), b3 BIT(3)) ENGINE=InnoDB; INSERT INTO t1 VALUES (b'0', b'01', b'101'); -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DROP TABLE t1; SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_udf.result b/mysql-test/suite/rpl/r/rpl_udf.result index 92ffb9cffc7..f9a5765d3a3 100644 --- a/mysql-test/suite/rpl/r/rpl_udf.result +++ b/mysql-test/suite/rpl/r/rpl_udf.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] drop table if exists t1; "*** Test 1) Test UDFs via loadable libraries *** "Running on the master" @@ -155,3 +151,4 @@ affected rows: 0 "Running on the master" DROP TABLE t1; affected rows: 0 +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_user.result b/mysql-test/suite/rpl/r/rpl_user.result index a98e7e9ca55..4ad87eb1ae7 100644 --- a/mysql-test/suite/rpl/r/rpl_user.result +++ b/mysql-test/suite/rpl/r/rpl_user.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] set session sql_log_bin=0; delete from mysql.user where Host='fakehost'; set session sql_log_bin=1; @@ -43,3 +39,4 @@ master-bin.000001 # Query # # use `test`; rename user 'foo'@'fakehost' to 'foofo master-bin.000001 # Query # # use `test`; rename user 'not_exist_user1'@'fakehost' to 'foobar'@'fakehost', 'bar'@'fakehost' to 'barbar'@'fakehost' master-bin.000001 # Query # # use `test`; drop user 'foofoo'@'fakehost' master-bin.000001 # Query # # use `test`; drop user 'not_exist_user1'@'fakehost', 'barbar'@'fakehost' +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_user_variables.result b/mysql-test/suite/rpl/r/rpl_user_variables.result index 1f76eae3fce..e302ec0aceb 100644 --- a/mysql-test/suite/rpl/r/rpl_user_variables.result +++ b/mysql-test/suite/rpl/r/rpl_user_variables.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] reset master; create table t1(n char(30)); set @i1:=12345678901234, @i2:=-12345678901234, @i3:=0, @i4:=-1; @@ -279,4 +275,4 @@ i DROP FUNCTION f1; DROP FUNCTION f2; DROP TABLE t1; -stop slave; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_variables.result b/mysql-test/suite/rpl/r/rpl_variables.result index b3108c75a6e..8711dce4ab6 100644 --- a/mysql-test/suite/rpl/r/rpl_variables.result +++ b/mysql-test/suite/rpl/r/rpl_variables.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] ==== Initialization ==== [on master] SET @m_default_week_format= @@global.default_week_format; @@ -38,13 +34,8 @@ SET @@global.sql_mode = 'ALLOW_INVALID_DATES'; SET @@local.sql_mode = 'ANSI_QUOTES,ERROR_FOR_DIVISION_BY_ZERO,HIGH_NOT_PRECEDENCE'; SET @user_num = 10; SET @user_text = 'Alunda'; -[on master] -**** Resetting master and slave **** include/stop_slave.inc -RESET SLAVE; -RESET MASTER; include/start_slave.inc -[on slave] SET @@global.init_slave = 'SELECT 1'; [on master] CREATE TABLE tstmt (id INT AUTO_INCREMENT PRIMARY KEY, @@ -550,15 +541,7 @@ id truth num text 30 NULL 30 NULL 31 NULL NULL Bergsbrunna 32 NULL NULL Centrum -Comparing tables master:test.tstmt and master:test.tproc -Comparing tables master:test.tstmt and master:test.tfunc -Comparing tables master:test.tstmt and master:test.ttrig -Comparing tables master:test.tstmt and master:test.tprep -Comparing tables master:test.tstmt and slave:test.tstmt -Comparing tables master:test.tstmt and slave:test.tproc -Comparing tables master:test.tstmt and slave:test.tfunc -Comparing tables master:test.tstmt and slave:test.ttrig -Comparing tables master:test.tstmt and slave:test.tprep +include/diff_tables.inc [master:tstmt, master:tproc, master:tfunc, master:ttrig, master:tprep, slave:tstmt, slave:tproc, slave:tfunc, slave:ttrig, slave:tprep] ==== Clean up ==== [on master] DROP PROCEDURE proc; @@ -582,3 +565,4 @@ SET @@global.relay_log_purge= @s_relay_log_purge; SET @@global.slave_exec_mode= @s_slave_exec_mode; SET @@global.sql_mode= @s_sql_mode; SET @@global.sync_binlog= @s_sync_binlog; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_variables_stm.result b/mysql-test/suite/rpl/r/rpl_variables_stm.result index 29bdf771237..dfd78742e75 100644 --- a/mysql-test/suite/rpl/r/rpl_variables_stm.result +++ b/mysql-test/suite/rpl/r/rpl_variables_stm.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); ==== Initialization ==== [on master] @@ -488,15 +484,7 @@ id num text 56 NULL 47124712 57 NULL 1616 58 NULL 1717 -Comparing tables master:test.tstmt and master:test.tproc -Comparing tables master:test.tstmt and master:test.tfunc -Comparing tables master:test.tstmt and master:test.ttrig -Comparing tables master:test.tstmt and master:test.tprep -Comparing tables master:test.tstmt and slave:test.tstmt -Comparing tables master:test.tstmt and slave:test.tproc -Comparing tables master:test.tstmt and slave:test.tfunc -Comparing tables master:test.tstmt and slave:test.ttrig -Comparing tables master:test.tstmt and slave:test.tprep +include/diff_tables.inc [master:tstmt, master:tproc, master:tfunc, master:ttrig, master:tprep, slave:tstmt, slave:tproc, slave:tfunc, slave:ttrig, slave:tprep] ==== Clean up ==== [on master] DROP PROCEDURE proc; @@ -520,3 +508,4 @@ SET @@global.collation_server= @s_collation_server; SET @@global.time_zone= @s_time_zone; SET @@global.lc_time_names= @s_lc_time_names; SET @@global.collation_database= @s_collation_database; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_view.result b/mysql-test/suite/rpl/r/rpl_view.result index b129223b6d2..307b88ff6f9 100644 --- a/mysql-test/suite/rpl/r/rpl_view.result +++ b/mysql-test/suite/rpl/r/rpl_view.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] drop table if exists t1,v1; drop view if exists t1,v1; reset master; @@ -116,3 +112,4 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI DROP VIEW v1; DROP TABLE t1; End of 5.0 tests +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_view_multi.result b/mysql-test/suite/rpl/r/rpl_view_multi.result index b3f10584a24..e42c8e51411 100644 --- a/mysql-test/suite/rpl/r/rpl_view_multi.result +++ b/mysql-test/suite/rpl/r/rpl_view_multi.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] # # Bug #25144 "replication / binlog with view breaks". # Statements that used views didn't ensure that view were not modified @@ -88,3 +84,4 @@ i drop table t1, t2; drop view v1; # Syncing slave with master and switching to connection 'slave' +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl000017-slave.sh b/mysql-test/suite/rpl/t/rpl000017-slave.sh deleted file mode 100644 index 1d95798260a..00000000000 --- a/mysql-test/suite/rpl/t/rpl000017-slave.sh +++ /dev/null @@ -1,12 +0,0 @@ -rm -f $MYSQLTEST_VARDIR/log/*relay* -rm -f $MYSQLTEST_VARDIR/mysqld.2/data/relay-log.info -cat > $MYSQLTEST_VARDIR/mysqld.2/data/master.info < injects fault on MYSQL_BIN_LOG::open_index_file SET GLOBAL debug="+d,fault_injection_openning_index"; @@ -316,7 +317,8 @@ DELETE FROM t2; DROP TABLE t5; # restart the server so that we have binlog again --- source include/restart_mysqld.inc +--let $rpl_server_number= 1 +--source include/rpl_restart_server.inc -- echo ###################### TEST #12 @@ -342,7 +344,8 @@ DELETE FROM t2; DROP TABLE t5; # restart the server so that we have binlog again --- source include/restart_mysqld.inc +--let $rpl_server_number= 1 +--source include/rpl_restart_server.inc ## clean up SET GLOBAL debug= @old_debug; @@ -359,9 +362,7 @@ RESET MASTER; -- echo ####################################################################### ### setup --- connection master -# master-slave-reset starts the slave automatically --- source include/master-slave-reset.inc +--source include/rpl_reset.inc -- connection slave # slave suppressions @@ -404,12 +405,9 @@ call mtr.add_suppression("Can't generate a unique log-filename .*"); -- source include/io_thd_fault_injection.inc ### clean up --- disable_warnings --- source include/stop_slave.inc --- enable_warnings +-- source include/stop_slave_sql.inc SET GLOBAL debug=@old_debug; RESET SLAVE; RESET MASTER; --- source include/start_slave.inc --- connection master --- source include/master-slave-end.inc +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_binlog_grant.test b/mysql-test/suite/rpl/t/rpl_binlog_grant.test index 4c6402359fe..839399dea63 100644 --- a/mysql-test/suite/rpl/t/rpl_binlog_grant.test +++ b/mysql-test/suite/rpl/t/rpl_binlog_grant.test @@ -10,9 +10,6 @@ let $VERSION=`select version()`; # Now GRANT/REVOKE do implicitly commit # transaction ---disable_warnings -drop database if exists d1; ---enable_warnings create database d1; use d1; create table t (s1 int) engine=innodb; @@ -40,4 +37,5 @@ select * from t; show grants for x@y; drop user x@y; drop database d1; ---sync_slave_with_master + +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_bit.test b/mysql-test/suite/rpl/t/rpl_bit.test index c648159ff3a..67606e5d509 100644 --- a/mysql-test/suite/rpl/t/rpl_bit.test +++ b/mysql-test/suite/rpl/t/rpl_bit.test @@ -90,3 +90,4 @@ DROP TABLE IF EXISTS test.t1; sync_slave_with_master; # End of 5.0 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_bit_npk.test b/mysql-test/suite/rpl/t/rpl_bit_npk.test index 1df7341eafc..d65ef66ae41 100644 --- a/mysql-test/suite/rpl/t/rpl_bit_npk.test +++ b/mysql-test/suite/rpl/t/rpl_bit_npk.test @@ -110,3 +110,4 @@ DROP TABLE IF EXISTS test.t3; sync_slave_with_master; # End of 5.0 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_blackhole.test b/mysql-test/suite/rpl/t/rpl_blackhole.test index 25a57daba4a..b15371713c4 100644 --- a/mysql-test/suite/rpl/t/rpl_blackhole.test +++ b/mysql-test/suite/rpl/t/rpl_blackhole.test @@ -98,3 +98,4 @@ source extra/rpl_tests/rpl_blackhole.test; connection master; DROP TABLE t1,t2; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_bug26395.test b/mysql-test/suite/rpl/t/rpl_bug26395.test index 97c152d52e9..aeb0da9511d 100644 --- a/mysql-test/suite/rpl/t/rpl_bug26395.test +++ b/mysql-test/suite/rpl/t/rpl_bug26395.test @@ -95,3 +95,5 @@ connection slave; DROP TABLE tinnodb; # Warning: do not add more tests here. The binlog is in a bad state. +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_bug31076.test b/mysql-test/suite/rpl/t/rpl_bug31076.test index 9461a91e933..028ca32636a 100644 --- a/mysql-test/suite/rpl/t/rpl_bug31076.test +++ b/mysql-test/suite/rpl/t/rpl_bug31076.test @@ -141,3 +141,4 @@ DROP DATABASE track; sync_slave_with_master; --echo End of 5.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_bug33931.test b/mysql-test/suite/rpl/t/rpl_bug33931.test index 5dc06e6a605..a3314b3f89e 100644 --- a/mysql-test/suite/rpl/t/rpl_bug33931.test +++ b/mysql-test/suite/rpl/t/rpl_bug33931.test @@ -3,20 +3,16 @@ # Bug #33932 assertion at handle_slave_sql if init_slave_thread() fails source include/have_debug.inc; -source include/have_log_bin.inc; - -connect (master,127.0.0.1,root,,test,$MASTER_MYPORT,); -connect (slave,127.0.0.1,root,,test,$SLAVE_MYPORT,); - -connection master; -reset master; +source include/master-slave.inc; connection slave; -reset slave; # Add suppression for expected warnings in slaves error log call mtr.add_suppression("Failed during slave I/O thread initialization"); +--source include/stop_slave.inc +reset slave; + # Set debug flags on slave to force errors to occur SET GLOBAL debug="d,simulate_io_slave_error_on_init,simulate_sql_slave_error_on_init"; @@ -29,18 +25,13 @@ eval CHANGE MASTER TO MASTER_USER='root', start slave; -connection master; -save_master_pos; -connection slave; - # # slave is going to stop because of emulated failures # but there won't be any crashes nor asserts hit. # -source include/wait_for_slave_to_stop.inc; # 1593 = ER_SLAVE_FATAL_ERROR ---let $slave_sql_errno= 1593 +--let $slave_sql_errno= 1593 --let $show_slave_sql_error= 1 --source include/wait_for_slave_sql_error.inc @@ -49,3 +40,8 @@ source include/wait_for_slave_to_stop.inc; # SET GLOBAL debug=""; +# Clear Last_SQL_Error +RESET SLAVE; + +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_bug38694.test b/mysql-test/suite/rpl/t/rpl_bug38694.test index 41b11d271b9..48f950ad6ef 100644 --- a/mysql-test/suite/rpl/t/rpl_bug38694.test +++ b/mysql-test/suite/rpl/t/rpl_bug38694.test @@ -8,3 +8,4 @@ source include/master-slave.inc; # End of tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_bug41902.test b/mysql-test/suite/rpl/t/rpl_bug41902.test index d16fb986cea..12eeb903003 100644 --- a/mysql-test/suite/rpl/t/rpl_bug41902.test +++ b/mysql-test/suite/rpl/t/rpl_bug41902.test @@ -58,4 +58,7 @@ call mtr.add_suppression("Failed to locate old binlog or relay log files"); call mtr.add_suppression("MYSQL_BIN_LOG::purge_logs was called with file ./master-bin.000001 not listed in the index"); --enable_query_log ---echo End of the tests +--echo ==== clean up ==== +CHANGE MASTER TO MASTER_HOST = '127.0.0.1'; +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_change_master.test b/mysql-test/suite/rpl/t/rpl_change_master.test index 5a8362e3df0..c31359a84d8 100644 --- a/mysql-test/suite/rpl/t/rpl_change_master.test +++ b/mysql-test/suite/rpl/t/rpl_change_master.test @@ -52,7 +52,8 @@ sync_slave_with_master; # BUG#12190 CHANGE MASTER has differ path requiremts on MASTER_LOG_FILE and RELAY_LOG_FILE # -source include/master-slave-reset.inc; +if ($bug_59037_is_fixed == 'true') { +--source include/rpl_reset.inc connection master; create table t1 (a int); @@ -65,8 +66,7 @@ insert into t1 values (2); sync_slave_with_master; # Check if the table t1 and t2 are identical on master and slave; -let $diff_table_1= master:test.t1 -let $diff_table_2= slave:test.t1 +let $diff_tables= master:t1,slave:t1 source include/diff_tables.inc; connection slave; @@ -88,8 +88,7 @@ source include/wait_for_slave_sql_to_start.inc; sync_with_master; # Check if the table t1 and t2 are identical on master and slave; -let $diff_table_1= master:test.t1 -let $diff_table_2= slave:test.t1 +let $diff_tables= master:t1,slave:t1 source include/diff_tables.inc; # clean up @@ -99,4 +98,6 @@ source include/wait_for_slave_io_to_start.inc; eval set global relay_log_purge=$relay_log_purge; connection master; drop table t1; -sync_slave_with_master; +} + +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_charset.test b/mysql-test/suite/rpl/t/rpl_charset.test index ed0d835f22d..3ed9147508e 100644 --- a/mysql-test/suite/rpl/t/rpl_charset.test +++ b/mysql-test/suite/rpl/t/rpl_charset.test @@ -1,3 +1,2 @@ let $engine_type=myisam; source extra/rpl_tests/rpl_charset.test; - diff --git a/mysql-test/suite/rpl/t/rpl_charset_sjis.test b/mysql-test/suite/rpl/t/rpl_charset_sjis.test index 2469b0db8a2..a3a3de8c1d0 100644 --- a/mysql-test/suite/rpl/t/rpl_charset_sjis.test +++ b/mysql-test/suite/rpl/t/rpl_charset_sjis.test @@ -23,3 +23,4 @@ sync_slave_with_master; connection master; # End of 5.0 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.cnf b/mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.cnf index 141aaa7788d..104963c7d82 100644 --- a/mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.cnf +++ b/mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.cnf @@ -17,11 +17,8 @@ log-slave-updates innodb [ENV] -SLAVE_MYPORT1= @mysqld.3.port -SLAVE_MYSOCK1= @mysqld.3.socket - -SLAVE_MYPORT2= @mysqld.4.port -SLAVE_MYSOCK2= @mysqld.4.socket - - +SERVER_MYPORT_3= @mysqld.3.port +SERVER_MYSOCK_3= @mysqld.3.socket +SERVER_MYPORT_4= @mysqld.4.port +SERVER_MYSOCK_4= @mysqld.4.socket diff --git a/mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.test b/mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.test index 2f1b86c2c31..888f09fcfa1 100644 --- a/mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.test +++ b/mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.test @@ -1,27 +1,35 @@ -############################################################# -# Author: Serge Kozlov -# Date: 03/12/2008 -# Purpose: Testing circular replication based on schema -# A->B->C->D->A with using AUTO_INCREMENT_INCREMENT, -# AUTO_INCREMENT_OFFSET variables and failover -############################################################# +# ==== Purpose ==== +# +# Setup: circular replication on four hosts, i.e., topology +# server_1 -> server_2 -> server_3 -> server_4 -> server_1 +# +# Tested properties: +# - Correctly configured autoinc works. +# - Manual failover works. +# +# ==== Related bugs and worklogs ==== +# +# WL#3754 +# BUG#49978 + --source include/have_innodb.inc # Use wait_for_slave_to_(start|stop) for current connections let $keep_connection= 1; # Set up circular ring and new names for servers ---echo *** Set up circular ring by schema A->B->C->D->A *** ---source include/circular_rpl_for_4_hosts_init.inc +--echo *** Set up circular replication on four servers *** +--let $rpl_topology= 1->2->3->4->1 +--source include/rpl_init.inc --echo # Preparing data. --echo *** Preparing data *** ---connection master_a +--connection server_1 CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT, b VARCHAR(100), c INT NOT NULL, PRIMARY KEY(a)) ENGINE=MyISAM; CREATE TABLE t2 (a INT NOT NULL AUTO_INCREMENT, b VARCHAR(100), c INT NOT NULL, PRIMARY KEY(a)) ENGINE=InnoDB; ---source include/circular_rpl_for_4_hosts_sync.inc ---connection master_d +--source include/rpl_sync.inc +--connection server_4 --echo # @@ -31,121 +39,134 @@ CREATE TABLE t2 (a INT NOT NULL AUTO_INCREMENT, b VARCHAR(100), c INT NOT NULL, --echo *** Testing schema A->B->C->D->A *** --echo # insert data via all hosts ---connection master_a +--connection server_1 INSERT INTO t1(b,c) VALUES('A',1); ---sync_slave_with_master master_b +--sync_slave_with_master server_2 INSERT INTO t1(b,c) VALUES('B',1); ---sync_slave_with_master master_c +--sync_slave_with_master server_3 INSERT INTO t1(b,c) VALUES('C',1); ---sync_slave_with_master master_d +--sync_slave_with_master server_4 INSERT INTO t1(b,c) VALUES('D',1); ---source include/circular_rpl_for_4_hosts_sync.inc +--source include/rpl_sync.inc ---connection master_a +--connection server_1 SELECT 'Master A',a,b FROM t1 WHERE c = 1 ORDER BY a,b; ---connection master_b +--connection server_2 SELECT 'Master B',a,b FROM t1 WHERE c = 1 ORDER BY a,b; ---connection master_c +--connection server_3 SELECT 'Master C',a,b FROM t1 WHERE c = 1 ORDER BY a,b; ---connection master_d +--connection server_4 SELECT 'Master D',a,b FROM t1 WHERE c = 1 ORDER BY a,b; --echo --echo *** Testing schema A->B->D->A if C has failure *** --echo --echo * Do failure for C and then make new connection B->D * + +# Note: server_N has auto_increment_offset=N. Below, we insert value 6 +# in the autoinc column on server_3 (and prevent it from replicating +# further using SQL_SLAVE_SKIP_COUNTER on server_4). Due to the +# auto_increment_offset setting, the autoinc value 6 is normally +# generated on server_2. When we later insert a row on server_2, we +# thus cause a duplicate key error on server_3. + # Do not replicate next event from C ---connection master_d -connect(slave,127.0.0.1,root,,test,$SLAVE_MYPORT2); +--connection server_4 STOP SLAVE; SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1; source include/start_slave.inc; -disconnect slave; ---connection master_c +--connection server_3 INSERT INTO t1 VALUES(6,'C',2); ---save_master_pos ---connection master_b +--sync_slave_with_master server_4 + +--connection server_2 INSERT INTO t1(b,c) VALUES('B',2); # Wait while C will stop. ---connection master_c -source include/wait_for_slave_sql_to_stop.inc; ---connection master_a +--connection server_3 +# 1062 = ER_DUP_ENTRY +--let $slave_sql_errno= 1062 +--source include/wait_for_slave_sql_error.inc +--connection server_1 INSERT INTO t1(b,c) VALUES('A',2); ---connection master_d +--connection server_4 INSERT INTO t1(b,c) VALUES('D',2); # Sync all servers except C ---connection master_b +--connection server_2 let $wait_condition= SELECT COUNT(*)=3 FROM t1 WHERE a > 4; +--let $server_connection= server_1 --source include/wait_condition.inc --echo --echo * Data on servers (C failed) * # Masters C,D shouldn't have correct data ---connection master_a +--connection server_1 SELECT 'Master A',a,b FROM t1 WHERE c = 2 ORDER BY a,b; ---connection master_b +--connection server_2 SELECT 'Master B',a,b FROM t1 WHERE c = 2 ORDER BY a,b; ---connection master_c +--connection server_3 SELECT 'Master C',a,b FROM t1 WHERE c = 2 ORDER BY a,b; ---connection master_d +--connection server_4 SELECT 'Master D',a,b FROM t1 WHERE c = 2 ORDER BY a,b; --echo --echo * Reconfigure replication to schema A->B->D->A * # Exclude Master C ---connection master_c -STOP SLAVE; +--connection server_3 +--source include/stop_slave_io.inc --let $pos_c= query_get_value(SHOW SLAVE STATUS, Exec_Master_Log_Pos, 1) --let $file_c= query_get_value(SHOW SLAVE STATUS, Master_Log_File, 1) ---connection master_d -STOP SLAVE; ---replace_result $SLAVE_MYPORT MASTER_B_PORT $file_c LOG_FILE $pos_c LOG_POS ---eval CHANGE MASTER TO master_host='127.0.0.1',master_port=$SLAVE_MYPORT,master_user='root',master_log_file='$file_c',master_log_pos=$pos_c -connect(slave,127.0.0.1,root,,test,$SLAVE_MYPORT2); + +--connection server_4 +--source include/stop_slave.inc + +--let $rpl_topology= 1->2->4->1,2->3 +--let $rpl_master_log_file= 4:$file_c +--let $rpl_master_log_pos= 4:$pos_c +--source include/rpl_change_topology.inc + +#--replace_result $SERVER_MYPORT_2 SERVER_MYPORT_2 $file_c LOG_FILE $pos_c LOG_POS +#--eval CHANGE MASTER TO master_host='127.0.0.1',master_port=$SERVER_MYPORT_2,master_user='root',master_log_file='$file_c',master_log_pos=$pos_c source include/start_slave.inc; -disconnect slave; ---connection master_b ---sync_slave_with_master master_d ---sync_slave_with_master master_a +--connection server_2 +--sync_slave_with_master server_4 +--sync_slave_with_master server_1 --echo --echo * Check data inserted before failure * ---connection master_a +--connection server_1 SELECT 'Master A',a,b FROM t1 WHERE c = 2 ORDER BY a,b; ---connection master_b +--connection server_2 SELECT 'Master B',a,b FROM t1 WHERE c = 2 ORDER BY a,b; ---connection master_c +--connection server_3 SELECT 'Master C',a,b FROM t1 WHERE c = 2 ORDER BY a,b; ---connection master_d +--connection server_4 SELECT 'Master D',a,b FROM t1 WHERE c = 2 ORDER BY a,b; --echo --echo * Check data inserted after failure * ---connection master_a +--connection server_1 INSERT INTO t1(b,c) VALUES('A',3); ---connection master_b +--connection server_2 INSERT INTO t1(b,c) VALUES('B',3); ---connection master_d +--connection server_4 INSERT INTO t1(b,c) VALUES('D',3); -connection master_a; +connection server_1; ---sync_slave_with_master master_b ---sync_slave_with_master master_d ---sync_slave_with_master master_a ---sync_slave_with_master master_b +--let $rpl_only_running_threads= 1 +--source include/rpl_sync.inc ---connection master_a +--connection server_1 SELECT 'Master A',a,b FROM t1 WHERE c = 3 ORDER BY a,b; ---connection master_b +--connection server_2 SELECT 'Master B',a,b FROM t1 WHERE c = 3 ORDER BY a,b; ---connection master_c +--connection server_3 SELECT 'Master C',a,b FROM t1 WHERE c = 3 ORDER BY a,b; ---connection master_d +--connection server_4 SELECT 'Master D',a,b FROM t1 WHERE c = 3 ORDER BY a,b; ---connection master_a +--connection server_1 --echo --echo *** Testing restoring scheme A->B->C->D->A after failure *** @@ -153,158 +174,150 @@ SELECT 'Master D',a,b FROM t1 WHERE c = 3 ORDER BY a,b; # Master D will ignore a next event from C so that event will not be # distributed to other servers --echo * Remove wrong event from C and restore B->C->D * ---connection master_d +--connection server_4 source include/stop_slave.inc; ---connection master_c +--connection server_3 DELETE FROM t1 WHERE a = 6; START SLAVE; ---connection master_b ---sync_slave_with_master master_c +--connection server_2 +--sync_slave_with_master server_3 RESET MASTER; --let $file_d= query_get_value(SHOW MASTER STATUS, File, 1) --let $pos_d= query_get_value(SHOW MASTER STATUS, Position, 1) ---connection master_d +--connection server_4 RESET SLAVE; ---replace_result $SLAVE_MYPORT1 MASTER_C_PORT $file_d LOG_FILE $pos_d LOG_POS ---eval CHANGE MASTER TO master_host='127.0.0.1',master_port=$SLAVE_MYPORT1,master_user='root',master_log_file='$file_d',master_log_pos=$pos_d +--let $rpl_topology= 1->2->3->4->1 +--let $rpl_master_log_file= 4:$file_d +--let $rpl_master_log_pos= 4:$pos_d +--source include/rpl_change_topology.inc +#--replace_result $SERVER_MYPORT_3 SERVER_MYPORT_3 $file_d LOG_FILE $pos_d LOG_POS +#--eval CHANGE MASTER TO master_host='127.0.0.1',master_port=$SERVER_MYPORT_3,master_user='root',master_log_file='$file_d',master_log_pos=$pos_d START SLAVE; ---connection master_c ---sync_slave_with_master master_d ---source include/circular_rpl_for_4_hosts_sync.inc +--connection server_3 +--sync_slave_with_master server_4 +--source include/rpl_sync.inc --echo --echo * Check data inserted before restoring schema A->B->C->D->A * ---connection master_a +--connection server_1 SELECT 'Master A',a,b FROM t1 WHERE c IN (2,3) ORDER BY a,b; ---sync_slave_with_master master_b +--sync_slave_with_master server_2 SELECT 'Master B',a,b FROM t1 WHERE c IN (2,3) ORDER BY a,b; ---sync_slave_with_master master_c +--sync_slave_with_master server_3 SELECT 'Master C',a,b FROM t1 WHERE c IN (2,3) ORDER BY a,b; ---sync_slave_with_master master_d +--sync_slave_with_master server_4 SELECT 'Master D',a,b FROM t1 WHERE c IN (2,3) ORDER BY a,b; ---sync_slave_with_master master_a +--sync_slave_with_master server_1 --echo --echo * Check data inserted after restoring schema A->B->C->D->A * ---connection master_a +--connection server_1 INSERT INTO t1(b,c) VALUES('A',4); ---connection master_b +--connection server_2 INSERT INTO t1(b,c) VALUES('B',4); ---connection master_c +--connection server_3 INSERT INTO t1(b,c) VALUES('C',4); ---connection master_d +--connection server_4 INSERT INTO t1(b,c) VALUES('D',4); ---connection master_a +--connection server_1 ---source include/circular_rpl_for_4_hosts_sync.inc +--source include/rpl_sync.inc ---connection master_a +--connection server_1 SELECT 'Master A',a,b FROM t1 WHERE c = 4 ORDER BY a,b; ---connection master_b +--connection server_2 SELECT 'Master B',a,b FROM t1 WHERE c = 4 ORDER BY a,b; ---connection master_c +--connection server_3 SELECT 'Master C',a,b FROM t1 WHERE c = 4 ORDER BY a,b; ---connection master_d +--connection server_4 SELECT 'Master D',a,b FROM t1 WHERE c = 4 ORDER BY a,b; ---connection master_a +--connection server_1 --echo --echo * Transactions with commits * # Testing mixing of transactions and regular inserts ---connection master_a +--connection server_1 BEGIN; ---connection master_c +--connection server_3 BEGIN; let $counter= 100; ---connection master_a +--connection server_1 --disable_query_log while ($counter) { - --connection master_a + --connection server_1 INSERT INTO t2(b,c) VALUES('A',1); - --connection master_b + --connection server_2 INSERT INTO t2(b,c) VALUES('B',1); - --connection master_c + --connection server_3 INSERT INTO t2(b,c) VALUES('C',1); - --connection master_d + --connection server_4 INSERT INTO t2(b,c) VALUES('D',1); dec $counter; } ---connection master_a +--connection server_1 COMMIT; ---connection master_c +--connection server_3 COMMIT; ---connection master_a +--connection server_1 --enable_query_log ---source include/circular_rpl_for_4_hosts_sync.inc +--source include/rpl_sync.inc ---connection master_a +--connection server_1 SELECT 'Master A',b,COUNT(*) FROM t2 WHERE c = 1 GROUP BY b ORDER BY b; ---connection master_b +--connection server_2 SELECT 'Master B',b,COUNT(*) FROM t2 WHERE c = 1 GROUP BY b ORDER BY b; ---connection master_c +--connection server_3 SELECT 'Master C',b,COUNT(*) FROM t2 WHERE c = 1 GROUP BY b ORDER BY b; ---connection master_d +--connection server_4 SELECT 'Master D',b,COUNT(*) FROM t2 WHERE c = 1 GROUP BY b ORDER BY b; ---connection master_a +--connection server_1 --echo --echo * Transactions with rollbacks * # Testing mixing of transactions with rollback and regular inserts ---connection master_a +--connection server_1 BEGIN; ---connection master_c +--connection server_3 BEGIN; let $counter= 100; ---connection master_a +--connection server_1 --disable_query_log while ($counter) { - --connection master_a + --connection server_1 INSERT INTO t2(b,c) VALUES('A',2); - --connection master_b + --connection server_2 INSERT INTO t2(b,c) VALUES('B',2); - --connection master_c + --connection server_3 INSERT INTO t2(b,c) VALUES('C',2); - --connection master_d + --connection server_4 INSERT INTO t2(b,c) VALUES('D',2); dec $counter; } ---connection master_a +--connection server_1 ROLLBACK; ---connection master_c +--connection server_3 ROLLBACK; ---connection master_a +--connection server_1 --enable_query_log ---source include/circular_rpl_for_4_hosts_sync.inc +--source include/rpl_sync.inc ---connection master_a +--connection server_1 SELECT 'Master A',b,COUNT(*) FROM t2 WHERE c = 2 GROUP BY b ORDER BY b; ---connection master_b +--connection server_2 SELECT 'Master B',b,COUNT(*) FROM t2 WHERE c = 2 GROUP BY b ORDER BY b; ---connection master_c +--connection server_3 SELECT 'Master C',b,COUNT(*) FROM t2 WHERE c = 2 GROUP BY b ORDER BY b; ---connection master_d +--connection server_4 SELECT 'Master D',b,COUNT(*) FROM t2 WHERE c = 2 GROUP BY b ORDER BY b; ---connection master_a +--connection server_1 --echo # Clean up --echo *** Clean up *** ---connection master_a +--connection server_1 DROP TABLE t1,t2; ---source include/circular_rpl_for_4_hosts_sync.inc ---connection master_a -STOP SLAVE; -RESET SLAVE; ---connection master_b -STOP SLAVE; -RESET SLAVE; ---connection master_c -STOP SLAVE; -RESET SLAVE; ---connection master_d -STOP SLAVE; -RESET SLAVE; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_colSize.test b/mysql-test/suite/rpl/t/rpl_colSize.test index 4c808ef3dfd..d6f817af189 100644 --- a/mysql-test/suite/rpl/t/rpl_colSize.test +++ b/mysql-test/suite/rpl/t/rpl_colSize.test @@ -225,3 +225,4 @@ sync_slave_with_master; SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions; # END 5.1 Test Case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_commit_after_flush.test b/mysql-test/suite/rpl/t/rpl_commit_after_flush.test index 47df391d6be..5e070b14301 100644 --- a/mysql-test/suite/rpl/t/rpl_commit_after_flush.test +++ b/mysql-test/suite/rpl/t/rpl_commit_after_flush.test @@ -1,12 +1,6 @@ -##################################### -# Wrapper for rpl_commit_after_flush# -##################################### -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -# Added to skip if ndb is default # -######################################################## -- source include/not_ndb_default.inc -- source include/have_innodb.inc -- source include/master-slave.inc let $engine_type=innodb; -- source extra/rpl_tests/rpl_commit_after_flush.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_concurrency_error.test b/mysql-test/suite/rpl/t/rpl_concurrency_error.test index 8f5277b3f72..15d5d5502a1 100644 --- a/mysql-test/suite/rpl/t/rpl_concurrency_error.test +++ b/mysql-test/suite/rpl/t/rpl_concurrency_error.test @@ -127,13 +127,11 @@ while ($type) connection master; sync_slave_with_master; -connection master; -let $diff_statement= SELECT * FROM t order by i; -source include/diff_master_slave.inc; +let $rpl_diff_statement= SELECT * FROM t order by i; +source include/rpl_diff.inc; -connection master; -let $diff_statement= SELECT * FROM n order by d, f; -source include/diff_master_slave.inc; +let $rpl_diff_statement= SELECT * FROM n order by d, f; +source include/rpl_diff.inc; --echo ######################################################################## --echo # Cleanup @@ -149,3 +147,4 @@ sync_slave_with_master; connection master; disconnect conn1; disconnect conn2; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_conditional_comments.test b/mysql-test/suite/rpl/t/rpl_conditional_comments.test index 14251d5eb37..88adf3a20f1 100644 --- a/mysql-test/suite/rpl/t/rpl_conditional_comments.test +++ b/mysql-test/suite/rpl/t/rpl_conditional_comments.test @@ -26,15 +26,15 @@ let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1); source include/show_binlog_events.inc; let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1); sync_slave_with_master; -let $diff_table_1=master:test.t1; -let $diff_table_2=slave:test.t1; -source include/diff_tables.inc; +--let $diff_tables= master:t1,slave:t1 +--source include/diff_tables.inc --echo --echo # Case 2: --echo # ----------------------------------------------------------------- --echo # Verify whether it can be binlogged correctly when executing prepared --echo # statement. +--connection master PREPARE stmt FROM 'INSERT INTO /*!99999 blabla*/ t1 VALUES(60) /*!99999 ,(61)*/'; EXECUTE stmt; DROP TABLE t1; @@ -42,10 +42,10 @@ CREATE TABLE t1(c1 INT); EXECUTE stmt; sync_slave_with_master; -let $diff_table_1=master:test.t1; -let $diff_table_2=slave:test.t1; -source include/diff_tables.inc; +--let $diff_tables= master:t1,slave:t1 +--source include/diff_tables.inc +--connection master --echo SET @value=62; PREPARE stmt FROM 'INSERT INTO /*!99999 blabla */ t1 VALUES(?) /*!99999 ,(63)*/'; @@ -58,17 +58,17 @@ source include/show_binlog_events.inc; let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1); sync_slave_with_master; -let $diff_table_1=master:test.t1; -let $diff_table_2=slave:test.t1; -source include/diff_tables.inc; +--let $diff_tables= master:t1,slave:t1 +--source include/diff_tables.inc --echo --echo # Case 3: --echo # ----------------------------------------------------------------- --echo # Verify it can restore the '!', if the it is an uncomplete conditional --echo # comments +--connection master --error 1064 SELECT c1 FROM /*!99999 t1 WHEREN; DROP TABLE t1; -source include/master-slave-end.inc; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_create_database.test b/mysql-test/suite/rpl/t/rpl_create_database.test index e3e2e637594..5eac3de0d15 100644 --- a/mysql-test/suite/rpl/t/rpl_create_database.test +++ b/mysql-test/suite/rpl/t/rpl_create_database.test @@ -70,3 +70,4 @@ DROP DATABASE IF EXISTS mysqltest_bob; sync_slave_with_master; # End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_create_if_not_exists.test b/mysql-test/suite/rpl/t/rpl_create_if_not_exists.test index 6b459bb9c76..4e24b9a8133 100644 --- a/mysql-test/suite/rpl/t/rpl_create_if_not_exists.test +++ b/mysql-test/suite/rpl/t/rpl_create_if_not_exists.test @@ -125,7 +125,7 @@ DROP TABLE t3; --echo # After the worklog, it will insert nothing and the statement will not be --echo # binlogged if the table already exists. --echo # After the worklog, some bugs will disappear automotically. -source include/master-slave-reset.inc; +--source include/rpl_reset.inc --echo --echo # Case 1: BUG#47132 @@ -173,4 +173,4 @@ DROP VIEW v1; DROP TABLE t1, t2; -source include/master-slave-end.inc; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_create_tmp_table_if_not_exists.test b/mysql-test/suite/rpl/t/rpl_create_tmp_table_if_not_exists.test index a06dfa54cb1..daf6b7e9ad8 100644 --- a/mysql-test/suite/rpl/t/rpl_create_tmp_table_if_not_exists.test +++ b/mysql-test/suite/rpl/t/rpl_create_tmp_table_if_not_exists.test @@ -38,4 +38,4 @@ CREATE TEMPORARY TABLE IF NOT EXISTS tmp2 SELECT * FROM tmp; CREATE TEMPORARY TABLE IF NOT EXISTS tmp2 SELECT * FROM tmp; source include/show_binlog_events.inc; -source include/master-slave-end.inc; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_critical_errors.test b/mysql-test/suite/rpl/t/rpl_critical_errors.test index aa1f251b738..bc0d7096f80 100644 --- a/mysql-test/suite/rpl/t/rpl_critical_errors.test +++ b/mysql-test/suite/rpl/t/rpl_critical_errors.test @@ -35,7 +35,7 @@ connection master1; # This sleep is picked so that the query above has started to insert # some rows into t2. If it hasn't the slave will not stop below. let $wait_condition= SELECT COUNT(*) > 1000 FROM t1; -source include/wait_condition.inc +--source include/wait_condition.inc # SHOW PROCESSLIST; @@ -62,4 +62,5 @@ connection slave; # The following should be 0 SELECT COUNT(*) FROM t2; +--source include/rpl_end.inc enable_parsing; diff --git a/mysql-test/suite/rpl/t/rpl_cross_version.test b/mysql-test/suite/rpl/t/rpl_cross_version.test index 8cd268a5fd9..7a8cbfd8237 100644 --- a/mysql-test/suite/rpl/t/rpl_cross_version.test +++ b/mysql-test/suite/rpl/t/rpl_cross_version.test @@ -10,7 +10,7 @@ # The master's binlog is treated as a relay log that the SQL thread executes. # ---source include/have_log_bin.inc +--source include/master-slave.inc # The test is disabled for windows due to # Bug #42879 CHANGE MASTER RELAY_LOG_FILE=path fails on windows @@ -22,6 +22,16 @@ # --echo ==== Initialize ==== +--connection slave + +--disable_query_log +# The binlog contains the function RAND which is unsafe. +CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); +--enable_query_log + +--source include/stop_slave.inc +RESET SLAVE; + # the relay log contains create t1, t3 tables and load data infile --let $fake_relay_log = $MYSQL_TEST_DIR/suite/binlog/std_data/binlog_old_version_4_1.000001 --source include/setup_fake_relay_log.inc @@ -36,6 +46,8 @@ start slave sql_thread; SELECT COUNT(*) - 17920 as zero FROM t3; --echo ==== Clean up ==== -stop slave sql_thread; +--source include/stop_slave_sql.inc --source include/cleanup_fake_relay_log.inc drop table t1, t3; +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_current_user.cnf b/mysql-test/suite/rpl/t/rpl_current_user.cnf index 999ee727a88..58b605ad928 100644 --- a/mysql-test/suite/rpl/t/rpl_current_user.cnf +++ b/mysql-test/suite/rpl/t/rpl_current_user.cnf @@ -1,9 +1,8 @@ !include ../my.cnf [mysqld.3] -server-id=3 -log-bin=slave-bin +log-slave-updates [ENV] -SLAVE_MYPORT1= @mysqld.3.port -SLAVE_MYSOCK1= @mysqld.3.socket +SERVER_MYPORT_3= @mysqld.3.port +SERVER_MYSOCK_3= @mysqld.3.socket diff --git a/mysql-test/suite/rpl/t/rpl_current_user.test b/mysql-test/suite/rpl/t/rpl_current_user.test index 79816ef6c95..ac2af1af14e 100644 --- a/mysql-test/suite/rpl/t/rpl_current_user.test +++ b/mysql-test/suite/rpl/t/rpl_current_user.test @@ -10,35 +10,31 @@ # 'ALTER EVENT'. # ############################################################################## -source include/master-slave.inc; + source include/have_binlog_format_statement.inc; + +--let $rpl_topology= 1->2->3 +--source include/rpl_init.inc + +--let $rpl_connection_name= master +--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 + +--disable_query_log +--connection server_1 call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT.*"); +--connection server_2 +call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT.*"); +--connection server_3 +call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT.*"); +--enable_query_log ---echo ---echo # On slave2 -connect (slave2,127.0.0.1,root,,test,$SLAVE_MYPORT1,); -connection slave2; +--connection master ---echo # Connect slave2 to slave ---replace_result $SLAVE_MYPORT SLAVE_MYPORT; -eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$SLAVE_MYPORT, - MASTER_LOG_FILE='slave-bin.000001', MASTER_USER='root'; -START SLAVE; -source include/wait_for_slave_to_start.inc; - ---echo ---echo # [On master] -connection master; ---disable_warnings -DROP VIEW IF EXISTS v_user; -DROP VIEW IF EXISTS v_tables_priv; -DROP VIEW IF EXISTS v_procs_priv; -DROP PROCEDURE IF EXISTS p1; -DROP PROCEDURE IF EXISTS my_grant; -DROP PROCEDURE IF EXISTS my_revoke; -DROP FUNCTION IF EXISTS my_user; -DROP EVENT IF EXISTS e1; ---enable_warnings CREATE TABLE t1(c1 char(100)); CREATE VIEW test.v_user AS SELECT * FROM mysql.user WHERE User LIKE 'bug48321%'; CREATE VIEW test.v_tables_priv AS SELECT * FROM mysql.tables_priv WHERE User LIKE 'bug48321%'; @@ -64,75 +60,76 @@ connection conn1; --echo # [On conn1] --echo # Verify 'REVOKE ALL' statement REVOKE ALL PRIVILEGES, GRANT OPTION FROM CURRENT_USER(); -let $diff_table= test.v_user; -let $diff_server_list= master, slave, slave2; -source include/rpl_diff_tables.inc; +--source include/rpl_sync.inc +let $diff_tables= server_1:v_user, server_2:v_user, server_3:v_user; +source include/diff_tables.inc; --echo --echo # Verify 'GRANT ... ON TABLE ...' statement -connection conn1; GRANT CREATE, INSERT, SELECT ON TABLE test.t1 TO CURRENT_USER(); -let $diff_table= test.v_tables_priv; -source include/rpl_diff_tables.inc; +--source include/rpl_sync.inc +let $diff_tables= server_1:v_tables_priv, server_2:v_tables_priv, server_3:v_tables_priv; +source include/diff_tables.inc; --echo --echo # Verify 'GRANT ... ON PROCEDURE...' statement -connection conn1; GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO CURRENT_USER(); -let $diff_table= test.v_procs_priv; -source include/rpl_diff_tables.inc; +--source include/rpl_sync.inc +let $diff_tables= server_1:v_procs_priv, server_2:v_procs_priv, server_3:v_procs_priv; +source include/diff_tables.inc; --echo --echo # Verify 'GRANT ... ON *.* ...' statement -connection conn1; GRANT ALL PRIVILEGES ON *.* TO CURRENT_USER() WITH GRANT OPTION; -source include/rpl_diff_tables.inc; +--source include/rpl_sync.inc +let $diff_tables= server_1:v_procs_priv, server_2:v_procs_priv, server_3:v_procs_priv; +source include/diff_tables.inc; --echo --echo # Verify 'REVOKE ... ON TABLE ...' statement -connection conn1; REVOKE CREATE, INSERT, SELECT ON TABLE t1 FROM CURRENT_USER(); -let $diff_table= test.v_tables_priv; -source include/rpl_diff_tables.inc; +--source include/rpl_sync.inc +let $diff_tables= server_1:v_tables_priv, server_2:v_tables_priv, server_3:v_tables_priv; +source include/diff_tables.inc; --echo --echo # Verify 'REVOKE ... ON PROCEDURE...' statement -connection conn1; REVOKE ALTER ROUTINE, EXECUTE ON PROCEDURE p1 FROM CURRENT_USER(); -let $diff_table= test.v_procs_priv; -source include/rpl_diff_tables.inc; +--source include/rpl_sync.inc +let $diff_tables= server_1:v_procs_priv, server_2:v_procs_priv, server_3:v_procs_priv; +source include/diff_tables.inc; --echo --echo # Verify 'REVOKE ... ON *.* ...' statement -connection conn1; REVOKE ALL PRIVILEGES ON *.* FROM CURRENT_USER(); -let $diff_table= test.v_user; -source include/rpl_diff_tables.inc; +--source include/rpl_sync.inc +let $diff_tables= server_1:v_user, server_2:v_user, server_3:v_user; +source include/diff_tables.inc; --echo --echo # Verify 'GRANT ...' statement in the procedure -connection conn1; CREATE PROCEDURE my_grant() GRANT CREATE, INSERT, SELECT ON TABLE test.t1 TO CURRENT_USER(); call my_grant; -let $diff_table= test.v_tables_priv; -source include/rpl_diff_tables.inc; +--source include/rpl_sync.inc +let $diff_tables= server_1:v_tables_priv, server_2:v_tables_priv, server_3:v_tables_priv; +source include/diff_tables.inc; --echo --echo # Verify 'REVOKE ... ON TABLE ...' statement in the procedure -connection conn1; CREATE PROCEDURE my_revoke() REVOKE CREATE, INSERT, SELECT ON TABLE t1 FROM CURRENT_USER(); call my_revoke; -let $diff_table= test.v_tables_priv; -source include/rpl_diff_tables.inc; +--source include/rpl_sync.inc +let $diff_tables= server_1:v_tables_priv, server_2:v_tables_priv, server_3:v_tables_priv; +source include/diff_tables.inc; --echo --echo # Verify 'RENAME USER ...' statement -connection conn1; RENAME USER CURRENT_USER TO 'bug48321_2'@'localhost'; -let $diff_table= test.v_user; -source include/rpl_diff_tables.inc; +--source include/rpl_sync.inc +let $diff_tables= server_1:v_user, server_2:v_user, server_3:v_user; +source include/diff_tables.inc; disconnect conn1; @@ -143,7 +140,9 @@ GRANT CREATE USER ON *.* TO 'bug48321_2'@'localhost'; connect (conn1, 127.0.0.1, 'bug48321_2'@'localhost',,); connection conn1; DROP USER CURRENT_USER(); -source include/rpl_diff_tables.inc; +--source include/rpl_sync.inc +let $diff_tables= server_1:v_user, server_2:v_user, server_3:v_user; +source include/diff_tables.inc; --echo --echo # Verify 'ALTER EVENT...' statement @@ -152,16 +151,17 @@ CREATE EVENT e1 ON SCHEDULE EVERY 1 DAY DO SELECT * FROM t1; --echo # Explicitly assign CURRENT_USER() to definer ALTER DEFINER=CURRENT_USER() EVENT e1 ENABLE; -let $diff_table= test.v_event; -source include/rpl_diff_tables.inc; +--source include/rpl_sync.inc +let $diff_tables= server_1:v_event, server_2:v_event, server_3:v_event; +source include/diff_tables.inc; -connection master; --echo --echo # Session user will be set as definer, if the statement does not assign --echo # a definer ALTER EVENT e1 ENABLE; -sync_slave_with_master; -source include/rpl_diff_tables.inc; +--source include/rpl_sync.inc +let $diff_tables= server_1:v_event, server_2:v_event, server_3:v_event; +source include/diff_tables.inc; --echo --echo # Verify that this patch does not affect the calling of CURRENT_USER() @@ -173,8 +173,8 @@ SELECT * FROM t1; sync_slave_with_master; --echo # [On slave] SELECT * FROM t1; ---echo # [On slave2] -sync_slave_with_master slave2; +--echo # [On server_3] +sync_slave_with_master server_3; SELECT * FROM t1; connection master; @@ -184,8 +184,8 @@ SELECT * FROM t1; sync_slave_with_master; --echo # [On slave] SELECT * FROM t1; -sync_slave_with_master slave2; ---echo # [On slave2] +sync_slave_with_master server_3; +--echo # [On server_3] SELECT * FROM t1; connection master; @@ -195,8 +195,8 @@ SELECT * FROM t1; sync_slave_with_master; --echo # [On slave] SELECT * FROM t1; -sync_slave_with_master slave2; ---echo # [On slave2] +sync_slave_with_master server_3; +--echo # [On server_3] SELECT * FROM t1; connection master; @@ -219,8 +219,8 @@ sync_slave_with_master; --echo # [On slave] SELECT * FROM t1; SELECT * FROM t2; -sync_slave_with_master slave2; ---echo # [On slave2] +sync_slave_with_master server_3; +--echo # [On server_3] SELECT * FROM t1; SELECT * FROM t2; @@ -234,6 +234,5 @@ DROP PROCEDURE my_grant; DROP PROCEDURE my_revoke; DROP FUNCTION my_user; DROP EVENT e1; -sync_slave_with_master; -sync_slave_with_master slave2; -source include/master-slave-end.inc; +--source include/rpl_end.inc + diff --git a/mysql-test/suite/rpl/t/rpl_ddl.test b/mysql-test/suite/rpl/t/rpl_ddl.test index 80df16a7a00..83a530131a6 100644 --- a/mysql-test/suite/rpl/t/rpl_ddl.test +++ b/mysql-test/suite/rpl/t/rpl_ddl.test @@ -30,3 +30,4 @@ let $temp_engine_type= MEMORY; let $show_binlog = 0; let $manipulate = 0; -- source extra/rpl_tests/rpl_ddl.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_deadlock_innodb.test b/mysql-test/suite/rpl/t/rpl_deadlock_innodb.test index ee907f81b22..b2d4e42a973 100644 --- a/mysql-test/suite/rpl/t/rpl_deadlock_innodb.test +++ b/mysql-test/suite/rpl/t/rpl_deadlock_innodb.test @@ -1,10 +1,3 @@ -################################ -# Wrapper for rpl_deadlock.test# -################################ -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -# Added to skip if ndb is default # -######################################################## -- source include/not_ndb_default.inc -- source include/have_innodb.inc let $engine_type=innodb; diff --git a/mysql-test/suite/rpl/t/rpl_delete_no_where.test b/mysql-test/suite/rpl/t/rpl_delete_no_where.test index 64a293b4058..4bfe6d07b5a 100644 --- a/mysql-test/suite/rpl/t/rpl_delete_no_where.test +++ b/mysql-test/suite/rpl/t/rpl_delete_no_where.test @@ -5,3 +5,4 @@ -- source include/master-slave.inc let $engine_type=myisam; -- source extra/rpl_tests/rpl_delete_no_where.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_do_grant.test b/mysql-test/suite/rpl/t/rpl_do_grant.test index 2ac36e62563..a39c3fb6375 100644 --- a/mysql-test/suite/rpl/t/rpl_do_grant.test +++ b/mysql-test/suite/rpl/t/rpl_do_grant.test @@ -208,15 +208,17 @@ DROP DATABASE bug42217_db; -- connection master # user was already dropped in the slave before -# so no need to wait for the slave to replicate -# this statement (if it did and we later synced -# the slave it would end up in an error anyway) +# so we should not replicate this statement. +SET SQL_LOG_BIN= 0; DROP USER 'create_rout_db'@'localhost'; +SET SQL_LOG_BIN= 1; # finish entire clean up (remove binlogs) # so that we leave a pristine environment for the # following tests --- source include/master-slave-reset.inc +--let $rpl_only_running_threads= 1 +-- source include/rpl_reset.inc +USE test; # BUG#49119: Master crashes when executing 'REVOKE ... ON # {PROCEDURE|FUNCTION} FROM ...' @@ -241,7 +243,7 @@ DROP USER 'create_rout_db'@'localhost'; -- echo ######## BUG#49119 ####### -- echo ### i) test case from the 'how to repeat section' --- source include/master-slave-reset.inc + -- connection master CREATE TABLE t1(c1 INT); @@ -262,7 +264,7 @@ DROP PROCEDURE p1; -- echo ### ii) Test case in which REVOKE partially succeeds -- connection master --- source include/master-slave-reset.inc +-- source include/rpl_reset.inc -- connection master CREATE TABLE t1(c1 INT); @@ -322,8 +324,7 @@ DROP USER 'user49119'@'localhost'; # Bug #51987 revoke privileges logs wrong error code # --- connection master --- source include/master-slave-reset.inc +-- source include/rpl_reset.inc -- connection master grant all on *.* to foo@"1.2.3.4"; @@ -337,11 +338,7 @@ revoke all privileges, grant option from "foo"; ## assertion: slave replicates revoke and does not fail because master ## logged revoke with correct expected error code --- let $err= query_get_value(SHOW SLAVE STATUS, Last_SQL_Errno, 1) - if ($err) -{ - -- die UNEXPECTED ERROR AT SLAVE: $err -} +--source include/check_slave_no_error.inc -- connection master DROP USER foo@"1.2.3.4"; @@ -349,8 +346,7 @@ DROP USER foo@"1.2.3.4"; --echo --echo # Bug#27606 GRANT statement should be replicated with DEFINER information ---connection master ---source include/master-slave-reset.inc +--source include/rpl_reset.inc --connection master GRANT SELECT, INSERT ON mysql.user TO user_bug27606@localhost; @@ -367,5 +363,4 @@ SELECT Grantor FROM mysql.tables_priv WHERE User='user_bug27606'; --connection master DROP USER user_bug27606@localhost; ---source include/master-slave-end.inc ---echo "End of test" +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_drop.test b/mysql-test/suite/rpl/t/rpl_drop.test index 6f586d90de3..7b8873345b9 100644 --- a/mysql-test/suite/rpl/t/rpl_drop.test +++ b/mysql-test/suite/rpl/t/rpl_drop.test @@ -1,12 +1,12 @@ # Testcase for BUG#4552 (DROP on two tables, one of which does not # exist, must be binlogged with a non-zero error code) source include/master-slave.inc; ---disable_warnings -drop table if exists t1, t2; ---enable_warnings + create table t1 (a int); --error 1051 drop table t1, t2; -sync_slave_with_master; +--sync_slave_with_master # End of 4.1 tests + +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_drop_db.test b/mysql-test/suite/rpl/t/rpl_drop_db.test index 11e93e7307a..c3194f08f52 100644 --- a/mysql-test/suite/rpl/t/rpl_drop_db.test +++ b/mysql-test/suite/rpl/t/rpl_drop_db.test @@ -58,4 +58,5 @@ drop table t1; drop database mysqltest1; sync_slave_with_master; -source include/stop_slave.inc; + +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_drop_temp.test b/mysql-test/suite/rpl/t/rpl_drop_temp.test index 7bc55c53447..641813070ca 100644 --- a/mysql-test/suite/rpl/t/rpl_drop_temp.test +++ b/mysql-test/suite/rpl/t/rpl_drop_temp.test @@ -71,9 +71,8 @@ sync_slave_with_master; # BUG#54842: DROP TEMPORARY TABLE not binlogged after manual switching binlog format to ROW # --- connection master --- source include/master-slave-reset.inc --- connection master +--source include/rpl_reset.inc +--connection master CREATE TABLE t1 ( i INT ); --sync_slave_with_master @@ -95,3 +94,4 @@ SHOW STATUS LIKE 'Slave_open_temp_tables'; DROP TABLE t1; # End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_drop_view.test b/mysql-test/suite/rpl/t/rpl_drop_view.test index 05bf112b8b8..55a0ea104d8 100644 --- a/mysql-test/suite/rpl/t/rpl_drop_view.test +++ b/mysql-test/suite/rpl/t/rpl_drop_view.test @@ -32,3 +32,4 @@ select * from v3; connection master; drop table t1, t2, t3; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_dual_pos_advance.test b/mysql-test/suite/rpl/t/rpl_dual_pos_advance.test index ab1de6a2e9f..618576f5641 100644 --- a/mysql-test/suite/rpl/t/rpl_dual_pos_advance.test +++ b/mysql-test/suite/rpl/t/rpl_dual_pos_advance.test @@ -6,33 +6,21 @@ # of their server id). # It also will test BUG#13861. -source include/master-slave.inc; source include/have_innodb.inc; - -# set up "dual head" - -# Needed for debug info in wait_for_slave_sql_to_stop. -let $master_connection= slave; -connection slave; -reset master; - -connection master; ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval change master to master_host="127.0.0.1",master_port=$SLAVE_MYPORT,master_user="root"; - -source include/start_slave.inc; +--let $rpl_topology= 1->2->1 +--source include/rpl_init.inc # now we test it -connection slave; +connection server_2; create table t1 (n int); let $master_log_file= query_get_value(SHOW MASTER STATUS, File, 1); let $master_log_pos_1= query_get_value(SHOW MASTER STATUS, Position, 1); let $master_log_pos_1= `SELECT $master_log_pos_1 + 3`; -sync_slave_with_master master; +--sync_slave_with_master server_1 # # BUG#13861 - START SLAVE UNTIL may stop 1 evnt too late if @@ -42,7 +30,7 @@ source include/stop_slave.inc; create table t2 (n int); # create one ignored event -sync_slave_with_master; +--sync_slave_with_master server_2 show tables; @@ -59,7 +47,8 @@ insert into t3 values(3); commit; insert into t3 values(4); -connection master; + +connection server_1; # bug is that START SLAVE UNTIL may stop too late, we test that by # asking it to stop before creation of t3. @@ -89,26 +78,20 @@ source include/start_slave.inc; # BUG#13023 is that Exec_master_log_pos may stay too low "forever": -connection master; +connection server_1; create table t4 (n int); # create 3 ignored events create table t5 (n int); create table t6 (n int); -sync_slave_with_master; -sync_slave_with_master master; +--sync_slave_with_master server_2 # then BUG#13023 caused hang below ("master" looks behind, while it's # not in terms of updates done). +--sync_slave_with_master server_1 show tables; # cleanup - -source include/stop_slave.inc; -reset slave; -drop table t1,t2,t3,t4,t5,t6; - -sync_slave_with_master; - -# End of 4.1 tests +drop table t1, t2, t3, t4, t5, t6; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_empty_master_host.test b/mysql-test/suite/rpl/t/rpl_empty_master_host.test index 7d245b1d5d5..df0c85ad7ec 100644 --- a/mysql-test/suite/rpl/t/rpl_empty_master_host.test +++ b/mysql-test/suite/rpl/t/rpl_empty_master_host.test @@ -49,3 +49,4 @@ let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1); # start slave must succeed. START SLAVE; --source include/wait_for_slave_to_start.inc +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_err_ignoredtable.test b/mysql-test/suite/rpl/t/rpl_err_ignoredtable.test index 05cccdbae1d..9ebed299956 100644 --- a/mysql-test/suite/rpl/t/rpl_err_ignoredtable.test +++ b/mysql-test/suite/rpl/t/rpl_err_ignoredtable.test @@ -64,3 +64,6 @@ DROP TABLE test.t4; sync_slave_with_master; # End of 4.1 tests # Adding comment for force manual merge 5.0 -> wl1012. delete me if needed + + +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_events.test b/mysql-test/suite/rpl/t/rpl_events.test index 45ef12862fc..1de5006f647 100644 --- a/mysql-test/suite/rpl/t/rpl_events.test +++ b/mysql-test/suite/rpl/t/rpl_events.test @@ -101,3 +101,4 @@ DROP EVENT event44331_2; DROP EVENT event44331_3; DROP EVENT event44331_4; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_extraCol_innodb.test b/mysql-test/suite/rpl/t/rpl_extraCol_innodb.test deleted file mode 100644 index e9685baf01b..00000000000 --- a/mysql-test/suite/rpl/t/rpl_extraCol_innodb.test +++ /dev/null @@ -1,13 +0,0 @@ -########################################### -# Author: Jeb -# Date: 2006-09-08 -# Purpose: Wapper for rpl_extraSlave_Col.test -# Using innodb -########################################### --- source include/have_binlog_format_row.inc --- source include/have_innodb.inc --- source include/master-slave.inc -let $engine_type = 'InnoDB'; --- source extra/rpl_tests/rpl_extraSlave_Col.test - - diff --git a/mysql-test/suite/rpl/t/rpl_extraCol_myisam.test b/mysql-test/suite/rpl/t/rpl_extraCol_myisam.test deleted file mode 100644 index d56df394ccf..00000000000 --- a/mysql-test/suite/rpl/t/rpl_extraCol_myisam.test +++ /dev/null @@ -1,12 +0,0 @@ -########################################### -# Author: Jeb -# Date: 2006-09-07 -# Purpose: Wapper for rpl_extraSlave_Col.test -# Using MyISAM -########################################### --- source include/have_binlog_format_row.inc --- source include/master-slave.inc -let $engine_type = 'MyISAM'; --- source extra/rpl_tests/rpl_extraSlave_Col.test - - diff --git a/mysql-test/suite/rpl/t/rpl_extraColmaster_innodb.test b/mysql-test/suite/rpl/t/rpl_extra_col_master_innodb.test similarity index 80% rename from mysql-test/suite/rpl/t/rpl_extraColmaster_innodb.test rename to mysql-test/suite/rpl/t/rpl_extra_col_master_innodb.test index 29758366577..f48880b5dfa 100644 --- a/mysql-test/suite/rpl/t/rpl_extraColmaster_innodb.test +++ b/mysql-test/suite/rpl/t/rpl_extra_col_master_innodb.test @@ -6,4 +6,6 @@ -- source include/have_innodb.inc let $engine_type = 'InnoDB'; ---source extra/rpl_tests/rpl_extraMaster_Col.test +--source extra/rpl_tests/rpl_extra_col_master.test + +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_extraColmaster_myisam.test b/mysql-test/suite/rpl/t/rpl_extra_col_master_myisam.test similarity index 78% rename from mysql-test/suite/rpl/t/rpl_extraColmaster_myisam.test rename to mysql-test/suite/rpl/t/rpl_extra_col_master_myisam.test index 31529a19cfc..4f344cfaca9 100644 --- a/mysql-test/suite/rpl/t/rpl_extraColmaster_myisam.test +++ b/mysql-test/suite/rpl/t/rpl_extra_col_master_myisam.test @@ -5,4 +5,6 @@ -- source include/master-slave.inc let $engine_type = 'MyISAM'; ---source extra/rpl_tests/rpl_extraMaster_Col.test +--source extra/rpl_tests/rpl_extra_col_master.test + +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_extra_col_slave_innodb.test b/mysql-test/suite/rpl/t/rpl_extra_col_slave_innodb.test new file mode 100644 index 00000000000..f4b04468273 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_extra_col_slave_innodb.test @@ -0,0 +1,7 @@ +-- source include/have_binlog_format_row.inc +-- source include/have_innodb.inc +-- source include/master-slave.inc + +let $engine_type = 'InnoDB'; +-- source extra/rpl_tests/rpl_extra_col_slave.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_extra_col_slave_myisam.test b/mysql-test/suite/rpl/t/rpl_extra_col_slave_myisam.test new file mode 100644 index 00000000000..d8d64aed566 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_extra_col_slave_myisam.test @@ -0,0 +1,6 @@ +-- source include/have_binlog_format_row.inc +-- source include/master-slave.inc + +let $engine_type = 'MyISAM'; +-- source extra/rpl_tests/rpl_extra_col_slave.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_failed_optimize.test b/mysql-test/suite/rpl/t/rpl_failed_optimize.test index 81e8342b5c0..798b3ef8b41 100644 --- a/mysql-test/suite/rpl/t/rpl_failed_optimize.test +++ b/mysql-test/suite/rpl/t/rpl_failed_optimize.test @@ -1,10 +1,3 @@ -####################################### -# Wrapper for rpl_failed_optimize.test# -####################################### -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -# Added to skip if ndb is default # -######################################################## -- source include/not_ndb_default.inc -- source include/have_innodb.inc let $engine_type=InnoDB; diff --git a/mysql-test/suite/rpl/t/rpl_filter_tables_not_exist.test b/mysql-test/suite/rpl/t/rpl_filter_tables_not_exist.test index aa2dee0fe57..8e1c9eb98b2 100644 --- a/mysql-test/suite/rpl/t/rpl_filter_tables_not_exist.test +++ b/mysql-test/suite/rpl/t/rpl_filter_tables_not_exist.test @@ -204,4 +204,4 @@ SELECT * FROM t3; connection master; echo [on master]; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -source include/master-slave-end.inc; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_flush_logs.test b/mysql-test/suite/rpl/t/rpl_flush_logs.test index 5159acaae14..6e9de634157 100644 --- a/mysql-test/suite/rpl/t/rpl_flush_logs.test +++ b/mysql-test/suite/rpl/t/rpl_flush_logs.test @@ -24,23 +24,16 @@ sync_slave_with_master; --echo # Make sure relay logs was not be flushed --echo # after execute 'flush error logs' statement. --error 1 -file_exists $MYSQLTEST_VARDIR/mysqld.2/data/slave-relay-bin.000004; - - -# Test 'flush relay logs' statement. ---echo # Make sure the 'slave-relay-bin.000004' file does not ---echo # exist before execute 'flush relay logs' statement. ---error 1 -file_exists $MYSQLTEST_VARDIR/mysqld.2/data/slave-relay-bin.000004; +file_exists $MYSQLTEST_VARDIR/mysqld.2/data/slave-relay-bin.000003; connection master; --echo # Test if support 'flush relay logs' statement. flush relay logs; sync_slave_with_master; ---echo # Check the 'slave-relay-bin.000004' file is created +--echo # Check the 'slave-relay-bin.000003' file is created --echo # after executed 'flush relay logs' statement. -file_exists $MYSQLTEST_VARDIR/mysqld.2/data/slave-relay-bin.000004; +file_exists $MYSQLTEST_VARDIR/mysqld.2/data/slave-relay-bin.000003; connection master; --echo # Make sure binary logs was not be flushed @@ -96,10 +89,10 @@ file_exists $MYSQLTEST_VARDIR/mysqld.1/data/master-bin.000001; # Test 'flush error logs, relay logs' statement sync_slave_with_master; ---echo # Make sure the 'slave-relay-bin.000007' file does not exist +--echo # Make sure the 'slave-relay-bin.000006' file does not exist --echo # exist before execute 'flush error logs, relay logs' statement. --error 1 -file_exists $MYSQLTEST_VARDIR/mysqld.2/data/slave-relay-bin.000007; +file_exists $MYSQLTEST_VARDIR/mysqld.2/data/slave-relay-bin.000006; connection master; @@ -114,19 +107,19 @@ file_exists $MYSQLTEST_VARDIR/tmp/master_log.err; file_exists $MYSQLTEST_VARDIR/mysqld.1/data/master-bin.000003; sync_slave_with_master; ---echo # Check the 'slave-relay-bin.000007' file is created after +--echo # Check the 'slave-relay-bin.000006' file is created after --echo # execute 'flush error logs, relay logs' statement. -file_exists $MYSQLTEST_VARDIR/mysqld.2/data/slave-relay-bin.000007; +file_exists $MYSQLTEST_VARDIR/mysqld.2/data/slave-relay-bin.000006; # Test 'flush logs' statement ---echo # Make sure the 'slave-relay-bin.000008' and 'slave-relay-bin.000009' ---echo # files do not exist before execute 'flush error logs, relay logs' +--echo # Make sure the 'slave-relay-bin.000007' and 'slave-relay-bin.000008' +--echo # files do not exist before execute 'flush error logs, relay logs' --echo # statement. --error 1 -file_exists $MYSQLTEST_VARDIR/mysqld.2/data/slave-relay-bin.000008; +file_exists $MYSQLTEST_VARDIR/mysqld.2/data/slave-relay-bin.000007; --error 1 -file_exists $MYSQLTEST_VARDIR/mysqld.2/data/slave-relay-bin.000009; +file_exists $MYSQLTEST_VARDIR/mysqld.2/data/slave-relay-bin.000008; connection master; @@ -140,8 +133,9 @@ file_exists $MYSQLTEST_VARDIR/tmp/master_log.err; file_exists $MYSQLTEST_VARDIR/mysqld.1/data/master-bin.000003; sync_slave_with_master; ---echo # Check the 'slave-relay-bin.000008' and 'slave-relay-bin.000009' +--echo # Check the 'slave-relay-bin.000007' and 'slave-relay-bin.000008' --echo # files are created after execute 'flush logs' statement. +file_exists $MYSQLTEST_VARDIR/mysqld.2/data/slave-relay-bin.000007; file_exists $MYSQLTEST_VARDIR/mysqld.2/data/slave-relay-bin.000008; -file_exists $MYSQLTEST_VARDIR/mysqld.2/data/slave-relay-bin.000009; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_flushlog_loop-master.opt b/mysql-test/suite/rpl/t/rpl_flushlog_loop-master.opt index ad7fd508afe..3b5d41d4261 100644 --- a/mysql-test/suite/rpl/t/rpl_flushlog_loop-master.opt +++ b/mysql-test/suite/rpl/t/rpl_flushlog_loop-master.opt @@ -1 +1 @@ ---max_binlog_size=1M --relay-log=$MYSQLTEST_VARDIR/mysqld.1/data/relay-log +--max_binlog_size=1M diff --git a/mysql-test/suite/rpl/t/rpl_flushlog_loop-master.sh b/mysql-test/suite/rpl/t/rpl_flushlog_loop-master.sh deleted file mode 100644 index a321dd690cd..00000000000 --- a/mysql-test/suite/rpl/t/rpl_flushlog_loop-master.sh +++ /dev/null @@ -1,5 +0,0 @@ -rm -f $MYSQLTEST_VARDIR/slave-data/*-bin.* -rm -f $MYSQLTEST_VARDIR/slave-data/master.info -rm -f $MYSQLTEST_VARDIR/slave-data/*.index - - diff --git a/mysql-test/suite/rpl/t/rpl_flushlog_loop-slave.opt b/mysql-test/suite/rpl/t/rpl_flushlog_loop-slave.opt index c8d2f85bcb7..3b5d41d4261 100644 --- a/mysql-test/suite/rpl/t/rpl_flushlog_loop-slave.opt +++ b/mysql-test/suite/rpl/t/rpl_flushlog_loop-slave.opt @@ -1 +1 @@ ---max_binlog_size=1M --relay-log=$MYSQLTEST_VARDIR/mysqld.2/data/relay-log +--max_binlog_size=1M diff --git a/mysql-test/suite/rpl/t/rpl_flushlog_loop-slave.sh b/mysql-test/suite/rpl/t/rpl_flushlog_loop-slave.sh deleted file mode 100644 index e46ea6d400b..00000000000 --- a/mysql-test/suite/rpl/t/rpl_flushlog_loop-slave.sh +++ /dev/null @@ -1,4 +0,0 @@ -rm -f $MYSQLTEST_VARDIR/master-data/master.info -rm -f $MYSQLTEST_VARDIR/master-data/*-bin.* -rm -f $MYSQLTEST_VARDIR/master-data/*.index - diff --git a/mysql-test/suite/rpl/t/rpl_flushlog_loop.test b/mysql-test/suite/rpl/t/rpl_flushlog_loop.test index 76cd73ba9e0..d5d362bac0f 100644 --- a/mysql-test/suite/rpl/t/rpl_flushlog_loop.test +++ b/mysql-test/suite/rpl/t/rpl_flushlog_loop.test @@ -1,37 +1,12 @@ # Testing if "flush logs" command bouncing resulting in logs created in a loop # in case of bi-directional replication --- source include/master-slave.inc -# Use wait_for_slave_to_(start|stop) for current connections -let $keep_connection= 1; +--let $rpl_topology= 1->2->1 +--source include/rpl_init.inc let $MYSQLD_DATADIR= `select @@datadir`; --replace_result $MYSQLD_DATADIR MYSQLD_DATADIR/ show variables like 'relay_log%'; -connection slave; ---disable_warnings -stop slave; ---source include/wait_for_slave_to_stop.inc ---enable_warnings ---replace_result $MASTER_MYPORT MASTER_PORT -eval change master to master_host='127.0.0.1',master_user='root', - master_password='',master_port=$MASTER_MYPORT; -start slave; ---source include/wait_for_slave_to_start.inc -# -# Start replication slave -> master -# -connection master; ---disable_warnings -stop slave; ---source include/wait_for_slave_to_stop.inc ---enable_warnings ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval change master to master_host='127.0.0.1',master_user='root', - master_password='',master_port=$SLAVE_MYPORT; - -source include/start_slave.inc; - # # Flush logs of slave # @@ -43,16 +18,16 @@ source include/start_slave.inc; CREATE TABLE t1 (a INT KEY) ENGINE= MyISAM; let $wait_binlog_event= CREATE TABLE t1; --source include/wait_for_binlog_event.inc -sync_slave_with_master; +sync_slave_with_master server_2; -connection master; +connection server_1; INSERT INTO t1 VALUE(1); FLUSH LOGS; -sync_slave_with_master; +sync_slave_with_master server_2; INSERT INTO t1 VALUE(2); let $slave_param_value= query_get_value(SHOW MASTER STATUS, Position, 1); -sync_slave_with_master master; +sync_slave_with_master server_1; # # Check that the master server's slave threads are still running and show @@ -63,7 +38,9 @@ sync_slave_with_master master; --source include/show_slave_status.inc --disable_query_log -connection master; +connection server_1; DROP TABLE t1; -sync_slave_with_master; +sync_slave_with_master server_2; --enable_query_log + +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_foreign_key_innodb.test b/mysql-test/suite/rpl/t/rpl_foreign_key_innodb.test index d085bff2012..ce28c0334ec 100644 --- a/mysql-test/suite/rpl/t/rpl_foreign_key_innodb.test +++ b/mysql-test/suite/rpl/t/rpl_foreign_key_innodb.test @@ -1,10 +1,3 @@ -################################### -# Wrapper for rpl_foreign_key.test# -################################### -# Change Author: JBM -# Change Date: 2006-01-17 -# Change: FK not supported, skip test when NDB is forced -#################################### -- source include/not_ndb_default.inc -- source include/have_innodb.inc let $engine_type=INNODB; diff --git a/mysql-test/suite/rpl/t/rpl_free_items.test b/mysql-test/suite/rpl/t/rpl_free_items.test index 043e84160b8..581409cfc10 100644 --- a/mysql-test/suite/rpl/t/rpl_free_items.test +++ b/mysql-test/suite/rpl/t/rpl_free_items.test @@ -20,3 +20,4 @@ drop table t2; sync_slave_with_master; # End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_geometry.test b/mysql-test/suite/rpl/t/rpl_geometry.test index eac98924b98..769c49c96b1 100644 --- a/mysql-test/suite/rpl/t/rpl_geometry.test +++ b/mysql-test/suite/rpl/t/rpl_geometry.test @@ -23,4 +23,4 @@ sync_slave_with_master; connection master; drop table t1, t2; -source include/master-slave-end.inc; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_get_lock.test b/mysql-test/suite/rpl/t/rpl_get_lock.test index b4ca57ce541..b5c08858055 100644 --- a/mysql-test/suite/rpl/t/rpl_get_lock.test +++ b/mysql-test/suite/rpl/t/rpl_get_lock.test @@ -22,9 +22,7 @@ while ($1) dec $1; } enable_query_log; -save_master_pos; -connection slave; -sync_with_master; +sync_slave_with_master; select get_lock("lock",3); select * from t1; # There is no point in testing REPLICATIION of the IS_*_LOCK @@ -41,8 +39,9 @@ select is_free_lock("lock2"); select is_free_lock(NULL); connection master1; drop table t1; -save_master_pos; -connection slave; -sync_with_master; +sync_slave_with_master; + + +--source include/rpl_end.inc # End of 4.1 tests diff --git a/mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test b/mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test index 60765581faf..01247fefd64 100644 --- a/mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test +++ b/mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test @@ -7,12 +7,6 @@ # So they can't be verified by test case here. # Finish the following tests by calling its common test script: # extra/rpl_tests/rpl_get_master_version_and_clock.test. -# And meanwhile this test checks that the slave I/O thread refuses to start if slave -# and master have the same server id (because this is a useless setup, -# and otherwise SHOW SLAVE STATUS shows progress but all queries are -# ignored, which has caught our customers), unless -# --replicate-same-server-id. -# source include/master-slave.inc; source include/have_debug.inc; @@ -48,20 +42,6 @@ source extra/rpl_tests/rpl_get_master_version_and_clock.test; eval set global debug= '$debug_saved'; -#Test case 3: This test checks that the slave I/O thread refuses to start -#if slave and master have the same server id. -connection slave; -reset master; -# replicate ourselves -source include/stop_slave.inc; ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval change master to master_port=$SLAVE_MYPORT; -start slave; - ---echo *** must be having the replicate-same-server-id IO thread error *** -let $slave_io_errno= 1593; -let $show_slave_io_error= 1; -source include/wait_for_slave_io_error.inc; # cleanup @@ -69,3 +49,4 @@ source include/wait_for_slave_io_error.inc; SET DEBUG_SYNC= 'RESET'; # End of tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_grant.test b/mysql-test/suite/rpl/t/rpl_grant.test index 6fbdafc0f9c..1091e5aab0d 100644 --- a/mysql-test/suite/rpl/t/rpl_grant.test +++ b/mysql-test/suite/rpl/t/rpl_grant.test @@ -36,3 +36,5 @@ sync_slave_with_master; --echo **** On Slave **** SELECT user,host FROM mysql.user WHERE user like 'dummy%'; SELECT COUNT(*) FROM mysql.user WHERE user like 'dummy%'; + +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_heartbeat.test b/mysql-test/suite/rpl/t/rpl_heartbeat.test index 5862abf5c6b..92bf10eb741 100644 --- a/mysql-test/suite/rpl/t/rpl_heartbeat.test +++ b/mysql-test/suite/rpl/t/rpl_heartbeat.test @@ -165,5 +165,6 @@ drop table t1; sync_slave_with_master; set @@global.slave_net_timeout= @restore_slave_net_timeout; +--source include/stop_slave.inc --echo End of tests diff --git a/mysql-test/suite/rpl/t/rpl_heartbeat_2slaves.cnf b/mysql-test/suite/rpl/t/rpl_heartbeat_2slaves.cnf index a3ed77c8bd2..f24de9ab8b8 100644 --- a/mysql-test/suite/rpl/t/rpl_heartbeat_2slaves.cnf +++ b/mysql-test/suite/rpl/t/rpl_heartbeat_2slaves.cnf @@ -1,17 +1,12 @@ !include ../my.cnf [mysqld.1] -server_id=1 +log-slave-updates [mysqld.2] -server_id=2 +log-slave-updates [mysqld.3] -server_id=3 [ENV] -SLAVE_MYPORT1= @mysqld.3.port -SLAVE_MYSOCK1= @mysqld.3.socket - - - +SERVER_MYPORT_3= @mysqld.3.port diff --git a/mysql-test/suite/rpl/t/rpl_heartbeat_2slaves.test b/mysql-test/suite/rpl/t/rpl_heartbeat_2slaves.test index 81737feea9e..a7b44215779 100644 --- a/mysql-test/suite/rpl/t/rpl_heartbeat_2slaves.test +++ b/mysql-test/suite/rpl/t/rpl_heartbeat_2slaves.test @@ -4,98 +4,79 @@ # Purpose: Testing heartbeat for schema # 1 master and 2 slaves ############################################################# ---source include/master-slave.inc ---echo +--let $rpl_topology= 1->2,1->3 +--source include/rpl_init.inc ---echo *** Preparing *** ---connection master -let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1); ---connection slave ---echo [on slave] ---source include/stop_slave.inc -RESET SLAVE; ---replace_result $MASTER_MYPORT MASTER_PORT $binlog_file MASTER_BINLOG -eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=0.1, MASTER_LOG_FILE='$binlog_file'; ---source include/start_slave.inc ---disconnect slave1 ---connect(slave1,127.0.0.1,root,,test,$SLAVE_MYPORT1,) ---connection slave1 ---echo [on slave1] ---disable_warnings -STOP SLAVE; ---enable_warnings -RESET SLAVE; ---replace_result $MASTER_MYPORT MASTER_PORT $binlog_file MASTER_BINLOG -eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=1, MASTER_LOG_FILE='$binlog_file'; ---source include/start_slave.inc ---echo +--let $rpl_connection_name= master +--let $rpl_server_number= 1 +--source include/rpl_connect.inc + +--let $rpl_connection_name= slave_1 +--let $rpl_server_number= 2 +--source include/rpl_connect.inc + +--let $rpl_connection_name= slave_2 +--let $rpl_server_number= 3 +--source include/rpl_connect.inc # # Testing heartbeat # # Check that heartbeat events sent to both slaves with correct periods ---echo *** 2 slaves *** ---connection slave +--connection slave_1 let $status_var= slave_received_heartbeats; let $status_var_value= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1); let $status_var_comparsion= >; --source include/wait_for_status_var.inc --echo Slave has received heartbeat event ---connection slave1 +--connection slave_2 let $status_var= slave_received_heartbeats; let $status_var_value= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1); let $status_var_comparsion= >; --source include/wait_for_status_var.inc -let $slave1_rcvd_heartbeats= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1); ---echo Slave1 has received heartbeat event ---connection slave -let $slave_rcvd_heartbeats= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1); -let $result= query_get_value(SELECT ($slave_rcvd_heartbeats DIV $slave1_rcvd_heartbeats) > 1 AS Result, Result, 1); ---echo Slave has received more heartbeats than Slave1 (1 means 'yes'): $result +let $slave_2_rcvd_heartbeats= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1); +--echo slave_2 has received heartbeat event +--connection slave_1 +let $slave_1_rcvd_heartbeats= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1); +let $result= query_get_value(SELECT ($slave_1_rcvd_heartbeats DIV $slave_2_rcvd_heartbeats) > 1 AS Result, Result, 1); +--echo slave_1 has received more heartbeats than slave_2 (1 means 'yes'): $result --echo -# Create topology A->B->C and check that C receives heartbeat while B gets data -# Slave1 (B) started w/o --log-slave-updates because B should not send data from A to C ---echo *** Master->data->Slave1->heartbeat->Slave: *** ---connection slave1 ---echo [on slave1] -RESET MASTER; -let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1); ---connection slave ---echo [on slave] ---source include/stop_slave.inc -RESET SLAVE; ---replace_result $SLAVE_MYPORT1 SLAVE1_PORT $binlog_file SLAVE1_BINLOG -eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$SLAVE_MYPORT1, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=0.2, MASTER_LOG_FILE='$binlog_file'; ---source include/start_slave.inc -# Check heartbeat for new replication channel slave1->slave +# Create topology master->slave_2->slave_1 and check that slave_1 +# receives heartbeat while slave_2 gets data. + +# slave_2 was started w/o --log-slave-updates because slave_2 should +# not send data from master to slave_1 + +--source include/rpl_stop_slaves.inc +--let $rpl_topology= 1->3->2 +--source include/rpl_change_topology.inc +--source include/rpl_start_slaves.inc + +# Check heartbeat for new replication channel slave_2->slave let $status_var= slave_received_heartbeats; let $status_var_value= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1); let $status_var_comparsion= >; --source include/wait_for_status_var.inc ---echo Slave has received heartbeat event +--echo slave_1 has received heartbeat event --connection master --echo [on master] CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(10), c LONGTEXT); INSERT INTO t1 VALUES (1, 'on master', ''); ---save_master_pos SHOW TABLES; ---connection slave1 ---sync_with_master 0 ---echo [on slave1] +--echo [on slave_2] +--sync_slave_with_master slave_2 SHOW TABLES; -let $slave_pos_before= query_get_value(SHOW SLAVE STATUS, Read_Master_Log_Pos, 1); ---save_master_pos ---connection slave ---sync_with_master 0 ---echo [on slave] +let $slave_2_pos_before= query_get_value(SHOW SLAVE STATUS, Read_Master_Log_Pos, 1); +--echo [on slave_1] +--sync_slave_with_master slave_1 SHOW TABLES; --connection master --echo [on master] ---echo creating updates on master and send to slave1 during 5 second -# Generate events on master and send to slave1 during 5 second +--echo creating updates on master and send to slave_2 during 5 second +# Generate events on master and send to slave_2 during 5 second let $i= 1; let $j= 1; let $k= 1; @@ -103,17 +84,17 @@ let $k= 1; while ($i) { eval SET @c_text=REPEAT('1234567890', $j); eval UPDATE t1 SET a=$j, c=@c_text; - --connection slave1 - let $slave_pos= query_get_value(SHOW SLAVE STATUS, Read_Master_Log_Pos, 1); - if (`SELECT ($k*($slave_pos - $slave_pos_before)) > 0`) { - --connection slave - let $slave_rcvd_heartbeats_before= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1); + --connection slave_2 + let $slave_2_pos= query_get_value(SHOW SLAVE STATUS, Read_Master_Log_Pos, 1); + if (`SELECT ($k*($slave_2_pos - $slave_2_pos_before)) > 0`) { + --connection slave_1 + let $slave_1_rcvd_heartbeats_before= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1); let $k= 0; let $time_before = `SELECT NOW()`; } if (`SELECT ((1-$k)*TIMESTAMPDIFF(SECOND,'$time_before',NOW())) > 5`) { - --connection slave - let $slave_rcvd_heartbeats_after= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1); + --connection slave_1 + let $slave_1_rcvd_heartbeats_after= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1); let $i= 0; } --connection master @@ -121,10 +102,10 @@ while ($i) { sleep 0.1; } --enable_query_log ---connection slave ---echo [on slave] -let $result= query_get_value(SELECT ($slave_rcvd_heartbeats_after - $slave_rcvd_heartbeats_before) > 0 AS Result, Result, 1); ---echo Slave has received heartbeats (1 means 'yes'): $result +--connection slave_1 +--echo [on slave_1] +let $result= query_get_value(SELECT ($slave_1_rcvd_heartbeats_after - $slave_1_rcvd_heartbeats_before) > 0 AS Result, Result, 1); +--echo slave_1 has received heartbeats (1 means 'yes'): $result --echo # @@ -133,10 +114,5 @@ let $result= query_get_value(SELECT ($slave_rcvd_heartbeats_after - $slave_rcvd_ --echo *** Clean up *** --connection master DROP TABLE t1; ---save_master_pos ---connection slave1 ---sync_with_master 0 ---echo -# End of 6.0 test ---echo End of 6.0 test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_heartbeat_basic.test b/mysql-test/suite/rpl/t/rpl_heartbeat_basic.test index afa304531b8..94667485dfe 100644 --- a/mysql-test/suite/rpl/t/rpl_heartbeat_basic.test +++ b/mysql-test/suite/rpl/t/rpl_heartbeat_basic.test @@ -120,7 +120,8 @@ RESET SLAVE; --replace_result $MASTER_MYPORT MASTER_PORT eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root'; --source include/start_slave.inc ---sync_with_master +--connection master +--sync_slave_with_master SHOW VARIABLES LIKE 'slave_net_timeout'; SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period'; SET @@global.slave_net_timeout=@restore_slave_net_timeout; @@ -139,7 +140,8 @@ SET @@global.slave_net_timeout=100; --replace_result $MASTER_MYPORT MASTER_PORT eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=20; --source include/start_slave.inc ---sync_with_master +--connection master +--sync_slave_with_master SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period'; --source include/stop_slave.inc SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period'; @@ -153,13 +155,8 @@ SET @@global.slave_net_timeout=50; --enable_warnings --replace_result $MASTER_MYPORT MASTER_PORT eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=30; ---exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.2.expect ---echo Reload slave ---shutdown_server 10 ---source include/wait_until_disconnected.inc ---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.2.expect ---enable_reconnect ---source include/wait_until_connected_again.inc +--let $rpl_server_number= 2 +--source include/rpl_restart_server.inc SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period'; SET @restore_slave_net_timeout=@@global.slave_net_timeout; --echo @@ -171,7 +168,8 @@ eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTE SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period'; SHOW STATUS LIKE 'slave_received_heartbeats'; --source include/start_slave.inc ---sync_with_master +--connection master +--sync_slave_with_master --sleep 2 SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period'; SHOW STATUS LIKE 'slave_received_heartbeats'; @@ -244,7 +242,8 @@ RESET SLAVE; --replace_result $MASTER_MYPORT MASTER_PORT eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=0.1; --source include/start_slave.inc ---sync_with_master +--connection master +--sync_slave_with_master let $status_var_value= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1); let $status_var= slave_received_heartbeats; let $status_var_comparsion= >; @@ -272,8 +271,7 @@ let $status_var_value= query_get_value(SHOW STATUS LIKE 'slave_received_heartbea # Check received heartbeat events for stopped IO thread --echo *** Stopped IO thread *** -STOP SLAVE IO_THREAD; ---source include/wait_for_slave_io_to_stop.inc +--source include/stop_slave_io.inc let $rcvd_heartbeats_before= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1); sleep 2; let $rcvd_heartbeats_after= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1); @@ -292,8 +290,7 @@ let $status_var_value= query_get_value(SHOW STATUS LIKE 'slave_received_heartbea # Check received heartbeat events for stopped SQL thread --echo *** Stopped SQL thread *** -STOP SLAVE SQL_THREAD; ---source include/wait_for_slave_sql_to_stop.inc +--source include/stop_slave_sql.inc let $rcvd_heartbeats_before= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1); sleep 2; let $rcvd_heartbeats_after= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1); @@ -350,9 +347,8 @@ eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTE --connection master # Enable scheduler SET @@global.event_scheduler=1; ---connection slave +--sync_slave_with_master let $rcvd_heartbeats_before= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1); ---sync_with_master # Wait some updates for table t1 from master let $wait_condition= SELECT COUNT(*)=1 FROM t1 WHERE a > 5; --source include/wait_condition.inc @@ -443,7 +439,7 @@ let $result= query_get_value(SELECT ($rcvd_heartbeats_after - $rcvd_heartbeats_b STOP SLAVE; RESET SLAVE; --replace_result $MASTER_MYPORT MASTER_PORT -eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=0.1; +eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=0.1, MASTER_CONNECT_RETRY = 5; --source include/start_slave.inc # Wait until slave_received_heartbeats will be incremented let $status_var_value= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1); @@ -451,17 +447,11 @@ let $status_var= slave_received_heartbeats; let $status_var_comparsion= >; --source include/wait_for_status_var.inc --echo Heartbeat event received ---connection master ---exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect ---echo Reload master ---shutdown_server 10 ---source include/wait_until_disconnected.inc ---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect ---enable_reconnect ---source include/wait_until_connected_again.inc ---connection slave +--let $rpl_server_number= 1 +--source include/rpl_restart_server.inc # make sure IO thread has re-connected # due to slow valgrind env the following wait_for_status may time out +--let $rpl_allow_error= 1 --source include/wait_for_slave_io_to_start.inc # Wait until slave_received_heartbeats will be incremented let $status_var_value= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1); @@ -474,13 +464,17 @@ let $status_var_comparsion= >; # Circular replication: demonstrating bidirectional hearbeat flow --echo *** Circular replication *** # Configure circular replication ---source include/master-slave-reset.inc ---connection slave +--source include/rpl_reset.inc --source include/stop_slave.inc -let $slave_binlog= query_get_value(SHOW MASTER STATUS, File, 1); +--let $rpl_topology= 1->2->1 +--source include/rpl_change_topology.inc + +#--connection slave +#--source include/stop_slave.inc +#let $slave_binlog= query_get_value(SHOW MASTER STATUS, File, 1); --connection master ---replace_result $SLAVE_MYPORT SLAVE_PORT $slave_binlog SLAVE_BINLOG -eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$SLAVE_MYPORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=1, MASTER_LOG_FILE='$slave_binlog'; +#--replace_result $SLAVE_MYPORT SLAVE_PORT $slave_binlog SLAVE_BINLOG +#eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$SLAVE_MYPORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=1, MASTER_LOG_FILE='$slave_binlog'; --source include/start_slave.inc # Insert data on master and on slave and make sure that it replicated for both directions @@ -493,9 +487,7 @@ CHANGE MASTER TO MASTER_HEARTBEAT_PERIOD=0.1; --source include/start_slave.inc --sync_with_master INSERT INTO t1 VALUES(2, 'on slave'); ---save_master_pos ---connection master ---sync_with_master +--sync_slave_with_master master SELECT * FROM t1 ORDER BY a; let $master_rcvd_heartbeats_before= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1); --connection slave @@ -523,12 +515,10 @@ let $slave_rcvd_heartbeats= query_get_value(SHOW STATUS LIKE 'slave_received_hea # --echo *** Clean up *** --connection master ---source include/stop_slave.inc +#--source include/stop_slave.inc DROP TABLE t1; --sync_slave_with_master ---source include/stop_slave.inc SET @@global.slave_net_timeout=@restore_slave_net_timeout; ---echo -# End of tests ---echo End of tests +#--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_heartbeat_ssl.test b/mysql-test/suite/rpl/t/rpl_heartbeat_ssl.test index 6460b157b52..810db4cc6f7 100644 --- a/mysql-test/suite/rpl/t/rpl_heartbeat_ssl.test +++ b/mysql-test/suite/rpl/t/rpl_heartbeat_ssl.test @@ -46,9 +46,11 @@ let $status_var_comparsion= >; # Clean up # --echo *** Clean up *** ---connection master ---sync_slave_with_master ---echo - -# End of 6.0 test ---echo End of 6.0 test +--source include/stop_slave.inc +CHANGE MASTER TO + MASTER_SSL=0, + MASTER_SSL_CA='', + MASTER_SSL_CERT='', + MASTER_SSL_KEY=''; +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_idempotency.test b/mysql-test/suite/rpl/t/rpl_idempotency.test index a1931ce9b60..f4a78a8c069 100644 --- a/mysql-test/suite/rpl/t/rpl_idempotency.test +++ b/mysql-test/suite/rpl/t/rpl_idempotency.test @@ -34,10 +34,7 @@ SELECT * FROM t2 ORDER BY a; sync_slave_with_master; SELECT * FROM t1 ORDER BY a; SELECT * FROM t2 ORDER BY a; -let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1); -disable_query_log; -eval SELECT "$last_error" AS Last_SQL_Error; -enable_query_log; +--source include/check_slave_no_error.inc # An insert of a row that already exists. Since we are replacing the # row if it already exists, the most apropriate representation is @@ -50,10 +47,7 @@ INSERT IGNORE INTO t1 VALUES (-2); SELECT * FROM t1 ORDER BY a; sync_slave_with_master; SELECT * FROM t1 ORDER BY a; -let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1); -disable_query_log; -eval SELECT "$last_error" AS Last_SQL_Error; -enable_query_log; +--source include/check_slave_no_error.inc # BUG#19958: RBR idempotency issue for UPDATE and DELETE @@ -78,13 +72,12 @@ SELECT * FROM t2 ORDER BY a; sync_slave_with_master; SELECT * FROM t1 ORDER BY a; SELECT * FROM t2 ORDER BY a; -let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1); -disable_query_log; -eval SELECT "$last_error" AS Last_SQL_Error; -enable_query_log; +--source include/check_slave_no_error.inc connection master; DROP TABLE t1, t2; sync_slave_with_master; SET @@global.slave_exec_mode= @old_slave_exec_mode; + +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_ignore_grant.test b/mysql-test/suite/rpl/t/rpl_ignore_grant.test index 2e6e2ce9a31..34074ba8ca9 100644 --- a/mysql-test/suite/rpl/t/rpl_ignore_grant.test +++ b/mysql-test/suite/rpl/t/rpl_ignore_grant.test @@ -57,3 +57,4 @@ delete from mysql.db where user=_binary'rpl_ignore_grant'; flush privileges; # End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_ignore_revoke.test b/mysql-test/suite/rpl/t/rpl_ignore_revoke.test index 00171605a92..db20e807afc 100644 --- a/mysql-test/suite/rpl/t/rpl_ignore_revoke.test +++ b/mysql-test/suite/rpl/t/rpl_ignore_revoke.test @@ -49,3 +49,4 @@ sync_slave_with_master; # Since changes to mysql.* are ignored, the revoke need to # be done on slave as well delete from mysql.user where user="user_foo"; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_ignore_table.test b/mysql-test/suite/rpl/t/rpl_ignore_table.test index b5666ad6e91..9d74a40bef1 100644 --- a/mysql-test/suite/rpl/t/rpl_ignore_table.test +++ b/mysql-test/suite/rpl/t/rpl_ignore_table.test @@ -175,4 +175,5 @@ connection master; DROP TABLE t5; sync_slave_with_master; -call mtr.force_restart(); +--source include/rpl_end.inc +--source include/force_restart.inc diff --git a/mysql-test/suite/rpl/t/rpl_ignore_table_update.test b/mysql-test/suite/rpl/t/rpl_ignore_table_update.test index fe030f90411..840052e2f25 100644 --- a/mysql-test/suite/rpl/t/rpl_ignore_table_update.test +++ b/mysql-test/suite/rpl/t/rpl_ignore_table_update.test @@ -36,3 +36,4 @@ sync_with_master; drop table mysqltest_foo,mysqltest_bar,t1; # End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_incident.test b/mysql-test/suite/rpl/t/rpl_incident.test index 08096d03c11..b65441c7d50 100644 --- a/mysql-test/suite/rpl/t/rpl_incident.test +++ b/mysql-test/suite/rpl/t/rpl_incident.test @@ -37,3 +37,4 @@ source include/check_slave_is_running.inc; connection master; DROP TABLE t1; --sync_slave_with_master +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_init_slave.test b/mysql-test/suite/rpl/t/rpl_init_slave.test index 58d1f6bdc01..1803b146819 100644 --- a/mysql-test/suite/rpl/t/rpl_init_slave.test +++ b/mysql-test/suite/rpl/t/rpl_init_slave.test @@ -25,10 +25,10 @@ set global init_connect="set @c=1"; show variables like 'init_connect'; connection master; sync_slave_with_master; -source include/stop_slave.inc; # Restore changed global variable set global init_connect= @my_global_init_connect; set global max_connections= default; # End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_init_slave_errors.test b/mysql-test/suite/rpl/t/rpl_init_slave_errors.test index 180821730ec..cf72de18e13 100644 --- a/mysql-test/suite/rpl/t/rpl_init_slave_errors.test +++ b/mysql-test/suite/rpl/t/rpl_init_slave_errors.test @@ -53,10 +53,11 @@ start slave; # slave is going to stop because of emulated failures # but there won't be any crashes nor asserts hit. # -source include/wait_for_slave_to_stop.inc; +# 1593 = ER_SLAVE_FATAL_ERROR +--let $slave_sql_errno= 1593 +--let $show_slave_sql_error= 1 +--source include/wait_for_slave_sql_error.inc -let $error= query_get_value(SHOW SLAVE STATUS, Last_Error, 1); -echo Reporting the following error: $error; call mtr.add_suppression("Failed during slave I/O thread initialization"); SET GLOBAL debug= ""; @@ -66,22 +67,23 @@ SET GLOBAL debug= ""; ###################################################################### connection slave; ---disable_warnings -stop slave; ---enable_warnings -source include/wait_for_slave_to_stop.inc; - reset slave; SET GLOBAL init_slave= "garbage"; start slave; -source include/wait_for_slave_sql_to_stop.inc; - -let $error= query_get_value(SHOW SLAVE STATUS, Last_Error, 1); -echo Reporting the following error: $error; +# 1064 = ER_PARSE_ERROR +--let $slave_sql_errno= 1064 +--let $show_slave_sql_error= 1 +--source include/wait_for_slave_sql_error.inc ###################################################################### # Clean up ###################################################################### SET GLOBAL init_slave= ""; + +# Clean up Last_SQL_Error +--source include/stop_slave_io.inc +RESET SLAVE; +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_innodb_bug28430.test b/mysql-test/suite/rpl/t/rpl_innodb_bug28430.test index 124cf4a956f..6b82f2f5334 100644 --- a/mysql-test/suite/rpl/t/rpl_innodb_bug28430.test +++ b/mysql-test/suite/rpl/t/rpl_innodb_bug28430.test @@ -150,4 +150,4 @@ DROP TABLE test.regular_tbl; DROP TABLE test.bykey_tbl; DROP TABLE test.byrange_tbl; ---source include/master-slave-end.inc +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_innodb_bug30888.test b/mysql-test/suite/rpl/t/rpl_innodb_bug30888.test index 4311328b064..9bfce61804b 100644 --- a/mysql-test/suite/rpl/t/rpl_innodb_bug30888.test +++ b/mysql-test/suite/rpl/t/rpl_innodb_bug30888.test @@ -62,5 +62,5 @@ connection master; DROP PROCEDURE test.proc_norm; DROP TABLE test.regular_tbl; ---source include/master-slave-end.inc +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_innodb_mixed_ddl.test b/mysql-test/suite/rpl/t/rpl_innodb_mixed_ddl.test index 6eb9c7075e4..5147e67c160 100644 --- a/mysql-test/suite/rpl/t/rpl_innodb_mixed_ddl.test +++ b/mysql-test/suite/rpl/t/rpl_innodb_mixed_ddl.test @@ -1,6 +1,4 @@ ######################################### -# Author: Serge Kozlov skozlov@mysql.com -# Date: 07/10/2006 # Purpose: testing the replication in mixed mode # Requirements: define binlog format for mysqld as in example below: # ./mysql-test-run.pl --mysqld=--binlog-format=mixed @@ -8,7 +6,4 @@ --source include/have_binlog_format_mixed.inc --source include/have_innodb.inc let $engine_type= innodb; - --source suite/rpl/include/rpl_mixed_ddl.inc - -# End 5.1 Test Case diff --git a/mysql-test/suite/rpl/t/rpl_innodb_mixed_dml.test b/mysql-test/suite/rpl/t/rpl_innodb_mixed_dml.test index d48e847a6c8..d04ced0f476 100644 --- a/mysql-test/suite/rpl/t/rpl_innodb_mixed_dml.test +++ b/mysql-test/suite/rpl/t/rpl_innodb_mixed_dml.test @@ -1,6 +1,4 @@ ######################################### -# Author: Serge Kozlov skozlov@mysql.com -# Date: 07/10/2006 # Purpose: testing the replication in mixed mode # Requirements: define binlog format for mysqld as in example below: # ./mysql-test-run.pl --mysqld=--binlog-format=mixed @@ -8,7 +6,4 @@ --source include/have_binlog_format_mixed.inc --source include/have_innodb.inc let $engine_type= innodb; - --source suite/rpl/include/rpl_mixed_dml.inc - -# End 5.1 Test Case diff --git a/mysql-test/suite/rpl/t/rpl_insert.test b/mysql-test/suite/rpl/t/rpl_insert.test index 0db9b604285..833342329ae 100644 --- a/mysql-test/suite/rpl/t/rpl_insert.test +++ b/mysql-test/suite/rpl/t/rpl_insert.test @@ -42,3 +42,4 @@ connection master; USE test; DROP SCHEMA mysqlslap; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_insert_id.test b/mysql-test/suite/rpl/t/rpl_insert_id.test index 6daecce5843..f2f62a207a0 100644 --- a/mysql-test/suite/rpl/t/rpl_insert_id.test +++ b/mysql-test/suite/rpl/t/rpl_insert_id.test @@ -1,12 +1,7 @@ ################################# # Wrapper for rpl_insert_id.test# ################################# -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -# Added to skip if ndb is default # -######################################################## -- source include/not_ndb_default.inc -- source include/have_innodb.inc let $engine_type=myisam; -- source extra/rpl_tests/rpl_insert_id.test -call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); diff --git a/mysql-test/suite/rpl/t/rpl_insert_id_pk.test b/mysql-test/suite/rpl/t/rpl_insert_id_pk.test index 01f30b78ac5..c0d68855f85 100644 --- a/mysql-test/suite/rpl/t/rpl_insert_id_pk.test +++ b/mysql-test/suite/rpl/t/rpl_insert_id_pk.test @@ -1,10 +1,6 @@ ################################# # Wrapper for rpl_insert_id.test# ################################# -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -# Added to skip if ndb is default # -######################################################## -- source include/not_ndb_default.inc -- source include/have_innodb.inc let $engine_type=innodb; diff --git a/mysql-test/suite/rpl/t/rpl_insert_ignore.test b/mysql-test/suite/rpl/t/rpl_insert_ignore.test index 69be49634d0..f8887c96b55 100644 --- a/mysql-test/suite/rpl/t/rpl_insert_ignore.test +++ b/mysql-test/suite/rpl/t/rpl_insert_ignore.test @@ -10,3 +10,4 @@ call mtr.add_suppression("Unsafe statement written to the binary log using state let $engine_type=innodb; let $engine_type2=myisam; -- source extra/rpl_tests/rpl_insert_ignore.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_insert_select.test b/mysql-test/suite/rpl/t/rpl_insert_select.test index 677be526982..23bc7ecd167 100644 --- a/mysql-test/suite/rpl/t/rpl_insert_select.test +++ b/mysql-test/suite/rpl/t/rpl_insert_select.test @@ -17,3 +17,4 @@ select * from t1; connection master; drop table t1,t2; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_invoked_features.test b/mysql-test/suite/rpl/t/rpl_invoked_features.test index 74ea8e12a98..7770c36c397 100644 --- a/mysql-test/suite/rpl/t/rpl_invoked_features.test +++ b/mysql-test/suite/rpl/t/rpl_invoked_features.test @@ -308,3 +308,4 @@ DROP EVENT IF EXISTS e11; --sync_slave_with_master slave # End 5.1 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_ip_mix.test b/mysql-test/suite/rpl/t/rpl_ip_mix.test index 0852b3f4ff7..c86e1ba54b7 100644 --- a/mysql-test/suite/rpl/t/rpl_ip_mix.test +++ b/mysql-test/suite/rpl/t/rpl_ip_mix.test @@ -35,7 +35,6 @@ connect (slave,127.0.0.1,root,,test,$SLAVE_MYPORT); connection master; reset master; source include/show_master_status.inc; -save_master_pos; --echo connection slave; connection slave; reset slave; @@ -50,10 +49,6 @@ let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1); eval change master to master_host='0:0:0:0:0:0:0:1'; let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1); --echo Master-Host: $master_host ---echo disconnect slave; -disconnect slave; ---echo disconnect master; -disconnect master; ---echo connection default; -connection default; +# clean up +CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root'; diff --git a/mysql-test/suite/rpl/t/rpl_ip_mix2.test b/mysql-test/suite/rpl/t/rpl_ip_mix2.test index 11c648dece5..a69f3efc74a 100644 --- a/mysql-test/suite/rpl/t/rpl_ip_mix2.test +++ b/mysql-test/suite/rpl/t/rpl_ip_mix2.test @@ -62,10 +62,6 @@ let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1); eval change master to master_host='0:0:0:0:0:0:0:1'; let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1); --echo Master-Host: $master_host ---echo disconnect slave; -disconnect slave; ---echo disconnect master; -disconnect master; ---echo connection default; -connection default; +# clean up +CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root'; diff --git a/mysql-test/suite/rpl/t/rpl_ipv4_as_ipv6.test b/mysql-test/suite/rpl/t/rpl_ipv4_as_ipv6.test index ecd5a754fdc..cacf5e187ef 100644 --- a/mysql-test/suite/rpl/t/rpl_ipv4_as_ipv6.test +++ b/mysql-test/suite/rpl/t/rpl_ipv4_as_ipv6.test @@ -66,10 +66,6 @@ let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1); eval change master to master_host='0:0000:0000:0:0000:FFFF:127.0.0.1'; let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1); --echo Master-Host: $master_host ---echo disconnect slave; -disconnect slave; ---echo disconnect master; -disconnect master; ---echo connection default; -connection default; +# clean up +CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root'; diff --git a/mysql-test/suite/rpl/t/rpl_ipv6.test b/mysql-test/suite/rpl/t/rpl_ipv6.test index 3eceedfd7a4..c42221445fb 100644 --- a/mysql-test/suite/rpl/t/rpl_ipv6.test +++ b/mysql-test/suite/rpl/t/rpl_ipv6.test @@ -52,10 +52,6 @@ let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1); eval change master to master_host='0:0:0:0:0:0:0:1'; let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1); --echo Master-Host: $master_host ---echo disconnect slave; -disconnect slave; ---echo disconnect master; -disconnect master; ---echo connection default; -connection default; +# clean up +CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root'; diff --git a/mysql-test/suite/rpl/t/rpl_killed_ddl.test b/mysql-test/suite/rpl/t/rpl_killed_ddl.test index 6171086f747..a56a39a2784 100644 --- a/mysql-test/suite/rpl/t/rpl_killed_ddl.test +++ b/mysql-test/suite/rpl/t/rpl_killed_ddl.test @@ -139,8 +139,8 @@ disable_warnings; ######## DATABASE ######## -let $diff_statement= SELECT schema_name FROM information_schema.schemata - WHERE schema_name LIKE 'd%' ORDER BY schema_name; +let $rpl_diff_statement= SELECT schema_name FROM information_schema.schemata + WHERE schema_name LIKE \'d%\' ORDER BY schema_name; send CREATE DATABASE d2; source include/kill_query_and_diff_master_slave.inc; @@ -159,9 +159,9 @@ source include/kill_query_and_diff_master_slave.inc; ######## EVENT ######## -let $diff_statement= SELECT event_name, event_body, execute_at - FROM information_schema.events where event_name like 'e%' - ORDER BY event_name; +let $rpl_diff_statement= SELECT event_name, event_body, execute_at + FROM information_schema.events where event_name like \'e%\' + ORDER BY event_name; send CREATE EVENT e2 ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 DAY @@ -182,7 +182,7 @@ source include/kill_query_and_diff_master_slave.inc; ######## FUNCTION ######## -let $diff_statement= SHOW FUNCTION STATUS LIKE 'f%'; +--let $rpl_diff_statement= SHOW FUNCTION STATUS LIKE \'f%\' send CREATE FUNCTION f2 () RETURNS INT DETERMINISTIC RETURN 1; @@ -211,7 +211,7 @@ source include/kill_query_and_diff_master_slave.inc; ######## PROCEDURE ######## -let $diff_statement= SHOW PROCEDURE STATUS LIKE 'p%'; +--let $rpl_diff_statement= SHOW PROCEDURE STATUS LIKE \'p%\' DELIMITER //; send CREATE PROCEDURE p2 (OUT rows INT) @@ -234,7 +234,7 @@ source include/kill_query_and_diff_master_slave.inc; ######## TABLE ######## -let $diff_statement= SHOW TABLES LIKE 't%'; +--let $rpl_diff_statement= SHOW TABLES LIKE \'t%\' send CREATE TABLE t2 (b int); source include/kill_query_and_diff_master_slave.inc; @@ -247,7 +247,7 @@ source include/kill_query_and_diff_master_slave.inc; ######## INDEX ######## -let $diff_statement= SHOW INDEX FROM t1; +--let $rpl_diff_statement= SHOW INDEX FROM t1 send CREATE INDEX i2 on t1 (a); source include/kill_query_and_diff_master_slave.inc; @@ -260,7 +260,7 @@ source include/kill_query_and_diff_master_slave.inc; # Tempoarily disabled, see bug#25705 -# let $diff_statement= SELECT * FROM mysql.server WHERE name like 's%'; +# --let $rpl_diff_statement= SELECT * FROM mysql.server WHERE name like \'s%\' # send CREATE SERVER s2 # FOREIGN DATA WRAPPER mysql @@ -284,7 +284,7 @@ connection master; CREATE TABLE IF NOT EXISTS t4 (a int); connection master1; -let $diff_statement= SHOW TRIGGERS LIKE 'v%'; +--let $rpl_diff_statement= SHOW TRIGGERS LIKE \'v%\' DELIMITER //; send CREATE TRIGGER tr2 BEFORE INSERT ON t4 @@ -303,7 +303,7 @@ source include/kill_query_and_diff_master_slave.inc; ######## VIEW ######## -let $diff_statement= SHOW TABLES LIKE 'v%'; +--let $rpl_diff_statement= SHOW TABLES LIKE \'v%\' send CREATE VIEW v2 AS SELECT a FROM t1 WHERE a > 100; source include/kill_query_and_diff_master_slave.inc; @@ -316,7 +316,7 @@ source include/kill_query_and_diff_master_slave.inc; ######## DROP TABLE ######## -let $diff_statement= SHOW TABLES LIKE 't%'; +--let $rpl_diff_statement= SHOW TABLES LIKE \'t%\' send DROP TABLE t1; source include/kill_query_and_diff_master_slave.inc; @@ -357,3 +357,4 @@ DROP PROCEDURE IF EXISTS p2; DROP PROCEDURE IF EXISTS p3; DROP PROCEDURE IF EXISTS p4; enable_warnings; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_known_bugs_detection.test b/mysql-test/suite/rpl/t/rpl_known_bugs_detection.test index b48698baa47..b942c29094a 100644 --- a/mysql-test/suite/rpl/t/rpl_known_bugs_detection.test +++ b/mysql-test/suite/rpl/t/rpl_known_bugs_detection.test @@ -25,7 +25,7 @@ connection master; INSERT INTO t1(b) VALUES(1),(1),(2) ON DUPLICATE KEY UPDATE t1.b=10; SELECT * FROM t1; connection slave; ---source include/wait_for_slave_sql_to_stop.inc + # show the error message #1105 = ER_UNKNOWN_ERROR --let $slave_sql_errno= 1105 @@ -83,17 +83,25 @@ ON DUPLICATE KEY UPDATE t1.field_3 = t2.field_c; SELECT * FROM t1; connection slave; ---source include/wait_for_slave_sql_to_stop.inc + # show the error message #1105 = ER_UNKNOWN_ERROR --let $slave_sql_errno= 1105 --let $show_slave_sql_error= 1 --source include/wait_for_slave_sql_error.inc + # show that it was not replicated SELECT * FROM t1; connection master; + +# clean up drop table t1, t2; connection slave; drop table t1, t2; +# clear error message in sql thread +--source include/stop_slave_io.inc +RESET SLAVE; # End of 5.0 tests +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_load_from_master-slave.opt b/mysql-test/suite/rpl/t/rpl_load_from_master-slave.opt deleted file mode 100644 index c015c02ba78..00000000000 --- a/mysql-test/suite/rpl/t/rpl_load_from_master-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---replicate-wild-do-table=mysqltest.% diff --git a/mysql-test/suite/rpl/t/rpl_loaddata.test b/mysql-test/suite/rpl/t/rpl_loaddata.test index d5e0388be46..9f4ca1aaf18 100644 --- a/mysql-test/suite/rpl/t/rpl_loaddata.test +++ b/mysql-test/suite/rpl/t/rpl_loaddata.test @@ -1,7 +1,3 @@ -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -# Added to skip if ndb is default # -######################################################## -- source include/not_ndb_default.inc -- source include/have_binlog_format_statement.inc diff --git a/mysql-test/suite/rpl/t/rpl_loaddata_charset.test b/mysql-test/suite/rpl/t/rpl_loaddata_charset.test index 3e1bc917a41..bb87ee95913 100644 --- a/mysql-test/suite/rpl/t/rpl_loaddata_charset.test +++ b/mysql-test/suite/rpl/t/rpl_loaddata_charset.test @@ -46,3 +46,4 @@ source include/rpl_loaddata_charset.inc; # LOAD DATA LOCAL INFILE let $LOAD_LOCAL=0; source include/rpl_loaddata_charset.inc; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_loaddata_fatal.test b/mysql-test/suite/rpl/t/rpl_loaddata_fatal.test index b8975308a86..ecbaddb6995 100644 --- a/mysql-test/suite/rpl/t/rpl_loaddata_fatal.test +++ b/mysql-test/suite/rpl/t/rpl_loaddata_fatal.test @@ -23,3 +23,4 @@ connection master; DROP TABLE t1; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_loaddata_m.test b/mysql-test/suite/rpl/t/rpl_loaddata_m.test index 48451c4aee1..1fe9283ef44 100644 --- a/mysql-test/suite/rpl/t/rpl_loaddata_m.test +++ b/mysql-test/suite/rpl/t/rpl_loaddata_m.test @@ -48,3 +48,4 @@ DROP TABLE test.t1; sync_slave_with_master; # End of test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_loaddata_map.test b/mysql-test/suite/rpl/t/rpl_loaddata_map.test index 1db7c4a893b..24c8221c20f 100644 --- a/mysql-test/suite/rpl/t/rpl_loaddata_map.test +++ b/mysql-test/suite/rpl/t/rpl_loaddata_map.test @@ -71,3 +71,4 @@ connection master; drop table t2; sync_slave_with_master; remove_file $MYSQLTEST_VARDIR/tmp/bug30435_5k.txt; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_loaddata_s.test b/mysql-test/suite/rpl/t/rpl_loaddata_s.test index 91ebcf058a6..2116796871a 100644 --- a/mysql-test/suite/rpl/t/rpl_loaddata_s.test +++ b/mysql-test/suite/rpl/t/rpl_loaddata_s.test @@ -24,3 +24,4 @@ source include/show_binlog_events.inc; connection master; drop table test.t1; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_loaddata_simple.test b/mysql-test/suite/rpl/t/rpl_loaddata_simple.test index 439c2b48ca5..a09d3feec42 100644 --- a/mysql-test/suite/rpl/t/rpl_loaddata_simple.test +++ b/mysql-test/suite/rpl/t/rpl_loaddata_simple.test @@ -12,3 +12,4 @@ SELECT * FROM t1 ORDER BY word; connection master; drop table t1; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_loaddata_symlink.test b/mysql-test/suite/rpl/t/rpl_loaddata_symlink.test index 63e65834e5b..d6bc0ba2ed5 100644 --- a/mysql-test/suite/rpl/t/rpl_loaddata_symlink.test +++ b/mysql-test/suite/rpl/t/rpl_loaddata_symlink.test @@ -19,3 +19,4 @@ connection master; drop table t1; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_loaddatalocal.test b/mysql-test/suite/rpl/t/rpl_loaddatalocal.test index ed556f3aedf..8848903a30c 100644 --- a/mysql-test/suite/rpl/t/rpl_loaddatalocal.test +++ b/mysql-test/suite/rpl/t/rpl_loaddatalocal.test @@ -164,3 +164,4 @@ SET SESSION sql_mode=@old_mode; sync_slave_with_master; connection master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_loadfile.test b/mysql-test/suite/rpl/t/rpl_loadfile.test index adb23d2c2bc..ced0054c52c 100644 --- a/mysql-test/suite/rpl/t/rpl_loadfile.test +++ b/mysql-test/suite/rpl/t/rpl_loadfile.test @@ -58,8 +58,7 @@ # vii) assert that the contents of master and slave # table are the same -connection master; -source include/reset_master_and_slave.inc; +--source include/rpl_reset.inc connection master; let $file= $MYSQLTEST_VARDIR/tmp/bug_39701.data; @@ -105,11 +104,12 @@ sync_slave_with_master; # if the file was removed before the slave started, # meaning that contents were indeed transfered # through binlog (in row format) -let $diff_table_1=master:test.t1; -let $diff_table_2=slave:test.t1; +let $diff_tables= master:t1, slave:t1; source include/diff_tables.inc; # CLEAN UP +--connection master DROP TABLE t1; DROP PROCEDURE p; -sync_slave_with_master; + +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_locale.test b/mysql-test/suite/rpl/t/rpl_locale.test index 2f2d637e1b4..0d6692dd89c 100644 --- a/mysql-test/suite/rpl/t/rpl_locale.test +++ b/mysql-test/suite/rpl/t/rpl_locale.test @@ -22,3 +22,4 @@ sync_slave_with_master; # End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_log_pos.test b/mysql-test/suite/rpl/t/rpl_log_pos.test index 239ddc5c8d4..484ffa52a44 100644 --- a/mysql-test/suite/rpl/t/rpl_log_pos.test +++ b/mysql-test/suite/rpl/t/rpl_log_pos.test @@ -24,7 +24,7 @@ start slave; let $slave_io_errno= 1236; let $show_slave_io_error= 1; source include/wait_for_slave_io_error.inc; -source include/stop_slave.inc; +source include/stop_slave_sql.inc; connection master; source include/show_master_status.inc; @@ -44,3 +44,4 @@ drop table t1; sync_slave_with_master; --echo End of 5.0 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_manual_change_index_file.test b/mysql-test/suite/rpl/t/rpl_manual_change_index_file.test index ecdf10ac2c2..b0d3b23b4e1 100644 --- a/mysql-test/suite/rpl/t/rpl_manual_change_index_file.test +++ b/mysql-test/suite/rpl/t/rpl_manual_change_index_file.test @@ -58,10 +58,10 @@ FLUSH LOGS; # error to slave. call mtr.add_suppression('Got fatal error 1236 from master when reading data from binary log: .*could not find next log'); connection slave; -source include/wait_for_slave_io_to_stop.inc; -let $last_error= query_get_value(SHOW SLAVE STATUS, Last_IO_Error, 1); -echo Last_IO_Error; -echo $last_error; +# 1236 = ER_MASTER_FATAL_ERROR_READING_BINLOG +--let $slave_io_errno= 1236 +--let $show_slave_io_error= 1 +--source include/wait_for_slave_io_error.inc connection master; @@ -103,4 +103,4 @@ SHOW TABLES; connection master; DROP TABLE t1, t2, t3, t4; -source include/master-slave-end.inc; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_many_optimize.test b/mysql-test/suite/rpl/t/rpl_many_optimize.test index 91fab0b27a8..d5e9f69b4bc 100644 --- a/mysql-test/suite/rpl/t/rpl_many_optimize.test +++ b/mysql-test/suite/rpl/t/rpl_many_optimize.test @@ -20,3 +20,4 @@ drop table t1; sync_slave_with_master; # End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_master_pos_wait.test b/mysql-test/suite/rpl/t/rpl_master_pos_wait.test index ea107a28954..25e27f62d0a 100644 --- a/mysql-test/suite/rpl/t/rpl_master_pos_wait.test +++ b/mysql-test/suite/rpl/t/rpl_master_pos_wait.test @@ -25,3 +25,5 @@ echo "*** must be NULL ***"; select master_pos_wait('foo', 98); # End of 4.1 tests +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_misc_functions.test b/mysql-test/suite/rpl/t/rpl_misc_functions.test index d7ecde5f53c..7189e5c44ba 100644 --- a/mysql-test/suite/rpl/t/rpl_misc_functions.test +++ b/mysql-test/suite/rpl/t/rpl_misc_functions.test @@ -124,3 +124,4 @@ DROP FUNCTION test_replication_sf; --sync_slave_with_master +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_mix_found_rows.test b/mysql-test/suite/rpl/t/rpl_mix_found_rows.test index 9b8346ef21b..ed932eb5cea 100644 --- a/mysql-test/suite/rpl/t/rpl_mix_found_rows.test +++ b/mysql-test/suite/rpl/t/rpl_mix_found_rows.test @@ -156,3 +156,4 @@ DROP PROCEDURE log_me_inner; DROP FUNCTION log_rows; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_mix_insert_delayed.test b/mysql-test/suite/rpl/t/rpl_mix_insert_delayed.test index 2c44829a649..a310fa254f7 100644 --- a/mysql-test/suite/rpl/t/rpl_mix_insert_delayed.test +++ b/mysql-test/suite/rpl/t/rpl_mix_insert_delayed.test @@ -3,3 +3,4 @@ --source include/not_embedded.inc --source include/not_windows.inc --source extra/rpl_tests/rpl_insert_delayed.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_mixed_binlog_max_cache_size.test b/mysql-test/suite/rpl/t/rpl_mixed_binlog_max_cache_size.test index 1d407f87dfa..3850a84cbf1 100644 --- a/mysql-test/suite/rpl/t/rpl_mixed_binlog_max_cache_size.test +++ b/mysql-test/suite/rpl/t/rpl_mixed_binlog_max_cache_size.test @@ -5,3 +5,4 @@ --source include/have_binlog_format_mixed.inc --source extra/rpl_tests/rpl_binlog_max_cache_size.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_mixed_bit_pk.test b/mysql-test/suite/rpl/t/rpl_mixed_bit_pk.test index c9b65d170ad..226a82dee97 100644 --- a/mysql-test/suite/rpl/t/rpl_mixed_bit_pk.test +++ b/mysql-test/suite/rpl/t/rpl_mixed_bit_pk.test @@ -80,3 +80,4 @@ sync_slave_with_master; connection master; DROP TABLE t1, t2, t3, t4, t5, t6, t7, t8; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_mixed_ddl_dml.test b/mysql-test/suite/rpl/t/rpl_mixed_ddl_dml.test index 85335d47c3a..cbd7e9c2558 100644 --- a/mysql-test/suite/rpl/t/rpl_mixed_ddl_dml.test +++ b/mysql-test/suite/rpl/t/rpl_mixed_ddl_dml.test @@ -46,3 +46,4 @@ drop table t2,t3,t5; sync_slave_with_master; # End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_mixed_drop_create_temp_table.test b/mysql-test/suite/rpl/t/rpl_mixed_drop_create_temp_table.test index 8c635202ad5..f37ce90e524 100644 --- a/mysql-test/suite/rpl/t/rpl_mixed_drop_create_temp_table.test +++ b/mysql-test/suite/rpl/t/rpl_mixed_drop_create_temp_table.test @@ -8,3 +8,4 @@ --source include/have_innodb.inc --source extra/rpl_tests/rpl_drop_create_temp_table.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_mixed_implicit_commit_binlog.test b/mysql-test/suite/rpl/t/rpl_mixed_implicit_commit_binlog.test index 6e1d3286f07..928d4a42751 100644 --- a/mysql-test/suite/rpl/t/rpl_mixed_implicit_commit_binlog.test +++ b/mysql-test/suite/rpl/t/rpl_mixed_implicit_commit_binlog.test @@ -7,3 +7,4 @@ --let $engine=Innodb --source extra/rpl_tests/rpl_implicit_commit_binlog.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_mixed_mixing_engines.test b/mysql-test/suite/rpl/t/rpl_mixed_mixing_engines.test index 8bb5b61210b..0893f7d0158 100644 --- a/mysql-test/suite/rpl/t/rpl_mixed_mixing_engines.test +++ b/mysql-test/suite/rpl/t/rpl_mixed_mixing_engines.test @@ -8,3 +8,4 @@ let $engine_type=Innodb; --source extra/rpl_tests/rpl_mixing_engines.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_multi_delete.test b/mysql-test/suite/rpl/t/rpl_multi_delete.test index 568a8a578a9..80acf9c80e4 100644 --- a/mysql-test/suite/rpl/t/rpl_multi_delete.test +++ b/mysql-test/suite/rpl/t/rpl_multi_delete.test @@ -22,3 +22,4 @@ drop table t1,t2; sync_slave_with_master; # End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_multi_delete2.test b/mysql-test/suite/rpl/t/rpl_multi_delete2.test index c3f939276e0..7dc7ca41405 100644 --- a/mysql-test/suite/rpl/t/rpl_multi_delete2.test +++ b/mysql-test/suite/rpl/t/rpl_multi_delete2.test @@ -64,3 +64,4 @@ drop database mysqltest_to; # End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_multi_engine.test b/mysql-test/suite/rpl/t/rpl_multi_engine.test index 31c4a2050d7..b1dbf99f114 100644 --- a/mysql-test/suite/rpl/t/rpl_multi_engine.test +++ b/mysql-test/suite/rpl/t/rpl_multi_engine.test @@ -102,3 +102,4 @@ DROP TABLE t1; sync_slave_with_master; # End of 5.1 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_multi_update.test b/mysql-test/suite/rpl/t/rpl_multi_update.test index a6111455d16..710337816da 100644 --- a/mysql-test/suite/rpl/t/rpl_multi_update.test +++ b/mysql-test/suite/rpl/t/rpl_multi_update.test @@ -1,7 +1,3 @@ -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -# Added to skip if ndb is default # -######################################################## -- source include/not_ndb_default.inc let $engine_type=MyISAM; -- source extra/rpl_tests/rpl_multi_update.test diff --git a/mysql-test/suite/rpl/t/rpl_multi_update2.test b/mysql-test/suite/rpl/t/rpl_multi_update2.test index 812a486ad69..497568f2738 100644 --- a/mysql-test/suite/rpl/t/rpl_multi_update2.test +++ b/mysql-test/suite/rpl/t/rpl_multi_update2.test @@ -8,3 +8,4 @@ --source include/master-slave.inc let $engine_type=MyISAM; --source extra/rpl_tests/rpl_multi_update2.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_multi_update3.test b/mysql-test/suite/rpl/t/rpl_multi_update3.test index 5da91c26b04..f6e70f14b30 100644 --- a/mysql-test/suite/rpl/t/rpl_multi_update3.test +++ b/mysql-test/suite/rpl/t/rpl_multi_update3.test @@ -8,3 +8,4 @@ --source include/master-slave.inc let $engine_type=MyISAM; -- source extra/rpl_tests/rpl_multi_update3.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_multi_update4.test b/mysql-test/suite/rpl/t/rpl_multi_update4.test index 4991a385f6f..8f069b9c18f 100644 --- a/mysql-test/suite/rpl/t/rpl_multi_update4.test +++ b/mysql-test/suite/rpl/t/rpl_multi_update4.test @@ -43,3 +43,4 @@ drop database d2; sync_slave_with_master; # End of test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_mysql_upgrade.test b/mysql-test/suite/rpl/t/rpl_mysql_upgrade.test index 3790bed029d..fedad86ea91 100644 --- a/mysql-test/suite/rpl/t/rpl_mysql_upgrade.test +++ b/mysql-test/suite/rpl/t/rpl_mysql_upgrade.test @@ -56,3 +56,5 @@ if ($before_position != $after_position) DROP DATABASE `mysqltest-1`; connection slave; DROP DATABASE `#mysql50#mysqltest-1`; +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_name_const.test b/mysql-test/suite/rpl/t/rpl_name_const.test index adb71d452ef..4cacafa0523 100644 --- a/mysql-test/suite/rpl/t/rpl_name_const.test +++ b/mysql-test/suite/rpl/t/rpl_name_const.test @@ -45,3 +45,4 @@ select * from t1 order by id; connection master; drop table t1; drop procedure test_procedure; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_non_direct_mixed_mixing_engines.test b/mysql-test/suite/rpl/t/rpl_non_direct_mixed_mixing_engines.test index 2f2db01f422..94dbc56d73b 100644 --- a/mysql-test/suite/rpl/t/rpl_non_direct_mixed_mixing_engines.test +++ b/mysql-test/suite/rpl/t/rpl_non_direct_mixed_mixing_engines.test @@ -11,3 +11,4 @@ SET SESSION binlog_direct_non_transactional_updates = OFF; --enable_query_log let $engine_type=Innodb; --source extra/rpl_tests/rpl_mixing_engines.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_non_direct_row_mixing_engines.test b/mysql-test/suite/rpl/t/rpl_non_direct_row_mixing_engines.test index 614519331e0..53d8fec9434 100644 --- a/mysql-test/suite/rpl/t/rpl_non_direct_row_mixing_engines.test +++ b/mysql-test/suite/rpl/t/rpl_non_direct_row_mixing_engines.test @@ -13,3 +13,4 @@ let $engine_type=Innodb; --source extra/rpl_tests/rpl_mixing_engines.test --diff_files suite/rpl/r/rpl_non_direct_row_mixing_engines.result suite/rpl/r/rpl_row_mixing_engines.result +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_non_direct_stm_mixing_engines.test b/mysql-test/suite/rpl/t/rpl_non_direct_stm_mixing_engines.test index 448719eb4f8..13d4c998fb4 100644 --- a/mysql-test/suite/rpl/t/rpl_non_direct_stm_mixing_engines.test +++ b/mysql-test/suite/rpl/t/rpl_non_direct_stm_mixing_engines.test @@ -11,3 +11,4 @@ SET SESSION binlog_direct_non_transactional_updates = OFF; --enable_query_log let $engine_type=Innodb; --source extra/rpl_tests/rpl_mixing_engines.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_nondeterministic_functions.test b/mysql-test/suite/rpl/t/rpl_nondeterministic_functions.test index f8e697d58ce..a174445f667 100644 --- a/mysql-test/suite/rpl/t/rpl_nondeterministic_functions.test +++ b/mysql-test/suite/rpl/t/rpl_nondeterministic_functions.test @@ -50,8 +50,9 @@ INSERT INTO t1 VALUES (RAND()); INSERT INTO t1 VALUES (LAST_INSERT_ID()); --sync_slave_with_master ---let $diff_table_1= master:test.t1 ---let $diff_table_2= slave:test.t1 +--let $diff_tables= master:t1, slave:t1 --source include/diff_tables.inc +--connection master DROP TABLE t1; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_not_null_innodb.test b/mysql-test/suite/rpl/t/rpl_not_null_innodb.test index dca0ea6589c..1e67ba4eda1 100644 --- a/mysql-test/suite/rpl/t/rpl_not_null_innodb.test +++ b/mysql-test/suite/rpl/t/rpl_not_null_innodb.test @@ -17,3 +17,4 @@ let $engine=Innodb; --source extra/rpl_tests/rpl_not_null.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_not_null_myisam.test b/mysql-test/suite/rpl/t/rpl_not_null_myisam.test index 0c036f5bfd7..dcfaf006dad 100644 --- a/mysql-test/suite/rpl/t/rpl_not_null_myisam.test +++ b/mysql-test/suite/rpl/t/rpl_not_null_myisam.test @@ -16,3 +16,4 @@ let $engine=MyISAM; --source extra/rpl_tests/rpl_not_null.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_optimize.test b/mysql-test/suite/rpl/t/rpl_optimize.test index bb7a5ea553f..ad49df55db7 100644 --- a/mysql-test/suite/rpl/t/rpl_optimize.test +++ b/mysql-test/suite/rpl/t/rpl_optimize.test @@ -57,3 +57,4 @@ sync_slave_with_master; # starts, this test wil demonstrate nothing but will pass. # End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_packet.test b/mysql-test/suite/rpl/t/rpl_packet.test index 38b868cb59d..69d59e02e2d 100644 --- a/mysql-test/suite/rpl/t/rpl_packet.test +++ b/mysql-test/suite/rpl/t/rpl_packet.test @@ -84,17 +84,21 @@ connection master; INSERT INTO `t1`(`f1`) VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa2048'); -# The slave I/O thread must stop after trying to read the above event -connection slave; ---source include/wait_for_slave_io_to_stop.inc -let $slave_io_running= query_get_value(SHOW SLAVE STATUS, Slave_IO_Running, 1); ---echo Slave_IO_Running = $slave_io_running (expect No) + # # Bug#42914: The slave I/O thread must stop after trying to read the above # event, However there is no Last_IO_Error report. # -let $last_io_error= query_get_value(SHOW SLAVE STATUS, Last_IO_Error, 1); -eval SELECT "$last_io_error" AS Last_IO_Error; + +# The slave I/O thread must stop after trying to read the above event +connection slave; +# 1153 = ER_NET_PACKET_TOO_LARGE +--let $slave_io_errno= 1153 +--let $show_slave_io_error= 1 +--source include/wait_for_slave_io_error.inc + +# TODO: this is needed because of BUG#55790. Remove once that is fixed. +--source include/stop_slave_sql.inc # # Bug#42914: On the master, if a binary log event is larger than @@ -102,7 +106,14 @@ eval SELECT "$last_io_error" AS Last_IO_Error; # is sent to a slave when it requests a dump from the master, thus leading the # I/O thread to stop. However, there is no Last_IO_Error reported. # -source include/master-slave-reset.inc; + +--let $rpl_only_running_threads= 1 +--source include/rpl_reset.inc +--connection master +DROP TABLE t1; +--sync_slave_with_master + + connection master; CREATE TABLE t1 (f1 int PRIMARY KEY, f2 LONGTEXT, f3 LONGTEXT) ENGINE=MyISAM; sync_slave_with_master; @@ -112,12 +123,10 @@ INSERT INTO t1(f1, f2, f3) VALUES(1, REPEAT('a', @@global.max_allowed_packet), R connection slave; # The slave I/O thread must stop after receiving -# ER_MASTER_FATAL_ERROR_READING_BINLOG error message from master. ---source include/wait_for_slave_io_to_stop.inc -let $slave_io_running= query_get_value(SHOW SLAVE STATUS, Slave_IO_Running, 1); ---echo Slave_IO_Running = $slave_io_running (expect No) -let $last_io_error= query_get_value(SHOW SLAVE STATUS, Last_IO_Error, 1); -eval SELECT "$last_io_error" AS Last_IO_Error; +# 1236=ER_MASTER_FATAL_ERROR_READING_BINLOG error message from master. +--let $slave_io_errno= 1236 +--let $show_slave_io_error= 1 +--source include/wait_for_slave_io_error.inc # Remove the bad binlog and clear error status on slave. STOP SLAVE; @@ -160,4 +169,8 @@ eval SET @@global.net_buffer_length= $old_net_buffer_length; connection slave; DROP TABLE t1; +# Clear Last_IO_Error +RESET SLAVE; + +--source include/rpl_end.inc # End of tests diff --git a/mysql-test/suite/rpl/t/rpl_plugin_load.test b/mysql-test/suite/rpl/t/rpl_plugin_load.test index 100683922ad..5f9725a8e66 100644 --- a/mysql-test/suite/rpl/t/rpl_plugin_load.test +++ b/mysql-test/suite/rpl/t/rpl_plugin_load.test @@ -56,5 +56,5 @@ SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE ENGINE='EXAMPLE'; sync_slave_with_master; # # Cleanup ---source include/master-slave-end.inc +--source include/rpl_end.inc --echo End of test diff --git a/mysql-test/suite/rpl/t/rpl_ps.test b/mysql-test/suite/rpl/t/rpl_ps.test index 143f75e5477..b3d07dd1400 100644 --- a/mysql-test/suite/rpl/t/rpl_ps.test +++ b/mysql-test/suite/rpl/t/rpl_ps.test @@ -66,73 +66,36 @@ source include/wait_for_slave_to_stop.inc; ############################################################################### ---echo --echo # Connection: slave ---echo --connection slave ---echo START SLAVE; ---echo --echo # Connection: master ---echo --connection master ---echo CREATE DATABASE mysqltest1; CREATE TABLE t1(db_name CHAR(32), db_col_name CHAR(32)); ---echo PREPARE stmt_d_1 FROM 'INSERT INTO t1 VALUES(DATABASE(), @@collation_database)'; ---echo EXECUTE stmt_d_1; ---echo use mysqltest1; ---echo EXECUTE stmt_d_1; ---echo +--echo # Connection: slave --sync_slave_with_master - ---echo ---echo # Connection: slave ---echo - ---echo SELECT * FROM t1; ---echo --echo # Connection: master ---echo --connection master ---echo DROP DATABASE mysqltest1; ---echo use test; DROP TABLE t1; ---echo ---sync_slave_with_master - ---echo ---echo # Connection: slave ---echo - ---echo -STOP SLAVE; - ---echo ---echo ######################################################################## - -############################################################################### - -reset master; -reset slave; -disconnect master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_rbr_to_sbr.test b/mysql-test/suite/rpl/t/rpl_rbr_to_sbr.test index 4dca3e0880c..30cc564917a 100644 --- a/mysql-test/suite/rpl/t/rpl_rbr_to_sbr.test +++ b/mysql-test/suite/rpl/t/rpl_rbr_to_sbr.test @@ -31,3 +31,4 @@ diff_files $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_master.sql $MYSQLTEST_VARDIR/tmp --remove_file $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_master.sql --remove_file $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_slave.sql +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_read_only.test b/mysql-test/suite/rpl/t/rpl_read_only.test index 040ae71586b..19514dc7ed7 100644 --- a/mysql-test/suite/rpl/t/rpl_read_only.test +++ b/mysql-test/suite/rpl/t/rpl_read_only.test @@ -117,3 +117,4 @@ sync_slave_with_master; set global read_only=0; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_relay_space_innodb.test b/mysql-test/suite/rpl/t/rpl_relay_space_innodb.test index 156d53ef856..ca16a583fe5 100644 --- a/mysql-test/suite/rpl/t/rpl_relay_space_innodb.test +++ b/mysql-test/suite/rpl/t/rpl_relay_space_innodb.test @@ -1,22 +1,4 @@ -################################### -# Wrapper rpl_sv_relay_space.test # -# This test has to be wrapped as # -# It tests ndb, innodb and MyISAM.# -# By Wrapping we are saving some # -# space and making the test more # -# Maintainable by only having one # -# test file and reusing the code # -# In Addition, INNODB has to have # -# Option files during this test # -# to force innodb on the slave # -# else the test will fail # -################################### -#Change Author: JBM # -#Change Date: 2006-02-03 # -#Change: Added Comments # -################################### -- source include/not_ndb_default.inc -- source include/have_innodb.inc let $engine_type=InnoDB; -- source extra/rpl_tests/rpl_sv_relay_space.test - diff --git a/mysql-test/suite/rpl/t/rpl_relay_space_myisam.test b/mysql-test/suite/rpl/t/rpl_relay_space_myisam.test index 1d8563e7fd9..13719cbdc33 100644 --- a/mysql-test/suite/rpl/t/rpl_relay_space_myisam.test +++ b/mysql-test/suite/rpl/t/rpl_relay_space_myisam.test @@ -1,21 +1,3 @@ -################################### -# Wrapper rpl_sv_relay_space.test # -# This test has to be wrapped as # -# It tests ndb, innodb and MyISAM.# -# By Wrapping we are saving some # -# space and making the test more # -# Maintainable by only having one # -# test file and reusing the code # -# In Addition, INNODB has to have # -# Option files during this test # -# to force innodb on the slave # -# else the test will fail # -################################### -#Change Author: JBM # -#Change Date: 2006-02-03 # -#Change: Added Comments # -################################### -- source include/not_ndb_default.inc let $engine_type=MyISAM; -- source extra/rpl_tests/rpl_sv_relay_space.test - diff --git a/mysql-test/suite/rpl/t/rpl_relayrotate.test b/mysql-test/suite/rpl/t/rpl_relayrotate.test index ec3e6be4bea..c1db2f334fa 100644 --- a/mysql-test/suite/rpl/t/rpl_relayrotate.test +++ b/mysql-test/suite/rpl/t/rpl_relayrotate.test @@ -9,3 +9,4 @@ -- source include/master-slave.inc let $engine_type=innodb; -- source extra/rpl_tests/rpl_relayrotate.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_relayspace.test b/mysql-test/suite/rpl/t/rpl_relayspace.test index 45b46674c05..2ad6936dd50 100644 --- a/mysql-test/suite/rpl/t/rpl_relayspace.test +++ b/mysql-test/suite/rpl/t/rpl_relayspace.test @@ -36,3 +36,4 @@ start slave; select master_pos_wait('master-bin.001',200,6)=-1; # End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_replicate_do.test b/mysql-test/suite/rpl/t/rpl_replicate_do.test index dd3ecc075cc..e9a7eef9676 100644 --- a/mysql-test/suite/rpl/t/rpl_replicate_do.test +++ b/mysql-test/suite/rpl/t/rpl_replicate_do.test @@ -84,3 +84,4 @@ connection master; drop table t1; drop table t2; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_replicate_ignore_db.test b/mysql-test/suite/rpl/t/rpl_replicate_ignore_db.test index bcfef919fad..f1907456ed5 100644 --- a/mysql-test/suite/rpl/t/rpl_replicate_ignore_db.test +++ b/mysql-test/suite/rpl/t/rpl_replicate_ignore_db.test @@ -28,3 +28,4 @@ connection master; drop database mysqltest1; drop database mysqltest2; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_report.test b/mysql-test/suite/rpl/t/rpl_report.test index 8798905d372..a73442917fa 100644 --- a/mysql-test/suite/rpl/t/rpl_report.test +++ b/mysql-test/suite/rpl/t/rpl_report.test @@ -19,3 +19,4 @@ set @@global.report_host='my.new.address.net'; --echo end of tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_rewrt_db.test b/mysql-test/suite/rpl/t/rpl_rewrt_db.test index 585b08be0b3..996ad0a10c7 100644 --- a/mysql-test/suite/rpl/t/rpl_rewrt_db.test +++ b/mysql-test/suite/rpl/t/rpl_rewrt_db.test @@ -237,3 +237,4 @@ connection master; sync_slave_with_master; # end of 5.0 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_rotate_logs-slave.opt b/mysql-test/suite/rpl/t/rpl_rotate_logs-slave.opt deleted file mode 100644 index 80190bf6d29..00000000000 --- a/mysql-test/suite/rpl/t/rpl_rotate_logs-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---server-id=2 diff --git a/mysql-test/suite/rpl/t/rpl_rotate_logs-slave.sh b/mysql-test/suite/rpl/t/rpl_rotate_logs-slave.sh deleted file mode 100644 index 81490a54b4b..00000000000 --- a/mysql-test/suite/rpl/t/rpl_rotate_logs-slave.sh +++ /dev/null @@ -1,2 +0,0 @@ -rm -f $MYSQLTEST_VARDIR/slave-data/master.info -rm -f $MYSQLTEST_VARDIR/slave-data/*relay* diff --git a/mysql-test/suite/rpl/t/rpl_rotate_logs.test b/mysql-test/suite/rpl/t/rpl_rotate_logs.test index e1d0966abfa..42fe8dcae17 100644 --- a/mysql-test/suite/rpl/t/rpl_rotate_logs.test +++ b/mysql-test/suite/rpl/t/rpl_rotate_logs.test @@ -18,19 +18,14 @@ -- source include/have_binlog_format_mixed_or_statement.inc connect (master,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK); ---disable_warnings -drop table if exists t1, t2, t3, t4; ---enable_warnings connect (slave,localhost,root,,test,$SLAVE_MYPORT,$SLAVE_MYSOCK); + # Create empty file let $MYSQLD_SLAVE_DATADIR= `select @@datadir`; write_file $MYSQLD_SLAVE_DATADIR/master.info; EOF chmod 0000 $MYSQLD_SLAVE_DATADIR/master.info; connection slave; ---disable_warnings -drop table if exists t1, t2, t3, t4; ---enable_warnings # START SLAVE will fail because it can't read the file (mode 000) # (system error 13) @@ -98,12 +93,9 @@ connection master; set insert_id=1234; insert into t2 values(NULL); connection slave; ---source include/wait_for_slave_sql_to_stop.inc - -#restart slave skipping one event -set global sql_slave_skip_counter=1; -start slave; ---source include/wait_for_slave_to_start.inc +# 1062 = ER_DUP_ENTRY +--let $slave_sql_errno= 1062 +--source include/wait_for_slave_sql_error_and_skip.inc connection master; @@ -194,3 +186,4 @@ show binlog events in ''; purge master logs before now(); --echo End of 5.0 tests +--source include/stop_slave.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_001.test b/mysql-test/suite/rpl/t/rpl_row_001.test index 99eaebcdcaf..2dfc5e63d42 100644 --- a/mysql-test/suite/rpl/t/rpl_row_001.test +++ b/mysql-test/suite/rpl/t/rpl_row_001.test @@ -7,3 +7,4 @@ -- source include/master-slave.inc let $engine_type=MYISAM; -- source extra/rpl_tests/rpl_row_001.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_4_bytes.test b/mysql-test/suite/rpl/t/rpl_row_4_bytes.test index 73ef6dd2345..6130f74983e 100644 --- a/mysql-test/suite/rpl/t/rpl_row_4_bytes.test +++ b/mysql-test/suite/rpl/t/rpl_row_4_bytes.test @@ -31,3 +31,4 @@ select * from t2 order by a; connection master; DROP DATABASE mysqltest1; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_NOW.test b/mysql-test/suite/rpl/t/rpl_row_NOW.test index c28b714277e..d732c6e6733 100644 --- a/mysql-test/suite/rpl/t/rpl_row_NOW.test +++ b/mysql-test/suite/rpl/t/rpl_row_NOW.test @@ -72,3 +72,4 @@ diff_files $MYSQLTEST_VARDIR/tmp/NOW_master.sql $MYSQLTEST_VARDIR/tmp/NOW_slave. sync_slave_with_master; # End of 5.1 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_USER.test b/mysql-test/suite/rpl/t/rpl_row_USER.test index 7b13ebc50ee..010e0e6ea05 100644 --- a/mysql-test/suite/rpl/t/rpl_row_USER.test +++ b/mysql-test/suite/rpl/t/rpl_row_USER.test @@ -58,3 +58,4 @@ DROP USER ''@'localhost%'; sync_slave_with_master; # End of 5.0 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_UUID.test b/mysql-test/suite/rpl/t/rpl_row_UUID.test index b0ef96463d0..ce3a4ed40a9 100644 --- a/mysql-test/suite/rpl/t/rpl_row_UUID.test +++ b/mysql-test/suite/rpl/t/rpl_row_UUID.test @@ -7,3 +7,4 @@ -- source include/master-slave.inc let $engine_type=myisam; --source extra/rpl_tests/rpl_row_UUID.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test b/mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test index 4522c73b77c..8264e8de0e7 100644 --- a/mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test +++ b/mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test @@ -35,13 +35,15 @@ USE test_ignore; connection master; DROP DATABASE test_ignore; +USE test; +DROP TABLE t1; sync_slave_with_master; +USE test; + # Bug#19995: Extreneous table maps generated for statements that does # not generate rows ---disable_query_log ---source include/master-slave-reset.inc ---enable_query_log +--source include/rpl_reset.inc connection master; CREATE TABLE t1 (a INT); @@ -56,9 +58,7 @@ DROP TABLE t1; # BUG#17620: Replicate (Row Based) Fails when Query Cache enabled on # slave --echo ================ Test for BUG#17620 ================ ---disable_query_log ---source include/master-slave-reset.inc ---enable_query_log +--source include/rpl_reset.inc --echo **** On Slave **** connection slave; @@ -90,12 +90,13 @@ sync_slave_with_master; SELECT * FROM t1; SET GLOBAL QUERY_CACHE_SIZE=0; +--connection master +DROP TABLE t1; + # Bug#22550: Replication of BIT columns failing --echo ================ Test for BUG#22550 ================ ---disable_query_log ---source include/master-slave-reset.inc ---enable_query_log +--source include/rpl_reset.inc connection master; CREATE TABLE t1 (a BIT(1), b INT) ENGINE=MYISAM; @@ -121,9 +122,7 @@ sync_slave_with_master; # field does not work --echo ================ Test for BUG#22583 ================ ---disable_query_log ---source include/master-slave-reset.inc ---enable_query_log +--source include/rpl_reset.inc # disabling warnings temporarily for ENGINE=INNODB to work without InnoDB --disable_warnings @@ -228,13 +227,10 @@ sync_slave_with_master; # row-based replication # -disable_query_log; -source include/master-slave-reset.inc; -enable_query_log; +--source include/rpl_reset.inc --echo **** On Master **** connection master; -SET SESSION BINLOG_FORMAT=ROW; CREATE TABLE t1 (a INT PRIMARY KEY, b SET('master','slave')); INSERT INTO t1 VALUES (1,'master,slave'), (2,'master,slave'); --echo **** On Slave **** @@ -242,7 +238,7 @@ sync_slave_with_master; UPDATE t1 SET a = 5, b = 'slave' WHERE a = 1; SELECT * FROM t1 ORDER BY a; # since bug#31552/31609 idempotency is not default any longer. In -# order the preceeding test UPDATE t1 to pass the mode is switched +# order for the preceeding test UPDATE t1 to pass, the mode is switched # temprorarily set @@global.slave_exec_mode= 'IDEMPOTENT'; --echo **** On Master **** @@ -256,9 +252,10 @@ let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Error, 1); disable_query_log; eval SELECT "$last_error" AS Last_SQL_Error; enable_query_log; + SELECT * FROM t1 ORDER BY a; -DROP TABLE t1; --echo **** On Master **** connection master; DROP TABLE t1; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_basic_2myisam.test b/mysql-test/suite/rpl/t/rpl_row_basic_2myisam.test index c5648fa1d77..f1f5c584543 100644 --- a/mysql-test/suite/rpl/t/rpl_row_basic_2myisam.test +++ b/mysql-test/suite/rpl/t/rpl_row_basic_2myisam.test @@ -4,3 +4,4 @@ let $type= 'MYISAM' ; let $extra_index= ; -- source extra/rpl_tests/rpl_row_basic.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_basic_3innodb.test b/mysql-test/suite/rpl/t/rpl_row_basic_3innodb.test index 41cf1cc622a..55ea2f3c3c8 100644 --- a/mysql-test/suite/rpl/t/rpl_row_basic_3innodb.test +++ b/mysql-test/suite/rpl/t/rpl_row_basic_3innodb.test @@ -8,3 +8,4 @@ let $type= 'INNODB' ; let $extra_index= ; -- source extra/rpl_tests/rpl_row_basic.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_basic_8partition.test b/mysql-test/suite/rpl/t/rpl_row_basic_8partition.test index 687b3bc785d..3ec79ec8cd5 100644 --- a/mysql-test/suite/rpl/t/rpl_row_basic_8partition.test +++ b/mysql-test/suite/rpl/t/rpl_row_basic_8partition.test @@ -208,3 +208,4 @@ SHOW CREATE TABLE t1; DROP TABLE IF EXISTS t1; # End of 5.1 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_binlog_max_cache_size.test b/mysql-test/suite/rpl/t/rpl_row_binlog_max_cache_size.test index 5133c8b1b5e..9c8489658f8 100644 --- a/mysql-test/suite/rpl/t/rpl_row_binlog_max_cache_size.test +++ b/mysql-test/suite/rpl/t/rpl_row_binlog_max_cache_size.test @@ -5,3 +5,4 @@ --source include/have_binlog_format_row.inc --source extra/rpl_tests/rpl_binlog_max_cache_size.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_blob_innodb.test b/mysql-test/suite/rpl/t/rpl_row_blob_innodb.test index 6aa6c2a31b9..eaf86688a29 100644 --- a/mysql-test/suite/rpl/t/rpl_row_blob_innodb.test +++ b/mysql-test/suite/rpl/t/rpl_row_blob_innodb.test @@ -12,3 +12,4 @@ let $engine_type=InnoDB; -- source extra/rpl_tests/rpl_row_blob.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_blob_myisam.test b/mysql-test/suite/rpl/t/rpl_row_blob_myisam.test index 11f5336502a..482ccb7ecc0 100644 --- a/mysql-test/suite/rpl/t/rpl_row_blob_myisam.test +++ b/mysql-test/suite/rpl/t/rpl_row_blob_myisam.test @@ -11,3 +11,4 @@ let $engine_type=myisam; -- source extra/rpl_tests/rpl_row_blob.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_colSize.test b/mysql-test/suite/rpl/t/rpl_row_colSize.test index 078e6886ec7..04434517518 100644 --- a/mysql-test/suite/rpl/t/rpl_row_colSize.test +++ b/mysql-test/suite/rpl/t/rpl_row_colSize.test @@ -166,3 +166,4 @@ DROP TABLE IF EXISTS t1; sync_slave_with_master; # END 5.1 Test Case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_conflicts.test b/mysql-test/suite/rpl/t/rpl_row_conflicts.test index 59757e2e802..ce5332966ef 100644 --- a/mysql-test/suite/rpl/t/rpl_row_conflicts.test +++ b/mysql-test/suite/rpl/t/rpl_row_conflicts.test @@ -20,6 +20,8 @@ SET @old_slave_exec_mode= @@global.slave_exec_mode; SET @@global.slave_exec_mode = 'STRICT'; source extra/rpl_tests/rpl_conflicts.test; +--source include/rpl_reset.inc + --echo ######## Run with slave_exec_mode=IDEMPOTENT ######## @@ -28,4 +30,4 @@ source extra/rpl_tests/rpl_conflicts.test; SET @@global.slave_exec_mode= @old_slave_exec_mode; -source include/master-slave-end.inc; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_create_table.test b/mysql-test/suite/rpl/t/rpl_row_create_table.test index 6b051fb46e5..ef3c0758643 100644 --- a/mysql-test/suite/rpl/t/rpl_row_create_table.test +++ b/mysql-test/suite/rpl/t/rpl_row_create_table.test @@ -12,12 +12,6 @@ connection master; # we disable the ps-protocol for this statement. --disable_ps_protocol ---disable_query_log ---disable_warnings -DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8,t9; ---enable_warnings ---enable_query_log - # Set the default storage engine to different values on master and # slave. We need to stop the slave for the server variable to take # effect, since the variable is only read on start-up. @@ -31,7 +25,7 @@ START SLAVE; --source include/wait_for_slave_to_start.inc --enable_query_log ---source include/reset_master_and_slave.inc +--source include/rpl_reset.inc connection master; CREATE TABLE t1 (a INT, b INT); @@ -67,7 +61,7 @@ SELECT * FROM t5 ORDER BY a,b,c; --query_vertical SHOW CREATE TABLE t6 SELECT * FROM t6 ORDER BY a,b,c; ---source include/reset_master_and_slave.inc +--source include/rpl_reset.inc connection master; # Test for erroneous constructions @@ -86,7 +80,7 @@ SELECT * FROM t7 ORDER BY a,b; sync_slave_with_master; SELECT * FROM t7 ORDER BY a,b; ---source include/reset_master_and_slave.inc +--source include/rpl_reset.inc connection master; CREATE TEMPORARY TABLE tt4 (a INT, b INT); @@ -99,7 +93,7 @@ SELECT * FROM t7 ORDER BY a,b; sync_slave_with_master; SELECT * FROM t7 ORDER BY a,b; ---source include/reset_master_and_slave.inc +--source include/rpl_reset.inc connection master; CREATE TABLE t8 LIKE t4; @@ -131,7 +125,7 @@ START SLAVE; # table' from log): --echo ================ BUG#22864 ================ ---source include/master-slave-reset.inc +--source include/rpl_reset.inc connection master; SET AUTOCOMMIT=0; @@ -168,17 +162,7 @@ SET AUTOCOMMIT=1; sync_slave_with_master; # Some tests with temporary tables -connection slave; -STOP SLAVE; ---source include/wait_for_slave_to_stop.inc -RESET SLAVE; - -connection master; -RESET MASTER; - -connection slave; -START SLAVE; ---source include/wait_for_slave_to_start.inc +--source include/rpl_reset.inc connection master; CREATE TABLE t1 (a INT); @@ -204,7 +188,7 @@ connection master; TRUNCATE TABLE t2; sync_slave_with_master; ---source include/reset_master_and_slave.inc +--source include/rpl_reset.inc connection master; BEGIN; @@ -253,7 +237,7 @@ sync_slave_with_master; # BUG#34707: Row based replication: slave creates table within wrong database # -source include/master-slave-reset.inc; +--source include/rpl_reset.inc connection master; --disable_warnings @@ -275,7 +259,7 @@ sync_slave_with_master; # with RBL # -source include/master-slave-reset.inc; +--source include/rpl_reset.inc connection master; CREATE TEMPORARY TABLE t7(c1 INT); @@ -305,5 +289,7 @@ DROP VIEW IF EXISTS bug48506_t1, bug48506_t2, bug48506_t3; DROP TEMPORARY TABLES t7; DROP TABLES t4, t5; DROP TABLES IF EXISTS bug48506_t4; -source include/master-slave-end.inc; + +--source include/rpl_end.inc + --echo end of the tests diff --git a/mysql-test/suite/rpl/t/rpl_row_delayed_ins.test b/mysql-test/suite/rpl/t/rpl_row_delayed_ins.test index a0e74567349..db41ff09117 100644 --- a/mysql-test/suite/rpl/t/rpl_row_delayed_ins.test +++ b/mysql-test/suite/rpl/t/rpl_row_delayed_ins.test @@ -1,7 +1,3 @@ -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -# Added to skip if ndb is default # -######################################################## -- source include/not_ndb_default.inc let $engine_type=myisam; -- source extra/rpl_tests/rpl_row_delayed_ins.test diff --git a/mysql-test/suite/rpl/t/rpl_row_drop.test b/mysql-test/suite/rpl/t/rpl_row_drop.test index d18ebc2846b..eca2ae0f643 100644 --- a/mysql-test/suite/rpl/t/rpl_row_drop.test +++ b/mysql-test/suite/rpl/t/rpl_row_drop.test @@ -43,3 +43,4 @@ DROP TABLE IF EXISTS t2; sync_slave_with_master; --enable_warnings --enable_query_log +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_drop_create_temp_table.test b/mysql-test/suite/rpl/t/rpl_row_drop_create_temp_table.test index fc46665ddb1..5896f6a48b0 100644 --- a/mysql-test/suite/rpl/t/rpl_row_drop_create_temp_table.test +++ b/mysql-test/suite/rpl/t/rpl_row_drop_create_temp_table.test @@ -8,3 +8,4 @@ --source include/have_innodb.inc --source extra/rpl_tests/rpl_drop_create_temp_table.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_find_row.test b/mysql-test/suite/rpl/t/rpl_row_find_row.test index 9163ab54406..7f633c5aa97 100644 --- a/mysql-test/suite/rpl/t/rpl_row_find_row.test +++ b/mysql-test/suite/rpl/t/rpl_row_find_row.test @@ -50,7 +50,7 @@ DROP TABLE t; # but it gets disabled sometime. # Replication does not break anymore. # --- source include/master-slave-reset.inc +--source include/rpl_reset.inc -- connection master CREATE TABLE t (a int, b int, c int, key(b)); @@ -84,8 +84,7 @@ DROP TABLE t; # As a consquence, the wrong row would be updated. # --- connection master --- source include/master-slave-reset.inc +-- source include/rpl_reset.inc -- connection master CREATE TABLE t1 (c1 INT NOT NULL, c2 INT NOT NULL, c3 INT, UNIQUE KEY(c1,c3), KEY(c2)); @@ -94,11 +93,11 @@ INSERT INTO t1(c1,c2) VALUES(1,2); UPDATE t1 SET c1=1000 WHERE c2=2; -- sync_slave_with_master --- let $diff_table_1=master:test.t1 --- let $diff_table_2=slave:test.t1 +-- let $diff_tables= master:t1, slave:t1 -- source include/diff_tables.inc -- connection master DROP TABLE t1; -- sync_slave_with_master +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_flsh_tbls.test b/mysql-test/suite/rpl/t/rpl_row_flsh_tbls.test index d2996bbe525..3d95d20410b 100644 --- a/mysql-test/suite/rpl/t/rpl_row_flsh_tbls.test +++ b/mysql-test/suite/rpl/t/rpl_row_flsh_tbls.test @@ -14,4 +14,3 @@ let $rename_event_pos= 898; --disable_ps_protocol -- source extra/rpl_tests/rpl_flsh_tbls.test --enable_ps_protocol - diff --git a/mysql-test/suite/rpl/t/rpl_row_func001.test b/mysql-test/suite/rpl/t/rpl_row_func001.test index 53fb55118e6..6ff97388b31 100644 --- a/mysql-test/suite/rpl/t/rpl_row_func001.test +++ b/mysql-test/suite/rpl/t/rpl_row_func001.test @@ -55,3 +55,4 @@ DROP TABLE test.t1; sync_slave_with_master; # End of 5.0 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_func002.test b/mysql-test/suite/rpl/t/rpl_row_func002.test index 44a704bfbc5..2f4e3fdd910 100644 --- a/mysql-test/suite/rpl/t/rpl_row_func002.test +++ b/mysql-test/suite/rpl/t/rpl_row_func002.test @@ -102,3 +102,4 @@ diff_files $MYSQLTEST_VARDIR/tmp/func002_master.sql $MYSQLTEST_VARDIR/tmp/func00 # End of 5.0 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_func003.test b/mysql-test/suite/rpl/t/rpl_row_func003.test index 30b24cf4174..a17d70e4b04 100644 --- a/mysql-test/suite/rpl/t/rpl_row_func003.test +++ b/mysql-test/suite/rpl/t/rpl_row_func003.test @@ -11,3 +11,4 @@ -- source include/master-slave.inc let $engine_type=INNODB; -- source extra/rpl_tests/rpl_row_func003.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_idempotency.test b/mysql-test/suite/rpl/t/rpl_row_idempotency.test index cd62280f1d4..3e846b30242 100644 --- a/mysql-test/suite/rpl/t/rpl_row_idempotency.test +++ b/mysql-test/suite/rpl/t/rpl_row_idempotency.test @@ -326,6 +326,5 @@ drop table t1,t2,ti2,ti1; sync_slave_with_master; set @@global.slave_exec_mode= @old_slave_exec_mode; ---source include/master-slave-end.inc - --echo *** end of tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_implicit_commit_binlog.test b/mysql-test/suite/rpl/t/rpl_row_implicit_commit_binlog.test index 5c3b163eea3..1035c7f86e4 100644 --- a/mysql-test/suite/rpl/t/rpl_row_implicit_commit_binlog.test +++ b/mysql-test/suite/rpl/t/rpl_row_implicit_commit_binlog.test @@ -7,3 +7,4 @@ --let $engine=Innodb --source extra/rpl_tests/rpl_implicit_commit_binlog.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_inexist_tbl.test b/mysql-test/suite/rpl/t/rpl_row_inexist_tbl.test index 0c038c41ebf..b695428dd38 100644 --- a/mysql-test/suite/rpl/t/rpl_row_inexist_tbl.test +++ b/mysql-test/suite/rpl/t/rpl_row_inexist_tbl.test @@ -29,14 +29,16 @@ INSERT INTO t1 VALUES (1); --echo [on slave] connection slave; # slave should have stopped because can't find table t1 ---source include/wait_for_slave_sql_to_stop.inc -# see if we have a good error message: -let $err= query_get_value(SHOW SLAVE STATUS, Last_SQL_Error, 1); ---echo Last_SQL_Error = $err +# 1146 = ER_NO_SUCH_TABLE +--let $slave_sql_errno= 1146 +--source include/wait_for_slave_sql_error.inc --echo ==== Clean up ==== -source include/stop_slave.inc; +source include/stop_slave_io.inc; +RESET SLAVE; --echo [on master] connection master; DROP TABLE t1; +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_insert_delayed.test b/mysql-test/suite/rpl/t/rpl_row_insert_delayed.test index 436c0a9f517..a6c38117767 100644 --- a/mysql-test/suite/rpl/t/rpl_row_insert_delayed.test +++ b/mysql-test/suite/rpl/t/rpl_row_insert_delayed.test @@ -3,3 +3,4 @@ --source include/not_embedded.inc --source include/not_windows.inc --source extra/rpl_tests/rpl_insert_delayed.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_log.test b/mysql-test/suite/rpl/t/rpl_row_log.test index 197f83c85af..b156a4c8dd4 100644 --- a/mysql-test/suite/rpl/t/rpl_row_log.test +++ b/mysql-test/suite/rpl/t/rpl_row_log.test @@ -15,3 +15,4 @@ let $engine_type=MyISAM; -- source extra/rpl_tests/rpl_log.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_log_innodb.test b/mysql-test/suite/rpl/t/rpl_row_log_innodb.test index 16e775287b3..631fb29c7bc 100644 --- a/mysql-test/suite/rpl/t/rpl_row_log_innodb.test +++ b/mysql-test/suite/rpl/t/rpl_row_log_innodb.test @@ -12,3 +12,4 @@ let $engine_type=InnoDB; -- source extra/rpl_tests/rpl_log.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_mixing_engines.test b/mysql-test/suite/rpl/t/rpl_row_mixing_engines.test index 8af1ae51bb9..f2e26f36fdc 100644 --- a/mysql-test/suite/rpl/t/rpl_row_mixing_engines.test +++ b/mysql-test/suite/rpl/t/rpl_row_mixing_engines.test @@ -9,3 +9,4 @@ let $engine_type=Innodb; --source extra/rpl_tests/rpl_mixing_engines.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test b/mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test index f0231fa3470..39d6596dda3 100644 --- a/mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test +++ b/mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test @@ -350,3 +350,4 @@ DROP TABLE IF EXISTS t1, t2, t3, t04, t05, t4, t5; sync_slave_with_master; # End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_rec_comp_innodb.test b/mysql-test/suite/rpl/t/rpl_row_rec_comp_innodb.test index 67e4c4fb14d..57d67c5c71b 100644 --- a/mysql-test/suite/rpl/t/rpl_row_rec_comp_innodb.test +++ b/mysql-test/suite/rpl/t/rpl_row_rec_comp_innodb.test @@ -8,3 +8,4 @@ -- let $engine= InnoDB -- source extra/rpl_tests/rpl_record_compare.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_rec_comp_myisam.test b/mysql-test/suite/rpl/t/rpl_row_rec_comp_myisam.test index 43fa99a51da..e40cd615ca6 100644 --- a/mysql-test/suite/rpl/t/rpl_row_rec_comp_myisam.test +++ b/mysql-test/suite/rpl/t/rpl_row_rec_comp_myisam.test @@ -12,7 +12,7 @@ -- echo ## 1 X bit + 2 Null bits + 5 bits => last_null_bit_pos==0 ## Added here because AFAIK it's only MyISAM and NDB that use Field_bits --- source include/master-slave-reset.inc +--source include/rpl_reset.inc -- connection master -- eval CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bit(5)) ENGINE=$engine DEFAULT CHARSET=latin1 @@ -22,10 +22,10 @@ INSERT INTO t1(c1,c2) VALUES (NULL, b'1'); UPDATE t1 SET c1= 0; -- sync_slave_with_master --- let $diff_table_1= master:test.t1 --- let $diff_table_2= slave:test.t1 +-- let $diff_tables= master:t1, slave:t1 -- source include/diff_tables.inc -- connection master DROP TABLE t1; -- sync_slave_with_master +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_show_relaylog_events.test b/mysql-test/suite/rpl/t/rpl_row_show_relaylog_events.test index 6a426efc7ea..a78f7ad4271 100644 --- a/mysql-test/suite/rpl/t/rpl_row_show_relaylog_events.test +++ b/mysql-test/suite/rpl/t/rpl_row_show_relaylog_events.test @@ -16,3 +16,4 @@ -- source include/have_binlog_format_row.inc -- source extra/rpl_tests/rpl_show_relaylog_events.inc +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_sp001.test b/mysql-test/suite/rpl/t/rpl_row_sp001.test index 34d42d985f9..99db5e7febe 100644 --- a/mysql-test/suite/rpl/t/rpl_row_sp001.test +++ b/mysql-test/suite/rpl/t/rpl_row_sp001.test @@ -142,3 +142,4 @@ diff_files $MYSQLTEST_VARDIR/tmp/sp001_master.sql $MYSQLTEST_VARDIR/tmp/sp001_sl --remove_file $MYSQLTEST_VARDIR/tmp/sp001_slave.sql # End of 5.0 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_sp002_innodb.test b/mysql-test/suite/rpl/t/rpl_row_sp002_innodb.test index e272e34e715..aec421407c9 100644 --- a/mysql-test/suite/rpl/t/rpl_row_sp002_innodb.test +++ b/mysql-test/suite/rpl/t/rpl_row_sp002_innodb.test @@ -1,10 +1,3 @@ -################################# -# Wrapper for rpl_row_sp002.test# -################################# -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -# Added to skip if ndb is default # -######################################################## -- source include/not_ndb_default.inc -- source include/have_innodb.inc let $engine_type=INNODB; diff --git a/mysql-test/suite/rpl/t/rpl_row_sp003.test b/mysql-test/suite/rpl/t/rpl_row_sp003.test index 391ecd59b22..d4f1ce3ac6b 100644 --- a/mysql-test/suite/rpl/t/rpl_row_sp003.test +++ b/mysql-test/suite/rpl/t/rpl_row_sp003.test @@ -11,3 +11,4 @@ -- source include/master-slave.inc let $engine_type=INNODB; -- source extra/rpl_tests/rpl_row_sp003.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_sp005.test b/mysql-test/suite/rpl/t/rpl_row_sp005.test index abc7fb4f490..bbe4ce47f9e 100644 --- a/mysql-test/suite/rpl/t/rpl_row_sp005.test +++ b/mysql-test/suite/rpl/t/rpl_row_sp005.test @@ -109,3 +109,4 @@ DROP TABLE IF EXISTS test.t3; sync_slave_with_master; # End of 5.0 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_sp006_InnoDB.test b/mysql-test/suite/rpl/t/rpl_row_sp006_InnoDB.test index e5be4e6dc28..df3952bead1 100644 --- a/mysql-test/suite/rpl/t/rpl_row_sp006_InnoDB.test +++ b/mysql-test/suite/rpl/t/rpl_row_sp006_InnoDB.test @@ -11,3 +11,4 @@ -- source include/master-slave.inc let $engine_type=InnoDB; -- source extra/rpl_tests/rpl_row_sp006.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_sp007_innodb.test b/mysql-test/suite/rpl/t/rpl_row_sp007_innodb.test index 41af5a5f997..fcac31df780 100644 --- a/mysql-test/suite/rpl/t/rpl_row_sp007_innodb.test +++ b/mysql-test/suite/rpl/t/rpl_row_sp007_innodb.test @@ -1,10 +1,3 @@ -################################# -# Wrapper for rpl_row_sp007.test# -################################# -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -# Added to skip if ndb is default # -######################################################## -- source include/not_ndb_default.inc -- source include/have_innodb.inc let $engine_type=INNODB; diff --git a/mysql-test/suite/rpl/t/rpl_row_sp008.test b/mysql-test/suite/rpl/t/rpl_row_sp008.test index 80603c28d27..8af3c88ae11 100644 --- a/mysql-test/suite/rpl/t/rpl_row_sp008.test +++ b/mysql-test/suite/rpl/t/rpl_row_sp008.test @@ -53,3 +53,4 @@ DROP TABLE IF EXISTS test.t2; sync_slave_with_master; # End of 5.0 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_sp009.test b/mysql-test/suite/rpl/t/rpl_row_sp009.test index 77860621961..6e7226593a1 100644 --- a/mysql-test/suite/rpl/t/rpl_row_sp009.test +++ b/mysql-test/suite/rpl/t/rpl_row_sp009.test @@ -97,3 +97,4 @@ DROP TABLE test.t2; sync_slave_with_master; # End of 5.0 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_sp010.test b/mysql-test/suite/rpl/t/rpl_row_sp010.test index 7fa0077f117..aad7edcd3ea 100644 --- a/mysql-test/suite/rpl/t/rpl_row_sp010.test +++ b/mysql-test/suite/rpl/t/rpl_row_sp010.test @@ -74,3 +74,4 @@ DROP TABLE IF EXISTS test.t2; sync_slave_with_master; # End of 5.0 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_sp011.test b/mysql-test/suite/rpl/t/rpl_row_sp011.test index 25c2fc9ad26..d2a323faad2 100644 --- a/mysql-test/suite/rpl/t/rpl_row_sp011.test +++ b/mysql-test/suite/rpl/t/rpl_row_sp011.test @@ -109,3 +109,4 @@ diff_files $MYSQLTEST_VARDIR/tmp/sp011_master.sql $MYSQLTEST_VARDIR/tmp/sp011_sl --remove_file $MYSQLTEST_VARDIR/tmp/sp011_slave.sql # End of 5.0 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_sp012.test b/mysql-test/suite/rpl/t/rpl_row_sp012.test index 3a8d295121c..23bc92b51cf 100644 --- a/mysql-test/suite/rpl/t/rpl_row_sp012.test +++ b/mysql-test/suite/rpl/t/rpl_row_sp012.test @@ -73,3 +73,4 @@ sync_slave_with_master; # End of 5.0 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_tabledefs_2myisam.test b/mysql-test/suite/rpl/t/rpl_row_tabledefs_2myisam.test index ab4914e15fa..030ec7d6541 100644 --- a/mysql-test/suite/rpl/t/rpl_row_tabledefs_2myisam.test +++ b/mysql-test/suite/rpl/t/rpl_row_tabledefs_2myisam.test @@ -6,3 +6,4 @@ let $engine_type = 'MyISAM'; -- source extra/rpl_tests/rpl_row_tabledefs.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_tabledefs_3innodb.test b/mysql-test/suite/rpl/t/rpl_row_tabledefs_3innodb.test index 7824fbfb663..35eddfc3ed4 100644 --- a/mysql-test/suite/rpl/t/rpl_row_tabledefs_3innodb.test +++ b/mysql-test/suite/rpl/t/rpl_row_tabledefs_3innodb.test @@ -7,3 +7,4 @@ let $engine_type = 'InnoDB'; -- source extra/rpl_tests/rpl_row_tabledefs.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_tbl_metadata.test b/mysql-test/suite/rpl/t/rpl_row_tbl_metadata.test index d854aa64dc5..e8ac74f0125 100644 --- a/mysql-test/suite/rpl/t/rpl_row_tbl_metadata.test +++ b/mysql-test/suite/rpl/t/rpl_row_tbl_metadata.test @@ -193,8 +193,7 @@ FLUSH LOGS; -- connection master -- echo ### assertion: the slave replicated event successfully and tables match --- let $diff_table_1=master:test.t1 --- let $diff_table_2=slave:test.t1 +-- let $diff_tables= master:t1, slave:t1 -- source include/diff_tables.inc DROP TABLE `t1`; @@ -229,7 +228,7 @@ DROP TABLE `t1`; # in both cases: when slave is replaying events and when # mysqlbinlog is used to read the binary log --- source include/master-slave-reset.inc +--source include/rpl_reset.inc -- connection master # Create several tables with field_metadata_size ranging @@ -313,8 +312,7 @@ FLUSH LOGS; while($ntables) { -- echo ### assertion: the slave replicated event successfully and tables match for t$ntables - -- let $diff_table_1=master:test.t$ntables - -- let $diff_table_2=slave:test.t$ntables + -- let $diff_tables= master:t$ntables, slave:t$ntables -- source include/diff_tables.inc -- connection master @@ -337,4 +335,4 @@ while($ntables) ## For debugging purposes you might want not to remove these -- remove_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug50018.binlog -- remove_file $generated_sql --- source include/master-slave-end.inc +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_trig001.test b/mysql-test/suite/rpl/t/rpl_row_trig001.test index 8669034713a..39f2662b569 100644 --- a/mysql-test/suite/rpl/t/rpl_row_trig001.test +++ b/mysql-test/suite/rpl/t/rpl_row_trig001.test @@ -113,3 +113,4 @@ sync_slave_with_master; diff_files $MYSQLTEST_VARDIR/tmp/trig001_master.sql $MYSQLTEST_VARDIR/tmp/trig001_slave.sql; # End of 5.0 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_trig002.test b/mysql-test/suite/rpl/t/rpl_row_trig002.test index 1ea245498d5..46f9ad91a3d 100644 --- a/mysql-test/suite/rpl/t/rpl_row_trig002.test +++ b/mysql-test/suite/rpl/t/rpl_row_trig002.test @@ -72,3 +72,4 @@ DROP TABLE test.t3; sync_slave_with_master; # End of 5.0 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_trig003.test b/mysql-test/suite/rpl/t/rpl_row_trig003.test index 781862161c1..75e6c4156db 100644 --- a/mysql-test/suite/rpl/t/rpl_row_trig003.test +++ b/mysql-test/suite/rpl/t/rpl_row_trig003.test @@ -150,3 +150,4 @@ DROP TABLE IF EXISTS test.t3; diff_files $MYSQLTEST_VARDIR/tmp/trg003_master.sql $MYSQLTEST_VARDIR/tmp/trg003_slave.sql; # End of 5.0 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_trig004.test b/mysql-test/suite/rpl/t/rpl_row_trig004.test index a918c602d56..fa5f973c355 100644 --- a/mysql-test/suite/rpl/t/rpl_row_trig004.test +++ b/mysql-test/suite/rpl/t/rpl_row_trig004.test @@ -16,3 +16,4 @@ let $engine_type=INNODB; -- source extra/rpl_tests/rpl_trig004.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_trunc_temp.test b/mysql-test/suite/rpl/t/rpl_row_trunc_temp.test index 60e1cd73200..394bf949f72 100644 --- a/mysql-test/suite/rpl/t/rpl_row_trunc_temp.test +++ b/mysql-test/suite/rpl/t/rpl_row_trunc_temp.test @@ -32,4 +32,4 @@ SELECT * FROM t2; DROP TABLE t1; connection master; DROP TABLE t2; ---source include/master-slave-end.inc +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_unsafe_funcs.test b/mysql-test/suite/rpl/t/rpl_row_unsafe_funcs.test index 069700546ce..9e6485d6630 100644 --- a/mysql-test/suite/rpl/t/rpl_row_unsafe_funcs.test +++ b/mysql-test/suite/rpl/t/rpl_row_unsafe_funcs.test @@ -33,3 +33,4 @@ connection master; DROP TABLE t1, t2; sync_slave_with_master; connection master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_until.test b/mysql-test/suite/rpl/t/rpl_row_until.test index bcd8ba8612b..0a70fb441c1 100644 --- a/mysql-test/suite/rpl/t/rpl_row_until.test +++ b/mysql-test/suite/rpl/t/rpl_row_until.test @@ -4,9 +4,6 @@ # Note: The test is dependent on binlog positions -# prepare version for substitutions -let $VERSION=`select version()`; - # Create some events on master connection master; CREATE TABLE t1(n INT NOT NULL AUTO_INCREMENT PRIMARY KEY); @@ -125,3 +122,10 @@ START SLAVE UNTIL RELAY_LOG_FILE='slave-relay-bin.000002', MASTER_LOG_POS=561; START SLAVE; --replace_result 740 MASTER_LOG_POS START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=740; + +--source include/stop_slave.inc +# Clear slave IO error. +RESET SLAVE; + +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_utf16.test b/mysql-test/suite/rpl/t/rpl_row_utf16.test index b8f7b724ea1..e3e7a51c002 100644 --- a/mysql-test/suite/rpl/t/rpl_row_utf16.test +++ b/mysql-test/suite/rpl/t/rpl_row_utf16.test @@ -19,8 +19,10 @@ INSERT INTO t1 VALUES (); # default value is inserted and encoded correctl --query_vertical SELECT c1, hex(c1) FROM t1 # assertion: tables don't differ --- let $diff_table_1=master:test.t1 --- let $diff_table_2=slave:test.t1 +-- let $diff_tables=master:t1,slave:t1 -- source include/diff_tables.inc +--connection master DROP TABLE t1; + +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_utf32.test b/mysql-test/suite/rpl/t/rpl_row_utf32.test index 44ca4b345c0..936d62b09bd 100644 --- a/mysql-test/suite/rpl/t/rpl_row_utf32.test +++ b/mysql-test/suite/rpl/t/rpl_row_utf32.test @@ -42,3 +42,4 @@ SET GLOBAL SLAVE_TYPE_CONVERSIONS= @saved_slave_type_conversions; -- source include/stop_slave.inc -- source include/start_slave.inc -- connection master +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_view01.test b/mysql-test/suite/rpl/t/rpl_row_view01.test index 77e4b98f780..cc60ab9912c 100644 --- a/mysql-test/suite/rpl/t/rpl_row_view01.test +++ b/mysql-test/suite/rpl/t/rpl_row_view01.test @@ -95,3 +95,4 @@ sync_slave_with_master; # End of 5.1 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_wide_table.test b/mysql-test/suite/rpl/t/rpl_row_wide_table.test index 7b17d7c4866..b1d16133096 100644 --- a/mysql-test/suite/rpl/t/rpl_row_wide_table.test +++ b/mysql-test/suite/rpl/t/rpl_row_wide_table.test @@ -337,3 +337,4 @@ sync_slave_with_master; # END of Test Case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_savepoint.test b/mysql-test/suite/rpl/t/rpl_savepoint.test index 7fe8a0da651..2aacd1fa81e 100644 --- a/mysql-test/suite/rpl/t/rpl_savepoint.test +++ b/mysql-test/suite/rpl/t/rpl_savepoint.test @@ -44,4 +44,5 @@ FLUSH LOGS; --echo # Connection master connection master; DROP TABLE nt; ---source include/master-slave-end.inc + +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_semi_sync.test b/mysql-test/suite/rpl/t/rpl_semi_sync.test index 47a54fc72e6..a57ebc236a1 100644 --- a/mysql-test/suite/rpl/t/rpl_semi_sync.test +++ b/mysql-test/suite/rpl/t/rpl_semi_sync.test @@ -609,6 +609,7 @@ UNINSTALL PLUGIN rpl_semi_sync_master; enable_warnings; connection slave; +change master to master_user='root',master_password=''; source include/start_slave.inc; connection master; @@ -618,3 +619,4 @@ sync_slave_with_master; connection master; drop user rpl@127.0.0.1; flush privileges; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_semi_sync_event-master.opt b/mysql-test/suite/rpl/t/rpl_semi_sync_event-master.opt index 3c4a05d640c..8546bd75890 100644 --- a/mysql-test/suite/rpl/t/rpl_semi_sync_event-master.opt +++ b/mysql-test/suite/rpl/t/rpl_semi_sync_event-master.opt @@ -1 +1 @@ -$SEMISYNC_PLUGIN_OPT --max-connections=23 +$SEMISYNC_PLUGIN_OPT --max-connections=40 diff --git a/mysql-test/suite/rpl/t/rpl_semi_sync_event.test b/mysql-test/suite/rpl/t/rpl_semi_sync_event.test index 3499b846c31..68e52c4a028 100644 --- a/mysql-test/suite/rpl/t/rpl_semi_sync_event.test +++ b/mysql-test/suite/rpl/t/rpl_semi_sync_event.test @@ -107,3 +107,4 @@ DROP EVENT ev1; DROP EVENT ev2; DROP TABLE t1; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_server_id1.test b/mysql-test/suite/rpl/t/rpl_server_id1.test index c97f7975278..90198a4ac5e 100644 --- a/mysql-test/suite/rpl/t/rpl_server_id1.test +++ b/mysql-test/suite/rpl/t/rpl_server_id1.test @@ -4,21 +4,19 @@ # ignored, which has caught our customers), unless # --replicate-same-server-id. -source include/master-slave.inc; -connection slave; -reset master; +--let $rpl_topology= 2->2 +--let $rpl_skip_start_slave= 1 +--source include/rpl_init.inc -# replicate ourselves -source include/stop_slave.inc; ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval change master to master_port=$SLAVE_MYPORT; -start slave; +--connection server_2 +START SLAVE; +# 1593 = ER_SLAVE_FATAL_ERROR +--let $slave_io_errno= 1593 +--let $show_slave_io_error= 1 +--source include/wait_for_slave_io_error.inc -let $slave_param= Last_IO_Errno; -let $slave_param_value= 1593; -source include/wait_for_slave_param.inc; ---echo *** must be having the replicate-same-server-id IO thread error *** -let $last_io_errno= query_get_value("show slave status", Last_IO_Errno, 1); -let $last_io_error= query_get_value("show slave status", Last_IO_Error, 1); -echo Slave_IO_Errno= $last_io_errno; -echo Slave_IO_Error= $last_io_error; +--source include/stop_slave_sql.inc +RESET SLAVE; + +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_server_id2.test b/mysql-test/suite/rpl/t/rpl_server_id2.test index 5c51a7fc08e..aa2ad5c3a8a 100644 --- a/mysql-test/suite/rpl/t/rpl_server_id2.test +++ b/mysql-test/suite/rpl/t/rpl_server_id2.test @@ -64,3 +64,4 @@ drop table t2; sync_slave_with_master; # End of tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_server_id_ignore.test b/mysql-test/suite/rpl/t/rpl_server_id_ignore.test index 1b38bd34d3d..004f4daa19d 100644 --- a/mysql-test/suite/rpl/t/rpl_server_id_ignore.test +++ b/mysql-test/suite/rpl/t/rpl_server_id_ignore.test @@ -112,3 +112,4 @@ sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_session_var.test b/mysql-test/suite/rpl/t/rpl_session_var.test index 55e58674c61..cf3faa6578c 100644 --- a/mysql-test/suite/rpl/t/rpl_session_var.test +++ b/mysql-test/suite/rpl/t/rpl_session_var.test @@ -57,5 +57,5 @@ sync_slave_with_master; SELECT length(data) < 100 FROM t1; connection master; drop table t1; -sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_set_charset.test b/mysql-test/suite/rpl/t/rpl_set_charset.test index 241c1c5738b..296e5dfb079 100644 --- a/mysql-test/suite/rpl/t/rpl_set_charset.test +++ b/mysql-test/suite/rpl/t/rpl_set_charset.test @@ -29,3 +29,4 @@ drop database mysqltest1; sync_slave_with_master; # End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_set_null_innodb.test b/mysql-test/suite/rpl/t/rpl_set_null_innodb.test index dba79b78fa1..2d0c34e1d0a 100644 --- a/mysql-test/suite/rpl/t/rpl_set_null_innodb.test +++ b/mysql-test/suite/rpl/t/rpl_set_null_innodb.test @@ -4,3 +4,4 @@ -- let $engine= InnoDB -- source extra/rpl_tests/rpl_set_null.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_set_null_myisam.test b/mysql-test/suite/rpl/t/rpl_set_null_myisam.test index 7b433071553..13cd7c3e4a8 100644 --- a/mysql-test/suite/rpl/t/rpl_set_null_myisam.test +++ b/mysql-test/suite/rpl/t/rpl_set_null_myisam.test @@ -3,3 +3,4 @@ -- let $engine= MyISAM -- source extra/rpl_tests/rpl_set_null.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_show_slave_hosts.test b/mysql-test/suite/rpl/t/rpl_show_slave_hosts.test index 9f202487968..eb2e883847f 100644 --- a/mysql-test/suite/rpl/t/rpl_show_slave_hosts.test +++ b/mysql-test/suite/rpl/t/rpl_show_slave_hosts.test @@ -44,4 +44,4 @@ source include/wait_show_condition.inc; --replace_result $SLAVE_MYPORT SLAVE_PORT SHOW SLAVE HOSTS; -source include/master-slave-end.inc; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_show_slave_running.test b/mysql-test/suite/rpl/t/rpl_show_slave_running.test index 8578f1e5275..d8c86a2aeb1 100644 --- a/mysql-test/suite/rpl/t/rpl_show_slave_running.test +++ b/mysql-test/suite/rpl/t/rpl_show_slave_running.test @@ -80,3 +80,4 @@ connection slave; eval set global debug= '$debug_saved'; SET DEBUG_SYNC= 'RESET'; --echo End of tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_skip_error.test b/mysql-test/suite/rpl/t/rpl_skip_error.test index 8d176ac0c3b..2853c95b212 100644 --- a/mysql-test/suite/rpl/t/rpl_skip_error.test +++ b/mysql-test/suite/rpl/t/rpl_skip_error.test @@ -167,3 +167,4 @@ DROP TABLE t1; DROP TABLE t2; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_slave_grp_exec.test b/mysql-test/suite/rpl/t/rpl_slave_grp_exec.test index 1a0ff8d52f0..70ebba0047b 100644 --- a/mysql-test/suite/rpl/t/rpl_slave_grp_exec.test +++ b/mysql-test/suite/rpl/t/rpl_slave_grp_exec.test @@ -62,7 +62,9 @@ SELECT * FROM t2 ORDER BY a; SELECT * FROM t3 ORDER BY a; --connection slave ---source include/wait_for_slave_sql_to_stop.inc +# 1146 = ER_NO_SUCH_TABLE +--let $slave_sql_errno= 1146 +--source include/wait_for_slave_sql_error.inc SHOW TABLES LIKE 't%'; if (`SELECT @@BINLOG_FORMAT = 'ROW'`) { --replace_regex /AA/AA_for_row_or_XX_for_stmt_mixed/ @@ -77,7 +79,7 @@ if (!`SELECT @@BINLOG_FORMAT = 'ROW'`) { SELECT * FROM t2 ORDER BY a; } ---source include/stop_slave.inc +--source include/stop_slave_io.inc RENAME TABLE t3_bak TO t3; --source include/start_slave.inc @@ -107,7 +109,9 @@ INSERT INTO t1 VALUES(2, 'B'); UPDATE t1 SET b = 'X' WHERE a = 2; --connection slave ---source include/wait_for_slave_sql_to_stop.inc +# 1146 = ER_NO_SUCH_TABLE +--let $slave_sql_errno= 1146 +--source include/wait_for_slave_sql_error.inc --connection master SELECT * FROM t1 ORDER BY a; @@ -119,7 +123,7 @@ SHOW TABLES LIKE 't%'; SELECT * FROM t1 ORDER BY a; SELECT * FROM t2 ORDER BY a; ---source include/stop_slave.inc +--source include/stop_slave_io.inc RENAME TABLE t3_bak TO t3; --source include/start_slave.inc @@ -151,7 +155,9 @@ INSERT INTO t3 VALUES (3, 'C'), (4, 'D'); COMMIT; --connection slave ---source include/wait_for_slave_sql_to_stop.inc +# 1146 = ER_NO_SUCH_TABLE +--let $slave_sql_errno= 1146 +--source include/wait_for_slave_sql_error.inc --connection master SELECT * FROM t1 ORDER BY a; @@ -163,7 +169,7 @@ SHOW TABLES LIKE 't%'; SELECT * FROM t1 ORDER BY a; SELECT * FROM t2 ORDER BY a; -source include/stop_slave.inc; +source include/stop_slave_io.inc; RENAME TABLE t3_bak TO t3; source include/start_slave.inc; @@ -174,3 +180,4 @@ DROP TABLE t1,t2,t3; --sync_slave_with_master # End of 5.1 test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_slave_load_in.test b/mysql-test/suite/rpl/t/rpl_slave_load_in.test index 54ebdffce69..80a27479ae2 100644 --- a/mysql-test/suite/rpl/t/rpl_slave_load_in.test +++ b/mysql-test/suite/rpl/t/rpl_slave_load_in.test @@ -31,12 +31,10 @@ commit; ########################################################################## sync_slave_with_master; -let $diff_table_1=master:test.t1; -let $diff_table_2=slave:test.t1; +let $diff_tables= master:t1, slave:t1; source include/diff_tables.inc; -let $diff_table_1=master:test.t2; -let $diff_table_2=slave:test.t2; +let $diff_tables= master:t2, slave:t2; source include/diff_tables.inc; ########################################################################## @@ -48,3 +46,4 @@ drop table t1; drop table t2; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test b/mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test index 1cf88deb56f..1e2850fada2 100644 --- a/mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test +++ b/mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test @@ -52,9 +52,14 @@ connection master; drop table t1; -connection slave; +--source include/sync_slave_io_with_master.inc +--source include/stop_slave_io.inc +RESET SLAVE; drop table t1; call mtr.add_suppression("Slave: Can't get stat of .*"); call mtr.add_suppression("Slave: File.* not found.*"); +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc + diff --git a/mysql-test/suite/rpl/t/rpl_slave_load_tmpdir_not_exist.test b/mysql-test/suite/rpl/t/rpl_slave_load_tmpdir_not_exist.test index 68c41abf537..0481581998c 100644 --- a/mysql-test/suite/rpl/t/rpl_slave_load_tmpdir_not_exist.test +++ b/mysql-test/suite/rpl/t/rpl_slave_load_tmpdir_not_exist.test @@ -5,20 +5,17 @@ --source include/have_log_bin.inc --source include/not_embedded.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,); +--let $rpl_skip_start_slave= 1 +--source include/master-slave.inc -connection slave; - ---replace_result $MASTER_MYPORT MASTER_MYPORT -eval CHANGE MASTER TO MASTER_USER='root', - MASTER_CONNECT_RETRY=1, - MASTER_HOST='127.0.0.1', - MASTER_PORT=$MASTER_MYPORT; +--connection slave START SLAVE; +# Why 12??? +--let $slave_sql_errno= 12 +source include/wait_for_slave_sql_error.inc; -source include/wait_for_slave_sql_to_stop.inc; -let $errno=query_get_value("show slave status", Last_SQL_Errno, 1); -echo $errno; +--source include/stop_slave_io.inc +RESET SLAVE; + +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_slave_skip.test b/mysql-test/suite/rpl/t/rpl_slave_skip.test index 66762d4dad0..f2129bd7f18 100644 --- a/mysql-test/suite/rpl/t/rpl_slave_skip.test +++ b/mysql-test/suite/rpl/t/rpl_slave_skip.test @@ -309,3 +309,4 @@ connection master; DROP TABLE t10; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_slave_status.test b/mysql-test/suite/rpl/t/rpl_slave_status.test index 9601062b65f..0645b4267d6 100644 --- a/mysql-test/suite/rpl/t/rpl_slave_status.test +++ b/mysql-test/suite/rpl/t/rpl_slave_status.test @@ -56,16 +56,23 @@ START SLAVE; source include/wait_for_slave_sql_to_start.inc; source include/wait_for_slave_io_to_stop.inc; ---echo ==== Verify that Slave_IO_Running = No ==== -let $result= query_get_value("SHOW SLAVE STATUS", Slave_IO_Running, 1); ---echo Slave_IO_Running = $result (should be No) +--echo ==== Verify that Slave IO thread stopped with error ==== +# 1045 = ER_ACCESS_DENIED_ERROR +--let $slave_io_errno= 1045 +--source include/wait_for_slave_io_error.inc --echo ==== Cleanup (Note that slave IO thread is not running) ==== -DROP TABLE t1; -# cleanup: slave io thread has been stopped "irrecoverably" -# so we clean up mess manually + +# cleanup: slave io thread has is stopped so we reset replication +--source include/stop_slave_sql.inc +CHANGE MASTER TO MASTER_USER = 'root', MASTER_PASSWORD = ''; +# clear Slave_IO_Errno +--let $rpl_only_running_threads= 1 +--source include/rpl_reset.inc --echo [on master] connection master; DROP TABLE t1; -call mtr.force_restart(); + +--source include/rpl_end.inc +--source include/force_restart.inc diff --git a/mysql-test/suite/rpl/t/rpl_slow_query_log.test b/mysql-test/suite/rpl/t/rpl_slow_query_log.test index b1ea55ee8ee..e980aab7787 100644 --- a/mysql-test/suite/rpl/t/rpl_slow_query_log.test +++ b/mysql-test/suite/rpl/t/rpl_slow_query_log.test @@ -196,7 +196,7 @@ disconnect extra2; # BUG#50620: Adding an index to a table prevents slave from logging into slow log # --- source include/master-slave-reset.inc +--source include/rpl_reset.inc -- connection master SET @old_log_output= @@log_output; @@ -307,3 +307,4 @@ DROP TABLE t1; -- sync_slave_with_master SET @@global.log_output= @old_log_output; SET @@global.long_query_time= @old_long_query_time; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_sp.test b/mysql-test/suite/rpl/t/rpl_sp.test index b2e7418ce14..00815ab9d7e 100644 --- a/mysql-test/suite/rpl/t/rpl_sp.test +++ b/mysql-test/suite/rpl/t/rpl_sp.test @@ -692,13 +692,8 @@ drop function f1; --echo # --echo # Bug #11918 Can't use a declared variable in LIMIT clause --echo # ---disable_warnings -drop table if exists t1; -drop procedure if exists p1; ---enable_warnings -connection master; --- source include/master-slave-reset.inc -connection default; +--source include/rpl_reset.inc + create table t1 (c1 int); insert into t1 (c1) values (1), (2), (3), (4), (5), (6), (7), (8), (9), (10); @@ -723,7 +718,7 @@ select * from t1; sync_slave_with_master; connection slave; select * from t1; -connection default; +connection master; --disable_warnings call p1(-1); --enable_warnings @@ -731,7 +726,7 @@ select * from t1; sync_slave_with_master; connection slave; select * from t1; -connection default; +connection master; --echo # Cleanup set @@session.binlog_format=@save_binlog_format; @@ -743,3 +738,4 @@ drop procedure p1; # Cleanup sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_sp004.test b/mysql-test/suite/rpl/t/rpl_sp004.test index 2f9b329eb66..31e4ce37df7 100644 --- a/mysql-test/suite/rpl/t/rpl_sp004.test +++ b/mysql-test/suite/rpl/t/rpl_sp004.test @@ -89,3 +89,4 @@ diff_files $MYSQLTEST_VARDIR/tmp/sp004_master.sql $MYSQLTEST_VARDIR/tmp/sp004_sl # End of 5.0 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_sp_effects.test b/mysql-test/suite/rpl/t/rpl_sp_effects.test index 63ac3a8ad9c..df13ff253b1 100644 --- a/mysql-test/suite/rpl/t/rpl_sp_effects.test +++ b/mysql-test/suite/rpl/t/rpl_sp_effects.test @@ -261,3 +261,4 @@ SET @@global.log_bin_trust_function_creators= @old_log_bin_trust_function_creato sync_slave_with_master; --echo end of the tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_spec_variables.test b/mysql-test/suite/rpl/t/rpl_spec_variables.test index a60738316c8..2cb580fce83 100644 --- a/mysql-test/suite/rpl/t/rpl_spec_variables.test +++ b/mysql-test/suite/rpl/t/rpl_spec_variables.test @@ -304,3 +304,4 @@ SET @@global.storage_engine=@restore_slave_storage_engine; call mtr.add_suppression("The table 't[12]' is full"); # End of 5.1 test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_sporadic_master.test b/mysql-test/suite/rpl/t/rpl_sporadic_master.test index 6640544b0ed..592d13e67b0 100644 --- a/mysql-test/suite/rpl/t/rpl_sporadic_master.test +++ b/mysql-test/suite/rpl/t/rpl_sporadic_master.test @@ -1,6 +1,3 @@ -############################################################# -# 2006-02-07 By JBM added order by -############################################################# # test to see if replication can continue when master sporadically fails on # COM_BINLOG_DUMP and additionally limits the number of events per dump @@ -13,10 +10,8 @@ truncate table t1; # We have to use 4 in the following to make this test work with all table types insert into t1 values (4),(NULL); sync_slave_with_master; -stop slave; ---source include/wait_for_slave_to_stop.inc -start slave; ---source include/wait_for_slave_to_start.inc +--source include/stop_slave.inc +--source include/start_slave.inc connection master; insert into t1 values (NULL),(NULL); flush logs; @@ -28,4 +23,4 @@ connection master; drop table t1,t2; sync_slave_with_master; -# End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_ssl.test b/mysql-test/suite/rpl/t/rpl_ssl.test index 38a61e07358..43289428d45 100644 --- a/mysql-test/suite/rpl/t/rpl_ssl.test +++ b/mysql-test/suite/rpl/t/rpl_ssl.test @@ -97,4 +97,14 @@ drop user replssl@localhost; drop table t1; sync_slave_with_master; +--source include/stop_slave.inc +CHANGE MASTER TO + master_user = 'root', + master_ssl = 0, + master_ssl_ca = '', + master_ssl_cert = '', + master_ssl_key = ''; + --echo End of 5.0 tests +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_ssl1.test b/mysql-test/suite/rpl/t/rpl_ssl1.test index 152f307fd31..f5f63a00033 100644 --- a/mysql-test/suite/rpl/t/rpl_ssl1.test +++ b/mysql-test/suite/rpl/t/rpl_ssl1.test @@ -10,7 +10,6 @@ connection master; grant replication slave on *.* to replssl@localhost require ssl; create table t1 (t int); -#syncing with master sync_slave_with_master; #trying to use this user without ssl @@ -57,6 +56,7 @@ start slave; connection master; drop user replssl@localhost; drop table t1; + sync_slave_with_master; source include/show_slave_status.inc; source include/check_slave_is_running.inc; @@ -91,6 +91,19 @@ select * from t1; source include/show_slave_status.inc; --source include/check_slave_is_running.inc +# ==== Clean up ==== + connection master; drop table t1; sync_slave_with_master; +--source include/stop_slave.inc +CHANGE MASTER TO + master_host="127.0.0.1", + master_ssl_ca ='', + master_ssl_cert='', + master_ssl_key='', + master_ssl_verify_server_cert=0, + master_ssl=0; + +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_stm_000001.test b/mysql-test/suite/rpl/t/rpl_stm_000001.test index aee067b2d4a..268a10ad1fa 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_000001.test +++ b/mysql-test/suite/rpl/t/rpl_stm_000001.test @@ -1,2 +1,128 @@ -let $engine_type=myisam; --- source extra/rpl_tests/rpl_stm_000001.test +# 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"); +--let $engine_type= myisam + +# 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). +# 1053 = ER_SERVER_SHUTDOWN +--let $slave_sql_errno= 1053 +--source include/wait_for_slave_sql_error_and_skip.inc + +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 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_stm_auto_increment_bug33029.test b/mysql-test/suite/rpl/t/rpl_stm_auto_increment_bug33029.test index a996c6fac66..e8e20438d1d 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_auto_increment_bug33029.test +++ b/mysql-test/suite/rpl/t/rpl_stm_auto_increment_bug33029.test @@ -105,3 +105,4 @@ DROP FUNCTION IF EXISTS f1; DROP TRIGGER IF EXISTS tr1; enable_warnings; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_stm_binlog_max_cache_size.test b/mysql-test/suite/rpl/t/rpl_stm_binlog_max_cache_size.test index 7e43b7a9e7d..352213304b6 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_binlog_max_cache_size.test +++ b/mysql-test/suite/rpl/t/rpl_stm_binlog_max_cache_size.test @@ -5,3 +5,4 @@ --source include/have_binlog_format_statement.inc --source extra/rpl_tests/rpl_binlog_max_cache_size.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_stm_conflicts.test b/mysql-test/suite/rpl/t/rpl_stm_conflicts.test index 07b7a0bf8f7..cd9e71cbff9 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_conflicts.test +++ b/mysql-test/suite/rpl/t/rpl_stm_conflicts.test @@ -1,11 +1,6 @@ -# See the top of mysql-test/extra/rpl_tests/rpl_conflicts.test for an -# explanation of what this test does. -# -# This test file is for statement-logging mode. - source include/have_binlog_format_mixed_or_statement.inc; source include/master-slave.inc; source extra/rpl_tests/rpl_conflicts.test; -source include/master-slave-end.inc; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_stm_drop_create_temp_table.test b/mysql-test/suite/rpl/t/rpl_stm_drop_create_temp_table.test index b46da8a0150..6e3dabf6e32 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_drop_create_temp_table.test +++ b/mysql-test/suite/rpl/t/rpl_stm_drop_create_temp_table.test @@ -8,3 +8,4 @@ --source include/have_innodb.inc --source extra/rpl_tests/rpl_drop_create_temp_table.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_stm_flsh_tbls.test b/mysql-test/suite/rpl/t/rpl_stm_flsh_tbls.test index 791132cef5a..01321663ed2 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_flsh_tbls.test +++ b/mysql-test/suite/rpl/t/rpl_stm_flsh_tbls.test @@ -3,6 +3,3 @@ let $rename_event_pos= 931; -- source extra/rpl_tests/rpl_flsh_tbls.test - -# End of 4.1 tests -# Adding comment for force manual merge 5.0 -> wl1012. Delete me if needed. diff --git a/mysql-test/suite/rpl/t/rpl_stm_found_rows.test b/mysql-test/suite/rpl/t/rpl_stm_found_rows.test index 2d8d480b910..1ec8f8a0424 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_found_rows.test +++ b/mysql-test/suite/rpl/t/rpl_stm_found_rows.test @@ -119,7 +119,5 @@ DROP TABLE t1, logtbl; DROP PROCEDURE just_log; DROP PROCEDURE calc_and_log; DROP FUNCTION log_rows; -sync_slave_with_master; - -source include/reset_master_and_slave.inc; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_stm_implicit_commit_binlog.test b/mysql-test/suite/rpl/t/rpl_stm_implicit_commit_binlog.test index 87dd3eb3295..189b9aa4a1c 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_implicit_commit_binlog.test +++ b/mysql-test/suite/rpl/t/rpl_stm_implicit_commit_binlog.test @@ -7,3 +7,4 @@ --let $engine=Innodb --source extra/rpl_tests/rpl_implicit_commit_binlog.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_stm_innodb.test b/mysql-test/suite/rpl/t/rpl_stm_innodb.test index 5b3fef9c66b..cecf9ec7bcd 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_innodb.test +++ b/mysql-test/suite/rpl/t/rpl_stm_innodb.test @@ -6,3 +6,4 @@ source include/have_innodb.inc; source include/have_binlog_format_mixed_or_statement.inc; source extra/rpl_tests/rpl_innodb.test; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_stm_insert_delayed.test b/mysql-test/suite/rpl/t/rpl_stm_insert_delayed.test index 3db3f7d9fcd..92d57625283 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_insert_delayed.test +++ b/mysql-test/suite/rpl/t/rpl_stm_insert_delayed.test @@ -2,7 +2,9 @@ --source include/master-slave.inc --source include/not_embedded.inc --source include/not_windows.inc + disable_query_log; call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); enable_query_log; --source extra/rpl_tests/rpl_insert_delayed.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_stm_loadfile.test b/mysql-test/suite/rpl/t/rpl_stm_loadfile.test index c27348ce987..5d2c85b2cb6 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_loadfile.test +++ b/mysql-test/suite/rpl/t/rpl_stm_loadfile.test @@ -22,3 +22,4 @@ enable_query_log; -- source extra/rpl_tests/rpl_loadfile.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_stm_log.test b/mysql-test/suite/rpl/t/rpl_stm_log.test index 7bc17fbaada..7e7e1d4033f 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_log.test +++ b/mysql-test/suite/rpl/t/rpl_stm_log.test @@ -7,3 +7,4 @@ let $engine_type=MyISAM; # End of 4.1 tests # Adding comment for force manual merge 5.0 -> wl1012: Delete me +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_stm_max_relay_size.test b/mysql-test/suite/rpl/t/rpl_stm_max_relay_size.test index 950aa8b322a..1a7139c889a 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_max_relay_size.test +++ b/mysql-test/suite/rpl/t/rpl_stm_max_relay_size.test @@ -6,6 +6,3 @@ # Requires statement logging -- source include/have_binlog_format_mixed_or_statement.inc -- source extra/rpl_tests/rpl_max_relay_size.test - -# End of 4.1 tests -# diff --git a/mysql-test/suite/rpl/t/rpl_stm_mix_show_relaylog_events.test b/mysql-test/suite/rpl/t/rpl_stm_mix_show_relaylog_events.test index 523e883d9fa..537d304687c 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_mix_show_relaylog_events.test +++ b/mysql-test/suite/rpl/t/rpl_stm_mix_show_relaylog_events.test @@ -16,3 +16,4 @@ -- source include/have_binlog_format_mixed_or_statement.inc -- source extra/rpl_tests/rpl_show_relaylog_events.inc +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_stm_mixing_engines.test b/mysql-test/suite/rpl/t/rpl_stm_mixing_engines.test index f32ab1f01f0..f13057a7d83 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_mixing_engines.test +++ b/mysql-test/suite/rpl/t/rpl_stm_mixing_engines.test @@ -13,7 +13,7 @@ let $engine_type=Innodb; # BUG#49522: Replication problem with mixed MyISAM/InnoDB # --- source include/master-slave-reset.inc +--source include/rpl_reset.inc -- connection master CREATE TABLE `t1` ( @@ -37,12 +37,11 @@ SET AUTOCOMMIT=1; -- sync_slave_with_master --- let $diff_table_1=master:test.t1 --- let $diff_table_2=slave:test.t1 +-- let $diff_tables= master:t1, slave:t1 -- source include/diff_tables.inc -- connection master DROP TABLE `t1`; -- sync_slave_with_master --- source include/master-slave-end.inc +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_stm_multi_query.test b/mysql-test/suite/rpl/t/rpl_stm_multi_query.test index c39d1fad015..e234f4b9622 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_multi_query.test +++ b/mysql-test/suite/rpl/t/rpl_stm_multi_query.test @@ -3,10 +3,5 @@ # CLIENT_MULTI_STATEMENTS) will be binlogged ONE-query-per-event (not # one binlog event containing all queries) -# Requires statement logging -- source include/have_binlog_format_mixed_or_statement.inc -- source extra/rpl_tests/rpl_multi_query.test - - -# End of 4.1 tests -# diff --git a/mysql-test/suite/rpl/t/rpl_stm_no_op.test b/mysql-test/suite/rpl/t/rpl_stm_no_op.test index 66dc89bd712..1605b177ac4 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_no_op.test +++ b/mysql-test/suite/rpl/t/rpl_stm_no_op.test @@ -91,3 +91,4 @@ select * from t2; connection master; drop table t1, t2; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_stm_sql_mode.test b/mysql-test/suite/rpl/t/rpl_stm_sql_mode.test index d5aac4a43e2..0eb41d1c6bd 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_sql_mode.test +++ b/mysql-test/suite/rpl/t/rpl_stm_sql_mode.test @@ -22,3 +22,4 @@ DROP TABLE t1; -- echo # duplicate key error (because it has received event -- echo # with expected error code). -- sync_slave_with_master +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_stm_start_stop_slave.test b/mysql-test/suite/rpl/t/rpl_stm_start_stop_slave.test index 7701cd7aa06..d08bc2f246a 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_start_stop_slave.test +++ b/mysql-test/suite/rpl/t/rpl_stm_start_stop_slave.test @@ -5,5 +5,21 @@ --source include/have_binlog_format_statement.inc --source include/have_innodb.inc +# make innodb updates run fast +--connection slave +SET @old_innodb_flush_log_at_trx_commit= @@global.innodb_flush_log_at_trx_commit; +SET @@global.innodb_flush_log_at_trx_commit= 0; +--connection master +SET @old_innodb_flush_log_at_trx_commit= @@global.innodb_flush_log_at_trx_commit; +SET @@global.innodb_flush_log_at_trx_commit= 0; + SET @@session.binlog_direct_non_transactional_updates= FALSE; --source ./extra/rpl_tests/rpl_start_stop_slave.test + +# clean up +--connection slave +SET @@global.innodb_flush_log_at_trx_commit= @old_innodb_flush_log_at_trx_commit; +--connection master +SET @@global.innodb_flush_log_at_trx_commit= @old_innodb_flush_log_at_trx_commit; + +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_stm_stop_middle_group.test b/mysql-test/suite/rpl/t/rpl_stm_stop_middle_group.test index dd3bf1a7f56..84d663298c4 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_stop_middle_group.test +++ b/mysql-test/suite/rpl/t/rpl_stm_stop_middle_group.test @@ -8,3 +8,4 @@ SET @@session.binlog_direct_non_transactional_updates= FALSE; -- source extra/rpl_tests/rpl_stop_middle_group.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_stm_until.test b/mysql-test/suite/rpl/t/rpl_stm_until.test index 403069b6216..4e9ccc2b0cf 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_until.test +++ b/mysql-test/suite/rpl/t/rpl_stm_until.test @@ -72,7 +72,7 @@ select * from t1; --let $slave_param_value= $master_log_pos_1 --source include/check_slave_param.inc -let $relay_log_file= slave-relay-bin.000004; +let $relay_log_file= slave-relay-bin.000003; let $master_log_pos= $master_log_pos_2; source include/get_relay_log_pos.inc; # try replicate all up to and not including the second insert to t2; @@ -195,10 +195,9 @@ sync_with_master; # to substitute the genuine one with a prepared on 4.1 server. # ---source include/master-slave-reset.inc +--source include/rpl_reset.inc connection master; -drop table if exists t1; # there is create table t1 in bug47142_master-bin.000001 flush logs; let $MYSQLD_DATADIR= `select @@datadir`; --remove_file $MYSQLD_DATADIR/master-bin.000001 @@ -219,9 +218,7 @@ show tables /* t1 must exist */; drop table t1; # drop on slave only, master does not have t1. stop slave; -reset slave; - -connection master; -reset master; # End of tests +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_stm_user_variables.test b/mysql-test/suite/rpl/t/rpl_stm_user_variables.test index 05adc597776..2045dd6ae57 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_user_variables.test +++ b/mysql-test/suite/rpl/t/rpl_stm_user_variables.test @@ -43,8 +43,7 @@ CREATE TABLE t1 (`tinyint` TINYINT, -- echo ######################################### -- connection master -- echo ## assertion: master and slave tables are in sync --- let $diff_table_1=master:test.t1 --- let $diff_table_2=slave:test.t1 +-- let $diff_tables=master:t1,slave:t1 -- source include/diff_tables.inc -- connection master TRUNCATE t1; @@ -74,8 +73,7 @@ INSERT INTO t1 VALUES (@positive, -- echo ######################################### -- connection master -- echo ## assertion: master and slave tables are in sync --- let $diff_table_1=master:test.t1 --- let $diff_table_2=slave:test.t1 +-- let $diff_tables=master:t1,slave:t1 -- source include/diff_tables.inc -- connection master TRUNCATE t1; @@ -94,8 +92,7 @@ TRUNCATE t1; -- echo ######################################### -- connection master -- echo ## assertion: master and slave tables are in sync --- let $diff_table_1=master:test.t1 --- let $diff_table_2=slave:test.t1 +-- let $diff_tables=master:t1,slave:t1 -- source include/diff_tables.inc -- connection master TRUNCATE t1; @@ -126,8 +123,7 @@ INSERT INTO t1 VALUES (@negative, -- connection master -- echo ## assertion: master and slave tables are in sync --- let $diff_table_1=master:test.t1 --- let $diff_table_2=slave:test.t1 +-- let $diff_tables=master:t1,slave:t1 -- source include/diff_tables.inc -- connection master TRUNCATE t1; @@ -145,7 +141,7 @@ DROP TABLE t1; # BUG#51426 # ##################################################################### --- source include/master-slave-reset.inc +--source include/rpl_reset.inc -- connection master CREATE TABLE t1 ( c INT, PRIMARY KEY (c)) Engine=MyISAM; @@ -162,8 +158,7 @@ INSERT INTO t1 VALUES (@aux) , (@aux1); -- sync_slave_with_master -- echo ## assertion: master and slave tables are in sync --- let $diff_table_1=master:test.t1 --- let $diff_table_2=slave:test.t1 +-- let $diff_tables=master:t1,slave:t1 -- source include/diff_tables.inc --connection master @@ -172,3 +167,4 @@ DROP TABLE t1; -- sync_slave_with_master +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_stop_slave.test b/mysql-test/suite/rpl/t/rpl_stop_slave.test index 3950b59908a..1529f98397a 100644 --- a/mysql-test/suite/rpl/t/rpl_stop_slave.test +++ b/mysql-test/suite/rpl/t/rpl_stop_slave.test @@ -48,4 +48,4 @@ SET GLOBAL debug= '$debug_save'; connection master; DROP TABLE t1, t2; -source include/master-slave-end.inc; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_switch_stm_row_mixed.test b/mysql-test/suite/rpl/t/rpl_switch_stm_row_mixed.test index ce5d9f15b9f..688f93c4bb8 100644 --- a/mysql-test/suite/rpl/t/rpl_switch_stm_row_mixed.test +++ b/mysql-test/suite/rpl/t/rpl_switch_stm_row_mixed.test @@ -621,3 +621,4 @@ sync_slave_with_master; connection master; # Restore binlog format setting set global binlog_format =@my_binlog_format; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_sync-slave.opt b/mysql-test/suite/rpl/t/rpl_sync-slave.opt index fba451a5b3e..3816e61bb1e 100644 --- a/mysql-test/suite/rpl/t/rpl_sync-slave.opt +++ b/mysql-test/suite/rpl/t/rpl_sync-slave.opt @@ -1 +1,2 @@ --sync-relay-log-info=1 --relay-log-recovery=1 --innodb_file_format_check=1 --default-storage-engine=MyISAM --innodb-file-per-table=0 +--skip-core-file diff --git a/mysql-test/suite/rpl/t/rpl_sync.test b/mysql-test/suite/rpl/t/rpl_sync.test index 3b0cbbabe25..639214f9d93 100644 --- a/mysql-test/suite/rpl/t/rpl_sync.test +++ b/mysql-test/suite/rpl/t/rpl_sync.test @@ -50,8 +50,7 @@ connection slave; let $MYSQLD_SLAVE_DATADIR= `select @@datadir`; --replace_result $MYSQLD_SLAVE_DATADIR MYSQLD_SLAVE_DATADIR --copy_file $MYSQLD_SLAVE_DATADIR/master.info $MYSQLD_SLAVE_DATADIR/master.backup -stop slave SQL_THREAD; -source include/wait_for_slave_sql_to_stop.inc; +--source include/stop_slave_sql.inc connection master; insert into t1(a) values(4); @@ -60,8 +59,7 @@ insert into t1(a) values(6); --echo =====Removing relay log files and crashing/recoverying the slave=======; connection slave; -stop slave IO_THREAD; -source include/wait_for_slave_io_to_stop.inc; +--source include/stop_slave_io.inc let $file= query_get_value("SHOW SLAVE STATUS", Relay_Log_File, 1); @@ -79,18 +77,16 @@ SET SESSION debug="d,crash_before_rotate_relaylog"; --error 2013 FLUSH LOGS; ---enable_reconnect ---source include/wait_until_connected_again.inc +--let $rpl_server_number= 2 +--source include/rpl_reconnect.inc --echo =====Dumping and comparing tables=======; -start slave; -source include/wait_for_slave_to_start.inc; +--source include/start_slave.inc connection master; sync_slave_with_master; -let $diff_table_1=master:test.t1; -let $diff_table_2=slave:test.t1; +let $diff_tables=master:t1,slave:t1; source include/diff_tables.inc; ######################################################################################## @@ -98,8 +94,7 @@ source include/diff_tables.inc; ######################################################################################## --echo =====Corrupting the master.info=======; connection slave; -stop slave; -source include/wait_for_slave_to_stop.inc; +--source include/stop_slave.inc connection master; FLUSH LOGS; @@ -130,18 +125,16 @@ SET SESSION debug="d,crash_before_rotate_relaylog"; --error 2013 FLUSH LOGS; ---enable_reconnect ---source include/wait_until_connected_again.inc +--let $rpl_server_number= 2 +--source include/rpl_reconnect.inc --echo =====Dumping and comparing tables=======; -start slave; -source include/wait_for_slave_to_start.inc; +--source include/start_slave.inc connection master; sync_slave_with_master; -let $diff_table_1=master:test.t1; -let $diff_table_2=slave:test.t1; +let $diff_tables=master:t1,slave:t1; source include/diff_tables.inc; ######################################################################################## @@ -150,5 +143,7 @@ source include/diff_tables.inc; --echo =====Clean up=======; connection master; drop table t1; + --remove_file $MYSQLD_SLAVE_DATADIR/master.backup ---sync_slave_with_master +--source include/rpl_end.inc + diff --git a/mysql-test/suite/rpl/t/rpl_temp_table.test b/mysql-test/suite/rpl/t/rpl_temp_table.test index 62c3633b7b2..92f8cef9c10 100644 --- a/mysql-test/suite/rpl/t/rpl_temp_table.test +++ b/mysql-test/suite/rpl/t/rpl_temp_table.test @@ -64,3 +64,6 @@ connect (master2,localhost,root,,); connection master2; drop table if exists t1,t2; sync_slave_with_master; + + +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_temp_table_mix_row.test b/mysql-test/suite/rpl/t/rpl_temp_table_mix_row.test index 624a6467350..63f0b6c2234 100644 --- a/mysql-test/suite/rpl/t/rpl_temp_table_mix_row.test +++ b/mysql-test/suite/rpl/t/rpl_temp_table_mix_row.test @@ -32,6 +32,7 @@ SHOW STATUS LIKE "Slave_open_temp_tables"; --connection master disconnect master; +--echo [on master1] --connection master1 # waiting DROP TEMPORARY TABLE event to be written into binlog @@ -47,7 +48,10 @@ SHOW STATUS LIKE "Slave_open_temp_tables"; --echo ==== Clean up ==== --echo [on master] ---connection master1 +--let $rpl_connection_name= master +--let $rpl_server_number= 1 +--source include/rpl_connect.inc +--connection master DROP TABLE t1; --echo [on slave] @@ -89,8 +93,7 @@ sync_slave_with_master; # 10. in the end the slave should not have open temp tables. # -connect (master,127.0.0.1,root,,test,$MASTER_MYPORT,); --- source include/master-slave-reset.inc +--source include/rpl_reset.inc -- connection master # action: setup environment @@ -195,11 +198,13 @@ COMMIT; source include/show_binlog_events.inc; +--sync_slave_with_master + --echo # Compare the base table. -let diff_table= test.t1; -source include/rpl_diff_tables.inc; +--let $diff_tables= master:t1, slave:t1 +--source include/diff_tables.inc --echo connection master; DROP TABLE t1; -source include/master-slave-end.inc; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_temporary.test b/mysql-test/suite/rpl/t/rpl_temporary.test index 0d0af3d2d35..90d517091be 100644 --- a/mysql-test/suite/rpl/t/rpl_temporary.test +++ b/mysql-test/suite/rpl/t/rpl_temporary.test @@ -312,10 +312,15 @@ select * from t1; connection master; drop table t1; --remove_file $MYSQLTEST_VARDIR/tmp/bug14157.sql +--sync_slave_with_master -# Delete the anonymous users +# Delete the anonymous users. +--source include/stop_slave.inc source include/delete_anonymous_users.inc; - +--connection master +source include/delete_anonymous_users.inc; +--let $rpl_only_running_threads= 1 +--source include/rpl_reset.inc # @@ -347,9 +352,7 @@ connection slave; DROP USER user43748@127.0.0.1; ---echo -- done. back to master. -connection master; - - --echo End of 5.1 tests +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_temporary_errors.test b/mysql-test/suite/rpl/t/rpl_temporary_errors.test index f05cf73c6ed..46c5817c9a3 100644 --- a/mysql-test/suite/rpl/t/rpl_temporary_errors.test +++ b/mysql-test/suite/rpl/t/rpl_temporary_errors.test @@ -26,8 +26,9 @@ set @@global.slave_exec_mode= default; SHOW STATUS LIKE 'Slave_retried_transactions'; SELECT * FROM t1; source include/check_slave_is_running.inc; -DROP TABLE t1; --echo **** On Master **** connection master; DROP TABLE t1; + +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_test_framework.cnf b/mysql-test/suite/rpl/t/rpl_test_framework.cnf new file mode 100644 index 00000000000..8934d1c9ae1 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_test_framework.cnf @@ -0,0 +1,46 @@ +!include ../my.cnf +[mysqld.1] +log-slave-updates +[mysqld.2] +log-slave-updates +[mysqld.3] +log-slave-updates +[mysqld.4] +log-slave-updates +[mysqld.5] +log-slave-updates +[mysqld.6] +log-slave-updates +[mysqld.7] +log-slave-updates +[mysqld.8] +log-slave-updates +[mysqld.9] +log-slave-updates +#[mysqld.10] +#log-slave-updates +#[mysqld.11] +#log-slave-updates +#[mysqld.12] +#log-slave-updates +#[mysqld.13] +#log-slave-updates +#[mysqld.14] +#log-slave-updates +#[mysqld.15] +#log-slave-updates + +[ENV] +SERVER_MYPORT_3= @mysqld.3.port +SERVER_MYPORT_4= @mysqld.4.port +SERVER_MYPORT_5= @mysqld.5.port +SERVER_MYPORT_6= @mysqld.6.port +SERVER_MYPORT_7= @mysqld.7.port +SERVER_MYPORT_8= @mysqld.8.port +SERVER_MYPORT_9= @mysqld.9.port +#SERVER_MYPORT_10= @mysqld.10.port +#SERVER_MYPORT_11= @mysqld.11.port +#SERVER_MYPORT_12= @mysqld.12.port +#SERVER_MYPORT_13= @mysqld.13.port +#SERVER_MYPORT_14= @mysqld.14.port +#SERVER_MYPORT_15= @mysqld.15.port diff --git a/mysql-test/suite/rpl/t/rpl_test_framework.test b/mysql-test/suite/rpl/t/rpl_test_framework.test new file mode 100644 index 00000000000..e0f961caff1 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_test_framework.test @@ -0,0 +1,143 @@ +# ==== Purpose ==== +# +# Test that the sync chain generated by +# include/rpl_change_topology.inc (sourced from include/rpl_init.inc) +# is correct. +# +# We test a number of different topologies. Each topology is tested +# in extra/rpl_tests/rpl_test_framework.inc. See +# extra/rpl_tests/rpl_test_framework.inc for details on how the sync +# chain is tested. +# +# ==== Related bugs ==== +# +# BUG#49978: Replication tests don't clean up replication state at the end + + +# We only need to execute this test once. Also, we rely on 'DELETE +# FROM t1' to remove rows in slave tables that don't exist in master +# tables (see include/rpl_test_framework.inc for details). +--source include/have_binlog_format_statement.inc + + +--echo ==== Create t1 on all servers. ==== +if ($mtr_supports_more_than_10_servers) +{ + --let $rpl_server_count= 15 + --let $rpl_topology= 1->2->3->4->5->6->7->8->9->10->11->12->13->14->15 +} +if (!$mtr_supports_more_than_10_servers) +{ + --let $rpl_server_count= 9 + --let $rpl_topology= 1->2->3->4->5->6->7->8->9 +} +--source include/rpl_init.inc +CREATE TABLE t1 (a INT); +--source include/rpl_end.inc + +# Initialize $next_number before first call to +# extra/rpl_tests/rpl_test_framework.text +--let $next_number= 0 + + +--echo ==== Test 3-server topologies ==== + +--let $rpl_server_count= 3 + +--let $rpl_topology= 1 -> 2 +--let $masters= 1,3 +--source extra/rpl_tests/rpl_test_framework.inc + +--let $rpl_topology= 2 -> 3 +--let $masters= 1,2 +--source extra/rpl_tests/rpl_test_framework.inc + +--let $rpl_topology= none +--let $masters= 1,2,3 +--source extra/rpl_tests/rpl_test_framework.inc + +--let $rpl_topology= 1->2, 2->1 +--let $masters= 1,3 +--source extra/rpl_tests/rpl_test_framework.inc + +--let $rpl_topology= 1->2->1 +--let $masters= 2,3 +--source extra/rpl_tests/rpl_test_framework.inc + +--let $rpl_topology= 2->1->2 +--let $masters= 1,3 +--source extra/rpl_tests/rpl_test_framework.inc + +--let $rpl_topology= 1->2->3 +--let $masters= 1 +--source extra/rpl_tests/rpl_test_framework.inc + +--let $rpl_topology= 2->3->2->1 +--let $masters= 3 +--source extra/rpl_tests/rpl_test_framework.inc + +--let $rpl_topology= 1->2,2->3,3->1 +--let $masters= 3 +--source extra/rpl_tests/rpl_test_framework.inc + +--let $rpl_topology= 1->3->2->1 +--let $masters= 3 +--source extra/rpl_tests/rpl_test_framework.inc + + +--echo ==== Test 6-server topologies ==== + +--let $rpl_server_count= 6 + +--let $rpl_topology= 1->2->3->4->1->5->6 +--let $masters= 1 +--source extra/rpl_tests/rpl_test_framework.inc + +--let $rpl_topology= 3->4->5->6->3->1->2 +--let $masters= 4 +--source extra/rpl_tests/rpl_test_framework.inc + +--let $rpl_topology= 6->5->4->3->2->1 +--let $masters= 6 +--source extra/rpl_tests/rpl_test_framework.inc + +--let $rpl_topology= 1->2->3->1,4->5->6 +--let $masters= 3,4 +--source extra/rpl_tests/rpl_test_framework.inc + + +--echo ==== Test 9-server topology ==== + +--let $rpl_server_count= 9 + +--let $rpl_topology= 1->2, 2->3, 3->4, 4->5, 5->1, 1->6, 6->7, 6->8, 8->9 +--let $masters= 2 +--source extra/rpl_tests/rpl_test_framework.inc + +if ($mtr_supports_more_than_10_servers) { +--echo ==== Test 15-server topologies ==== + +--let $rpl_server_count= 15 + +--let $rpl_topology= 1->2->3->4->5->6->7->8->9->10->11->12->13->14->15->1 +--let $masters= 2 +--source extra/rpl_tests/rpl_test_framework.inc + +# This is a binary tree +--let $rpl_topology= 1->2->4->8,1->3->6->12,2->5->10,3->7->14,4->9,5->11,6->13,7->15 +--let $masters= 1 +--source extra/rpl_tests/rpl_test_framework.inc +} + +--echo ==== Clean up ==== + +if ($mtr_supports_more_than_10_servers) { + --let $rpl_topology= 1->2->3->4->5->6->7->8->9->10->11->12->13->14->15 +} +if (!$mtr_supports_more_than_10_servers) { + --let $rpl_topology= 1->2->3->4->5->6->7->8->9 +} +--source include/rpl_init.inc +--connection server_1 +DROP TABLE t1; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_timezone.test b/mysql-test/suite/rpl/t/rpl_timezone.test index 1b380062dd7..7355106b6b4 100644 --- a/mysql-test/suite/rpl/t/rpl_timezone.test +++ b/mysql-test/suite/rpl/t/rpl_timezone.test @@ -168,6 +168,8 @@ SET @@session.time_zone = default; connection master; DROP TABLE t1; SET @@session.time_zone = default; +--sync_slave_with_master +--source include/stop_slave.inc # Bug#41719 delayed INSERT into timestamp col needs set time_zone for concurrent binlogging # To test that time_zone is correctly binloging for 'insert delayed' statement @@ -200,4 +202,7 @@ select * from t1 order by a; DROP TABLE t1; SET @@session.time_zone = default; +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc + --echo End of 5.0 tests diff --git a/mysql-test/suite/rpl/t/rpl_tmp_table_and_DDL.test b/mysql-test/suite/rpl/t/rpl_tmp_table_and_DDL.test index b30548d0e45..aa22b23925c 100644 --- a/mysql-test/suite/rpl/t/rpl_tmp_table_and_DDL.test +++ b/mysql-test/suite/rpl/t/rpl_tmp_table_and_DDL.test @@ -20,6 +20,7 @@ sync_slave_with_master; # to stop. # +--connection master --disable_abort_on_error CREATE TABLE t1 (a CHAR(30)); @@ -155,5 +156,4 @@ DROP PROCEDURE p2; DROP EVENT e2; DROP TABLE t1, t2; ---source include/master-slave-end.inc - +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_trigger.test b/mysql-test/suite/rpl/t/rpl_trigger.test index 6575816662a..0ef6fdbbda8 100644 --- a/mysql-test/suite/rpl/t/rpl_trigger.test +++ b/mysql-test/suite/rpl/t/rpl_trigger.test @@ -314,20 +314,19 @@ let $MYSQLD_DATADIR= `select @@datadir`; FLUSH LOGS; # Stop master server ---echo --> Stop master server ---exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect ---shutdown_server 10 ---source include/wait_until_disconnected.inc +--let $rpl_server_number= 1 +--source include/rpl_stop_server.inc + # Replace binlog remove_file $MYSQLD_DATADIR/master-bin.000001; copy_file $MYSQL_TEST_DIR/std_data/bug16266.000001 $MYSQLD_DATADIR/master-bin.000001; - ---echo --> Start master server ---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect ---enable_reconnect ---source include/wait_until_connected_again.inc + +--let $rpl_server_number= 1 +--source include/rpl_start_server.inc + let $binlog_version= query_get_value(SHOW BINLOG EVENTS, Info, 1); + # Make the slave to replay the new binlog. --echo --> Master binlog: $binlog_version @@ -503,7 +502,8 @@ sync_slave_with_master; # connection master; -source include/master-slave-reset.inc; +--source include/rpl_reset.inc + source include/have_innodb.inc; connection slave; source include/have_innodb.inc; @@ -522,12 +522,10 @@ insert into t1 values ( 1 ); rollback; sync_slave_with_master; -let $diff_table_1=master:test.t1; -let $diff_table_2=slave:test.t1; +let $diff_tables= master:t1, slave:t1; --source include/diff_tables.inc -let $diff_table_1=master:test.log; -let $diff_table_2=slave:test.log; +let $diff_tables= master:log, slave:log; --source include/diff_tables.inc connection master; @@ -537,3 +535,4 @@ sync_slave_with_master; # # End of tests # +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_trunc_temp.test b/mysql-test/suite/rpl/t/rpl_trunc_temp.test index 88ecb7c18b0..0e7d5483f62 100644 --- a/mysql-test/suite/rpl/t/rpl_trunc_temp.test +++ b/mysql-test/suite/rpl/t/rpl_trunc_temp.test @@ -52,3 +52,6 @@ let $wait_binlog_event= DROP; source include/wait_for_binlog_event.inc; show status like 'Slave_open_temp_tables'; + + +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_truncate_2myisam.test b/mysql-test/suite/rpl/t/rpl_truncate_2myisam.test index a0f0ea04f44..bea6332963e 100644 --- a/mysql-test/suite/rpl/t/rpl_truncate_2myisam.test +++ b/mysql-test/suite/rpl/t/rpl_truncate_2myisam.test @@ -1,4 +1,3 @@ --source include/not_ndb_default.inc let $engine=MyISAM; --source extra/rpl_tests/rpl_truncate.test - diff --git a/mysql-test/suite/rpl/t/rpl_truncate_3innodb.test b/mysql-test/suite/rpl/t/rpl_truncate_3innodb.test index a31fd62a29a..093cf56a316 100644 --- a/mysql-test/suite/rpl/t/rpl_truncate_3innodb.test +++ b/mysql-test/suite/rpl/t/rpl_truncate_3innodb.test @@ -1,6 +1,4 @@ - --source include/have_innodb.inc --source include/not_ndb_default.inc - let $engine=InnoDB; --source extra/rpl_tests/rpl_truncate.test diff --git a/mysql-test/suite/rpl/t/rpl_typeconv.test b/mysql-test/suite/rpl/t/rpl_typeconv.test index 2a6a3f3b33d..c15207addf9 100644 --- a/mysql-test/suite/rpl/t/rpl_typeconv.test +++ b/mysql-test/suite/rpl/t/rpl_typeconv.test @@ -67,3 +67,4 @@ sync_slave_with_master; set global slave_type_conversions = @saved_slave_type_conversions; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_typeconv_innodb.test b/mysql-test/suite/rpl/t/rpl_typeconv_innodb.test index 729a622348f..ba2172106b6 100644 --- a/mysql-test/suite/rpl/t/rpl_typeconv_innodb.test +++ b/mysql-test/suite/rpl/t/rpl_typeconv_innodb.test @@ -6,8 +6,6 @@ # BUG#49618: Field length stored incorrectly in binary log for InnoDB # -source include/reset_master_and_slave.inc; - connection slave; SET @saved_slave_type_conversions = @@GLOBAL.SLAVE_TYPE_CONVERSIONS; SET GLOBAL SLAVE_TYPE_CONVERSIONS = ''; @@ -17,13 +15,12 @@ CREATE TABLE t1(b1 BIT(1), b2 BIT(2), b3 BIT(3)) ENGINE=InnoDB; INSERT INTO t1 VALUES (b'0', b'01', b'101'); sync_slave_with_master; -let $diff_table_1=master:test.t1; -let $diff_table_2=slave:test.t1; +let $diff_tables= master:t1, slave:t1; source include/diff_tables.inc; connection master; DROP TABLE t1; sync_slave_with_master; -connection slave; SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_udf.test b/mysql-test/suite/rpl/t/rpl_udf.test index b52fea144ba..8643654f2a1 100644 --- a/mysql-test/suite/rpl/t/rpl_udf.test +++ b/mysql-test/suite/rpl/t/rpl_udf.test @@ -13,3 +13,5 @@ enable_query_log; let $engine_type= MyISAM; --source include/rpl_udf.inc + +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_user.test b/mysql-test/suite/rpl/t/rpl_user.test index b8fe41d03c4..caa17b47733 100644 --- a/mysql-test/suite/rpl/t/rpl_user.test +++ b/mysql-test/suite/rpl/t/rpl_user.test @@ -59,3 +59,4 @@ select Host,User from mysql.user where Host='fakehost'; # connection master; source include/show_binlog_events.inc; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_user_variables.test b/mysql-test/suite/rpl/t/rpl_user_variables.test index 915bcb9ae65..dd6ddf39580 100644 --- a/mysql-test/suite/rpl/t/rpl_user_variables.test +++ b/mysql-test/suite/rpl/t/rpl_user_variables.test @@ -381,4 +381,5 @@ DROP FUNCTION f2; DROP TABLE t1; sync_slave_with_master; -stop slave; + +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_variables.test b/mysql-test/suite/rpl/t/rpl_variables.test index 6c3b3ab6d8a..c3a6f6e273e 100644 --- a/mysql-test/suite/rpl/t/rpl_variables.test +++ b/mysql-test/suite/rpl/t/rpl_variables.test @@ -109,14 +109,11 @@ SET @user_text = 'Alunda'; # Stop slave so that we get a fresh sql thread, reading the slave's # global values of variables into its local copies. ---echo [on master] -connection master; -source include/reset_master_and_slave.inc; +--source include/stop_slave.inc +--source include/start_slave.inc # We would have wanted to set this together with the other variables # above, but can't because it affects how the slave works. ---echo [on slave] -connection slave; SET @@global.init_slave = 'SELECT 1'; @@ -674,35 +671,19 @@ EXECUTE p49; EXECUTE p50; EXECUTE p51; EXECUTE p52; EXECUTE p53; EXECUTE p54; EXECUTE p55; EXECUTE p56; EXECUTE p57; EXECUTE p58; EXECUTE p59; EXECUTE p60; EXECUTE p61; EXECUTE p62; EXECUTE p63; EXECUTE p64; +--sync_slave_with_master +--connection master + --echo ==== Results ==== # Show the result in table test.tstmt on master... SELECT * FROM tstmt ORDER BY id; -let $diff_table_1=master:test.tstmt; -# ... then compare test.tstmt on master to the other tables on master... -let $diff_table_2=master:test.tproc; -source include/diff_tables.inc; -let $diff_table_2=master:test.tfunc; -source include/diff_tables.inc; -let $diff_table_2=master:test.ttrig; -source include/diff_tables.inc; -let $diff_table_2=master:test.tprep; -source include/diff_tables.inc; +--sync_slave_with_master -# ... and to all tables on slave. -connection master; -sync_slave_with_master; -let $diff_table_2=slave:test.tstmt; -source include/diff_tables.inc; -let $diff_table_2=slave:test.tproc; -source include/diff_tables.inc; -let $diff_table_2=slave:test.tfunc; -source include/diff_tables.inc; -let $diff_table_2=slave:test.ttrig; -source include/diff_tables.inc; -let $diff_table_2=slave:test.tprep; +# ... then compare test.tstmt on master to the other tables on master and slave. +let $diff_tables= master:tstmt, master:tproc, master:tfunc, master:ttrig, master:tprep, slave:tstmt, slave:tproc, slave:tfunc, slave:ttrig, slave:tprep; source include/diff_tables.inc; @@ -737,3 +718,4 @@ SET @@global.sync_binlog= @s_sync_binlog; connection master; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_variables_stm.test b/mysql-test/suite/rpl/t/rpl_variables_stm.test index 9e9bff03830..8943585bc1d 100644 --- a/mysql-test/suite/rpl/t/rpl_variables_stm.test +++ b/mysql-test/suite/rpl/t/rpl_variables_stm.test @@ -571,34 +571,19 @@ EXECUTE p49; EXECUTE p50; EXECUTE p51; EXECUTE p52; EXECUTE p53; EXECUTE p54; EXECUTE p55; EXECUTE p56; EXECUTE p57; EXECUTE p58; EXECUTE p59; EXECUTE p60; EXECUTE p61; EXECUTE p62; EXECUTE p63; EXECUTE p64; +--sync_slave_with_master +--connection master + --echo ==== Results ==== # Show the result in table test.tstmt on master... SELECT * FROM tstmt ORDER BY id; -let $diff_table_1=master:test.tstmt; -# ... then compare test.tstmt on master to the other tables on master... -let $diff_table_2=master:test.tproc; -source include/diff_tables.inc; -let $diff_table_2=master:test.tfunc; -source include/diff_tables.inc; -let $diff_table_2=master:test.ttrig; -source include/diff_tables.inc; -let $diff_table_2=master:test.tprep; -source include/diff_tables.inc; +--sync_slave_with_master -# ... and to all tables on slave. -sync_slave_with_master; -let $diff_table_2=slave:test.tstmt; -source include/diff_tables.inc; -let $diff_table_2=slave:test.tproc; -source include/diff_tables.inc; -let $diff_table_2=slave:test.tfunc; -source include/diff_tables.inc; -let $diff_table_2=slave:test.ttrig; -source include/diff_tables.inc; -let $diff_table_2=slave:test.tprep; +# ... then compare test.tstmt on master to the other tables on master and slave. +let $diff_tables= master:tstmt, master:tproc, master:tfunc, master:ttrig, master:tprep, slave:tstmt, slave:tproc, slave:tfunc, slave:ttrig, slave:tprep; source include/diff_tables.inc; @@ -633,3 +618,4 @@ SET @@global.collation_database= @s_collation_database; connection master; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_view.test b/mysql-test/suite/rpl/t/rpl_view.test index 01b4dc5ef55..3f0052cd544 100644 --- a/mysql-test/suite/rpl/t/rpl_view.test +++ b/mysql-test/suite/rpl/t/rpl_view.test @@ -177,3 +177,4 @@ DROP TABLE t1; sync_slave_with_master; --echo End of 5.0 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_view_multi.test b/mysql-test/suite/rpl/t/rpl_view_multi.test index 5b3e7cf76f8..22509f8e4fc 100644 --- a/mysql-test/suite/rpl/t/rpl_view_multi.test +++ b/mysql-test/suite/rpl/t/rpl_view_multi.test @@ -143,3 +143,4 @@ drop table t1, t2; drop view v1; --echo # Syncing slave with master and switching to connection 'slave' --sync_slave_with_master +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/combinations b/mysql-test/suite/rpl_ndb/combinations deleted file mode 100644 index 75712d234e1..00000000000 --- a/mysql-test/suite/rpl_ndb/combinations +++ /dev/null @@ -1,5 +0,0 @@ -[row] -binlog-format=row - -[mix] -binlog-format=mixed diff --git a/mysql-test/suite/rpl_ndb/my.cnf b/mysql-test/suite/rpl_ndb/my.cnf deleted file mode 100644 index 0c62988b220..00000000000 --- a/mysql-test/suite/rpl_ndb/my.cnf +++ /dev/null @@ -1,70 +0,0 @@ -!include include/default_mysqld.cnf -!include include/default_ndbd.cnf -!include include/default_client.cnf - -[cluster_config.1] -NoOfReplicas= 2 -ndbd=, -ndb_mgmd= -mysqld=, - -[cluster_config.slave] -NoOfReplicas= 1 -ndbd= -ndb_mgmd= -mysqld= - -[mysqld] -# Make all mysqlds use cluster -ndbcluster -# Turn on bin logging -log-bin= master-bin -# Cluster only supports row format -binlog-format= row - -[mysqld.1.1] - -[mysqld.1.1] - -[mysqld.1.slave] - -# Append -slave.opt file to the list of argument used when -# starting the mysqld -#!use-slave-opt - -log-bin= slave-bin -relay-log= slave-relay-bin -# Cluster only supports row format -binlog-format= row - -init-rpl-role= slave -log-slave-updates -master-retry-count= 10 - -# Values reported by slave when it connect to master -# and shows up in SHOW SLAVE STATUS; -report-host= 127.0.0.1 -report-port= @mysqld.1.slave.port -report-user= root - -loose-skip-innodb -skip-slave-start - -# Directory where slaves find the dumps generated by "load data" -# on the server. The path need to have constant length otherwise -# test results will vary, thus a relative path is used. -slave-load-tmpdir= ../../../tmp - -rpl-recovery-rank= @mysqld.1.slave.server-id - - -[ENV] -NDB_CONNECTSTRING= @mysql_cluster.1.ndb_connectstring -MASTER_MYPORT= @mysqld.1.1.port -MASTER_MYPORT1= @mysqld.2.1.port - -NDB_CONNECTSTRING_SLAVE= @mysql_cluster.slave.ndb_connectstring -SLAVE_MYPORT= @mysqld.1.slave.port -SLAVE_MYSOCK= @mysqld.1.slave.socket - -NDB_BACKUP_DIR= @cluster_config.ndbd.1.1.BackupDataDir diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_2innodb.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_2innodb.result deleted file mode 100644 index b4e6c7c77b5..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_2innodb.result +++ /dev/null @@ -1,928 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -set @@global.slave_exec_mode= 'IDEMPOTENT'; -CREATE TABLE mysql.ndb_apply_status -( server_id INT UNSIGNED NOT NULL, -epoch BIGINT UNSIGNED NOT NULL, -log_name VARCHAR(255) BINARY NOT NULL, -start_pos BIGINT UNSIGNED NOT NULL, -end_pos BIGINT UNSIGNED NOT NULL, -PRIMARY KEY USING HASH (server_id)) ENGINE=INNODB; ---- Doing pre test cleanup --- -DROP TABLE IF EXISTS t1; ---- Start test 1 Basic testing --- ---- Create Table Section --- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), -bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE,PRIMARY KEY(id)); ---- Show table on master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 ---- Show table on slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly -- -ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(id, total); -ALTER TABLE t1 MODIFY vc TEXT; ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 ---- Make sure that our tables on slave are still same engine --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- End test 1 Basic testing --- ---- Do Cleanup -- -DROP TABLE IF EXISTS t1; ---- Start test 2 partition RANGE testing -- ---- Do setup -- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), -bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE) -PARTITION BY RANGE (YEAR(t)) -(PARTITION p0 VALUES LESS THAN (1901), -PARTITION p1 VALUES LESS THAN (1946), -PARTITION p2 VALUES LESS THAN (1966), -PARTITION p3 VALUES LESS THAN (1986), -PARTITION p4 VALUES LESS THAN (2005), -PARTITION p5 VALUES LESS THAN MAXVALUE); ---- Show table on master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (YEAR(t)) -(PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster, - PARTITION p1 VALUES LESS THAN (1946) ENGINE = ndbcluster, - PARTITION p2 VALUES LESS THAN (1966) ENGINE = ndbcluster, - PARTITION p3 VALUES LESS THAN (1986) ENGINE = ndbcluster, - PARTITION p4 VALUES LESS THAN (2005) ENGINE = ndbcluster, - PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = ndbcluster) */ ---- Show table on slave -- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (YEAR(t)) -(PARTITION p0 VALUES LESS THAN (1901) ENGINE = InnoDB, - PARTITION p1 VALUES LESS THAN (1946) ENGINE = InnoDB, - PARTITION p2 VALUES LESS THAN (1966) ENGINE = InnoDB, - PARTITION p3 VALUES LESS THAN (1986) ENGINE = InnoDB, - PARTITION p4 VALUES LESS THAN (2005) ENGINE = InnoDB, - PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 ADD PRIMARY KEY(t,id); -ALTER TABLE t1 MODIFY vc TEXT; ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date NOT NULL DEFAULT '0000-00-00', - PRIMARY KEY (`t`,`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (YEAR(t)) -(PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster, - PARTITION p1 VALUES LESS THAN (1946) ENGINE = ndbcluster, - PARTITION p2 VALUES LESS THAN (1966) ENGINE = ndbcluster, - PARTITION p3 VALUES LESS THAN (1986) ENGINE = ndbcluster, - PARTITION p4 VALUES LESS THAN (2005) ENGINE = ndbcluster, - PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = ndbcluster) */ ---- Make sure that our tables on slave are still same engine --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date NOT NULL DEFAULT '0000-00-00', - PRIMARY KEY (`t`,`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (YEAR(t)) -(PARTITION p0 VALUES LESS THAN (1901) ENGINE = InnoDB, - PARTITION p1 VALUES LESS THAN (1946) ENGINE = InnoDB, - PARTITION p2 VALUES LESS THAN (1966) ENGINE = InnoDB, - PARTITION p3 VALUES LESS THAN (1986) ENGINE = InnoDB, - PARTITION p4 VALUES LESS THAN (2005) ENGINE = InnoDB, - PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- End test 2 partition RANGE testing --- ---- Do Cleanup --- -DROP TABLE IF EXISTS t1; ---- Start test 3 partition LIST testing --- ---- Do setup --- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), -bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE) -PARTITION BY LIST(id) -(PARTITION p0 VALUES IN (2, 4), -PARTITION p1 VALUES IN (42, 142)); ---- Test 3 Alter to add partition --- -ALTER TABLE t1 ADD PARTITION (PARTITION p2 VALUES IN (412)); ---- Show table on master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (id) -(PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (42,142) ENGINE = ndbcluster, - PARTITION p2 VALUES IN (412) ENGINE = ndbcluster) */ ---- Show table on slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (id) -(PARTITION p0 VALUES IN (2,4) ENGINE = InnoDB, - PARTITION p1 VALUES IN (42,142) ENGINE = InnoDB, - PARTITION p2 VALUES IN (412) ENGINE = InnoDB) */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 ADD PRIMARY KEY(id); -ALTER TABLE t1 MODIFY vc TEXT; ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (id) -(PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (42,142) ENGINE = ndbcluster, - PARTITION p2 VALUES IN (412) ENGINE = ndbcluster) */ ---- Make sure that our tables on slave are still same engine --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (id) -(PARTITION p0 VALUES IN (2,4) ENGINE = InnoDB, - PARTITION p1 VALUES IN (42,142) ENGINE = InnoDB, - PARTITION p2 VALUES IN (412) ENGINE = InnoDB) */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- End test 3 partition LIST testing --- ---- Do Cleanup -- -DROP TABLE IF EXISTS t1; ---- Start test 4 partition HASH testing --- ---- Do setup --- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), -bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE) -PARTITION BY HASH( YEAR(t) ) -PARTITIONS 4; ---- show that tables have been created correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH ( YEAR(t)) -PARTITIONS 4 */ -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH ( YEAR(t)) -PARTITIONS 4 */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 ADD PRIMARY KEY(t,id); -ALTER TABLE t1 MODIFY vc TEXT; ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date NOT NULL DEFAULT '0000-00-00', - PRIMARY KEY (`t`,`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH ( YEAR(t)) -PARTITIONS 4 */ ---- Make sure that our tables on slave are still same engine --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date NOT NULL DEFAULT '0000-00-00', - PRIMARY KEY (`t`,`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH ( YEAR(t)) -PARTITIONS 4 */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- End test 4 partition HASH testing --- ---- Do Cleanup -- -DROP TABLE IF EXISTS t1; ---- Start test 5 partition by key testing --- ---- Create Table Section --- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), -bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE,PRIMARY KEY(id)) -PARTITION BY KEY() -PARTITIONS 4; ---- Show that tables on master are ndbcluster tables --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY () -PARTITIONS 4 */ ---- Show that tables on slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY () -PARTITIONS 4 */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(id, total); ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY () -PARTITIONS 4 */ ---- Make sure that our tables on slave are still right type --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY () -PARTITIONS 4 */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 MODIFY vc TEXT; ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY () -PARTITIONS 4 */ ---- Make sure that our tables on slave are still same engine --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY () -PARTITIONS 4 */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- End test 5 key partition testing --- ---- Do Cleanup --- -DROP TABLE IF EXISTS t1; -set @@global.slave_exec_mode= DEFAULT; -drop table mysql.ndb_apply_status; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_2myisam.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_2myisam.result deleted file mode 100644 index 935a7d61dfa..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_2myisam.result +++ /dev/null @@ -1,928 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -set @@global.slave_exec_mode= 'IDEMPOTENT'; -CREATE TABLE mysql.ndb_apply_status -( server_id INT UNSIGNED NOT NULL, -epoch BIGINT UNSIGNED NOT NULL, -log_name VARCHAR(255) BINARY NOT NULL, -start_pos BIGINT UNSIGNED NOT NULL, -end_pos BIGINT UNSIGNED NOT NULL, -PRIMARY KEY USING HASH (server_id)) ENGINE=MYISAM; ---- Doing pre test cleanup --- -DROP TABLE IF EXISTS t1; ---- Start test 1 Basic testing --- ---- Create Table Section --- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), -bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE,PRIMARY KEY(id)); ---- Show table on master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 ---- Show table on slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly -- -ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(id, total); -ALTER TABLE t1 MODIFY vc TEXT; ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 ---- Make sure that our tables on slave are still same engine --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- End test 1 Basic testing --- ---- Do Cleanup -- -DROP TABLE IF EXISTS t1; ---- Start test 2 partition RANGE testing -- ---- Do setup -- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), -bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE) -PARTITION BY RANGE (YEAR(t)) -(PARTITION p0 VALUES LESS THAN (1901), -PARTITION p1 VALUES LESS THAN (1946), -PARTITION p2 VALUES LESS THAN (1966), -PARTITION p3 VALUES LESS THAN (1986), -PARTITION p4 VALUES LESS THAN (2005), -PARTITION p5 VALUES LESS THAN MAXVALUE); ---- Show table on master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (YEAR(t)) -(PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster, - PARTITION p1 VALUES LESS THAN (1946) ENGINE = ndbcluster, - PARTITION p2 VALUES LESS THAN (1966) ENGINE = ndbcluster, - PARTITION p3 VALUES LESS THAN (1986) ENGINE = ndbcluster, - PARTITION p4 VALUES LESS THAN (2005) ENGINE = ndbcluster, - PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = ndbcluster) */ ---- Show table on slave -- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (YEAR(t)) -(PARTITION p0 VALUES LESS THAN (1901) ENGINE = MyISAM, - PARTITION p1 VALUES LESS THAN (1946) ENGINE = MyISAM, - PARTITION p2 VALUES LESS THAN (1966) ENGINE = MyISAM, - PARTITION p3 VALUES LESS THAN (1986) ENGINE = MyISAM, - PARTITION p4 VALUES LESS THAN (2005) ENGINE = MyISAM, - PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 ADD PRIMARY KEY(t,id); -ALTER TABLE t1 MODIFY vc TEXT; ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date NOT NULL DEFAULT '0000-00-00', - PRIMARY KEY (`t`,`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (YEAR(t)) -(PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster, - PARTITION p1 VALUES LESS THAN (1946) ENGINE = ndbcluster, - PARTITION p2 VALUES LESS THAN (1966) ENGINE = ndbcluster, - PARTITION p3 VALUES LESS THAN (1986) ENGINE = ndbcluster, - PARTITION p4 VALUES LESS THAN (2005) ENGINE = ndbcluster, - PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = ndbcluster) */ ---- Make sure that our tables on slave are still same engine --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date NOT NULL DEFAULT '0000-00-00', - PRIMARY KEY (`t`,`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (YEAR(t)) -(PARTITION p0 VALUES LESS THAN (1901) ENGINE = MyISAM, - PARTITION p1 VALUES LESS THAN (1946) ENGINE = MyISAM, - PARTITION p2 VALUES LESS THAN (1966) ENGINE = MyISAM, - PARTITION p3 VALUES LESS THAN (1986) ENGINE = MyISAM, - PARTITION p4 VALUES LESS THAN (2005) ENGINE = MyISAM, - PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- End test 2 partition RANGE testing --- ---- Do Cleanup --- -DROP TABLE IF EXISTS t1; ---- Start test 3 partition LIST testing --- ---- Do setup --- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), -bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE) -PARTITION BY LIST(id) -(PARTITION p0 VALUES IN (2, 4), -PARTITION p1 VALUES IN (42, 142)); ---- Test 3 Alter to add partition --- -ALTER TABLE t1 ADD PARTITION (PARTITION p2 VALUES IN (412)); ---- Show table on master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (id) -(PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (42,142) ENGINE = ndbcluster, - PARTITION p2 VALUES IN (412) ENGINE = ndbcluster) */ ---- Show table on slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (id) -(PARTITION p0 VALUES IN (2,4) ENGINE = MyISAM, - PARTITION p1 VALUES IN (42,142) ENGINE = MyISAM, - PARTITION p2 VALUES IN (412) ENGINE = MyISAM) */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 ADD PRIMARY KEY(id); -ALTER TABLE t1 MODIFY vc TEXT; ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (id) -(PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (42,142) ENGINE = ndbcluster, - PARTITION p2 VALUES IN (412) ENGINE = ndbcluster) */ ---- Make sure that our tables on slave are still same engine --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (id) -(PARTITION p0 VALUES IN (2,4) ENGINE = MyISAM, - PARTITION p1 VALUES IN (42,142) ENGINE = MyISAM, - PARTITION p2 VALUES IN (412) ENGINE = MyISAM) */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- End test 3 partition LIST testing --- ---- Do Cleanup -- -DROP TABLE IF EXISTS t1; ---- Start test 4 partition HASH testing --- ---- Do setup --- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), -bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE) -PARTITION BY HASH( YEAR(t) ) -PARTITIONS 4; ---- show that tables have been created correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH ( YEAR(t)) -PARTITIONS 4 */ -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH ( YEAR(t)) -PARTITIONS 4 */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 ADD PRIMARY KEY(t,id); -ALTER TABLE t1 MODIFY vc TEXT; ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date NOT NULL DEFAULT '0000-00-00', - PRIMARY KEY (`t`,`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH ( YEAR(t)) -PARTITIONS 4 */ ---- Make sure that our tables on slave are still same engine --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date NOT NULL DEFAULT '0000-00-00', - PRIMARY KEY (`t`,`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH ( YEAR(t)) -PARTITIONS 4 */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- End test 4 partition HASH testing --- ---- Do Cleanup -- -DROP TABLE IF EXISTS t1; ---- Start test 5 partition by key testing --- ---- Create Table Section --- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), -bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE,PRIMARY KEY(id)) -PARTITION BY KEY() -PARTITIONS 4; ---- Show that tables on master are ndbcluster tables --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY () -PARTITIONS 4 */ ---- Show that tables on slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY () -PARTITIONS 4 */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(id, total); ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY () -PARTITIONS 4 */ ---- Make sure that our tables on slave are still right type --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY () -PARTITIONS 4 */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 MODIFY vc TEXT; ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY () -PARTITIONS 4 */ ---- Make sure that our tables on slave are still same engine --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY () -PARTITIONS 4 */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- End test 5 key partition testing --- ---- Do Cleanup --- -DROP TABLE IF EXISTS t1; -set @@global.slave_exec_mode= DEFAULT; -drop table mysql.ndb_apply_status; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_2ndb.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_2ndb.result deleted file mode 100644 index 12882b28254..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_2ndb.result +++ /dev/null @@ -1,400 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -SET storage_engine=ndb; - -=== NDB -> NDB === - ---- Doing pre test cleanup --- -DROP TABLE IF EXISTS t1; ---- Create Table Section --- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, -b1 INT, -vc VARCHAR(255), -bc CHAR(255), -d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, -total BIGINT UNSIGNED, -y YEAR, -t DATE, -PRIMARY KEY(id)); ---- Show table on master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` int(11) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 ---- Show table on slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` int(11) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -STOP SLAVE; -RESET SLAVE; -RESET MASTER; -START SLAVE; ---- Populate t1 with data --- ---- Select from t1 on master --- -select * -from t1 -order by id; -id b1 vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select * -from t1 -order by id; -id b1 vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Perform basic operation on master --- ---- and ensure replicated correctly --- ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, bc='updated', t="2006-02-22" -WHERE id < 100 -ORDER BY id; ---- Check the update on master --- -SELECT * -FROM t1 -WHERE id < 100 -ORDER BY id; -id b1 vc bc d f total y t -2 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -4 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -42 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT * -FROM t1 -WHERE id < 100 -ORDER BY id; -id b1 vc bc d f total y t -2 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -4 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -42 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 412; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -TRUNCATE TABLE t1; ---- Check that simple Alter statements are replicated correctly -- -ALTER TABLE t1 DROP PRIMARY KEY; -ALTER TABLE t1 MODIFY vc char(32); ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` int(11) DEFAULT NULL, - `vc` char(32) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 ---- Make sure that our tables on slave are still same engine --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` int(11) DEFAULT NULL, - `vc` char(32) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -STOP SLAVE; -RESET SLAVE; -RESET MASTER; -START SLAVE; ---- Populate t1 with data --- ---- Select from t1 on master --- -select * -from t1 -order by id; -id b1 vc bc d f total y t -2 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select * -from t1 -order by id; -id b1 vc bc d f total y t -2 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Perform basic operation on master --- ---- and ensure replicated correctly --- ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, bc='updated', t="2006-02-22" -WHERE id < 100 -ORDER BY id; ---- Check the update on master --- -SELECT * -FROM t1 -WHERE id < 100 -ORDER BY id; -id b1 vc bc d f total y t -2 0 Testing MySQL databases is a coo updated 654321.4321 15.21 0 1965 2006-02-22 -4 0 Testing MySQL databases is a coo updated 654321.4321 15.21 0 1965 2006-02-22 -42 0 Testing MySQL databases is a coo updated 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT * -FROM t1 -WHERE id < 100 -ORDER BY id; -id b1 vc bc d f total y t -2 0 Testing MySQL databases is a coo updated 654321.4321 15.21 0 1965 2006-02-22 -4 0 Testing MySQL databases is a coo updated 654321.4321 15.21 0 1965 2006-02-22 -42 0 Testing MySQL databases is a coo updated 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 412; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -TRUNCATE TABLE t1; ---- Check that replication works when slave has more columns than master -ALTER TABLE t1 ADD PRIMARY KEY(id,total); -ALTER TABLE t1 MODIFY vc TEXT; -INSERT INTO t1 VALUES(3,1,'Testing MySQL databases is a cool ', -'Must make it bug free for the customer', -654321.4321,15.21,0,1965,"1905-11-14"); -INSERT INTO t1 VALUES(20,1,'Testing MySQL databases is a cool ', -'Must make it bug free for the customer', -654321.4321,15.21,0,1965,"1965-11-14"); -INSERT INTO t1 VALUES(50,1,'Testing MySQL databases is a cool ', -'Must make it bug free for the customer', -654321.4321,15.21,0,1965,"1985-11-14"); ---- Add columns on slave --- -ALTER TABLE t1 ADD (u int, v char(16) default 'default'); -UPDATE t1 SET u=7 WHERE id < 50; -UPDATE t1 SET v='explicit' WHERE id >10; ---- Show changed table on slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` int(11) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - `u` int(11) DEFAULT NULL, - `v` char(16) DEFAULT 'default', - PRIMARY KEY (`id`,`total`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -SELECT * -FROM t1 -ORDER BY id; -id b1 vc bc d f total y t u v -3 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 7 default -20 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 7 explicit -50 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 NULL explicit -STOP SLAVE; -RESET SLAVE; -RESET MASTER; -START SLAVE; ---- Populate t1 with data --- ---- Select from t1 on master --- -select * -from t1 -order by id; -id b1 vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -3 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -20 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -50 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select * -from t1 -order by id; -id b1 vc bc d f total y t u v -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 NULL NULL -3 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 7 default -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 NULL NULL -20 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 7 explicit -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 NULL NULL -50 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 NULL explicit -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 NULL NULL -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 NULL NULL ---- Perform basic operation on master --- ---- and ensure replicated correctly --- ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, bc='updated', t="2006-02-22" -WHERE id < 100 -ORDER BY id; ---- Check the update on master --- -SELECT * -FROM t1 -WHERE id < 100 -ORDER BY id; -id b1 vc bc d f total y t -2 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -3 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -4 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -20 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -42 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -50 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT * -FROM t1 -WHERE id < 100 -ORDER BY id; -id b1 vc bc d f total y t u v -2 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 NULL NULL -3 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 7 default -4 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 NULL NULL -20 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 7 explicit -42 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 NULL NULL -50 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 NULL explicit ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 412; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -7 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -7 -TRUNCATE TABLE t1; -TRUNCATE TABLE t1; ---- Check that replication works when master has more columns than slave ---- Remove columns on slave --- -ALTER TABLE t1 DROP COLUMN v; -ALTER TABLE t1 DROP COLUMN u; -ALTER TABLE t1 DROP COLUMN t; -ALTER TABLE t1 DROP COLUMN y; ---- Show changed table on slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` int(11) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - PRIMARY KEY (`id`,`total`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -STOP SLAVE; -RESET SLAVE; -RESET MASTER; -START SLAVE; ---- Populate t1 with data --- ---- Select from t1 on master --- -select * -from t1 -order by id; -id b1 vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select * -from t1 -order by id; -id b1 vc bc d f total -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 ---- Perform basic operation on master --- ---- and ensure replicated correctly --- ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, bc='updated', t="2006-02-22" -WHERE id < 100 -ORDER BY id; ---- Check the update on master --- -SELECT * -FROM t1 -WHERE id < 100 -ORDER BY id; -id b1 vc bc d f total y t -2 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -4 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -42 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT * -FROM t1 -WHERE id < 100 -ORDER BY id; -id b1 vc bc d f total -2 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 -4 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 -42 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 412; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -TRUNCATE TABLE t1; -TRUNCATE TABLE t1; ---- Do Cleanup -- -DROP TABLE IF EXISTS t1; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_2other.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_2other.result deleted file mode 100644 index 28ca1ac43b9..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_2other.result +++ /dev/null @@ -1,807 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -SET storage_engine=ndb; - -=== NDB -> MYISAM === - -set @old_slave_exec_mode= @@global.slave_exec_mode; -set @@global.slave_exec_mode= 'IDEMPOTENT'; -CREATE TABLE mysql.ndb_apply_status -( server_id INT UNSIGNED NOT NULL, -epoch BIGINT UNSIGNED NOT NULL, -log_name VARCHAR(255) BINARY NOT NULL, -start_pos BIGINT UNSIGNED NOT NULL, -end_pos BIGINT UNSIGNED NOT NULL, -PRIMARY KEY USING HASH (server_id)) ENGINE=MYISAM; -SET storage_engine=myisam; ---- Doing pre test cleanup --- -DROP TABLE IF EXISTS t1; ---- Create Table Section --- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, -b1 INT, -vc VARCHAR(255), -bc CHAR(255), -d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, -total BIGINT UNSIGNED, -y YEAR, -t DATE, -PRIMARY KEY(id)); ---- Show table on master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` int(11) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 ---- Show table on slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` int(11) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -STOP SLAVE; -RESET SLAVE; -RESET MASTER; -START SLAVE; ---- Populate t1 with data --- ---- Select from t1 on master --- -select * -from t1 -order by id; -id b1 vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select * -from t1 -order by id; -id b1 vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Perform basic operation on master --- ---- and ensure replicated correctly --- ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, bc='updated', t="2006-02-22" -WHERE id < 100 -ORDER BY id; ---- Check the update on master --- -SELECT * -FROM t1 -WHERE id < 100 -ORDER BY id; -id b1 vc bc d f total y t -2 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -4 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -42 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT * -FROM t1 -WHERE id < 100 -ORDER BY id; -id b1 vc bc d f total y t -2 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -4 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -42 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 412; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -TRUNCATE TABLE t1; ---- Check that simple Alter statements are replicated correctly -- -ALTER TABLE t1 DROP PRIMARY KEY; -ALTER TABLE t1 MODIFY vc char(32); ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` int(11) DEFAULT NULL, - `vc` char(32) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 ---- Make sure that our tables on slave are still same engine --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` int(11) DEFAULT NULL, - `vc` char(32) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -STOP SLAVE; -RESET SLAVE; -RESET MASTER; -START SLAVE; ---- Populate t1 with data --- ---- Select from t1 on master --- -select * -from t1 -order by id; -id b1 vc bc d f total y t -2 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select * -from t1 -order by id; -id b1 vc bc d f total y t -2 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Perform basic operation on master --- ---- and ensure replicated correctly --- ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, bc='updated', t="2006-02-22" -WHERE id < 100 -ORDER BY id; ---- Check the update on master --- -SELECT * -FROM t1 -WHERE id < 100 -ORDER BY id; -id b1 vc bc d f total y t -2 0 Testing MySQL databases is a coo updated 654321.4321 15.21 0 1965 2006-02-22 -4 0 Testing MySQL databases is a coo updated 654321.4321 15.21 0 1965 2006-02-22 -42 0 Testing MySQL databases is a coo updated 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT * -FROM t1 -WHERE id < 100 -ORDER BY id; -id b1 vc bc d f total y t -2 0 Testing MySQL databases is a coo updated 654321.4321 15.21 0 1965 2006-02-22 -4 0 Testing MySQL databases is a coo updated 654321.4321 15.21 0 1965 2006-02-22 -42 0 Testing MySQL databases is a coo updated 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 412; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -TRUNCATE TABLE t1; ---- Check that replication works when slave has more columns than master -ALTER TABLE t1 ADD PRIMARY KEY(id,total); -ALTER TABLE t1 MODIFY vc TEXT; -INSERT INTO t1 VALUES(3,1,'Testing MySQL databases is a cool ', -'Must make it bug free for the customer', -654321.4321,15.21,0,1965,"1905-11-14"); -INSERT INTO t1 VALUES(20,1,'Testing MySQL databases is a cool ', -'Must make it bug free for the customer', -654321.4321,15.21,0,1965,"1965-11-14"); -INSERT INTO t1 VALUES(50,1,'Testing MySQL databases is a cool ', -'Must make it bug free for the customer', -654321.4321,15.21,0,1965,"1985-11-14"); ---- Add columns on slave --- -ALTER TABLE t1 ADD (u int, v char(16) default 'default'); -UPDATE t1 SET u=7 WHERE id < 50; -UPDATE t1 SET v='explicit' WHERE id >10; ---- Show changed table on slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` int(11) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - `u` int(11) DEFAULT NULL, - `v` char(16) DEFAULT 'default', - PRIMARY KEY (`id`,`total`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -SELECT * -FROM t1 -ORDER BY id; -id b1 vc bc d f total y t u v -3 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 7 default -20 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 7 explicit -50 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 NULL explicit -STOP SLAVE; -RESET SLAVE; -RESET MASTER; -START SLAVE; ---- Populate t1 with data --- ---- Select from t1 on master --- -select * -from t1 -order by id; -id b1 vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -3 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -20 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -50 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select * -from t1 -order by id; -id b1 vc bc d f total y t u v -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 NULL default -3 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 7 default -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 NULL default -20 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 7 explicit -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 NULL default -50 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 NULL explicit -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 NULL default -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 NULL default ---- Perform basic operation on master --- ---- and ensure replicated correctly --- ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, bc='updated', t="2006-02-22" -WHERE id < 100 -ORDER BY id; ---- Check the update on master --- -SELECT * -FROM t1 -WHERE id < 100 -ORDER BY id; -id b1 vc bc d f total y t -2 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -3 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -4 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -20 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -42 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -50 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT * -FROM t1 -WHERE id < 100 -ORDER BY id; -id b1 vc bc d f total y t u v -2 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 NULL default -3 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 7 default -4 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 NULL default -20 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 7 explicit -42 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 NULL default -50 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 NULL explicit ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 412; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -7 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -7 -TRUNCATE TABLE t1; -TRUNCATE TABLE t1; ---- Check that replication works when master has more columns than slave ---- Remove columns on slave --- -ALTER TABLE t1 DROP COLUMN v; -ALTER TABLE t1 DROP COLUMN u; -ALTER TABLE t1 DROP COLUMN t; -ALTER TABLE t1 DROP COLUMN y; ---- Show changed table on slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` int(11) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - PRIMARY KEY (`id`,`total`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -STOP SLAVE; -RESET SLAVE; -RESET MASTER; -START SLAVE; ---- Populate t1 with data --- ---- Select from t1 on master --- -select * -from t1 -order by id; -id b1 vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select * -from t1 -order by id; -id b1 vc bc d f total -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 ---- Perform basic operation on master --- ---- and ensure replicated correctly --- ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, bc='updated', t="2006-02-22" -WHERE id < 100 -ORDER BY id; ---- Check the update on master --- -SELECT * -FROM t1 -WHERE id < 100 -ORDER BY id; -id b1 vc bc d f total y t -2 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -4 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -42 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT * -FROM t1 -WHERE id < 100 -ORDER BY id; -id b1 vc bc d f total -2 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 -4 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 -42 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 412; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -TRUNCATE TABLE t1; -TRUNCATE TABLE t1; ---- Do Cleanup -- -DROP TABLE IF EXISTS t1; - -=== NDB -> INNODB === - -alter table mysql.ndb_apply_status engine=innodb; -SET storage_engine=innodb; ---- Doing pre test cleanup --- -DROP TABLE IF EXISTS t1; ---- Create Table Section --- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, -b1 INT, -vc VARCHAR(255), -bc CHAR(255), -d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, -total BIGINT UNSIGNED, -y YEAR, -t DATE, -PRIMARY KEY(id)); ---- Show table on master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` int(11) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 ---- Show table on slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` int(11) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -STOP SLAVE; -RESET SLAVE; -RESET MASTER; -START SLAVE; ---- Populate t1 with data --- ---- Select from t1 on master --- -select * -from t1 -order by id; -id b1 vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select * -from t1 -order by id; -id b1 vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Perform basic operation on master --- ---- and ensure replicated correctly --- ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, bc='updated', t="2006-02-22" -WHERE id < 100 -ORDER BY id; ---- Check the update on master --- -SELECT * -FROM t1 -WHERE id < 100 -ORDER BY id; -id b1 vc bc d f total y t -2 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -4 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -42 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT * -FROM t1 -WHERE id < 100 -ORDER BY id; -id b1 vc bc d f total y t -2 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -4 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -42 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 412; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -TRUNCATE TABLE t1; ---- Check that simple Alter statements are replicated correctly -- -ALTER TABLE t1 DROP PRIMARY KEY; -ALTER TABLE t1 MODIFY vc char(32); ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` int(11) DEFAULT NULL, - `vc` char(32) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 ---- Make sure that our tables on slave are still same engine --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` int(11) DEFAULT NULL, - `vc` char(32) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -STOP SLAVE; -RESET SLAVE; -RESET MASTER; -START SLAVE; ---- Populate t1 with data --- ---- Select from t1 on master --- -select * -from t1 -order by id; -id b1 vc bc d f total y t -2 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select * -from t1 -order by id; -id b1 vc bc d f total y t -2 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Perform basic operation on master --- ---- and ensure replicated correctly --- ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, bc='updated', t="2006-02-22" -WHERE id < 100 -ORDER BY id; ---- Check the update on master --- -SELECT * -FROM t1 -WHERE id < 100 -ORDER BY id; -id b1 vc bc d f total y t -2 0 Testing MySQL databases is a coo updated 654321.4321 15.21 0 1965 2006-02-22 -4 0 Testing MySQL databases is a coo updated 654321.4321 15.21 0 1965 2006-02-22 -42 0 Testing MySQL databases is a coo updated 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT * -FROM t1 -WHERE id < 100 -ORDER BY id; -id b1 vc bc d f total y t -2 0 Testing MySQL databases is a coo updated 654321.4321 15.21 0 1965 2006-02-22 -4 0 Testing MySQL databases is a coo updated 654321.4321 15.21 0 1965 2006-02-22 -42 0 Testing MySQL databases is a coo updated 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 412; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -TRUNCATE TABLE t1; ---- Check that replication works when slave has more columns than master -ALTER TABLE t1 ADD PRIMARY KEY(id,total); -ALTER TABLE t1 MODIFY vc TEXT; -INSERT INTO t1 VALUES(3,1,'Testing MySQL databases is a cool ', -'Must make it bug free for the customer', -654321.4321,15.21,0,1965,"1905-11-14"); -INSERT INTO t1 VALUES(20,1,'Testing MySQL databases is a cool ', -'Must make it bug free for the customer', -654321.4321,15.21,0,1965,"1965-11-14"); -INSERT INTO t1 VALUES(50,1,'Testing MySQL databases is a cool ', -'Must make it bug free for the customer', -654321.4321,15.21,0,1965,"1985-11-14"); ---- Add columns on slave --- -ALTER TABLE t1 ADD (u int, v char(16) default 'default'); -UPDATE t1 SET u=7 WHERE id < 50; -UPDATE t1 SET v='explicit' WHERE id >10; ---- Show changed table on slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` int(11) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - `u` int(11) DEFAULT NULL, - `v` char(16) DEFAULT 'default', - PRIMARY KEY (`id`,`total`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -SELECT * -FROM t1 -ORDER BY id; -id b1 vc bc d f total y t u v -3 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 7 default -20 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 7 explicit -50 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 NULL explicit -STOP SLAVE; -RESET SLAVE; -RESET MASTER; -START SLAVE; ---- Populate t1 with data --- ---- Select from t1 on master --- -select * -from t1 -order by id; -id b1 vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -3 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -20 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -50 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select * -from t1 -order by id; -id b1 vc bc d f total y t u v -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 NULL default -3 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 7 default -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 NULL default -20 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 7 explicit -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 NULL default -50 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 NULL explicit -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 NULL default -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 NULL default ---- Perform basic operation on master --- ---- and ensure replicated correctly --- ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, bc='updated', t="2006-02-22" -WHERE id < 100 -ORDER BY id; ---- Check the update on master --- -SELECT * -FROM t1 -WHERE id < 100 -ORDER BY id; -id b1 vc bc d f total y t -2 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -3 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -4 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -20 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -42 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -50 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT * -FROM t1 -WHERE id < 100 -ORDER BY id; -id b1 vc bc d f total y t u v -2 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 NULL default -3 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 7 default -4 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 NULL default -20 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 7 explicit -42 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 NULL default -50 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 NULL explicit ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 412; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -7 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -7 -TRUNCATE TABLE t1; -TRUNCATE TABLE t1; ---- Check that replication works when master has more columns than slave ---- Remove columns on slave --- -ALTER TABLE t1 DROP COLUMN v; -ALTER TABLE t1 DROP COLUMN u; -ALTER TABLE t1 DROP COLUMN t; -ALTER TABLE t1 DROP COLUMN y; ---- Show changed table on slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` int(11) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - PRIMARY KEY (`id`,`total`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -STOP SLAVE; -RESET SLAVE; -RESET MASTER; -START SLAVE; ---- Populate t1 with data --- ---- Select from t1 on master --- -select * -from t1 -order by id; -id b1 vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select * -from t1 -order by id; -id b1 vc bc d f total -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 ---- Perform basic operation on master --- ---- and ensure replicated correctly --- ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, bc='updated', t="2006-02-22" -WHERE id < 100 -ORDER BY id; ---- Check the update on master --- -SELECT * -FROM t1 -WHERE id < 100 -ORDER BY id; -id b1 vc bc d f total y t -2 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -4 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -42 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT * -FROM t1 -WHERE id < 100 -ORDER BY id; -id b1 vc bc d f total -2 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 -4 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 -42 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 412; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -TRUNCATE TABLE t1; -TRUNCATE TABLE t1; ---- Do Cleanup -- -DROP TABLE IF EXISTS t1; -drop table mysql.ndb_apply_status; -set @@global.slave_exec_mode= @old_slave_exec_mode; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_UUID.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_UUID.result deleted file mode 100644 index 6babf49dcaa..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_UUID.result +++ /dev/null @@ -1,40 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -DROP PROCEDURE IF EXISTS test.p1; -DROP TABLE IF EXISTS test.t1; -CREATE TABLE test.t1 (a INT, blob_column LONGBLOB, vchar_column VARCHAR(100), PRIMARY KEY(a)) engine=NDB; -INSERT INTO test.t1 VALUES(1,UUID(),UUID()); -create procedure test.p1() -begin -INSERT INTO test.t1 VALUES(2,UUID(),UUID()); -INSERT INTO test.t1 VALUES(3,UUID(),UUID()); -end| -CALL test.p1(); -create function test.fn1(x int) -returns int -begin -insert into t1 values (4+x,UUID(),UUID()); -insert into t1 values (5+x,UUID(),UUID()); -return 0; -end| -select fn1(0); -fn1(0) -0 -create table t2 (a int) engine=NDB; -insert into t2 values(fn1(2)); -SHOW CREATE TABLE test.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) NOT NULL DEFAULT '0', - `blob_column` longblob, - `vchar_column` varchar(100) DEFAULT NULL, - PRIMARY KEY (`a`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -DROP PROCEDURE test.p1; -DROP FUNCTION test.fn1; -DROP TABLE test.t1; -DROP TABLE test.t2; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_apply_status.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_apply_status.result deleted file mode 100644 index 0fcd361da21..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_apply_status.result +++ /dev/null @@ -1,20 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -*** on slave there should be zero rows *** -select count(*) from mysql.ndb_apply_status; -count(*) -0 -create table t1 (a int key, b int) engine ndb; -insert into t1 values (1,1); -*** on master it should be empty *** -select * from mysql.ndb_apply_status; -server_id epoch log_name start_pos end_pos -*** on slave there should be one row *** -select count(*) from mysql.ndb_apply_status; -count(*) -1 -drop table t1; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_auto_inc.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_auto_inc.result deleted file mode 100644 index dd4cc90a75f..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_auto_inc.result +++ /dev/null @@ -1,170 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -***************** Test 1 ************************ - -CREATE TABLE t1 (a INT NOT NULL auto_increment,b INT, PRIMARY KEY (a)) ENGINE=NDB auto_increment=3; -insert into t1 values (NULL,1),(NULL,2),(NULL,3); -******* Select from Master ************* - -select * from t1 ORDER BY a; -a b -3 1 -4 2 -5 3 -******* Select from Slave ************* - -select * from t1 ORDER BY a; -a b -3 1 -4 2 -5 3 -drop table t1; -create table t1 (a int not null auto_increment,b int, primary key (a)) engine=NDB; -insert into t1 values (1,1),(NULL,2),(3,3),(NULL,4); -delete from t1 where b=4; -insert into t1 values (NULL,5),(NULL,6); -******* Select from Master ************* - -select * from t1 ORDER BY a; -a b -1 1 -2 2 -3 3 -5 5 -6 6 -******* Select from Slave ************* - -select * from t1 ORDER BY a; -a b -1 1 -2 2 -3 3 -5 5 -6 6 -drop table t1; -create table t1 (a int not null auto_increment, primary key (a)) engine=NDB; -insert into t1 values (NULL),(5),(NULL); -insert into t1 values (250),(NULL); -******* Select from Master ************* - -select * from t1 ORDER BY a; -a -1 -5 -6 -250 -251 -insert into t1 values (1000); -set @@insert_id=400; -insert into t1 values(NULL),(NULL); -******* Select from Master ************* - -select * from t1 ORDER BY a; -a -1 -5 -6 -250 -251 -400 -401 -1000 -******* Select from Slave ************* - -select * from t1 ORDER BY a; -a -1 -5 -6 -250 -251 -400 -401 -1000 -drop table t1; -create table t1 (a int not null auto_increment, primary key (a)) engine=NDB; -insert into t1 values (NULL),(5),(NULL),(NULL); -insert into t1 values (500),(NULL),(502),(NULL),(600); -******* Select from Master ************* - -select * from t1 ORDER BY a; -a -1 -5 -6 -7 -500 -501 -502 -503 -600 -set @@insert_id=600; -insert into t1 values(600),(NULL),(NULL); -ERROR 23000: Can't write; duplicate key in table 't1' -set @@insert_id=600; -insert ignore into t1 values(600),(NULL),(NULL),(610),(NULL); -******* Select from Master ************* - -select * from t1 ORDER BY a; -a -1 -5 -6 -7 -500 -501 -502 -503 -600 -610 -611 -******* Select from Slave ************* - -select * from t1 ORDER BY a; -a -1 -5 -6 -7 -500 -501 -502 -503 -600 -610 -611 -drop table t1; -create table t1 (a int not null auto_increment, primary key (a)) engine=NDB; -insert into t1 values(2),(12),(22),(32),(42); -insert into t1 values (NULL),(NULL); -insert into t1 values (3),(NULL),(NULL); -******* Select from Master ************* - -select * from t1 ORDER BY a; -a -1 -2 -3 -4 -5 -******* Select from Slave ************* - -** Slave should have 2, 12, 22, 32, 42 ** -** Master will have 2 but not 12, 22, 32, 42 ** - -select * from t1 ORDER BY a; -a -1 -2 -3 -4 -5 -12 -22 -32 -42 -drop table t1; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_bank.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_bank.result deleted file mode 100644 index 06c005427d1..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_bank.result +++ /dev/null @@ -1,120 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -CREATE DATABASE IF NOT EXISTS BANK; -DROP DATABASE BANK; -CREATE DATABASE BANK default charset=latin1 default collate=latin1_bin; -USE BANK; -CREATE TABLE GL ( TIME BIGINT UNSIGNED NOT NULL, -ACCOUNT_TYPE INT UNSIGNED NOT NULL, -BALANCE INT UNSIGNED NOT NULL, -DEPOSIT_COUNT INT UNSIGNED NOT NULL, -DEPOSIT_SUM INT UNSIGNED NOT NULL, -WITHDRAWAL_COUNT INT UNSIGNED NOT NULL, -WITHDRAWAL_SUM INT UNSIGNED NOT NULL, -PURGED INT UNSIGNED NOT NULL, -PRIMARY KEY USING HASH (TIME,ACCOUNT_TYPE)) -ENGINE = NDB; -CREATE TABLE ACCOUNT ( ACCOUNT_ID INT UNSIGNED NOT NULL, -OWNER INT UNSIGNED NOT NULL, -BALANCE INT UNSIGNED NOT NULL, -ACCOUNT_TYPE INT UNSIGNED NOT NULL, -PRIMARY KEY USING HASH (ACCOUNT_ID)) -ENGINE = NDB; -CREATE TABLE TRANSACTION ( TRANSACTION_ID BIGINT UNSIGNED NOT NULL, -ACCOUNT INT UNSIGNED NOT NULL, -ACCOUNT_TYPE INT UNSIGNED NOT NULL, -OTHER_ACCOUNT INT UNSIGNED NOT NULL, -TRANSACTION_TYPE INT UNSIGNED NOT NULL, -TIME BIGINT UNSIGNED NOT NULL, -AMOUNT INT UNSIGNED NOT NULL, -PRIMARY KEY USING HASH (TRANSACTION_ID,ACCOUNT)) -ENGINE = NDB; -CREATE TABLE SYSTEM_VALUES ( SYSTEM_VALUES_ID INT UNSIGNED NOT NULL, -VALUE BIGINT UNSIGNED NOT NULL, -PRIMARY KEY USING HASH (SYSTEM_VALUES_ID)) -ENGINE = NDB; -CREATE TABLE ACCOUNT_TYPE ( ACCOUNT_TYPE_ID INT UNSIGNED NOT NULL, -DESCRIPTION CHAR(64) NOT NULL, -PRIMARY KEY USING HASH (ACCOUNT_TYPE_ID)) -ENGINE = NDB; -STOP SLAVE; -RESET SLAVE; -CREATE DATABASE IF NOT EXISTS BANK; -DROP DATABASE BANK; -CREATE DATABASE BANK; -RESET MASTER; -CREATE TABLE IF NOT EXISTS mysql.backup_info (id INT, backup_id INT) ENGINE = HEAP; -DELETE FROM mysql.backup_info; -LOAD DATA INFILE '../tmp.dat' INTO TABLE mysql.backup_info FIELDS TERMINATED BY ','; -SELECT @the_backup_id:=backup_id FROM mysql.backup_info; -@the_backup_id:=backup_id - -SELECT @the_epoch:=MAX(epoch) FROM mysql.apply_status; -@the_epoch:=MAX(epoch) - -SELECT @the_pos:=Position,@the_file:=SUBSTRING_INDEX(FILE, '/', -1) -FROM mysql.binlog_index WHERE epoch > ORDER BY epoch ASC LIMIT 1; -@the_pos:=Position @the_file:=SUBSTRING_INDEX(FILE, '/', -1) - master-bin.000001 -CHANGE MASTER TO -master_log_file = 'master-bin.000001', -master_log_pos = ; -START SLAVE; -SHOW SLAVE STATUS; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master - 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 Yes Yes 0 0 None 0 No -STOP SLAVE; -START SLAVE; -SHOW SLAVE STATUS; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master - 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 Yes Yes 0 0 None 0 No -STOP SLAVE; -START SLAVE; -SHOW SLAVE STATUS; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master - 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 Yes Yes 0 0 None 0 No -STOP SLAVE; -START SLAVE; -SHOW SLAVE STATUS; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master - 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 Yes Yes 0 0 None 0 No -STOP SLAVE; -START SLAVE; -SHOW SLAVE STATUS; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master - 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 Yes Yes 0 0 None 0 No -STOP SLAVE; -START SLAVE; -SHOW SLAVE STATUS; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master - 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 Yes Yes 0 0 None 0 No -STOP SLAVE; -START SLAVE; -SHOW SLAVE STATUS; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master - 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 Yes Yes 0 0 None 0 No -STOP SLAVE; -START SLAVE; -SHOW SLAVE STATUS; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master - 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 Yes Yes 0 0 None 0 No -STOP SLAVE; -START SLAVE; -SHOW SLAVE STATUS; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master - 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 Yes Yes 0 0 None 0 No -STOP SLAVE; -START SLAVE; -SHOW SLAVE STATUS; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master - 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 Yes Yes 0 0 None 0 No -STOP SLAVE; -START SLAVE; -use test; -create table t1 (a int primary key) engine=ndb; -insert into t1 values (1); -drop table t1; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_basic.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_basic.result deleted file mode 100644 index d4abf899ca6..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_basic.result +++ /dev/null @@ -1,192 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -CREATE TABLE `t1` ( `nid` int(11) NOT NULL default '0', -`nom` char(4) default NULL, -`prenom` char(4) default NULL, -PRIMARY KEY (`nid`)) -ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO t1 VALUES(1,"XYZ1","ABC1"); -select * from t1 order by nid; -nid nom prenom -1 XYZ1 ABC1 -select * from t1 order by nid; -nid nom prenom -1 XYZ1 ABC1 -delete from t1; -INSERT INTO t1 VALUES(1,"XYZ2","ABC2"); -select * from t1 order by nid; -nid nom prenom -1 XYZ2 ABC2 -select * from t1 order by nid; -nid nom prenom -1 XYZ2 ABC2 -delete from t1; -insert into t1 values(1,"AA", "AA"); -insert into t1 values(2,"BB", "BB"); -insert into t1 values(3,"CC", "CC"); -insert into t1 values(4,"DD", "DD"); -begin; -delete from t1 where nid = 1; -insert into t1 values (1,"A2", "A2"); -update t1 set nom="B2" where nid = 2; -delete from t1 where nid = 2; -update t1 set nom = "D2" where nid = 4; -delete from t1 where nid = 4; -insert into t1 values (4, "D3", "D3"); -update t1 set nom = "D4" where nid = 4; -insert into t1 values (5, "EE", "EE"); -delete from t1 where nid = 5; -commit; -select * from t1 order by 1; -nid nom prenom -1 A2 A2 -3 CC CC -4 D4 D3 -select * from t1 order by 1; -nid nom prenom -1 A2 A2 -3 CC CC -4 D4 D3 -DROP table t1; -CREATE TABLE `t1` ( `nid` int(11) NOT NULL default '0', -`nom` char(4) default NULL, -`prenom` char(4) default NULL) -ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO t1 VALUES(1,"XYZ1","ABC1"),(2,"AAA","BBB"),(3,"CCC","DDD"); -select * from t1 order by nid; -nid nom prenom -1 XYZ1 ABC1 -2 AAA BBB -3 CCC DDD -select * from t1 order by nid; -nid nom prenom -1 XYZ1 ABC1 -2 AAA BBB -3 CCC DDD -delete from t1 where nid = 2; -INSERT INTO t1 VALUES(4,"EEE","FFF"); -select * from t1 order by nid; -nid nom prenom -1 XYZ1 ABC1 -3 CCC DDD -4 EEE FFF -select * from t1 order by nid; -nid nom prenom -1 XYZ1 ABC1 -3 CCC DDD -4 EEE FFF -UPDATE t1 set nid=nid+1; -UPDATE t1 set nom="CCP" where nid = 4; -select * from t1 order by nid; -nid nom prenom -2 XYZ1 ABC1 -4 CCP DDD -5 EEE FFF -select * from t1 order by nid; -nid nom prenom -2 XYZ1 ABC1 -4 CCP DDD -5 EEE FFF -DROP table t1; -CREATE TABLE `t1` ( -`prid` int(10) unsigned NOT NULL, -`id_type` enum('IMSI','SIP') NOT NULL, -`fkimssub` varchar(50) NOT NULL, -`user_id` varchar(20) DEFAULT NULL, -`password` varchar(20) DEFAULT NULL, -`ptg_nbr` varchar(20) DEFAULT NULL, -`old_tmsi` int(10) unsigned DEFAULT NULL, -`new_tmsi` int(10) unsigned DEFAULT NULL, -`dev_capability` int(10) unsigned DEFAULT NULL, -`dev_oid` bigint(20) unsigned DEFAULT NULL, -`lac_cell_id` bigint(20) unsigned DEFAULT NULL, -`ms_classmark1` int(10) unsigned DEFAULT NULL, -`cipher_key` int(10) unsigned DEFAULT NULL, -`priid_master` int(10) unsigned DEFAULT NULL, -PRIMARY KEY (`prid`), -UNIQUE KEY `fkimssub` (`fkimssub`,`ptg_nbr`) USING HASH -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -Warnings: -Warning 1121 Ndb does not support unique index on NULL valued attributes, index access with NULL value will become full table scan -INSERT INTO `t1` VALUES (183342,'IMSI','config3_sub_2Privates_3Publics_imssub_36668','user_id_73336','user_id_73336','73336',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL),(47617,'IMSI','config3_sub_2Privates_3Publics_imssub_9523','user_id_19046','user_id_19046','19046',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL),(200332,'IMSI','config3_sub_2Privates_3Publics_imssub_40066','user_id_80132','user_id_80132','80132',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL),(478882,'IMSI','config3_sub_2Privates_3Publics_imssub_95776','user_id_191552','user_id_191552','191552',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL),(490146,'IMSI','config3_sub_2Privates_3Publics_imssub_98029','user_id_196057','user_id_196057','196057',NULL,NULL,NULL,1010,NULL,NULL,NULL,NULL),(499301,'IMSI','config3_sub_2Privates_3Publics_imssub_99860','user_id_199719','user_id_199719','199719',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL),(506101,'IMSI','config3_sub_2Privates_3Publics_imssub_101220','user_id_202439','user_id_202439','202439',NULL,NULL,NULL,1010,NULL,NULL,NULL,NULL),(510142,'IMSI','config3_sub_2Privates_3Publics_imssub_102028','user_id_204056','user_id_204056','204056',NULL,NULL,NULL,1010,NULL,NULL,NULL,NULL),(515871,'IMSI','config3_sub_2Privates_3Publics_imssub_103174','user_id_206347','user_id_206347','206347',NULL,NULL,NULL,1010,NULL,NULL,NULL,NULL),(209842,'IMSI','config3_sub_2Privates_3Publics_imssub_41968','user_id_83936','user_id_83936','83936',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL),(365902,'IMSI','config3_sub_2Privates_3Publics_imssub_73180','user_id_146360','user_id_146360','146360',NULL,NULL,NULL,1010,NULL,NULL,NULL,NULL),(11892,'IMSI','config3_sub_2Privates_3Publics_imssub_2378','user_id_4756','user_id_4756','4756',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL); -select count(*) from t1; -count(*) -12 -select count(*) from t1; -count(*) -12 -update t1 set dev_oid=dev_oid+1; -select count(*) from t1; -count(*) -12 -select count(*) from t1; -count(*) -12 -DROP table t1; -CREATE TABLE `t1` ( `nid` int(11) NOT NULL default '0', -`nom` char(4) default NULL, -`prenom` char(4) default NULL, -PRIMARY KEY USING HASH (`nid`)) -ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO t1 VALUES(1,"XYZ1","ABC1"); -**** On Slave **** -BEGIN; -UPDATE t1 SET `nom`="LOCK" WHERE `nid`=1; -set GLOBAL slave_transaction_retries=1; -**** On Master **** -UPDATE t1 SET `nom`="DEAD" WHERE `nid`=1; -**** On Slave **** -set GLOBAL slave_transaction_retries=10; -include/start_slave.inc -select * from t1 order by nid; -nid nom prenom -1 LOCK ABC1 -COMMIT; -select * from t1 order by nid; -nid nom prenom -1 DEAD ABC1 -DROP TABLE t1; -CREATE TABLE t1 (c1 INT KEY) ENGINE=NDB; -INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); -ALTER TABLE t1 ADD c2 INT; -SELECT * FROM t1 ORDER BY c1; -c1 c2 -1 NULL -2 NULL -3 NULL -4 NULL -5 NULL -6 NULL -7 NULL -8 NULL -9 NULL -10 NULL -ALTER TABLE t1 CHANGE c2 c2 TEXT CHARACTER SET utf8; -ALTER TABLE t1 CHANGE c2 c2 BLOB; -SELECT * FROM t1 ORDER BY c1 LIMIT 5; -c1 c2 -1 NULL -2 NULL -3 NULL -4 NULL -5 NULL -TRUNCATE t1; -SELECT count(*) FROM t1; -count(*) -0 -INSERT INTO t1 VALUES (101,NULL),(102,NULL),(103,NULL),(104,NULL),(105,NULL),(106,NULL),(107,NULL),(108,NULL),(109,NULL),(1010,NULL); -SELECT count(*) FROM t1; -count(*) -10 -SELECT c1 FROM t1 ORDER BY c1 LIMIT 5; -c1 -101 -102 -103 -104 -105 -DROP TABLE t1; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_binlog_format_errors.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_binlog_format_errors.result deleted file mode 100644 index 64ab9a6d637..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_binlog_format_errors.result +++ /dev/null @@ -1,174 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -==== Initialize ==== -[on slave] -SET @old_binlog_format= @@global.binlog_format; -INSTALL PLUGIN example SONAME 'ha_example.so'; -[on master] -SET @old_binlog_format= @@global.binlog_format; -INSTALL PLUGIN example SONAME 'ha_example.so'; -CREATE TABLE t (a VARCHAR(100)) ENGINE = MYISAM; -CREATE TABLE t_self_logging (a VARCHAR(100)) ENGINE = NDB; -CREATE TABLE t_row (a VARCHAR(100)) ENGINE = INNODB; -CREATE TABLE t_stmt (a VARCHAR(100)) ENGINE = EXAMPLE; -CREATE TABLE t_slave_stmt (a VARCHAR(100)) ENGINE = MYISAM; -CREATE TABLE t_autoinc (a INT KEY AUTO_INCREMENT) ENGINE = MYISAM; -CREATE TABLE t_double_autoinc (a INT KEY AUTO_INCREMENT) ENGINE = MYISAM; -CREATE TRIGGER trig_autoinc BEFORE INSERT ON t_autoinc FOR EACH ROW BEGIN INSERT INTO t_stmt VALUES ('x'); END; -CREATE TRIGGER trig_double_autoinc BEFORE INSERT ON t_double_autoinc FOR EACH ROW BEGIN INSERT INTO t_autoinc VALUES (NULL); END; -CREATE DATABASE other; -SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED; -[on slave] -DROP TABLE t_slave_stmt; -CREATE TABLE t_slave_stmt (a INT) ENGINE = EXAMPLE; -[on master] -BINLOG ' -1gRVSg8BAAAAZgAAAGoAAAABAAQANS4xLjM2LWRlYnVnLWxvZwAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAADWBFVKEzgNAAgAEgAEBAQEEgAAUwAEGggAAAAICAgC -'; -==== Test ==== ----- binlog_format=row ---- -* Modify tables of more than one engine, one of which is self-logging -CREATE TRIGGER trig_1 AFTER INSERT ON t_self_logging FOR EACH ROW BEGIN INSERT INTO t VALUES (1); END; -INSERT INTO t_self_logging VALUES (1); -ERROR HY000: Cannot execute statement: impossible to write to binary log since more than one engine is involved and at least one engine is self-logging. -DROP trigger trig_1; -SELECT * FROM t_self_logging /* Should be empty */; -a -SELECT * FROM t /* Should be empty */; -a -* Modify both row-only and stmt-only table -CREATE TRIGGER trig_2 AFTER INSERT ON t_stmt FOR EACH ROW BEGIN INSERT INTO t_row VALUES(1); END; -INSERT INTO t_stmt VALUES (1); -ERROR HY000: Cannot execute statement: impossible to write to binary log since both row-incapable engines and statement-incapable engines are involved. -SELECT * FROM t_stmt /* should be empty */; -a -DROP TRIGGER trig_2; -* Stmt-only table and binlog_format=row -INSERT INTO t_stmt VALUES (1); -ERROR HY000: Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = ROW and at least one table uses a storage engine limited to statement-based logging. -SELECT * FROM t_stmt /* should be empty */; -a -* Row injection and stmt-only table: in slave sql thread -INSERT INTO t_slave_stmt VALUES (1); -[on slave] ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Error executing row event: 'Cannot execute statement: impossible to write to binary log since statement is in row format and at least one table uses a storage engine limited to statement-based logging.' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -include/start_slave.inc -SELECT * FROM t_slave_stmt /* should be empty */; -a -[on master] -* Row injection and stmt-only table: use BINLOG statement -BINLOG ' -1gRVShMBAAAALwAAAEABAAAAABcAAAAAAAAABHRlc3QABnRfc3RtdAABDwJkAAE= -1gRVShcBAAAAIAAAAGABAAAQABcAAAAAAAEAAf/+ATE= -'; -ERROR HY000: Cannot execute statement: impossible to write to binary log since statement is in row format and at least one table uses a storage engine limited to statement-based logging. -SELECT * FROM t_stmt /* should be empty */; -a ----- binlog_format=mixed ---- -[on slave] -include/stop_slave.inc -SET @@global.binlog_format = MIXED; -include/start_slave.inc -[on master] -SET @@global.binlog_format = MIXED; -SET @@session.binlog_format = MIXED; -* Unsafe statement and stmt-only engine -INSERT INTO t_stmt VALUES (UUID()); -ERROR HY000: Cannot execute statement: impossible to write to binary log since statement is unsafe, storage engine is limited to statement-based logging, and BINLOG_FORMAT = MIXED. Statement is unsafe because it uses a system function that may return a different value on the slave. -* Multi-unsafe statement and stmt-only engine -INSERT DELAYED INTO t_double_autoinc SELECT CONCAT(UUID(), @@hostname, NULL) FROM mysql.general_log LIMIT 1; -ERROR HY000: Cannot execute statement: impossible to write to binary log since statement is unsafe, storage engine is limited to statement-based logging, and BINLOG_FORMAT = MIXED. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted. ----- binlog_format=statement ---- -[on slave] -include/stop_slave.inc -SET @@global.binlog_format = STATEMENT; -include/start_slave.inc -[on master] -SET @@global.binlog_format = STATEMENT; -SET @@session.binlog_format = STATEMENT; -* Row-only engine and binlog_format=statement: innodb-specific message -INSERT INTO t_row VALUES (1); -ERROR HY000: Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to row-based logging. InnoDB is limited to row-logging when transaction isolation level is READ COMMITTED or READ UNCOMMITTED. -SELECT * FROM t_row /* should be empty */; -a -* Row-only engine and binlog_format=statement: generic message -SET @@session.debug= '+d,no_innodb_binlog_errors'; -INSERT INTO t_row VALUES (1); -ERROR HY000: Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to row-based logging. -SELECT * FROM t_row /* should be empty */; -a -* Same statement, but db filtered out - no error -USE other; -INSERT INTO test.t_row VALUES (1); -USE test; -SET @@session.debug= ''; -SELECT * FROM t_row /* should contain the value 1 */; -a -1 -* Row injection and binlog_format=statement: BINLOG statement -BINLOG ' -cNpVShMBAAAAKgAAADYBAAAAABcAAAAAAAAABHRlc3QAAXQAAQ8CZAAB -cNpVShcBAAAAIAAAAFYBAAAQABcAAAAAAAEAAf/+ATE= -'; -ERROR HY000: Cannot execute statement: impossible to write to binary log since statement is in row format and BINLOG_FORMAT = STATEMENT. -SELECT * FROM t /* should be empty */; -a -* Same statement, but db filtered out - no error -USE other; -BINLOG ' -cNpVShMBAAAAKgAAADYBAAAAABcAAAAAAAAABHRlc3QAAXQAAQ8CZAAB -cNpVShcBAAAAIAAAAFYBAAAQABcAAAAAAAEAAf/+ATE= -'; -USE test; -SELECT * FROM t /* should contain the value 1 */; -a -1 -DELETE FROM t; -* Unsafe statement and binlog_format=statement -INSERT INTO t VALUES (COALESCE(1, UUID())); -Warnings: -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave. -SELECT * FROM t /* should contain the value 1 */; -a -1 -DELETE FROM t; -* Same statement, but db filtered out - no message -USE other; -INSERT INTO test.t VALUES (COALESCE(1, UUID())); -USE test; -SELECT * FROM t /* should contain the value 1 */; -a -1 -DELETE FROM t; ----- master: binlog_format=mixed, slave: binlog_format=statement ---- -SET @@global.binlog_format = MIXED; -SET @@session.binlog_format = MIXED; -* Row injection and binlog_format=statement: in slave sql thread -INSERT INTO t VALUES (COALESCE(1, UUID())); -[on slave] ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Error executing row event: 'Cannot execute statement: impossible to write to binary log since statement is in row format and BINLOG_FORMAT = STATEMENT.' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -include/start_slave.inc -SELECT * FROM t /* should be empty */; -a -[on master] -==== Clean up ==== -DROP TRIGGER trig_autoinc; -DROP TRIGGER trig_double_autoinc; -DROP TABLE t, t_self_logging, t_row, t_stmt, t_slave_stmt, t_autoinc, t_double_autoinc; -DROP DATABASE other; -SET @@global.binlog_format = @old_binlog_format; -SET @@session.binlog_format = @old_binlog_format; -UNINSTALL PLUGIN example; -[on slave] -SET @@global.binlog_format = @old_binlog_format; -SET @@session.binlog_format = @old_binlog_format; -UNINSTALL PLUGIN example; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_blob.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_blob.result deleted file mode 100644 index c11de8c27e3..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_blob.result +++ /dev/null @@ -1,135 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -create table t1 ( -a int not null primary key, -b text not null -) engine=ndb; -insert into t1 values(1, repeat('abc',10)); -insert into t1 values(2, repeat('def',200)); -insert into t1 values(3, repeat('ghi',3000)); -select 'M', a, sha1(b) from t1 -order by a; -M a sha1(b) -M 1 8a6c4cf7cf97e66c487c3e3b717e9ae13623d07d -M 2 0ccd08c0fa6ad6a4382b27b1d36586d6ceb4fffa -M 3 75e7b3299e0b776aeac2a4d1542d5b3c0ba2e05e -select 'S', a, sha1(b) from t1 -order by a; -S a sha1(b) -S 1 8a6c4cf7cf97e66c487c3e3b717e9ae13623d07d -S 2 0ccd08c0fa6ad6a4382b27b1d36586d6ceb4fffa -S 3 75e7b3299e0b776aeac2a4d1542d5b3c0ba2e05e -drop table t1; -create table t1 ( -a int not null primary key, -b text not null, -c int, -d longblob, -e tinyblob -) engine=ndbcluster; -insert into t1 values ( -0, repeat(@s2,454), 100, repeat(@s2,345), NULL); -insert into t1 values ( -1, repeat(@s0,504), NULL, repeat(@s1,732), repeat(@s1,1)); -insert into t1 values ( -2, '', 102, '', repeat(@s2,1)); -insert into t1 values ( -3, repeat(@s0,545), 103, repeat(@s2,788), repeat(@s0,1)); -insert into t1 values ( -4, repeat(@s1,38), 104, repeat(@s0,260), repeat(@s0,1)); -insert into t1 values ( -5, repeat(@s2,12), 105, repeat(@s2,40), repeat(@s1,1)); -insert into t1 values ( -6, repeat(@s1,242), 106, NULL, repeat(@s1,1)); -insert into t1 values ( -7, repeat(@s1,30), 107, repeat(@s0,161), ''); -insert into t1 values ( -8, repeat(@s1,719), 108, repeat(@s2,104), NULL); -insert into t1 values ( -9, repeat(@s2,427), NULL, NULL, NULL); -select 'M', a, sha1(b), c, sha1(d), sha1(e) -from t1 order by a; -M a sha1(b) c sha1(d) sha1(e) -M 0 9538f61e649383c0d1054de2a2f0171188129f33 100 2b6515f29c20b8e9e17cc597527e516c0de8d612 NULL -M 1 dcb9a12ca86e718ff2564be041b7c1b3ff5ea559 NULL f23e7439d9a73c3954979b85a7ef6ef35faf4e9d abfe8ae5212b22d023aa6de84beeb1344ac5668a -M 2 da39a3ee5e6b4b0d3255bfef95601890afd80709 102 da39a3ee5e6b4b0d3255bfef95601890afd80709 33deebe47470a40e960834bffa4cdc66790845a6 -M 3 ec8e06d9ac4695d6a898b519ba840590263a9bff 103 278629ad080c3c4377978c006c2e54d0992e43cc 700915801f853603510aeb67b331866d996fdbda -M 4 0392fa8c425d293c79291f0f34779d1101d13fcb 104 5084b602c7203e0e9590a163415ac605da17ac32 700915801f853603510aeb67b331866d996fdbda -M 5 0f9653f0c7a69cd1c617792d546582e974a7a24d 105 566588a04ff26d05160d61c83435292bfda2978e abfe8ae5212b22d023aa6de84beeb1344ac5668a -M 6 a37e8b0ff4fc13a42be02cdecb36186436959bae 106 NULL abfe8ae5212b22d023aa6de84beeb1344ac5668a -M 7 a6bae0cfe6b45ff8c3c12d2ce577a1cd3931190f 107 39ee712b4b9e47f2cf3ba7c9790b2bf0d8f378e8 da39a3ee5e6b4b0d3255bfef95601890afd80709 -M 8 e139adcb7b2974ee7ff227fd405709e5cb7c896c 108 ba8073b0e1a281d4111bd2d82c7722b01574c00b NULL -M 9 1fc5168fe4be566b17b658d94e7813f0b5032cdb NULL NULL NULL -select 'S', a, sha1(b), c, sha1(d), sha1(e) -from t1 order by a; -S a sha1(b) c sha1(d) sha1(e) -S 0 9538f61e649383c0d1054de2a2f0171188129f33 100 2b6515f29c20b8e9e17cc597527e516c0de8d612 NULL -S 1 dcb9a12ca86e718ff2564be041b7c1b3ff5ea559 NULL f23e7439d9a73c3954979b85a7ef6ef35faf4e9d abfe8ae5212b22d023aa6de84beeb1344ac5668a -S 2 da39a3ee5e6b4b0d3255bfef95601890afd80709 102 da39a3ee5e6b4b0d3255bfef95601890afd80709 33deebe47470a40e960834bffa4cdc66790845a6 -S 3 ec8e06d9ac4695d6a898b519ba840590263a9bff 103 278629ad080c3c4377978c006c2e54d0992e43cc 700915801f853603510aeb67b331866d996fdbda -S 4 0392fa8c425d293c79291f0f34779d1101d13fcb 104 5084b602c7203e0e9590a163415ac605da17ac32 700915801f853603510aeb67b331866d996fdbda -S 5 0f9653f0c7a69cd1c617792d546582e974a7a24d 105 566588a04ff26d05160d61c83435292bfda2978e abfe8ae5212b22d023aa6de84beeb1344ac5668a -S 6 a37e8b0ff4fc13a42be02cdecb36186436959bae 106 NULL abfe8ae5212b22d023aa6de84beeb1344ac5668a -S 7 a6bae0cfe6b45ff8c3c12d2ce577a1cd3931190f 107 39ee712b4b9e47f2cf3ba7c9790b2bf0d8f378e8 da39a3ee5e6b4b0d3255bfef95601890afd80709 -S 8 e139adcb7b2974ee7ff227fd405709e5cb7c896c 108 ba8073b0e1a281d4111bd2d82c7722b01574c00b NULL -S 9 1fc5168fe4be566b17b658d94e7813f0b5032cdb NULL NULL NULL -drop table t1; -CREATE TABLE IF NOT EXISTS t1 ( -db VARBINARY(63) NOT NULL, -name VARBINARY(63) NOT NULL, -slock BINARY(32) NOT NULL, -query BLOB NOT NULL, -node_id INT UNSIGNED NOT NULL, -epoch BIGINT UNSIGNED NOT NULL, -id INT UNSIGNED NOT NULL, -version INT UNSIGNED NOT NULL, -type INT UNSIGNED NOT NULL, -PRIMARY KEY USING HASH (db,name)) -ENGINE=NDB; -insert into t1 values ('test','t1', -'abc',repeat(@s0,10), 11,12,13,14,15); -insert into t1 values ('test','t2', -'def',repeat(@s1,100), 21,22,23,24,25); -insert into t1 values ('test','t3', -'ghi',repeat(@s2,1000),31,32,33,34,35); -insert into t1 values ('testtttttttttt','t1', -'abc',repeat(@s0,10), 11,12,13,14,15); -insert into t1 values ('testttttttttttt','t1', -'def',repeat(@s1,100), 21,22,23,24,25); -insert into t1 values ('testtttttttttttt','t1', -'ghi',repeat(@s2,1000),31,32,33,34,35); -insert into t1 values ('t','t11111111111', -'abc',repeat(@s0,10), 11,12,13,14,15); -insert into t1 values ('t','t111111111111', -'def',repeat(@s1,100), 21,22,23,24,25); -insert into t1 values ('t','t1111111111111', -'ghi',repeat(@s2,1000),31,32,33,34,35); -select 'M', db, name, sha1(query), node_id, epoch, id, version, type -from t1 order by db, name; -M db name sha1(query) node_id epoch id version type -M t t11111111111 8fc937d303ee7e4795c0b964d4066cedd6d74cfd 11 12 13 14 15 -M t t111111111111 a5229e9f8977bc99afc3b3627c56f083e97e01bd 21 22 23 24 25 -M t t1111111111111 0820e6ad3eeb06ea60e5e04d0bfe36f286b91098 31 32 33 34 35 -M test t1 8fc937d303ee7e4795c0b964d4066cedd6d74cfd 11 12 13 14 15 -M test t2 a5229e9f8977bc99afc3b3627c56f083e97e01bd 21 22 23 24 25 -M test t3 0820e6ad3eeb06ea60e5e04d0bfe36f286b91098 31 32 33 34 35 -M testtttttttttt t1 8fc937d303ee7e4795c0b964d4066cedd6d74cfd 11 12 13 14 15 -M testttttttttttt t1 a5229e9f8977bc99afc3b3627c56f083e97e01bd 21 22 23 24 25 -M testtttttttttttt t1 0820e6ad3eeb06ea60e5e04d0bfe36f286b91098 31 32 33 34 35 -select 'S', db, name, sha1(query), node_id, epoch, id, version, type -from t1 order by db, name; -S db name sha1(query) node_id epoch id version type -S t t11111111111 8fc937d303ee7e4795c0b964d4066cedd6d74cfd 11 12 13 14 15 -S t t111111111111 a5229e9f8977bc99afc3b3627c56f083e97e01bd 21 22 23 24 25 -S t t1111111111111 0820e6ad3eeb06ea60e5e04d0bfe36f286b91098 31 32 33 34 35 -S test t1 8fc937d303ee7e4795c0b964d4066cedd6d74cfd 11 12 13 14 15 -S test t2 a5229e9f8977bc99afc3b3627c56f083e97e01bd 21 22 23 24 25 -S test t3 0820e6ad3eeb06ea60e5e04d0bfe36f286b91098 31 32 33 34 35 -S testtttttttttt t1 8fc937d303ee7e4795c0b964d4066cedd6d74cfd 11 12 13 14 15 -S testttttttttttt t1 a5229e9f8977bc99afc3b3627c56f083e97e01bd 21 22 23 24 25 -S testtttttttttttt t1 0820e6ad3eeb06ea60e5e04d0bfe36f286b91098 31 32 33 34 35 -drop table t1; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_blob2.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_blob2.result deleted file mode 100644 index 055efffbd6a..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_blob2.result +++ /dev/null @@ -1,156 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -***** Table Create Section **** - -CREATE TABLE test.t1 (c1 int not null auto_increment, -data LONGBLOB, PRIMARY KEY(c1))ENGINE=#; - -**** Data Insert Section test.t1 ***** - -INSERT INTO test.t1 VALUES (NULL, NULL); -INSERT INTO test.t1 VALUES (NULL, repeat('a',1*1024)); -INSERT INTO test.t1 VALUES (NULL, repeat('b',16*1024)); - -**** Data Insert Validation Master Section test.t1 **** - -SELECT LENGTH(data) FROM test.t1 WHERE c1 = 1; -LENGTH(data) -NULL -SELECT LENGTH(data) FROM test.t1 WHERE c1 = 2; -LENGTH(data) -1024 -SELECT LENGTH(data) FROM test.t1 WHERE c1 = 3; -LENGTH(data) -16384 - -**** Data Insert Validation Slave Section test.t1 **** - -SELECT LENGTH(data) FROM test.t1 WHERE c1 = 1; -LENGTH(data) -NULL -SELECT LENGTH(data) FROM test.t1 WHERE c1 = 2; -LENGTH(data) -1024 -SELECT LENGTH(data) FROM test.t1 WHERE c1 = 3; -LENGTH(data) -16384 - -**** Data Update Section test.t1 **** - -UPDATE test.t1 set data=repeat('a',18*1024) where c1 = 1; -UPDATE t1 set data=repeat('c',17*1024) where c1 = 2; - -**** Data Update Validation Master Section test.t1 **** - -SELECT LENGTH(data) FROM test.t1 WHERE c1 = 1; -LENGTH(data) -18432 -SELECT LENGTH(data) FROM test.t1 WHERE c1 = 2; -LENGTH(data) -17408 - -**** Data Update Validation Slave Section test.t1 **** - -SELECT LENGTH(data) FROM test.t1 WHERE c1 = 1; -LENGTH(data) -18432 -SELECT LENGTH(data) FROM test.t1 WHERE c1 = 2; -LENGTH(data) -17408 - -**** End Test Section test.t1 **** - -**** Create Table test.t2 **** - -CREATE TABLE test.t2 ( -c1 INT NOT NULL PRIMARY KEY, -c2 TEXT, -c3 INT, -c4 LONGBLOB, -KEY(c3))ENGINE=#; - -*** Setup Values For test.t2 *** -set @x0 = '01234567012345670123456701234567'; -set @x0 = concat(@x0,@x0,@x0,@x0,@x0,@x0,@x0,@x0); -set @b1 = 'b1'; -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@x0); -set @d1 = 'dd1'; -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @b2 = 'b2'; -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @d2 = 'dd2'; -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); - -**** Data Insert Section test.t2 ***** - -INSERT INTO test.t2 VALUES(1,@b1,111,@d1); -INSERT INTO test.t2 VALUES(2,@b2,222,@d2); - -**** Data Insert Validation Master Section test.t2 **** - -SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) -FROM test.t2 WHERE c1=1; -c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) -1 2256 b1 3000 dd1 -SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) -FROM test.t2 WHERE c1=2; -c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) -2 20000 b2 30000 dd2 - -**** Data Insert Validation Slave Section test.t2 **** - -SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) -FROM test.t2 WHERE c1=1; -c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) -1 2256 b1 3000 dd1 -SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) -FROM test.t2 WHERE c1=2; -c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) -2 20000 b2 30000 dd2 - -**** Data Update Section test.t2 **** - -UPDATE test.t2 SET c2=@b2, c4=@d2 WHERE c1=1; -UPDATE test.t2 SET c2=@b1, c4=@d1 WHERE c1=2; - -**** Data Update Validation Master Section test.t2 **** - -SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) -FROM test.t2 WHERE c1=1; -c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) -1 20000 b2 30000 dd2 -SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) -FROM test.t2 WHERE c1=2; -c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) -2 2256 b1 3000 dd1 - -**** Data Update Validation Slave Section test.t2 **** - -SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) -FROM test.t2 WHERE c1=1; -c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) -1 20000 b2 30000 dd2 -SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) -FROM test.t2 WHERE c1=2; -c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) -2 2256 b1 3000 dd1 - -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular.result deleted file mode 100644 index dfbd7a37d8e..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular.result +++ /dev/null @@ -1,27 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -RESET MASTER; -CHANGE MASTER TO master_host="127.0.0.1",master_port=SLAVE_PORT,master_user="root"; -START SLAVE; -CREATE TABLE t1 (a int key, b int) ENGINE=ndb; -SHOW TABLES; -Tables_in_test -t1 -INSERT INTO t1 VALUES (1,2); -INSERT INTO t1 VALUES (2,3); -SELECT * FROM t1 ORDER BY a; -a b -1 2 -2 3 -Checking that both slave threads are running. -SELECT * FROM t1 ORDER BY a; -a b -1 2 -2 3 -Checking that both slave threads are running. -STOP SLAVE; -DROP TABLE t1; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_2ch.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_2ch.result deleted file mode 100644 index b7d4a3d76db..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_2ch.result +++ /dev/null @@ -1,64 +0,0 @@ -STOP SLAVE; -STOP SLAVE; -STOP SLAVE; -STOP SLAVE; -DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8,t9; -RESET MASTER; -DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8,t9; -RESET MASTER; -DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8,t9; -RESET MASTER; -DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8,t9; -RESET MASTER; -RESET SLAVE; -CHANGE MASTER TO master_host='127.0.0.1',master_port=MASTER_MYPORT,master_user='root'; -START SLAVE; -RESET SLAVE; -CHANGE MASTER TO master_host='127.0.0.1',master_port=SLAVE_MYPORT1,master_user='root'; -START SLAVE; - -*** Check server_id of mysqld servers *** -SHOW VARIABLES LIKE "server_id"; -Variable_name Value -server_id 1 -SET auto_increment_offset = 1; -SET auto_increment_increment = 2; -SHOW VARIABLES LIKE "server_id"; -Variable_name Value -server_id 1 -SET auto_increment_offset = 1; -SET auto_increment_increment = 2; -SHOW VARIABLES LIKE "server_id"; -Variable_name Value -server_id 2 -SET auto_increment_offset = 2; -SET auto_increment_increment = 2; -SHOW VARIABLES LIKE "server_id"; -Variable_name Value -server_id 2 -SET auto_increment_offset = 2; -SET auto_increment_increment = 2; - -*** Preparing data *** -CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT, b VARCHAR(100), c INT NOT NULL, PRIMARY KEY(a)) ENGINE=ndb; - -*** Basic testing *** -Insert rows via all hosts -Check data on both clusters -Comparing tables master:test.t1 and slave:test.t1 -*** Transaction testing *** -BEGIN; -BEGIN; -COMMIT; -COMMIT; -Check data on both clusters -Comparing tables master:test.t1 and slave:test.t1 -BEGIN; -BEGIN; -ROLLBACK; -ROLLBACK; -Check data on both clusters -Comparing tables master:test.t1 and slave:test.t1 -DROP TABLE t1; -DROP TABLE IF EXISTS t1; - diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_simplex.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_simplex.result deleted file mode 100644 index 99438d663bb..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_simplex.result +++ /dev/null @@ -1,29 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -CREATE TABLE t1 (a int key, b int) ENGINE=NDB; -SHOW TABLES; -Tables_in_test -t1 -RESET MASTER; -INSERT INTO t1 VALUES (1,2); -INSERT INTO t1 VALUES (2,3); -STOP SLAVE; -CHANGE MASTER TO MASTER_HOST="127.0.0.1",MASTER_PORT=SLAVE_PORT,MASTER_USER="root"; -START SLAVE; -Checking that both slave threads are running. -SELECT * FROM t1 ORDER BY a; -a b -1 2 -2 3 -STOP SLAVE; -START SLAVE; -SELECT * FROM t1 ORDER BY a; -a b -1 2 -2 3 -Checking that both slave threads are running. -DROP TABLE t1; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_commit_afterflush.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_commit_afterflush.result deleted file mode 100644 index 3fc4ca26967..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_commit_afterflush.result +++ /dev/null @@ -1,13 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -CREATE TABLE t1 (a INT) ENGINE=NDB; -begin; -insert into t1 values(1); -flush tables with read lock; -commit; -unlock tables; -drop table t1; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_ctype_ucs2_def.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_ctype_ucs2_def.result deleted file mode 100644 index a6e2144f532..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_ctype_ucs2_def.result +++ /dev/null @@ -1,27 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -show variables like 'collation_server'; -Variable_name Value -collation_server ucs2_unicode_ci -show variables like "%character_set_ser%"; -Variable_name Value -character_set_server ucs2 -DROP TABLE IF EXISTS t1; -CREATE TABLE `t1` ( `nid` int(11) NOT NULL default '0', -`nom` char(4) default NULL, -`prenom` char(4) default NULL, -PRIMARY KEY (`nid`)) -ENGINE=ndbcluster; -INSERT INTO t1 VALUES(1,"XYZ1","ABC1"); -select * from t1 order by nid; -nid nom prenom -1 XYZ1 ABC1 -select * from t1 order by nid; -nid nom prenom -1 XYZ1 ABC1 -==== clean up ==== -DROP TABLE t1; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_basic.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_basic.result deleted file mode 100644 index 6fdfaa30369..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_basic.result +++ /dev/null @@ -1,72 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -DROP TABLE IF EXISTS t1; -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; -alter logfile group lg1 -add undofile 'undofile02.dat' -initial_size 4M engine=ndb; -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE NDB; -alter tablespace ts1 -add datafile 'datafile02.dat' -initial_size 4M engine=ndb; -CREATE TABLE t1 -(pk1 int not null primary key, b int not null, c int not null) -tablespace ts1 storage disk -engine ndb; -insert into t1 values (1,2,3); -select * from t1 order by pk1; -pk1 b c -1 2 3 -select * from t1 order by pk1; -pk1 b c -1 2 3 -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query 1 # use `test`; DROP TABLE IF EXISTS `t1` /* generated by server */ -master-bin.000001 # Query 1 # use `test`; CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB -master-bin.000001 # Query 1 # use `test`; alter logfile group lg1 -add undofile 'undofile02.dat' -initial_size 4M engine=ndb -master-bin.000001 # Query 1 # use `test`; CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE NDB -master-bin.000001 # Query 1 # use `test`; alter tablespace ts1 -add datafile 'datafile02.dat' -initial_size 4M engine=ndb -master-bin.000001 # Query 1 # use `test`; CREATE TABLE t1 -(pk1 int not null primary key, b int not null, c int not null) -tablespace ts1 storage disk -engine ndb -master-bin.000001 # Query 1 # BEGIN -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Table_map 1 # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows 1 # table_id: # -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Query 1 # COMMIT -drop table t1; -alter tablespace ts1 -drop datafile 'datafile.dat' -engine=ndb; -alter tablespace ts1 -drop datafile 'datafile02.dat' -engine=ndb; -DROP TABLESPACE ts1 ENGINE=NDB; -DROP LOGFILE GROUP lg1 ENGINE=NDB; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_partitions.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_partitions.result deleted file mode 100644 index c906f00bd40..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_partitions.result +++ /dev/null @@ -1,790 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; ---- Doing pre test cleanup --- -DROP TABLE IF EXISTS t1; -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE = 4M -ENGINE=NDB; -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE NDB; -ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile02.dat' -INITIAL_SIZE = 4M -ENGINE=NDB; ---- Start test 2 partition RANGE testing -- ---- Do setup -- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(63), -bc CHAR(63), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE) -TABLESPACE ts1 STORAGE DISK -ENGINE=NDB -PARTITION BY RANGE (YEAR(t)) -(PARTITION p0 VALUES LESS THAN (1901), -PARTITION p1 VALUES LESS THAN (1946), -PARTITION p2 VALUES LESS THAN (1966), -PARTITION p3 VALUES LESS THAN (1986), -PARTITION p4 VALUES LESS THAN (2005), -PARTITION p5 VALUES LESS THAN MAXVALUE); ---- Show table on master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(63) DEFAULT NULL, - `bc` char(63) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (YEAR(t)) -(PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster, - PARTITION p1 VALUES LESS THAN (1946) ENGINE = ndbcluster, - PARTITION p2 VALUES LESS THAN (1966) ENGINE = ndbcluster, - PARTITION p3 VALUES LESS THAN (1986) ENGINE = ndbcluster, - PARTITION p4 VALUES LESS THAN (2005) ENGINE = ndbcluster, - PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = ndbcluster) */ ---- Show table on slave -- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(63) DEFAULT NULL, - `bc` char(63) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (YEAR(t)) -(PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster, - PARTITION p1 VALUES LESS THAN (1946) ENGINE = ndbcluster, - PARTITION p2 VALUES LESS THAN (1966) ENGINE = ndbcluster, - PARTITION p3 VALUES LESS THAN (1986) ENGINE = ndbcluster, - PARTITION p4 VALUES LESS THAN (2005) ENGINE = ndbcluster, - PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = ndbcluster) */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 MODIFY vc VARCHAR(255); ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(63) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (YEAR(t)) -(PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster, - PARTITION p1 VALUES LESS THAN (1946) ENGINE = ndbcluster, - PARTITION p2 VALUES LESS THAN (1966) ENGINE = ndbcluster, - PARTITION p3 VALUES LESS THAN (1986) ENGINE = ndbcluster, - PARTITION p4 VALUES LESS THAN (2005) ENGINE = ndbcluster, - PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = ndbcluster) */ ---- Make sure that our tables on slave are still same engine --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(63) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (YEAR(t)) -(PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster, - PARTITION p1 VALUES LESS THAN (1946) ENGINE = ndbcluster, - PARTITION p2 VALUES LESS THAN (1966) ENGINE = ndbcluster, - PARTITION p3 VALUES LESS THAN (1986) ENGINE = ndbcluster, - PARTITION p4 VALUES LESS THAN (2005) ENGINE = ndbcluster, - PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = ndbcluster) */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- End test 2 partition RANGE testing --- ---- Do Cleanup --- -DROP TABLE IF EXISTS t1; ---- Start test 3 partition LIST testing --- ---- Do setup --- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(63), -bc CHAR(63), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE) -TABLESPACE ts1 STORAGE DISK -ENGINE=NDB -PARTITION BY LIST(id) -(PARTITION p0 VALUES IN (2, 4), -PARTITION p1 VALUES IN (42, 142)); ---- Test 3 Alter to add partition --- -ALTER TABLE t1 ADD PARTITION (PARTITION p2 VALUES IN (412)); ---- Show table on master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(63) DEFAULT NULL, - `bc` char(63) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (id) -(PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (42,142) ENGINE = ndbcluster, - PARTITION p2 VALUES IN (412) ENGINE = ndbcluster) */ ---- Show table on slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(63) DEFAULT NULL, - `bc` char(63) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (id) -(PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (42,142) ENGINE = ndbcluster, - PARTITION p2 VALUES IN (412) ENGINE = ndbcluster) */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 MODIFY vc VARCHAR(255); ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(63) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (id) -(PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (42,142) ENGINE = ndbcluster, - PARTITION p2 VALUES IN (412) ENGINE = ndbcluster) */ ---- Make sure that our tables on slave are still same engine --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(63) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (id) -(PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (42,142) ENGINE = ndbcluster, - PARTITION p2 VALUES IN (412) ENGINE = ndbcluster) */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- End test 3 partition LIST testing --- ---- Do Cleanup -- -DROP TABLE IF EXISTS t1; ---- Start test 4 partition HASH testing --- ---- Do setup --- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(63), -bc CHAR(63), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE) -TABLESPACE ts1 STORAGE DISK -ENGINE=NDB -PARTITION BY HASH( YEAR(t) ) -PARTITIONS 4; ---- show that tables have been created correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(63) DEFAULT NULL, - `bc` char(63) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH ( YEAR(t)) -PARTITIONS 4 */ -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(63) DEFAULT NULL, - `bc` char(63) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH ( YEAR(t)) -PARTITIONS 4 */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 MODIFY vc VARCHAR(255); ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(63) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH ( YEAR(t)) -PARTITIONS 4 */ ---- Make sure that our tables on slave are still same engine --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(63) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH ( YEAR(t)) -PARTITIONS 4 */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- End test 4 partition HASH testing --- ---- Do Cleanup -- -DROP TABLE IF EXISTS t1; ---- Start test 5 partition by key testing --- ---- Create Table Section --- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(63), -bc CHAR(63), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE,PRIMARY KEY(id)) -TABLESPACE ts1 STORAGE DISK -ENGINE=NDB -PARTITION BY KEY() -PARTITIONS 4; ---- Show that tables on master are ndbcluster tables --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(63) DEFAULT NULL, - `bc` char(63) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY () -PARTITIONS 4 */ ---- Show that tables on slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(63) DEFAULT NULL, - `bc` char(63) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY () -PARTITIONS 4 */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(id, total); ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(63) DEFAULT NULL, - `bc` char(63) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY () -PARTITIONS 4 */ ---- Make sure that our tables on slave are still right type --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(63) DEFAULT NULL, - `bc` char(63) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY () -PARTITIONS 4 */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 MODIFY vc VARCHAR(255); ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(63) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY () -PARTITIONS 4 */ ---- Make sure that our tables on slave are still same engine --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(63) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY () -PARTITIONS 4 */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- End test 5 key partition testing --- ---- Do Cleanup --- -DROP TABLE IF EXISTS t1; -alter tablespace ts1 -drop datafile 'datafile.dat' -engine=ndb; -alter tablespace ts1 -drop datafile 'datafile02.dat' -engine=ndb; -DROP TABLESPACE ts1 ENGINE=NDB; -DROP LOGFILE GROUP lg1 ENGINE=NDB; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_ddl.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_ddl.result deleted file mode 100644 index 3f3be8a05a8..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_ddl.result +++ /dev/null @@ -1,1628 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; - --------- switch to master ------- -SET AUTOCOMMIT = 1; -DROP DATABASE IF EXISTS mysqltest1; -DROP DATABASE IF EXISTS mysqltest2; -DROP DATABASE IF EXISTS mysqltest3; -CREATE DATABASE mysqltest1; -CREATE DATABASE mysqltest2; -CREATE TABLE mysqltest1.t1 (f1 BIGINT) ENGINE=NDB; -INSERT INTO mysqltest1.t1 SET f1= 0; -CREATE TABLE mysqltest1.t2 (f1 BIGINT) ENGINE=NDB; -CREATE TABLE mysqltest1.t3 (f1 BIGINT) ENGINE=NDB; -CREATE TABLE mysqltest1.t4 (f1 BIGINT) ENGINE=NDB; -CREATE TABLE mysqltest1.t5 (f1 BIGINT) ENGINE=NDB; -CREATE TABLE mysqltest1.t6 (f1 BIGINT) ENGINE=NDB; -CREATE INDEX my_idx6 ON mysqltest1.t6(f1); -CREATE TABLE mysqltest1.t7 (f1 BIGINT) ENGINE=NDB; -INSERT INTO mysqltest1.t7 SET f1= 0; -CREATE TABLE mysqltest1.t8 (f1 BIGINT) ENGINE=NDB; -CREATE TABLE mysqltest1.t9 (f1 BIGINT) ENGINE=NDB; -CREATE TABLE mysqltest1.t10 (f1 BIGINT) ENGINE=NDB; -CREATE TABLE mysqltest1.t11 (f1 BIGINT) ENGINE=NDB; -CREATE TABLE mysqltest1.t12 (f1 BIGINT) ENGINE=NDB; -CREATE TABLE mysqltest1.t13 (f1 BIGINT) ENGINE=NDB; -CREATE TABLE mysqltest1.t14 (f1 BIGINT) ENGINE=NDB; -CREATE TABLE mysqltest1.t15 (f1 BIGINT) ENGINE=NDB; -CREATE TABLE mysqltest1.t16 (f1 BIGINT) ENGINE=NDB; -CREATE TABLE mysqltest1.t17 (f1 BIGINT) ENGINE=NDB; -CREATE TABLE mysqltest1.t18 (f1 BIGINT) ENGINE=NDB; -CREATE TABLE mysqltest1.t19 (f1 BIGINT) ENGINE=NDB; -CREATE TEMPORARY TABLE mysqltest1.t23 (f1 BIGINT) ENGINE=MEMORY; -SET AUTOCOMMIT = 0; -use mysqltest1; - --------- switch to slave -------- -SET AUTOCOMMIT = 1; -use mysqltest1; - --------- switch to master ------- - -######## SELECT 1 ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 0 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -1 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -0 - --------- switch to master ------- -SELECT 1; -1 -1 -SELECT MAX(f1) FROM t1; -MAX(f1) -1 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -0 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -0 - -TEST-INFO: MASTER: The INSERT is not committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -0 - -TEST-INFO: SLAVE: The INSERT is not committed (Succeeded) - --------- switch to master ------- - -######## SELECT COUNT(*) FROM t1 ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 0 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -1 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -0 - --------- switch to master ------- -SELECT COUNT(*) FROM t1; -COUNT(*) -2 -SELECT MAX(f1) FROM t1; -MAX(f1) -1 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -0 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -0 - -TEST-INFO: MASTER: The INSERT is not committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -0 - -TEST-INFO: SLAVE: The INSERT is not committed (Succeeded) - --------- switch to master ------- - -######## COMMIT ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 0 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -1 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -0 - --------- switch to master ------- -COMMIT; -SELECT MAX(f1) FROM t1; -MAX(f1) -1 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -1 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -1 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -1 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- - -######## ROLLBACK ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 1 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -2 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -1 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -1 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -1 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -1 - -TEST-INFO: MASTER: The INSERT is not committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -1 - -TEST-INFO: SLAVE: The INSERT is not committed (Succeeded) - --------- switch to master ------- - -######## SET AUTOCOMMIT=1 ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 1 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -2 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -1 - --------- switch to master ------- -SET AUTOCOMMIT=1; -SELECT MAX(f1) FROM t1; -MAX(f1) -2 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -2 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -2 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -2 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SET AUTOCOMMIT=0; - -######## START TRANSACTION ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 2 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -3 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -2 - --------- switch to master ------- -START TRANSACTION; -SELECT MAX(f1) FROM t1; -MAX(f1) -3 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -3 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -3 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -3 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- - -######## BEGIN ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 3 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -4 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -3 - --------- switch to master ------- -BEGIN; -SELECT MAX(f1) FROM t1; -MAX(f1) -4 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -4 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -4 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -4 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- - -######## DROP TABLE mysqltest1.t2 ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 4 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -5 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -4 - --------- switch to master ------- -DROP TABLE mysqltest1.t2; -SELECT MAX(f1) FROM t1; -MAX(f1) -5 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -5 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -5 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -5 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SHOW TABLES LIKE 't2'; -Tables_in_mysqltest1 (t2) - --------- switch to slave -------- -SHOW TABLES LIKE 't2'; -Tables_in_mysqltest1 (t2) - --------- switch to master ------- - -######## DROP TEMPORARY TABLE mysqltest1.t23 ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 5 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -6 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -5 - --------- switch to master ------- -DROP TEMPORARY TABLE mysqltest1.t23; -SELECT MAX(f1) FROM t1; -MAX(f1) -6 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -5 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -5 - -TEST-INFO: MASTER: The INSERT is not committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -5 - -TEST-INFO: SLAVE: The INSERT is not committed (Succeeded) - --------- switch to master ------- -SHOW TABLES LIKE 't23'; -Tables_in_mysqltest1 (t23) - --------- switch to slave -------- -SHOW TABLES LIKE 't23'; -Tables_in_mysqltest1 (t23) - --------- switch to master ------- - -######## RENAME TABLE mysqltest1.t3 to mysqltest1.t20 ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 5 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -6 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -5 - --------- switch to master ------- -RENAME TABLE mysqltest1.t3 to mysqltest1.t20; -SELECT MAX(f1) FROM t1; -MAX(f1) -6 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -6 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -6 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -6 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SHOW TABLES LIKE 't20'; -Tables_in_mysqltest1 (t20) -t20 - --------- switch to slave -------- -SHOW TABLES LIKE 't20'; -Tables_in_mysqltest1 (t20) -t20 - --------- switch to master ------- - -######## ALTER TABLE mysqltest1.t4 ADD column f2 BIGINT ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 6 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -7 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -6 - --------- switch to master ------- -ALTER TABLE mysqltest1.t4 ADD column f2 BIGINT; -SELECT MAX(f1) FROM t1; -MAX(f1) -7 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -7 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -7 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -7 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -describe mysqltest1.t4; -Field Type Null Key Default Extra -f1 bigint(20) YES NULL -f2 bigint(20) YES NULL - --------- switch to slave -------- -describe mysqltest1.t4; -Field Type Null Key Default Extra -f1 bigint(20) YES NULL -f2 bigint(20) YES NULL - --------- switch to master ------- - -######## CREATE TABLE mysqltest1.t21 (f1 BIGINT) ENGINE= NDB ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 7 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -8 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -7 - --------- switch to master ------- -CREATE TABLE mysqltest1.t21 (f1 BIGINT) ENGINE= NDB; -SELECT MAX(f1) FROM t1; -MAX(f1) -8 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -8 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -8 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -8 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- - -######## CREATE TEMPORARY TABLE mysqltest1.t22 (f1 BIGINT) ENGINE=MEMORY ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 8 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -9 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -8 - --------- switch to master ------- -CREATE TEMPORARY TABLE mysqltest1.t22 (f1 BIGINT) ENGINE=MEMORY; -SELECT MAX(f1) FROM t1; -MAX(f1) -9 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -8 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -8 - -TEST-INFO: MASTER: The INSERT is not committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -8 - -TEST-INFO: SLAVE: The INSERT is not committed (Succeeded) - --------- switch to master ------- - -######## TRUNCATE TABLE mysqltest1.t7 ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 8 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -9 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -8 - --------- switch to master ------- -TRUNCATE TABLE mysqltest1.t7; -SELECT MAX(f1) FROM t1; -MAX(f1) -9 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -9 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -9 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -9 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SELECT * FROM mysqltest1.t7; -f1 - --------- switch to slave -------- -SELECT * FROM mysqltest1.t7; -f1 - --------- switch to master ------- - -######## LOCK TABLES mysqltest1.t1 WRITE, mysqltest1.t8 READ ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 9 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -10 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -9 - --------- switch to master ------- -LOCK TABLES mysqltest1.t1 WRITE, mysqltest1.t8 READ; -SELECT MAX(f1) FROM t1; -MAX(f1) -10 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -10 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -10 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -10 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -UNLOCK TABLES; - -######## UNLOCK TABLES ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 10 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -11 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -10 - --------- switch to master ------- -UNLOCK TABLES; -SELECT MAX(f1) FROM t1; -MAX(f1) -11 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -10 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -10 - -TEST-INFO: MASTER: The INSERT is not committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -10 - -TEST-INFO: SLAVE: The INSERT is not committed (Succeeded) - --------- switch to master ------- -LOCK TABLES mysqltest1.t1 READ; - -######## UNLOCK TABLES ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 10 + 1; -ERROR HY000: Table 't1' was locked with a READ lock and can't be updated -SELECT MAX(f1) FROM t1; -MAX(f1) -10 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -10 - --------- switch to master ------- -UNLOCK TABLES; -SELECT MAX(f1) FROM t1; -MAX(f1) -10 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -10 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -10 - -TEST-INFO: MASTER: The INSERT is not committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -10 - -TEST-INFO: SLAVE: The INSERT is not committed (Succeeded) - --------- switch to master ------- -LOCK TABLES mysqltest1.t1 WRITE, mysqltest1.t8 READ; - -######## UNLOCK TABLES ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 10 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -11 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -10 - --------- switch to master ------- -UNLOCK TABLES; -SELECT MAX(f1) FROM t1; -MAX(f1) -11 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -11 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -11 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -11 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- - -######## DROP INDEX my_idx6 ON mysqltest1.t6 ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 11 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -12 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -11 - --------- switch to master ------- -DROP INDEX my_idx6 ON mysqltest1.t6; -SELECT MAX(f1) FROM t1; -MAX(f1) -12 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -12 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -12 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -12 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SHOW INDEX FROM mysqltest1.t6; -Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment - --------- switch to slave -------- -SHOW INDEX FROM mysqltest1.t6; -Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment - --------- switch to master ------- - -######## CREATE INDEX my_idx5 ON mysqltest1.t5(f1) ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 12 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -13 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -12 - --------- switch to master ------- -CREATE INDEX my_idx5 ON mysqltest1.t5(f1); -SELECT MAX(f1) FROM t1; -MAX(f1) -13 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -13 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -13 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -13 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SHOW INDEX FROM mysqltest1.t5; -Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment -t5 1 my_idx5 1 f1 A 0 NULL NULL YES BTREE - --------- switch to slave -------- -SHOW INDEX FROM mysqltest1.t5; -Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment -t5 1 my_idx5 1 f1 A 0 NULL NULL YES BTREE - --------- switch to master ------- - -######## DROP DATABASE mysqltest2 ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 13 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -14 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -13 - --------- switch to master ------- -DROP DATABASE mysqltest2; -SELECT MAX(f1) FROM t1; -MAX(f1) -14 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -14 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -14 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -14 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SHOW DATABASES LIKE "mysqltest2"; -Database (mysqltest2) - --------- switch to slave -------- -SHOW DATABASES LIKE "mysqltest2"; -Database (mysqltest2) - --------- switch to master ------- - -######## CREATE DATABASE mysqltest3 ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 14 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -15 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -14 - --------- switch to master ------- -CREATE DATABASE mysqltest3; -SELECT MAX(f1) FROM t1; -MAX(f1) -15 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -15 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -15 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -15 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SHOW DATABASES LIKE "mysqltest3"; -Database (mysqltest3) -mysqltest3 - --------- switch to slave -------- -SHOW DATABASES LIKE "mysqltest3"; -Database (mysqltest3) -mysqltest3 - --------- switch to master ------- - -######## CREATE PROCEDURE p1() READS SQL DATA SELECT "this is p1" ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 15 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -16 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -15 - --------- switch to master ------- -CREATE PROCEDURE p1() READS SQL DATA SELECT "this is p1"; -SELECT MAX(f1) FROM t1; -MAX(f1) -16 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -16 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -16 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -16 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SHOW PROCEDURE STATUS LIKE 'p1'; -Db mysqltest1 -Name p1 -Type PROCEDURE -Definer root@localhost -Modified # -Created # -Security_type DEFINER -Comment -character_set_client latin1 -collation_connection latin1_swedish_ci -Database Collation latin1_swedish_ci - --------- switch to slave -------- -SHOW PROCEDURE STATUS LIKE 'p1'; -Db mysqltest1 -Name p1 -Type PROCEDURE -Definer root@localhost -Modified # -Created # -Security_type DEFINER -Comment -character_set_client latin1 -collation_connection latin1_swedish_ci -Database Collation latin1_swedish_ci - --------- switch to master ------- - -######## ALTER PROCEDURE p1 COMMENT "I have been altered" ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 16 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -17 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -16 - --------- switch to master ------- -ALTER PROCEDURE p1 COMMENT "I have been altered"; -SELECT MAX(f1) FROM t1; -MAX(f1) -17 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -17 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -17 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -17 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SHOW PROCEDURE STATUS LIKE 'p1'; -Db mysqltest1 -Name p1 -Type PROCEDURE -Definer root@localhost -Modified # -Created # -Security_type DEFINER -Comment I have been altered -character_set_client latin1 -collation_connection latin1_swedish_ci -Database Collation latin1_swedish_ci - --------- switch to slave -------- -SHOW PROCEDURE STATUS LIKE 'p1'; -Db mysqltest1 -Name p1 -Type PROCEDURE -Definer root@localhost -Modified # -Created # -Security_type DEFINER -Comment I have been altered -character_set_client latin1 -collation_connection latin1_swedish_ci -Database Collation latin1_swedish_ci - --------- switch to master ------- - -######## DROP PROCEDURE p1 ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 17 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -18 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -17 - --------- switch to master ------- -DROP PROCEDURE p1; -SELECT MAX(f1) FROM t1; -MAX(f1) -18 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -18 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -18 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -18 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SHOW PROCEDURE STATUS LIKE 'p1'; - --------- switch to slave -------- -SHOW PROCEDURE STATUS LIKE 'p1'; - --------- switch to master ------- - -######## CREATE OR REPLACE VIEW v1 as select * from t1 ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 18 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -19 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -18 - --------- switch to master ------- -CREATE OR REPLACE VIEW v1 as select * from t1; -SELECT MAX(f1) FROM t1; -MAX(f1) -19 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -19 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -19 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -19 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` latin1 latin1_swedish_ci - --------- switch to slave -------- -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` latin1 latin1_swedish_ci - --------- switch to master ------- - -######## ALTER VIEW v1 AS select f1 from t1 ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 19 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -20 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -19 - --------- switch to master ------- -ALTER VIEW v1 AS select f1 from t1; -SELECT MAX(f1) FROM t1; -MAX(f1) -20 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -20 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -20 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -20 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` latin1 latin1_swedish_ci - --------- switch to slave -------- -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` latin1 latin1_swedish_ci - --------- switch to master ------- - -######## DROP VIEW IF EXISTS v1 ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 20 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -21 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -20 - --------- switch to master ------- -DROP VIEW IF EXISTS v1; -SELECT MAX(f1) FROM t1; -MAX(f1) -21 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -21 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -21 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -21 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SHOW CREATE VIEW v1; -ERROR 42S02: Table 'mysqltest1.v1' doesn't exist - --------- switch to slave -------- -SHOW CREATE VIEW v1; -ERROR 42S02: Table 'mysqltest1.v1' doesn't exist - --------- switch to master ------- - -######## CREATE TRIGGER trg1 BEFORE INSERT ON t1 FOR EACH ROW SET @a:=1 ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 21 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -22 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -21 - --------- switch to master ------- -CREATE TRIGGER trg1 BEFORE INSERT ON t1 FOR EACH ROW SET @a:=1; -SELECT MAX(f1) FROM t1; -MAX(f1) -22 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -22 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -22 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -22 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SHOW TRIGGERS; -Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation -trg1 INSERT t1 SET @a:=1 BEFORE NULL root@localhost latin1 latin1_swedish_ci latin1_swedish_ci - --------- switch to slave -------- -SHOW TRIGGERS; -Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation -trg1 INSERT t1 SET @a:=1 BEFORE NULL root@localhost latin1 latin1_swedish_ci latin1_swedish_ci - --------- switch to master ------- - -######## DROP TRIGGER trg1 ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 22 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -23 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -22 - --------- switch to master ------- -DROP TRIGGER trg1; -SELECT MAX(f1) FROM t1; -MAX(f1) -23 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -23 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -23 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -23 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SHOW TRIGGERS; -Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation - --------- switch to slave -------- -SHOW TRIGGERS; -Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation - --------- switch to master ------- - -######## CREATE USER user1@localhost ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 23 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -24 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -23 - --------- switch to master ------- -CREATE USER user1@localhost; -SELECT MAX(f1) FROM t1; -MAX(f1) -24 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -24 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -24 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -24 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SELECT user FROM mysql.user WHERE user = 'user1'; -user -user1 - --------- switch to slave -------- -SELECT user FROM mysql.user WHERE user = 'user1'; -user -user1 - --------- switch to master ------- - -######## RENAME USER user1@localhost TO rename1@localhost ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 24 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -25 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -24 - --------- switch to master ------- -RENAME USER user1@localhost TO rename1@localhost; -SELECT MAX(f1) FROM t1; -MAX(f1) -25 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -25 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -25 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -25 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SELECT user FROM mysql.user WHERE user = 'rename1'; -user -rename1 - --------- switch to slave -------- -SELECT user FROM mysql.user WHERE user = 'rename1'; -user -rename1 - --------- switch to master ------- - -######## DROP USER rename1@localhost ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 25 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -26 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -25 - --------- switch to master ------- -DROP USER rename1@localhost; -SELECT MAX(f1) FROM t1; -MAX(f1) -26 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -26 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -26 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -26 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SELECT user FROM mysql.user WHERE user = 'rename1'; -user - --------- switch to slave -------- -SELECT user FROM mysql.user WHERE user = 'rename1'; -user -use test; - --------- switch to master ------- -DROP DATABASE mysqltest1; -DROP DATABASE mysqltest3; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_delete_nowhere.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_delete_nowhere.result deleted file mode 100644 index 1cecb030181..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_delete_nowhere.result +++ /dev/null @@ -1,15 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -create table t1 (a int, b int) engine=NDB; -insert into t1 values(1,1); -select * from t1; -a b -1 1 -delete from t1; -select * from t1; -a b -drop table t1; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_do_db.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_do_db.result deleted file mode 100644 index 316f5fc7e31..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_do_db.result +++ /dev/null @@ -1,58 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -DROP DATABASE IF EXISTS replica; -CREATE DATABASE replica; -CREATE TABLE t1 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; -CREATE TABLE t2 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; -USE replica; -CREATE TABLE replica.t1 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; -CREATE TABLE replica.t2 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; -USE test; -INSERT INTO t1 VALUES(1, repeat('abc',10)); -INSERT INTO t2 VALUES(1, repeat('abc',10)); -SHOW TABLES; -Tables_in_test -t1 -t2 -SELECT COUNT(*) FROM t1; -COUNT(*) -1 -SELECT COUNT(*) FROM t2; -COUNT(*) -1 -USE replica; -INSERT INTO replica.t1 VALUES(2, repeat('def',200)); -INSERT INTO replica.t2 VALUES(2, repeat('def',200)); -SHOW TABLES; -Tables_in_replica -t1 -t2 -SELECT COUNT(*) FROM t1; -COUNT(*) -1 -SELECT COUNT(*) FROM t2; -COUNT(*) -1 -SHOW TABLES; -Tables_in_test -USE replica; -SHOW TABLES; -Tables_in_replica -t1 -t2 -SELECT COUNT(*) FROM t1; -COUNT(*) -1 -SELECT COUNT(*) FROM t2; -COUNT(*) -1 -USE test; -SHOW TABLES; -Tables_in_test -USE test; -DROP TABLE t1, t2; -DROP DATABASE IF EXISTS replica; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_do_table.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_do_table.result deleted file mode 100644 index dda2844f6d0..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_do_table.result +++ /dev/null @@ -1,26 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -DROP TABLE IF EXISTS t1, t2; -CREATE TABLE t1 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; -CREATE TABLE t2 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; -INSERT INTO t1 VALUES(1, repeat('abc',10)); -INSERT INTO t1 VALUES(2, repeat('def',200)); -INSERT INTO t1 VALUES(3, repeat('ghi',3000)); -INSERT INTO t2 VALUES(1, repeat('abc',10)); -INSERT INTO t2 VALUES(2, repeat('def',200)); -INSERT INTO t2 VALUES(3, repeat('ghi',3000)); -SHOW TABLES; -Tables_in_test -t1 -SELECT COUNT(*) FROM t1; -COUNT(*) -3 -INSERT INTO t1 VALUES (3, repeat('bad',1)); -ERROR 23000: Duplicate entry '3' for key 'PRIMARY' -INSERT INTO t1 VALUES (3, repeat('bad too',1)); -ERROR 23000: Duplicate entry '3' for key 'PRIMARY' -DROP TABLE IF EXISTS t1, t2; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result deleted file mode 100644 index e1fdf993c7c..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result +++ /dev/null @@ -1,582 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -call mtr.add_suppression("Slave: Unknown table 't6' Error_code: 1051"); -**** Diff Table Def Start **** -*** On Slave *** -STOP SLAVE; -RESET SLAVE; -SET @saved_slave_type_conversions = @@slave_type_conversions; -SET GLOBAL SLAVE_TYPE_CONVERSIONS = 'ALL_NON_LOSSY'; -CREATE TABLE t1 (a INT, b INT PRIMARY KEY, c CHAR(20), -d FLOAT DEFAULT '2.00', -e CHAR(4) DEFAULT 'TEST') -ENGINE='NDB'; -*** Create t1 on Master *** -CREATE TABLE t1 (a INT PRIMARY KEY, b INT, c CHAR(10) -) ENGINE='NDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -INSERT INTO t1 () VALUES(1,2,'TEXAS'),(2,1,'AUSTIN'),(3,4,'QA'); -SELECT * FROM t1 ORDER BY a; -a b c -1 2 TEXAS -2 1 AUSTIN -3 4 QA -*** Select from slave *** -SELECT * FROM t1 ORDER BY a; -a b c d e -1 2 TEXAS NULL NULL -2 1 AUSTIN NULL NULL -3 4 QA NULL NULL -SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions; -*** Drop t1 *** -DROP TABLE t1; -*** Create t2 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t2 (a INT, b INT PRIMARY KEY, c CHAR(5), -d FLOAT DEFAULT '2.00', -e CHAR(5) DEFAULT 'TEST2') -ENGINE='NDB'; -*** Create t2 on Master *** -CREATE TABLE t2 (a INT PRIMARY KEY, b INT, c CHAR(10) -) ENGINE='NDB'; -RESET MASTER; -*** Master Data Insert *** -INSERT INTO t2 () VALUES(1,2,'Kyle, TEX'),(2,1,'JOE AUSTIN'),(3,4,'QA TESTING'); -SELECT * FROM t2 ORDER BY a; -a b c -1 2 Kyle, TEX -2 1 JOE AUSTIN -3 4 QA TESTING -*** Start Slave *** -START SLAVE; -Last_SQL_Error = Column 2 of table 'test.t2' cannot be converted from type 'char(10)' to type 'char(5)' -STOP SLAVE; -RESET SLAVE; -SELECT * FROM t2 ORDER BY a; -a b c d e -RESET MASTER; -START SLAVE; -*** Drop t2 *** -DROP TABLE t2; -*** Create t3 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t3 (a INT, b INT PRIMARY KEY, c CHAR(20), -d FLOAT DEFAULT '2.00', -e CHAR(5) DEFAULT 'TEST2') -ENGINE='NDB'; -*** Create t3 on Master *** -CREATE TABLE t3 (a BLOB, b INT PRIMARY KEY, c CHAR(20) -) ENGINE='NDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t3 () VALUES(@b1,2,'Kyle, TEX'),(@b1,1,'JOE AUSTIN'),(@b1,4,'QA TESTING'); -******************************************** -*** Expect slave to fail with Error 1677 *** -******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Column 0 of table 'test.t3' cannot be converted from type 'tinyblob' to type 'int(11)' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc -*** Drop t3 *** -DROP TABLE t3; -*** Create t4 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t4 (a INT, b INT PRIMARY KEY, c CHAR(20), -d FLOAT DEFAULT '2.00', -e CHAR(5) DEFAULT 'TEST2') -ENGINE='NDB'; -*** Create t4 on Master *** -CREATE TABLE t4 (a DECIMAL(8,2), b INT PRIMARY KEY, c CHAR(20) -) ENGINE='NDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -INSERT INTO t4 () VALUES(100.22,2,'Kyle, TEX'),(200.26,1,'JOE AUSTIN'), -(30000.22,4,'QA TESTING'); -******************************************** -*** Expect slave to fail with Error 1677 *** -******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Column 0 of table 'test.t4' cannot be converted from type 'decimal(8,2)' to type 'int(11)' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc -*** Drop t4 *** -DROP TABLE t4; -*** Create t5 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t5 (a INT PRIMARY KEY, b CHAR(5), -c FLOAT, d INT, e DOUBLE, -f DECIMAL(8,2))ENGINE='NDB'; -*** Create t5 on Master *** -CREATE TABLE t5 (a INT PRIMARY KEY, b VARCHAR(6), -c DECIMAL(8,2), d BIT, e BLOB, -f FLOAT) ENGINE='NDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -INSERT INTO t5 () VALUES(1,'Kyle',200.23,1,'b1b1',23.00098), -(2,'JOE',300.01,0,'b2b2',1.0000009); -******************************************** -*** Expect slave to fail with Error 1677 *** -******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Column 1 of table 'test.t5' cannot be converted from type 'varchar(6)' to type 'char(5)' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc -*** Drop t5 *** -DROP TABLE t5; -*** Create t6 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t6 (a INT PRIMARY KEY, b CHAR(5), -c FLOAT, d INT)ENGINE='NDB'; -*** Create t6 on Master *** -CREATE TABLE t6 (a INT PRIMARY KEY, b VARCHAR(6), -c DECIMAL(8,2), d BIT -) ENGINE='NDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -INSERT INTO t6 () VALUES(1,'Kyle',200.23,1), -(2,'JOE',300.01,0); -******************************************** -*** Expect slave to fail with Error 1677 *** -******************************************** -Last_SQL_Error = Column 1 of table 'test.t6' cannot be converted from type 'varchar(6)' to type 'char(5)' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3; -*** Drop t6 *** -DROP TABLE t6; -DROP TABLE t6; -START SLAVE; -**** Diff Table Def End **** -**** Extra Colums Start **** -*** Create t7 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t7 (a INT KEY, b BLOB, c CHAR(5), -d TIMESTAMP NULL DEFAULT '0000-00-00 00:00:00', -e CHAR(20) DEFAULT 'Extra Column Testing') -ENGINE='NDB'; -*** Create t7 on Master *** -CREATE TABLE t7 (a INT PRIMARY KEY, b BLOB, c CHAR(5) -) ENGINE='NDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t7 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); -SELECT * FROM t7 ORDER BY a; -a b c -1 b1b1 Kyle -2 b1b1 JOE -3 b1b1 QA -*** Select from slave *** -SELECT * FROM t7 ORDER BY a; -a b c d e -1 b1b1 Kyle NULL NULL -2 b1b1 JOE NULL NULL -3 b1b1 QA NULL NULL -*** Drop t7 *** -DROP TABLE t7; -*** Create t8 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t8 (a INT KEY, b BLOB, c CHAR(5), -d TIMESTAMP NULL DEFAULT '0000-00-00 00:00:00', -e INT)ENGINE='NDB'; -*** Create t8 on Master *** -CREATE TABLE t8 (a INT PRIMARY KEY, b BLOB, c CHAR(5) -) ENGINE='NDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t8 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); -*** Drop t8 *** -DROP TABLE t8; -*** Create t10 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t10 (a INT KEY, b BLOB, f DOUBLE DEFAULT '233', -c CHAR(5), e INT DEFAULT '1')ENGINE='NDB'; -*** Create t10 on Master *** -CREATE TABLE t10 (a INT PRIMARY KEY, b BLOB, c CHAR(5) -) ENGINE='NDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t10 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); -******************************************** -*** Expect slave to fail with Error 1677 *** -******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Column 2 of table 'test.t10' cannot be converted from type 'char(5)' to type 'double' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc -*** Drop t10 *** -DROP TABLE t10; -*** Create t11 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t11 (a INT KEY, b BLOB, f INT, -c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='NDB'; -*** Create t11 on Master *** -CREATE TABLE t11 (a INT PRIMARY KEY, b BLOB, c VARCHAR(254) -) ENGINE='NDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t11 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); -******************************************** -*** Expect slave to fail with Error 1677 *** -******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Column 2 of table 'test.t11' cannot be converted from type 'varchar(254)' to type 'int(11)' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc -*** Drop t11 *** -DROP TABLE t11; -*** Create t12 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t12 (a INT KEY, b BLOB, f TEXT, -c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='NDB'; -*** Create t12 on Master *** -CREATE TABLE t12 (a INT PRIMARY KEY, b BLOB, c BLOB -) ENGINE='NDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t12 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); -SELECT * FROM t12 ORDER BY a; -a b c -1 b1b1b1b1b1b1b1b1 Kyle -2 b1b1b1b1b1b1b1b1 JOE -3 b1b1b1b1b1b1b1b1 QA -*** Select on Slave *** -SELECT * FROM t12 ORDER BY a; -a b f c e -1 b1b1b1b1b1b1b1b1 Kyle NULL NULL -2 b1b1b1b1b1b1b1b1 JOE NULL NULL -3 b1b1b1b1b1b1b1b1 QA NULL NULL -*** Drop t12 *** -DROP TABLE t12; -**** Extra Colums End **** -*** BUG 22177 Start *** -*** Create t13 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t13 (a INT KEY, b BLOB, c CHAR(5), -d INT DEFAULT '1', -e TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='NDB'; -*** Create t13 on Master *** -CREATE TABLE t13 (a INT PRIMARY KEY, b BLOB, c CHAR(5) -) ENGINE='NDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t13 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); -SELECT * FROM t13 ORDER BY a; -a b c -1 b1b1b1b1b1b1b1b1 Kyle -2 b1b1b1b1b1b1b1b1 JOE -3 b1b1b1b1b1b1b1b1 QA -*** Select on Slave **** -SELECT * FROM t13 ORDER BY a; -a b c d e -1 b1b1b1b1b1b1b1b1 Kyle NULL CURRENT_TIMESTAMP -2 b1b1b1b1b1b1b1b1 JOE NULL CURRENT_TIMESTAMP -3 b1b1b1b1b1b1b1b1 QA NULL CURRENT_TIMESTAMP -*** Drop t13 *** -DROP TABLE t13; -*** 22117 END *** -*** Alter Master Table Testing Start *** -*** Create t14 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t14 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='NDB'; -*** Create t14 on Master *** -CREATE TABLE t14 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='NDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -ALTER TABLE t14 ADD COLUMN c2 DECIMAL(8,2) AFTER c1; -ALTER TABLE t14 ADD COLUMN c3 TEXT AFTER c2; -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t14 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle'), -(2,2.00,'This Test Should work',@b1,'JOE'), -(3,3.00,'If is does not, I will open a bug',@b1,'QA'); -SELECT * FROM t14 ORDER BY c1; -c1 c2 c3 c4 c5 -1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle -2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE -3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA -*** Select on Slave **** -SELECT * FROM t14 ORDER BY c1; -c1 c2 c3 c4 c5 c6 c7 -1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle NULL CURRENT_TIMESTAMP -2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE NULL CURRENT_TIMESTAMP -3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA NULL CURRENT_TIMESTAMP -*** Create t14a on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t14a (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='NDB'; -*** Create t14a on Master *** -CREATE TABLE t14a (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='NDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t14a () VALUES(1,@b1,'Kyle'), -(2,@b1,'JOE'), -(3,@b1,'QA'); -SELECT * FROM t14a ORDER BY c1; -c1 c4 c5 -1 b1b1b1b1b1b1b1b1 Kyle -2 b1b1b1b1b1b1b1b1 JOE -3 b1b1b1b1b1b1b1b1 QA -*** Select on Slave **** -SELECT * FROM t14a ORDER BY c1; -c1 c4 c5 c6 c7 -1 b1b1b1b1b1b1b1b1 Kyle NULL CURRENT_TIMESTAMP -2 b1b1b1b1b1b1b1b1 JOE NULL CURRENT_TIMESTAMP -3 b1b1b1b1b1b1b1b1 QA NULL CURRENT_TIMESTAMP -STOP SLAVE; -RESET SLAVE; -*** Master Drop c5 *** -ALTER TABLE t14a DROP COLUMN c5; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t14a () VALUES(4,@b1), -(5,@b1), -(6,@b1); -SELECT * FROM t14a ORDER BY c1; -c1 c4 -1 b1b1b1b1b1b1b1b1 -2 b1b1b1b1b1b1b1b1 -3 b1b1b1b1b1b1b1b1 -4 b1b1b1b1b1b1b1b1 -5 b1b1b1b1b1b1b1b1 -6 b1b1b1b1b1b1b1b1 -*** Select on Slave **** -SELECT * FROM t14a ORDER BY c1; -c1 c4 c5 c6 c7 -1 b1b1b1b1b1b1b1b1 Kyle NULL CURRENT_TIMESTAMP -2 b1b1b1b1b1b1b1b1 JOE NULL CURRENT_TIMESTAMP -3 b1b1b1b1b1b1b1b1 QA NULL CURRENT_TIMESTAMP -4 b1b1b1b1b1b1b1b1 NULL NULL CURRENT_TIMESTAMP -5 b1b1b1b1b1b1b1b1 NULL NULL CURRENT_TIMESTAMP -6 b1b1b1b1b1b1b1b1 NULL NULL CURRENT_TIMESTAMP -*** connect to master and drop columns *** -ALTER TABLE t14 DROP COLUMN c2; -ALTER TABLE t14 DROP COLUMN c4; -*** Select from Master *** -SELECT * FROM t14 ORDER BY c1; -c1 c3 c5 -1 Replication Testing Extra Col Kyle -2 This Test Should work JOE -3 If is does not, I will open a bug QA -*** Select from Slave *** -SELECT * FROM t14 ORDER BY c1; -c1 c3 c5 c6 c7 -1 Replication Testing Extra Col Kyle NULL CURRENT_TIMESTAMP -2 This Test Should work JOE NULL CURRENT_TIMESTAMP -3 If is does not, I will open a bug QA NULL CURRENT_TIMESTAMP -*** Drop t14 *** -DROP TABLE t14; -*** Create t15 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t15 (c1 INT KEY, c2 DECIMAL(8,2), c3 TEXT, -c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='NDB'; -*** Create t15 on Master *** -CREATE TABLE t15 (c1 INT PRIMARY KEY, c2 DECIMAL(8,2), c3 TEXT, -c4 BLOB, c5 CHAR(5)) ENGINE='NDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t15 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle'), -(2,2.00,'This Test Should work',@b1,'JOE'), -(3,3.00,'If is does not, I will open a bug',@b1,'QA'); -SELECT * FROM t15 ORDER BY c1; -c1 c2 c3 c4 c5 -1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle -2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE -3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA -*** Select on Slave **** -SELECT * FROM t15 ORDER BY c1; -c1 c2 c3 c4 c5 c6 c7 -1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle NULL CURRENT_TIMESTAMP -2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE NULL CURRENT_TIMESTAMP -3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA NULL CURRENT_TIMESTAMP -*** Add column on master that is a Extra on Slave *** -ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5; -******************************************** -*** Expect slave to fail with Error 1060 *** -******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Error 'Duplicate column name 'c6'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 1; -include/start_slave.inc -*** Try to insert in master **** -INSERT INTO t15 () VALUES(5,2.00,'Replication Testing',@b1,'Buda',2); -SELECT * FROM t15 ORDER BY c1; -c1 c2 c3 c4 c5 c6 -1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle NULL -2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE NULL -3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA NULL -5 2.00 Replication Testing b1b1b1b1b1b1b1b1 Buda 2 -*** Try to select from slave **** -SELECT * FROM t15 ORDER BY c1; -c1 c2 c3 c4 c5 c6 c7 -1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle NULL CURRENT_TIMESTAMP -2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE NULL CURRENT_TIMESTAMP -3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA NULL CURRENT_TIMESTAMP -5 2.00 Replication Testing b1b1b1b1b1b1b1b1 Buda 2 CURRENT_TIMESTAMP -*** DROP TABLE t15 *** -DROP TABLE t15; -*** Create t16 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t16 (c1 INT KEY, c2 DECIMAL(8,2), c3 TEXT, -c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='NDB'; -*** Create t16 on Master *** -CREATE TABLE t16 (c1 INT PRIMARY KEY, c2 DECIMAL(8,2), c3 TEXT, -c4 BLOB, c5 CHAR(5))ENGINE='NDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t16 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle'), -(2,2.00,'This Test Should work',@b1,'JOE'), -(3,3.00,'If is does not, I will open a bug',@b1,'QA'); -SELECT * FROM t16 ORDER BY c1; -c1 c2 c3 c4 c5 -1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle -2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE -3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA -*** Select on Slave **** -SELECT * FROM t16 ORDER BY c1; -c1 c2 c3 c4 c5 c6 c7 -1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle NULL CURRENT_TIMESTAMP -2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE NULL CURRENT_TIMESTAMP -3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA NULL CURRENT_TIMESTAMP -*** Add Partition on master *** -ALTER TABLE t16 PARTITION BY KEY(c1) PARTITIONS 4; -INSERT INTO t16 () VALUES(4,1.00,'Replication Rocks',@b1,'Omer'); -SHOW CREATE TABLE t16; -Table Create Table -t16 CREATE TABLE `t16` ( - `c1` int(11) NOT NULL, - `c2` decimal(8,2) DEFAULT NULL, - `c3` text, - `c4` blob, - `c5` char(5) DEFAULT NULL, - PRIMARY KEY (`c1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (c1) -PARTITIONS 4 */ -*** Show table on Slave **** -SHOW CREATE TABLE t16; -Table Create Table -t16 CREATE TABLE `t16` ( - `c1` int(11) NOT NULL, - `c2` decimal(8,2) DEFAULT NULL, - `c3` text, - `c4` blob, - `c5` char(5) DEFAULT NULL, - `c6` int(11) DEFAULT '1', - `c7` timestamp NULL DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (`c1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (c1) -PARTITIONS 4 */ -*** DROP TABLE t16 *** -DROP TABLE t16; -*** Alter Master End *** -*** Create t17 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t17 (a SMALLINT, b INT PRIMARY KEY, c CHAR(5), -d FLOAT DEFAULT '2.00', -e CHAR(5) DEFAULT 'TEST2') -ENGINE='NDB'; -*** Create t17 on Master *** -CREATE TABLE t17 (a BIGINT PRIMARY KEY, b INT, c CHAR(10) -) ENGINE='NDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -INSERT INTO t17 () VALUES(9223372036854775807,2,'Kyle, TEX'); -******************************************** -*** Expect slave to fail with Error 1677 *** -******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Column 0 of table 'test.t17' cannot be converted from type 'bigint' to type 'smallint(6)' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc -** DROP table t17 *** -DROP TABLE t17; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_func003.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_func003.result deleted file mode 100644 index 7e750f2ce2a..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_func003.result +++ /dev/null @@ -1,30 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -CALL mtr.add_suppression('Statement may not be safe to log in statement format.'); -DROP FUNCTION IF EXISTS test.f1; -DROP TABLE IF EXISTS test.t1; -CREATE TABLE test.t1 (a INT NOT NULL AUTO_INCREMENT, c CHAR(16),PRIMARY KEY(a))ENGINE=NDB; -create function test.f1() RETURNS CHAR(16) -BEGIN -DECLARE tmp CHAR(16); -DECLARE var_name FLOAT; -SET var_name = RAND(); -IF var_name > .6 -THEN SET tmp = 'Texas'; -ELSE SET tmp = 'MySQL'; -END IF; -RETURN tmp; -END| -INSERT INTO test.t1 VALUES (null,test.f1()),(null,test.f1()),(null,test.f1()); -INSERT INTO test.t1 VALUES (null,test.f1()),(null,test.f1()),(null,test.f1()); -SET AUTOCOMMIT=0; -START TRANSACTION; -INSERT INTO test.t1 VALUES (null,test.f1()); -ROLLBACK; -SET AUTOCOMMIT=1; -DROP FUNCTION test.f1; -DROP TABLE test.t1; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_idempotent.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_idempotent.result deleted file mode 100644 index e2755c04f28..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_idempotent.result +++ /dev/null @@ -1,66 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -CREATE TABLE t1 (c1 CHAR(15), c2 CHAR(15), c3 INT, PRIMARY KEY (c3)) ENGINE = NDB ; -INSERT INTO t1 VALUES ("row1","will go away",1); -SELECT * FROM t1 ORDER BY c3; -c1 c2 c3 -row1 will go away 1 -SELECT @the_epoch:=MAX(epoch) FROM mysql.ndb_apply_status; -@the_epoch:=MAX(epoch) - -SELECT * FROM t1 ORDER BY c3; -c1 c2 c3 -row1 will go away 1 -SELECT @the_pos:=Position,@the_file:=SUBSTRING_INDEX(FILE, '/', -1) -FROM mysql.ndb_binlog_index WHERE epoch = ; -@the_pos:=Position @the_file:=SUBSTRING_INDEX(FILE, '/', -1) - master-bin.000001 -INSERT INTO t1 VALUES ("row2","will go away",2),("row3","will change",3),("row4","D",4); -DELETE FROM t1 WHERE c3 = 1; -UPDATE t1 SET c2="should go away" WHERE c3 = 2; -UPDATE t1 SET c2="C" WHERE c3 = 3; -DELETE FROM t1 WHERE c3 = 2; -SELECT * FROM t1 ORDER BY c3; -c1 c2 c3 -row3 C 3 -row4 D 4 -SELECT * FROM t1 ORDER BY c3; -c1 c2 c3 -row3 C 3 -row4 D 4 -Checking that both slave threads are running. -STOP SLAVE; -CHANGE MASTER TO -master_log_file = 'master-bin.000001', -master_log_pos = ; -START SLAVE; -SELECT * FROM t1 ORDER BY c3; -c1 c2 c3 -row3 C 3 -row4 D 4 -SELECT * FROM t1 ORDER BY c3; -c1 c2 c3 -row3 C 3 -row4 D 4 -STOP SLAVE; -DROP TABLE t1; -RESET master; -DROP TABLE t1; -RESET slave; -START SLAVE; -CREATE TABLE t1 (c1 CHAR(15) NOT NULL, c2 CHAR(15) NOT NULL, c3 INT NOT NULL, PRIMARY KEY (c3)) ENGINE = NDB ; -INSERT INTO t1 VALUES ("row1","remove on slave",1); -DELETE FROM t1; -BEGIN; -UPDATE t1 SET c2="does not exist" WHERE c3=1; -INSERT INTO t1 VALUES ("row2","new on slave",2); -COMMIT; -SELECT * FROM t1; -c1 c2 c3 -row2 new on slave 2 -Checking that both slave threads are running. -DROP TABLE IF EXISTS t1; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb2ndb.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb2ndb.result deleted file mode 100644 index 4c96ccf85ee..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb2ndb.result +++ /dev/null @@ -1,919 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -SET storage_engine=innodb; ---- Doing pre test cleanup --- -DROP TABLE IF EXISTS t1; ---- Start test 1 Basic testing --- ---- Create Table Section --- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), -bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE,PRIMARY KEY(id)); ---- Show table on master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 ---- Show table on slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly -- -ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(id, total); -ALTER TABLE t1 MODIFY vc TEXT; ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 ---- Make sure that our tables on slave are still same engine --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- End test 1 Basic testing --- ---- Do Cleanup -- -DROP TABLE IF EXISTS t1; ---- Start test 2 partition RANGE testing -- ---- Do setup -- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), -bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE) -PARTITION BY RANGE (YEAR(t)) -(PARTITION p0 VALUES LESS THAN (1901), -PARTITION p1 VALUES LESS THAN (1946), -PARTITION p2 VALUES LESS THAN (1966), -PARTITION p3 VALUES LESS THAN (1986), -PARTITION p4 VALUES LESS THAN (2005), -PARTITION p5 VALUES LESS THAN MAXVALUE); ---- Show table on master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (YEAR(t)) -(PARTITION p0 VALUES LESS THAN (1901) ENGINE = InnoDB, - PARTITION p1 VALUES LESS THAN (1946) ENGINE = InnoDB, - PARTITION p2 VALUES LESS THAN (1966) ENGINE = InnoDB, - PARTITION p3 VALUES LESS THAN (1986) ENGINE = InnoDB, - PARTITION p4 VALUES LESS THAN (2005) ENGINE = InnoDB, - PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */ ---- Show table on slave -- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (YEAR(t)) -(PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster, - PARTITION p1 VALUES LESS THAN (1946) ENGINE = ndbcluster, - PARTITION p2 VALUES LESS THAN (1966) ENGINE = ndbcluster, - PARTITION p3 VALUES LESS THAN (1986) ENGINE = ndbcluster, - PARTITION p4 VALUES LESS THAN (2005) ENGINE = ndbcluster, - PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = ndbcluster) */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 ADD PRIMARY KEY(t,id); -ALTER TABLE t1 MODIFY vc TEXT; ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date NOT NULL DEFAULT '0000-00-00', - PRIMARY KEY (`t`,`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (YEAR(t)) -(PARTITION p0 VALUES LESS THAN (1901) ENGINE = InnoDB, - PARTITION p1 VALUES LESS THAN (1946) ENGINE = InnoDB, - PARTITION p2 VALUES LESS THAN (1966) ENGINE = InnoDB, - PARTITION p3 VALUES LESS THAN (1986) ENGINE = InnoDB, - PARTITION p4 VALUES LESS THAN (2005) ENGINE = InnoDB, - PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */ ---- Make sure that our tables on slave are still same engine --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date NOT NULL DEFAULT '0000-00-00', - PRIMARY KEY (`t`,`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (YEAR(t)) -(PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster, - PARTITION p1 VALUES LESS THAN (1946) ENGINE = ndbcluster, - PARTITION p2 VALUES LESS THAN (1966) ENGINE = ndbcluster, - PARTITION p3 VALUES LESS THAN (1986) ENGINE = ndbcluster, - PARTITION p4 VALUES LESS THAN (2005) ENGINE = ndbcluster, - PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = ndbcluster) */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- End test 2 partition RANGE testing --- ---- Do Cleanup --- -DROP TABLE IF EXISTS t1; ---- Start test 3 partition LIST testing --- ---- Do setup --- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), -bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE) -PARTITION BY LIST(id) -(PARTITION p0 VALUES IN (2, 4), -PARTITION p1 VALUES IN (42, 142)); ---- Test 3 Alter to add partition --- -ALTER TABLE t1 ADD PARTITION (PARTITION p2 VALUES IN (412)); ---- Show table on master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (id) -(PARTITION p0 VALUES IN (2,4) ENGINE = InnoDB, - PARTITION p1 VALUES IN (42,142) ENGINE = InnoDB, - PARTITION p2 VALUES IN (412) ENGINE = InnoDB) */ ---- Show table on slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (id) -(PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (42,142) ENGINE = ndbcluster, - PARTITION p2 VALUES IN (412) ENGINE = ndbcluster) */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 ADD PRIMARY KEY(id); -ALTER TABLE t1 MODIFY vc TEXT; ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (id) -(PARTITION p0 VALUES IN (2,4) ENGINE = InnoDB, - PARTITION p1 VALUES IN (42,142) ENGINE = InnoDB, - PARTITION p2 VALUES IN (412) ENGINE = InnoDB) */ ---- Make sure that our tables on slave are still same engine --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (id) -(PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (42,142) ENGINE = ndbcluster, - PARTITION p2 VALUES IN (412) ENGINE = ndbcluster) */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- End test 3 partition LIST testing --- ---- Do Cleanup -- -DROP TABLE IF EXISTS t1; ---- Start test 4 partition HASH testing --- ---- Do setup --- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), -bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE) -PARTITION BY HASH( YEAR(t) ) -PARTITIONS 4; ---- show that tables have been created correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH ( YEAR(t)) -PARTITIONS 4 */ -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH ( YEAR(t)) -PARTITIONS 4 */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 ADD PRIMARY KEY(t,id); -ALTER TABLE t1 MODIFY vc TEXT; ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date NOT NULL DEFAULT '0000-00-00', - PRIMARY KEY (`t`,`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH ( YEAR(t)) -PARTITIONS 4 */ ---- Make sure that our tables on slave are still same engine --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date NOT NULL DEFAULT '0000-00-00', - PRIMARY KEY (`t`,`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH ( YEAR(t)) -PARTITIONS 4 */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- End test 4 partition HASH testing --- ---- Do Cleanup -- -DROP TABLE IF EXISTS t1; ---- Start test 5 partition by key testing --- ---- Create Table Section --- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), -bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE,PRIMARY KEY(id)) -PARTITION BY KEY() -PARTITIONS 4; ---- Show that tables on master are ndbcluster tables --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY () -PARTITIONS 4 */ ---- Show that tables on slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY () -PARTITIONS 4 */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(id, total); ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY () -PARTITIONS 4 */ ---- Make sure that our tables on slave are still right type --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY () -PARTITIONS 4 */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 MODIFY vc TEXT; ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY () -PARTITIONS 4 */ ---- Make sure that our tables on slave are still same engine --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY () -PARTITIONS 4 */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- End test 5 key partition testing --- ---- Do Cleanup --- -DROP TABLE IF EXISTS t1; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb_trans.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb_trans.result deleted file mode 100644 index 7c3f331958f..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb_trans.result +++ /dev/null @@ -1,103 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -create table t1 (a int, unique(a)) engine=ndbcluster; -create table t2 (a int, unique(a)) engine=innodb; -begin; -insert into t1 values(1); -insert into t2 values(1); -rollback; -select count(*) from t1; -count(*) -0 -select count(*) from t2; -count(*) -0 -select count(*) from t1; -count(*) -0 -select count(*) from t2; -count(*) -0 -begin; -load data infile '../../../std_data/rpl_loaddata.dat' into table t2; -Warnings: -Warning 1262 Row 1 was truncated; it contained more data than there were input columns -Warning 1262 Row 2 was truncated; it contained more data than there were input columns -load data infile '../../../std_data/rpl_loaddata.dat' into table t1; -Warnings: -Warning 1262 Row 1 was truncated; it contained more data than there were input columns -Warning 1262 Row 2 was truncated; it contained more data than there were input columns -rollback; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -select count(*) from t1; -count(*) -2 -select count(*) from t2; -count(*) -0 -select count(*) from t1; -count(*) -2 -select count(*) from t2; -count(*) -0 -delete from t1; -delete from t2; -begin; -load data infile '../../../std_data/rpl_loaddata.dat' into table t2; -Warnings: -Warning 1262 Row 1 was truncated; it contained more data than there were input columns -Warning 1262 Row 2 was truncated; it contained more data than there were input columns -load data infile '../../../std_data/rpl_loaddata.dat' into table t1; -Warnings: -Warning 1262 Row 1 was truncated; it contained more data than there were input columns -Warning 1262 Row 2 was truncated; it contained more data than there were input columns -rollback; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -select count(*) from t1; -count(*) -2 -select count(*) from t2; -count(*) -0 -select count(*) from t1; -count(*) -2 -select count(*) from t2; -count(*) -0 -delete from t1; -delete from t2; -begin; -insert into t2 values(3),(4); -insert into t1 values(3),(4); -load data infile '../../../std_data/rpl_loaddata.dat' into table t2; -Warnings: -Warning 1262 Row 1 was truncated; it contained more data than there were input columns -Warning 1262 Row 2 was truncated; it contained more data than there were input columns -load data infile '../../../std_data/rpl_loaddata.dat' into table t1; -Warnings: -Warning 1262 Row 1 was truncated; it contained more data than there were input columns -Warning 1262 Row 2 was truncated; it contained more data than there were input columns -rollback; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -select count(*) from t1; -count(*) -4 -select count(*) from t2; -count(*) -0 -select count(*) from t1; -count(*) -4 -select count(*) from t2; -count(*) -0 -drop table t1,t2; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_insert_ignore.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_insert_ignore.result deleted file mode 100644 index 030845e89e2..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_insert_ignore.result +++ /dev/null @@ -1,70 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -CREATE TABLE t1 ( -a int unsigned not null auto_increment primary key, -b int unsigned, -unique (b) -) ENGINE=NDB; -CREATE TABLE t2 ( -a int unsigned, # to force INSERT SELECT to have a certain order -b int unsigned -) ENGINE=NDB; -INSERT INTO t1 VALUES (NULL, 1); -INSERT INTO t1 VALUES (NULL, 2); -INSERT INTO t1 VALUES (NULL, 3); -INSERT INTO t1 VALUES (NULL, 4); -INSERT INTO t2 VALUES (1, 1); -INSERT INTO t2 VALUES (2, 2); -INSERT INTO t2 VALUES (3, 5); -INSERT INTO t2 VALUES (4, 3); -INSERT INTO t2 VALUES (5, 4); -INSERT INTO t2 VALUES (6, 6); -INSERT IGNORE INTO t1 SELECT NULL, t2.b FROM t2 ORDER BY t2.a; -SELECT * FROM t1 ORDER BY a; -a b -1 1 -2 2 -3 3 -4 4 -5 5 -6 6 -SELECT * FROM t1 ORDER BY a; -a b -1 1 -2 2 -3 3 -4 4 -5 5 -6 6 -drop table t1; -CREATE TABLE t1 ( -a int unsigned not null auto_increment primary key, -b int unsigned, -unique (b) -) ENGINE=myisam; -INSERT INTO t1 VALUES (1, 1); -INSERT INTO t1 VALUES (2, 2); -INSERT INTO t1 VALUES (3, 3); -INSERT INTO t1 VALUES (4, 4); -INSERT IGNORE INTO t1 SELECT NULL, t2.b FROM t2 ORDER BY t2.a; -SELECT * FROM t1 ORDER BY a; -a b -1 1 -2 2 -3 3 -4 4 -5 5 -6 6 -SELECT * FROM t1 ORDER BY a; -a b -1 1 -2 2 -3 3 -4 4 -5 5 -6 6 -drop table t1, t2; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_load.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_load.result deleted file mode 100644 index e51f0096557..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_load.result +++ /dev/null @@ -1,42 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -DROP DATABASE IF EXISTS TEST_DB; -CREATE DATABASE TEST_DB; -USE TEST_DB; -CREATE TABLE SUBSCRIBER -( NUMBER CHAR(12) BINARY NOT NULL, -NAME CHAR(32) BINARY NOT NULL, -GROUP_ID INT UNSIGNED NOT NULL, -LOCATION INT UNSIGNED NOT NULL, -SESSIONS INT UNSIGNED NOT NULL, -CHANGED_BY CHAR(32) BINARY NOT NULL, -CHANGED_TIME CHAR(32) BINARY NOT NULL, -PRIMARY KEY USING HASH (NUMBER)) -ENGINE = NDB; -CREATE TABLE GROUP2 -( GROUP_ID INT UNSIGNED NOT NULL, -GROUP_NAME CHAR(32) BINARY NOT NULL, -ALLOW_READ CHAR(1) BINARY NOT NULL, -ALLOW_INSERT INT UNSIGNED NOT NULL, -ALLOW_DELETE INT UNSIGNED NOT NULL, -PRIMARY KEY USING HASH (GROUP_ID)) -ENGINE = NDB; -CREATE TABLE SESSION -( NUMBER CHAR(12) BINARY NOT NULL, -SERVER_ID INT UNSIGNED NOT NULL, -DATA BINARY(2000) NOT NULL, -PRIMARY KEY USING HASH (NUMBER,SERVER_ID)) -ENGINE = NDB; -CREATE TABLE SERVER -( SUFFIX CHAR(2) BINARY NOT NULL, -SERVER_ID INT UNSIGNED NOT NULL, -NAME CHAR(32) BINARY NOT NULL, -NO_OF_READ INT UNSIGNED NOT NULL, -NO_OF_INSERT INT UNSIGNED NOT NULL, -NO_OF_DELETE INT UNSIGNED NOT NULL, -PRIMARY KEY USING HASH (SUFFIX, SERVER_ID)) -ENGINE = NDB; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result deleted file mode 100644 index ef563d71342..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result +++ /dev/null @@ -1,294 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -include/stop_slave.inc -reset master; -reset slave; -start slave; -create table t1(n int not null auto_increment primary key)ENGINE=NDB; -insert into t1 values (NULL); -drop table t1; -create table t1 (word char(20) not null)ENGINE=NDB; -load data infile 'LOAD_FILE' into table t1 ignore 1 lines; -select count(*) from t1; -count(*) -69 -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=NDB -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT -master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */ -master-bin.000001 # Query # # use `test`; create table t1 (word char(20) not null)ENGINE=NDB -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT -show binlog events from limit 1; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=NDB -show binlog events from limit 2; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=NDB -master-bin.000001 # Query # # BEGIN -show binlog events from limit 1,4; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -flush logs; -create table t3 (a int)ENGINE=NDB; -select * from t1 order by 1 asc; -word -Aarhus -Aaron -Aaron -Ababa -Ababa -aback -aback -abaft -abaft -abandon -abandon -abandoned -abandoned -abandoning -abandoning -abandonment -abandonment -abandons -abandons -abase -abased -abasement -abasements -abases -abash -abashed -abashes -abashing -abasing -abate -abated -abatement -abatements -abater -abates -abating -Abba -abbe -abbey -abbeys -abbot -abbots -Abbott -abbreviate -abbreviated -abbreviates -abbreviating -abbreviation -abbreviations -Abby -abdomen -abdomens -abdominal -abduct -abducted -abduction -abductions -abductor -abductors -abducts -Abe -abed -Abel -Abelian -Abelson -Aberdeen -Abernathy -aberrant -aberration -select * from t1 order by 1 asc; -word -Aarhus -Aaron -Aaron -Ababa -Ababa -aback -aback -abaft -abaft -abandon -abandon -abandoned -abandoned -abandoning -abandoning -abandonment -abandonment -abandons -abandons -abase -abased -abasement -abasements -abases -abash -abashed -abashes -abashing -abasing -abate -abated -abatement -abatements -abater -abates -abating -Abba -abbe -abbey -abbeys -abbot -abbots -Abbott -abbreviate -abbreviated -abbreviates -abbreviating -abbreviation -abbreviations -Abby -abdomen -abdomens -abdominal -abduct -abducted -abduction -abductions -abductor -abductors -abducts -Abe -abed -Abel -Abelian -Abelson -Aberdeen -Abernathy -aberrant -aberration -flush logs; -include/stop_slave.inc -include/start_slave.inc -create table t2 (n int)ENGINE=NDB; -insert into t2 values (1); -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=NDB -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT -master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */ -master-bin.000001 # Query # # use `test`; create table t1 (word char(20) not null)ENGINE=NDB -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT -master-bin.000001 # Rotate # # master-bin.000002;pos=4 -show binlog events in 'master-bin.000002' from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000002 # Query # # use `test`; create table t3 (a int)ENGINE=NDB -master-bin.000002 # Query # # use `test`; create table t2 (n int)ENGINE=NDB -master-bin.000002 # Query # # BEGIN -master-bin.000002 # Table_map # # table_id: # (test.t2) -master-bin.000002 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000002 # Write_rows # # table_id: # -master-bin.000002 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000002 # Query # # COMMIT -show binary logs; -Log_name File_size -master-bin.000001 # -master-bin.000002 # -show binary logs; -Log_name File_size -slave-bin.000001 # -slave-bin.000002 # -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -slave-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=NDB -slave-bin.000001 # Query # # BEGIN -slave-bin.000001 # Table_map # # table_id: # (test.t1) -slave-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -slave-bin.000001 # Write_rows # # table_id: # -slave-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -slave-bin.000001 # Query # # COMMIT -slave-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */ -slave-bin.000001 # Query # # use `test`; create table t1 (word char(20) not null)ENGINE=NDB -slave-bin.000001 # Query # # BEGIN -slave-bin.000001 # Table_map # # table_id: # (test.t1) -slave-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -slave-bin.000001 # Write_rows # # table_id: # -slave-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -slave-bin.000001 # Query # # COMMIT -slave-bin.000001 # Query # # use `test`; create table t3 (a int)ENGINE=NDB -slave-bin.000001 # Rotate # # slave-bin.000002;pos=4 -show binlog events in 'slave-bin.000002' from ; -Log_name Pos Event_type Server_id End_log_pos Info -slave-bin.000002 # Query # # use `test`; create table t2 (n int)ENGINE=NDB -slave-bin.000002 # Query # # BEGIN -slave-bin.000002 # Table_map # # table_id: # (test.t2) -slave-bin.000002 # Table_map # # table_id: # (mysql.ndb_apply_status) -slave-bin.000002 # Write_rows # # table_id: # -slave-bin.000002 # Write_rows # # table_id: # flags: STMT_END_F -slave-bin.000002 # Query # # COMMIT -Checking that both slave threads are running. -show binlog events in 'slave-bin.000005' from 4; -ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log -DROP TABLE t1; -DROP TABLE t2; -DROP TABLE t3; -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -create table t1(a int auto_increment primary key, b int); -insert into t1 values (NULL, 1); -set insert_id=5; -insert into t1 values (NULL, last_insert_id()), (NULL, last_insert_id()); -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; create table t1(a int auto_increment primary key, b int) -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT -select * from t1; -a b -1 1 -5 1 -6 1 -drop table t1; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_engines_transactions.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_engines_transactions.result deleted file mode 100644 index 7caa88a16a1..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_engines_transactions.result +++ /dev/null @@ -1,486 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -CREATE TABLE tmyisam (a int) ENGINE = MYISAM; -CREATE TABLE tinnodb (a int) ENGINE = INNODB; -CREATE TABLE tndb (a int) ENGINE = NDB; -SHOW CREATE TABLE tmyisam; -Table Create Table -tmyisam CREATE TABLE `tmyisam` ( - `a` int(11) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -SHOW CREATE TABLE tinnodb; -Table Create Table -tinnodb CREATE TABLE `tinnodb` ( - `a` int(11) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -SHOW CREATE TABLE tndb; -Table Create Table -tndb CREATE TABLE `tndb` ( - `a` int(11) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -[on master] -==== Single-engine transactions ==== ----- autocommitted ---- -SET AUTOCOMMIT = 1; -INSERT INTO tmyisam VALUES (0); -INSERT INTO tinnodb VALUES (1); -INSERT INTO tndb VALUES (2); ----- committed with BEGIN ---- -BEGIN; -INSERT INTO tmyisam VALUES (3); -INSERT INTO tmyisam VALUES (4); -COMMIT; -BEGIN; -INSERT INTO tinnodb VALUES (5); -INSERT INTO tinnodb VALUES (6); -COMMIT; -BEGIN; -INSERT INTO tndb VALUES (7); -INSERT INTO tndb VALUES (8); -COMMIT; ----- rolled back with BEGIN ---- -BEGIN; -INSERT INTO tmyisam VALUES (9); -INSERT INTO tmyisam VALUES (10); -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -BEGIN; -INSERT INTO tinnodb VALUES (11); -INSERT INTO tinnodb VALUES (12); -ROLLBACK; -BEGIN; -INSERT INTO tndb VALUES (13); -INSERT INTO tndb VALUES (14); -ROLLBACK; ----- committed with AUTOCOMMIT = 0 ---- -SET AUTOCOMMIT = 0; -INSERT INTO tmyisam VALUES (15); -INSERT INTO tmyisam VALUES (16); -COMMIT; -INSERT INTO tinnodb VALUES (17); -INSERT INTO tinnodb VALUES (18); -COMMIT; -INSERT INTO tndb VALUES (19); -INSERT INTO tndb VALUES (20); -COMMIT; ----- rolled back with AUTOCOMMIT = 0 ---- -INSERT INTO tmyisam VALUES (21); -INSERT INTO tmyisam VALUES (22); -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -INSERT INTO tinnodb VALUES (23); -INSERT INTO tinnodb VALUES (24); -ROLLBACK; -INSERT INTO tndb VALUES (25); -INSERT INTO tndb VALUES (26); -ROLLBACK; -SET AUTOCOMMIT = 1; -==== MyISAM + InnoDB ==== ----- committed with BEGIN ---- -BEGIN; -INSERT INTO tmyisam VALUES (27); -INSERT INTO tinnodb VALUES (28); -COMMIT; -BEGIN; -INSERT INTO tinnodb VALUES (29); -INSERT INTO tmyisam VALUES (30); -COMMIT; ----- rolled back with BEGIN ---- -BEGIN; -INSERT INTO tmyisam VALUES (31); -INSERT INTO tinnodb VALUES (32); -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -BEGIN; -INSERT INTO tinnodb VALUES (33); -INSERT INTO tmyisam VALUES (34); -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back ----- committed with AUTOCOMMIT = 0 ---- -SET AUTOCOMMIT = 0; -INSERT INTO tmyisam VALUES (35); -INSERT INTO tinnodb VALUES (36); -COMMIT; -INSERT INTO tinnodb VALUES (37); -INSERT INTO tmyisam VALUES (38); -COMMIT; ----- rolled back with AUTOCOMMIT = 0 ---- -INSERT INTO tmyisam VALUES (39); -INSERT INTO tinnodb VALUES (40); -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -INSERT INTO tinnodb VALUES (41); -INSERT INTO tmyisam VALUES (42); -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -SET AUTOCOMMIT = 1; -==== MyISAM + NDB ==== ----- committed with BEGIN---- -BEGIN; -INSERT INTO tmyisam VALUES (43); -INSERT INTO tndb VALUES (44); -COMMIT; -BEGIN; -INSERT INTO tndb VALUES (45); -INSERT INTO tmyisam VALUES (46); -COMMIT; ----- rolled back with BEGIN ---- -BEGIN; -INSERT INTO tmyisam VALUES (47); -INSERT INTO tndb VALUES (48); -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -BEGIN; -INSERT INTO tndb VALUES (49); -INSERT INTO tmyisam VALUES (50); -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back ----- committed with AUTOCOMMIT = 0 ---- -SET AUTOCOMMIT = 0; -INSERT INTO tmyisam VALUES (51); -INSERT INTO tndb VALUES (52); -COMMIT; -INSERT INTO tndb VALUES (53); -INSERT INTO tmyisam VALUES (54); -COMMIT; ----- rolled back with AUTOCOMMIT = 0 ---- -INSERT INTO tmyisam VALUES (55); -INSERT INTO tndb VALUES (56); -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -INSERT INTO tndb VALUES (57); -INSERT INTO tmyisam VALUES (58); -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -SET AUTOCOMMIT = 1; -==== InnoDB + NDB ==== ----- committed with BEGIN ---- -BEGIN; -INSERT INTO tinnodb VALUES (59); -INSERT INTO tndb VALUES (60); -COMMIT; -BEGIN; -INSERT INTO tndb VALUES (61); -INSERT INTO tinnodb VALUES (62); -COMMIT; ----- rolled back with BEGIN ---- -BEGIN; -INSERT INTO tinnodb VALUES (63); -INSERT INTO tndb VALUES (64); -ROLLBACK; -BEGIN; -INSERT INTO tndb VALUES (65); -INSERT INTO tinnodb VALUES (66); -ROLLBACK; ----- committed with AUTOCOMMIT = 0 ---- -SET AUTOCOMMIT = 0; -INSERT INTO tinnodb VALUES (67); -INSERT INTO tndb VALUES (68); -COMMIT; -INSERT INTO tndb VALUES (69); -INSERT INTO tinnodb VALUES (70); -COMMIT; ----- rolled back with AUTOCOMMIT = 0 ---- -INSERT INTO tinnodb VALUES (71); -INSERT INTO tndb VALUES (72); -ROLLBACK; -INSERT INTO tndb VALUES (73); -INSERT INTO tinnodb VALUES (74); -ROLLBACK; -SET AUTOCOMMIT = 1; -==== MyISAM + InnoDB + NDB ==== ----- committed with BEGIN ---- -BEGIN; -INSERT INTO tmyisam VALUES (75); -INSERT INTO tinnodb VALUES (76); -INSERT INTO tndb VALUES (77); -COMMIT; -BEGIN; -INSERT INTO tmyisam VALUES (78); -INSERT INTO tndb VALUES (79); -INSERT INTO tinnodb VALUES (80); -COMMIT; -BEGIN; -INSERT INTO tinnodb VALUES (81); -INSERT INTO tmyisam VALUES (82); -INSERT INTO tndb VALUES (83); -COMMIT; -BEGIN; -INSERT INTO tinnodb VALUES (84); -INSERT INTO tndb VALUES (85); -INSERT INTO tmyisam VALUES (86); -COMMIT; -BEGIN; -INSERT INTO tndb VALUES (87); -INSERT INTO tmyisam VALUES (88); -INSERT INTO tinnodb VALUES (89); -COMMIT; -BEGIN; -INSERT INTO tndb VALUES (90); -INSERT INTO tinnodb VALUES (91); -INSERT INTO tmyisam VALUES (92); -COMMIT; ----- rolled back with BEGIN ---- -BEGIN; -INSERT INTO tmyisam VALUES (93); -INSERT INTO tinnodb VALUES (94); -INSERT INTO tndb VALUES (95); -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -BEGIN; -INSERT INTO tmyisam VALUES (96); -INSERT INTO tndb VALUES (97); -INSERT INTO tinnodb VALUES (98); -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -BEGIN; -INSERT INTO tinnodb VALUES (99); -INSERT INTO tmyisam VALUES (100); -INSERT INTO tndb VALUES (101); -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -BEGIN; -INSERT INTO tinnodb VALUES (102); -INSERT INTO tndb VALUES (103); -INSERT INTO tmyisam VALUES (104); -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -BEGIN; -INSERT INTO tndb VALUES (105); -INSERT INTO tmyisam VALUES (106); -INSERT INTO tinnodb VALUES (107); -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -BEGIN; -INSERT INTO tndb VALUES (108); -INSERT INTO tinnodb VALUES (109); -INSERT INTO tmyisam VALUES (110); -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back ----- committed with AUTOCOMMIT = 0 ---- -SET AUTOCOMMIT = 0; -INSERT INTO tmyisam VALUES (111); -INSERT INTO tinnodb VALUES (112); -INSERT INTO tndb VALUES (113); -COMMIT; -INSERT INTO tmyisam VALUES (114); -INSERT INTO tndb VALUES (115); -INSERT INTO tinnodb VALUES (116); -COMMIT; -INSERT INTO tinnodb VALUES (117); -INSERT INTO tmyisam VALUES (118); -INSERT INTO tndb VALUES (119); -COMMIT; -INSERT INTO tinnodb VALUES (120); -INSERT INTO tndb VALUES (121); -INSERT INTO tmyisam VALUES (122); -COMMIT; -INSERT INTO tndb VALUES (123); -INSERT INTO tmyisam VALUES (124); -INSERT INTO tinnodb VALUES (125); -COMMIT; -INSERT INTO tndb VALUES (126); -INSERT INTO tinnodb VALUES (127); -INSERT INTO tmyisam VALUES (128); -COMMIT; ----- rolled back with AUTOCOMMIT = 0 ---- -INSERT INTO tmyisam VALUES (129); -INSERT INTO tinnodb VALUES (130); -INSERT INTO tndb VALUES (131); -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -INSERT INTO tmyisam VALUES (132); -INSERT INTO tndb VALUES (133); -INSERT INTO tinnodb VALUES (134); -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -INSERT INTO tinnodb VALUES (135); -INSERT INTO tmyisam VALUES (136); -INSERT INTO tndb VALUES (137); -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -INSERT INTO tinnodb VALUES (138); -INSERT INTO tndb VALUES (139); -INSERT INTO tmyisam VALUES (140); -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -INSERT INTO tndb VALUES (141); -INSERT INTO tmyisam VALUES (142); -INSERT INTO tinnodb VALUES (143); -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -INSERT INTO tndb VALUES (144); -INSERT INTO tinnodb VALUES (145); -INSERT INTO tmyisam VALUES (146); -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -SET AUTOCOMMIT = 1; ----- Mixed statements Innodb ---- -BEGIN; -INSERT INTO tndb VALUES (147); -INSERT INTO tinnodb SELECT * FROM tndb ORDER BY a DESC LIMIT 1; -COMMIT; -INSERT INTO tndb VALUES (148); -BEGIN; -INSERT INTO tinnodb SELECT * FROM tndb ORDER BY a DESC LIMIT 1; -INSERT INTO tndb VALUES (149); -COMMIT; -BEGIN; -INSERT INTO tndb VALUES (150); -INSERT INTO tmyisam SELECT * FROM tndb ORDER BY a DESC LIMIT 1; -COMMIT; -INSERT INTO tndb VALUES (151); -BEGIN; -INSERT INTO tmyisam SELECT * FROM tndb ORDER BY a DESC LIMIT 1; -INSERT INTO tndb VALUES (152); -COMMIT; -==== Verify the result ==== -SELECT * FROM tmyisam ORDER BY a; -a -0 -3 -4 -9 -10 -15 -16 -21 -22 -27 -30 -31 -34 -35 -38 -39 -42 -43 -46 -47 -50 -51 -54 -55 -58 -75 -78 -82 -86 -88 -92 -93 -96 -100 -104 -106 -110 -111 -114 -118 -122 -124 -128 -129 -132 -136 -140 -142 -146 -150 -151 -SELECT * FROM tinnodb ORDER BY a; -a -1 -5 -6 -17 -18 -28 -29 -36 -37 -59 -62 -67 -70 -76 -80 -81 -84 -89 -91 -112 -116 -117 -120 -125 -127 -147 -148 -SELECT * FROM tndb ORDER BY a; -a -2 -7 -8 -19 -20 -44 -45 -52 -53 -60 -61 -68 -69 -77 -79 -83 -85 -87 -90 -113 -115 -119 -121 -123 -126 -147 -148 -149 -150 -151 -152 -[on slave] -Comparing tables master:test.tmyisam and slave:test.tmyisam -Comparing tables master:test.tinnodb and slave:test.tinnodb -Comparing tables master:test.tndb and slave:test.tndb -==== Clean up ==== -[on master] -DROP TABLE tmyisam, tinnodb, tndb; -[on slave] diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_implicit_commit_binlog.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_implicit_commit_binlog.result deleted file mode 100644 index 65e5469c9eb..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_implicit_commit_binlog.result +++ /dev/null @@ -1,660 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -######################################################################### -# CONFIGURATION -######################################################################### -CREATE TABLE tt_1 (ddl_case INT, PRIMARY KEY(ddl_case)) ENGINE = NDB; -CREATE TABLE tt_2 (ddl_case INT, PRIMARY KEY(ddl_case)) ENGINE = NDB; -CREATE TABLE nt_1 (ddl_case INT, PRIMARY KEY(ddl_case)) ENGINE = MyIsam; -INSERT INTO tt_1(ddl_case) VALUES(0); -INSERT INTO tt_2(ddl_case) VALUES(0); -######################################################################### -# CHECK IMPLICT COMMIT -######################################################################### -SET AUTOCOMMIT= 0; --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (41); -LOAD INDEX INTO CACHE nt_1 IGNORE LEAVES; -Table Op Msg_type Msg_text -test.nt_1 preload_keys status OK --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (test.tt_2) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (40); -LOAD INDEX INTO CACHE tt_1, tt_2 IGNORE LEAVES; -Table Op Msg_type Msg_text -test.tt_1 preload_keys note The storage engine for the table doesn't support preload_keys -test.tt_2 preload_keys note The storage engine for the table doesn't support preload_keys --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (39); -ANALYZE TABLE nt_1; -Table Op Msg_type Msg_text -test.nt_1 analyze status Table is already up to date --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; ANALYZE TABLE nt_1 -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (38); -CHECK TABLE nt_1; -Table Op Msg_type Msg_text -test.nt_1 check status OK --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (37); -OPTIMIZE TABLE nt_1; -Table Op Msg_type Msg_text -test.nt_1 optimize status Table is already up to date --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; OPTIMIZE TABLE nt_1 -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (36); -REPAIR TABLE nt_1; -Table Op Msg_type Msg_text -test.nt_1 repair status OK --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; REPAIR TABLE nt_1 -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (35); -LOCK TABLES tt_1 WRITE; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (34); -UNLOCK TABLES; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (33); -CREATE USER 'user'@'localhost'; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; CREATE USER 'user'@'localhost' -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (32); -GRANT ALL ON *.* TO 'user'@'localhost'; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; GRANT ALL ON *.* TO 'user'@'localhost' -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (31); -SET PASSWORD FOR 'user'@'localhost' = PASSWORD('newpass'); --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; SET PASSWORD FOR 'user'@'localhost'='*D8DECEC305209EEFEC43008E1D420E1AA06B19E0' -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (30); -REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'user'@'localhost'; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'user'@'localhost' -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (29); -RENAME USER 'user'@'localhost' TO 'user_new'@'localhost'; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; RENAME USER 'user'@'localhost' TO 'user_new'@'localhost' -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (28); -DROP USER 'user_new'@'localhost'; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; DROP USER 'user_new'@'localhost' -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (27); -CREATE EVENT evt ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR DO SELECT * FROM tt_1; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` EVENT evt ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR DO SELECT * FROM tt_1 -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (26); -ALTER EVENT evt COMMENT 'evt'; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; ALTER EVENT evt COMMENT 'evt' -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (25); -DROP EVENT evt; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; DROP EVENT evt -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (24); -CREATE TRIGGER tr AFTER INSERT ON tt_1 FOR EACH ROW UPDATE tt_2 SET ddl_case = ddl_case WHERE ddl_case= NEW.ddl_case; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` TRIGGER tr AFTER INSERT ON tt_1 FOR EACH ROW UPDATE tt_2 SET ddl_case = ddl_case WHERE ddl_case= NEW.ddl_case -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (23); -DROP TRIGGER tr; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; DROP TRIGGER tr -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (22); -CREATE FUNCTION fc () RETURNS VARCHAR(64) RETURN "fc"; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` FUNCTION `fc`() RETURNS varchar(64) CHARSET latin1 -RETURN "fc" -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (21); -ALTER FUNCTION fc COMMENT 'fc'; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; ALTER FUNCTION fc COMMENT 'fc' -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (20); -DROP FUNCTION fc; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; DROP FUNCTION fc -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (19); -CREATE PROCEDURE pc () UPDATE tt_2 SET ddl_case = ddl_case WHERE ddl_case= NEW.ddl_case; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` PROCEDURE `pc`() -UPDATE tt_2 SET ddl_case = ddl_case WHERE ddl_case= NEW.ddl_case -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (18); -ALTER PROCEDURE pc COMMENT 'pc'; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; ALTER PROCEDURE pc COMMENT 'pc' -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (17); -DROP PROCEDURE pc; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; DROP PROCEDURE pc -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (16); -CREATE VIEW v AS SELECT * FROM tt_1; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v` AS SELECT * FROM tt_1 -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (15); -ALTER VIEW v AS SELECT * FROM tt_1; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; ALTER ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v` AS SELECT * FROM tt_1 -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (14); -DROP VIEW v; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; DROP VIEW v -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (13); -CREATE INDEX ix ON tt_1(ddl_case); --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT -master-bin.000001 # Query # # use `test`; CREATE INDEX ix ON tt_1(ddl_case) --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (12); -DROP INDEX ix ON tt_1; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT -master-bin.000001 # Query # # use `test`; DROP INDEX ix ON tt_1 --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (11); -CREATE TEMPORARY TABLE tt_xx (a int); --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_xx (a int) -master-bin.000001 # Query # # COMMIT -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (10); -ALTER TABLE tt_xx ADD COLUMN (b int); --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (9); -ALTER TABLE tt_xx RENAME new_tt_xx; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (8); -DROP TEMPORARY TABLE IF EXISTS new_tt_xx; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `new_tt_xx` /* generated by server */ -master-bin.000001 # Query # # COMMIT -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (7); -CREATE TABLE tt_xx (a int); --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; CREATE TABLE tt_xx (a int) -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (6); -ALTER TABLE tt_xx ADD COLUMN (b int); --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; ALTER TABLE tt_xx ADD COLUMN (b int) -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (5); -RENAME TABLE tt_xx TO new_tt_xx; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; RENAME TABLE tt_xx TO new_tt_xx -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (4); -TRUNCATE TABLE new_tt_xx; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; TRUNCATE TABLE new_tt_xx -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (3); -DROP TABLE IF EXISTS tt_xx, new_tt_xx; -Warnings: -Note 1051 Unknown table 'tt_xx' --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `tt_xx`,`new_tt_xx` /* generated by server */ -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (2); -CREATE DATABASE db; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT -master-bin.000001 # Query # # CREATE DATABASE db --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (1); -DROP DATABASE IF EXISTS db; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT -master-bin.000001 # Query # # DROP DATABASE IF EXISTS db --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - -################################################################################### -# CHECK CONSISTENCY -################################################################################### -Comparing tables master:test.tt_1 and slave:test.tt_1 -################################################################################### -# CLEAN -################################################################################### -DROP TABLE tt_1; -DROP TABLE tt_2; -DROP TABLE nt_1; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_tables.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_tables.result deleted file mode 100644 index 43efc10c2e1..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_tables.result +++ /dev/null @@ -1,246 +0,0 @@ -==== Initialization ==== -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; ----- setup master ---- -CREATE TABLE myisam_innodb (a INT) ENGINE=MYISAM; -CREATE TABLE innodb_myisam (a INT) ENGINE=INNODB; -CREATE TABLE myisam_ndb (a INT) ENGINE=MYISAM; -CREATE TABLE ndb_myisam (a INT) ENGINE=NDB; -CREATE TABLE innodb_ndb (a INT) ENGINE=INNODB; -CREATE TABLE ndb_innodb (a INT) ENGINE=NDB; -SHOW CREATE TABLE myisam_innodb; -Table Create Table -myisam_innodb CREATE TABLE `myisam_innodb` ( - `a` int(11) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -SHOW CREATE TABLE innodb_myisam; -Table Create Table -innodb_myisam CREATE TABLE `innodb_myisam` ( - `a` int(11) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -SHOW CREATE TABLE myisam_ndb; -Table Create Table -myisam_ndb CREATE TABLE `myisam_ndb` ( - `a` int(11) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -SHOW CREATE TABLE ndb_myisam; -Table Create Table -ndb_myisam CREATE TABLE `ndb_myisam` ( - `a` int(11) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -SHOW CREATE TABLE innodb_ndb; -Table Create Table -innodb_ndb CREATE TABLE `innodb_ndb` ( - `a` int(11) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -SHOW CREATE TABLE ndb_innodb; -Table Create Table -ndb_innodb CREATE TABLE `ndb_innodb` ( - `a` int(11) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 ----- setup slave with different engines ---- -DROP TABLE myisam_innodb, innodb_myisam; -DROP TABLE myisam_ndb, ndb_myisam; -DROP TABLE innodb_ndb, ndb_innodb; -CREATE TABLE myisam_innodb (a INT) ENGINE=INNODB; -CREATE TABLE innodb_myisam (a INT) ENGINE=MYISAM; -CREATE TABLE myisam_ndb (a INT) ENGINE=NDB; -CREATE TABLE ndb_myisam (a INT) ENGINE=MYISAM; -CREATE TABLE innodb_ndb (a INT) ENGINE=NDB; -CREATE TABLE ndb_innodb (a INT) ENGINE=INNODB; -SHOW CREATE TABLE myisam_innodb; -Table Create Table -myisam_innodb CREATE TABLE `myisam_innodb` ( - `a` int(11) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -SHOW CREATE TABLE innodb_myisam; -Table Create Table -innodb_myisam CREATE TABLE `innodb_myisam` ( - `a` int(11) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -SHOW CREATE TABLE myisam_ndb; -Table Create Table -myisam_ndb CREATE TABLE `myisam_ndb` ( - `a` int(11) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -SHOW CREATE TABLE ndb_myisam; -Table Create Table -ndb_myisam CREATE TABLE `ndb_myisam` ( - `a` int(11) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -SHOW CREATE TABLE innodb_ndb; -Table Create Table -innodb_ndb CREATE TABLE `innodb_ndb` ( - `a` int(11) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -SHOW CREATE TABLE ndb_innodb; -Table Create Table -ndb_innodb CREATE TABLE `ndb_innodb` ( - `a` int(11) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -==== AUTOCOMMIT=0, transactions ==== ----- COMMIT ---- -SET AUTOCOMMIT = 0; -BEGIN; -INSERT INTO myisam_innodb VALUES (1); -INSERT INTO myisam_innodb VALUES (2); -COMMIT; -BEGIN; -INSERT INTO innodb_myisam VALUES (3); -INSERT INTO innodb_myisam VALUES (4); -COMMIT; -BEGIN; -INSERT INTO myisam_ndb VALUES (5); -INSERT INTO myisam_ndb VALUES (6); -COMMIT; -BEGIN; -INSERT INTO ndb_myisam VALUES (7); -INSERT INTO ndb_myisam VALUES (8); -COMMIT; -BEGIN; -INSERT INTO ndb_innodb VALUES (9); -INSERT INTO ndb_innodb VALUES (10); -COMMIT; -BEGIN; -INSERT INTO innodb_ndb VALUES (11); -INSERT INTO innodb_ndb VALUES (12); -COMMIT; ----- ROLLBACK ---- -BEGIN; -INSERT INTO innodb_myisam VALUES (15); -INSERT INTO innodb_myisam VALUES (16); -ROLLBACK; -BEGIN; -INSERT INTO ndb_myisam VALUES (19); -INSERT INTO ndb_myisam VALUES (20); -ROLLBACK; -BEGIN; -INSERT INTO ndb_innodb VALUES (21); -INSERT INTO ndb_innodb VALUES (22); -ROLLBACK; -BEGIN; -INSERT INTO innodb_ndb VALUES (23); -INSERT INTO innodb_ndb VALUES (24); -ROLLBACK; -==== AUTOCOMMIT=1, transactions ==== ----- COMMIT ---- -SET AUTOCOMMIT = 1; -BEGIN; -INSERT INTO myisam_innodb VALUES (25); -INSERT INTO myisam_innodb VALUES (26); -COMMIT; -BEGIN; -INSERT INTO innodb_myisam VALUES (27); -INSERT INTO innodb_myisam VALUES (28); -COMMIT; -BEGIN; -INSERT INTO myisam_ndb VALUES (29); -INSERT INTO myisam_ndb VALUES (30); -COMMIT; -BEGIN; -INSERT INTO ndb_myisam VALUES (31); -INSERT INTO ndb_myisam VALUES (32); -COMMIT; -BEGIN; -INSERT INTO ndb_innodb VALUES (33); -INSERT INTO ndb_innodb VALUES (34); -COMMIT; -BEGIN; -INSERT INTO innodb_ndb VALUES (35); -INSERT INTO innodb_ndb VALUES (36); -COMMIT; ----- ROLLBACK ---- -BEGIN; -INSERT INTO innodb_myisam VALUES (39); -INSERT INTO innodb_myisam VALUES (40); -ROLLBACK; -BEGIN; -INSERT INTO ndb_myisam VALUES (43); -INSERT INTO ndb_myisam VALUES (44); -ROLLBACK; -BEGIN; -INSERT INTO ndb_innodb VALUES (45); -INSERT INTO ndb_innodb VALUES (46); -ROLLBACK; -BEGIN; -INSERT INTO innodb_ndb VALUES (47); -INSERT INTO innodb_ndb VALUES (48); -ROLLBACK; -==== AUTOCOMMIT=1, single statements ==== -INSERT INTO myisam_innodb VALUES (49); -INSERT INTO myisam_innodb VALUES (50); -INSERT INTO innodb_myisam VALUES (51); -INSERT INTO innodb_myisam VALUES (52); -INSERT INTO myisam_ndb VALUES (53); -INSERT INTO myisam_ndb VALUES (54); -INSERT INTO ndb_myisam VALUES (55); -INSERT INTO ndb_myisam VALUES (56); -INSERT INTO ndb_innodb VALUES (57); -INSERT INTO ndb_innodb VALUES (58); -INSERT INTO innodb_ndb VALUES (59); -INSERT INTO innodb_ndb VALUES (60); -==== AUTOCOMMIT=0, single statements, myisam on master ==== -SET AUTOCOMMIT = 0; -==== Show results ==== -SELECT * FROM myisam_innodb ORDER BY a; -a -1 -2 -25 -26 -49 -50 -SELECT * FROM innodb_myisam ORDER BY a; -a -3 -4 -27 -28 -51 -52 -SELECT * FROM myisam_ndb ORDER BY a; -a -5 -6 -29 -30 -53 -54 -SELECT * FROM ndb_myisam ORDER BY a; -a -7 -8 -31 -32 -55 -56 -SELECT * FROM innodb_ndb ORDER BY a; -a -11 -12 -35 -36 -59 -60 -SELECT * FROM ndb_innodb ORDER BY a; -a -9 -10 -33 -34 -57 -58 -Comparing tables master:test.myisam_innodb and slave:test.myisam_innodb -Comparing tables master:test.innodb_myisam and slave:test.innodb_myisam -Comparing tables master:test.myisam_ndb and slave:test.myisam_ndb -Comparing tables master:test.ndb_myisam and slave:test.ndb_myisam -Comparing tables master:test.innodb_ndb and slave:test.innodb_ndb -Comparing tables master:test.ndb_innodb and slave:test.ndb_innodb -==== Clean up ==== -drop table myisam_innodb, innodb_myisam; -drop table myisam_ndb, ndb_myisam; -drop table innodb_ndb, ndb_innodb; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_multi.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_multi.result deleted file mode 100644 index b17d30fa8e4..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_multi.result +++ /dev/null @@ -1,57 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -CREATE TABLE t1 (c1 CHAR(15), c2 CHAR(15), c3 INT, PRIMARY KEY (c3)) ENGINE = NDB ; -reset master; -SHOW TABLES; -Tables_in_test -t1 -INSERT INTO t1 VALUES ("row1","will go away",1); -SELECT * FROM t1 ORDER BY c3; -c1 c2 c3 -row1 will go away 1 -SELECT * FROM t1 ORDER BY c3; -c1 c2 c3 -row1 will go away 1 -SELECT @the_epoch:=MAX(epoch) FROM mysql.ndb_apply_status; -@the_epoch:=MAX(epoch) - -SELECT * FROM t1 ORDER BY c3; -c1 c2 c3 -row1 will go away 1 -stop slave; -SELECT @the_pos:=Position,@the_file:=SUBSTRING_INDEX(FILE, '/', -1) -FROM mysql.ndb_binlog_index WHERE epoch = ; -@the_pos:=Position @the_file:=SUBSTRING_INDEX(FILE, '/', -1) -107 master-bin.000001 -CHANGE MASTER TO -master_port=, -master_log_file = 'master-bin.000001', -master_log_pos = BINLOG_START ; -start slave; -INSERT INTO t1 VALUES ("row2","will go away",2),("row3","will change",3),("row4","D",4); -DELETE FROM t1 WHERE c3 = 1; -UPDATE t1 SET c2="should go away" WHERE c3 = 2; -UPDATE t1 SET c2="C" WHERE c3 = 3; -DELETE FROM t1 WHERE c3 = 2; -SELECT * FROM t1 ORDER BY c3; -c1 c2 c3 -row3 C 3 -row4 D 4 -INSERT INTO t1 VALUES ("row5","E",5); -SELECT * FROM t1 ORDER BY c3; -c1 c2 c3 -row3 C 3 -row4 D 4 -row5 E 5 -SELECT * FROM t1 ORDER BY c3; -c1 c2 c3 -row3 C 3 -row4 D 4 -row5 E 5 -==== clean up ==== -DROP TABLE t1; -STOP SLAVE; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_multi_update2.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_multi_update2.result deleted file mode 100644 index 5d00ae6598c..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_multi_update2.result +++ /dev/null @@ -1,55 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -drop table if exists t1,t2; -CREATE TABLE t1 ( -a int unsigned not null auto_increment primary key, -b int unsigned -) ENGINE=NDB; -CREATE TABLE t2 ( -a int unsigned not null auto_increment primary key, -b int unsigned -) ENGINE=NDB; -INSERT INTO t1 VALUES (NULL, 0); -INSERT INTO t1 SELECT NULL, 0 FROM t1; -INSERT INTO t2 VALUES (NULL, 0), (NULL,1); -SELECT * FROM t1 ORDER BY a; -a b -1 0 -2 0 -SELECT * FROM t2 ORDER BY a; -a b -1 0 -2 1 -UPDATE t1, t2 SET t1.b = (t2.b+4) WHERE t1.a = t2.a; -SELECT * FROM t1 ORDER BY a; -a b -1 4 -2 5 -SELECT * FROM t2 ORDER BY a; -a b -1 0 -2 1 -SELECT * FROM t1 ORDER BY a; -a b -1 4 -2 5 -SELECT * FROM t2 ORDER BY a; -a b -1 0 -2 1 -drop table t1,t2; -reset master; -CREATE TABLE t1 ( a INT ); -INSERT INTO t1 VALUES (0); -UPDATE t1, (SELECT 3 as b) AS x SET t1.a = x.b; -select * from t1; -a -3 -select * from t1; -a -3 -drop table t1; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_multi_update3.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_multi_update3.result deleted file mode 100644 index dc4e11c9c9e..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_multi_update3.result +++ /dev/null @@ -1,197 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; - --------- Test for BUG#9361 -------- -CREATE TABLE t1 ( -a int unsigned not null auto_increment primary key, -b int unsigned -) ENGINE=NDB; -CREATE TABLE t2 ( -a int unsigned not null auto_increment primary key, -b int unsigned -) ENGINE=NDB; -INSERT INTO t1 VALUES (NULL, 0); -INSERT INTO t1 SELECT NULL, 0 FROM t1; -INSERT INTO t2 VALUES (NULL, 0), (NULL,1); -SELECT * FROM t1 ORDER BY a; -a b -1 0 -2 0 -SELECT * FROM t2 ORDER BY a; -a b -1 0 -2 1 -UPDATE t2, (SELECT a FROM t1 ORDER BY a) AS t SET t2.b = t.a+5 ; -SELECT * FROM t1 ORDER BY a; -a b -1 0 -2 0 -SELECT * FROM t2 ORDER BY a; -a b -1 6 -2 6 -SELECT * FROM t1 ORDER BY a; -a b -1 0 -2 0 -SELECT * FROM t2 ORDER BY a; -a b -1 6 -2 6 -drop table t1,t2; - --------- Test 1 for BUG#9361 -------- -DROP TABLE IF EXISTS t1; -DROP TABLE IF EXISTS t2; -CREATE TABLE t1 ( -a1 char(30), -a2 int, -a3 int, -a4 char(30), -a5 char(30) -); -CREATE TABLE t2 ( -b1 int, -b2 char(30) -); -INSERT INTO t1 VALUES ('Yes', 1, NULL, 'foo', 'bar'); -INSERT INTO t2 VALUES (1, 'baz'); -UPDATE t1 a, t2 -SET a.a1 = 'No' -WHERE a.a2 = -(SELECT b1 -FROM t2 -WHERE b2 = 'baz') -AND a.a3 IS NULL -AND a.a4 = 'foo' -AND a.a5 = 'bar'; -SELECT * FROM t1; -a1 a2 a3 a4 a5 -No 1 NULL foo bar -SELECT * FROM t2; -b1 b2 -1 baz -DROP TABLE t1, t2; - --------- Test 2 for BUG#9361 -------- -DROP TABLE IF EXISTS t1; -DROP TABLE IF EXISTS t2; -DROP TABLE IF EXISTS t3; -CREATE TABLE t1 ( -i INT, -j INT, -x INT, -y INT, -z INT -); -CREATE TABLE t2 ( -i INT, -k INT, -x INT, -y INT, -z INT -); -CREATE TABLE t3 ( -j INT, -k INT, -x INT, -y INT, -z INT -); -INSERT INTO t1 VALUES ( 1, 2,13,14,15); -INSERT INTO t2 VALUES ( 1, 3,23,24,25); -INSERT INTO t3 VALUES ( 2, 3, 1,34,35), ( 2, 3, 1,34,36); -UPDATE t1 AS a -INNER JOIN t2 AS b -ON a.i = b.i -INNER JOIN t3 AS c -ON a.j = c.j AND b.k = c.k -SET a.x = b.x, -a.y = b.y, -a.z = ( -SELECT sum(z) -FROM t3 -WHERE y = 34 -) -WHERE b.x = 23; -SELECT * FROM t1; -i j x y z -1 2 23 24 71 -DROP TABLE t1, t2, t3; -DROP TABLE IF EXISTS t1; -Warnings: -Note 1051 Unknown table 't1' -DROP TABLE IF EXISTS t2; -Warnings: -Note 1051 Unknown table 't2' -CREATE TABLE t1 ( -idp int(11) NOT NULL default '0', -idpro int(11) default NULL, -price decimal(19,4) default NULL, -PRIMARY KEY (idp) -); -CREATE TABLE t2 ( -idpro int(11) NOT NULL default '0', -price decimal(19,4) default NULL, -nbprice int(11) default NULL, -PRIMARY KEY (idpro) -); -INSERT INTO t1 VALUES -(1,1,'3.0000'), -(2,2,'1.0000'), -(3,1,'1.0000'), -(4,1,'4.0000'), -(5,3,'2.0000'), -(6,2,'4.0000'); -INSERT INTO t2 VALUES -(1,'0.0000',0), -(2,'0.0000',0), -(3,'0.0000',0); -update -t2 -join -( select idpro, min(price) as min_price, count(*) as nbr_price -from t1 -where idpro>0 and price>0 -group by idpro -) as table_price -on t2.idpro = table_price.idpro -set t2.price = table_price.min_price, -t2.nbprice = table_price.nbr_price; -select "-- MASTER AFTER JOIN --" as ""; - --- MASTER AFTER JOIN -- -select * from t1; -idp idpro price -1 1 3.0000 -2 2 1.0000 -3 1 1.0000 -4 1 4.0000 -5 3 2.0000 -6 2 4.0000 -select * from t2; -idpro price nbprice -1 1.0000 3 -2 1.0000 2 -3 2.0000 1 -select "-- SLAVE AFTER JOIN --" as ""; - --- SLAVE AFTER JOIN -- -select * from t1; -idp idpro price -1 1 3.0000 -2 2 1.0000 -3 1 1.0000 -4 1 4.0000 -5 3 2.0000 -6 2 4.0000 -select * from t2; -idpro price nbprice -1 1.0000 3 -2 1.0000 2 -3 2.0000 1 -DROP TABLE t1, t2; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_myisam2ndb.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_myisam2ndb.result deleted file mode 100644 index eb7d88c812b..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_myisam2ndb.result +++ /dev/null @@ -1,919 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -SET storage_engine=myisam; ---- Doing pre test cleanup --- -DROP TABLE IF EXISTS t1; ---- Start test 1 Basic testing --- ---- Create Table Section --- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), -bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE,PRIMARY KEY(id)); ---- Show table on master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 ---- Show table on slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly -- -ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(id, total); -ALTER TABLE t1 MODIFY vc TEXT; ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 ---- Make sure that our tables on slave are still same engine --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- End test 1 Basic testing --- ---- Do Cleanup -- -DROP TABLE IF EXISTS t1; ---- Start test 2 partition RANGE testing -- ---- Do setup -- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), -bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE) -PARTITION BY RANGE (YEAR(t)) -(PARTITION p0 VALUES LESS THAN (1901), -PARTITION p1 VALUES LESS THAN (1946), -PARTITION p2 VALUES LESS THAN (1966), -PARTITION p3 VALUES LESS THAN (1986), -PARTITION p4 VALUES LESS THAN (2005), -PARTITION p5 VALUES LESS THAN MAXVALUE); ---- Show table on master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (YEAR(t)) -(PARTITION p0 VALUES LESS THAN (1901) ENGINE = MyISAM, - PARTITION p1 VALUES LESS THAN (1946) ENGINE = MyISAM, - PARTITION p2 VALUES LESS THAN (1966) ENGINE = MyISAM, - PARTITION p3 VALUES LESS THAN (1986) ENGINE = MyISAM, - PARTITION p4 VALUES LESS THAN (2005) ENGINE = MyISAM, - PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */ ---- Show table on slave -- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (YEAR(t)) -(PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster, - PARTITION p1 VALUES LESS THAN (1946) ENGINE = ndbcluster, - PARTITION p2 VALUES LESS THAN (1966) ENGINE = ndbcluster, - PARTITION p3 VALUES LESS THAN (1986) ENGINE = ndbcluster, - PARTITION p4 VALUES LESS THAN (2005) ENGINE = ndbcluster, - PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = ndbcluster) */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 ADD PRIMARY KEY(t,id); -ALTER TABLE t1 MODIFY vc TEXT; ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date NOT NULL DEFAULT '0000-00-00', - PRIMARY KEY (`t`,`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (YEAR(t)) -(PARTITION p0 VALUES LESS THAN (1901) ENGINE = MyISAM, - PARTITION p1 VALUES LESS THAN (1946) ENGINE = MyISAM, - PARTITION p2 VALUES LESS THAN (1966) ENGINE = MyISAM, - PARTITION p3 VALUES LESS THAN (1986) ENGINE = MyISAM, - PARTITION p4 VALUES LESS THAN (2005) ENGINE = MyISAM, - PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */ ---- Make sure that our tables on slave are still same engine --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date NOT NULL DEFAULT '0000-00-00', - PRIMARY KEY (`t`,`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (YEAR(t)) -(PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster, - PARTITION p1 VALUES LESS THAN (1946) ENGINE = ndbcluster, - PARTITION p2 VALUES LESS THAN (1966) ENGINE = ndbcluster, - PARTITION p3 VALUES LESS THAN (1986) ENGINE = ndbcluster, - PARTITION p4 VALUES LESS THAN (2005) ENGINE = ndbcluster, - PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = ndbcluster) */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- End test 2 partition RANGE testing --- ---- Do Cleanup --- -DROP TABLE IF EXISTS t1; ---- Start test 3 partition LIST testing --- ---- Do setup --- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), -bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE) -PARTITION BY LIST(id) -(PARTITION p0 VALUES IN (2, 4), -PARTITION p1 VALUES IN (42, 142)); ---- Test 3 Alter to add partition --- -ALTER TABLE t1 ADD PARTITION (PARTITION p2 VALUES IN (412)); ---- Show table on master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (id) -(PARTITION p0 VALUES IN (2,4) ENGINE = MyISAM, - PARTITION p1 VALUES IN (42,142) ENGINE = MyISAM, - PARTITION p2 VALUES IN (412) ENGINE = MyISAM) */ ---- Show table on slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (id) -(PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (42,142) ENGINE = ndbcluster, - PARTITION p2 VALUES IN (412) ENGINE = ndbcluster) */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 ADD PRIMARY KEY(id); -ALTER TABLE t1 MODIFY vc TEXT; ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (id) -(PARTITION p0 VALUES IN (2,4) ENGINE = MyISAM, - PARTITION p1 VALUES IN (42,142) ENGINE = MyISAM, - PARTITION p2 VALUES IN (412) ENGINE = MyISAM) */ ---- Make sure that our tables on slave are still same engine --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (id) -(PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (42,142) ENGINE = ndbcluster, - PARTITION p2 VALUES IN (412) ENGINE = ndbcluster) */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- End test 3 partition LIST testing --- ---- Do Cleanup -- -DROP TABLE IF EXISTS t1; ---- Start test 4 partition HASH testing --- ---- Do setup --- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), -bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE) -PARTITION BY HASH( YEAR(t) ) -PARTITIONS 4; ---- show that tables have been created correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH ( YEAR(t)) -PARTITIONS 4 */ -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH ( YEAR(t)) -PARTITIONS 4 */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 ADD PRIMARY KEY(t,id); -ALTER TABLE t1 MODIFY vc TEXT; ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date NOT NULL DEFAULT '0000-00-00', - PRIMARY KEY (`t`,`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH ( YEAR(t)) -PARTITIONS 4 */ ---- Make sure that our tables on slave are still same engine --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date NOT NULL DEFAULT '0000-00-00', - PRIMARY KEY (`t`,`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH ( YEAR(t)) -PARTITIONS 4 */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- End test 4 partition HASH testing --- ---- Do Cleanup -- -DROP TABLE IF EXISTS t1; ---- Start test 5 partition by key testing --- ---- Create Table Section --- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), -bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE,PRIMARY KEY(id)) -PARTITION BY KEY() -PARTITIONS 4; ---- Show that tables on master are ndbcluster tables --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY () -PARTITIONS 4 */ ---- Show that tables on slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY () -PARTITIONS 4 */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(id, total); ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY () -PARTITIONS 4 */ ---- Make sure that our tables on slave are still right type --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY () -PARTITIONS 4 */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 MODIFY vc TEXT; ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY () -PARTITIONS 4 */ ---- Make sure that our tables on slave are still same engine --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY () -PARTITIONS 4 */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- End test 5 key partition testing --- ---- Do Cleanup --- -DROP TABLE IF EXISTS t1; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_relayrotate.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_relayrotate.result deleted file mode 100644 index 6aa64973611..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_relayrotate.result +++ /dev/null @@ -1,16 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -stop slave; -create table t1 (a int) engine=NDB; -reset slave; -start slave; -stop slave; -start slave; -select max(a) from t1; -max(a) -8000 -drop table t1; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_rep_ignore.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_rep_ignore.result deleted file mode 100644 index 4e28a7e5865..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_rep_ignore.result +++ /dev/null @@ -1,54 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -DROP DATABASE IF EXISTS replica; -CREATE DATABASE replica; -CREATE TABLE t1 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; -CREATE TABLE t2 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; -USE replica; -CREATE TABLE replica.t1 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; -CREATE TABLE replica.t2 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; -USE test; -INSERT INTO t1 VALUES(1, repeat('abc',10)); -INSERT INTO t2 VALUES(1, repeat('abc',10)); -SHOW TABLES; -Tables_in_test -t1 -t2 -SELECT COUNT(*) FROM t1; -COUNT(*) -1 -SELECT COUNT(*) FROM t2; -COUNT(*) -1 -USE replica; -INSERT INTO replica.t1 VALUES(2, repeat('def',200)); -INSERT INTO replica.t2 VALUES(2, repeat('def',200)); -SHOW TABLES; -Tables_in_replica -t1 -t2 -SELECT COUNT(*) FROM t1; -COUNT(*) -1 -SELECT COUNT(*) FROM t2; -COUNT(*) -1 -SHOW TABLES; -Tables_in_test -USE replica; -SHOW TABLES; -Tables_in_replica -t2 -SELECT COUNT(*) FROM t2; -COUNT(*) -1 -USE test; -SHOW TABLES; -Tables_in_test -USE test; -DROP TABLE t1, t2; -DROP DATABASE IF EXISTS replica; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_row_001.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_row_001.result deleted file mode 100644 index 7f75bdedd65..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_row_001.result +++ /dev/null @@ -1,55 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -CREATE TABLE t1 (word CHAR(20) NOT NULL); -LOAD DATA INFILE 'LOAD_FILE' INTO TABLE t1; -LOAD DATA INFILE 'LOAD_FILE' INTO TABLE t1; -SELECT * FROM t1 ORDER BY word LIMIT 10; -word -Aarhus -Aarhus -Aarhus -Aarhus -Aaron -Aaron -Aaron -Aaron -Ababa -Ababa -STOP SLAVE; -SET PASSWORD FOR root@"localhost" = PASSWORD('foo'); -START SLAVE; -SET PASSWORD FOR root@"localhost" = PASSWORD(''); -CREATE TABLE t3(n INT); -INSERT INTO t3 VALUES(1),(2); -SELECT * FROM t3 ORDER BY n; -n -1 -2 -SELECT SUM(LENGTH(word)) FROM t1; -SUM(LENGTH(word)) -1022 -DROP TABLE t1,t3; -CREATE TABLE t1 (n INT) ENGINE=NDB; -RESET MASTER; -STOP SLAVE; -RESET SLAVE; -SELECT COUNT(*) FROM t1; -COUNT(*) -5000 -LOCK TABLES t1 READ; -START SLAVE; -UNLOCK TABLES; -SELECT COUNT(*) FROM t1; -COUNT(*) -5000 -DROP TABLE t1; -CREATE TABLE t1 (n INT); -INSERT INTO t1 VALUES(3456); -SELECT n FROM t1; -n -3456 -DROP TABLE t1; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_row_implicit_commit_binlog.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_row_implicit_commit_binlog.result deleted file mode 100644 index 0f2732069ec..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_row_implicit_commit_binlog.result +++ /dev/null @@ -1,661 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -######################################################################### -# CONFIGURATION -######################################################################### -CREATE TABLE tt_1 (ddl_case INT, PRIMARY KEY(ddl_case)) ENGINE = NDB; -CREATE TABLE tt_2 (ddl_case INT, PRIMARY KEY(ddl_case)) ENGINE = NDB; -CREATE TABLE nt_1 (ddl_case INT, PRIMARY KEY(ddl_case)) ENGINE = MyIsam; -INSERT INTO tt_1(ddl_case) VALUES(0); -INSERT INTO tt_2(ddl_case) VALUES(0); -######################################################################### -# CHECK IMPLICT COMMIT -######################################################################### -SET AUTOCOMMIT= 0; --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (41); -LOAD INDEX INTO CACHE nt_1 IGNORE LEAVES; -Table Op Msg_type Msg_text -test.nt_1 preload_keys status OK --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (test.tt_2) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (40); -LOAD INDEX INTO CACHE tt_1, tt_2 IGNORE LEAVES; -Table Op Msg_type Msg_text -test.tt_1 preload_keys note The storage engine for the table doesn't support preload_keys -test.tt_2 preload_keys note The storage engine for the table doesn't support preload_keys --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (39); -ANALYZE TABLE nt_1; -Table Op Msg_type Msg_text -test.nt_1 analyze status Table is already up to date --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; ANALYZE TABLE nt_1 -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (38); -CHECK TABLE nt_1; -Table Op Msg_type Msg_text -test.nt_1 check status OK --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (37); -OPTIMIZE TABLE nt_1; -Table Op Msg_type Msg_text -test.nt_1 optimize status Table is already up to date --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; OPTIMIZE TABLE nt_1 -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (36); -REPAIR TABLE nt_1; -Table Op Msg_type Msg_text -test.nt_1 repair status OK --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; REPAIR TABLE nt_1 -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (35); -LOCK TABLES tt_1 WRITE; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (34); -UNLOCK TABLES; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (33); -CREATE USER 'user'@'localhost'; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; CREATE USER 'user'@'localhost' -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (32); -GRANT ALL ON *.* TO 'user'@'localhost'; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; GRANT ALL ON *.* TO 'user'@'localhost' -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (31); -SET PASSWORD FOR 'user'@'localhost' = PASSWORD('newpass'); --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; SET PASSWORD FOR 'user'@'localhost'='*D8DECEC305209EEFEC43008E1D420E1AA06B19E0' -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (mysql.user) -master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (30); -REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'user'@'localhost'; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'user'@'localhost' -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (29); -RENAME USER 'user'@'localhost' TO 'user_new'@'localhost'; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; RENAME USER 'user'@'localhost' TO 'user_new'@'localhost' -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (28); -DROP USER 'user_new'@'localhost'; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; DROP USER 'user_new'@'localhost' -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (27); -CREATE EVENT evt ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR DO SELECT * FROM tt_1; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` EVENT evt ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR DO SELECT * FROM tt_1 -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (26); -ALTER EVENT evt COMMENT 'evt'; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; ALTER EVENT evt COMMENT 'evt' -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (25); -DROP EVENT evt; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; DROP EVENT evt -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (24); -CREATE TRIGGER tr AFTER INSERT ON tt_1 FOR EACH ROW UPDATE tt_2 SET ddl_case = ddl_case WHERE ddl_case= NEW.ddl_case; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` TRIGGER tr AFTER INSERT ON tt_1 FOR EACH ROW UPDATE tt_2 SET ddl_case = ddl_case WHERE ddl_case= NEW.ddl_case -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (23); -DROP TRIGGER tr; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; DROP TRIGGER tr -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (22); -CREATE FUNCTION fc () RETURNS VARCHAR(64) RETURN "fc"; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` FUNCTION `fc`() RETURNS varchar(64) CHARSET latin1 -RETURN "fc" -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (21); -ALTER FUNCTION fc COMMENT 'fc'; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; ALTER FUNCTION fc COMMENT 'fc' -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (20); -DROP FUNCTION fc; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; DROP FUNCTION fc -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (19); -CREATE PROCEDURE pc () UPDATE tt_2 SET ddl_case = ddl_case WHERE ddl_case= NEW.ddl_case; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` PROCEDURE `pc`() -UPDATE tt_2 SET ddl_case = ddl_case WHERE ddl_case= NEW.ddl_case -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (18); -ALTER PROCEDURE pc COMMENT 'pc'; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; ALTER PROCEDURE pc COMMENT 'pc' -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (17); -DROP PROCEDURE pc; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; DROP PROCEDURE pc -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (16); -CREATE VIEW v AS SELECT * FROM tt_1; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v` AS SELECT * FROM tt_1 -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (15); -ALTER VIEW v AS SELECT * FROM tt_1; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; ALTER ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v` AS SELECT * FROM tt_1 -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (14); -DROP VIEW v; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; DROP VIEW v -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (13); -CREATE INDEX ix ON tt_1(ddl_case); --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT -master-bin.000001 # Query # # use `test`; CREATE INDEX ix ON tt_1(ddl_case) --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (12); -DROP INDEX ix ON tt_1; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT -master-bin.000001 # Query # # use `test`; DROP INDEX ix ON tt_1 --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (11); -CREATE TEMPORARY TABLE tt_xx (a int); --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (10); -ALTER TABLE tt_xx ADD COLUMN (b int); --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (9); -ALTER TABLE tt_xx RENAME new_tt_xx; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (8); -DROP TEMPORARY TABLE IF EXISTS new_tt_xx; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `new_tt_xx` /* generated by server */ -master-bin.000001 # Query # # COMMIT -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (7); -CREATE TABLE tt_xx (a int); --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; CREATE TABLE tt_xx (a int) -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (6); -ALTER TABLE tt_xx ADD COLUMN (b int); --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; ALTER TABLE tt_xx ADD COLUMN (b int) -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (5); -RENAME TABLE tt_xx TO new_tt_xx; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; RENAME TABLE tt_xx TO new_tt_xx -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (4); -TRUNCATE TABLE new_tt_xx; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; TRUNCATE TABLE new_tt_xx -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (3); -DROP TABLE IF EXISTS tt_xx, new_tt_xx; -Warnings: -Note 1051 Unknown table 'tt_xx' --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `tt_xx`,`new_tt_xx` /* generated by server */ -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (2); -CREATE DATABASE db; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT -master-bin.000001 # Query # # CREATE DATABASE db --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (1); -DROP DATABASE IF EXISTS db; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT -master-bin.000001 # Query # # DROP DATABASE IF EXISTS db --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - -################################################################################### -# CHECK CONSISTENCY -################################################################################### -Comparing tables master:test.tt_1 and slave:test.tt_1 -################################################################################### -# CLEAN -################################################################################### -DROP TABLE tt_1; -DROP TABLE tt_2; -DROP TABLE nt_1; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_set_null.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_set_null.result deleted file mode 100644 index 473cd63169c..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_set_null.result +++ /dev/null @@ -1,35 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -CREATE TABLE t1 (c1 BIT, c2 INT) Engine=NDB; -INSERT INTO `t1` VALUES ( 1, 1 ); -UPDATE t1 SET c1=NULL where c2=1; -Comparing tables master:test.t1 and slave:test.t1 -DELETE FROM t1 WHERE c2=1 LIMIT 1; -Comparing tables master:test.t1 and slave:test.t1 -DROP TABLE t1; -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -CREATE TABLE t1 (c1 CHAR) Engine=NDB; -INSERT INTO t1 ( c1 ) VALUES ( 'w' ) ; -SELECT * FROM t1; -c1 -w -UPDATE t1 SET c1=NULL WHERE c1='w'; -Comparing tables master:test.t1 and slave:test.t1 -DELETE FROM t1 LIMIT 2; -Comparing tables master:test.t1 and slave:test.t1 -DROP TABLE t1; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_sp003.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_sp003.result deleted file mode 100644 index d7922c61b52..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_sp003.result +++ /dev/null @@ -1,49 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -DROP PROCEDURE IF EXISTS test.p1; -DROP PROCEDURE IF EXISTS test.p2; -DROP TABLE IF EXISTS test.t1; -CREATE TABLE test.t1(a INT,PRIMARY KEY(a))ENGINE=NDBCLUSTER; -CREATE PROCEDURE test.p1() -BEGIN -INSERT INTO test.t1 VALUES (4); -SELECT get_lock("test", 100); -UPDATE test.t1 set a=a+4 WHERE a=4; -END| -CREATE PROCEDURE test.p2() -BEGIN -UPDATE test.t1 SET a=a+1; -END| -SELECT get_lock("test", 200); -get_lock("test", 200) -1 -CALL test.p1(); -CALL test.p2(); -SELECT release_lock("test"); -release_lock("test") -1 -SELECT * FROM test.t1; -a -5 -SELECT * FROM test.t1; -a -5 -DROP TABLE IF EXISTS test.t1; -CREATE TABLE test.t1(a INT,PRIMARY KEY(a))ENGINE=NDBCLUSTER; -CALL test.p2(); -CALL test.p1(); -get_lock("test", 100) -0 -SELECT * FROM test.t1; -a -8 -SELECT * FROM test.t1; -a -8 -DROP PROCEDURE IF EXISTS test.p1; -DROP PROCEDURE IF EXISTS test.p2; -DROP TABLE IF EXISTS test.t1; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_sp006.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_sp006.result deleted file mode 100644 index 21a2cfe5441..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_sp006.result +++ /dev/null @@ -1,46 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -DROP TABLE IF EXISTS t1; -DROP TABLE IF EXISTS t2; -DROP PROCEDURE IF EXISTS p1; -DROP PROCEDURE IF EXISTS p2; -CREATE TABLE IF NOT EXISTS t1(name CHAR(16), birth DATE,PRIMARY KEY(name))ENGINE=NDBCLUSTER; -CREATE TABLE IF NOT EXISTS t2(name CHAR(16), age INT ,PRIMARY KEY(name))ENGINE=NDBCLUSTER; -CREATE PROCEDURE p1() -BEGIN -DECLARE done INT DEFAULT 0; -DECLARE spa CHAR(16); -DECLARE spb INT; -DECLARE cur1 CURSOR FOR SELECT name, -(YEAR(CURDATE())-YEAR(birth))-(RIGHT(CURDATE(),5) - -# Now check that that is in the apply_status table is consistant -# with what is in the binlog - -# since insert is done with transactional engine, expect a BEGIN -# at - -show binlog events from limit 1; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN - -# Now the insert, one step after - -show binlog events from limit 1,1; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; insert into t1 values (1,2) - -# and the COMMIT should be at - -show binlog events from limit 2,1; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Xid # # COMMIT /* XID */ - -begin; -insert into t1 values (2,3); -insert into t2 values (3,4); -commit; - -select @log_name:=log_name, @start_pos:=start_pos, @end_pos:=end_pos -from mysql.ndb_apply_status; -@log_name:=log_name @start_pos:=start_pos @end_pos:=end_pos - -show binlog events from limit 1; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN - -show binlog events from limit 1,2; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; insert into t1 values (2,3) -master-bin.000001 # Query # # use `test`; insert into t2 values (3,4) - -show binlog events from limit 3,1; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Xid # # COMMIT /* XID */ - -DROP TABLE test.t1, test.t2; -SHOW TABLES; -Tables_in_test - -*** Test 2 *** - -DROP DATABASE IF EXISTS tpcb; -CREATE DATABASE tpcb; - -CREATE TABLE tpcb.account (id INT, bid INT, balance DECIMAL(10,2), -filler CHAR(255), PRIMARY KEY(id)); - -CREATE TABLE tpcb.branch (bid INT, balance DECIMAL(10,2), filler VARCHAR(255), -PRIMARY KEY(bid)); - -CREATE TABLE tpcb.teller (tid INT, balance DECIMAL(10,2), filler VARCHAR(255), -PRIMARY KEY(tid)); - -CREATE TABLE tpcb.history (id MEDIUMINT NOT NULL AUTO_INCREMENT,aid INT, -tid INT, bid INT, amount DECIMAL(10,2), -tdate DATETIME, teller CHAR(20), uuidf LONGBLOB, -filler CHAR(80),PRIMARY KEY (id)); - ---- Create stored procedures & functions --- - - -*** Stored Procedures Created *** - -USE tpcb; -ALTER TABLE account ENGINE NDB; -ALTER TABLE branch ENGINE NDB; -ALTER TABLE teller ENGINE NDB; -ALTER TABLE history ENGINE NDB; - -select @log_name:=log_name, @start_pos:=start_pos, @end_pos:=end_pos -from mysql.ndb_apply_status; -@log_name:=log_name @start_pos:=start_pos @end_pos:=end_pos - - -show binlog events in 'master-bin.000001' from limit 6,1; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Xid 1 COMMIT /* XID */ - -** Test 3 ** - -FLUSH LOGS; - -select @log_name:=log_name, @start_pos:=start_pos, @end_pos:=end_pos -from mysql.ndb_apply_status; -@log_name:=log_name @start_pos:=start_pos @end_pos:=end_pos - - -show binlog events in 'master-bin.000002' from limit 6,1; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000002 # Xid 1 COMMIT /* XID */ - -** Test 4 ** - -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; - -select @log_name:=log_name, @start_pos:=start_pos, @end_pos:=end_pos -from mysql.ndb_apply_status; -@log_name:=log_name @start_pos:=start_pos @end_pos:=end_pos - - -show binlog events in 'master-bin.000001' from limit 6,1; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Xid 1 COMMIT /* XID */ - -*** DUMP MASTER & SLAVE FOR COMPARE ******** -DROP DATABASE tpcb; -****** Do dumps compare ************ diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_sync.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_sync.result deleted file mode 100644 index 49d068d5fe4..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_sync.result +++ /dev/null @@ -1,91 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -STOP SLAVE; -CREATE DATABASE ndbsynctest; -USE ndbsynctest; -CREATE DATABASE ndbsynctest; -USE ndbsynctest; -CREATE TABLE t1 (c1 BIT(1) NOT NULL, c2 BIT(1) NOT NULL, c3 CHAR(15), PRIMARY KEY(c3)) ENGINE = NDB ; -INSERT INTO t1 VALUES (1,1,"row1"),(0,1,"row2"),(1,0,"row3"),(0,0,"row4"); -CREATE TABLE t2 (c1 CHAR(15), c2 BIT(1) NOT NULL, c3 BIT(1) NOT NULL, PRIMARY KEY(c1)) ENGINE = NDB ; -INSERT INTO t2 VALUES ("ABC",1,1),("BCDEF",0,1),("CD",1,0),("DEFGHIJKL",0,0); -SELECT hex(c1),hex(c2),c3 FROM t1 ORDER BY c3; -hex(c1) hex(c2) c3 -1 1 row1 -0 1 row2 -1 0 row3 -0 0 row4 -SELECT hex(c2),hex(c3),c1 FROM t2 ORDER BY c1; -hex(c2) hex(c3) c1 -1 1 ABC -0 1 BCDEF -1 0 CD -0 0 DEFGHIJKL -CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info -(id INT, backup_id INT) ENGINE = MEMORY; -LOAD DATA INFILE '/tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; -DROP TABLE test.backup_info; -UPDATE t1 SET c2=0 WHERE c3="row2"; -SELECT hex(c1),hex(c2),c3 FROM t1 ORDER BY c3; -hex(c1) hex(c2) c3 -1 1 row1 -0 0 row2 -1 0 row3 -0 0 row4 -SHOW TABLES; -Tables_in_ndbsynctest -DROP DATABASE ndbsynctest; -CREATE DATABASE ndbsynctest; -USE ndbsynctest; -SHOW TABLES; -Tables_in_ndbsynctest -t1 -t2 -SELECT hex(c1),hex(c2),c3 FROM t1 ORDER BY c3; -hex(c1) hex(c2) c3 -1 1 row1 -0 1 row2 -1 0 row3 -0 0 row4 -SELECT hex(c2),hex(c3),c1 FROM t2 ORDER BY c1; -hex(c2) hex(c3) c1 -1 1 ABC -0 1 BCDEF -1 0 CD -0 0 DEFGHIJKL -SELECT @the_epoch:=MAX(epoch) FROM mysql.ndb_apply_status; -@the_epoch:=MAX(epoch) - -SELECT @the_pos:=Position,@the_file:=SUBSTRING_INDEX(FILE, '/', -1) -FROM mysql.ndb_binlog_index WHERE epoch > ORDER BY epoch ASC LIMIT 1; -@the_pos:=Position @the_file:=SUBSTRING_INDEX(FILE, '/', -1) - master-bin.000001 -CHANGE MASTER TO -master_log_file = 'master-bin.000001', -master_log_pos = ; -START SLAVE; -Checking that both slave threads are running. -SELECT hex(c1),hex(c2),c3 FROM t1 ORDER BY c3; -hex(c1) hex(c2) c3 -1 1 row1 -0 0 row2 -1 0 row3 -0 0 row4 -SELECT hex(c2),hex(c3),c1 FROM t2 ORDER BY c1; -hex(c2) hex(c3) c1 -1 1 ABC -0 1 BCDEF -1 0 CD -0 0 DEFGHIJKL -DROP DATABASE ndbsynctest; -STOP SLAVE; -reset master; -select * from mysql.ndb_binlog_index; -Position File epoch inserts updates deletes schemaops -reset slave; -select * from mysql.ndb_apply_status; -server_id epoch log_name start_pos end_pos diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_trig004.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_trig004.result deleted file mode 100644 index ba5f0dea91c..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_trig004.result +++ /dev/null @@ -1,30 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -DROP TRIGGER test.t1_bi_t2; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -CREATE TABLE test.t1 (n MEDIUMINT NOT NULL AUTO_INCREMENT, d FLOAT, PRIMARY KEY(n))ENGINE=NDB; -CREATE TABLE test.t2 (n MEDIUMINT NOT NULL, f FLOAT, PRIMARY KEY(n))ENGINE=NDB; -CREATE TRIGGER test.t1_bi_t2 BEFORE INSERT ON test.t2 FOR EACH ROW INSERT INTO test.t1 VALUES (NULL, 1.234)// -INSERT INTO test.t2 VALUES (1, 0.0); -INSERT INTO test.t2 VALUES (1, 0.0); -Got one of the listed errors -select * from test.t1; -n d -1 1.234 -select * from test.t2; -n f -1 0 -select * from test.t1; -n d -1 1.234 -select * from test.t2; -n f -1 0 -DROP TRIGGER test.t1_bi_t2; -DROP TABLE test.t1; -DROP TABLE test.t2; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndbapi_multi.result b/mysql-test/suite/rpl_ndb/r/rpl_ndbapi_multi.result deleted file mode 100644 index 5de6914882d..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndbapi_multi.result +++ /dev/null @@ -1,8 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -Running ndbapi_simple_dual -Running mgmapi_logevent diff --git a/mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result b/mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result deleted file mode 100644 index 3839bfe0b2e..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result +++ /dev/null @@ -1,636 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -CREATE TABLE t1 (C1 CHAR(1), C2 CHAR(1), INDEX (C1)) ENGINE = 'NDB' ; -SELECT * FROM t1; -C1 C2 -SELECT * FROM t1; -C1 C2 -INSERT INTO t1 VALUES ('A','B'), ('X','Y'), ('X','X'); -INSERT INTO t1 VALUES ('A','C'), ('X','Z'), ('A','A'); -SELECT * FROM t1 ORDER BY C1,C2; -C1 C2 -A A -A B -A C -X X -X Y -X Z -SELECT * FROM t1 ORDER BY C1,C2; -C1 C2 -A A -A B -A C -X X -X Y -X Z -DELETE FROM t1 WHERE C1 = C2; -SELECT * FROM t1 ORDER BY C1,C2; -C1 C2 -A B -A C -X Y -X Z -SELECT * FROM t1 ORDER BY C1,C2; -C1 C2 -A B -A C -X Y -X Z -UPDATE t1 SET C2 = 'I' WHERE C1 = 'A' AND C2 = 'C'; -SELECT * FROM t1 ORDER BY C1,C2; -C1 C2 -A B -A I -X Y -X Z -SELECT * FROM t1 ORDER BY C1,C2; -C1 C2 -A B -A I -X Y -X Z -UPDATE t1 SET c2 = 'Q' WHERE c1 = 'A' AND c2 = 'N'; -SELECT * FROM t1 ORDER BY c1,c2; -C1 C2 -A B -A I -X Y -X Z -SELECT * FROM t1 ORDER BY c1,c2; -C1 C2 -A B -A I -X Y -X Z -CREATE TABLE t2 (c1 INT, c12 char(1), c2 INT, PRIMARY KEY (c1)) ENGINE = 'NDB' ; -INSERT INTO t2 -VALUES (1,'A',2), (2,'A',4), (3,'A',9), (4,'A',15), (5,'A',25), -(6,'A',35), (7,'A',50), (8,'A',64), (9,'A',81); -SELECT * FROM t2 ORDER BY c1,c2; -c1 c12 c2 -1 A 2 -2 A 4 -3 A 9 -4 A 15 -5 A 25 -6 A 35 -7 A 50 -8 A 64 -9 A 81 -SELECT * FROM t2 WHERE c2 = c1 * c1 ORDER BY c1,c2; -c1 c12 c2 -2 A 4 -3 A 9 -5 A 25 -8 A 64 -9 A 81 -SELECT * FROM t2 ORDER BY c1,c2; -c1 c12 c2 -1 A 2 -2 A 4 -3 A 9 -4 A 15 -5 A 25 -6 A 35 -7 A 50 -8 A 64 -9 A 81 -SELECT * FROM t2 WHERE c2 = c1 * c1 ORDER BY c1,c2; -c1 c12 c2 -2 A 4 -3 A 9 -5 A 25 -8 A 64 -9 A 81 -UPDATE t2 SET c2 = c1*c1 WHERE c2 != c1*c1; -SELECT * FROM t2 WHERE c2 = c1 * c1 ORDER BY c1,c2; -c1 c12 c2 -1 A 1 -2 A 4 -3 A 9 -4 A 16 -5 A 25 -6 A 36 -7 A 49 -8 A 64 -9 A 81 -SELECT * FROM t2 WHERE c2 = c1 * c1 ORDER BY c1,c2; -c1 c12 c2 -1 A 1 -2 A 4 -3 A 9 -4 A 16 -5 A 25 -6 A 36 -7 A 49 -8 A 64 -9 A 81 -UPDATE t2 SET c12 = 'Q' WHERE c1 = 1 AND c2 = 999; -SELECT * FROM t2 ORDER BY c1,c2; -c1 c12 c2 -1 A 1 -2 A 4 -3 A 9 -4 A 16 -5 A 25 -6 A 36 -7 A 49 -8 A 64 -9 A 81 -SELECT * FROM t2 ORDER BY c1,c2; -c1 c12 c2 -1 A 1 -2 A 4 -3 A 9 -4 A 16 -5 A 25 -6 A 36 -7 A 49 -8 A 64 -9 A 81 -DELETE FROM t2 WHERE c1 % 4 = 0; -SELECT * FROM t2 ORDER BY c1,c2; -c1 c12 c2 -1 A 1 -2 A 4 -3 A 9 -5 A 25 -6 A 36 -7 A 49 -9 A 81 -SELECT * FROM t2 ORDER BY c1,c2; -c1 c12 c2 -1 A 1 -2 A 4 -3 A 9 -5 A 25 -6 A 36 -7 A 49 -9 A 81 -UPDATE t2 SET c12='X'; -CREATE TABLE t3 (C1 CHAR(1), C2 CHAR(1), pk1 INT, C3 CHAR(1), pk2 INT, PRIMARY KEY (pk1,pk2)) ENGINE = 'NDB' ; -INSERT INTO t3 VALUES ('A','B',1,'B',1), ('X','Y',2,'B',1), ('X','X',3,'B',1); -INSERT INTO t3 VALUES ('A','C',1,'B',2), ('X','Z',2,'B',2), ('A','A',3,'B',2); -SELECT * FROM t3 ORDER BY C1,C2; -C1 C2 pk1 C3 pk2 -A A 3 B 2 -A B 1 B 1 -A C 1 B 2 -X X 3 B 1 -X Y 2 B 1 -X Z 2 B 2 -SELECT * FROM t3 ORDER BY C1,C2; -C1 C2 pk1 C3 pk2 -A A 3 B 2 -A B 1 B 1 -A C 1 B 2 -X X 3 B 1 -X Y 2 B 1 -X Z 2 B 2 -DELETE FROM t3 WHERE C1 = C2; -SELECT * FROM t3 ORDER BY C1,C2; -C1 C2 pk1 C3 pk2 -A B 1 B 1 -A C 1 B 2 -X Y 2 B 1 -X Z 2 B 2 -SELECT * FROM t3 ORDER BY C1,C2; -C1 C2 pk1 C3 pk2 -A B 1 B 1 -A C 1 B 2 -X Y 2 B 1 -X Z 2 B 2 -UPDATE t3 SET C2 = 'I' WHERE C1 = 'A' AND C2 = 'C'; -SELECT * FROM t3 ORDER BY C1,C2; -C1 C2 pk1 C3 pk2 -A B 1 B 1 -A I 1 B 2 -X Y 2 B 1 -X Z 2 B 2 -SELECT * FROM t3 ORDER BY C1,C2; -C1 C2 pk1 C3 pk2 -A B 1 B 1 -A I 1 B 2 -X Y 2 B 1 -X Z 2 B 2 -CREATE TABLE t6 (C1 CHAR(1), C2 CHAR(1), C3 INT) ENGINE = 'NDB' ; -INSERT INTO t6 VALUES ('A','B',1), ('X','Y',2), ('X','X',3); -INSERT INTO t6 VALUES ('A','C',4), ('X','Z',5), ('A','A',6); -SELECT * FROM t6 ORDER BY C3; -C1 C2 C3 -A B 1 -X Y 2 -X X 3 -A C 4 -X Z 5 -A A 6 -SELECT * FROM t6 ORDER BY C3; -C1 C2 C3 -A B 1 -X Y 2 -X X 3 -A C 4 -X Z 5 -A A 6 -DELETE FROM t6 WHERE C1 = C2; -SELECT * FROM t6 ORDER BY C3; -C1 C2 C3 -A B 1 -X Y 2 -A C 4 -X Z 5 -SELECT * FROM t6 ORDER BY C3; -C1 C2 C3 -A B 1 -X Y 2 -A C 4 -X Z 5 -UPDATE t6 SET C2 = 'I' WHERE C1 = 'A' AND C2 = 'C'; -SELECT * FROM t6 ORDER BY C3; -C1 C2 C3 -A B 1 -X Y 2 -A I 4 -X Z 5 -SELECT * FROM t6 ORDER BY C3; -C1 C2 C3 -A B 1 -X Y 2 -A I 4 -X Z 5 -CREATE TABLE t5 (C1 CHAR(1), C2 CHAR(1), C3 INT PRIMARY KEY) ENGINE = 'NDB' ; -INSERT INTO t5 VALUES ('A','B',1), ('X','Y',2), ('X','X',3); -INSERT INTO t5 VALUES ('A','C',4), ('X','Z',5), ('A','A',6); -UPDATE t5,t2,t3 SET t5.C2='Q', t2.c12='R', t3.C3 ='S' WHERE t5.C1 = t2.c12 AND t5.C1 = t3.C1; -SELECT * FROM t5,t2,t3 WHERE t5.C2='Q' AND t2.c12='R' AND t3.C3 ='S' ORDER BY t5.C3,t2.c1,t3.pk1,t3.pk2; -C1 C2 C3 c1 c12 c2 C1 C2 pk1 C3 pk2 -X Q 2 1 R 1 X Y 2 S 1 -X Q 2 1 R 1 X Z 2 S 2 -X Q 2 2 R 4 X Y 2 S 1 -X Q 2 2 R 4 X Z 2 S 2 -X Q 2 3 R 9 X Y 2 S 1 -X Q 2 3 R 9 X Z 2 S 2 -X Q 2 5 R 25 X Y 2 S 1 -X Q 2 5 R 25 X Z 2 S 2 -X Q 2 6 R 36 X Y 2 S 1 -X Q 2 6 R 36 X Z 2 S 2 -X Q 2 7 R 49 X Y 2 S 1 -X Q 2 7 R 49 X Z 2 S 2 -X Q 2 9 R 81 X Y 2 S 1 -X Q 2 9 R 81 X Z 2 S 2 -X Q 3 1 R 1 X Y 2 S 1 -X Q 3 1 R 1 X Z 2 S 2 -X Q 3 2 R 4 X Y 2 S 1 -X Q 3 2 R 4 X Z 2 S 2 -X Q 3 3 R 9 X Y 2 S 1 -X Q 3 3 R 9 X Z 2 S 2 -X Q 3 5 R 25 X Y 2 S 1 -X Q 3 5 R 25 X Z 2 S 2 -X Q 3 6 R 36 X Y 2 S 1 -X Q 3 6 R 36 X Z 2 S 2 -X Q 3 7 R 49 X Y 2 S 1 -X Q 3 7 R 49 X Z 2 S 2 -X Q 3 9 R 81 X Y 2 S 1 -X Q 3 9 R 81 X Z 2 S 2 -X Q 5 1 R 1 X Y 2 S 1 -X Q 5 1 R 1 X Z 2 S 2 -X Q 5 2 R 4 X Y 2 S 1 -X Q 5 2 R 4 X Z 2 S 2 -X Q 5 3 R 9 X Y 2 S 1 -X Q 5 3 R 9 X Z 2 S 2 -X Q 5 5 R 25 X Y 2 S 1 -X Q 5 5 R 25 X Z 2 S 2 -X Q 5 6 R 36 X Y 2 S 1 -X Q 5 6 R 36 X Z 2 S 2 -X Q 5 7 R 49 X Y 2 S 1 -X Q 5 7 R 49 X Z 2 S 2 -X Q 5 9 R 81 X Y 2 S 1 -X Q 5 9 R 81 X Z 2 S 2 -SELECT * FROM t5,t2,t3 WHERE t5.C2='Q' AND t2.c12='R' AND t3.C3 ='S' ORDER BY t5.C3,t2.c1,t3.pk1,t3.pk2; -C1 C2 C3 c1 c12 c2 C1 C2 pk1 C3 pk2 -X Q 2 1 R 1 X Y 2 S 1 -X Q 2 1 R 1 X Z 2 S 2 -X Q 2 2 R 4 X Y 2 S 1 -X Q 2 2 R 4 X Z 2 S 2 -X Q 2 3 R 9 X Y 2 S 1 -X Q 2 3 R 9 X Z 2 S 2 -X Q 2 5 R 25 X Y 2 S 1 -X Q 2 5 R 25 X Z 2 S 2 -X Q 2 6 R 36 X Y 2 S 1 -X Q 2 6 R 36 X Z 2 S 2 -X Q 2 7 R 49 X Y 2 S 1 -X Q 2 7 R 49 X Z 2 S 2 -X Q 2 9 R 81 X Y 2 S 1 -X Q 2 9 R 81 X Z 2 S 2 -X Q 3 1 R 1 X Y 2 S 1 -X Q 3 1 R 1 X Z 2 S 2 -X Q 3 2 R 4 X Y 2 S 1 -X Q 3 2 R 4 X Z 2 S 2 -X Q 3 3 R 9 X Y 2 S 1 -X Q 3 3 R 9 X Z 2 S 2 -X Q 3 5 R 25 X Y 2 S 1 -X Q 3 5 R 25 X Z 2 S 2 -X Q 3 6 R 36 X Y 2 S 1 -X Q 3 6 R 36 X Z 2 S 2 -X Q 3 7 R 49 X Y 2 S 1 -X Q 3 7 R 49 X Z 2 S 2 -X Q 3 9 R 81 X Y 2 S 1 -X Q 3 9 R 81 X Z 2 S 2 -X Q 5 1 R 1 X Y 2 S 1 -X Q 5 1 R 1 X Z 2 S 2 -X Q 5 2 R 4 X Y 2 S 1 -X Q 5 2 R 4 X Z 2 S 2 -X Q 5 3 R 9 X Y 2 S 1 -X Q 5 3 R 9 X Z 2 S 2 -X Q 5 5 R 25 X Y 2 S 1 -X Q 5 5 R 25 X Z 2 S 2 -X Q 5 6 R 36 X Y 2 S 1 -X Q 5 6 R 36 X Z 2 S 2 -X Q 5 7 R 49 X Y 2 S 1 -X Q 5 7 R 49 X Z 2 S 2 -X Q 5 9 R 81 X Y 2 S 1 -X Q 5 9 R 81 X Z 2 S 2 -CREATE TABLE t4 (C1 CHAR(1) PRIMARY KEY, B1 BIT(1), B2 BIT(1) NOT NULL DEFAULT 0, C2 CHAR(1) NOT NULL DEFAULT 'A') ENGINE = 'NDB' ; -INSERT INTO t4 SET C1 = 1; -SELECT C1,HEX(B1),HEX(B2) FROM t4 ORDER BY C1; -C1 HEX(B1) HEX(B2) -1 NULL 0 -SELECT C1,HEX(B1),HEX(B2) FROM t4 ORDER BY C1; -C1 HEX(B1) HEX(B2) -1 NULL 0 -CREATE TABLE t7 (C1 INT PRIMARY KEY, C2 INT) ENGINE = 'NDB' ; ---- on slave: original values --- -INSERT INTO t7 VALUES (1,3), (2,6), (3,9); -SELECT * FROM t7 ORDER BY C1; -C1 C2 -1 3 -2 6 -3 9 -set @@global.slave_exec_mode= 'IDEMPOTENT'; ---- on master: new values inserted --- -INSERT INTO t7 VALUES (1,2), (2,4), (3,6); -SELECT * FROM t7 ORDER BY C1; -C1 C2 -1 2 -2 4 -3 6 -set @@global.slave_exec_mode= default; ---- on slave: old values should be overwritten by replicated values --- -SELECT * FROM t7 ORDER BY C1; -C1 C2 -1 2 -2 4 -3 6 ---- on master --- -CREATE TABLE t8 (a INT PRIMARY KEY, b INT UNIQUE, c INT UNIQUE) ENGINE = 'NDB' ; -INSERT INTO t8 VALUES (99,99,99); -INSERT INTO t8 VALUES (99,22,33); -ERROR 23000: Duplicate entry '99' for key 'PRIMARY' -INSERT INTO t8 VALUES (11,99,33); -ERROR 23000: Duplicate entry '99' for key 'b' -INSERT INTO t8 VALUES (11,22,99); -ERROR 23000: Duplicate entry '99' for key 'c' -SELECT * FROM t8 ORDER BY a; -a b c -99 99 99 ---- on slave --- -SELECT * FROM t8 ORDER BY a; -a b c -99 99 99 -INSERT INTO t8 VALUES (1,2,3), (2,4,6), (3,6,9); -SELECT * FROM t8 ORDER BY a; -a b c -1 2 3 -2 4 6 -3 6 9 -99 99 99 -set @@global.slave_exec_mode= 'IDEMPOTENT'; ---- on master --- -INSERT INTO t8 VALUES (2,4,8); -set @@global.slave_exec_mode= default; ---- on slave --- -SELECT * FROM t8 ORDER BY a; -a b c -1 2 3 -2 4 8 -3 6 9 -99 99 99 -**** Test for BUG#31552 **** -**** On Master **** -DELETE FROM t1; -**** Resetting master and slave **** -include/stop_slave.inc -RESET SLAVE; -RESET MASTER; -include/start_slave.inc -**** On Master **** -INSERT INTO t1 VALUES ('K','K'), ('L','L'), ('M','M'); -**** On Master **** -set @@global.slave_exec_mode= 'IDEMPOTENT'; -DELETE FROM t1 WHERE C1 = 'L'; -DELETE FROM t1; -SELECT COUNT(*) FROM t1 ORDER BY c1,c2; -COUNT(*) 0 -set @@global.slave_exec_mode= default; -Checking that both slave threads are running. -SELECT COUNT(*) FROM t1 ORDER BY c1,c2; -COUNT(*) 0 -**** Test for BUG#37076 **** -**** On Master **** -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 (a TIMESTAMP, b DATETIME, c DATE); -INSERT INTO t1 VALUES( -'2005-11-14 01:01:01', '2005-11-14 01:01:02', '2005-11-14'); -**** On Slave **** -SELECT * FROM t1; -a b c -2005-11-14 01:01:01 2005-11-14 01:01:02 2005-11-14 -DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8; -CREATE TABLE t1 (i INT NOT NULL, -c CHAR(16) CHARACTER SET utf8 NOT NULL, -j INT NOT NULL) ENGINE = 'NDB' ; -CREATE TABLE t2 (i INT NOT NULL, -c CHAR(16) CHARACTER SET utf8 NOT NULL, -j INT NOT NULL) ENGINE = 'NDB' ; -ALTER TABLE t2 MODIFY c CHAR(128) CHARACTER SET utf8 NOT NULL; -CREATE TABLE t3 (i INT NOT NULL, -c CHAR(128) CHARACTER SET utf8 NOT NULL, -j INT NOT NULL) ENGINE = 'NDB' ; -ALTER TABLE t3 MODIFY c CHAR(16) CHARACTER SET utf8 NOT NULL; -CREATE TABLE t4 (i INT NOT NULL, -c CHAR(128) CHARACTER SET utf8 NOT NULL, -j INT NOT NULL) ENGINE = 'NDB' ; -CREATE TABLE t5 (i INT NOT NULL, -c CHAR(255) CHARACTER SET utf8 NOT NULL, -j INT NOT NULL) ENGINE = 'NDB' ; -ALTER TABLE t5 MODIFY c CHAR(16) CHARACTER SET utf8 NOT NULL; -CREATE TABLE t6 (i INT NOT NULL, -c CHAR(255) CHARACTER SET utf8 NOT NULL, -j INT NOT NULL) ENGINE = 'NDB' ; -ALTER TABLE t6 MODIFY c CHAR(128) CHARACTER SET utf8 NOT NULL; -CREATE TABLE t7 (i INT NOT NULL, -c CHAR(255) CHARACTER SET utf8 NOT NULL, -j INT NOT NULL) ENGINE = 'NDB' ; -SET @saved_slave_type_conversions = @@slave_type_conversions; -SET GLOBAL SLAVE_TYPE_CONVERSIONS = 'ALL_NON_LOSSY'; -[expecting slave to replicate correctly] -INSERT INTO t1 VALUES (1, "", 1); -INSERT INTO t1 VALUES (2, repeat(_utf8'a', 16), 2); -Comparing tables master:test.t1 and slave:test.t1 -[expecting slave to replicate correctly] -INSERT INTO t2 VALUES (1, "", 1); -INSERT INTO t2 VALUES (2, repeat(_utf8'a', 16), 2); -Comparing tables master:test.t2 and slave:test.t2 -SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions; -RESET MASTER; -STOP SLAVE; -RESET SLAVE; -START SLAVE; -[expecting slave to replicate correctly] -INSERT INTO t4 VALUES (1, "", 1); -INSERT INTO t4 VALUES (2, repeat(_utf8'a', 128), 2); -Comparing tables master:test.t4 and slave:test.t4 -[expecting slave to stop] -INSERT INTO t5 VALUES (1, "", 1); -INSERT INTO t5 VALUES (2, repeat(_utf8'a', 255), 2); -Last_SQL_Error = Column 1 of table 'test.t5' cannot be converted from type 'char(255)' to type 'char(16)' -RESET MASTER; -STOP SLAVE; -RESET SLAVE; -START SLAVE; -[expecting slave to stop] -INSERT INTO t6 VALUES (1, "", 1); -INSERT INTO t6 VALUES (2, repeat(_utf8'a', 255), 2); -Last_SQL_Error = Column 1 of table 'test.t6' cannot be converted from type 'char(255)' to type 'char(128)' -RESET MASTER; -STOP SLAVE; -RESET SLAVE; -START SLAVE; -[expecting slave to replicate correctly] -INSERT INTO t7 VALUES (1, "", 1); -INSERT INTO t7 VALUES (2, repeat(_utf8'a', 255), 2); -Comparing tables master:test.t7 and slave:test.t7 -drop table t1, t2, t3, t4, t5, t6, t7; -CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE='NDB' ; -INSERT INTO t1 VALUES (1), (2), (3); -UPDATE t1 SET a = 10; -ERROR 23000: Duplicate entry '10' for key 'PRIMARY' -INSERT INTO t1 VALUES (4); -Comparing tables master:test.t1 and slave:test.t1 -drop table t1; -DROP TABLE IF EXISTS t1, t2; -CREATE TABLE t1 ( -`pk` int(11) NOT NULL AUTO_INCREMENT, -`int_nokey` int(11) NOT NULL, -`int_key` int(11) NOT NULL, -`date_key` date NOT NULL, -`date_nokey` date NOT NULL, -`time_key` time NOT NULL, -`time_nokey` time NOT NULL, -`datetime_key` datetime NOT NULL, -`datetime_nokey` datetime NOT NULL, -`varchar_key` varchar(1) NOT NULL, -`varchar_nokey` varchar(1) NOT NULL, -PRIMARY KEY (`pk`), -KEY `int_key` (`int_key`), -KEY `date_key` (`date_key`), -KEY `time_key` (`time_key`), -KEY `datetime_key` (`datetime_key`), -KEY `varchar_key` (`varchar_key`) -) ENGINE='NDB' ; -INSERT INTO t1 VALUES (1,8,5,'0000-00-00','0000-00-00','10:37:38','10:37:38','0000-00-00 00:00:00','0000-00-00 00:00:00','p','p'),(2,0,9,'0000-00-00','0000-00-00','00:00:00','00:00:00','2007-10-14 00:00:00','2007-10-14 00:00:00','d','d'); -CREATE TABLE t2 ( -`pk` int(11) NOT NULL AUTO_INCREMENT, -`int_nokey` int(11) NOT NULL, -`int_key` int(11) NOT NULL, -`date_key` date NOT NULL, -`date_nokey` date NOT NULL, -`time_key` time NOT NULL, -`time_nokey` time NOT NULL, -`datetime_key` datetime NOT NULL, -`datetime_nokey` datetime NOT NULL, -`varchar_key` varchar(1) NOT NULL, -`varchar_nokey` varchar(1) NOT NULL, -PRIMARY KEY (`pk`), -KEY `int_key` (`int_key`), -KEY `date_key` (`date_key`), -KEY `time_key` (`time_key`), -KEY `datetime_key` (`datetime_key`), -KEY `varchar_key` (`varchar_key`) -) ENGINE='NDB' ; -INSERT INTO t2 VALUES (1,1,6,'2005-12-23','2005-12-23','02:24:28','02:24:28','0000-00-00 00:00:00','0000-00-00 00:00:00','g','g'),(2,0,3,'2009-09-14','2009-09-14','00:00:00','00:00:00','2000-01-30 16:39:40','2000-01-30 16:39:40','q','q'),(3,0,3,'0000-00-00','0000-00-00','00:00:00','00:00:00','0000-00-00 00:00:00','0000-00-00 00:00:00','c','c'),(4,1,6,'2007-03-29','2007-03-29','15:49:00','15:49:00','0000-00-00 00:00:00','0000-00-00 00:00:00','m','m'),(5,4,0,'2002-12-04','2002-12-04','00:00:00','00:00:00','0000-00-00 00:00:00','0000-00-00 00:00:00','o','o'),(6,9,0,'2005-01-28','2005-01-28','00:00:00','00:00:00','2001-05-18 00:00:00','2001-05-18 00:00:00','w','w'),(7,6,0,'0000-00-00','0000-00-00','06:57:25','06:57:25','0000-00-00 00:00:00','0000-00-00 00:00:00','m','m'),(8,0,0,'0000-00-00','0000-00-00','00:00:00','00:00:00','0000-00-00 00:00:00','0000-00-00 00:00:00','z','z'),(9,4,6,'2006-08-15','2006-08-15','00:00:00','00:00:00','2002-04-12 14:44:25','2002-04-12 14:44:25','j','j'),(10,0,5,'2006-12-20','2006-12-20','10:13:53','10:13:53','2008-07-22 00:00:00','2008-07-22 00:00:00','y','y'),(11,9,7,'0000-00-00','0000-00-00','00:00:00','00:00:00','2004-07-05 00:00:00','2004-07-05 00:00:00','{','{'),(12,4,3,'2007-01-26','2007-01-26','23:00:51','23:00:51','2001-05-16 00:00:00','2001-05-16 00:00:00','f','f'),(13,7,0,'2004-03-27','2004-03-27','00:00:00','00:00:00','2005-01-24 03:30:37','2005-01-24 03:30:37','',''),(14,6,0,'2006-07-26','2006-07-26','18:43:57','18:43:57','0000-00-00 00:00:00','0000-00-00 00:00:00','{','{'),(15,0,6,'2000-01-14','2000-01-14','00:00:00','00:00:00','2000-09-21 00:00:00','2000-09-21 00:00:00','o','o'),(16,9,8,'0000-00-00','0000-00-00','21:15:08','21:15:08','0000-00-00 00:00:00','0000-00-00 00:00:00','a','a'),(17,2,0,'2004-10-27','2004-10-27','00:00:00','00:00:00','2004-03-24 22:13:43','2004-03-24 22:13:43','',''),(18,7,4,'0000-00-00','0000-00-00','08:38:27','08:38:27','2002-03-18 19:51:44','2002-03-18 19:51:44','t','t'),(19,5,3,'2008-03-07','2008-03-07','03:29:07','03:29:07','2007-12-01 18:44:44','2007-12-01 18:44:44','t','t'),(20,0,0,'2002-04-09','2002-04-09','16:06:03','16:06:03','2009-04-22 00:00:00','2009-04-22 00:00:00','n','n'); -DELETE FROM t2 WHERE `int_key` < 3 LIMIT 1; -UPDATE t1 SET `int_key` = 3 ORDER BY `pk` LIMIT 4; -DELETE FROM t2 WHERE `int_key` < 3 LIMIT 1; -DELETE FROM t2 WHERE `pk` < 6 LIMIT 1; -UPDATE t1 SET `int_key` = 6 ORDER BY `pk` LIMIT 3; -DELETE FROM t2 WHERE `pk` < 6 LIMIT 1; -UPDATE t1 SET `pk` = 6 ORDER BY `int_key` LIMIT 6; -ERROR 23000: Duplicate entry '6' for key 'PRIMARY' -DELETE FROM t2 WHERE `pk` < 7 LIMIT 1; -UPDATE t1 SET `int_key` = 4 ORDER BY `pk` LIMIT 6; -*** results: t2 must be consistent **** -Comparing tables master:test.t2 and master:test.t2 -DROP TABLE t1, t2; -EOF OF TESTS -CREATE TABLE t1 (a int) ENGINE='NDB' ; -INSERT IGNORE INTO t1 VALUES (NULL); -INSERT INTO t1 ( a ) VALUES ( 0 ); -INSERT INTO t1 ( a ) VALUES ( 9 ); -INSERT INTO t1 ( a ) VALUES ( 2 ); -INSERT INTO t1 ( a ) VALUES ( 9 ); -INSERT INTO t1 ( a ) VALUES ( 5 ); -UPDATE t1 SET a = 5 WHERE a = 9; -DELETE FROM t1 WHERE a < 6; -UPDATE t1 SET a = 9 WHERE a < 3; -INSERT INTO t1 ( a ) VALUES ( 3 ); -UPDATE t1 SET a = 0 WHERE a < 4; -UPDATE t1 SET a = 8 WHERE a < 5; -Comparing tables master:test.t1 and slave:test.t1 -drop table t1; -CREATE TABLE t1 (a bit) ENGINE='NDB' ; -INSERT IGNORE INTO t1 VALUES (NULL); -INSERT INTO t1 ( a ) VALUES ( 0 ); -UPDATE t1 SET a = 0 WHERE a = 1 LIMIT 3; -INSERT INTO t1 ( a ) VALUES ( 5 ); -DELETE FROM t1 WHERE a < 2 LIMIT 4; -DELETE FROM t1 WHERE a < 9 LIMIT 4; -INSERT INTO t1 ( a ) VALUES ( 9 ); -UPDATE t1 SET a = 8 WHERE a = 0 LIMIT 6; -INSERT INTO t1 ( a ) VALUES ( 8 ); -UPDATE t1 SET a = 0 WHERE a < 6 LIMIT 0; -INSERT INTO t1 ( a ) VALUES ( 4 ); -INSERT INTO t1 ( a ) VALUES ( 3 ); -UPDATE t1 SET a = 0 WHERE a = 7 LIMIT 6; -DELETE FROM t1 WHERE a = 4 LIMIT 7; -UPDATE t1 SET a = 9 WHERE a < 2 LIMIT 9; -UPDATE t1 SET a = 0 WHERE a < 9 LIMIT 2; -DELETE FROM t1 WHERE a < 0 LIMIT 5; -INSERT INTO t1 ( a ) VALUES ( 5 ); -UPDATE t1 SET a = 4 WHERE a < 6 LIMIT 4; -INSERT INTO t1 ( a ) VALUES ( 5 ); -UPDATE t1 SET a = 9 WHERE a < 5 LIMIT 8; -DELETE FROM t1 WHERE a < 8 LIMIT 8; -INSERT INTO t1 ( a ) VALUES ( 6 ); -DELETE FROM t1 WHERE a < 6 LIMIT 7; -UPDATE t1 SET a = 7 WHERE a = 3 LIMIT 7; -UPDATE t1 SET a = 8 WHERE a = 0 LIMIT 6; -INSERT INTO t1 ( a ) VALUES ( 7 ); -DELETE FROM t1 WHERE a < 9 LIMIT 4; -INSERT INTO t1 ( a ) VALUES ( 7 ); -INSERT INTO t1 ( a ) VALUES ( 6 ); -UPDATE t1 SET a = 8 WHERE a = 3 LIMIT 4; -DELETE FROM t1 WHERE a = 2 LIMIT 9; -DELETE FROM t1 WHERE a = 1 LIMIT 4; -UPDATE t1 SET a = 4 WHERE a = 2 LIMIT 7; -INSERT INTO t1 ( a ) VALUES ( 0 ); -DELETE FROM t1 WHERE a < 3 LIMIT 0; -UPDATE t1 SET a = 8 WHERE a = 5 LIMIT 2; -INSERT INTO t1 ( a ) VALUES ( 1 ); -UPDATE t1 SET a = 9 WHERE a < 5 LIMIT 3; -Comparing tables master:test.t1 and slave:test.t1 -drop table t1; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_truncate_7ndb.result b/mysql-test/suite/rpl_ndb/r/rpl_truncate_7ndb.result deleted file mode 100644 index 36a7ae0016b..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_truncate_7ndb.result +++ /dev/null @@ -1,89 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -**** On Master **** -CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB; -INSERT INTO t1 VALUES (1,1), (2,2); -SELECT * FROM t1 ORDER BY a,b; -a b -1 1 -2 2 -**** On Slave **** -INSERT INTO t1 VALUE (3,3); -SELECT * FROM t1 ORDER BY a,b; -a b -1 1 -2 2 -3 3 -**** On Master **** -TRUNCATE TABLE t1; -SELECT * FROM t1 ORDER BY a,b; -a b -**** On Slave **** -SELECT * FROM t1 ORDER BY a,b; -a b -**** On Master **** -DROP TABLE t1; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT -master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1 -master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */ -**** On Master **** -CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB; -INSERT INTO t1 VALUES (1,1), (2,2); -SELECT * FROM t1 ORDER BY a,b; -a b -1 1 -2 2 -**** On Slave **** -INSERT INTO t1 VALUE (3,3); -SELECT * FROM t1 ORDER BY a,b; -a b -1 1 -2 2 -3 3 -**** On Master **** -DELETE FROM t1; -SELECT * FROM t1 ORDER BY a,b; -a b -**** On Slave **** -SELECT * FROM t1 ORDER BY a,b; -a b -3 3 -**** On Master **** -DROP TABLE t1; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT -master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1 -master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */ -master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Delete_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT -master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */ diff --git a/mysql-test/suite/rpl_ndb/r/rpl_truncate_7ndb_2.result b/mysql-test/suite/rpl_ndb/r/rpl_truncate_7ndb_2.result deleted file mode 100644 index d6c57aed41b..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_truncate_7ndb_2.result +++ /dev/null @@ -1,91 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -**** On Master **** -CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB; -INSERT INTO t1 VALUES (1,1), (2,2); -SELECT * FROM t1 ORDER BY a,b; -a b -1 1 -2 2 -**** On Slave **** -INSERT INTO t1 VALUE (3,3); -SELECT * FROM t1 ORDER BY a,b; -a b -1 1 -2 2 -3 3 -**** On Master **** -TRUNCATE TABLE t1; -SELECT * FROM t1 ORDER BY a,b; -a b -**** On Slave **** -SELECT * FROM t1 ORDER BY a,b; -a b -**** On Master **** -DROP TABLE t1; -SHOW BINLOG EVENTS; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 4 Format_desc 1 106 Server ver: SERVER_VERSION, Binlog ver: 4 -master-bin.000001 106 Query 1 223 use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB -master-bin.000001 223 Query 1 287 BEGIN -master-bin.000001 287 Table_map 1 330 table_id: # (test.t1) -master-bin.000001 330 Table_map 1 392 table_id: # (mysql.ndb_apply_status) -master-bin.000001 392 Write_rows 1 451 table_id: # -master-bin.000001 451 Write_rows 1 498 table_id: # flags: STMT_END_F -master-bin.000001 498 Query 1 563 COMMIT -master-bin.000001 563 Query 1 643 use `test`; TRUNCATE TABLE t1 -master-bin.000001 643 Query 1 719 use `test`; DROP TABLE t1 -**** On Master **** -CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB; -INSERT INTO t1 VALUES (1,1), (2,2); -SELECT * FROM t1 ORDER BY a,b; -a b -1 1 -2 2 -**** On Slave **** -INSERT INTO t1 VALUE (3,3); -SELECT * FROM t1 ORDER BY a,b; -a b -1 1 -2 2 -3 3 -**** On Master **** -DELETE FROM t1; -SELECT * FROM t1 ORDER BY a,b; -a b -**** On Slave **** -SELECT * FROM t1 ORDER BY a,b; -a b -3 3 -**** On Master **** -DROP TABLE t1; -SHOW BINLOG EVENTS; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 4 Format_desc 1 106 Server ver: SERVER_VERSION, Binlog ver: 4 -master-bin.000001 106 Query 1 223 use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB -master-bin.000001 223 Query 1 287 BEGIN -master-bin.000001 287 Table_map 1 330 table_id: # (test.t1) -master-bin.000001 330 Table_map 1 392 table_id: # (mysql.ndb_apply_status) -master-bin.000001 392 Write_rows 1 451 table_id: # -master-bin.000001 451 Write_rows 1 498 table_id: # flags: STMT_END_F -master-bin.000001 498 Query 1 563 COMMIT -master-bin.000001 563 Query 1 643 use `test`; TRUNCATE TABLE t1 -master-bin.000001 643 Query 1 719 use `test`; DROP TABLE t1 -master-bin.000001 719 Query 1 836 use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB -master-bin.000001 836 Query 1 900 BEGIN -master-bin.000001 900 Table_map 1 943 table_id: # (test.t1) -master-bin.000001 943 Table_map 1 1005 table_id: # (mysql.ndb_apply_status) -master-bin.000001 1005 Write_rows 1 1064 table_id: # -master-bin.000001 1064 Write_rows 1 1111 table_id: # flags: STMT_END_F -master-bin.000001 1111 Query 1 1176 COMMIT -master-bin.000001 1176 Query 1 1240 BEGIN -master-bin.000001 1240 Table_map 1 1283 table_id: # (test.t1) -master-bin.000001 1283 Table_map 1 1345 table_id: # (mysql.ndb_apply_status) -master-bin.000001 1345 Write_rows 1 1404 table_id: # -master-bin.000001 1404 Delete_rows 1 1443 table_id: # flags: STMT_END_F -master-bin.000001 1443 Query 1 1508 COMMIT -master-bin.000001 1508 Query 1 1584 use `test`; DROP TABLE t1 diff --git a/mysql-test/suite/rpl_ndb/t/disabled.def b/mysql-test/suite/rpl_ndb/t/disabled.def deleted file mode 100644 index 3dca5048213..00000000000 --- a/mysql-test/suite/rpl_ndb/t/disabled.def +++ /dev/null @@ -1,16 +0,0 @@ -############################################################################## -# -# List the test cases that are to be disabled temporarily. -# -# Separate the test case name and the comment with ':'. -# -# : BUG# -# -# Do not use any TAB characters for whitespace. -# -############################################################################## - -rpl_ndb_row_implicit_commit_binlog : Bug#55849 2010-08-09 alik rpl_ndb.rpl_ndb_row_implicit_commit_binlog fails - -# the below testcase have been reworked to avoid the bug, test contains comment, keep bug open -rpl_ndb_2ndb : Bug#45974: rpl_ndb_2ndb fails sporadically diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb-master.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb-master.opt deleted file mode 100644 index 9a3f30e4bd0..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb-master.opt +++ /dev/null @@ -1 +0,0 @@ ---new --default-storage-engine=ndbcluster diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb-slave.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb-slave.opt deleted file mode 100644 index 0d3f1619f1e..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb --default-storage-engine=innodb --ndbcluster=0 diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb.test deleted file mode 100644 index ce16170fde3..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb.test +++ /dev/null @@ -1,39 +0,0 @@ -############################################################# -# Author: JBM -# Date: 2006-02-24 -# Purpose: Trying to test ability to replicate from cluster -# to innodb, or myisam, or replicate from innodb/myisam to -# cluster slave. Due to limitations I have created wrappers -# to be able to use the same code for all these different -# test and to have control over the tests. -############################################################## --- source include/have_ndb.inc -# Since the master generates row-based events, the slave must be in -# ROW or MIXED mode to accept the events. --- source include/have_binlog_format_mixed_or_row.inc --- source include/master-slave.inc - --- connection slave --- source include/have_innodb.inc - -# Remove any old ndb_apply_status from slaves datadir -let $datadir= `SELECT @@datadir`; ---error 0,1 -remove_file $datadir/mysql/ndb_apply_status.frm; ---error 0,1 -remove_file $datadir/mysql/ndb_apply_status.ndb; - -set @@global.slave_exec_mode= 'IDEMPOTENT'; -CREATE TABLE mysql.ndb_apply_status - ( server_id INT UNSIGNED NOT NULL, - epoch BIGINT UNSIGNED NOT NULL, - log_name VARCHAR(255) BINARY NOT NULL, - start_pos BIGINT UNSIGNED NOT NULL, - end_pos BIGINT UNSIGNED NOT NULL, - PRIMARY KEY USING HASH (server_id)) ENGINE=INNODB; - ---source extra/rpl_tests/rpl_ndb_2multi_eng.test - -set @@global.slave_exec_mode= DEFAULT; ---connection slave -drop table mysql.ndb_apply_status; diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam-master.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam-master.opt deleted file mode 100644 index b63ef44e8fc..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam-master.opt +++ /dev/null @@ -1 +0,0 @@ ---new --default-storage-engine=ndbcluster diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam-slave.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam-slave.opt deleted file mode 100644 index 9b5f524e131..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---default-storage-engine=myisam --ndbcluster=0 diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam.test deleted file mode 100644 index 8bd9be0c346..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam.test +++ /dev/null @@ -1,38 +0,0 @@ -############################################################# -# Author: JBM -# Date: 2006-02-24 -# Purpose: Trying to test ability to replicate from cluster -# to innodb, or myisam, or replicate from innodb/myisam to -# cluster slave. Due to limitations I have created wrappers -# to be able to use the same code for all these different -# test and to have control over the tests. -############################################################## --- source include/have_ndb.inc -# Since the master generates row-based events, the slave must be in -# ROW or MIXED mode to accept the events. --- source include/have_binlog_format_mixed_or_row.inc --- source include/master-slave.inc - --- connection slave - -# Remove any old ndb_apply_status from slaves datadir -let $datadir= `SELECT @@datadir`; ---error 0,1 -remove_file $datadir/mysql/ndb_apply_status.frm; ---error 0,1 -remove_file $datadir/mysql/ndb_apply_status.ndb; - -set @@global.slave_exec_mode= 'IDEMPOTENT'; -CREATE TABLE mysql.ndb_apply_status - ( server_id INT UNSIGNED NOT NULL, - epoch BIGINT UNSIGNED NOT NULL, - log_name VARCHAR(255) BINARY NOT NULL, - start_pos BIGINT UNSIGNED NOT NULL, - end_pos BIGINT UNSIGNED NOT NULL, - PRIMARY KEY USING HASH (server_id)) ENGINE=MYISAM; - ---source extra/rpl_tests/rpl_ndb_2multi_eng.test - -set @@global.slave_exec_mode= DEFAULT; ---connection slave -drop table mysql.ndb_apply_status; diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2ndb-slave.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2ndb-slave.opt deleted file mode 100644 index 5304fd49b6b..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2ndb-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---default-storage-engine=ndbcluster --log-slave-updates=0 diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2ndb.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2ndb.test deleted file mode 100644 index e954c72fd1d..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2ndb.test +++ /dev/null @@ -1,19 +0,0 @@ -############################################################# -# Author: Rafal Somla -# Date: 2006-08-20 -# Purpose: Trying to test ability to replicate from cluster -# to other engines (innodb, myisam), see also rpl_ndb_2other.test -############################################################## ---source include/have_binlog_format_mixed_or_row.inc ---source include/have_ndb.inc ---source include/ndb_master-slave.inc - -# On master use NDB as storage engine. -connection master; -SET storage_engine=ndb; - ---echo ---echo === NDB -> NDB === ---echo -connection slave; ---source extra/rpl_tests/rpl_ndb_2multi_basic.test diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2other-slave.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2other-slave.opt deleted file mode 100644 index 378a377e053..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2other-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb --loose-ndbcluster=OFF --log-slave-updates=0 --default-storage-engine=MyISAM diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2other.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2other.test deleted file mode 100644 index 41f91d62dec..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2other.test +++ /dev/null @@ -1,50 +0,0 @@ -############################################################# -# Author: Rafal Somla -# Date: 2006-08-20 -# Purpose: Trying to test ability to replicate from cluster -# to other engines (innodb, myisam). -############################################################## ---source include/have_ndb.inc ---source include/have_innodb.inc ---source include/have_binlog_format_mixed_or_row.inc ---source include/master-slave.inc - -# On master use NDB as storage engine. -connection master; -SET storage_engine=ndb; - ---echo ---echo === NDB -> MYISAM === ---echo -connection slave; - -# Remove any old ndb_apply_status from slaves datadir -let $datadir= `SELECT @@datadir`; ---error 0,1 -remove_file $datadir/mysql/ndb_apply_status.frm; ---error 0,1 -remove_file $datadir/mysql/ndb_apply_status.ndb; - -set @old_slave_exec_mode= @@global.slave_exec_mode; -set @@global.slave_exec_mode= 'IDEMPOTENT'; -CREATE TABLE mysql.ndb_apply_status - ( server_id INT UNSIGNED NOT NULL, - epoch BIGINT UNSIGNED NOT NULL, - log_name VARCHAR(255) BINARY NOT NULL, - start_pos BIGINT UNSIGNED NOT NULL, - end_pos BIGINT UNSIGNED NOT NULL, - PRIMARY KEY USING HASH (server_id)) ENGINE=MYISAM; -SET storage_engine=myisam; ---source extra/rpl_tests/rpl_ndb_2multi_basic.test - ---echo ---echo === NDB -> INNODB === ---echo -connection slave; -alter table mysql.ndb_apply_status engine=innodb; -SET storage_engine=innodb; ---source extra/rpl_tests/rpl_ndb_2multi_basic.test - -connection slave; -drop table mysql.ndb_apply_status; -set @@global.slave_exec_mode= @old_slave_exec_mode; diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_UUID.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_UUID.test deleted file mode 100644 index ea623a06fd1..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_UUID.test +++ /dev/null @@ -1,8 +0,0 @@ -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -######################################################## ---source include/have_ndb.inc ---source include/have_binlog_format_mixed_or_row.inc ---source include/ndb_master-slave.inc -let $engine_type=NDB; ---source extra/rpl_tests/rpl_row_UUID.test diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_apply_status-master.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_apply_status-master.opt deleted file mode 100644 index 3f4aff8a321..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_apply_status-master.opt +++ /dev/null @@ -1 +0,0 @@ ---replicate_ignore_db=mysql diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_apply_status.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_apply_status.test deleted file mode 100644 index cc74acc6490..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_apply_status.test +++ /dev/null @@ -1,26 +0,0 @@ --- source include/have_ndb.inc --- source include/have_binlog_format_row.inc --- source include/ndb_master-slave.inc - -# -# Bug#28170 replicate-ignore-db=mysql should not ignore mysql.ndb_apply_status -# -# Slave is started with --replicate-ignore-db=mysql -# -sync_slave_with_master; -echo *** on slave there should be zero rows ***; -select count(*) from mysql.ndb_apply_status; - -connection master; -create table t1 (a int key, b int) engine ndb; -insert into t1 values (1,1); -echo *** on master it should be empty ***; -select * from mysql.ndb_apply_status; - -sync_slave_with_master; -echo *** on slave there should be one row ***; -select count(*) from mysql.ndb_apply_status; - -connection master; -drop table t1; -sync_slave_with_master; diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_auto_inc.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_auto_inc.test deleted file mode 100644 index 5e0584e332a..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_auto_inc.test +++ /dev/null @@ -1,118 +0,0 @@ -# -# Test of auto_increment in CRBR -# -##################################### -# By: JBM -# Date: 2006-02-10 -# Change: Augmented test to use with cluster -##################################### ---source include/have_ndb.inc ---source include/have_binlog_format_mixed_or_row.inc ---source include/ndb_master-slave.inc - ---echo ***************** Test 1 ************************ ---echo -CREATE TABLE t1 (a INT NOT NULL auto_increment,b INT, PRIMARY KEY (a)) ENGINE=NDB auto_increment=3; -insert into t1 values (NULL,1),(NULL,2),(NULL,3); ---echo ******* Select from Master ************* ---echo -select * from t1 ORDER BY a; - - -sync_slave_with_master; ---echo ******* Select from Slave ************* ---echo -select * from t1 ORDER BY a; -connection master; -drop table t1; - -create table t1 (a int not null auto_increment,b int, primary key (a)) engine=NDB; -insert into t1 values (1,1),(NULL,2),(3,3),(NULL,4); -delete from t1 where b=4; -insert into t1 values (NULL,5),(NULL,6); ---echo ******* Select from Master ************* ---echo -select * from t1 ORDER BY a; - -sync_slave_with_master; ---echo ******* Select from Slave ************* ---echo -select * from t1 ORDER BY a; -connection master; - -drop table t1; - -create table t1 (a int not null auto_increment, primary key (a)) engine=NDB; -# Insert with 2 insert statements to get better testing of logging -insert into t1 values (NULL),(5),(NULL); -insert into t1 values (250),(NULL); ---echo ******* Select from Master ************* ---echo -select * from t1 ORDER BY a; -insert into t1 values (1000); -set @@insert_id=400; -insert into t1 values(NULL),(NULL); ---echo ******* Select from Master ************* ---echo -select * from t1 ORDER BY a; - -sync_slave_with_master; ---echo ******* Select from Slave ************* ---echo -select * from t1 ORDER BY a; -connection master; -drop table t1; - -create table t1 (a int not null auto_increment, primary key (a)) engine=NDB; -# Insert with 2 insert statements to get better testing of logging -insert into t1 values (NULL),(5),(NULL),(NULL); -insert into t1 values (500),(NULL),(502),(NULL),(600); ---echo ******* Select from Master ************* ---echo -select * from t1 ORDER BY a; -set @@insert_id=600; -# We expect a duplicate key error that we will ignore below ---error 1022 -insert into t1 values(600),(NULL),(NULL); -set @@insert_id=600; -insert ignore into t1 values(600),(NULL),(NULL),(610),(NULL); ---echo ******* Select from Master ************* ---echo -select * from t1 ORDER BY a; - -sync_slave_with_master; ---echo ******* Select from Slave ************* ---echo -select * from t1 ORDER BY a; -connection master; -drop table t1; - -# -# Test that auto-increment works when slave has rows in the table -# - -create table t1 (a int not null auto_increment, primary key (a)) engine=NDB; - -sync_slave_with_master; -insert into t1 values(2),(12),(22),(32),(42); -connection master; - -insert into t1 values (NULL),(NULL); -insert into t1 values (3),(NULL),(NULL); ---echo ******* Select from Master ************* ---echo -select * from t1 ORDER BY a; - -sync_slave_with_master; ---echo ******* Select from Slave ************* ---echo ---echo ** Slave should have 2, 12, 22, 32, 42 ** ---echo ** Master will have 2 but not 12, 22, 32, 42 ** ---echo -select * from t1 ORDER BY a; -connection master; - -drop table t1; - -# End cleanup -sync_slave_with_master; diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_bank.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_bank.test deleted file mode 100644 index b90e6fff8bc..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_bank.test +++ /dev/null @@ -1,181 +0,0 @@ -# -# Currently this test only runs in the source tree with the -# ndb/test programs compiled. -# invoke with: ./mysql-test-run --ndb-extra-test --do-test=rpl_ndb_bank -# -# 1. start a "bank" application running on the master cluster -# 2. perform online sync of slave -# 3. periodically check consistency of slave -# 4. stop the bank application -# 5. check that the slave and master BANK databases are the same -# - ---source include/have_ndb.inc ---source include/have_ndb_extra.inc ---source include/have_binlog_format_mixed_or_row.inc ---source include/ndb_master-slave.inc - -# kill any trailing processes ---system killall lt-bankTransactionMaker lt-bankTimer lt-bankMakeGL || true - ---disable_warnings -# initialize master ---connection master -CREATE DATABASE IF NOT EXISTS BANK; -DROP DATABASE BANK; -CREATE DATABASE BANK default charset=latin1 default collate=latin1_bin; ---enable_warnings - -# -# These tables should correspond to the table definitions in -# storage/ndb/test/src/NDBT_Tables.cpp -# ---connection master -USE BANK; -CREATE TABLE GL ( TIME BIGINT UNSIGNED NOT NULL, - ACCOUNT_TYPE INT UNSIGNED NOT NULL, - BALANCE INT UNSIGNED NOT NULL, - DEPOSIT_COUNT INT UNSIGNED NOT NULL, - DEPOSIT_SUM INT UNSIGNED NOT NULL, - WITHDRAWAL_COUNT INT UNSIGNED NOT NULL, - WITHDRAWAL_SUM INT UNSIGNED NOT NULL, - PURGED INT UNSIGNED NOT NULL, - PRIMARY KEY USING HASH (TIME,ACCOUNT_TYPE)) - ENGINE = NDB; - -CREATE TABLE ACCOUNT ( ACCOUNT_ID INT UNSIGNED NOT NULL, - OWNER INT UNSIGNED NOT NULL, - BALANCE INT UNSIGNED NOT NULL, - ACCOUNT_TYPE INT UNSIGNED NOT NULL, - PRIMARY KEY USING HASH (ACCOUNT_ID)) - ENGINE = NDB; - -CREATE TABLE TRANSACTION ( TRANSACTION_ID BIGINT UNSIGNED NOT NULL, - ACCOUNT INT UNSIGNED NOT NULL, - ACCOUNT_TYPE INT UNSIGNED NOT NULL, - OTHER_ACCOUNT INT UNSIGNED NOT NULL, - TRANSACTION_TYPE INT UNSIGNED NOT NULL, - TIME BIGINT UNSIGNED NOT NULL, - AMOUNT INT UNSIGNED NOT NULL, - PRIMARY KEY USING HASH (TRANSACTION_ID,ACCOUNT)) - ENGINE = NDB; - -CREATE TABLE SYSTEM_VALUES ( SYSTEM_VALUES_ID INT UNSIGNED NOT NULL, - VALUE BIGINT UNSIGNED NOT NULL, - PRIMARY KEY USING HASH (SYSTEM_VALUES_ID)) - ENGINE = NDB; - -CREATE TABLE ACCOUNT_TYPE ( ACCOUNT_TYPE_ID INT UNSIGNED NOT NULL, - DESCRIPTION CHAR(64) NOT NULL, - PRIMARY KEY USING HASH (ACCOUNT_TYPE_ID)) - ENGINE = NDB; - -# -# create "BANK" application -# ---exec NDB_CONNECTSTRING=$NDB_CONNECTSTRING ../storage/ndb/test/ndbapi/bank/bankCreator >> $NDB_TOOLS_OUTPUT - -# -# start main loop -# repeat backup-restore-check -# - -# set this high if testing to run many syncs in loop ---let $2=1 -while ($2) -{ - -# -# start "BANK" application -# ---exec NDB_CONNECTSTRING=$NDB_CONNECTSTRING ../storage/ndb/test/ndbapi/bank/bankTimer -w 5 >> $NDB_TOOLS_OUTPUT & ---exec NDB_CONNECTSTRING=$NDB_CONNECTSTRING ../storage/ndb/test/ndbapi/bank/bankMakeGL >> $NDB_TOOLS_OUTPUT & ---exec NDB_CONNECTSTRING=$NDB_CONNECTSTRING ../storage/ndb/test/ndbapi/bank/bankTransactionMaker >> $NDB_TOOLS_OUTPUT & - -# -# let the "BANK" run for a while -# ---sleep 5 - ---disable_warnings -# initialize slave for sync ---connection slave -STOP SLAVE; -RESET SLAVE; -# to make sure we drop any ndbcluster tables -CREATE DATABASE IF NOT EXISTS BANK; -DROP DATABASE BANK; -# create database -CREATE DATABASE BANK; ---enable_warnings - -# -# Time to sync the slave: -# start by taking a backup on master ---connection master -RESET MASTER; ---exec $NDB_MGM --no-defaults --ndb-connectstring="$NDB_CONNECTSTRING" -e "start backup" >> $NDB_TOOLS_OUTPUT - -# there is no neat way to find the backupid, this is a hack to find it... ---exec $NDB_TOOLS_DIR/ndb_select_all --ndb-connectstring="$NDB_CONNECTSTRING" -d sys --delimiter=',' SYSTAB_0 | grep 520093696 > $MYSQLTEST_VARDIR/tmp.dat -CREATE TABLE IF NOT EXISTS mysql.backup_info (id INT, backup_id INT) ENGINE = HEAP; -DELETE FROM mysql.backup_info; -LOAD DATA INFILE '../tmp.dat' INTO TABLE mysql.backup_info FIELDS TERMINATED BY ','; ---exec rm $MYSQLTEST_VARDIR/tmp.dat || true ---replace_column 1 -SELECT @the_backup_id:=backup_id FROM mysql.backup_info; -let the_backup_id=`select @the_backup_id`; - -# restore on slave, first check that nothing is there ---connection slave ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --ndb-connectstring="$NDB_CONNECTSTRING_SLAVE" -p 8 -b $the_backup_id -n 1 -m -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --ndb-connectstring="$NDB_CONNECTSTRING_SLAVE" -p 8 -b $the_backup_id -n 2 -r -e --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT - -# -# now setup replication to continue from last epoch ---source include/ndb_setup_slave.inc ---connection slave -START SLAVE; - - -# -# Now loop and check consistency every 2 seconds on slave -# ---connection slave ---let $1=10 -while ($1) -{ - --sleep 2 - --replace_result $MASTER_MYPORT MASTER_PORT - --replace_column 1 7 8 9 16 22 23 33 34 35 - SHOW SLAVE STATUS; - STOP SLAVE; - --exec NDB_CONNECTSTRING=$NDB_CONNECTSTRING_SLAVE ../storage/ndb/test/ndbapi/bank/bankValidateAllGLs >> $NDB_TOOLS_OUTPUT - START SLAVE; - --dec $1 -} - -# -# Stop transactions -# ---exec killall lt-bankTransactionMaker lt-bankTimer lt-bankMakeGL - -# -# Check that the databases are the same on slave and master -# 1. dump database BANK on both master and slave -# 2. compare, there should be no difference -# ---exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info BANK ACCOUNT_TYPE ACCOUNT GL TRANSACTION > $MYSQLTEST_VARDIR/tmp/master_BANK.sql ---connection master -use test; -create table t1 (a int primary key) engine=ndb; -insert into t1 values (1); ---sync_slave_with_master ---exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info BANK ACCOUNT_TYPE ACCOUNT GL TRANSACTION > $MYSQLTEST_VARDIR/tmp/slave_BANK.sql ---connection master -drop table t1; - -diff_files $MYSQLTEST_VARDIR/tmp/master_BANK.sql $MYSQLTEST_VARDIR/tmp/slave_BANK.sql; - - --dec $2 -} diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_basic.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_basic.test deleted file mode 100644 index 69f630c856a..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_basic.test +++ /dev/null @@ -1,264 +0,0 @@ ---source include/have_ndb.inc -# Since the master generates row-based events, the slave must be in -# ROW or MIXED mode to accept the events. ---source include/have_binlog_format_mixed_or_row.inc ---source include/ndb_master-slave.inc - - - -# -# Bug #11087 -# -# connect to the master and create tabe t1 in gotoslave database ---connection master -CREATE TABLE `t1` ( `nid` int(11) NOT NULL default '0', - `nom` char(4) default NULL, - `prenom` char(4) default NULL, - PRIMARY KEY (`nid`)) - ENGINE=ndbcluster DEFAULT CHARSET=latin1; - -INSERT INTO t1 VALUES(1,"XYZ1","ABC1"); -select * from t1 order by nid; - ---sync_slave_with_master -# connect to slave and ensure data it there. ---connection slave -select * from t1 order by nid; - ---connection master -delete from t1; -INSERT INTO t1 VALUES(1,"XYZ2","ABC2"); -# Make sure all rows are on the master -select * from t1 order by nid; - -# make sure all rows are on the slave. ---sync_slave_with_master ---connection slave -# Bug #11087 would have row with nid 2 missing -select * from t1 order by nid; - ---connection master -delete from t1; -insert into t1 values(1,"AA", "AA"); -insert into t1 values(2,"BB", "BB"); -insert into t1 values(3,"CC", "CC"); -insert into t1 values(4,"DD", "DD"); - -begin; -# delete+insert = update -delete from t1 where nid = 1; -insert into t1 values (1,"A2", "A2"); - -# update+delete = delete -update t1 set nom="B2" where nid = 2; -delete from t1 where nid = 2; - -# multi-update -update t1 set nom = "D2" where nid = 4; -delete from t1 where nid = 4; -insert into t1 values (4, "D3", "D3"); -update t1 set nom = "D4" where nid = 4; - -# insert+delete = nothing -insert into t1 values (5, "EE", "EE"); -delete from t1 where nid = 5; - -commit; -select * from t1 order by 1; ---sync_slave_with_master ---connection slave -select * from t1 order by 1; ---connection master -DROP table t1; - -# -# Test replication of table with no primary key -# ---connection master -CREATE TABLE `t1` ( `nid` int(11) NOT NULL default '0', - `nom` char(4) default NULL, - `prenom` char(4) default NULL) - ENGINE=ndbcluster DEFAULT CHARSET=latin1; - -INSERT INTO t1 VALUES(1,"XYZ1","ABC1"),(2,"AAA","BBB"),(3,"CCC","DDD"); -select * from t1 order by nid; - ---sync_slave_with_master -# connect to slave and ensure data it there. ---connection slave -select * from t1 order by nid; - ---connection master -delete from t1 where nid = 2; -INSERT INTO t1 VALUES(4,"EEE","FFF"); -# Make sure all rows are on the master -select * from t1 order by nid; - -# make sure all rows are on the slave. ---sync_slave_with_master ---connection slave -select * from t1 order by nid; - ---connection master -UPDATE t1 set nid=nid+1; -UPDATE t1 set nom="CCP" where nid = 4; -select * from t1 order by nid; - -# make sure all rows are on the slave. ---sync_slave_with_master ---connection slave -select * from t1 order by nid; - ---connection master -DROP table t1; - -# -# Bug #27378 update becomes delete on slave -# - ---connection master -CREATE TABLE `t1` ( - `prid` int(10) unsigned NOT NULL, - `id_type` enum('IMSI','SIP') NOT NULL, - `fkimssub` varchar(50) NOT NULL, - `user_id` varchar(20) DEFAULT NULL, - `password` varchar(20) DEFAULT NULL, - `ptg_nbr` varchar(20) DEFAULT NULL, - `old_tmsi` int(10) unsigned DEFAULT NULL, - `new_tmsi` int(10) unsigned DEFAULT NULL, - `dev_capability` int(10) unsigned DEFAULT NULL, - `dev_oid` bigint(20) unsigned DEFAULT NULL, - `lac_cell_id` bigint(20) unsigned DEFAULT NULL, - `ms_classmark1` int(10) unsigned DEFAULT NULL, - `cipher_key` int(10) unsigned DEFAULT NULL, - `priid_master` int(10) unsigned DEFAULT NULL, - PRIMARY KEY (`prid`), - UNIQUE KEY `fkimssub` (`fkimssub`,`ptg_nbr`) USING HASH -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; - -INSERT INTO `t1` VALUES (183342,'IMSI','config3_sub_2Privates_3Publics_imssub_36668','user_id_73336','user_id_73336','73336',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL),(47617,'IMSI','config3_sub_2Privates_3Publics_imssub_9523','user_id_19046','user_id_19046','19046',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL),(200332,'IMSI','config3_sub_2Privates_3Publics_imssub_40066','user_id_80132','user_id_80132','80132',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL),(478882,'IMSI','config3_sub_2Privates_3Publics_imssub_95776','user_id_191552','user_id_191552','191552',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL),(490146,'IMSI','config3_sub_2Privates_3Publics_imssub_98029','user_id_196057','user_id_196057','196057',NULL,NULL,NULL,1010,NULL,NULL,NULL,NULL),(499301,'IMSI','config3_sub_2Privates_3Publics_imssub_99860','user_id_199719','user_id_199719','199719',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL),(506101,'IMSI','config3_sub_2Privates_3Publics_imssub_101220','user_id_202439','user_id_202439','202439',NULL,NULL,NULL,1010,NULL,NULL,NULL,NULL),(510142,'IMSI','config3_sub_2Privates_3Publics_imssub_102028','user_id_204056','user_id_204056','204056',NULL,NULL,NULL,1010,NULL,NULL,NULL,NULL),(515871,'IMSI','config3_sub_2Privates_3Publics_imssub_103174','user_id_206347','user_id_206347','206347',NULL,NULL,NULL,1010,NULL,NULL,NULL,NULL),(209842,'IMSI','config3_sub_2Privates_3Publics_imssub_41968','user_id_83936','user_id_83936','83936',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL),(365902,'IMSI','config3_sub_2Privates_3Publics_imssub_73180','user_id_146360','user_id_146360','146360',NULL,NULL,NULL,1010,NULL,NULL,NULL,NULL),(11892,'IMSI','config3_sub_2Privates_3Publics_imssub_2378','user_id_4756','user_id_4756','4756',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL); - -select count(*) from t1; - ---sync_slave_with_master ---connection slave -select count(*) from t1; - ---connection master -update t1 set dev_oid=dev_oid+1; -select count(*) from t1; - ---sync_slave_with_master ---connection slave -select count(*) from t1; - ---connection master -DROP table t1; - -################################################################## -# -# Check that retries are made on the slave on some temporary errors -# - -# -# 1. Deadlock -# ---connection master -CREATE TABLE `t1` ( `nid` int(11) NOT NULL default '0', - `nom` char(4) default NULL, - `prenom` char(4) default NULL, - PRIMARY KEY USING HASH (`nid`)) - ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO t1 VALUES(1,"XYZ1","ABC1"); - -# cause a lock on that row on the slave ---sync_slave_with_master ---connection slave ---echo **** On Slave **** -BEGIN; -UPDATE t1 SET `nom`="LOCK" WHERE `nid`=1; - -# set number of retries low so we fail the retries -set GLOBAL slave_transaction_retries=1; - -# now do a change to this row on the master -# will deadlock on the slave because of lock above ---connection master ---echo **** On Master **** -UPDATE t1 SET `nom`="DEAD" WHERE `nid`=1; - ---echo **** On Slave **** -# Wait for deadlock to be detected. -# When detected, the slave will stop, so we just wait for it to stop. -connection slave; -source include/wait_for_slave_sql_to_stop.inc; - -# Replication should have stopped, since max retries were not enough. -# verify with show slave status -# 1205 = ER_LOCK_WAIT_TIMEOUT ---let $slave_sql_errno= 1205 ---source include/wait_for_slave_sql_error.inc - -# now set max retries high enough to succeed, and start slave again -set GLOBAL slave_transaction_retries=10; -source include/start_slave.inc; -# Wait for deadlock to be detected and retried. -# We want to wait until at least one retry has been made, but before -# the slave stops. currently, there is no safe way to do that: we -# would need to access the retry counter, but that is not exposed. -# Failing that, we just wait sufficiently long that one but not all -# retries have been made. See BUG#35183. -sleep 5; - -# commit transaction to release lock on row and let replication succeed -select * from t1 order by nid; -COMMIT; - -# verify that the row succeded to be applied on the slave ---connection master ---sync_slave_with_master ---connection slave -select * from t1 order by nid; - -# cleanup ---connection master -DROP TABLE t1; - - -# -# BUG#18094 -# Slave caches invalid table definition after atlters causes select failure -# ---connection master -CREATE TABLE t1 (c1 INT KEY) ENGINE=NDB; - -INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); - -ALTER TABLE t1 ADD c2 INT; - ---sync_slave_with_master -connection slave; -SELECT * FROM t1 ORDER BY c1; - -connection master; -ALTER TABLE t1 CHANGE c2 c2 TEXT CHARACTER SET utf8; -ALTER TABLE t1 CHANGE c2 c2 BLOB; - ---sync_slave_with_master -connection slave; -# here we would get error 1412 prior to bug -SELECT * FROM t1 ORDER BY c1 LIMIT 5; - ---connection master -TRUNCATE t1; -SELECT count(*) FROM t1; -INSERT INTO t1 VALUES (101,NULL),(102,NULL),(103,NULL),(104,NULL),(105,NULL),(106,NULL),(107,NULL),(108,NULL),(109,NULL),(1010,NULL); ---sync_slave_with_master -connection slave; -SELECT count(*) FROM t1; -SELECT c1 FROM t1 ORDER BY c1 LIMIT 5; - -# cleanup ---connection master -DROP TABLE t1; --- source include/master-slave-end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_binlog_format_errors-master.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_binlog_format_errors-master.opt deleted file mode 100644 index efea2bf1db5..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_binlog_format_errors-master.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb $EXAMPLE_PLUGIN_OPT --binlog-ignore-db=other diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_binlog_format_errors-slave.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_binlog_format_errors-slave.opt deleted file mode 100644 index ffa981152ea..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_binlog_format_errors-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb $EXAMPLE_PLUGIN_OPT diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_binlog_format_errors.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_binlog_format_errors.test deleted file mode 100644 index 1aae0d2d57f..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_binlog_format_errors.test +++ /dev/null @@ -1,262 +0,0 @@ -# ==== Purpose ==== -# -# Verify that errors or warnings are issued for all error conditions -# related to deciding the binlog format of a statement. The possible -# errors are listed in a comment above decide_logging_format() in -# sql_base.cc. -# -# ==== Method ==== -# -# Each error condition is executed; we verify that there is an error. -# -# ==== Related bugs ==== -# -# BUG#39934: Slave stops for engine that only support row-based logging -# BUG#42829: binlogging enabled for all schemas regardless of binlog-db-db / binlog-ignore-db -# -# ==== Related test cases ==== -# -# binlog.binlog_unsafe verifies more thoroughly that a warning is -# given for the case when an unsafe statement is executed and -# binlog_format = STATEMENT. - -# Need debug so that 'SET @@session.debug' works. ---source include/have_debug.inc -# Need example plugin because it is the only statement-only engine. ---source include/have_example_plugin.inc -# The test changes binlog_format, so there is no reason to run it -# under more than one binlog format. ---source include/have_binlog_format_row.inc ---source include/have_ndb.inc ---source include/have_innodb.inc ---source include/ndb_master-slave.inc - -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("Slave: Cannot execute statement: impossible to write to binary log"); -enable_query_log; - ---echo ==== Initialize ==== - ---echo [on slave] ---connection slave - -SET @old_binlog_format= @@global.binlog_format; -INSTALL PLUGIN example SONAME 'ha_example.so'; - ---echo [on master] ---connection master - -SET @old_binlog_format= @@global.binlog_format; -INSTALL PLUGIN example SONAME 'ha_example.so'; - -CREATE TABLE t (a VARCHAR(100)) ENGINE = MYISAM; -CREATE TABLE t_self_logging (a VARCHAR(100)) ENGINE = NDB; -CREATE TABLE t_row (a VARCHAR(100)) ENGINE = INNODB; -CREATE TABLE t_stmt (a VARCHAR(100)) ENGINE = EXAMPLE; -CREATE TABLE t_slave_stmt (a VARCHAR(100)) ENGINE = MYISAM; -CREATE TABLE t_autoinc (a INT KEY AUTO_INCREMENT) ENGINE = MYISAM; -CREATE TABLE t_double_autoinc (a INT KEY AUTO_INCREMENT) ENGINE = MYISAM; - ---eval CREATE TRIGGER trig_autoinc BEFORE INSERT ON t_autoinc FOR EACH ROW BEGIN INSERT INTO t_stmt VALUES ('x'); END ---eval CREATE TRIGGER trig_double_autoinc BEFORE INSERT ON t_double_autoinc FOR EACH ROW BEGIN INSERT INTO t_autoinc VALUES (NULL); END - -CREATE DATABASE other; - -# This makes the innodb table row-only -SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED; - ---echo [on slave] ---sync_slave_with_master - -DROP TABLE t_slave_stmt; -CREATE TABLE t_slave_stmt (a INT) ENGINE = EXAMPLE; - ---echo [on master] ---connection master - -# This is a format description event. It is needed because any BINLOG -# statement containing a row event must be preceded by a BINLOG -# statement containing a format description event. -BINLOG ' -1gRVSg8BAAAAZgAAAGoAAAABAAQANS4xLjM2LWRlYnVnLWxvZwAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAADWBFVKEzgNAAgAEgAEBAQEEgAAUwAEGggAAAAICAgC -'; - - ---echo ==== Test ==== - ---echo ---- binlog_format=row ---- - ---echo * Modify tables of more than one engine, one of which is self-logging ---eval CREATE TRIGGER trig_1 AFTER INSERT ON t_self_logging FOR EACH ROW BEGIN INSERT INTO t VALUES (1); END ---error ER_BINLOG_MULTIPLE_ENGINES_AND_SELF_LOGGING_ENGINE -INSERT INTO t_self_logging VALUES (1); -DROP trigger trig_1; -SELECT * FROM t_self_logging /* Should be empty */; -SELECT * FROM t /* Should be empty */; - ---echo * Modify both row-only and stmt-only table ---eval CREATE TRIGGER trig_2 AFTER INSERT ON t_stmt FOR EACH ROW BEGIN INSERT INTO t_row VALUES(1); END ---error ER_BINLOG_ROW_ENGINE_AND_STMT_ENGINE -INSERT INTO t_stmt VALUES (1); -SELECT * FROM t_stmt /* should be empty */; -DROP TRIGGER trig_2; - ---echo * Stmt-only table and binlog_format=row ---error ER_BINLOG_ROW_MODE_AND_STMT_ENGINE -INSERT INTO t_stmt VALUES (1); -SELECT * FROM t_stmt /* should be empty */; - ---echo * Row injection and stmt-only table: in slave sql thread -INSERT INTO t_slave_stmt VALUES (1); ---echo [on slave] ---connection slave -# 1664 = ER_BINLOG_ROW_INJECTION_AND_STMT_ENGINE ---let $slave_sql_errno= 1664 ---let $show_slave_sql_error= 1 ---source include/wait_for_slave_sql_error_and_skip.inc ---connection slave -SELECT * FROM t_slave_stmt /* should be empty */; - ---echo [on master] ---connection master ---echo * Row injection and stmt-only table: use BINLOG statement -# This is a Table_map_event and a Write_rows_event. Together, they are -# equivalent to 'INSERT INTO t_stmt VALUES (1)' ---error ER_BINLOG_ROW_INJECTION_AND_STMT_ENGINE -BINLOG ' -1gRVShMBAAAALwAAAEABAAAAABcAAAAAAAAABHRlc3QABnRfc3RtdAABDwJkAAE= -1gRVShcBAAAAIAAAAGABAAAQABcAAAAAAAEAAf/+ATE= -'; -SELECT * FROM t_stmt /* should be empty */; - - ---echo ---- binlog_format=mixed ---- - ---echo [on slave] ---sync_slave_with_master ---source include/stop_slave.inc -SET @@global.binlog_format = MIXED; ---source include/start_slave.inc ---echo [on master] ---connection master -SET @@global.binlog_format = MIXED; -SET @@session.binlog_format = MIXED; - ---echo * Unsafe statement and stmt-only engine ---error ER_BINLOG_UNSAFE_AND_STMT_ENGINE -INSERT INTO t_stmt VALUES (UUID()); - -# Concatenate two unsafe values, and then concatenate NULL to -# that so that the result is NULL and we instead use autoinc. ---echo * Multi-unsafe statement and stmt-only engine ---error ER_BINLOG_UNSAFE_AND_STMT_ENGINE -INSERT DELAYED INTO t_double_autoinc SELECT CONCAT(UUID(), @@hostname, NULL) FROM mysql.general_log LIMIT 1; - - ---echo ---- binlog_format=statement ---- - ---echo [on slave] ---sync_slave_with_master ---source include/stop_slave.inc -SET @@global.binlog_format = STATEMENT; ---source include/start_slave.inc ---echo [on master] ---connection master -SET @@global.binlog_format = STATEMENT; -SET @@session.binlog_format = STATEMENT; - ---echo * Row-only engine and binlog_format=statement: innodb-specific message ---error ER_BINLOG_STMT_MODE_AND_ROW_ENGINE -INSERT INTO t_row VALUES (1); -SELECT * FROM t_row /* should be empty */; - -# Commented out since innodb gives an error (this is a bug) -#--echo * Same statement, but db filtered out - no error -#USE other; -#INSERT INTO test.t_row VALUES (1); -#USE test; - ---echo * Row-only engine and binlog_format=statement: generic message -SET @@session.debug= '+d,no_innodb_binlog_errors'; ---error ER_BINLOG_STMT_MODE_AND_ROW_ENGINE -INSERT INTO t_row VALUES (1); -SELECT * FROM t_row /* should be empty */; - ---echo * Same statement, but db filtered out - no error -USE other; -INSERT INTO test.t_row VALUES (1); -USE test; -SET @@session.debug= ''; -SELECT * FROM t_row /* should contain the value 1 */; - ---echo * Row injection and binlog_format=statement: BINLOG statement -# This is a Table_map_event and a Write_rows_event. Together, they are -# equivalent to 'INSERT INTO t VALUES (1)'. ---error ER_BINLOG_ROW_INJECTION_AND_STMT_MODE -BINLOG ' -cNpVShMBAAAAKgAAADYBAAAAABcAAAAAAAAABHRlc3QAAXQAAQ8CZAAB -cNpVShcBAAAAIAAAAFYBAAAQABcAAAAAAAEAAf/+ATE= -'; -SELECT * FROM t /* should be empty */; - ---echo * Same statement, but db filtered out - no error -# This is a Table_map_event and a Write_rows_event. Together, they are -# equivalent to 'INSERT INTO t VALUES (1)'. -USE other; -BINLOG ' -cNpVShMBAAAAKgAAADYBAAAAABcAAAAAAAAABHRlc3QAAXQAAQ8CZAAB -cNpVShcBAAAAIAAAAFYBAAAQABcAAAAAAAEAAf/+ATE= -'; -USE test; -SELECT * FROM t /* should contain the value 1 */; -DELETE FROM t; - ---echo * Unsafe statement and binlog_format=statement -# This will give a warning. -INSERT INTO t VALUES (COALESCE(1, UUID())); -SELECT * FROM t /* should contain the value 1 */; -DELETE FROM t; - ---echo * Same statement, but db filtered out - no message -USE other; -INSERT INTO test.t VALUES (COALESCE(1, UUID())); -USE test; -SELECT * FROM t /* should contain the value 1 */; -DELETE FROM t; - - ---echo ---- master: binlog_format=mixed, slave: binlog_format=statement ---- - -SET @@global.binlog_format = MIXED; -SET @@session.binlog_format = MIXED; - ---echo * Row injection and binlog_format=statement: in slave sql thread -INSERT INTO t VALUES (COALESCE(1, UUID())); ---echo [on slave] ---connection slave -# 1666 = ER_BINLOG_ROW_INJECTION_AND_STMT_MODE ---let $slave_sql_errno= 1666 ---let $show_sql_error= 1 ---source include/wait_for_slave_sql_error_and_skip.inc ---connection slave -SELECT * FROM t /* should be empty */; ---echo [on master] ---connection master - - ---echo ==== Clean up ==== - -DROP TRIGGER trig_autoinc; -DROP TRIGGER trig_double_autoinc; -DROP TABLE t, t_self_logging, t_row, t_stmt, t_slave_stmt, t_autoinc, t_double_autoinc; -DROP DATABASE other; -SET @@global.binlog_format = @old_binlog_format; -SET @@session.binlog_format = @old_binlog_format; -UNINSTALL PLUGIN example; ---echo [on slave] ---sync_slave_with_master -SET @@global.binlog_format = @old_binlog_format; -SET @@session.binlog_format = @old_binlog_format; -UNINSTALL PLUGIN example; diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_blob.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_blob.test deleted file mode 100644 index a79c62e2a10..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_blob.test +++ /dev/null @@ -1,144 +0,0 @@ ---source include/have_ndb.inc -# Since the master generates row-based events, the slave must be in -# ROW or MIXED mode to accept the events. ---source include/have_binlog_format_mixed_or_row.inc ---source include/ndb_master-slave.inc - -# -# basic test of blob replication for NDB -# - -# easy test - ---connection master -create table t1 ( - a int not null primary key, - b text not null -) engine=ndb; - -insert into t1 values(1, repeat('abc',10)); -insert into t1 values(2, repeat('def',200)); -insert into t1 values(3, repeat('ghi',3000)); - -select 'M', a, sha1(b) from t1 -order by a; - ---sync_slave_with_master ---sleep 5 ---connection slave -select 'S', a, sha1(b) from t1 -order by a; - ---connection master -drop table t1; ---sync_slave_with_master - -# hard test - ---connection master -create table t1 ( - a int not null primary key, - b text not null, - c int, - d longblob, - e tinyblob -) engine=ndbcluster; - ---disable_query_log -# length 61 -set @s0 = 'rggurloniukyehuxdbfkkyzlceixzrehqhvxvxbpwizzvjzpucqmzrhzxzfau'; -set @s1 = 'ykyymbzqgqlcjhlhmyqelfoaaohvtbekvifukdtnvcrrjveevfakxarxexomz'; -set @s2 = 'dbnfqyzgtqxalcrwtfsqabknvtfcbpoonxsjiqvmhnfikxxhcgoexlkoezvah'; ---enable_query_log - -insert into t1 values ( - 0, repeat(@s2,454), 100, repeat(@s2,345), NULL); -insert into t1 values ( - 1, repeat(@s0,504), NULL, repeat(@s1,732), repeat(@s1,1)); -insert into t1 values ( - 2, '', 102, '', repeat(@s2,1)); -insert into t1 values ( - 3, repeat(@s0,545), 103, repeat(@s2,788), repeat(@s0,1)); -insert into t1 values ( - 4, repeat(@s1,38), 104, repeat(@s0,260), repeat(@s0,1)); -insert into t1 values ( - 5, repeat(@s2,12), 105, repeat(@s2,40), repeat(@s1,1)); -insert into t1 values ( - 6, repeat(@s1,242), 106, NULL, repeat(@s1,1)); -insert into t1 values ( - 7, repeat(@s1,30), 107, repeat(@s0,161), ''); -insert into t1 values ( - 8, repeat(@s1,719), 108, repeat(@s2,104), NULL); -insert into t1 values ( - 9, repeat(@s2,427), NULL, NULL, NULL); - -select 'M', a, sha1(b), c, sha1(d), sha1(e) -from t1 order by a; - ---sync_slave_with_master ---sleep 5 ---connection slave -select 'S', a, sha1(b), c, sha1(d), sha1(e) -from t1 order by a; - ---connection master -drop table t1; ---sync_slave_with_master - -# table with varsize key (future cluster/schema) - -# sql/ha_ndbcluster_binlog.cc ---connection master -CREATE TABLE IF NOT EXISTS t1 ( - db VARBINARY(63) NOT NULL, - name VARBINARY(63) NOT NULL, - slock BINARY(32) NOT NULL, - query BLOB NOT NULL, - node_id INT UNSIGNED NOT NULL, - epoch BIGINT UNSIGNED NOT NULL, - id INT UNSIGNED NOT NULL, - version INT UNSIGNED NOT NULL, - type INT UNSIGNED NOT NULL, - PRIMARY KEY USING HASH (db,name)) -ENGINE=NDB; - -insert into t1 values ('test','t1', - 'abc',repeat(@s0,10), 11,12,13,14,15); -insert into t1 values ('test','t2', - 'def',repeat(@s1,100), 21,22,23,24,25); -insert into t1 values ('test','t3', - 'ghi',repeat(@s2,1000),31,32,33,34,35); -insert into t1 values ('testtttttttttt','t1', - 'abc',repeat(@s0,10), 11,12,13,14,15); -insert into t1 values ('testttttttttttt','t1', - 'def',repeat(@s1,100), 21,22,23,24,25); -insert into t1 values ('testtttttttttttt','t1', - 'ghi',repeat(@s2,1000),31,32,33,34,35); -insert into t1 values ('t','t11111111111', - 'abc',repeat(@s0,10), 11,12,13,14,15); -insert into t1 values ('t','t111111111111', - 'def',repeat(@s1,100), 21,22,23,24,25); -insert into t1 values ('t','t1111111111111', - 'ghi',repeat(@s2,1000),31,32,33,34,35); - -select 'M', db, name, sha1(query), node_id, epoch, id, version, type -from t1 order by db, name; - ---sync_slave_with_master ---sleep 5 ---connection slave -select 'S', db, name, sha1(query), node_id, epoch, id, version, type -from t1 order by db, name; - ---connection master -drop table t1; ---sync_slave_with_master - -# -# view the binlog - not deterministic (mats) -# - -#--connection master -#let $VERSION=`select version()`; -#--replace_result $VERSION VERSION -#show binlog events; diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_blob2.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_blob2.test deleted file mode 100644 index 26946450e07..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_blob2.test +++ /dev/null @@ -1,15 +0,0 @@ -################################# -# Wrapper for rpl_row_blob.test # -# Using wrapper to share test # -# code between engine tests # -################################# -# -# Since the master generates row-based events, the slave may not be in -# STATEMENT mode to accept the events. -# --- source include/have_binlog_format_mixed_or_row.inc --- source include/have_ndb.inc --- source include/ndb_master-slave.inc -let $engine_type=NDBCLUSTER; --- source extra/rpl_tests/rpl_row_blob.test - diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular.test deleted file mode 100644 index b8b7c520973..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular.test +++ /dev/null @@ -1,56 +0,0 @@ ---source include/have_ndb.inc -# Since the master generates row-based events, the slave must be in -# ROW or MIXED mode to accept the events. ---source include/have_binlog_format_mixed_or_row.inc ---source include/ndb_master-slave.inc - -# set up circular replication - ---connection slave -RESET MASTER; - ---connection master ---replace_result $SLAVE_MYPORT SLAVE_PORT ---eval CHANGE MASTER TO master_host="127.0.0.1",master_port=$SLAVE_MYPORT,master_user="root" -START SLAVE; - - -# create the table on the "slave" ---connection slave -CREATE TABLE t1 (a int key, b int) ENGINE=ndb; -#CREATE TABLE t2 (a int key, b int) ENGINE=ndb; -sync_slave_with_master master; -# now we should have a table on the master as well -SHOW TABLES; - -# insert some values on the slave and master ---connection master -INSERT INTO t1 VALUES (1,2); ---connection slave -INSERT INTO t1 VALUES (2,3); - -# ensure data has propagated both ways ---connection slave -sync_slave_with_master master; ---sync_slave_with_master - -# connect to slave and ensure data it there. ---connection slave -SELECT * FROM t1 ORDER BY a; -#SELECT * FROM t2 ORDER BY a; -source include/check_slave_is_running.inc; -# connect to master and ensure data it there. ---connection master -SELECT * FROM t1 ORDER BY a; -#SELECT * FROM t2 ORDER BY a; -source include/check_slave_is_running.inc; - -# stop replication on "master" as not to replicate -# shutdown circularly, eg drop table ---connection master -STOP SLAVE; - -# cleanup ---connection master -DROP TABLE t1; --- sync_slave_with_master diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_2ch.cnf b/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_2ch.cnf deleted file mode 100644 index 58f8555afd1..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_2ch.cnf +++ /dev/null @@ -1,26 +0,0 @@ -!include ../my.cnf - -[mysqld.1.1] -server-id= 1 -log-bin - -[mysqld.2.1] -server-id= 1 -log-bin - -[mysqld.1.slave] -server-id= 2 -log-bin -skip-slave-start - -[mysqld.2.slave] -server-id= 2 -init-rpl-role= slave -log-bin -skip-slave-start -ndb_connectstring= @mysql_cluster.slave.ndb_connectstring - -[ENV] - -SLAVE_MYPORT1= @mysqld.2.slave.port -SLAVE_MYSOCK1= @mysqld.2.slave.socket diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_2ch.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_2ch.test deleted file mode 100644 index 8721e85780d..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_2ch.test +++ /dev/null @@ -1,172 +0,0 @@ -############################################################# -# Author: Serge Kozlov -# Date: 03/17/2008 -# Purpose: Testing cluster circular replication based on two -# independent channels between two clusters -############################################################# ---source include/have_ndb.inc ---source include/ndb_master-slave_2ch.inc ---source include/have_binlog_format_mixed_or_row.inc ---echo - -# Check server_id and set auto_increment_* variables ---echo *** Check server_id of mysqld servers *** ---connection master -SHOW VARIABLES LIKE "server_id"; -SET auto_increment_offset = 1; -SET auto_increment_increment = 2; ---connection master1 -SHOW VARIABLES LIKE "server_id"; -SET auto_increment_offset = 1; -SET auto_increment_increment = 2; ---connection slave -SHOW VARIABLES LIKE "server_id"; -SET auto_increment_offset = 2; -SET auto_increment_increment = 2; ---connection slave1 -SHOW VARIABLES LIKE "server_id"; -SET auto_increment_offset = 2; -SET auto_increment_increment = 2; ---echo - -# Preparing data. ---echo *** Preparing data *** ---connection master -CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT, b VARCHAR(100), c INT NOT NULL, PRIMARY KEY(a)) ENGINE=ndb; - -let $wait_binlog_event= CREATE TABLE t1; ---source include/wait_for_binlog_event.inc ---connection master1 ---source include/wait_for_binlog_event.inc ---connection slave ---source include/wait_for_binlog_event.inc ---connection slave1 ---source include/wait_for_binlog_event.inc ---echo - -# -# Testing -# - ---echo *** Basic testing *** -# insert data via all hosts ---echo Insert rows via all hosts ---disable_query_log -let $counter= 10; -while ($counter) { - --connection master - INSERT INTO t1(b,c) VALUES('master',1); - --connection master1 - INSERT INTO t1(b,c) VALUES('master1',1); - --connection slave - INSERT INTO t1(b,c) VALUES('slave',1); - --connection slave1 - INSERT INTO t1(b,c) VALUES('slave1',1); - dec $counter; -} ---connection master ---enable_query_log - -# Wait replication between clusters -let $wait_condition= SELECT COUNT(*)=40 FROM t1 WHERE c = 1; ---source include/wait_condition.inc ---connection slave ---source include/wait_condition.inc - -# Check data ---echo Check data on both clusters -let $diff_table_1=master:test.t1; -let $diff_table_2=slave:test.t1; - -source include/diff_tables.inc; - ---echo *** Transaction testing *** -# Start transaction for one mysqld and do mass of inserts for other. -# Do it for for both clusters - ---connection master -BEGIN; ---connection slave1 -BEGIN; -let $counter= 100; ---connection master ---disable_query_log -while ($counter) { - --connection master - INSERT INTO t1(b,c) VALUES('master',2); - --connection master1 - INSERT INTO t1(b,c) VALUES('master1',2); - --connection slave - INSERT INTO t1(b,c) VALUES('slave',2); - --connection slave1 - INSERT INTO t1(b,c) VALUES('slave1',2); - dec $counter; -} ---connection master ---enable_query_log -COMMIT; ---connection slave1 -COMMIT; - -# Wait replication between clusters ---connection master -let $wait_condition= SELECT COUNT(*)=400 FROM t1 WHERE c = 2; ---source include/wait_condition.inc ---connection slave ---source include/wait_condition.inc - ---echo Check data on both clusters -let $diff_table_1=master:test.t1; -let $diff_table_2=slave:test.t1; - -source include/diff_tables.inc; - -# Start transaction and then roll back - ---connection master -BEGIN; ---connection slave1 -BEGIN; -let $counter= 100; ---connection master ---disable_query_log -while ($counter) { - --connection master - INSERT INTO t1(b,c) VALUES('master',3); - --connection master1 - INSERT INTO t1(b,c) VALUES('master1',3); - --connection slave - INSERT INTO t1(b,c) VALUES('slave',3); - --connection slave1 - INSERT INTO t1(b,c) VALUES('slave1',3); - dec $counter; -} ---connection master ---enable_query_log -ROLLBACK; ---connection slave1 -ROLLBACK; - -# Wait replication between clusters ---connection master -let $wait_condition= SELECT COUNT(*)=200 FROM t1 WHERE c = 3; ---source include/wait_condition.inc ---connection slave ---source include/wait_condition.inc - ---echo Check data on both clusters -let $diff_table_1=master:test.t1; -let $diff_table_2=slave:test.t1; - -source include/diff_tables.inc; - -# Clean up ---connection master -DROP TABLE t1; ---connection slave ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings ---echo - -# End of test 5.1 diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_simplex.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_simplex.test deleted file mode 100644 index 74e841c6c4d..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_simplex.test +++ /dev/null @@ -1,82 +0,0 @@ ---source include/have_ndb.inc -# Since the master generates row-based events, the slave must be in -# ROW or MIXED mode to accept the events. ---source include/have_binlog_format_mixed_or_row.inc ---source include/ndb_master-slave.inc - -connection master; -CREATE TABLE t1 (a int key, b int) ENGINE=NDB; -sync_slave_with_master; -SHOW TABLES; - -# Lose the events from the slave binary log: there is no -# need to re-create the table on the master. -connection slave; -RESET MASTER; - -# Insert some values on the slave and master -connection master; -INSERT INTO t1 VALUES (1,2); -# Switch to slave once event is applied and insert a row -sync_slave_with_master; -connection slave; -INSERT INTO t1 VALUES (2,3); - -# ... it is now very probable that we have a mixed event in the binary -# log. If we don't, the test should still pass, but will not test the -# mixed event situation. - -# The statement is disabled since it cannot reliably show the same -# info all the time. Use it for debug purposes. - -#SHOW BINLOG EVENTS; - -# Replicate back to the master to test this mixed event on the master -STOP SLAVE; - -connection master; ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval CHANGE MASTER TO MASTER_HOST="127.0.0.1",MASTER_PORT=$SLAVE_MYPORT,MASTER_USER="root"; - -START SLAVE; - -connection slave; -sync_slave_with_master master; - -# The statement is disabled since it cannot reliably show the same -# info all the time. Use it for debug purposes. - -#SHOW BINLOG EVENTS; - -# Check that there is no error in replication -source include/check_slave_is_running.inc; - -# Check that we have the data on the master -SELECT * FROM t1 ORDER BY a; - -# We should now have another mixed event, likely with "slave" server -# id last, and with the STMT_END_F flag set. - -# The statement is disabled since it cannot reliably show the same -# info all the time. Use it for debug purposes. - -#SHOW BINLOG EVENTS; - -# now lets see that this data is applied correctly on the slave -STOP SLAVE; -save_master_pos; - -connection slave; -START SLAVE; - -# check that we have the data on the slave -sync_with_master; -SELECT * FROM t1 ORDER BY a; - -# Check that there is no error in replication -source include/check_slave_is_running.inc; - -connection master; -DROP TABLE t1; - -sync_slave_with_master; diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_commit_afterflush.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_commit_afterflush.test deleted file mode 100644 index cf3eb9589d2..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_commit_afterflush.test +++ /dev/null @@ -1,14 +0,0 @@ -##################################### -# Wrapper for rpl_commit_after_flush# -# Wrapped to reuse test code on # -# Different engines # -# By JBM 2004-02-15 # -##################################### - -# Since the master generates row-based events, the slave must be in -# ROW or MIXED mode to accept the events. --- source include/have_binlog_format_mixed_or_row.inc --- source include/have_ndb.inc --- source include/ndb_master-slave.inc -let $engine_type=NDB; --- source extra/rpl_tests/rpl_commit_after_flush.test diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_ctype_ucs2_def-master.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_ctype_ucs2_def-master.opt deleted file mode 100644 index 711ec42bd8a..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_ctype_ucs2_def-master.opt +++ /dev/null @@ -1 +0,0 @@ ---collation-server=ucs2_unicode_ci --character-set-server=ucs2,latin1 diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_ctype_ucs2_def.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_ctype_ucs2_def.test deleted file mode 100644 index cb99d049266..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_ctype_ucs2_def.test +++ /dev/null @@ -1,46 +0,0 @@ ---source include/have_ucs2.inc ---source include/have_ndb.inc -# Since the master generates row-based events, the slave must be in -# ROW or MIXED mode to accept the events. ---source include/have_binlog_format_mixed_or_row.inc ---source include/ndb_master-slave.inc - -# -# MySQL Bug#15276: MySQL ignores collation-server -# -show variables like 'collation_server'; - -# -# Check that NDB replication doesn't explode with default charset -# being multibyte. -# -# Theorised that this could be a problem when dealing with: -# Bug #27404 util thd mysql_parse sig11 when mysqld default multibyte charset -# -# Sort of related to: -# Bug#18004 Connecting crashes server when default charset is UCS2 -# -# -show variables like "%character_set_ser%"; ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - -CREATE TABLE `t1` ( `nid` int(11) NOT NULL default '0', - `nom` char(4) default NULL, - `prenom` char(4) default NULL, - PRIMARY KEY (`nid`)) - ENGINE=ndbcluster; - -INSERT INTO t1 VALUES(1,"XYZ1","ABC1"); -select * from t1 order by nid; - -sync_slave_with_master; -# connect to slave and ensure data it there. -connection slave; -select * from t1 order by nid; - ---echo ==== clean up ==== -connection master; -DROP TABLE t1; -sync_slave_with_master; diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_basic.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_basic.test deleted file mode 100644 index ac0ab01f8dd..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_basic.test +++ /dev/null @@ -1,85 +0,0 @@ ---source include/have_ndb.inc ---source include/have_binlog_format_mixed_or_row.inc ---source include/ndb_master-slave.inc - ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - -# -# Basic test of disk tables for NDB -# - -# -# Start by creating a logfile group -# - -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; - -alter logfile group lg1 -add undofile 'undofile02.dat' -initial_size 4M engine=ndb; - -# -# Create a tablespace connected to the logfile group -# - -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE NDB; - -alter tablespace ts1 -add datafile 'datafile02.dat' -initial_size 4M engine=ndb; - -# -# Create a table using this tablespace -# - -CREATE TABLE t1 -(pk1 int not null primary key, b int not null, c int not null) -tablespace ts1 storage disk -engine ndb; - -# -# insert some data -# - -insert into t1 values (1,2,3); -select * from t1 order by pk1; - -# -# check that the data is also on the slave -# - ---sync_slave_with_master ---connection slave -select * from t1 order by pk1; - -# -# view the binlog -# - ---connection master --- source include/show_binlog_events2.inc - -# -# cleanup -# - -drop table t1; -alter tablespace ts1 -drop datafile 'datafile.dat' -engine=ndb; -alter tablespace ts1 -drop datafile 'datafile02.dat' -engine=ndb; -DROP TABLESPACE ts1 ENGINE=NDB; -DROP LOGFILE GROUP lg1 ENGINE=NDB; --- source include/master-slave-end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_partitions-master.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_partitions-master.opt deleted file mode 100644 index 075c6392dde..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_partitions-master.opt +++ /dev/null @@ -1 +0,0 @@ ---new diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_partitions-slave.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_partitions-slave.opt deleted file mode 100644 index 075c6392dde..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_partitions-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---new diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_partitions.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_partitions.test deleted file mode 100644 index c84854e89e8..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_partitions.test +++ /dev/null @@ -1,310 +0,0 @@ -####################################### -# Author: JBM # -# Date: 2006-03-09 # -# Purpose: To test the replication of # -# Cluster Disk Data using partitions # -####################################### - ---source include/have_ndb.inc ---source include/have_binlog_format_mixed_or_row.inc ---source include/ndb_master-slave.inc - ---echo --- Doing pre test cleanup --- - -connection master; ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_query_log - - -# Start by creating a logfile group -################################## - -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; - -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE = 4M -ENGINE=NDB; - -################################################### -# Create a tablespace connected to the logfile group -################################################### - -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE NDB; - -ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile02.dat' -INITIAL_SIZE = 4M -ENGINE=NDB; - -################################################################# - ---echo --- Start test 2 partition RANGE testing -- ---echo --- Do setup -- - - -################################################# -# Requirment: Create table that is partitioned # -# by range on year i.e. year(t) and replicate # -# basice operations such at insert, update # -# delete between 2 different storage engines # -# Alter table and ensure table is handled # -# Correctly on the slave # -################################################# - -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(63), - bc CHAR(63), d DECIMAL(10,4) DEFAULT 0, - f FLOAT DEFAULT 0, total BIGINT UNSIGNED, - y YEAR, t DATE) - TABLESPACE ts1 STORAGE DISK - ENGINE=NDB - PARTITION BY RANGE (YEAR(t)) - (PARTITION p0 VALUES LESS THAN (1901), - PARTITION p1 VALUES LESS THAN (1946), - PARTITION p2 VALUES LESS THAN (1966), - PARTITION p3 VALUES LESS THAN (1986), - PARTITION p4 VALUES LESS THAN (2005), - PARTITION p5 VALUES LESS THAN MAXVALUE); - ---echo --- Show table on master --- - -SHOW CREATE TABLE t1; - ---echo --- Show table on slave -- - -sync_slave_with_master; -SHOW CREATE TABLE t1; - ---echo --- Perform basic operation on master --- ---echo --- and ensure replicated correctly --- - ---source include/rpl_multi_engine3.inc - ---echo --- Check that simple Alter statements are replicated correctly --- - -ALTER TABLE t1 MODIFY vc VARCHAR(255); - ---echo --- Show the new improved table on the master --- - -SHOW CREATE TABLE t1; - ---echo --- Make sure that our tables on slave are still same engine --- ---echo --- and that the alter statements replicated correctly --- - -sync_slave_with_master; -SHOW CREATE TABLE t1; - ---echo --- Perform basic operation on master --- ---echo --- and ensure replicated correctly --- ---enable_query_log - ---source include/rpl_multi_engine3.inc - ---echo --- End test 2 partition RANGE testing --- ---echo --- Do Cleanup --- - -DROP TABLE IF EXISTS t1; - -######################################################## - ---echo --- Start test 3 partition LIST testing --- ---echo --- Do setup --- -################################################# - - -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(63), - bc CHAR(63), d DECIMAL(10,4) DEFAULT 0, - f FLOAT DEFAULT 0, total BIGINT UNSIGNED, - y YEAR, t DATE) - TABLESPACE ts1 STORAGE DISK - ENGINE=NDB - PARTITION BY LIST(id) - (PARTITION p0 VALUES IN (2, 4), - PARTITION p1 VALUES IN (42, 142)); - ---echo --- Test 3 Alter to add partition --- - -ALTER TABLE t1 ADD PARTITION (PARTITION p2 VALUES IN (412)); - ---echo --- Show table on master --- - -SHOW CREATE TABLE t1; - ---echo --- Show table on slave --- - -sync_slave_with_master; -SHOW CREATE TABLE t1; - ---echo --- Perform basic operation on master --- ---echo --- and ensure replicated correctly --- - ---source include/rpl_multi_engine3.inc - ---echo --- Check that simple Alter statements are replicated correctly --- - -ALTER TABLE t1 MODIFY vc VARCHAR(255); - ---echo --- Show the new improved table on the master --- - -SHOW CREATE TABLE t1; - ---echo --- Make sure that our tables on slave are still same engine --- ---echo --- and that the alter statements replicated correctly --- - -sync_slave_with_master; -SHOW CREATE TABLE t1; - ---echo --- Perform basic operation on master --- ---echo --- and ensure replicated correctly --- - ---source include/rpl_multi_engine3.inc - ---echo --- End test 3 partition LIST testing --- ---echo --- Do Cleanup -- - -DROP TABLE IF EXISTS t1; - -######################################################## - ---echo --- Start test 4 partition HASH testing --- ---echo --- Do setup --- -################################################# - - -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(63), - bc CHAR(63), d DECIMAL(10,4) DEFAULT 0, - f FLOAT DEFAULT 0, total BIGINT UNSIGNED, - y YEAR, t DATE) - TABLESPACE ts1 STORAGE DISK - ENGINE=NDB - PARTITION BY HASH( YEAR(t) ) - PARTITIONS 4; - ---echo --- show that tables have been created correctly --- - -SHOW CREATE TABLE t1; -sync_slave_with_master; -SHOW CREATE TABLE t1; - ---echo --- Perform basic operation on master --- ---echo --- and ensure replicated correctly --- - ---source include/rpl_multi_engine3.inc - ---echo --- Check that simple Alter statements are replicated correctly --- - -ALTER TABLE t1 MODIFY vc VARCHAR(255); - ---echo --- Show the new improved table on the master --- - -SHOW CREATE TABLE t1; - ---echo --- Make sure that our tables on slave are still same engine --- ---echo --- and that the alter statements replicated correctly --- - -sync_slave_with_master; -SHOW CREATE TABLE t1; - ---echo --- Perform basic operation on master --- ---echo --- and ensure replicated correctly --- - ---source include/rpl_multi_engine3.inc - ---echo --- End test 4 partition HASH testing --- ---echo --- Do Cleanup -- - -DROP TABLE IF EXISTS t1; - -######################################################## - ---echo --- Start test 5 partition by key testing --- ---echo --- Create Table Section --- - -################################################# - -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(63), - bc CHAR(63), d DECIMAL(10,4) DEFAULT 0, - f FLOAT DEFAULT 0, total BIGINT UNSIGNED, - y YEAR, t DATE,PRIMARY KEY(id)) - TABLESPACE ts1 STORAGE DISK - ENGINE=NDB - PARTITION BY KEY() - PARTITIONS 4; - ---echo --- Show that tables on master are ndbcluster tables --- - -SHOW CREATE TABLE t1; - ---echo --- Show that tables on slave --- - -sync_slave_with_master; -SHOW CREATE TABLE t1; - ---echo --- Perform basic operation on master --- ---echo --- and ensure replicated correctly --- - ---source include/rpl_multi_engine3.inc - -# Okay lets see how it holds up to table changes ---echo --- Check that simple Alter statements are replicated correctly --- - -ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(id, total); - ---echo --- Show the new improved table on the master --- - -SHOW CREATE TABLE t1; - ---echo --- Make sure that our tables on slave are still right type --- ---echo --- and that the alter statements replicated correctly --- - -sync_slave_with_master; -SHOW CREATE TABLE t1; - ---echo --- Perform basic operation on master --- ---echo --- and ensure replicated correctly --- - ---source include/rpl_multi_engine3.inc - ---echo --- Check that simple Alter statements are replicated correctly --- - -ALTER TABLE t1 MODIFY vc VARCHAR(255); - ---echo --- Show the new improved table on the master --- - -SHOW CREATE TABLE t1; - ---echo --- Make sure that our tables on slave are still same engine --- ---echo --- and that the alter statements replicated correctly --- - -sync_slave_with_master; -SHOW CREATE TABLE t1; - ---echo --- Perform basic operation on master --- ---echo --- and ensure replicated correctly --- - ---source include/rpl_multi_engine3.inc - ---echo --- End test 5 key partition testing --- ---echo --- Do Cleanup --- - -DROP TABLE IF EXISTS t1; -alter tablespace ts1 -drop datafile 'datafile.dat' -engine=ndb; -alter tablespace ts1 -drop datafile 'datafile02.dat' -engine=ndb; -DROP TABLESPACE ts1 ENGINE=NDB; -DROP LOGFILE GROUP lg1 ENGINE=NDB; ---sync_slave_with_master - -# End of 5.1 test case diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_ddl.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_ddl.test deleted file mode 100644 index 654d1c08944..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_ddl.test +++ /dev/null @@ -1,33 +0,0 @@ -#################### rpl_ndb_ddl.test ######################## -# # -# DDL statements (sometimes with implicit COMMIT) executed # -# by the master and it's propagation into the slave # -# # -############################################################## - -# -# NOTE, PLEASE BE CAREFUL, WHEN MODIFYING THE TESTS !! -# -# 1. !All! objects to be dropped, renamed, altered ... must be created -# in AUTOCOMMIT= 1 mode before AUTOCOMMIT is set to 0 and the test -# sequences start. -# -# 2. Never use a test object, which was direct or indirect affected by a -# preceeding test sequence again. -# Except table d1.t1 where ONLY DML is allowed. -# -# If one preceeding test sequence hits a (sometimes not good visible, -# because the sql error code of the statement might be 0) bug -# and these rules are ignored, a following test sequence might earn ugly -# effects like failing 'sync_slave_with_master', crashes of the slave or -# abort of the test case etc.. -# - ---source include/have_ndb.inc ---source include/have_binlog_format_mixed_or_row.inc ---source include/ndb_master-slave.inc -let $engine_type= NDB; -let $temp_engine_type= MEMORY; -let $show_binlog = 0; -let $manipulate = 0; --- source extra/rpl_tests/rpl_ddl.test diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_delete_nowhere.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_delete_nowhere.test deleted file mode 100644 index c06d1a62fef..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_delete_nowhere.test +++ /dev/null @@ -1,11 +0,0 @@ -######################################### -# By JBM 2006-02-14 Test wrapping to # -# Share test code between engine tests # -######################################### ---source include/have_ndb.inc -# Since the master generates row-based events, the slave must be in -# ROW or MIXED mode to accept the events. ---source include/have_binlog_format_mixed_or_row.inc --- source include/ndb_master-slave.inc -let $engine_type=NDB; --- source extra/rpl_tests/rpl_delete_no_where.test diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_do_db-slave.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_do_db-slave.opt deleted file mode 100644 index fb5e378b65f..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_do_db-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---replicate-do-db=replica diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_do_db.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_do_db.test deleted file mode 100644 index 750ae377350..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_do_db.test +++ /dev/null @@ -1,59 +0,0 @@ -########################################################### -# Author: Jeb -# Date: 14-12-2006 -# Purpose: To test --replicate-do-database=db_name -# using cluster. Only replica should replicate. -########################################################## - ---source include/have_ndb.inc -# Since the master generates row-based events, the slave must be in -# ROW or MIXED mode to accept the events. ---source include/have_binlog_format_mixed_or_row.inc ---source include/ndb_master-slave.inc - ---disable_warnings -DROP DATABASE IF EXISTS replica; ---enable_warnings - -# Create database and tables for the test. -CREATE DATABASE replica; -CREATE TABLE t1 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; -CREATE TABLE t2 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; -USE replica; -CREATE TABLE replica.t1 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; -CREATE TABLE replica.t2 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; - -# Insert data into db that should not be picked up by slave -USE test; -INSERT INTO t1 VALUES(1, repeat('abc',10)); -INSERT INTO t2 VALUES(1, repeat('abc',10)); -SHOW TABLES; -SELECT COUNT(*) FROM t1; -SELECT COUNT(*) FROM t2; - -# Insert data into db that should be replicated -USE replica; -INSERT INTO replica.t1 VALUES(2, repeat('def',200)); -INSERT INTO replica.t2 VALUES(2, repeat('def',200)); -SHOW TABLES; -SELECT COUNT(*) FROM t1; -SELECT COUNT(*) FROM t2; - -# Check results on slave ---sync_slave_with_master -SHOW TABLES; -USE replica; -SHOW TABLES; -SELECT COUNT(*) FROM t1; -SELECT COUNT(*) FROM t2; -USE test; -SHOW TABLES; - -# Cleanup from testing -connection master; -USE test; -DROP TABLE t1, t2; -DROP DATABASE IF EXISTS replica; ---sync_slave_with_master - -# End 5.1 test case diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_do_table-slave.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_do_table-slave.opt deleted file mode 100644 index da345474216..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_do_table-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---replicate-do-table=test.t1 diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_do_table.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_do_table.test deleted file mode 100644 index 4598795cead..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_do_table.test +++ /dev/null @@ -1,48 +0,0 @@ -########################################################### -# Author: Jeb -# Date: 14-12-2006 -# Purpose: To test --replicate-do-table=db_name.tbl_name -# using cluster. Only t1 should replicate. -########################################################## - ---source include/have_ndb.inc -# Since the master generates row-based events, the slave must be in -# ROW or MIXED mode to accept the events. ---source include/have_binlog_format_mixed_or_row.inc ---source include/ndb_master-slave.inc - ---disable_warnings -DROP TABLE IF EXISTS t1, t2; ---enable_warnings - -CREATE TABLE t1 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; -CREATE TABLE t2 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; - -INSERT INTO t1 VALUES(1, repeat('abc',10)); -INSERT INTO t1 VALUES(2, repeat('def',200)); -INSERT INTO t1 VALUES(3, repeat('ghi',3000)); -INSERT INTO t2 VALUES(1, repeat('abc',10)); -INSERT INTO t2 VALUES(2, repeat('def',200)); -INSERT INTO t2 VALUES(3, repeat('ghi',3000)); - ---sync_slave_with_master -SHOW TABLES; -SELECT COUNT(*) FROM t1; - -# -# Bug #27044 replicated with unique field ndb table allows dup key inserts -# -connection master; - ---error ER_DUP_ENTRY -INSERT INTO t1 VALUES (3, repeat('bad',1)); - -connection slave; ---error ER_DUP_ENTRY -INSERT INTO t1 VALUES (3, repeat('bad too',1)); - -# cleanup - -connection master; -DROP TABLE IF EXISTS t1, t2; ---sync_slave_with_master diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_extraCol.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_extraCol.test deleted file mode 100644 index 9cf4f8dba0b..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_extraCol.test +++ /dev/null @@ -1,13 +0,0 @@ -########################################### -# Author: Jeb -# Date: 2006-09-08 -# Purpose: Wapper for rpl_extraSlave_Col.test -# Using NDB -########################################### --- source include/have_binlog_format_mixed_or_row.inc --- source include/have_ndb.inc --- source include/ndb_master-slave.inc -let $engine_type = 'NDB'; --- source extra/rpl_tests/rpl_extraSlave_Col.test - - diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_func003.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_func003.test deleted file mode 100644 index 5f0fd3dfe49..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_func003.test +++ /dev/null @@ -1,16 +0,0 @@ -################################### -# Wrapper for rpl_row_func003.test# -# This test was orginally designed# -# To test InnoDB using RBR, but # -# It can also be used to test NDB # -# So this wrapper is being used to# -# reduce test case code # -################################### --- source include/have_ndb.inc -# Since the master generates row-based events, the slave must be in -# ROW or MIXED mode to accept the events. --- source include/have_binlog_format_mixed_or_row.inc --- source include/ndb_master-slave.inc -let $engine_type=NDB; --- source extra/rpl_tests/rpl_row_func003.test --- source include/master-slave-end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_idempotent.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_idempotent.test deleted file mode 100644 index 99c9df40094..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_idempotent.test +++ /dev/null @@ -1,109 +0,0 @@ ---source include/have_ndb.inc ---source include/have_binlog_format_mixed_or_row.inc ---source include/ndb_master-slave.inc - -# -# Currently test only works with ndb since it retrieves "old" -# binlog positions with mysql.ndb_binlog_index and ndb_apply_status; -# - -# create a table with one row -CREATE TABLE t1 (c1 CHAR(15), c2 CHAR(15), c3 INT, PRIMARY KEY (c3)) ENGINE = NDB ; -INSERT INTO t1 VALUES ("row1","will go away",1); -SELECT * FROM t1 ORDER BY c3; - -# sync slave and retrieve epoch -sync_slave_with_master; ---replace_column 1 -SELECT @the_epoch:=MAX(epoch) FROM mysql.ndb_apply_status; -let $the_epoch= `select @the_epoch` ; -SELECT * FROM t1 ORDER BY c3; - -# get the master binlog pos from the epoch -connection master; ---replace_result $the_epoch ---replace_column 1 -eval SELECT @the_pos:=Position,@the_file:=SUBSTRING_INDEX(FILE, '/', -1) - FROM mysql.ndb_binlog_index WHERE epoch = $the_epoch ; -let $the_pos= `SELECT @the_pos` ; -let $the_file= `SELECT @the_file` ; - -# insert some more values -INSERT INTO t1 VALUES ("row2","will go away",2),("row3","will change",3),("row4","D",4); -DELETE FROM t1 WHERE c3 = 1; -UPDATE t1 SET c2="should go away" WHERE c3 = 2; -UPDATE t1 SET c2="C" WHERE c3 = 3; -DELETE FROM t1 WHERE c3 = 2; - -SELECT * FROM t1 ORDER BY c3; - -# check that we have it on the slave ---sync_slave_with_master -SELECT * FROM t1 ORDER BY c3; - -source include/check_slave_is_running.inc; - -# stop slave and reset position to before the last changes -STOP SLAVE; ---replace_result $the_pos -eval CHANGE MASTER TO - master_log_file = '$the_file', - master_log_pos = $the_pos ; - -source include/check_slave_no_error.inc; - -# start the slave again -# -> same events should have been applied again -# e.g. inserting rows that already there -# deleting a row which is not there -# updating a row which is not there -START SLAVE; - ---connection master -SELECT * FROM t1 ORDER BY c3; ---sync_slave_with_master -SELECT * FROM t1 ORDER BY c3; - -STOP SLAVE; - -# -# cleanup -# ---connection master -DROP TABLE t1; -RESET master; ---connection slave -DROP TABLE t1; -RESET slave; - -START SLAVE; - -# -# Test that we can handle update of a row that does not exist on the slave -# will trigger usage of AO_IgnoreError on slave side so that the INSERT -# still succeeds even if the replication of the UPDATE generates an error. -# ---connection master -CREATE TABLE t1 (c1 CHAR(15) NOT NULL, c2 CHAR(15) NOT NULL, c3 INT NOT NULL, PRIMARY KEY (c3)) ENGINE = NDB ; -INSERT INTO t1 VALUES ("row1","remove on slave",1); - ---sync_slave_with_master ---connection slave -DELETE FROM t1; - ---connection master -BEGIN; -UPDATE t1 SET c2="does not exist" WHERE c3=1; -INSERT INTO t1 VALUES ("row2","new on slave",2); -COMMIT; - ---sync_slave_with_master ---connection slave -SELECT * FROM t1; -source include/check_slave_is_running.inc; - -connection master; -DROP TABLE IF EXISTS t1; - -# End of 5.1 Test --- source include/master-slave-end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb-master.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb-master.opt deleted file mode 100644 index 627becdbfb5..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb-master.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb-slave.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb-slave.opt deleted file mode 100644 index b63ef44e8fc..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---new --default-storage-engine=ndbcluster diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb.test deleted file mode 100644 index 92374c26742..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb.test +++ /dev/null @@ -1,15 +0,0 @@ -############################################################# -# Author: JBM -# Date: 2006-02-24 -# Purpose: Trying to test ability to replicate from cluster -# to innodb, or myisam, or replicate from innodb/myisam to -# cluster slave. Due to limitations I have created wrappers -# to be able to use the same code for all these different -# test and to have control over the tests. -############################################################## --- source include/have_innodb.inc --- source include/have_ndb.inc --- source include/have_binlog_format_mixed_or_row.inc --- source include/ndb_master-slave.inc -SET storage_engine=innodb; ---source extra/rpl_tests/rpl_ndb_2multi_eng.test diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb_trans-slave.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb_trans-slave.opt deleted file mode 100644 index 627becdbfb5..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb_trans-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb_trans.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb_trans.test deleted file mode 100644 index 66531172894..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb_trans.test +++ /dev/null @@ -1,69 +0,0 @@ -# Test of a transaction mixing the two engines - --- source include/have_ndb.inc --- source include/have_innodb.inc -# Since the master generates row-based events, the slave must be in -# ROW or MIXED mode to accept the events. --- source include/have_binlog_format_mixed_or_row.inc --- source include/ndb_master-slave.inc - -create table t1 (a int, unique(a)) engine=ndbcluster; -create table t2 (a int, unique(a)) engine=innodb; - - -begin; -insert into t1 values(1); -insert into t2 values(1); -rollback; - -select count(*) from t1; -select count(*) from t2; -sync_slave_with_master; -select count(*) from t1; -select count(*) from t2; -connection master; - -begin; -load data infile '../../../std_data/rpl_loaddata.dat' into table t2; -load data infile '../../../std_data/rpl_loaddata.dat' into table t1; -rollback; - -select count(*) from t1; -select count(*) from t2; -sync_slave_with_master; -select count(*) from t1; -select count(*) from t2; -connection master; - -delete from t1; -delete from t2; -begin; -load data infile '../../../std_data/rpl_loaddata.dat' into table t2; -load data infile '../../../std_data/rpl_loaddata.dat' into table t1; -rollback; - -select count(*) from t1; -select count(*) from t2; -sync_slave_with_master; -select count(*) from t1; -select count(*) from t2; -connection master; - -delete from t1; -delete from t2; -begin; -insert into t2 values(3),(4); -insert into t1 values(3),(4); -load data infile '../../../std_data/rpl_loaddata.dat' into table t2; -load data infile '../../../std_data/rpl_loaddata.dat' into table t1; -rollback; - -select count(*) from t1; -select count(*) from t2; -sync_slave_with_master; -select count(*) from t1; -select count(*) from t2; -connection master; - -drop table t1,t2; -sync_slave_with_master; diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_insert_ignore.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_insert_ignore.test deleted file mode 100644 index be6f71eb5b5..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_insert_ignore.test +++ /dev/null @@ -1,11 +0,0 @@ -##################################### -# Wrapper for rpl_insert_ignore.test# -##################################### --- source include/have_ndb.inc -# Since the master generates row-based events, the slave must be in -# ROW or MIXED mode to accept the events. --- source include/have_binlog_format_mixed_or_row.inc --- source include/ndb_master-slave.inc -let $engine_type=NDB; -let $engine_type2=myisam; --- source extra/rpl_tests/rpl_insert_ignore.test diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_load.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_load.test deleted file mode 100644 index 75fe2688b4a..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_load.test +++ /dev/null @@ -1,66 +0,0 @@ -# -# Currently this test only runs in the source tree with the -# ndb/test programs compiled. -# invoke with: ./mysql-test-run --ndb-extra-test --do-test=rpl_ndb_load -# - ---source include/have_ndb.inc ---source include/have_ndb_extra.inc ---source include/have_binlog_format_row.inc ---source include/ndb_master-slave.inc - ---disable_warnings -# reset master -connection master; -DROP DATABASE IF EXISTS TEST_DB; -CREATE DATABASE TEST_DB; ---enable_warnings - -# -# These tables should correspond to the table definitions in -# storage/ndb/test/ndbapi/bench/ -# -connection master; -USE TEST_DB; -CREATE TABLE SUBSCRIBER - ( NUMBER CHAR(12) BINARY NOT NULL, - NAME CHAR(32) BINARY NOT NULL, - GROUP_ID INT UNSIGNED NOT NULL, - LOCATION INT UNSIGNED NOT NULL, - SESSIONS INT UNSIGNED NOT NULL, - CHANGED_BY CHAR(32) BINARY NOT NULL, - CHANGED_TIME CHAR(32) BINARY NOT NULL, - PRIMARY KEY USING HASH (NUMBER)) - ENGINE = NDB; - -CREATE TABLE GROUP_T - ( GROUP_ID INT UNSIGNED NOT NULL, - GROUP_NAME CHAR(32) BINARY NOT NULL, - ALLOW_READ CHAR(1) BINARY NOT NULL, - ALLOW_INSERT INT UNSIGNED NOT NULL, - ALLOW_DELETE INT UNSIGNED NOT NULL, - PRIMARY KEY USING HASH (GROUP_ID)) - ENGINE = NDB; - -CREATE TABLE SESSION - ( NUMBER CHAR(12) BINARY NOT NULL, - SERVER_ID INT UNSIGNED NOT NULL, - DATA VARBINARY(1998) NOT NULL, - PRIMARY KEY USING HASH (NUMBER,SERVER_ID)) - ENGINE = NDB; - -CREATE TABLE SERVER - ( SUFFIX CHAR(2) BINARY NOT NULL, - SERVER_ID INT UNSIGNED NOT NULL, - NAME CHAR(32) BINARY NOT NULL, - NO_OF_READ INT UNSIGNED NOT NULL, - NO_OF_INSERT INT UNSIGNED NOT NULL, - NO_OF_DELETE INT UNSIGNED NOT NULL, - PRIMARY KEY USING HASH (SUFFIX, SERVER_ID)) - ENGINE = NDB; - -# -# start "load" application -# ---exec NDB_CONNECTSTRING=$NDB_CONNECTSTRING ../storage/ndb/test/ndbapi/DbCreate >> $NDB_TOOLS_OUTPUT ---exec NDB_CONNECTSTRING=$NDB_CONNECTSTRING ../storage/ndb/test/ndbapi/DbAsyncGenerator >> $NDB_TOOLS_OUTPUT diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_log-master.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_log-master.opt deleted file mode 100644 index e0d075c3fbd..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_log-master.opt +++ /dev/null @@ -1 +0,0 @@ ---skip-external-locking diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_log.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_log.test deleted file mode 100644 index d32a05bf92a..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_log.test +++ /dev/null @@ -1,13 +0,0 @@ -################################### -# Wrapper for rpl_row_log.test # -# Added wrapper so that MyISAM & # -# Innodb and NDB could all use the# -# Same test. NDB produced a diff # -# bin-log # -################################### --- source include/have_binlog_format_row.inc --- source include/have_ndb.inc --- source include/ndb_master-slave.inc -let $engine_type=NDB; --- source extra/rpl_tests/rpl_log.test - diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_engines_transactions-master.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_engines_transactions-master.opt deleted file mode 100644 index 627becdbfb5..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_engines_transactions-master.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_engines_transactions-slave.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_engines_transactions-slave.opt deleted file mode 100644 index 627becdbfb5..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_engines_transactions-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_engines_transactions.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_engines_transactions.test deleted file mode 100644 index d93c5328000..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_engines_transactions.test +++ /dev/null @@ -1,476 +0,0 @@ -# ==== Purpose ==== -# -# Tests that transactions containing multiple table types are -# replicated correctly to the slave. -# -# This test was previously part of rpl_ndb_transactions. -# -# -# ==== Method ==== -# -# Try all combinations of the following: -# - Committed/rollback transactions. -# - Transactions started by AUTOCOMMIT = 0 or BEGIN. -# - Transactions using myisam, innodb, or ndb tables, or combinations -# of them. For combinations, we use the engines in all possible -# orders. -# For single-engine transactions, we also try with AUTOCOMMIT = 1. -# -# -# ==== Related bugs ==== -# -# BUG#26395: if crash during autocommit update to transactional table on master, slave fails - - -source include/have_ndb.inc; -# Since the master generates row-based events, the slave must be in -# ROW or MIXED mode to accept the events. -source include/have_binlog_format_mixed_or_row.inc; -source include/ndb_master-slave.inc; -source include/have_innodb.inc; - -CREATE TABLE tmyisam (a int) ENGINE = MYISAM; -CREATE TABLE tinnodb (a int) ENGINE = INNODB; -CREATE TABLE tndb (a int) ENGINE = NDB; - -SHOW CREATE TABLE tmyisam; -SHOW CREATE TABLE tinnodb; -SHOW CREATE TABLE tndb; - - ---echo [on master] - - ---echo ==== Single-engine transactions ==== - ---echo ---- autocommitted ---- - -SET AUTOCOMMIT = 1; - -INSERT INTO tmyisam VALUES (0); -INSERT INTO tinnodb VALUES (1); -INSERT INTO tndb VALUES (2); - ---echo ---- committed with BEGIN ---- - -BEGIN; -INSERT INTO tmyisam VALUES (3); -INSERT INTO tmyisam VALUES (4); -COMMIT; - -BEGIN; -INSERT INTO tinnodb VALUES (5); -INSERT INTO tinnodb VALUES (6); -COMMIT; - -BEGIN; -INSERT INTO tndb VALUES (7); -INSERT INTO tndb VALUES (8); -COMMIT; - ---echo ---- rolled back with BEGIN ---- - -BEGIN; -INSERT INTO tmyisam VALUES (9); -INSERT INTO tmyisam VALUES (10); -ROLLBACK; - -BEGIN; -INSERT INTO tinnodb VALUES (11); -INSERT INTO tinnodb VALUES (12); -ROLLBACK; - -BEGIN; -INSERT INTO tndb VALUES (13); -INSERT INTO tndb VALUES (14); -ROLLBACK; - - ---echo ---- committed with AUTOCOMMIT = 0 ---- - -SET AUTOCOMMIT = 0; - -INSERT INTO tmyisam VALUES (15); -INSERT INTO tmyisam VALUES (16); -COMMIT; - -INSERT INTO tinnodb VALUES (17); -INSERT INTO tinnodb VALUES (18); -COMMIT; - -INSERT INTO tndb VALUES (19); -INSERT INTO tndb VALUES (20); -COMMIT; - ---echo ---- rolled back with AUTOCOMMIT = 0 ---- - -INSERT INTO tmyisam VALUES (21); -INSERT INTO tmyisam VALUES (22); -ROLLBACK; - -INSERT INTO tinnodb VALUES (23); -INSERT INTO tinnodb VALUES (24); -ROLLBACK; - -INSERT INTO tndb VALUES (25); -INSERT INTO tndb VALUES (26); -ROLLBACK; - -SET AUTOCOMMIT = 1; - - ---echo ==== MyISAM + InnoDB ==== - ---echo ---- committed with BEGIN ---- - -BEGIN; -INSERT INTO tmyisam VALUES (27); -INSERT INTO tinnodb VALUES (28); -COMMIT; - -BEGIN; -INSERT INTO tinnodb VALUES (29); -INSERT INTO tmyisam VALUES (30); -COMMIT; - ---echo ---- rolled back with BEGIN ---- - -BEGIN; -INSERT INTO tmyisam VALUES (31); -INSERT INTO tinnodb VALUES (32); -ROLLBACK; - -BEGIN; -INSERT INTO tinnodb VALUES (33); -INSERT INTO tmyisam VALUES (34); -ROLLBACK; - ---echo ---- committed with AUTOCOMMIT = 0 ---- - -SET AUTOCOMMIT = 0; - -INSERT INTO tmyisam VALUES (35); -INSERT INTO tinnodb VALUES (36); -COMMIT; - -INSERT INTO tinnodb VALUES (37); -INSERT INTO tmyisam VALUES (38); -COMMIT; - ---echo ---- rolled back with AUTOCOMMIT = 0 ---- - -INSERT INTO tmyisam VALUES (39); -INSERT INTO tinnodb VALUES (40); -ROLLBACK; - -INSERT INTO tinnodb VALUES (41); -INSERT INTO tmyisam VALUES (42); -ROLLBACK; - -SET AUTOCOMMIT = 1; - - ---echo ==== MyISAM + NDB ==== - ---echo ---- committed with BEGIN---- - -BEGIN; -INSERT INTO tmyisam VALUES (43); -INSERT INTO tndb VALUES (44); -COMMIT; - -BEGIN; -INSERT INTO tndb VALUES (45); -INSERT INTO tmyisam VALUES (46); -COMMIT; - ---echo ---- rolled back with BEGIN ---- - -BEGIN; -INSERT INTO tmyisam VALUES (47); -INSERT INTO tndb VALUES (48); -ROLLBACK; - -BEGIN; -INSERT INTO tndb VALUES (49); -INSERT INTO tmyisam VALUES (50); -ROLLBACK; - ---echo ---- committed with AUTOCOMMIT = 0 ---- - -SET AUTOCOMMIT = 0; - -INSERT INTO tmyisam VALUES (51); -INSERT INTO tndb VALUES (52); -COMMIT; - -INSERT INTO tndb VALUES (53); -INSERT INTO tmyisam VALUES (54); -COMMIT; - ---echo ---- rolled back with AUTOCOMMIT = 0 ---- - -INSERT INTO tmyisam VALUES (55); -INSERT INTO tndb VALUES (56); -ROLLBACK; - -INSERT INTO tndb VALUES (57); -INSERT INTO tmyisam VALUES (58); -ROLLBACK; - -SET AUTOCOMMIT = 1; - - ---echo ==== InnoDB + NDB ==== - ---echo ---- committed with BEGIN ---- - -BEGIN; -INSERT INTO tinnodb VALUES (59); -INSERT INTO tndb VALUES (60); -COMMIT; - -BEGIN; -INSERT INTO tndb VALUES (61); -INSERT INTO tinnodb VALUES (62); -COMMIT; - ---echo ---- rolled back with BEGIN ---- - -BEGIN; -INSERT INTO tinnodb VALUES (63); -INSERT INTO tndb VALUES (64); -ROLLBACK; - -BEGIN; -INSERT INTO tndb VALUES (65); -INSERT INTO tinnodb VALUES (66); -ROLLBACK; - ---echo ---- committed with AUTOCOMMIT = 0 ---- - -SET AUTOCOMMIT = 0; - -INSERT INTO tinnodb VALUES (67); -INSERT INTO tndb VALUES (68); -COMMIT; - -INSERT INTO tndb VALUES (69); -INSERT INTO tinnodb VALUES (70); -COMMIT; - ---echo ---- rolled back with AUTOCOMMIT = 0 ---- - -INSERT INTO tinnodb VALUES (71); -INSERT INTO tndb VALUES (72); -ROLLBACK; - -INSERT INTO tndb VALUES (73); -INSERT INTO tinnodb VALUES (74); -ROLLBACK; - -SET AUTOCOMMIT = 1; - - ---echo ==== MyISAM + InnoDB + NDB ==== - ---echo ---- committed with BEGIN ---- - -BEGIN; -INSERT INTO tmyisam VALUES (75); -INSERT INTO tinnodb VALUES (76); -INSERT INTO tndb VALUES (77); -COMMIT; - -BEGIN; -INSERT INTO tmyisam VALUES (78); -INSERT INTO tndb VALUES (79); -INSERT INTO tinnodb VALUES (80); -COMMIT; - -BEGIN; -INSERT INTO tinnodb VALUES (81); -INSERT INTO tmyisam VALUES (82); -INSERT INTO tndb VALUES (83); -COMMIT; - -BEGIN; -INSERT INTO tinnodb VALUES (84); -INSERT INTO tndb VALUES (85); -INSERT INTO tmyisam VALUES (86); -COMMIT; - -BEGIN; -INSERT INTO tndb VALUES (87); -INSERT INTO tmyisam VALUES (88); -INSERT INTO tinnodb VALUES (89); -COMMIT; - -BEGIN; -INSERT INTO tndb VALUES (90); -INSERT INTO tinnodb VALUES (91); -INSERT INTO tmyisam VALUES (92); -COMMIT; - ---echo ---- rolled back with BEGIN ---- - -BEGIN; -INSERT INTO tmyisam VALUES (93); -INSERT INTO tinnodb VALUES (94); -INSERT INTO tndb VALUES (95); -ROLLBACK; - -BEGIN; -INSERT INTO tmyisam VALUES (96); -INSERT INTO tndb VALUES (97); -INSERT INTO tinnodb VALUES (98); -ROLLBACK; - -BEGIN; -INSERT INTO tinnodb VALUES (99); -INSERT INTO tmyisam VALUES (100); -INSERT INTO tndb VALUES (101); -ROLLBACK; - -BEGIN; -INSERT INTO tinnodb VALUES (102); -INSERT INTO tndb VALUES (103); -INSERT INTO tmyisam VALUES (104); -ROLLBACK; - -BEGIN; -INSERT INTO tndb VALUES (105); -INSERT INTO tmyisam VALUES (106); -INSERT INTO tinnodb VALUES (107); -ROLLBACK; - -BEGIN; -INSERT INTO tndb VALUES (108); -INSERT INTO tinnodb VALUES (109); -INSERT INTO tmyisam VALUES (110); -ROLLBACK; - ---echo ---- committed with AUTOCOMMIT = 0 ---- - -SET AUTOCOMMIT = 0; - -INSERT INTO tmyisam VALUES (111); -INSERT INTO tinnodb VALUES (112); -INSERT INTO tndb VALUES (113); -COMMIT; - -INSERT INTO tmyisam VALUES (114); -INSERT INTO tndb VALUES (115); -INSERT INTO tinnodb VALUES (116); -COMMIT; - -INSERT INTO tinnodb VALUES (117); -INSERT INTO tmyisam VALUES (118); -INSERT INTO tndb VALUES (119); -COMMIT; - -INSERT INTO tinnodb VALUES (120); -INSERT INTO tndb VALUES (121); -INSERT INTO tmyisam VALUES (122); -COMMIT; - -INSERT INTO tndb VALUES (123); -INSERT INTO tmyisam VALUES (124); -INSERT INTO tinnodb VALUES (125); -COMMIT; - -INSERT INTO tndb VALUES (126); -INSERT INTO tinnodb VALUES (127); -INSERT INTO tmyisam VALUES (128); -COMMIT; - ---echo ---- rolled back with AUTOCOMMIT = 0 ---- - -INSERT INTO tmyisam VALUES (129); -INSERT INTO tinnodb VALUES (130); -INSERT INTO tndb VALUES (131); -ROLLBACK; - -INSERT INTO tmyisam VALUES (132); -INSERT INTO tndb VALUES (133); -INSERT INTO tinnodb VALUES (134); -ROLLBACK; - -INSERT INTO tinnodb VALUES (135); -INSERT INTO tmyisam VALUES (136); -INSERT INTO tndb VALUES (137); -ROLLBACK; - -INSERT INTO tinnodb VALUES (138); -INSERT INTO tndb VALUES (139); -INSERT INTO tmyisam VALUES (140); -ROLLBACK; - -INSERT INTO tndb VALUES (141); -INSERT INTO tmyisam VALUES (142); -INSERT INTO tinnodb VALUES (143); -ROLLBACK; - -INSERT INTO tndb VALUES (144); -INSERT INTO tinnodb VALUES (145); -INSERT INTO tmyisam VALUES (146); -ROLLBACK; - -SET AUTOCOMMIT = 1; - ---echo ---- Mixed statements Innodb ---- - -BEGIN; -INSERT INTO tndb VALUES (147); -INSERT INTO tinnodb SELECT * FROM tndb ORDER BY a DESC LIMIT 1; -COMMIT; - -INSERT INTO tndb VALUES (148); -BEGIN; -INSERT INTO tinnodb SELECT * FROM tndb ORDER BY a DESC LIMIT 1; -INSERT INTO tndb VALUES (149); -COMMIT; - -BEGIN; -INSERT INTO tndb VALUES (150); -INSERT INTO tmyisam SELECT * FROM tndb ORDER BY a DESC LIMIT 1; -COMMIT; - -INSERT INTO tndb VALUES (151); -BEGIN; -INSERT INTO tmyisam SELECT * FROM tndb ORDER BY a DESC LIMIT 1; -INSERT INTO tndb VALUES (152); -COMMIT; - ---echo ==== Verify the result ==== - -SELECT * FROM tmyisam ORDER BY a; -SELECT * FROM tinnodb ORDER BY a; -SELECT * FROM tndb ORDER BY a; - ---echo [on slave] ---sync_slave_with_master - -let $diff_table_1=master:test.tmyisam; -let $diff_table_2=slave:test.tmyisam; -source include/diff_tables.inc; - -let $diff_table_1=master:test.tinnodb; -let $diff_table_2=slave:test.tinnodb; -source include/diff_tables.inc; - -let $diff_table_1=master:test.tndb; -let $diff_table_2=slave:test.tndb; -source include/diff_tables.inc; - - ---echo ==== Clean up ==== - ---echo [on master] -connection master; -DROP TABLE tmyisam, tinnodb, tndb; - ---echo [on slave] -sync_slave_with_master; - -source include/master-slave-end.inc; diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_implicit_commit_binlog.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_implicit_commit_binlog.test deleted file mode 100644 index d70d9b48834..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_implicit_commit_binlog.test +++ /dev/null @@ -1,9 +0,0 @@ -################################################################################ -# Check file extra/rpl_tests/rpl_implicit_commit_binlog.test -################################################################################ ---source include/have_binlog_format_mixed.inc ---source include/have_ndb.inc ---source include/ndb_master-slave.inc - ---let $engine=NDB ---source extra/rpl_tests/rpl_implicit_commit_binlog.test diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables-master.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables-master.opt deleted file mode 100644 index b74354b22e1..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables-master.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb --ndbcluster diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables-slave.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables-slave.opt deleted file mode 100644 index bbb86b2991b..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb --ndbcluster --replicate-ignore-table=mysql.ndb_apply_status diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables.test deleted file mode 100644 index 17f2d00cbf6..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables.test +++ /dev/null @@ -1,374 +0,0 @@ -# ==== Purpose ==== -# -# Test replication of transactions on tables which have different -# engines on master and slave. This tests all combinations of innodb, -# myisam, and ndb. -# -# ==== Method ==== -# -# Set up six tables, each being innodb, myisam, or innodb on master, -# and another of innodb, myisam, or innodb on slave. For each table, -# do the following: -# -# - committed and rollback'ed transactions, with autocommit on and -# off -# - non-transactions with autocommit on -# - non-transactions with autocommit off, where the master table is -# myisam. -# -# Note: we are running the slave with -# --replicate-ignore-table=mysql.ndb_apply_status . See BUG#34557 for -# explanation. -# -# ==== Related bugs ==== -# -# BUG#26395: if crash during autocommit update to transactional table on master, slave fails -# BUG#29288: myisam transactions replicated to a transactional slave leaves slave unstable -# BUG#34557: Row-based replication from ndb to non-ndb gives error on slave -# BUG#34600: Rolled-back punch transactions not replicated correctly -# -# ==== Todo ==== -# -# We should eventually try transactions touching two tables which are -# of different engines on the same server (so that we try, e.g. punch -# transactions; cf BUG#34600). However, that will make the test much -# bigger (9 master-slave engine combinations [myisam->myisam, -# myisam->ndb, etc]. To try all combinations of one or more such -# tables means 2^9-1=511 transactions. We need to multiplied by 5 -# since we want to test committed/rollback'ed transactions -# with/without AUTOCOMMIT, as well as non-transactions with -# autocommit). We'd have to write a script to produce the test case. - - ---echo ==== Initialization ==== - ---source include/have_ndb.inc ---source include/have_innodb.inc ---source include/ndb_master-slave.inc ---source include/have_binlog_format_mixed_or_row.inc - ---echo ---- setup master ---- - -CREATE TABLE myisam_innodb (a INT) ENGINE=MYISAM; -CREATE TABLE innodb_myisam (a INT) ENGINE=INNODB; -CREATE TABLE myisam_ndb (a INT) ENGINE=MYISAM; -CREATE TABLE ndb_myisam (a INT) ENGINE=NDB; -CREATE TABLE innodb_ndb (a INT) ENGINE=INNODB; -CREATE TABLE ndb_innodb (a INT) ENGINE=NDB; - -SHOW CREATE TABLE myisam_innodb; -SHOW CREATE TABLE innodb_myisam; -SHOW CREATE TABLE myisam_ndb; -SHOW CREATE TABLE ndb_myisam; -SHOW CREATE TABLE innodb_ndb; -SHOW CREATE TABLE ndb_innodb; - ---echo ---- setup slave with different engines ---- - -sync_slave_with_master; - -DROP TABLE myisam_innodb, innodb_myisam; -DROP TABLE myisam_ndb, ndb_myisam; -DROP TABLE innodb_ndb, ndb_innodb; - -CREATE TABLE myisam_innodb (a INT) ENGINE=INNODB; -CREATE TABLE innodb_myisam (a INT) ENGINE=MYISAM; -CREATE TABLE myisam_ndb (a INT) ENGINE=NDB; -CREATE TABLE ndb_myisam (a INT) ENGINE=MYISAM; -CREATE TABLE innodb_ndb (a INT) ENGINE=NDB; -CREATE TABLE ndb_innodb (a INT) ENGINE=INNODB; - -SHOW CREATE TABLE myisam_innodb; -SHOW CREATE TABLE innodb_myisam; -SHOW CREATE TABLE myisam_ndb; -SHOW CREATE TABLE ndb_myisam; -SHOW CREATE TABLE innodb_ndb; -SHOW CREATE TABLE ndb_innodb; - -connection master; - - ---echo ==== AUTOCOMMIT=0, transactions ==== - ---echo ---- COMMIT ---- - -SET AUTOCOMMIT = 0; - -BEGIN; -INSERT INTO myisam_innodb VALUES (1); -INSERT INTO myisam_innodb VALUES (2); -COMMIT; -sync_slave_with_master; -connection master; -BEGIN; -INSERT INTO innodb_myisam VALUES (3); -INSERT INTO innodb_myisam VALUES (4); -COMMIT; -sync_slave_with_master; -connection master; - -BEGIN; -INSERT INTO myisam_ndb VALUES (5); -INSERT INTO myisam_ndb VALUES (6); -COMMIT; -sync_slave_with_master; -connection master; -BEGIN; -INSERT INTO ndb_myisam VALUES (7); -INSERT INTO ndb_myisam VALUES (8); -COMMIT; -sync_slave_with_master; -connection master; - -BEGIN; -INSERT INTO ndb_innodb VALUES (9); -INSERT INTO ndb_innodb VALUES (10); -COMMIT; -sync_slave_with_master; -connection master; -BEGIN; -INSERT INTO innodb_ndb VALUES (11); -INSERT INTO innodb_ndb VALUES (12); -COMMIT; -sync_slave_with_master; -connection master; - ---echo ---- ROLLBACK ---- - -# This test does not work in ROW mode after the changes introduced in -# BUG#40116. After WL#2687 is pushed, Tests should be added again. ---disable_parsing -BEGIN; -INSERT INTO myisam_innodb VALUES (13); -INSERT INTO myisam_innodb VALUES (14); -ROLLBACK; -sync_slave_with_master; ---enable_parsing -connection master; -BEGIN; -INSERT INTO innodb_myisam VALUES (15); -INSERT INTO innodb_myisam VALUES (16); -ROLLBACK; -sync_slave_with_master; -connection master; - -# This test does not work in ROW mode after the changes introduced in -# BUG#40116. After WL#2687 is pushed, these tests should be enabled -# again. ---disable_parsing -BEGIN; -INSERT INTO myisam_ndb VALUES (17); -INSERT INTO myisam_ndb VALUES (18); -ROLLBACK; -sync_slave_with_master; -connection master; ---enable_parsing -BEGIN; -INSERT INTO ndb_myisam VALUES (19); -INSERT INTO ndb_myisam VALUES (20); -ROLLBACK; -sync_slave_with_master; -connection master; - -BEGIN; -INSERT INTO ndb_innodb VALUES (21); -INSERT INTO ndb_innodb VALUES (22); -ROLLBACK; -sync_slave_with_master; -connection master; -BEGIN; -INSERT INTO innodb_ndb VALUES (23); -INSERT INTO innodb_ndb VALUES (24); -ROLLBACK; -sync_slave_with_master; -connection master; - - ---echo ==== AUTOCOMMIT=1, transactions ==== - ---echo ---- COMMIT ---- - -SET AUTOCOMMIT = 1; - -BEGIN; -INSERT INTO myisam_innodb VALUES (25); -INSERT INTO myisam_innodb VALUES (26); -COMMIT; -sync_slave_with_master; -connection master; -BEGIN; -INSERT INTO innodb_myisam VALUES (27); -INSERT INTO innodb_myisam VALUES (28); -COMMIT; -sync_slave_with_master; -connection master; - -BEGIN; -INSERT INTO myisam_ndb VALUES (29); -INSERT INTO myisam_ndb VALUES (30); -COMMIT; -sync_slave_with_master; -connection master; -BEGIN; -INSERT INTO ndb_myisam VALUES (31); -INSERT INTO ndb_myisam VALUES (32); -COMMIT; -sync_slave_with_master; -connection master; - -BEGIN; -INSERT INTO ndb_innodb VALUES (33); -INSERT INTO ndb_innodb VALUES (34); -COMMIT; -sync_slave_with_master; -connection master; -BEGIN; -INSERT INTO innodb_ndb VALUES (35); -INSERT INTO innodb_ndb VALUES (36); -COMMIT; -sync_slave_with_master; -connection master; - ---echo ---- ROLLBACK ---- - -# This test does not work in ROW mode after the changes introduced in -# BUG#40116. After WL#2687 is pushed, these tests should be enabled -# again. ---disable_parsing -BEGIN; -INSERT INTO myisam_innodb VALUES (37); -INSERT INTO myisam_innodb VALUES (38); -ROLLBACK; -sync_slave_with_master; -connection master; ---enable_parsing -BEGIN; -INSERT INTO innodb_myisam VALUES (39); -INSERT INTO innodb_myisam VALUES (40); -ROLLBACK; -sync_slave_with_master; -connection master; - -# This test does not work in ROW mode after the changes introduced in -# BUG#40116. After WL#2687 is pushed, these tests should be enabled -# again. ---disable_parsing -BEGIN; -INSERT INTO myisam_ndb VALUES (41); -INSERT INTO myisam_ndb VALUES (42); -ROLLBACK; -sync_slave_with_master; -connection master; ---enable_parsing -BEGIN; -INSERT INTO ndb_myisam VALUES (43); -INSERT INTO ndb_myisam VALUES (44); -ROLLBACK; -sync_slave_with_master; -connection master; - -BEGIN; -INSERT INTO ndb_innodb VALUES (45); -INSERT INTO ndb_innodb VALUES (46); -ROLLBACK; -sync_slave_with_master; -connection master; -BEGIN; -INSERT INTO innodb_ndb VALUES (47); -INSERT INTO innodb_ndb VALUES (48); -ROLLBACK; -sync_slave_with_master; -connection master; - - ---echo ==== AUTOCOMMIT=1, single statements ==== - -INSERT INTO myisam_innodb VALUES (49); -INSERT INTO myisam_innodb VALUES (50); -sync_slave_with_master; -connection master; -INSERT INTO innodb_myisam VALUES (51); -INSERT INTO innodb_myisam VALUES (52); -sync_slave_with_master; -connection master; - -INSERT INTO myisam_ndb VALUES (53); -INSERT INTO myisam_ndb VALUES (54); -sync_slave_with_master; -connection master; -INSERT INTO ndb_myisam VALUES (55); -INSERT INTO ndb_myisam VALUES (56); -sync_slave_with_master; -connection master; - -INSERT INTO ndb_innodb VALUES (57); -INSERT INTO ndb_innodb VALUES (58); -sync_slave_with_master; -connection master; -INSERT INTO innodb_ndb VALUES (59); -INSERT INTO innodb_ndb VALUES (60); -sync_slave_with_master; -connection master; - - ---echo ==== AUTOCOMMIT=0, single statements, myisam on master ==== - -SET AUTOCOMMIT = 0; - -# These tests do not work in ROW mode after the changes introduced in -# BUG#40116. After WL#2687 is pushed, these tests should be enabled -# again. ---disable_parsing -# This tests BUG#29288. -INSERT INTO myisam_innodb VALUES (61); -INSERT INTO myisam_innodb VALUES (62); -sync_slave_with_master; -connection master; - -INSERT INTO myisam_ndb VALUES (63); -INSERT INTO myisam_ndb VALUES (64); -sync_slave_with_master; -connection master; ---enable_parsing - - ---echo ==== Show results ==== - -SELECT * FROM myisam_innodb ORDER BY a; -SELECT * FROM innodb_myisam ORDER BY a; -SELECT * FROM myisam_ndb ORDER BY a; -SELECT * FROM ndb_myisam ORDER BY a; -SELECT * FROM innodb_ndb ORDER BY a; -SELECT * FROM ndb_innodb ORDER BY a; - -let $diff_table_1=master:test.myisam_innodb; -let $diff_table_2=slave:test.myisam_innodb; -source include/diff_tables.inc; - -let $diff_table_1=master:test.innodb_myisam; -let $diff_table_2=slave:test.innodb_myisam; -source include/diff_tables.inc; - -let $diff_table_1=master:test.myisam_ndb; -let $diff_table_2=slave:test.myisam_ndb; -source include/diff_tables.inc; - -let $diff_table_1=master:test.ndb_myisam; -let $diff_table_2=slave:test.ndb_myisam; -source include/diff_tables.inc; - -let $diff_table_1=master:test.innodb_ndb; -let $diff_table_2=slave:test.innodb_ndb; -source include/diff_tables.inc; - -let $diff_table_1=master:test.ndb_innodb; -let $diff_table_2=slave:test.ndb_innodb; -source include/diff_tables.inc; - - ---echo ==== Clean up ==== - -drop table myisam_innodb, innodb_myisam; -drop table myisam_ndb, ndb_myisam; -drop table innodb_ndb, ndb_innodb; -sync_slave_with_master; diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi.test deleted file mode 100644 index 800362db67a..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi.test +++ /dev/null @@ -1,73 +0,0 @@ ---source include/have_multi_ndb.inc ---source include/have_binlog_format_mixed_or_row.inc ---source include/ndb_master-slave.inc - -# note: server2 is another "master" connected to the master cluster - -# -# Currently test only works with ndb since it retrieves "old" -# binlog positions with mysql.ndb_binlog_index and ndb_apply_status; -# - -# create a table with one row, and make sure the other "master" gets it -CREATE TABLE t1 (c1 CHAR(15), c2 CHAR(15), c3 INT, PRIMARY KEY (c3)) ENGINE = NDB ; -connection server2; -reset master; -SHOW TABLES; -connection master; -INSERT INTO t1 VALUES ("row1","will go away",1); -SELECT * FROM t1 ORDER BY c3; -connection server2; -SELECT * FROM t1 ORDER BY c3; - -# sync slave and retrieve epoch and stop the slave -connection master; -sync_slave_with_master; ---replace_column 1 -SELECT @the_epoch:=MAX(epoch) FROM mysql.ndb_apply_status; -let $the_epoch= `select @the_epoch` ; -SELECT * FROM t1 ORDER BY c3; -stop slave; - -# get the master binlog pos from the epoch, from the _other_ "master", server2 -connection server2; ---replace_result $the_epoch -eval SELECT @the_pos:=Position,@the_file:=SUBSTRING_INDEX(FILE, '/', -1) - FROM mysql.ndb_binlog_index WHERE epoch = $the_epoch ; -let $the_pos= `SELECT @the_pos` ; -let $the_file= `SELECT @the_file` ; - -# now connect the slave to the _other_ "master" -connection slave; ---replace_result $MASTER_MYPORT1 ---replace_regex /master_log_pos = [0-9]+/master_log_pos = BINLOG_START/ -eval CHANGE MASTER TO - master_port=$MASTER_MYPORT1, - master_log_file = '$the_file', - master_log_pos = $the_pos ; -start slave; - -# insert some more values on the first master -connection master; -INSERT INTO t1 VALUES ("row2","will go away",2),("row3","will change",3),("row4","D",4); -DELETE FROM t1 WHERE c3 = 1; -UPDATE t1 SET c2="should go away" WHERE c3 = 2; -UPDATE t1 SET c2="C" WHERE c3 = 3; -DELETE FROM t1 WHERE c3 = 2; - -SELECT * FROM t1 ORDER BY c3; - -# insert another row, and check that we have it on the slave -connection server2; -INSERT INTO t1 VALUES ("row5","E",5); -SELECT * FROM t1 ORDER BY c3; -sync_slave_with_master; -connection slave; -SELECT * FROM t1 ORDER BY c3; - ---echo ==== clean up ==== -connection server2; -DROP TABLE t1; -sync_slave_with_master; - -STOP SLAVE; diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update2-slave.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update2-slave.opt deleted file mode 100644 index 17d4171af0e..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update2-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---replicate-ignore-table=nothing.sensible diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update2.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update2.test deleted file mode 100644 index 6b86f8146f8..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update2.test +++ /dev/null @@ -1,13 +0,0 @@ -############################################################ -# By JBM 2006-02-15 Wrapper for rpl_multi_update2.test # -# to reuse test code between engine runs # -############################################################ --- source include/have_ndb.inc - -# Run this only for row based replication, as replication of -# auto_increment values are not supported with NDB as storage engine --- source include/have_binlog_format_mixed_or_row.inc --- source include/ndb_master-slave.inc - -let $engine_type=NDB; ---source extra/rpl_tests/rpl_multi_update2.test diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update3.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update3.test deleted file mode 100644 index 0375fd7fe6d..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update3.test +++ /dev/null @@ -1,11 +0,0 @@ -############################################################ -# By JBM 2006-02-15 Wrapper for rpl_multi_update3.test # -# to reuse test code between engine runs # -############################################################ --- source include/have_ndb.inc -# Since the master generates row-based events, the slave must be in -# ROW or MIXED mode to accept the events. --- source include/have_binlog_format_mixed_or_row.inc --- source include/ndb_master-slave.inc -let $engine_type=NDB; --- source extra/rpl_tests/rpl_multi_update3.test diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_myisam2ndb-slave.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_myisam2ndb-slave.opt deleted file mode 100644 index b63ef44e8fc..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_myisam2ndb-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---new --default-storage-engine=ndbcluster diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_myisam2ndb.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_myisam2ndb.test deleted file mode 100644 index a9e56d17139..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_myisam2ndb.test +++ /dev/null @@ -1,14 +0,0 @@ -############################################################# -# Author: JBM -# Date: 2006-02-24 -# Purpose: Trying to test ability to replicate from cluster -# to innodb, or myisam, or replicate from innodb/myisam to -# cluster slave. Due to limitations I have created wrappers -# to be able to use the same code for all these different -# test and to have control over the tests. -############################################################## --- source include/have_ndb.inc --- source include/have_binlog_format_mixed_or_row.inc --- source include/ndb_master-slave.inc -SET storage_engine=myisam; ---source extra/rpl_tests/rpl_ndb_2multi_eng.test diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_relayrotate-slave.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_relayrotate-slave.opt deleted file mode 100644 index 2211d2dbb2d..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_relayrotate-slave.opt +++ /dev/null @@ -1,3 +0,0 @@ ---max_relay_log_size=16384 ---loose-innodb ---log-warnings diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_relayrotate.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_relayrotate.test deleted file mode 100644 index b0b9dd9e7da..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_relayrotate.test +++ /dev/null @@ -1,9 +0,0 @@ -############################################################ -# By JBM 2006-02-15 Wrapper for rpl_relayrotate.test # -# to reuse test code between engine runs # -############################################################ --- source include/have_ndb.inc --- source include/have_ndb_extra.inc --- source include/ndb_master-slave.inc -let $engine_type=NDB; --- source extra/rpl_tests/rpl_relayrotate.test diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_rep_ignore-slave.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_rep_ignore-slave.opt deleted file mode 100644 index 6262cf451a6..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_rep_ignore-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---replicate-ignore-db=test --replicate-ignore-table=replica.t1 diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_rep_ignore.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_rep_ignore.test deleted file mode 100644 index 2d0c87927a5..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_rep_ignore.test +++ /dev/null @@ -1,60 +0,0 @@ -########################################################### -# Author: Jeb -# Date: 15-12-2006 -# Purpose: To test --replicate-ignore-table=db_name.tbl_name -# and --replicate-ignore-db=db_name -# using cluster. Only replica should replicate. -########################################################## - ---source include/have_ndb.inc -# Since the master generates row-based events, the slave must be in -# ROW or MIXED mode to accept the events. ---source include/have_binlog_format_mixed_or_row.inc ---source include/ndb_master-slave.inc - ---disable_warnings -DROP DATABASE IF EXISTS replica; ---enable_warnings - -# Create database and tables for the test. -CREATE DATABASE replica; -CREATE TABLE t1 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; -CREATE TABLE t2 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; -USE replica; -CREATE TABLE replica.t1 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; -CREATE TABLE replica.t2 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; - -# Insert data into db that should not be picked up by slave -USE test; -INSERT INTO t1 VALUES(1, repeat('abc',10)); -INSERT INTO t2 VALUES(1, repeat('abc',10)); -SHOW TABLES; -SELECT COUNT(*) FROM t1; -SELECT COUNT(*) FROM t2; - -# Insert data into db that should be replicated -USE replica; -INSERT INTO replica.t1 VALUES(2, repeat('def',200)); -INSERT INTO replica.t2 VALUES(2, repeat('def',200)); -SHOW TABLES; -SELECT COUNT(*) FROM t1; -SELECT COUNT(*) FROM t2; - -# Check results on slave ---sync_slave_with_master -SHOW TABLES; -USE replica; -SHOW TABLES; -#SELECT COUNT(*) FROM t1; -SELECT COUNT(*) FROM t2; -USE test; -SHOW TABLES; - -# Cleanup from testing -connection master; -USE test; -DROP TABLE t1, t2; -DROP DATABASE IF EXISTS replica; ---sync_slave_with_master - -# End 5.1 test case diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_row_001.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_row_001.test deleted file mode 100644 index c711e6ddfa3..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_row_001.test +++ /dev/null @@ -1,10 +0,0 @@ -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -######################################################## ---source include/have_ndb.inc -# Since the master generates row-based events, the slave must be in -# ROW or MIXED mode to accept the events. ---source include/have_binlog_format_mixed_or_row.inc --- source include/ndb_master-slave.inc -let $engine_type=NDB; --- source extra/rpl_tests/rpl_row_001.test diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_row_implicit_commit_binlog.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_row_implicit_commit_binlog.test deleted file mode 100644 index 3ddf659f1e9..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_row_implicit_commit_binlog.test +++ /dev/null @@ -1,9 +0,0 @@ -################################################################################ -# Check file extra/rpl_tests/rpl_implicit_commit_binlog.test -################################################################################ ---source include/have_binlog_format_row.inc ---source include/have_ndb.inc ---source include/ndb_master-slave.inc - ---let $engine=NDB ---source extra/rpl_tests/rpl_implicit_commit_binlog.test diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_set_null.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_set_null.test deleted file mode 100644 index 454807d9591..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_set_null.test +++ /dev/null @@ -1,6 +0,0 @@ --- source include/have_ndb.inc --- source include/have_binlog_format_mixed_or_row.inc --- source include/ndb_master-slave.inc - --- let $engine= NDB --- source extra/rpl_tests/rpl_set_null.test diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_sp003.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_sp003.test deleted file mode 100644 index a8dab098df5..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_sp003.test +++ /dev/null @@ -1,13 +0,0 @@ -################################# -# Wrapper for rpl_row_sp003.test# -# These tests have been wrapped # -# so the same code can be used # -# For different engines # -################################# --- source include/have_ndb.inc -# Since the master generates row-based events, the slave must be in -# ROW or MIXED mode to accept the events. --- source include/have_binlog_format_mixed_or_row.inc --- source include/ndb_master-slave.inc -let $engine_type=NDBCLUSTER; --- source extra/rpl_tests/rpl_row_sp003.test diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_sp006.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_sp006.test deleted file mode 100644 index f005d9cd67a..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_sp006.test +++ /dev/null @@ -1,13 +0,0 @@ -################################# -# Wrapper for rpl_row_sp006.test# -# These tests have been wrapped # -# so the same code can be used # -# For different engines # -################################# --- source include/have_ndb.inc -# Since the master generates row-based events, the slave must be in -# ROW or MIXED mode to accept the events. --- source include/have_binlog_format_mixed_or_row.inc --- source include/ndb_master-slave.inc -let $engine_type=NDBCLUSTER; --- source extra/rpl_tests/rpl_row_sp006.test diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb-master.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb-master.opt deleted file mode 100644 index 3596fc4d3bd..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb-master.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb --default-storage-engine=innodb diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb-slave.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb-slave.opt deleted file mode 100644 index 96f0ce3f36c..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---default-storage-engine=MyISAM diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb.test deleted file mode 100644 index 5e54ca38dc1..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb.test +++ /dev/null @@ -1,40 +0,0 @@ -############################################# -#Authors: TU and Jeb -#Date: 2007/04 -#Purpose: Generic replication to cluster -# and ensuring that the ndb_apply_status -# table is updated. -############################################# -# Notes: -# include/select_ndb_apply_status.inc -# Selects out the log name, start & end pos -# from the ndb_apply_status table -# -# include/show_binlog_using_logname.inc -# To select out 1 row from offset 1 -# from the start position in the binlog whose -# name is = log_name -# -# include/tpcb.inc -# Creates DATABASE tpcb, the tables and -# stored procedures for loading the DB -# and for running transactions against DB. -############################################## - - -## Includes ## - ---disable_query_log ---source include/have_ndb.inc ---source include/have_innodb.inc ---source include/ndb_master-slave.inc ---enable_query_log - -# statement format is supported because master uses innodb -SET binlog_format = STATEMENT; -let $off_set = 6; -let $rpl_format = 'SBR'; -disable_query_log; -call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); -enable_query_log; ---source extra/rpl_tests/rpl_ndb_apply_status.test diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_sync.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_sync.test deleted file mode 100644 index 152839c8676..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_sync.test +++ /dev/null @@ -1,101 +0,0 @@ ---source include/have_ndb.inc ---source include/ndb_default_cluster.inc ---source include/not_embedded.inc ---source include/have_binlog_format_mixed_or_row.inc ---source include/ndb_master-slave.inc - -# -# Currently test only works with ndb since it retrieves "old" -# binlog positions with mysql.ndb_binlog_index and ndb_apply_status; -# - -# stop the save ---connection slave -STOP SLAVE; -CREATE DATABASE ndbsynctest; -USE ndbsynctest; - -# get some data on the master ---connection master -CREATE DATABASE ndbsynctest; -USE ndbsynctest; -CREATE TABLE t1 (c1 BIT(1) NOT NULL, c2 BIT(1) NOT NULL, c3 CHAR(15), PRIMARY KEY(c3)) ENGINE = NDB ; -INSERT INTO t1 VALUES (1,1,"row1"),(0,1,"row2"),(1,0,"row3"),(0,0,"row4"); -CREATE TABLE t2 (c1 CHAR(15), c2 BIT(1) NOT NULL, c3 BIT(1) NOT NULL, PRIMARY KEY(c1)) ENGINE = NDB ; -INSERT INTO t2 VALUES ("ABC",1,1),("BCDEF",0,1),("CD",1,0),("DEFGHIJKL",0,0); -SELECT hex(c1),hex(c2),c3 FROM t1 ORDER BY c3; -SELECT hex(c2),hex(c3),c1 FROM t2 ORDER BY c1; - -# take a backup on master ---source include/ndb_backup.inc - -# update a row -UPDATE t1 SET c2=0 WHERE c3="row2"; -SELECT hex(c1),hex(c2),c3 FROM t1 ORDER BY c3; - -# restore on slave, first check that nothing is there ---connection slave - -# we should have no tables -SHOW TABLES; - ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --ndb-connectstring="$NDB_CONNECTSTRING_SLAVE" -b $the_backup_id -n 1 -m -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --ndb-connectstring="$NDB_CONNECTSTRING_SLAVE" -b $the_backup_id -n 2 -r -e --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT - -# -# BUG#11960 -# prior to bugfix "DROP DATABASE" would give a warning since -# the events were not created by ndb_restore -# -DROP DATABASE ndbsynctest; -CREATE DATABASE ndbsynctest; -USE ndbsynctest; ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --ndb-connectstring="$NDB_CONNECTSTRING_SLAVE" -b $the_backup_id -n 1 -m -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --ndb-connectstring="$NDB_CONNECTSTRING_SLAVE" -b $the_backup_id -n 2 -r -e --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT - -# continue test -SHOW TABLES; - -SELECT hex(c1),hex(c2),c3 FROM t1 ORDER BY c3; -SELECT hex(c2),hex(c3),c1 FROM t2 ORDER BY c1; - -# -# now setup replication to continue from last epoch ---source include/ndb_setup_slave.inc ---connection slave -START SLAVE; - -# -# -# ---connection master ---sync_slave_with_master ---source include/check_slave_is_running.inc - -SELECT hex(c1),hex(c2),c3 FROM t1 ORDER BY c3; -SELECT hex(c2),hex(c3),c1 FROM t2 ORDER BY c1; - -# -# Cleanup -# - ---connection master -DROP DATABASE ndbsynctest; ---sync_slave_with_master ---connection slave -STOP SLAVE; - -# -# Test some replication commands -# ---connection master -reset master; -# should now contain nothing -select * from mysql.ndb_binlog_index; - ---connection slave -reset slave; -# should now contain nothing -select * from mysql.ndb_apply_status; - -# End 5.1 Test diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_trig004.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_trig004.test deleted file mode 100644 index 1fef32b7a65..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_trig004.test +++ /dev/null @@ -1,17 +0,0 @@ -############################################################################# -# Original Author: JBM # -# Original Date: 2006-02-14 # -############################################################################# -# TEST: Use before insert triggers and has the second insert fail # -# Test is wrapped to save code and share between engines # -############################################################################# - -# Includes --- source include/have_ndb.inc -# Since the master generates row-based events, the slave must be in -# ROW or MIXED mode to accept the events. --- source include/have_binlog_format_mixed_or_row.inc --- source include/ndb_master-slave.inc -let $engine_type=NDB; --- source extra/rpl_tests/rpl_trig004.test - diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndbapi_multi.test b/mysql-test/suite/rpl_ndb/t/rpl_ndbapi_multi.test deleted file mode 100644 index 543393b980d..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndbapi_multi.test +++ /dev/null @@ -1,11 +0,0 @@ --- source include/have_ndb.inc --- source include/have_binlog_format_mixed_or_row.inc --- source include/have_ndbapi_examples.inc --- source include/ndb_master-slave.inc - ---exec echo Running ndbapi_simple_dual ---exec $NDB_EXAMPLES_DIR/ndbapi_simple_dual/ndbapi_simple_dual $MASTER_MYSOCK "$NDB_CONNECTSTRING" $SLAVE_MYSOCK "$NDB_CONNECTSTRING_SLAVE" >> $NDB_EXAMPLES_OUTPUT - ---exec echo Running mgmapi_logevent ---exec $NDB_EXAMPLES_DIR/mgmapi_logevent/mgmapi_logevent "$NDB_CONNECTSTRING" "$NDB_CONNECTSTRING_SLAVE" 1 >> $NDB_EXAMPLES_OUTPUT - diff --git a/mysql-test/suite/rpl_ndb/t/rpl_row_basic_7ndb.test b/mysql-test/suite/rpl_ndb/t/rpl_row_basic_7ndb.test deleted file mode 100644 index 3a17de1bc9e..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_row_basic_7ndb.test +++ /dev/null @@ -1,8 +0,0 @@ --- source include/have_ndb.inc --- source include/have_binlog_format_mixed_or_row.inc --- source include/ndb_master-slave.inc - -let $type= 'NDB' ; -let $extra_index= ; --- source extra/rpl_tests/rpl_row_basic.test --- source include/master-slave-end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb.test b/mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb.test deleted file mode 100644 index d3b80297ffc..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb.test +++ /dev/null @@ -1,66 +0,0 @@ - ---source include/have_ndb.inc ---source include/ndb_master-slave.inc ---source include/have_binlog_format_mixed_or_row.inc - ---disable_query_log ---disable_warnings -connection slave; -STOP SLAVE; -connection master; -DROP TABLE IF EXISTS t1; -RESET MASTER; -connection slave; -DROP TABLE IF EXISTS t1; -RESET SLAVE; -START SLAVE; ---enable_warnings ---enable_query_log - ---echo **** On Master **** -connection master; -CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB; -INSERT INTO t1 VALUES (1,1), (2,2); -SELECT * FROM t1 ORDER BY a,b; ---echo **** On Slave **** -# This is silly, but NDB doesn't add to the binlog fast enough ---real_sleep 10 -sync_slave_with_master; -INSERT INTO t1 VALUE (3,3); -SELECT * FROM t1 ORDER BY a,b; ---echo **** On Master **** -connection master; -TRUNCATE TABLE t1; -SELECT * FROM t1 ORDER BY a,b; ---echo **** On Slave **** -sync_slave_with_master; -# Should be empty -SELECT * FROM t1 ORDER BY a,b; ---echo **** On Master **** -connection master; -DROP TABLE t1; ---source include/show_binlog_events.inc - ---echo **** On Master **** -connection master; -CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB; -INSERT INTO t1 VALUES (1,1), (2,2); -SELECT * FROM t1 ORDER BY a,b; ---echo **** On Slave **** -sync_slave_with_master; -INSERT INTO t1 VALUE (3,3); -SELECT * FROM t1 ORDER BY a,b; ---echo **** On Master **** -connection master; -DELETE FROM t1; -SELECT * FROM t1 ORDER BY a,b; ---echo **** On Slave **** -sync_slave_with_master; -# Should be empty -SELECT * FROM t1 ORDER BY a,b; ---echo **** On Master **** -connection master; -DROP TABLE t1; ---source include/show_binlog_events.inc - --- source include/master-slave-end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb_2-master.opt b/mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb_2-master.opt deleted file mode 100644 index 01cf3e0520f..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb_2-master.opt +++ /dev/null @@ -1 +0,0 @@ ---binlog-format=mixed diff --git a/mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb_2.test b/mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb_2.test deleted file mode 100644 index 549227db61a..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb_2.test +++ /dev/null @@ -1,11 +0,0 @@ -# Same test as rpl_truncate_7ndb.test, but with mixed mode -# This is marked with 'big_test' just because the rpl_truncate_7ndb test is -# so slow... - -# Last Change: 2008-09-03 -# Change Author: pcrews -# Change: Moved test to rpl_ndb suite, updated location of --source .test file - ---source include/have_binlog_format_mixed.inc ---source include/big_test.inc ---source suite/rpl_ndb/t/rpl_truncate_7ndb.test diff --git a/mysql-test/suite/stress/r/ddl_ndb.result b/mysql-test/suite/stress/r/ddl_ndb.result deleted file mode 100644 index 05c29456f7c..00000000000 --- a/mysql-test/suite/stress/r/ddl_ndb.result +++ /dev/null @@ -1,216 +0,0 @@ -SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION'; -PREPARE stmt_start FROM "SELECT UNIX_TIMESTAMP() INTO @start"; -SET @runtime = ; -PREPARE stmt_break FROM "SELECT UNIX_TIMESTAMP() - @start > @runtime - 1"; -DROP TABLE IF EXISTS t1; -# Subtest 1A (one connection, no PREPARE/EXECUTE) -# connection action -# default: CREATE TABLE t1 (f1 BIGINT,f2 BIGINT,UNIQUE(f1),UNIQUE(f2)) -ENGINE = NDB -# default: INSERT INTO t1 VALUES (1,1), (2,2), (3,3) -# default: DROP TABLE t1 -# Subtest 1B (one connection, use PREPARE/EXECUTE) -# connection action -# default: CREATE TABLE t1 (f1 BIGINT,f2 BIGINT,UNIQUE(f1),UNIQUE(f2)) -ENGINE = NDB -# default: INSERT INTO t1 VALUES (1,1), (2,2), (3,3) -# default: DROP TABLE t1 -# Subtest 1C (two connections, no PREPARE/EXECUTE) -# connection action -# default: CREATE TABLE t1 (f1 BIGINT,f2 BIGINT,UNIQUE(f1),UNIQUE(f2)) -ENGINE = NDB -# con2: INSERT INTO t1 VALUES (1,1), (2,2), (3,3) -# con2: DROP TABLE t1 -# Subtest 1D (two connections, use PREPARE/EXECUTE) -# connection action -# default: CREATE TABLE t1 (f1 BIGINT,f2 BIGINT,UNIQUE(f1),UNIQUE(f2)) -ENGINE = NDB -# con2: INSERT INTO t1 VALUES (1,1), (2,2), (3,3) -# con2: DROP TABLE t1 -# Subtest 2A (one connection, no PREPARE/EXECUTE) -# connection action -# default: CREATE TABLE t1 ENGINE = NDB AS SELECT 1 AS f1 -# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 -# default: DROP TABLE t1 -# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE) -# Subtest 2B (one connection, use PREPARE/EXECUTE) -# connection action -# default: CREATE TABLE t1 ENGINE = NDB AS SELECT 1 AS f1 -# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 -# default: DROP TABLE t1 -# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE) -# Subtest 2C (two connections, no PREPARE/EXECUTE) -# connection action -# default: CREATE TABLE t1 ENGINE = NDB AS SELECT 1 AS f1 -# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 -# default: DROP TABLE t1 -# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE) -# Subtest 2D (two connections, use PREPARE/EXECUTE) -# connection action -# default: CREATE TABLE t1 ENGINE = NDB AS SELECT 1 AS f1 -# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 -# default: DROP TABLE t1 -# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE) -# Subtest 3A (one connection, no PREPARE/EXECUTE) -# connection action -# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=NDB -# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=NDB (expect to get ER_TABLE_EXISTS_ERROR) -# default: DROP TABLE t1 -# default: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR) -# Subtest 3B (one connection, use PREPARE/EXECUTE) -# connection action -# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=NDB -# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=NDB (expect to get ER_TABLE_EXISTS_ERROR) -# default: DROP TABLE t1 -# default: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR) -# Subtest 3C (two connections, no PREPARE/EXECUTE) -# connection action -# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=NDB -# con2: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=NDB (expect to get ER_TABLE_EXISTS_ERROR) -# default: DROP TABLE t1 -# con2: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR) -# Subtest 3D (two connections, use PREPARE/EXECUTE) -# connection action -# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=NDB -# con2: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=NDB (expect to get ER_TABLE_EXISTS_ERROR) -# default: DROP TABLE t1 -# con2: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR) -CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=NDB; -DROP TABLE t1; -CREATE TABLE t1 (f1 BIGINT) ENGINE=NDB; -DROP TABLE t1; -# Subtest 4A (one connection, no PREPARE/EXECUTE) -# connection action -# default: CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=NDB -# default: SHOW CREATE TABLE t1 -# default: DROP TABLE t1 -# default: SHOW CREATE TABLE t1 (expect to get ER_NO_SUCH_TABLE) -# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=NDB -# default: SHOW CREATE TABLE t1 -# default: DROP TABLE t1 -# Subtest 4B (one connection, use PREPARE/EXECUTE) -# connection action -# default: CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=NDB -# default: SHOW CREATE TABLE t1 -# default: DROP TABLE t1 -# default: SHOW CREATE TABLE t1 (expect to get ER_NO_SUCH_TABLE) -# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=NDB -# default: SHOW CREATE TABLE t1 -# default: DROP TABLE t1 -# Subtest 4C (two connections, no PREPARE/EXECUTE) -# connection action -# default: CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=NDB -# con2: SHOW CREATE TABLE t1 -# default: DROP TABLE t1 -# con2: SHOW CREATE TABLE t1 (expect to get ER_NO_SUCH_TABLE) -# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=NDB -# con2: SHOW CREATE TABLE t1 -# default: DROP TABLE t1 -# Subtest 4D (two connections, use PREPARE/EXECUTE) -# connection action -# default: CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=NDB -# con2: SHOW CREATE TABLE t1 -# default: DROP TABLE t1 -# con2: SHOW CREATE TABLE t1 (expect to get ER_NO_SUCH_TABLE) -# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=NDB -# con2: SHOW CREATE TABLE t1 -# default: DROP TABLE t1 -# Subtest 5A (one connection, no PREPARE/EXECUTE) -# connection action -# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = NDB -# default: INSERT INTO t1 SET f2 = 9 -# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9 -# default: DROP TABLE t1 -# Subtest 5B (one connection, use PREPARE/EXECUTE) -# connection action -# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = NDB -# default: INSERT INTO t1 SET f2 = 9 -# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9 -# default: DROP TABLE t1 -# Subtest 5C (two connections, no PREPARE/EXECUTE) -# connection action -# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = NDB -# con2: INSERT INTO t1 SET f2 = 9 -# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9 -# con2: DROP TABLE t1 -# Subtest 5D (two connections, use PREPARE/EXECUTE) -# connection action -# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = NDB -# con2: INSERT INTO t1 SET f2 = 9 -# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9 -# con2: DROP TABLE t1 -CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1)) ENGINE=NDB; -# Subtest 6A (one connection, no PREPARE/EXECUTE) -# connection action -# default: CREATE INDEX IDX1 ON t1 (f2) -# default: CREATE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_KEYNAME) -# default: DROP INDEX IDX1 ON t1 -# default: DROP INDEX IDX1 ON t1 (expect to get ER_CANT_DROP_FIELD_OR_KEY) -# default: CREATE INDEX IDX1 ON t1 (f2) -# default: DROP INDEX IDX1 ON t1 -# Subtest 6B (one connection, use PREPARE/EXECUTE) -# connection action -# default: CREATE INDEX IDX1 ON t1 (f2) -# default: CREATE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_KEYNAME) -# default: DROP INDEX IDX1 ON t1 -# default: DROP INDEX IDX1 ON t1 (expect to get ER_CANT_DROP_FIELD_OR_KEY) -# default: CREATE INDEX IDX1 ON t1 (f2) -# default: DROP INDEX IDX1 ON t1 -# Subtest 6C (two connections, no PREPARE/EXECUTE) -# connection action -# default: CREATE INDEX IDX1 ON t1 (f2) -# con2: CREATE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_KEYNAME) -# default: DROP INDEX IDX1 ON t1 -# con2: DROP INDEX IDX1 ON t1 (expect to get ER_CANT_DROP_FIELD_OR_KEY) -# default: CREATE INDEX IDX1 ON t1 (f2) -# con2: DROP INDEX IDX1 ON t1 -# Subtest 6D (two connections, use PREPARE/EXECUTE) -# connection action -# default: CREATE INDEX IDX1 ON t1 (f2) -# con2: CREATE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_KEYNAME) -# default: DROP INDEX IDX1 ON t1 -# con2: DROP INDEX IDX1 ON t1 (expect to get ER_CANT_DROP_FIELD_OR_KEY) -# default: CREATE INDEX IDX1 ON t1 (f2) -# con2: DROP INDEX IDX1 ON t1 -DROP TABLE t1; -CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1)) ENGINE=NDB; -INSERT INTO t1 VALUES(1,1); -CREATE INDEX IDX ON t1 (f2); -DROP INDEX IDX ON t1; -CREATE UNIQUE INDEX IDX ON t1 (f2); -DROP INDEX IDX ON t1; -# Subtest 8A (one connection, no PREPARE/EXECUTE) -# connection action -# default: CREATE INDEX IDX ON t1 (f2) -# default: SHOW CREATE TABLE t1 -# default: DROP INDEX IDX ON t1 -# default: CREATE UNIQUE INDEX IDX ON t1 (f2) -# default: SHOW CREATE TABLE t1 -# default: DROP INDEX IDX ON t1 -# Subtest 8B (one connection, use PREPARE/EXECUTE) -# connection action -# default: CREATE INDEX IDX ON t1 (f2) -# default: SHOW CREATE TABLE t1 -# default: DROP INDEX IDX ON t1 -# default: CREATE UNIQUE INDEX IDX ON t1 (f2) -# default: SHOW CREATE TABLE t1 -# default: DROP INDEX IDX ON t1 -# Subtest 8C (two connections, no PREPARE/EXECUTE) -# connection action -# default: CREATE INDEX IDX ON t1 (f2) -# con2: SHOW CREATE TABLE t1 -# default: DROP INDEX IDX ON t1 -# default: CREATE UNIQUE INDEX IDX ON t1 (f2) -# con2: SHOW CREATE TABLE t1 -# default: DROP INDEX IDX ON t1 -# Subtest 8D (two connections, use PREPARE/EXECUTE) -# connection action -# default: CREATE INDEX IDX ON t1 (f2) -# con2: SHOW CREATE TABLE t1 -# default: DROP INDEX IDX ON t1 -# default: CREATE UNIQUE INDEX IDX ON t1 (f2) -# con2: SHOW CREATE TABLE t1 -# default: DROP INDEX IDX ON t1 -DROP TABLE t1; -DEALLOCATE PREPARE stmt_start; -DEALLOCATE PREPARE stmt_break; diff --git a/mysql-test/suite/stress/t/ddl_ndb.test b/mysql-test/suite/stress/t/ddl_ndb.test deleted file mode 100644 index 1e0a3680f8a..00000000000 --- a/mysql-test/suite/stress/t/ddl_ndb.test +++ /dev/null @@ -1,58 +0,0 @@ -######## t/ddl_ndb.test ###### -# -# Stress the storage engine NDB with CREATE/DROP TABLE/INDEX -# -# Please look for details within include/ddl1.inc. -# -# Creation of this test: -# 2007-07-04 mleich -# - -# Storage engine to be used in CREATE TABLE ---source include/have_ndb.inc -connection default; - -let $engine_type= NDB; - - -if (`SELECT $PS_PROTOCOL + $SP_PROTOCOL + $CURSOR_PROTOCOL + $VIEW_PROTOCOL > 0`) -{ - --skip Test requires: ps-protocol/sp-protocol/cursor-protocol/view-protocol disabled -} -# Attention: We set here much smaller values for $runtime and $loop_size compared -# to the other storage engines. -# The reason is that NDB is extreme slow and should not exceed -# the "testcase-timeout". -let $run= `SELECT '$BIG_TEST' = '1'`; -if ($run) -{ - # A run started with "--big-test" should be allowed to consume more time. - # Rough intended runtime per subtest variant in seconds - let $runtime = 5; - # number of rounds till we look at the clock again - let $loop_size= 3; -} -if (!$run) -{ - let $runtime = 1; - let $loop_size= 1; -} - - -##### Some preparations needed for the ddl*.inc scripts ---source suite/stress/include/ddl.pre - ---source suite/stress/include/ddl1.inc ---source suite/stress/include/ddl2.inc ---source suite/stress/include/ddl3.inc ---source suite/stress/include/ddl4.inc ---source suite/stress/include/ddl5.inc ---source suite/stress/include/ddl6.inc -# The following test suffers from -# Bug#26043 UNIQUE INDEX create always fails after constraint violation -# and is therefore set to comment. -# --source suite/stress/include/ddl7.inc ---source suite/stress/include/ddl8.inc - -##### Cleanup ---source suite/stress/include/ddl.cln diff --git a/mysql-test/suite/sys_vars/r/rpl_init_slave_func.result b/mysql-test/suite/sys_vars/r/rpl_init_slave_func.result index 36b467696be..3563ecbfe0a 100644 --- a/mysql-test/suite/sys_vars/r/rpl_init_slave_func.result +++ b/mysql-test/suite/sys_vars/r/rpl_init_slave_func.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] connection slave SET @start_max_connections= @@global.max_connections; SET @start_init_slave= @@global.init_slave; @@ -30,6 +26,7 @@ STOP SLAVE; RESET MASTER; RESET SLAVE; START SLAVE; +include/wait_for_slave_to_start.inc SELECT @@global.max_connections = @start_max_connections + 1; @@global.max_connections = @start_max_connections + 1 1 @@ -39,6 +36,7 @@ STOP SLAVE; RESET MASTER; RESET SLAVE; START SLAVE; +include/wait_for_slave_to_start.inc SHOW VARIABLES LIKE 'init_slave'; Variable_name Value init_slave SET @a=5 @@ -48,3 +46,4 @@ NULL Expect NULL SET @@global.max_connections= @start_max_connections; SET @@global.init_slave= @start_init_slave; +include/rpl_end.inc diff --git a/mysql-test/suite/sys_vars/t/rpl_init_slave_func.test b/mysql-test/suite/sys_vars/t/rpl_init_slave_func.test index fa9cb66db04..ffa88941f07 100644 --- a/mysql-test/suite/sys_vars/t/rpl_init_slave_func.test +++ b/mysql-test/suite/sys_vars/t/rpl_init_slave_func.test @@ -105,3 +105,4 @@ SET @@global.init_slave= @start_init_slave; # End of functionality Testing for init_slave # ################################################## +--source include/rpl_end.inc diff --git a/mysql-test/t/ctype_utf8mb4_ndb.test b/mysql-test/t/ctype_utf8mb4_ndb.test deleted file mode 100644 index fba0ae918a1..00000000000 --- a/mysql-test/t/ctype_utf8mb4_ndb.test +++ /dev/null @@ -1,7 +0,0 @@ ---source include/have_utf8mb4.inc ---source include/have_ndb.inc - -let $engine= ndb; -let $is_ndb= 1; ---source include/ctype_utf8mb4.inc - diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index d312254da19..60af4159650 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -11,7 +11,6 @@ ############################################################################## lowercase_table3 : Bug#54845 2010-06-30 alik main.lowercase_table3 on Mac OSX query_cache_28249 : Bug#43861 2009-03-25 main.query_cache_28249 fails sporadically -ctype_utf8mb4_ndb : Bug#55799, Bug#51907, disabled by Konstantin 2010-08-06 main.mysqlhotcopy_myisam : Bug#56817 2010-10-21 anitha mysqlhotcopy* fails main.mysqlhotcopy_archive: Bug#56817 2010-10-21 anitha mysqlhotcopy* fails log_tables-big : Bug#48646 2010-11-15 mattiasj report already exists diff --git a/mysql-test/t/func_group.test b/mysql-test/t/func_group.test index 9a9c5442d87..2c4a7f4c7b1 100644 --- a/mysql-test/t/func_group.test +++ b/mysql-test/t/func_group.test @@ -1096,6 +1096,27 @@ SELECT MAX((SELECT 1 FROM t1 ORDER BY @var LIMIT 1)) m FROM t1 t2, t1 DROP TABLE t1; +--echo # +--echo # Bug#58030 crash in Item_func_geometry_from_text::val_str +--echo # + +--disable_result_log + +SELECT MAX(TIMESTAMP(RAND(0))); +SELECT MIN(TIMESTAMP(RAND(0))); + +--echo # +--echo # Bug#58177 crash and valgrind warnings in decimal and protocol sending functions... +--echo # + +SELECT MIN(GET_LOCK('aaaaaaaaaaaaaaaaa',0) / '0b1111111111111111111111111111111111111111111111111111111111111111111111111' ^ (RAND())); +SELECT MIN(GET_LOCK('aaaaaaaaaaaaaaaaa',0) / '0b1111111111111111111111111111111111111111111111111111111111111111111111111' ^ (RAND())); +SELECT MIN(GET_LOCK('aaaaaaaaaaaaaaaaa',0) / '0b1111111111111111111111111111111111111111111111111111111111111111111111111' ^ (RAND())); +SELECT MIN(GET_LOCK('aaaaaaaaaaaaaaaaa',0) / '0b1111111111111111111111111111111111111111111111111111111111111111111111111' ^ (RAND())); +SELECT RELEASE_LOCK('aaaaaaaaaaaaaaaaa'); + +--enable_result_log + --echo # --echo End of 5.1 tests diff --git a/mysql-test/t/func_math.test b/mysql-test/t/func_math.test index 7f9ed6d8a93..b089d10a33b 100644 --- a/mysql-test/t/func_math.test +++ b/mysql-test/t/func_math.test @@ -336,6 +336,15 @@ select 123456789012345678901234567890.123456789012345678901234567890 div 1 as x; select "123456789012345678901234567890.123456789012345678901234567890" div 1 as x; SHOW WARNINGS; +--echo # +--echo # Bug#57810 case/when/then : Assertion failed: length || !scale +--echo # + +SELECT CASE(('')) WHEN (CONVERT(1, CHAR(1))) THEN (('' / 1)) END; +CREATE TABLE t1 SELECT CAST((CASE(('')) WHEN (CONVERT(1, CHAR(1))) THEN (('' / 1)) END) AS CHAR) as C; +SHOW CREATE TABLE t1; +DROP TABLE t1; + --echo End of 5.1 tests --echo # diff --git a/mysql-test/t/init_file.test b/mysql-test/t/init_file.test index 7eb5381651d..d73a9c60e8e 100644 --- a/mysql-test/t/init_file.test +++ b/mysql-test/t/init_file.test @@ -33,4 +33,4 @@ drop table t1, t2; # MTR will restart server anyway, but by forcing it we avoid being warned # about the apparent side effect -call mtr.force_restart(); +--source include/force_restart.inc diff --git a/mysql-test/t/mysqlbinlog.test b/mysql-test/t/mysqlbinlog.test index 76f6c63fc1d..714cfbbaa9b 100644 --- a/mysql-test/t/mysqlbinlog.test +++ b/mysql-test/t/mysqlbinlog.test @@ -491,7 +491,6 @@ remove_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog.warn; # # WL#5625: Deprecate mysqlbinlog options --base64-output=always and --base64-output # - --echo # Expect deprecation warning. --exec $MYSQL_BINLOG --base64-output=always std_data/master-bin.000001 > /dev/null 2> $MYSQLTEST_VARDIR/tmp/mysqlbinlog.warn --cat_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog.warn @@ -502,3 +501,29 @@ remove_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog.warn; # Clean up this part of the test. --remove_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog.warn + +# BUG#50914 +# This test verifies if the approach of the mysqlbinlog prints +# "use $database" statements to its output stream will cause +# "No Database Selected" error when dropping and recreating +# that database. +# +RESET MASTER; +CREATE DATABASE test1; +USE test1; +CREATE TABLE t1(id int); +DROP DATABASE test1; +CREATE DATABASE test1; +USE test1; +CREATE TABLE t1(id int); +DROP TABLE t1; +DROP DATABASE test1; +let $master_binlog= query_get_value(SHOW MASTER STATUS, File, 1); +FLUSH LOGS; + +let $MYSQLD_DATADIR= `SELECT @@datadir`; +exec $MYSQL_BINLOG $MYSQLD_DATADIR/$master_binlog | $MYSQL test 2>&1; + +let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1); +source include/show_binlog_events.inc; + diff --git a/mysql-test/t/rpl_mysqldump_slave.test b/mysql-test/t/rpl_mysqldump_slave.test index 8f27646ba08..3f39fe19c0a 100644 --- a/mysql-test/t/rpl_mysqldump_slave.test +++ b/mysql-test/t/rpl_mysqldump_slave.test @@ -1,4 +1,4 @@ -source include/master-slave.inc; +--source include/master-slave.inc --echo # --echo # New --dump-slave, --apply-slave-statements functionality @@ -26,3 +26,5 @@ connection slave; --replace_result $MASTER_MYPORT MASTER_MYPORT # Execute mysqldump with --dump-slave ,--apply-slave-statements and --include-master-host-port --exec $MYSQL_DUMP_SLAVE --compact --dump-slave --apply-slave-statements --include-master-host-port test + +--source include/rpl_end.inc diff --git a/mysql-test/valgrind.supp b/mysql-test/valgrind.supp index bb3a95208bb..4526575dafa 100644 --- a/mysql-test/valgrind.supp +++ b/mysql-test/valgrind.supp @@ -1,3 +1,21 @@ +# Copyright (C) 2005, 2008 MySQL AB +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA + +# # Suppress some common (not fatal) errors in system libraries found by valgrind # diff --git a/mysys/mf_pack.c b/mysys/mf_pack.c index a9482187138..292cd8c0454 100644 --- a/mysys/mf_pack.c +++ b/mysys/mf_pack.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 MySQL AB +/* Copyright (c) 2000, 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 diff --git a/mysys/ptr_cmp.c b/mysys/ptr_cmp.c index 2005e3eb2b7..dcafe13291d 100644 --- a/mysys/ptr_cmp.c +++ b/mysys/ptr_cmp.c @@ -22,7 +22,7 @@ #include "mysys_priv.h" #include -#ifdef TARGET_OS_SOLARIS +#ifdef __sun /* * On Solaris, memcmp() is normally faster than the unrolled ptr_compare_N * functions, as memcmp() is usually a platform-specific implementation @@ -39,22 +39,25 @@ static int native_compare(size_t *length, unsigned char **a, unsigned char **b) return memcmp(*a, *b, *length); } -#else /* TARGET_OS_SOLARIS */ +#else /* __sun */ static int ptr_compare(size_t *compare_length, uchar **a, uchar **b); static int ptr_compare_0(size_t *compare_length, uchar **a, uchar **b); static int ptr_compare_1(size_t *compare_length, uchar **a, uchar **b); static int ptr_compare_2(size_t *compare_length, uchar **a, uchar **b); static int ptr_compare_3(size_t *compare_length, uchar **a, uchar **b); -#endif /* TARGET_OS_SOLARIS */ +#endif /* __sun */ /* Get a pointer to a optimal byte-compare function for a given size */ +#ifdef __sun +qsort2_cmp get_ptr_compare (size_t size __attribute__((unused))) +{ + return (qsort2_cmp) native_compare; +} +#else qsort2_cmp get_ptr_compare (size_t size) { -#ifdef TARGET_OS_SOLARIS - return (qsort2_cmp) native_compare; -#else if (size < 4) return (qsort2_cmp) ptr_compare; switch (size & 3) { @@ -64,8 +67,8 @@ qsort2_cmp get_ptr_compare (size_t size) case 3: return (qsort2_cmp) ptr_compare_3; } return 0; /* Impossible */ -#endif /* TARGET_OS_SOLARIS */ } +#endif /* __sun */ /* @@ -75,6 +78,8 @@ qsort2_cmp get_ptr_compare (size_t size) #define cmp(N) if (first[N] != last[N]) return (int) first[N] - (int) last[N] +#ifndef __sun + static int ptr_compare(size_t *compare_length, uchar **a, uchar **b) { reg3 int length= *compare_length; @@ -177,6 +182,8 @@ static int ptr_compare_3(size_t *compare_length,uchar **a, uchar **b) return (0); } +#endif /* !__sun */ + void my_store_ptr(uchar *buff, size_t pack_length, my_off_t pos) { switch (pack_length) { diff --git a/scripts/fill_help_tables.sql b/scripts/fill_help_tables.sql index 9f527c288e9..d32dfaac408 100644 --- a/scripts/fill_help_tables.sql +++ b/scripts/fill_help_tables.sql @@ -1,3 +1,18 @@ +-- Copyright (C) 2005 MySQL AB +-- +-- 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + -- fill_help_tables.sql - this file is a placeholder to satisfy build dependencies - -- it will be replaced with the appropriate content by the Boostrap script that -- creates the official source distribution. diff --git a/scripts/make_binary_distribution.sh b/scripts/make_binary_distribution.sh index 455bc93e642..c52a6e53db9 100644 --- a/scripts/make_binary_distribution.sh +++ b/scripts/make_binary_distribution.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (C) 2000-2006 MySQL AB +# Copyright (c) 2000, 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 diff --git a/scripts/make_win_bin_dist b/scripts/make_win_bin_dist index 3174d61792a..004ea9f4c3f 100755 --- a/scripts/make_win_bin_dist +++ b/scripts/make_win_bin_dist @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (C) 2006 MySQL AB +# Copyright (c) 2006, 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 diff --git a/scripts/mysql_config.sh b/scripts/mysql_config.sh index 69ec88d6724..67484ec13b7 100644 --- a/scripts/mysql_config.sh +++ b/scripts/mysql_config.sh @@ -92,7 +92,11 @@ plugindir_rel=`echo $plugindir | sed -e "s;^$basedir/;;"` fix_path plugindir $plugindir_rel lib/mysql/plugin lib/plugin pkgincludedir='@pkgincludedir@' -fix_path pkgincludedir include/mysql include +if [ -f "$basedir/include/mysql/mysql.h" ]; then + pkgincludedir="$basedir/include/mysql" +elif [ -f "$basedir/include/mysql.h" ]; then + pkgincludedir="$basedir/include" +fi version='@VERSION@' socket='@MYSQL_UNIX_ADDR@' diff --git a/scripts/mysql_fix_extensions.sh b/scripts/mysql_fix_extensions.sh index 6d4e017f678..74a47fdf4a1 100644 --- a/scripts/mysql_fix_extensions.sh +++ b/scripts/mysql_fix_extensions.sh @@ -1,4 +1,22 @@ #!/usr/bin/perl + +# Copyright (C) 2001 MySQL AB, 2009 Sun Microsystems, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA + # This is a utility for MySQL. It is not needed by any standard part # of MySQL. diff --git a/scripts/mysql_setpermission.sh b/scripts/mysql_setpermission.sh index 5fa6b969e39..433f30dfabb 100644 --- a/scripts/mysql_setpermission.sh +++ b/scripts/mysql_setpermission.sh @@ -1,5 +1,23 @@ #!/usr/bin/perl ## Emacs, this is -*- perl -*- mode? :-) + +# Copyright (C) 2000, 2007 MySQL AB, 2009 Sun Microsystems, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA + ## ## Permission setter for MySQL ## diff --git a/scripts/mysql_system_tables_data.sql b/scripts/mysql_system_tables_data.sql index bc5ffae2063..0d6127d2173 100644 --- a/scripts/mysql_system_tables_data.sql +++ b/scripts/mysql_system_tables_data.sql @@ -1,3 +1,18 @@ +-- Copyright (C) 2007, 2008 MySQL AB +-- +-- 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + -- -- The inital data for system tables of MySQL Server -- diff --git a/scripts/mysql_system_tables_fix.sql b/scripts/mysql_system_tables_fix.sql index 399c42b1b2d..362464d5b60 100644 --- a/scripts/mysql_system_tables_fix.sql +++ b/scripts/mysql_system_tables_fix.sql @@ -1,4 +1,4 @@ --- Copyright (C) 2008, 2010 Oracle and/or its affiliates. All rights reserved. +-- Copyright (C) 2003, 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 diff --git a/scripts/mysql_test_data_timezone.sql b/scripts/mysql_test_data_timezone.sql index e52df2149f2..6bf28148e5e 100644 --- a/scripts/mysql_test_data_timezone.sql +++ b/scripts/mysql_test_data_timezone.sql @@ -1,3 +1,18 @@ +-- Copyright (C) 2007 MySQL AB +-- +-- 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + INSERT INTO time_zone_name (Name, Time_Zone_id) VALUES ('MET', 1), ('UTC', 2), ('Universal', 2), ('Europe/Moscow',3), ('leap/Europe/Moscow',4), ('Japan', 5); INSERT INTO time_zone (Time_zone_id, Use_leap_seconds) VALUES (1,'N'), (2,'N'), (3,'N'), (4,'Y'), (5,'N'); INSERT INTO time_zone_transition (Time_zone_id, Transition_time, Transition_type_id) VALUES (1, -1693706400, 0) ,(1, -1680483600, 1) ,(1, -1663455600, 2) ,(1, -1650150000, 3) ,(1, -1632006000, 2) ,(1, -1618700400, 3) ,(1, -938905200, 2) ,(1, -857257200, 3) ,(1, -844556400, 2) ,(1, -828226800, 3) ,(1, -812502000, 2) ,(1, -796777200, 3) ,(1, 228877200, 2) ,(1, 243997200, 3) ,(1, 260326800, 2) ,(1, 276051600, 3) ,(1, 291776400, 2) ,(1, 307501200, 3) ,(1, 323830800, 2) ,(1, 338950800, 3) ,(1, 354675600, 2) ,(1, 370400400, 3) ,(1, 386125200, 2) ,(1, 401850000, 3) ,(1, 417574800, 2) ,(1, 433299600, 3) ,(1, 449024400, 2) ,(1, 465354000, 3) ,(1, 481078800, 2) ,(1, 496803600, 3) ,(1, 512528400, 2) ,(1, 528253200, 3) ,(1, 543978000, 2) ,(1, 559702800, 3) ,(1, 575427600, 2) ,(1, 591152400, 3) ,(1, 606877200, 2) ,(1, 622602000, 3) ,(1, 638326800, 2) ,(1, 654656400, 3) ,(1, 670381200, 2) ,(1, 686106000, 3) ,(1, 701830800, 2) ,(1, 717555600, 3) ,(1, 733280400, 2) ,(1, 749005200, 3) ,(1, 764730000, 2) ,(1, 780454800, 3) ,(1, 796179600, 2) ,(1, 811904400, 3) ,(1, 828234000, 2) ,(1, 846378000, 3) ,(1, 859683600, 2) ,(1, 877827600, 3) ,(1, 891133200, 2) ,(1, 909277200, 3) ,(1, 922582800, 2) ,(1, 941331600, 3) ,(1, 954032400, 2) ,(1, 972781200, 3) ,(1, 985482000, 2) ,(1, 1004230800, 3) ,(1, 1017536400, 2) ,(1, 1035680400, 3) ,(1, 1048986000, 2) ,(1, 1067130000, 3) ,(1, 1080435600, 2) ,(1, 1099184400, 3) ,(1, 1111885200, 2) ,(1, 1130634000, 3) ,(1, 1143334800, 2) ,(1, 1162083600, 3) ,(1, 1174784400, 2) ,(1, 1193533200, 3) ,(1, 1206838800, 2) ,(1, 1224982800, 3) ,(1, 1238288400, 2) ,(1, 1256432400, 3) ,(1, 1269738000, 2) ,(1, 1288486800, 3) ,(1, 1301187600, 2) ,(1, 1319936400, 3) ,(1, 1332637200, 2) ,(1, 1351386000, 3) ,(1, 1364691600, 2) ,(1, 1382835600, 3) ,(1, 1396141200, 2) ,(1, 1414285200, 3) ,(1, 1427590800, 2) ,(1, 1445734800, 3) ,(1, 1459040400, 2) ,(1, 1477789200, 3) ,(1, 1490490000, 2) ,(1, 1509238800, 3) ,(1, 1521939600, 2) ,(1, 1540688400, 3) ,(1, 1553994000, 2) ,(1, 1572138000, 3) ,(1, 1585443600, 2) ,(1, 1603587600, 3) ,(1, 1616893200, 2) ,(1, 1635642000, 3) ,(1, 1648342800, 2) ,(1, 1667091600, 3) ,(1, 1679792400, 2) ,(1, 1698541200, 3) ,(1, 1711846800, 2) ,(1, 1729990800, 3) ,(1, 1743296400, 2) ,(1, 1761440400, 3) ,(1, 1774746000, 2) ,(1, 1792890000, 3) ,(1, 1806195600, 2) ,(1, 1824944400, 3) ,(1, 1837645200, 2) ,(1, 1856394000, 3) ,(1, 1869094800, 2) ,(1, 1887843600, 3) ,(1, 1901149200, 2) ,(1, 1919293200, 3) ,(1, 1932598800, 2) ,(1, 1950742800, 3) ,(1, 1964048400, 2) ,(1, 1982797200, 3) ,(1, 1995498000, 2) ,(1, 2014246800, 3) ,(1, 2026947600, 2) ,(1, 2045696400, 3) ,(1, 2058397200, 2) ,(1, 2077146000, 3) ,(1, 2090451600, 2) ,(1, 2108595600, 3) ,(1, 2121901200, 2) ,(1, 2140045200, 3) ,(3, -1688265000, 2) ,(3, -1656819048, 1) ,(3, -1641353448, 2) ,(3, -1627965048, 3) ,(3, -1618716648, 1) ,(3, -1596429048, 3) ,(3, -1593829848, 5) ,(3, -1589860800, 4) ,(3, -1542427200, 5) ,(3, -1539493200, 6) ,(3, -1525323600, 5) ,(3, -1522728000, 4) ,(3, -1491188400, 7) ,(3, -1247536800, 4) ,(3, 354920400, 5) ,(3, 370728000, 4) ,(3, 386456400, 5) ,(3, 402264000, 4) ,(3, 417992400, 5) ,(3, 433800000, 4) ,(3, 449614800, 5) ,(3, 465346800, 8) ,(3, 481071600, 9) ,(3, 496796400, 8) ,(3, 512521200, 9) ,(3, 528246000, 8) ,(3, 543970800, 9) ,(3, 559695600, 8) ,(3, 575420400, 9) ,(3, 591145200, 8) ,(3, 606870000, 9) ,(3, 622594800, 8) ,(3, 638319600, 9) ,(3, 654649200, 8) ,(3, 670374000, 10) ,(3, 686102400, 11) ,(3, 695779200, 8) ,(3, 701812800, 5) ,(3, 717534000, 4) ,(3, 733273200, 9) ,(3, 748998000, 8) ,(3, 764722800, 9) ,(3, 780447600, 8) ,(3, 796172400, 9) ,(3, 811897200, 8) ,(3, 828226800, 9) ,(3, 846370800, 8) ,(3, 859676400, 9) ,(3, 877820400, 8) ,(3, 891126000, 9) ,(3, 909270000, 8) ,(3, 922575600, 9) ,(3, 941324400, 8) ,(3, 954025200, 9) ,(3, 972774000, 8) ,(3, 985474800, 9) ,(3, 1004223600, 8) ,(3, 1017529200, 9) ,(3, 1035673200, 8) ,(3, 1048978800, 9) ,(3, 1067122800, 8) ,(3, 1080428400, 9) ,(3, 1099177200, 8) ,(3, 1111878000, 9) ,(3, 1130626800, 8) ,(3, 1143327600, 9) ,(3, 1162076400, 8) ,(3, 1174777200, 9) ,(3, 1193526000, 8) ,(3, 1206831600, 9) ,(3, 1224975600, 8) ,(3, 1238281200, 9) ,(3, 1256425200, 8) ,(3, 1269730800, 9) ,(3, 1288479600, 8) ,(3, 1301180400, 9) ,(3, 1319929200, 8) ,(3, 1332630000, 9) ,(3, 1351378800, 8) ,(3, 1364684400, 9) ,(3, 1382828400, 8) ,(3, 1396134000, 9) ,(3, 1414278000, 8) ,(3, 1427583600, 9) ,(3, 1445727600, 8) ,(3, 1459033200, 9) ,(3, 1477782000, 8) ,(3, 1490482800, 9) ,(3, 1509231600, 8) ,(3, 1521932400, 9) ,(3, 1540681200, 8) ,(3, 1553986800, 9) ,(3, 1572130800, 8) ,(3, 1585436400, 9) ,(3, 1603580400, 8) ,(3, 1616886000, 9) ,(3, 1635634800, 8) ,(3, 1648335600, 9) ,(3, 1667084400, 8) ,(3, 1679785200, 9) ,(3, 1698534000, 8) ,(3, 1711839600, 9) ,(3, 1729983600, 8) ,(3, 1743289200, 9) ,(3, 1761433200, 8) ,(3, 1774738800, 9) ,(3, 1792882800, 8) ,(3, 1806188400, 9) ,(3, 1824937200, 8) ,(3, 1837638000, 9) ,(3, 1856386800, 8) ,(3, 1869087600, 9) ,(3, 1887836400, 8) ,(3, 1901142000, 9) ,(3, 1919286000, 8) ,(3, 1932591600, 9) ,(3, 1950735600, 8) ,(3, 1964041200, 9) ,(3, 1982790000, 8) ,(3, 1995490800, 9) ,(3, 2014239600, 8) ,(3, 2026940400, 9) ,(3, 2045689200, 8) ,(3, 2058390000, 9) ,(3, 2077138800, 8) ,(3, 2090444400, 9) ,(3, 2108588400, 8) ,(3, 2121894000, 9) ,(3, 2140038000, 8) ,(4, -1688265000, 2) ,(4, -1656819048, 1) ,(4, -1641353448, 2) ,(4, -1627965048, 3) ,(4, -1618716648, 1) ,(4, -1596429048, 3) ,(4, -1593829848, 5) ,(4, -1589860800, 4) ,(4, -1542427200, 5) ,(4, -1539493200, 6) ,(4, -1525323600, 5) ,(4, -1522728000, 4) ,(4, -1491188400, 7) ,(4, -1247536800, 4) ,(4, 354920409, 5) ,(4, 370728010, 4) ,(4, 386456410, 5) ,(4, 402264011, 4) ,(4, 417992411, 5) ,(4, 433800012, 4) ,(4, 449614812, 5) ,(4, 465346812, 8) ,(4, 481071612, 9) ,(4, 496796413, 8) ,(4, 512521213, 9) ,(4, 528246013, 8) ,(4, 543970813, 9) ,(4, 559695613, 8) ,(4, 575420414, 9) ,(4, 591145214, 8) ,(4, 606870014, 9) ,(4, 622594814, 8) ,(4, 638319615, 9) ,(4, 654649215, 8) ,(4, 670374016, 10) ,(4, 686102416, 11) ,(4, 695779216, 8) ,(4, 701812816, 5) ,(4, 717534017, 4) ,(4, 733273217, 9) ,(4, 748998018, 8) ,(4, 764722818, 9) ,(4, 780447619, 8) ,(4, 796172419, 9) ,(4, 811897219, 8) ,(4, 828226820, 9) ,(4, 846370820, 8) ,(4, 859676420, 9) ,(4, 877820421, 8) ,(4, 891126021, 9) ,(4, 909270021, 8) ,(4, 922575622, 9) ,(4, 941324422, 8) ,(4, 954025222, 9) ,(4, 972774022, 8) ,(4, 985474822, 9) ,(4, 1004223622, 8) ,(4, 1017529222, 9) ,(4, 1035673222, 8) ,(4, 1048978822, 9) ,(4, 1067122822, 8) ,(4, 1080428422, 9) ,(4, 1099177222, 8) ,(4, 1111878022, 9) ,(4, 1130626822, 8) ,(4, 1143327622, 9) ,(4, 1162076422, 8) ,(4, 1174777222, 9) ,(4, 1193526022, 8) ,(4, 1206831622, 9) ,(4, 1224975622, 8) ,(4, 1238281222, 9) ,(4, 1256425222, 8) ,(4, 1269730822, 9) ,(4, 1288479622, 8) ,(4, 1301180422, 9) ,(4, 1319929222, 8) ,(4, 1332630022, 9) ,(4, 1351378822, 8) ,(4, 1364684422, 9) ,(4, 1382828422, 8) ,(4, 1396134022, 9) ,(4, 1414278022, 8) ,(4, 1427583622, 9) ,(4, 1445727622, 8) ,(4, 1459033222, 9) ,(4, 1477782022, 8) ,(4, 1490482822, 9) ,(4, 1509231622, 8) ,(4, 1521932422, 9) ,(4, 1540681222, 8) ,(4, 1553986822, 9) ,(4, 1572130822, 8) ,(4, 1585436422, 9) ,(4, 1603580422, 8) ,(4, 1616886022, 9) ,(4, 1635634822, 8) ,(4, 1648335622, 9) ,(4, 1667084422, 8) ,(4, 1679785222, 9) ,(4, 1698534022, 8) ,(4, 1711839622, 9) ,(4, 1729983622, 8) ,(4, 1743289222, 9) ,(4, 1761433222, 8) ,(4, 1774738822, 9) ,(4, 1792882822, 8) ,(4, 1806188422, 9) ,(4, 1824937222, 8) ,(4, 1837638022, 9) ,(4, 1856386822, 8) ,(4, 1869087622, 9) ,(4, 1887836422, 8) ,(4, 1901142022, 9) ,(4, 1919286022, 8) ,(4, 1932591622, 9) ,(4, 1950735622, 8) ,(4, 1964041222, 9) ,(4, 1982790022, 8) ,(4, 1995490822, 9) ,(4, 2014239622, 8) ,(4, 2026940422, 9) ,(4, 2045689222, 8) ,(4, 2058390022, 9) ,(4, 2077138822, 8) ,(4, 2090444422, 9) ,(4, 2108588422, 8) ,(4, 2121894022, 9) ,(4, 2140038022, 8) ,(5, -1009875600, 1); diff --git a/scripts/mysqlaccess.sh b/scripts/mysqlaccess.sh index 0153a3afa7c..4e208e6c16e 100644 --- a/scripts/mysqlaccess.sh +++ b/scripts/mysqlaccess.sh @@ -1,4 +1,22 @@ #!/usr/bin/perl + +# Copyright (C) 2000, 2007 MySQL AB, 2009 Sun Microsystems, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA + # **************************** package MySQLaccess; #use strict; diff --git a/scripts/mysqld_multi.sh b/scripts/mysqld_multi.sh index 588c48fae4c..bab076b019b 100644 --- a/scripts/mysqld_multi.sh +++ b/scripts/mysqld_multi.sh @@ -1,5 +1,22 @@ #!/usr/bin/perl +# Copyright (C) 2000, 2007 MySQL AB, 2008, 2009 Sun Microsystems, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA + use Getopt::Long; use POSIX qw(strftime getcwd); diff --git a/scripts/mysqldumpslow.sh b/scripts/mysqldumpslow.sh index 8580b8e6203..9ec3802a2e4 100644 --- a/scripts/mysqldumpslow.sh +++ b/scripts/mysqldumpslow.sh @@ -1,4 +1,22 @@ #!/usr/bin/perl + +# Copyright (C) 2000, 2007 MySQL AB, 2009 Sun Microsystems, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA + # mysqldumpslow - parse and summarize the MySQL slow query log # Original version by Tim Bunce, sometime in 2000. diff --git a/scripts/mysqlhotcopy.sh b/scripts/mysqlhotcopy.sh index a08db77ac56..5ceaebfbae2 100644 --- a/scripts/mysqlhotcopy.sh +++ b/scripts/mysqlhotcopy.sh @@ -1,5 +1,22 @@ #!/usr/bin/perl +# Copyright (C) 2000, 2008 MySQL AB, 2009 Sun Microsystems, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA + use strict; use Getopt::Long; use Data::Dumper; diff --git a/sql/field.cc b/sql/field.cc index e5cae9ea8e3..50db2da97e4 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2010 Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 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 diff --git a/sql/gen_lex_hash.cc b/sql/gen_lex_hash.cc index a9c03f7e2a7..d442d029ba0 100644 --- a/sql/gen_lex_hash.cc +++ b/sql/gen_lex_hash.cc @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2006 MySQL AB +/* Copyright (C) 2000-2007 MySQL AB, 2009 Sun Microsystems, Inc. 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 @@ -375,7 +375,7 @@ int main(int argc,char **argv) printf("/*\n\n Do " "not " "edit " "this " "file " "directly!\n\n*/\n"); printf("\ -/* Copyright 2001-2008 MySQL AB, 2008 Sun Microsystems, Inc.\n\ +/* Copyright (C) 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc.\n\ \n\ This program is free software; you can redistribute it and/or modify\n\ it under the terms of the GNU General Public License as published by\n\ diff --git a/sql/item.cc b/sql/item.cc index b1e453121bd..18a88d64470 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -5839,6 +5839,10 @@ bool Item::send(Protocol *protocol, String *buffer) String *res; if ((res=val_str(buffer))) result= protocol->store(res->ptr(),res->length(),res->charset()); + else + { + DBUG_ASSERT(null_value); + } break; } case MYSQL_TYPE_TINY: diff --git a/sql/item.h b/sql/item.h index 2249cc9dd4a..6d10c6a6076 100644 --- a/sql/item.h +++ b/sql/item.h @@ -1,7 +1,7 @@ #ifndef ITEM_INCLUDED #define ITEM_INCLUDED -/* Copyright (c) 2000, 2010 Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 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 diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index 737fa02bcd2..fe8ff3a74d0 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2010 Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 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 diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index f9851011563..b6928d63ea0 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -1,7 +1,7 @@ #ifndef ITEM_CMPFUNC_INCLUDED #define ITEM_CMPFUNC_INCLUDED -/* Copyright (c) 2000, 2010 Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 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 diff --git a/sql/item_func.cc b/sql/item_func.cc index ecc4f30e25d..d959e59337d 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -1,4 +1,4 @@ -/* Copyright 2000-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc. +/* Copyright (c) 2000, 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 @@ -1543,9 +1543,14 @@ void Item_func_div::fix_length_and_dec() { decimals=max(args[0]->decimals,args[1]->decimals)+prec_increment; set_if_smaller(decimals, NOT_FIXED_DEC); - max_length=args[0]->max_length - args[0]->decimals + decimals; uint tmp=float_length(decimals); - set_if_smaller(max_length,tmp); + if (decimals == NOT_FIXED_DEC) + max_length= tmp; + else + { + max_length=args[0]->max_length - args[0]->decimals + decimals; + set_if_smaller(max_length,tmp); + } break; } case INT_RESULT: diff --git a/sql/item_func.h b/sql/item_func.h index 63662d97019..1139442fe76 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -1,7 +1,7 @@ #ifndef ITEM_FUNC_INCLUDED #define ITEM_FUNC_INCLUDED -/* Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. +/* Copyright (c) 2000, 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 diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc index 7ed24a03025..9efe2a54f8b 100644 --- a/sql/item_subselect.cc +++ b/sql/item_subselect.cc @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 MySQL AB +/* Copyright (c) 2002, 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 diff --git a/sql/item_sum.cc b/sql/item_sum.cc index 107634e196d..0fd526184c4 100644 --- a/sql/item_sum.cc +++ b/sql/item_sum.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2010 Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 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 @@ -1196,8 +1196,10 @@ void Item_sum_hybrid::setup_hybrid(Item *item, Item *value_arg) value= Item_cache::get_cache(item); value->setup(item); value->store(value_arg); + arg_cache= Item_cache::get_cache(item); + arg_cache->setup(item); cmp= new Arg_comparator(); - cmp->set_cmp_func(this, args, (Item**)&value, FALSE); + cmp->set_cmp_func(this, (Item**)&arg_cache, (Item**)&value, FALSE); collation.set(item->collation); } @@ -1966,11 +1968,11 @@ Item *Item_sum_min::copy_or_same(THD* thd) bool Item_sum_min::add() { /* args[0] < value */ - int res= cmp->compare(); - if (!args[0]->null_value && - (null_value || res < 0)) + arg_cache->cache_value(); + if (!arg_cache->null_value && + (null_value || cmp->compare() < 0)) { - value->store(args[0]); + value->store(arg_cache); value->cache_value(); null_value= 0; } @@ -1989,11 +1991,11 @@ Item *Item_sum_max::copy_or_same(THD* thd) bool Item_sum_max::add() { /* args[0] > value */ - int res= cmp->compare(); - if (!args[0]->null_value && - (null_value || res > 0)) + arg_cache->cache_value(); + if (!arg_cache->null_value && + (null_value || cmp->compare() > 0)) { - value->store(args[0]); + value->store(arg_cache); value->cache_value(); null_value= 0; } diff --git a/sql/item_sum.h b/sql/item_sum.h index 3ea79fb8cee..634d593935f 100644 --- a/sql/item_sum.h +++ b/sql/item_sum.h @@ -994,7 +994,7 @@ class Item_cache; class Item_sum_hybrid :public Item_sum { protected: - Item_cache *value; + Item_cache *value, *arg_cache; Arg_comparator *cmp; Item_result hybrid_type; enum_field_types hybrid_field_type; @@ -1003,14 +1003,14 @@ protected: public: Item_sum_hybrid(Item *item_par,int sign) - :Item_sum(item_par), value(0), cmp(0), + :Item_sum(item_par), value(0), arg_cache(0), cmp(0), hybrid_type(INT_RESULT), hybrid_field_type(MYSQL_TYPE_LONGLONG), cmp_sign(sign), was_values(TRUE) { collation.set(&my_charset_bin); } Item_sum_hybrid(THD *thd, Item_sum_hybrid *item) - :Item_sum(thd, item), value(item->value), hybrid_type(item->hybrid_type), - hybrid_field_type(item->hybrid_field_type), cmp_sign(item->cmp_sign), - was_values(item->was_values) + :Item_sum(thd, item), value(item->value), arg_cache(0), + hybrid_type(item->hybrid_type), hybrid_field_type(item->hybrid_field_type), + cmp_sign(item->cmp_sign), was_values(item->was_values) { } bool fix_fields(THD *, Item **); void setup_hybrid(Item *item, Item *value_arg); diff --git a/sql/log_event.cc b/sql/log_event.cc index b01b1766a9a..b9da915ba96 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -2969,7 +2969,12 @@ void Query_log_event::print_query_header(IO_CACHE* file, error_code); } - if (!(flags & LOG_EVENT_SUPPRESS_USE_F) && db) + if ((flags & LOG_EVENT_SUPPRESS_USE_F)) + { + if (!is_trans_keyword()) + print_event_info->db[0]= '\0'; + } + else if (db) { different_db= memcmp(print_event_info->db, db, db_len + 1); if (different_db) @@ -7740,6 +7745,14 @@ int Rows_log_event::do_apply_event(Relay_log_info const *rli) // Do event specific preparations error= do_before_row_operations(rli); + /* + Bug#56662 Assertion failed: next_insert_id == 0, file handler.cc + Don't allow generation of auto_increment value when processing + rows event by setting 'MODE_NO_AUTO_VALUE_ON_ZERO'. + */ + ulong saved_sql_mode= thd->variables.sql_mode; + thd->variables.sql_mode= MODE_NO_AUTO_VALUE_ON_ZERO; + // row processing loop while (error == 0 && m_curr_row < m_rows_end) @@ -7802,6 +7815,11 @@ int Rows_log_event::do_apply_event(Relay_log_info const *rli) thd->transaction.stmt.modified_non_trans_table= TRUE; } // row processing loop + /* + Restore the sql_mode after the rows event is processed. + */ + thd->variables.sql_mode= saved_sql_mode; + {/** The following failure injecion works in cooperation with tests setting @@global.debug= 'd,stop_slave_middle_group'. @@ -8765,16 +8783,11 @@ Rows_log_event::write_row(const Relay_log_info *const rli, int UNINIT_VAR(keynum); auto_afree_ptr key(NULL); - /* fill table->record[0] with default values */ - bool abort_on_warnings= (rli->sql_thd->variables.sql_mode & - (MODE_STRICT_TRANS_TABLES | MODE_STRICT_ALL_TABLES)); - if ((error= prepare_record(table, m_width, - table->file->ht->db_type != DB_TYPE_NDBCLUSTER, - abort_on_warnings, m_curr_row == m_rows_buf))) - DBUG_RETURN(error); - + prepare_record(table, m_width, + table->file->ht->db_type != DB_TYPE_NDBCLUSTER); + /* unpack row into table->record[0] */ - if ((error= unpack_current_row(rli, abort_on_warnings))) + if ((error= unpack_current_row(rli))) DBUG_RETURN(error); if (m_curr_row == m_rows_buf) @@ -9618,11 +9631,9 @@ Update_rows_log_event::do_exec_row(const Relay_log_info *const rli) store_record(m_table,record[1]); - bool abort_on_warnings= (rli->sql_thd->variables.sql_mode & - (MODE_STRICT_TRANS_TABLES | MODE_STRICT_ALL_TABLES)); m_curr_row= m_curr_row_end; /* this also updates m_curr_row_end */ - if ((error= unpack_current_row(rli, abort_on_warnings))) + if ((error= unpack_current_row(rli))) return error; /* diff --git a/sql/log_event.h b/sql/log_event.h index a4d76e692a8..1aa4af6c751 100644 --- a/sql/log_event.h +++ b/sql/log_event.h @@ -3667,16 +3667,13 @@ protected: int write_row(const Relay_log_info *const, const bool); // Unpack the current row into m_table->record[0] - int unpack_current_row(const Relay_log_info *const rli, - const bool abort_on_warning= TRUE) - { + int unpack_current_row(const Relay_log_info *const rli) + { DBUG_ASSERT(m_table); - bool first_row= (m_curr_row == m_rows_buf); ASSERT_OR_RETURN_ERROR(m_curr_row < m_rows_end, HA_ERR_CORRUPT_EVENT); int const result= ::unpack_row(rli, m_table, m_width, m_curr_row, &m_cols, - &m_curr_row_end, &m_master_reclength, - abort_on_warning, first_row); + &m_curr_row_end, &m_master_reclength); if (m_curr_row_end > m_rows_end) my_error(ER_SLAVE_CORRUPT_EVENT, MYF(0)); ASSERT_OR_RETURN_ERROR(m_curr_row_end <= m_rows_end, HA_ERR_CORRUPT_EVENT); diff --git a/sql/message.h b/sql/message.h index 97d039352b4..102d38091e7 100644 --- a/sql/message.h +++ b/sql/message.h @@ -1,5 +1,19 @@ #ifndef MESSAGE_INCLUDED #define MESSAGE_INCLUDED +/* Copyright 2008 Sun Microsystems, Inc. + + 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* To change or add messages mysqld writes to the Windows error log, run diff --git a/sql/my_decimal.cc b/sql/my_decimal.cc index 8a31cec6721..a5b60739b26 100644 --- a/sql/my_decimal.cc +++ b/sql/my_decimal.cc @@ -13,6 +13,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include #include "sql_priv.h" #include diff --git a/sql/mysqld.cc b/sql/mysqld.cc index d56b6715d6e..c3afa1a5399 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -3247,8 +3247,8 @@ static int init_common_variables() size_t *pagesize = (size_t *) malloc(sizeof(size_t) * nelem); if (pagesize != NULL && getpagesizes(pagesize, nelem) > 0) { - size_t i, max_page_size= 0; - for (i= 0; i < nelem; i++) + size_t max_page_size= 0; + for (int i= 0; i < nelem; i++) { if (pagesize[i] > max_page_size && pagesize[i] <= max_desired_page_size) diff --git a/sql/net_serv.cc b/sql/net_serv.cc index 488e27296b6..ab88e87be69 100644 --- a/sql/net_serv.cc +++ b/sql/net_serv.cc @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 MySQL AB +/* Copyright (c) 2000, 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 diff --git a/sql/opt_range.cc b/sql/opt_range.cc index f39037e9db9..4cdabab31ae 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -1,4 +1,4 @@ -/* Copyright 2000-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc. +/* Copyright (c) 2000, 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 @@ -8278,7 +8278,7 @@ int QUICK_INDEX_MERGE_SELECT::read_keys_and_merge() if (unique == NULL) { - DBUG_EXECUTE_IF("index_merge_may_not_create_a_Unique", abort(); ); + DBUG_EXECUTE_IF("index_merge_may_not_create_a_Unique", DBUG_ABORT(); ); DBUG_EXECUTE_IF("only_one_Unique_may_be_created", DBUG_SET("+d,index_merge_may_not_create_a_Unique"); ); diff --git a/sql/opt_range.h b/sql/opt_range.h index 6da4d1c2776..caff3c622b8 100644 --- a/sql/opt_range.h +++ b/sql/opt_range.h @@ -336,6 +336,13 @@ public: */ virtual bool is_keys_used(const MY_BITMAP *fields); + /** + Simple sanity check that the quick select has been set up + correctly. Function is overridden by quick selects that merge + indices. + */ + virtual bool is_valid() { return index != MAX_KEY; }; + /* rowid of last row retrieved by this quick select. This is used only when doing ROR-index_merge selects @@ -556,6 +563,22 @@ public: bool clustered_pk_range() { return test(pk_quick_select); } + virtual bool is_valid() + { + List_iterator_fast it(quick_selects); + QUICK_RANGE_SELECT *quick; + bool valid= true; + while ((quick= it++)) + { + if (!quick->is_valid()) + { + valid= false; + break; + } + } + return valid; + } + /* used to get rows collected in Unique */ READ_RECORD read_record; }; @@ -608,6 +631,22 @@ public: */ List quick_selects; + virtual bool is_valid() + { + List_iterator_fast it(quick_selects); + QUICK_RANGE_SELECT *quick; + bool valid= true; + while ((quick= it++)) + { + if (!quick->is_valid()) + { + valid= false; + break; + } + } + return valid; + } + /* Merged quick select that uses Clustered PK, if there is one. This quick select is not used for row retrieval, it is used for row retrieval. @@ -658,6 +697,22 @@ public: List quick_selects; /* Merged quick selects */ + virtual bool is_valid() + { + List_iterator_fast it(quick_selects); + QUICK_SELECT_I *quick; + bool valid= true; + while ((quick= it++)) + { + if (!quick->is_valid()) + { + valid= false; + break; + } + } + return valid; + } + QUEUE queue; /* Priority queue for merge operation */ MEM_ROOT alloc; /* Memory pool for this and merged quick selects data. */ diff --git a/sql/rpl_record.cc b/sql/rpl_record.cc index dd16318303d..5a7984430ea 100644 --- a/sql/rpl_record.cc +++ b/sql/rpl_record.cc @@ -185,8 +185,7 @@ int unpack_row(Relay_log_info const *rli, TABLE *table, uint const colcnt, uchar const *const row_data, MY_BITMAP const *cols, - uchar const **const row_end, ulong *const master_reclength, - const bool abort_on_warning, const bool first_row) + uchar const **const row_end, ulong *const master_reclength) { DBUG_ENTER("unpack_row"); DBUG_ASSERT(row_data); @@ -285,22 +284,9 @@ unpack_row(Relay_log_info const *rli, } else { - MYSQL_ERROR::enum_warning_level error_type= - MYSQL_ERROR::WARN_LEVEL_NOTE; - if (abort_on_warning && (table->file->has_transactions() || - first_row)) - { - error = HA_ERR_ROWS_EVENT_APPLY; - error_type= MYSQL_ERROR::WARN_LEVEL_ERROR; - } - else - { - f->set_default(); - error_type= MYSQL_ERROR::WARN_LEVEL_WARN; - } - push_warning_printf(current_thd, error_type, - ER_BAD_NULL_ERROR, - ER(ER_BAD_NULL_ERROR), + f->set_default(); + push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN, + ER_BAD_NULL_ERROR, ER(ER_BAD_NULL_ERROR), f->field_name); } } @@ -420,20 +406,13 @@ unpack_row(Relay_log_info const *rli, @param skip Number of columns for which default/nullable check should be skipped. @param check Specifies if lack of default error needs checking. - @param abort_on_warning - Controls how to react on lack of a field's default. - The parameter mimics the master side one for - @c check_that_all_fields_are_given_values. - + @returns 0 on success or a handler level error code */ -int prepare_record(TABLE *const table, - const uint skip, const bool check, - const bool abort_on_warning, const bool first_row) +int prepare_record(TABLE *const table, const uint skip, const bool check) { DBUG_ENTER("prepare_record"); - int error= 0; restore_record(table, s->default_values); /* @@ -456,28 +435,16 @@ int prepare_record(TABLE *const table, if ((f->flags & NO_DEFAULT_VALUE_FLAG) && (f->real_type() != MYSQL_TYPE_ENUM)) { - - MYSQL_ERROR::enum_warning_level error_type= - MYSQL_ERROR::WARN_LEVEL_NOTE; - if (abort_on_warning && (table->file->has_transactions() || - first_row)) - { - error= HA_ERR_ROWS_EVENT_APPLY; - error_type= MYSQL_ERROR::WARN_LEVEL_ERROR; - } - else - { - f->set_default(); - error_type= MYSQL_ERROR::WARN_LEVEL_WARN; - } - push_warning_printf(current_thd, error_type, + f->set_default(); + push_warning_printf(current_thd, + MYSQL_ERROR::WARN_LEVEL_WARN, ER_NO_DEFAULT_FOR_FIELD, ER(ER_NO_DEFAULT_FOR_FIELD), f->field_name); } } - DBUG_RETURN(error); + DBUG_RETURN(0); } #endif // HAVE_REPLICATION diff --git a/sql/rpl_record.h b/sql/rpl_record.h index 9b3829a435e..104d77738f1 100644 --- a/sql/rpl_record.h +++ b/sql/rpl_record.h @@ -32,13 +32,10 @@ size_t pack_row(TABLE* table, MY_BITMAP const* cols, int unpack_row(Relay_log_info const *rli, TABLE *table, uint const colcnt, uchar const *const row_data, MY_BITMAP const *cols, - uchar const **const row_end, ulong *const master_reclength, - const bool abort_on_warning= TRUE, const bool first_row= TRUE); + uchar const **const row_end, ulong *const master_reclength); // Fill table's record[0] with default values. -int prepare_record(TABLE *const table, const uint skip, const bool check, - const bool abort_on_warning= TRUE, - const bool first_row= TRUE); +int prepare_record(TABLE *const table, const uint skip, const bool check); #endif #endif diff --git a/sql/set_var.cc b/sql/set_var.cc index 4313dcce917..27865aee3c2 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -1,4 +1,4 @@ -/* Copyright 2000-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc. +/* Copyright (c) 2002, 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 diff --git a/sql/set_var.h b/sql/set_var.h index 2972b430e48..52679aa636c 100644 --- a/sql/set_var.h +++ b/sql/set_var.h @@ -1,6 +1,6 @@ #ifndef SET_VAR_INCLUDED #define SET_VAR_INCLUDED -/* Copyright (C) 2000-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc. +/* Copyright (c) 2002, 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 diff --git a/sql/share/charsets/languages.html b/sql/share/charsets/languages.html index 6d1a8aafc5c..76af973113e 100644 --- a/sql/share/charsets/languages.html +++ b/sql/share/charsets/languages.html @@ -1,4 +1,20 @@ #!/bin/sh + +# Copyright (C) 2003 MySQL AB +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + #
 (
 echo "DROP TABLE lang;"
diff --git a/sql/sql_audit.h b/sql/sql_audit.h
index d676c3974bc..da44c4a023b 100644
--- a/sql/sql_audit.h
+++ b/sql/sql_audit.h
@@ -17,6 +17,8 @@
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
 
+#include 
+
 #include 
 #include "sql_class.h"
 
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index 82302d9da30..9d75af5734a 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -1,4 +1,4 @@
-/* Copyright 2000-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc.
+/* Copyright (c) 2000, 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
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index c4aa4ba7efb..c058e66df97 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -3007,7 +3007,7 @@ void Security_context::init()
 {
   host= user= ip= external_user= 0;
   host_or_ip= "connecting host";
-  priv_user[0]= priv_host[0]= '\0';
+  priv_user[0]= priv_host[0]= proxy_user[0]= '\0';
   master_access= 0;
 #ifndef NO_EMBEDDED_ACCESS_CHECKS
   db_access= NO_ACCESS;
diff --git a/sql/sql_class.h b/sql/sql_class.h
index b8e7b685108..8b05497388e 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc.
+/* Copyright (c) 2000, 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
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 188fd6bda53..2086100db98 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -1,4 +1,4 @@
-/* Copyright 2000-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc.
+/* Copyright (c) 2000, 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
diff --git a/sql/sql_plugin.h b/sql/sql_plugin.h
index 0cbd5a519c1..1b7838ea085 100644
--- a/sql/sql_plugin.h
+++ b/sql/sql_plugin.h
@@ -16,6 +16,8 @@
 #ifndef _sql_plugin_h
 #define _sql_plugin_h
 
+#include 
+
 /*
   the following #define adds server-only members to enum_mysql_show_type,
   that is defined in plugin.h
diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc
index f319c0fdd8b..64f252d11d3 100644
--- a/sql/sql_prepare.cc
+++ b/sql/sql_prepare.cc
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-2002 MySQL AB, 2008-2009 Sun Microsystems, Inc
+/* Copyright (c) 2002, 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
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 6e42b65175a..fc25e8ee0fa 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2010 Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -6504,6 +6504,7 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond)
               ((tab->type != JT_CONST && tab->type != JT_REF) ||
                (uint)tab->ref.key == tab->quick->index))
           {
+            DBUG_ASSERT(tab->quick->is_valid());
 	    sel->quick=tab->quick;		// Use value from get_quick_...
 	    sel->quick_keys.clear_all();
 	    sel->needed_reg.clear_all();
@@ -10719,6 +10720,7 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List &fields,
 	 (ha_base_keytype) key_part_info->type == HA_KEYTYPE_VARTEXT1 ||
 	 (ha_base_keytype) key_part_info->type == HA_KEYTYPE_VARTEXT2) ?
 	0 : FIELDFLAG_BINARY;
+      key_part_info->key_part_flag= 0;
       if (!using_unique_constraint)
       {
 	cur_group->buff=(char*) group_buff;
diff --git a/sql/sql_select.h b/sql/sql_select.h
index 93885e23f76..bdb9d1a315c 100644
--- a/sql/sql_select.h
+++ b/sql/sql_select.h
@@ -1,7 +1,7 @@
 #ifndef SQL_SELECT_INCLUDED
 #define SQL_SELECT_INCLUDED
 
-/* Copyright (C) 2000-2006 MySQL AB
+/* Copyright (c) 2000, 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
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index 0421cc35c5d..5309713cc13 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -1,4 +1,4 @@
-/* Copyright 2000, 2010 Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -2255,7 +2255,7 @@ static bool show_status_array(THD *thd, const char *wild,
           end= int10_to_str(*(long*) value, buff, 10);
           break;
         case SHOW_LONGLONG_STATUS:
-          value= ((char *) status_var + (ulonglong) value);
+          value= ((char *) status_var + (ulong) value);
           /* fall through */
         case SHOW_LONGLONG:
           end= longlong10_to_str(*(longlong*) value, buff, 10);
diff --git a/sql/sql_update.cc b/sql/sql_update.cc
index 082c603bb5a..08d804efcb6 100644
--- a/sql/sql_update.cc
+++ b/sql/sql_update.cc
@@ -1,4 +1,4 @@
-/* Copyright 2000-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc.
+/* Copyright (c) 2000, 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
diff --git a/sql/sys_vars.h b/sql/sys_vars.h
index e16bd3c5330..c9987ed4674 100644
--- a/sql/sys_vars.h
+++ b/sql/sys_vars.h
@@ -1191,7 +1191,8 @@ public:
   void global_save_default(THD *thd, set_var *var)
   {
     LEX_STRING pname;
-    pname.str= *(char**)option.def_value;
+    char **default_value= reinterpret_cast(option.def_value);
+    pname.str= *default_value;
     pname.length= strlen(pname.str);
 
     plugin_ref plugin;
@@ -1556,7 +1557,10 @@ public:
   void session_save_default(THD *thd, set_var *var)
   { var->save_result.ptr= global_var(void*); }
   void global_save_default(THD *thd, set_var *var)
-  { var->save_result.ptr= *(void**)option.def_value; }
+  {
+    void **default_value= reinterpret_cast(option.def_value);
+    var->save_result.ptr= *default_value;
+  }
   bool check_update_type(Item_result type)
   { return type != INT_RESULT && type != STRING_RESULT; }
   uchar *session_value_ptr(THD *thd, LEX_STRING *base)
diff --git a/sql/table.h b/sql/table.h
index 6aba4f21db2..39e9ef2e0dd 100644
--- a/sql/table.h
+++ b/sql/table.h
@@ -1,7 +1,7 @@
 #ifndef TABLE_INCLUDED
 #define TABLE_INCLUDED
 
-/* Copyright 2000-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc.
+/* Copyright (c) 2000, 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
diff --git a/storage/heap/hp_delete.c b/storage/heap/hp_delete.c
index 9e9e28da335..ceba0fcf12e 100644
--- a/storage/heap/hp_delete.c
+++ b/storage/heap/hp_delete.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000-2002, 2004-200 MySQL AB
+/* Copyright (C) 2000-2002, 2004-2007 MySQL AB
 
    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
diff --git a/storage/myisam/ftbench/Ecompare.pl b/storage/myisam/ftbench/Ecompare.pl
index 265534e704d..2c50ae9b9ce 100755
--- a/storage/myisam/ftbench/Ecompare.pl
+++ b/storage/myisam/ftbench/Ecompare.pl
@@ -1,5 +1,20 @@
 #!/usr/bin/perl
 
+# Copyright (C) 2003 MySQL AB
+# 
+# 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
 # compares out-files (as created by Ereport.pl) from dir1/*.out and dir2/*.out
 # for each effectiveness column computes the probability of the hypothesis
 # "Both files have the same effectiveness"
diff --git a/storage/myisam/ftbench/Ecreate.pl b/storage/myisam/ftbench/Ecreate.pl
index d90a6f7a0ad..123ca729c31 100755
--- a/storage/myisam/ftbench/Ecreate.pl
+++ b/storage/myisam/ftbench/Ecreate.pl
@@ -1,5 +1,20 @@
 #!/usr/bin/perl
 
+# Copyright (C) 2003 MySQL AB
+# 
+# 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
 $test=shift || die "Usage $0 testname [option]";
 $option=shift;
 
diff --git a/storage/myisam/ftbench/Ereport.pl b/storage/myisam/ftbench/Ereport.pl
index 5969304da09..2f63d7ea37a 100755
--- a/storage/myisam/ftbench/Ereport.pl
+++ b/storage/myisam/ftbench/Ereport.pl
@@ -1,5 +1,20 @@
 #!/usr/bin/perl
 
+# Copyright (C) 2003 MySQL AB
+# 
+# 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
 die "Use: $0 eval_output qrels_file\n" unless @ARGV==2;
 
 open(EOUT,$eout=shift) || die "Cannot open $eout: $!";
diff --git a/storage/myisam/ftbench/ft-test-run.sh b/storage/myisam/ftbench/ft-test-run.sh
index 0908e55b400..8726c263de9 100755
--- a/storage/myisam/ftbench/ft-test-run.sh
+++ b/storage/myisam/ftbench/ft-test-run.sh
@@ -1,5 +1,22 @@
 #!/bin/sh
 
+# Copyright (C) 2003 MySQL AB
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library 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
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the Free
+# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+# MA 02111-1307, USA
+
 if [ ! -x ./ft-test-run.sh ] ; then
   echo "Usage: ./ft-test-run.sh"
   exit 1
diff --git a/storage/myisam/mi_test_all.sh b/storage/myisam/mi_test_all.sh
index 5989d9cfaf0..812ea914464 100755
--- a/storage/myisam/mi_test_all.sh
+++ b/storage/myisam/mi_test_all.sh
@@ -1,4 +1,22 @@
 #!/bin/sh
+
+# Copyright (C) 2000, 2007 MySQL AB
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library 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
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the Free
+# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+# MA 02111-1307, USA
+
 #
 # Execute some simple basic test on MyISAM libary to check if things
 # works at all.
diff --git a/storage/myisam/myisampack.c b/storage/myisam/myisampack.c
index 84a7f2a1ba9..0be7679f4e2 100644
--- a/storage/myisam/myisampack.c
+++ b/storage/myisam/myisampack.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000-2006 MySQL AB
+/* Copyright (C) 2000-2007 MySQL AB
 
    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
diff --git a/storage/myisam/rt_index.c b/storage/myisam/rt_index.c
index 37a06606b3c..7c9d8cbc920 100644
--- a/storage/myisam/rt_index.c
+++ b/storage/myisam/rt_index.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2006 MySQL AB & Ramil Kalimullin
+/* Copyright (c) 2002, 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
diff --git a/storage/ndb/Makefile.am b/storage/ndb/Makefile.am
index 0da8ec136c9..835b8c83fd8 100644
--- a/storage/ndb/Makefile.am
+++ b/storage/ndb/Makefile.am
@@ -35,7 +35,7 @@ dist-hook:
 	done
 
 windoze:
-	for i in `find . -name 'old_dirs' -prune -o -name 'Makefile.am' -print`; \
+	for i in `find . -name 'Makefile.am' -print`; \
 	do make -C `dirname $$i` windoze-dsp; done
 
 windoze-dsp:
diff --git a/storage/ndb/config/make-win-dsw.sh b/storage/ndb/config/make-win-dsw.sh
index b0613620f8a..070a3665bc0 100755
--- a/storage/ndb/config/make-win-dsw.sh
+++ b/storage/ndb/config/make-win-dsw.sh
@@ -1,3 +1,17 @@
+# Copyright (C) 2004 MySQL AB
+# 
+# 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
 
 cat <
diff --git a/storage/ndb/src/cw/cpcc-win32/vb6/Module1.bas b/storage/ndb/src/cw/cpcc-win32/vb6/Module1.bas
deleted file mode 100644
index ae8ed444a41..00000000000
--- a/storage/ndb/src/cw/cpcc-win32/vb6/Module1.bas
+++ /dev/null
@@ -1,233 +0,0 @@
-Attribute VB_Name = "Module1"
-Option Explicit
-Public fMainForm As frmMain
-Public g_computers As New Collection
-Public g_databases As New Collection
-
-Sub Main()
-    If False Then
-        Dim fLogin As New frmLogin
-        fLogin.Show vbModal
-        If Not fLogin.OK Then
-            'Login Failed so exit app
-            End
-        End If
-        Unload fLogin
-
-        frmSplash.Show
-        frmSplash.Refresh
-    End If
-    
-    init
-    
-    Set fMainForm = New frmMain
-    Load fMainForm
-    Unload frmSplash
-
-    fMainForm.Show
-End Sub
-
-Private Sub init()
-    Dim c As Computer
-    Dim p As Process
-        
-    ' ---
-    ' One node configuration
-    '
-    Set c = New Computer
-    With c
-        .m_ip = "130.100.232.31"
-        .m_name = "ndb-client31"
-        .m_status = "Connected"
-        Set .m_processes = New Collection
-    End With
-    addComputer c
-    
-    Set p = New Process
-    With p
-        .m_id = "1"
-        .m_name = "mgm-1"
-        .m_database = "elathal"
-        .m_status = "Running"
-        .m_owner = "elathal"
-        Set .m_computer = c
-    End With
-    addProcess c, p
-        
-    Set p = New Process
-    With p
-        .m_id = "2"
-        .m_name = "ndb-2"
-        .m_database = "elathal"
-        .m_status = "Running"
-        .m_owner = "elathal"
-        Set .m_computer = c
-    End With
-    addProcess c, p
-
-    Set p = New Process
-    With p
-        .m_id = "3"
-        .m_name = "api-3"
-        .m_database = "elathal"
-        .m_status = "Running"
-        .m_owner = "elathal"
-        Set .m_computer = c
-    End With
-    addProcess c, p
-
-    ' ---
-    ' Two node configuration
-    '
-    Set p = New Process
-    With p
-        .m_id = "4"
-        .m_name = "mgm-1"
-        .m_database = "ejonore-2-node"
-        .m_status = "Running"
-        .m_owner = "ejonore"
-        Set .m_computer = c
-    End With
-    addProcess c, p
-        
-    Set c = New Computer
-    With c
-        .m_ip = "10.0.1.1"
-        .m_name = "cluster-1"
-        .m_status = "Connected"
-        Set .m_processes = New Collection
-    End With
-    addComputer c
-    
-    Set p = New Process
-    With p
-        .m_id = "1"
-        .m_name = "ndb-2"
-        .m_database = "ejonore-2-node"
-        .m_status = "Running"
-        .m_owner = "ejonore"
-        Set .m_computer = c
-    End With
-    addProcess c, p
-
-    Set c = New Computer
-    With c
-        .m_ip = "10.0.2.1"
-        .m_name = "cluster-2"
-        .m_status = "Connected"
-        Set .m_processes = New Collection
-    End With
-    addComputer c
-    
-    Set p = New Process
-    With p
-        .m_id = "1"
-        .m_name = "ndb-3"
-        .m_database = "ejonore-2-node"
-        .m_status = "Running"
-        .m_owner = "ejonore"
-        Set .m_computer = c
-    End With
-    addProcess c, p
-    
-    Set c = New Computer
-    With c
-        .m_ip = "10.0.3.1"
-        .m_name = "cluster-3"
-        .m_status = "Connected"
-        Set .m_processes = New Collection
-    End With
-    addComputer c
-    
-    Set p = New Process
-    With p
-        .m_id = "1"
-        .m_name = "api-4"
-        .m_database = "ejonore-2-node"
-        .m_status = "Running"
-        .m_owner = "ejonore"
-        Set .m_computer = c
-    End With
-    addProcess c, p
-    
-    Set c = New Computer
-    With c
-        .m_ip = "10.0.4.1"
-        .m_name = "cluster-4"
-        .m_status = "Connected"
-        Set .m_processes = New Collection
-    End With
-    addComputer c
-    
-    Set p = New Process
-    With p
-        .m_id = "1"
-        .m_name = "api-5"
-        .m_database = "ejonore-2-node"
-        .m_status = "Running"
-        .m_owner = "ejonore"
-        Set .m_computer = c
-    End With
-    addProcess c, p
-    
-    Set c = New Computer
-    With c
-        .m_ip = "130.100.232.5"
-        .m_name = "ndbs05"
-        .m_status = "Not connected"
-        Set .m_processes = New Collection
-    End With
-    addComputer c
-    
-    Set c = New Computer
-    With c
-        .m_ip = "130.100.232.7"
-        .m_name = "ndb-srv7"
-        .m_status = "No contact"
-        Set .m_processes = New Collection
-    End With
-    addComputer c
-    
-End Sub
-
-Public Sub addComputer(ByRef c As Computer)
-    g_computers.Add c, "_" & c.m_name
-End Sub
-
-Private Sub addProcess(ByRef c As Computer, ByRef p As Process)
-    c.m_processes.Add p, "_" & p.m_id
-        
-    Dim cl As Database_
-    If Not Exists(g_databases, "_" & p.m_database) Then
-        Set cl = New Database_
-        With cl
-            .m_name = p.m_database
-            .m_status = "Unknown"
-            Set .m_processes = New Collection
-        End With
-        g_databases.Add cl, "_" & p.m_database
-    Else
-        Set cl = g_databases("_" & p.m_database)
-    End If
-    cl.m_processes.Add p, "_" & p.m_computer.m_name & "_" & p.m_id
-End Sub
-
-Public Function Exists(ByRef c As Collection, ByVal k As String) As Boolean
-    Dim r As Boolean
-    Dim o As Object
-    
-    r = True
-    
-    On Error GoTo NotFound
-    Set o = c.Item(k)
-    GoTo Continue
-NotFound:
-    If Err.Number <> 5 Then
-        Err.Raise Err.Number, Err.Source, Err.Description
-    End If
-    
-    r = False
-Continue:
-    Exists = r
-End Function
-
diff --git a/storage/ndb/src/cw/cpcc-win32/vb6/NdbCPC.vbp b/storage/ndb/src/cw/cpcc-win32/vb6/NdbCPC.vbp
deleted file mode 100644
index dc8f3780a74..00000000000
--- a/storage/ndb/src/cw/cpcc-win32/vb6/NdbCPC.vbp
+++ /dev/null
@@ -1,49 +0,0 @@
-Type=Exe
-Object={831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0; mscomctl.ocx
-Module=Module1; Module1.bas
-Form=frmMain.frm
-Form=frmSplash.frm
-Form=frmLogin.frm
-Form=frmOptions.frm
-Form=frmAbout.frm
-Class=Computer; Computer.cls
-Class=Process; Process.cls
-Class=Database_; Database.cls
-Form=frmNewComputer.frm
-Form=frmNewDatabase3.frm
-Form=frmNewDatabase1.frm
-Form=frmNewDatabase2.frm
-IconForm="frmAbout"
-Startup="Sub Main"
-HelpFile=""
-Title="NdbCPC"
-ExeName32="NdbCPC.exe"
-Command32=""
-Name="NdbCPC"
-HelpContextID="0"
-CompatibleMode="0"
-MajorVer=1
-MinorVer=0
-RevisionVer=0
-AutoIncrementVer=0
-ServerSupportFiles=0
-VersionCompanyName="ctp"
-CompilationType=0
-OptimizationType=0
-FavorPentiumPro(tm)=0
-CodeViewDebugInfo=0
-NoAliasing=0
-BoundsCheck=0
-OverflowCheck=0
-FlPointCheck=0
-FDIVCheck=0
-UnroundedFP=0
-StartMode=0
-Unattended=0
-Retained=0
-ThreadPerObject=0
-MaxNumberOfThreads=1
-DebugStartupOption=0
-
-[MS Transaction Server]
-AutoRefresh=1
diff --git a/storage/ndb/src/cw/cpcc-win32/vb6/NdbCPC.vbw b/storage/ndb/src/cw/cpcc-win32/vb6/NdbCPC.vbw
deleted file mode 100644
index 825abbc923a..00000000000
--- a/storage/ndb/src/cw/cpcc-win32/vb6/NdbCPC.vbw
+++ /dev/null
@@ -1,13 +0,0 @@
-Module1 = 44, 44, 577, 492, 
-frmMain = 44, 44, 577, 492, , 66, 66, 599, 514, C
-frmSplash = 132, 132, 670, 576, C, 88, 88, 621, 536, C
-frmLogin = 0, 0, 538, 444, C, 110, 110, 643, 558, C
-frmOptions = 176, 176, 714, 620, C, 132, 132, 665, 580, C
-frmAbout = 132, 132, 759, 511, C, 154, 154, 687, 602, C
-Computer = 110, 110, 648, 554, 
-Process = 132, 132, 670, 576, C
-Database_ = 88, 88, 626, 532, C
-frmNewComputer = 44, 44, 582, 488, , 22, 22, 390, 218, C
-frmNewDatabase3 = 0, 0, 506, 444, , 0, 0, 506, 444, C
-frmNewDatabase1 = 132, 132, 638, 550, , 154, 154, 660, 572, C
-frmNewDatabase2 = 198, 198, 704, 616, , 176, 176, 682, 594, C
diff --git a/storage/ndb/src/cw/cpcc-win32/vb6/Process.cls b/storage/ndb/src/cw/cpcc-win32/vb6/Process.cls
deleted file mode 100644
index fcb4c2cbb2c..00000000000
--- a/storage/ndb/src/cw/cpcc-win32/vb6/Process.cls
+++ /dev/null
@@ -1,22 +0,0 @@
-VERSION 1.0 CLASS
-BEGIN
-  MultiUse = -1  'True
-  Persistable = 0  'NotPersistable
-  DataBindingBehavior = 0  'vbNone
-  DataSourceBehavior  = 0  'vbNone
-  MTSTransactionMode  = 0  'NotAnMTSObject
-END
-Attribute VB_Name = "Process"
-Attribute VB_GlobalNameSpace = False
-Attribute VB_Creatable = True
-Attribute VB_PredeclaredId = False
-Attribute VB_Exposed = False
-Attribute VB_Ext_KEY = "SavedWithClassBuilder6" ,"Yes"
-Attribute VB_Ext_KEY = "Top_Level" ,"Yes"
-Public m_computer As Computer
-Public m_id As String
-Public m_name As String
-Public m_database As String
-Public m_status As String
-Public m_owner As String
-
diff --git a/storage/ndb/src/cw/cpcc-win32/vb6/closed folder.ico b/storage/ndb/src/cw/cpcc-win32/vb6/closed folder.ico
deleted file mode 100644
index fe82350d376..00000000000
Binary files a/storage/ndb/src/cw/cpcc-win32/vb6/closed folder.ico and /dev/null differ
diff --git a/storage/ndb/src/cw/cpcc-win32/vb6/computer.ico b/storage/ndb/src/cw/cpcc-win32/vb6/computer.ico
deleted file mode 100644
index d73302d1cd5..00000000000
Binary files a/storage/ndb/src/cw/cpcc-win32/vb6/computer.ico and /dev/null differ
diff --git a/storage/ndb/src/cw/cpcc-win32/vb6/frmAbout.frm b/storage/ndb/src/cw/cpcc-win32/vb6/frmAbout.frm
deleted file mode 100644
index b842d20de21..00000000000
--- a/storage/ndb/src/cw/cpcc-win32/vb6/frmAbout.frm
+++ /dev/null
@@ -1,245 +0,0 @@
-VERSION 5.00
-Begin VB.Form frmAbout 
-   BorderStyle     =   3  'Fixed Dialog
-   Caption         =   "About NdbCPC"
-   ClientHeight    =   3630
-   ClientLeft      =   45
-   ClientTop       =   330
-   ClientWidth     =   5865
-   ClipControls    =   0   'False
-   LinkTopic       =   "Form1"
-   MaxButton       =   0   'False
-   MinButton       =   0   'False
-   ScaleHeight     =   3630
-   ScaleWidth      =   5865
-   ShowInTaskbar   =   0   'False
-   StartUpPosition =   1  'CenterOwner
-   Tag             =   "About NdbCPC"
-   Begin VB.PictureBox picIcon 
-      AutoSize        =   -1  'True
-      BackColor       =   &H00C0C0C0&
-      ClipControls    =   0   'False
-      Height          =   540
-      Left            =   240
-      Picture         =   "frmAbout.frx":0000
-      ScaleHeight     =   480
-      ScaleMode       =   0  'User
-      ScaleWidth      =   480
-      TabIndex        =   2
-      TabStop         =   0   'False
-      Top             =   240
-      Width           =   540
-   End
-   Begin VB.CommandButton cmdOK 
-      Cancel          =   -1  'True
-      Caption         =   "OK"
-      Default         =   -1  'True
-      Height          =   345
-      Left            =   4245
-      TabIndex        =   0
-      Tag             =   "OK"
-      Top             =   2625
-      Width           =   1467
-   End
-   Begin VB.CommandButton cmdSysInfo 
-      Caption         =   "&System Info..."
-      Height          =   345
-      Left            =   4260
-      TabIndex        =   1
-      Tag             =   "&System Info..."
-      Top             =   3075
-      Width           =   1452
-   End
-   Begin VB.Label lblDescription 
-      Caption         =   "App Description"
-      ForeColor       =   &H00000000&
-      Height          =   1170
-      Left            =   1050
-      TabIndex        =   6
-      Tag             =   "App Description"
-      Top             =   1125
-      Width           =   4092
-   End
-   Begin VB.Label lblTitle 
-      Caption         =   "Application Title"
-      ForeColor       =   &H00000000&
-      Height          =   480
-      Left            =   1050
-      TabIndex        =   5
-      Tag             =   "Application Title"
-      Top             =   240
-      Width           =   4092
-   End
-   Begin VB.Line Line1 
-      BorderColor     =   &H00808080&
-      BorderStyle     =   6  'Inside Solid
-      Index           =   1
-      X1              =   225
-      X2              =   5657
-      Y1              =   2430
-      Y2              =   2430
-   End
-   Begin VB.Line Line1 
-      BorderColor     =   &H00FFFFFF&
-      BorderWidth     =   2
-      Index           =   0
-      X1              =   240
-      X2              =   5657
-      Y1              =   2445
-      Y2              =   2445
-   End
-   Begin VB.Label lblVersion 
-      Caption         =   "Version"
-      Height          =   225
-      Left            =   1050
-      TabIndex        =   4
-      Tag             =   "Version"
-      Top             =   780
-      Width           =   4092
-   End
-   Begin VB.Label lblDisclaimer 
-      Caption         =   "Warning: ..."
-      ForeColor       =   &H00000000&
-      Height          =   825
-      Left            =   255
-      TabIndex        =   3
-      Tag             =   "Warning: ..."
-      Top             =   2625
-      Width           =   3870
-   End
-End
-Attribute VB_Name = "frmAbout"
-Attribute VB_GlobalNameSpace = False
-Attribute VB_Creatable = False
-Attribute VB_PredeclaredId = True
-Attribute VB_Exposed = False
-' Reg Key Security Options...
-Const KEY_ALL_ACCESS = &H2003F
-                                          
-
-' Reg Key ROOT Types...
-Const HKEY_LOCAL_MACHINE = &H80000002
-Const ERROR_SUCCESS = 0
-Const REG_SZ = 1                         ' Unicode nul terminated string
-Const REG_DWORD = 4                      ' 32-bit number
-
-
-Const gREGKEYSYSINFOLOC = "SOFTWARE\Microsoft\Shared Tools Location"
-Const gREGVALSYSINFOLOC = "MSINFO"
-Const gREGKEYSYSINFO = "SOFTWARE\Microsoft\Shared Tools\MSINFO"
-Const gREGVALSYSINFO = "PATH"
-
-
-Private Declare Function RegOpenKeyEx Lib "advapi32" Alias "RegOpenKeyExA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal ulOptions As Long, ByVal samDesired As Long, ByRef phkResult As Long) As Long
-Private Declare Function RegQueryValueEx Lib "advapi32" Alias "RegQueryValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal lpReserved As Long, ByRef lpType As Long, ByVal lpData As String, ByRef lpcbData As Long) As Long
-Private Declare Function RegCloseKey Lib "advapi32" (ByVal hKey As Long) As Long
-
-Private Sub Form_Load()
-    lblVersion.Caption = "Version " & App.Major & "." & App.Minor & "." & App.Revision
-    lblTitle.Caption = App.Title
-End Sub
-
-
-
-Private Sub cmdSysInfo_Click()
-        Call StartSysInfo
-End Sub
-
-
-Private Sub cmdOK_Click()
-        Unload Me
-End Sub
-
-
-Public Sub StartSysInfo()
-    On Error GoTo SysInfoErr
-
-
-        Dim rc As Long
-        Dim SysInfoPath As String
-        
-
-        ' Try To Get System Info Program Path\Name From Registry...
-        If GetKeyValue(HKEY_LOCAL_MACHINE, gREGKEYSYSINFO, gREGVALSYSINFO, SysInfoPath) Then
-        ' Try To Get System Info Program Path Only From Registry...
-        ElseIf GetKeyValue(HKEY_LOCAL_MACHINE, gREGKEYSYSINFOLOC, gREGVALSYSINFOLOC, SysInfoPath) Then
-                ' Validate Existance Of Known 32 Bit File Version
-                If (Dir(SysInfoPath & "\MSINFO32.EXE") <> "") Then
-                        SysInfoPath = SysInfoPath & "\MSINFO32.EXE"
-                        
-
-                ' Error - File Can Not Be Found...
-                Else
-                        GoTo SysInfoErr
-                End If
-        ' Error - Registry Entry Can Not Be Found...
-        Else
-                GoTo SysInfoErr
-        End If
-        
-
-        Call Shell(SysInfoPath, vbNormalFocus)
-        
-
-        Exit Sub
-SysInfoErr:
-        MsgBox "System Information Is Unavailable At This Time", vbOKOnly
-End Sub
-
-
-Public Function GetKeyValue(KeyRoot As Long, KeyName As String, SubKeyRef As String, ByRef KeyVal As String) As Boolean
-        Dim i As Long                                           ' Loop Counter
-        Dim rc As Long                                          ' Return Code
-        Dim hKey As Long                                        ' Handle To An Open Registry Key
-        Dim hDepth As Long                                      '
-        Dim KeyValType As Long                                  ' Data Type Of A Registry Key
-        Dim tmpVal As String                                    ' Tempory Storage For A Registry Key Value
-        Dim KeyValSize As Long                                  ' Size Of Registry Key Variable
-        '------------------------------------------------------------
-        ' Open RegKey Under KeyRoot {HKEY_LOCAL_MACHINE...}
-        '------------------------------------------------------------
-        rc = RegOpenKeyEx(KeyRoot, KeyName, 0, KEY_ALL_ACCESS, hKey) ' Open Registry Key
-        
-
-        If (rc <> ERROR_SUCCESS) Then GoTo GetKeyError          ' Handle Error...
-        
-
-        tmpVal = String$(1024, 0)                             ' Allocate Variable Space
-        KeyValSize = 1024                                       ' Mark Variable Size
-        
-
-        '------------------------------------------------------------
-        ' Retrieve Registry Key Value...
-        '------------------------------------------------------------
-        rc = RegQueryValueEx(hKey, SubKeyRef, 0, KeyValType, tmpVal, KeyValSize)    ' Get/Create Key Value
-                                                
-
-        If (rc <> ERROR_SUCCESS) Then GoTo GetKeyError          ' Handle Errors
-        
-
-        tmpVal = VBA.Left(tmpVal, InStr(tmpVal, VBA.Chr(0)) - 1)
-        '------------------------------------------------------------
-        ' Determine Key Value Type For Conversion...
-        '------------------------------------------------------------
-        Select Case KeyValType                                  ' Search Data Types...
-        Case REG_SZ                                             ' String Registry Key Data Type
-                KeyVal = tmpVal                                     ' Copy String Value
-        Case REG_DWORD                                          ' Double Word Registry Key Data Type
-                For i = Len(tmpVal) To 1 Step -1                    ' Convert Each Bit
-                        KeyVal = KeyVal + Hex(Asc(Mid(tmpVal, i, 1)))   ' Build Value Char. By Char.
-                Next
-                KeyVal = Format$("&h" + KeyVal)                     ' Convert Double Word To String
-        End Select
-        
-
-        GetKeyValue = True                                      ' Return Success
-        rc = RegCloseKey(hKey)                                  ' Close Registry Key
-        Exit Function                                           ' Exit
-        
-
-GetKeyError:    ' Cleanup After An Error Has Occured...
-        KeyVal = ""                                             ' Set Return Val To Empty String
-        GetKeyValue = False                                     ' Return Failure
-        rc = RegCloseKey(hKey)                                  ' Close Registry Key
-End Function
-
diff --git a/storage/ndb/src/cw/cpcc-win32/vb6/frmLogin.frm b/storage/ndb/src/cw/cpcc-win32/vb6/frmLogin.frm
deleted file mode 100644
index d4d663c93c2..00000000000
--- a/storage/ndb/src/cw/cpcc-win32/vb6/frmLogin.frm
+++ /dev/null
@@ -1,119 +0,0 @@
-VERSION 5.00
-Begin VB.Form frmLogin 
-   BorderStyle     =   3  'Fixed Dialog
-   Caption         =   "Login"
-   ClientHeight    =   1590
-   ClientLeft      =   45
-   ClientTop       =   330
-   ClientWidth     =   3750
-   LinkTopic       =   "Form1"
-   MaxButton       =   0   'False
-   MinButton       =   0   'False
-   ScaleHeight     =   1590
-   ScaleWidth      =   3750
-   ShowInTaskbar   =   0   'False
-   StartUpPosition =   2  'CenterScreen
-   Tag             =   "Login"
-   Begin VB.CommandButton cmdCancel 
-      Cancel          =   -1  'True
-      Caption         =   "Cancel"
-      Height          =   360
-      Left            =   2100
-      TabIndex        =   5
-      Tag             =   "Cancel"
-      Top             =   1020
-      Width           =   1140
-   End
-   Begin VB.CommandButton cmdOK 
-      Caption         =   "OK"
-      Default         =   -1  'True
-      Height          =   360
-      Left            =   495
-      TabIndex        =   4
-      Tag             =   "OK"
-      Top             =   1020
-      Width           =   1140
-   End
-   Begin VB.TextBox txtPassword 
-      Height          =   285
-      IMEMode         =   3  'DISABLE
-      Left            =   1305
-      PasswordChar    =   "*"
-      TabIndex        =   1
-      Top             =   525
-      Width           =   2325
-   End
-   Begin VB.TextBox txtUserName 
-      Height          =   285
-      Left            =   1305
-      TabIndex        =   3
-      Top             =   135
-      Width           =   2325
-   End
-   Begin VB.Label lblLabels 
-      Caption         =   "&Password:"
-      Height          =   248
-      Index           =   1
-      Left            =   105
-      TabIndex        =   0
-      Tag             =   "&Password:"
-      Top             =   540
-      Width           =   1080
-   End
-   Begin VB.Label lblLabels 
-      Caption         =   "&User Name:"
-      Height          =   248
-      Index           =   0
-      Left            =   105
-      TabIndex        =   2
-      Tag             =   "&User Name:"
-      Top             =   150
-      Width           =   1080
-   End
-End
-Attribute VB_Name = "frmLogin"
-Attribute VB_GlobalNameSpace = False
-Attribute VB_Creatable = False
-Attribute VB_PredeclaredId = True
-Attribute VB_Exposed = False
-Private Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpbuffer As String, nSize As Long) As Long
-
-
-Public OK As Boolean
-Private Sub Form_Load()
-    Dim sBuffer As String
-    Dim lSize As Long
-
-
-    sBuffer = Space$(255)
-    lSize = Len(sBuffer)
-    Call GetUserName(sBuffer, lSize)
-    If lSize > 0 Then
-        txtUserName.Text = Left$(sBuffer, lSize)
-    Else
-        txtUserName.Text = vbNullString
-    End If
-End Sub
-
-
-
-Private Sub cmdCancel_Click()
-    OK = False
-    Me.Hide
-End Sub
-
-
-Private Sub cmdOK_Click()
-    'ToDo: create test for correct password
-    'check for correct password
-    If txtPassword.Text = "" Then
-        OK = True
-        Me.Hide
-    Else
-        MsgBox "Invalid Password, try again!", , "Login"
-        txtPassword.SetFocus
-        txtPassword.SelStart = 0
-        txtPassword.SelLength = Len(txtPassword.Text)
-    End If
-End Sub
-
diff --git a/storage/ndb/src/cw/cpcc-win32/vb6/frmMain.frm b/storage/ndb/src/cw/cpcc-win32/vb6/frmMain.frm
deleted file mode 100644
index a4bf5b58941..00000000000
--- a/storage/ndb/src/cw/cpcc-win32/vb6/frmMain.frm
+++ /dev/null
@@ -1,1207 +0,0 @@
-VERSION 5.00
-Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
-Begin VB.Form frmMain 
-   Caption         =   "NdbCPC"
-   ClientHeight    =   5955
-   ClientLeft      =   2115
-   ClientTop       =   2250
-   ClientWidth     =   8880
-   LinkTopic       =   "Form1"
-   ScaleHeight     =   5955
-   ScaleWidth      =   8880
-   Begin MSComctlLib.ImageList ImageList1 
-      Left            =   6840
-      Top             =   3120
-      _ExtentX        =   1005
-      _ExtentY        =   1005
-      BackColor       =   16777215
-      ImageWidth      =   16
-      ImageHeight     =   16
-      MaskColor       =   12632256
-      _Version        =   393216
-      BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
-         NumListImages   =   11
-         BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
-            Picture         =   "frmMain.frx":0000
-            Key             =   "close"
-         EndProperty
-         BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
-            Picture         =   "frmMain.frx":27B4
-            Key             =   "open"
-         EndProperty
-         BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
-            Picture         =   "frmMain.frx":4F68
-            Key             =   "computer_unknown"
-         EndProperty
-         BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
-            Picture         =   "frmMain.frx":5284
-            Key             =   "computer_stopped"
-         EndProperty
-         BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
-            Picture         =   "frmMain.frx":55A0
-            Key             =   "computer_started"
-         EndProperty
-         BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
-            Picture         =   "frmMain.frx":58BC
-            Key             =   ""
-         EndProperty
-         BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
-            Picture         =   "frmMain.frx":5BD8
-            Key             =   ""
-         EndProperty
-         BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
-            Picture         =   "frmMain.frx":5EF4
-            Key             =   ""
-         EndProperty
-         BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
-            Picture         =   "frmMain.frx":6210
-            Key             =   "db"
-         EndProperty
-         BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
-            Picture         =   "frmMain.frx":652A
-            Key             =   "computer"
-         EndProperty
-         BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628} 
-            Picture         =   "frmMain.frx":6844
-            Key             =   "properties"
-         EndProperty
-      EndProperty
-   End
-   Begin VB.PictureBox picSplitter 
-      BackColor       =   &H00808080&
-      BorderStyle     =   0  'None
-      FillColor       =   &H00808080&
-      Height          =   4800
-      Left            =   5400
-      ScaleHeight     =   2090.126
-      ScaleMode       =   0  'User
-      ScaleWidth      =   780
-      TabIndex        =   6
-      Top             =   705
-      Width           =   72
-      Visible         =   0   'False
-   End
-   Begin MSComctlLib.TreeView tvTreeView 
-      Height          =   4800
-      Left            =   0
-      TabIndex        =   5
-      Top             =   705
-      Width           =   2016
-      _ExtentX        =   3545
-      _ExtentY        =   8467
-      _Version        =   393217
-      HideSelection   =   0   'False
-      Indentation     =   0
-      LineStyle       =   1
-      Sorted          =   -1  'True
-      Style           =   7
-      FullRowSelect   =   -1  'True
-      ImageList       =   "ImageList1"
-      Appearance      =   1
-   End
-   Begin VB.PictureBox picTitles 
-      Align           =   1  'Align Top
-      Appearance      =   0  'Flat
-      BorderStyle     =   0  'None
-      ForeColor       =   &H80000008&
-      Height          =   300
-      Left            =   0
-      ScaleHeight     =   300
-      ScaleWidth      =   8880
-      TabIndex        =   2
-      TabStop         =   0   'False
-      Top             =   420
-      Width           =   8880
-      Begin VB.Label lblTitle 
-         BorderStyle     =   1  'Fixed Single
-         Caption         =   " ListView:"
-         Height          =   270
-         Index           =   1
-         Left            =   2078
-         TabIndex        =   4
-         Tag             =   " ListView:"
-         Top             =   12
-         Width           =   3216
-      End
-      Begin VB.Label lblTitle 
-         BorderStyle     =   1  'Fixed Single
-         Caption         =   " TreeView:"
-         Height          =   270
-         Index           =   0
-         Left            =   0
-         TabIndex        =   3
-         Tag             =   " TreeView:"
-         Top             =   12
-         Width           =   2016
-      End
-   End
-   Begin MSComctlLib.Toolbar tbToolBar 
-      Align           =   1  'Align Top
-      Height          =   420
-      Left            =   0
-      TabIndex        =   1
-      Top             =   0
-      Width           =   8880
-      _ExtentX        =   15663
-      _ExtentY        =   741
-      ButtonWidth     =   609
-      ButtonHeight    =   582
-      Appearance      =   1
-      ImageList       =   "ImageList1"
-      _Version        =   393216
-      BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
-         NumButtons      =   5
-         BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
-            Style           =   3
-         EndProperty
-         BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
-            Key             =   "Add computer"
-            Object.ToolTipText     =   "Add computer"
-            ImageKey        =   "computer"
-         EndProperty
-         BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
-            Key             =   "New database"
-            Object.ToolTipText     =   "New database"
-            ImageKey        =   "db"
-         EndProperty
-         BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
-            Style           =   3
-         EndProperty
-         BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} 
-            Key             =   "Properties"
-            Object.ToolTipText     =   "Properties"
-            ImageKey        =   "properties"
-         EndProperty
-      EndProperty
-   End
-   Begin MSComctlLib.StatusBar sbStatusBar 
-      Align           =   2  'Align Bottom
-      Height          =   270
-      Left            =   0
-      TabIndex        =   0
-      Top             =   5685
-      Width           =   8880
-      _ExtentX        =   15663
-      _ExtentY        =   476
-      _Version        =   393216
-      BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628} 
-         NumPanels       =   3
-         BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
-            AutoSize        =   1
-            Object.Width           =   10028
-            Text            =   "Status"
-            TextSave        =   "Status"
-         EndProperty
-         BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
-            Style           =   6
-            AutoSize        =   2
-            TextSave        =   "2002-10-15"
-         EndProperty
-         BeginProperty Panel3 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
-            Style           =   5
-            AutoSize        =   2
-            TextSave        =   "09:44"
-         EndProperty
-      EndProperty
-   End
-   Begin MSComctlLib.ListView lvProcesses 
-      Height          =   4815
-      Left            =   2040
-      TabIndex        =   8
-      Top             =   720
-      Width           =   3255
-      _ExtentX        =   5741
-      _ExtentY        =   8493
-      Sorted          =   -1  'True
-      MultiSelect     =   -1  'True
-      LabelWrap       =   -1  'True
-      HideSelection   =   0   'False
-      AllowReorder    =   -1  'True
-      FullRowSelect   =   -1  'True
-      _Version        =   393217
-      ForeColor       =   -2147483640
-      BackColor       =   -2147483643
-      BorderStyle     =   1
-      Appearance      =   1
-      NumItems        =   6
-      BeginProperty ColumnHeader(1) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
-         Key             =   "Id"
-         Text            =   "Id"
-         Object.Width           =   2540
-      EndProperty
-      BeginProperty ColumnHeader(2) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
-         SubItemIndex    =   1
-         Key             =   "Computer"
-         Text            =   "Computer"
-         Object.Width           =   2540
-      EndProperty
-      BeginProperty ColumnHeader(3) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
-         SubItemIndex    =   2
-         Key             =   "Database"
-         Text            =   "Database"
-         Object.Width           =   2540
-      EndProperty
-      BeginProperty ColumnHeader(4) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
-         SubItemIndex    =   3
-         Key             =   "Name"
-         Text            =   "Name"
-         Object.Width           =   2540
-      EndProperty
-      BeginProperty ColumnHeader(5) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
-         SubItemIndex    =   4
-         Key             =   "Status"
-         Text            =   "Status"
-         Object.Width           =   2540
-      EndProperty
-      BeginProperty ColumnHeader(6) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
-         SubItemIndex    =   5
-         Key             =   "Owner"
-         Text            =   "Owner"
-         Object.Width           =   2540
-      EndProperty
-   End
-   Begin MSComctlLib.ListView lvComputers 
-      Height          =   4815
-      Left            =   2040
-      TabIndex        =   7
-      Top             =   720
-      Width           =   3255
-      _ExtentX        =   5741
-      _ExtentY        =   8493
-      Sorted          =   -1  'True
-      MultiSelect     =   -1  'True
-      LabelWrap       =   -1  'True
-      HideSelection   =   -1  'True
-      AllowReorder    =   -1  'True
-      FullRowSelect   =   -1  'True
-      _Version        =   393217
-      Icons           =   "ImageList1"
-      SmallIcons      =   "ImageList1"
-      ForeColor       =   -2147483640
-      BackColor       =   -2147483643
-      BorderStyle     =   1
-      Appearance      =   1
-      NumItems        =   2
-      BeginProperty ColumnHeader(1) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
-         Text            =   "Computer"
-         Object.Width           =   2540
-      EndProperty
-      BeginProperty ColumnHeader(2) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
-         SubItemIndex    =   1
-         Text            =   "Status"
-         Object.Width           =   2540
-      EndProperty
-   End
-   Begin MSComctlLib.ListView lvDatabases 
-      Height          =   4815
-      Left            =   2040
-      TabIndex        =   9
-      Top             =   720
-      Width           =   3255
-      _ExtentX        =   5741
-      _ExtentY        =   8493
-      View            =   3
-      Sorted          =   -1  'True
-      MultiSelect     =   -1  'True
-      LabelWrap       =   -1  'True
-      HideSelection   =   -1  'True
-      AllowReorder    =   -1  'True
-      FullRowSelect   =   -1  'True
-      _Version        =   393217
-      Icons           =   "ImageList1"
-      SmallIcons      =   "ImageList1"
-      ForeColor       =   -2147483640
-      BackColor       =   -2147483643
-      BorderStyle     =   1
-      Appearance      =   1
-      NumItems        =   2
-      BeginProperty ColumnHeader(1) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
-         Key             =   "Database"
-         Text            =   "Database"
-         Object.Width           =   2540
-      EndProperty
-      BeginProperty ColumnHeader(2) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
-         SubItemIndex    =   1
-         Key             =   "Status"
-         Text            =   "Status"
-         Object.Width           =   2540
-      EndProperty
-   End
-   Begin VB.Image imgSplitter 
-      Height          =   4788
-      Left            =   1965
-      MousePointer    =   9  'Size W E
-      Top             =   705
-      Width           =   150
-   End
-   Begin VB.Menu mnuFile 
-      Caption         =   "&File"
-      Begin VB.Menu mnuFileOpen 
-         Caption         =   "&Open..."
-      End
-      Begin VB.Menu mnuFileFind 
-         Caption         =   "&Find"
-      End
-      Begin VB.Menu mnuFileBar0 
-         Caption         =   "-"
-      End
-      Begin VB.Menu mnuFileSendTo 
-         Caption         =   "Sen&d to"
-      End
-      Begin VB.Menu mnuFileBar1 
-         Caption         =   "-"
-      End
-      Begin VB.Menu mnuFileNew 
-         Caption         =   "&New"
-         Shortcut        =   ^N
-      End
-      Begin VB.Menu mnuFileBar2 
-         Caption         =   "-"
-      End
-      Begin VB.Menu mnuFileDelete 
-         Caption         =   "&Delete"
-      End
-      Begin VB.Menu mnuFileRename 
-         Caption         =   "Rena&me"
-      End
-      Begin VB.Menu mnuFileProperties 
-         Caption         =   "Propert&ies"
-      End
-      Begin VB.Menu mnuFileBar3 
-         Caption         =   "-"
-      End
-      Begin VB.Menu mnuFileMRU 
-         Caption         =   ""
-         Index           =   1
-         Visible         =   0   'False
-      End
-      Begin VB.Menu mnuFileMRU 
-         Caption         =   ""
-         Index           =   2
-         Visible         =   0   'False
-      End
-      Begin VB.Menu mnuFileMRU 
-         Caption         =   ""
-         Index           =   3
-         Visible         =   0   'False
-      End
-      Begin VB.Menu mnuFileBar4 
-         Caption         =   "-"
-         Visible         =   0   'False
-      End
-      Begin VB.Menu mnuFileBar5 
-         Caption         =   "-"
-      End
-      Begin VB.Menu mnuFileClose 
-         Caption         =   "&Close"
-      End
-   End
-   Begin VB.Menu mnuEdit 
-      Caption         =   "&Edit"
-      Begin VB.Menu mnuEditUndo 
-         Caption         =   "&Undo"
-      End
-      Begin VB.Menu mnuEditBar0 
-         Caption         =   "-"
-      End
-      Begin VB.Menu mnuEditCut 
-         Caption         =   "Cu&t"
-         Shortcut        =   ^X
-      End
-      Begin VB.Menu mnuEditCopy 
-         Caption         =   "&Copy"
-         Shortcut        =   ^C
-      End
-      Begin VB.Menu mnuEditPaste 
-         Caption         =   "&Paste"
-         Shortcut        =   ^V
-      End
-      Begin VB.Menu mnuEditPasteSpecial 
-         Caption         =   "Paste &Special..."
-      End
-      Begin VB.Menu mnuEditBar1 
-         Caption         =   "-"
-      End
-      Begin VB.Menu mnuEditSelectAll 
-         Caption         =   "Select &All"
-         Shortcut        =   ^A
-      End
-      Begin VB.Menu mnuEditInvertSelection 
-         Caption         =   "&Invert Selection"
-      End
-   End
-   Begin VB.Menu mnuView 
-      Caption         =   "&View"
-      Begin VB.Menu mnuViewToolbar 
-         Caption         =   "&Toolbar"
-         Checked         =   -1  'True
-      End
-      Begin VB.Menu mnuViewStatusBar 
-         Caption         =   "Status &Bar"
-         Checked         =   -1  'True
-      End
-      Begin VB.Menu mnuViewBar0 
-         Caption         =   "-"
-      End
-      Begin VB.Menu mnuListViewMode 
-         Caption         =   "Lar&ge Icons"
-         Index           =   0
-      End
-      Begin VB.Menu mnuListViewMode 
-         Caption         =   "S&mall Icons"
-         Index           =   1
-      End
-      Begin VB.Menu mnuListViewMode 
-         Caption         =   "&List"
-         Index           =   2
-      End
-      Begin VB.Menu mnuListViewMode 
-         Caption         =   "&Details"
-         Index           =   3
-      End
-      Begin VB.Menu mnuViewBar1 
-         Caption         =   "-"
-      End
-      Begin VB.Menu mnuViewArrangeIcons 
-         Caption         =   "Arrange &Icons"
-      End
-      Begin VB.Menu mnuViewBar2 
-         Caption         =   "-"
-      End
-      Begin VB.Menu mnuViewRefresh 
-         Caption         =   "&Refresh"
-      End
-      Begin VB.Menu mnuViewOptions 
-         Caption         =   "&Options..."
-      End
-      Begin VB.Menu mnuViewWebBrowser 
-         Caption         =   "&Web Browser"
-      End
-   End
-   Begin VB.Menu mnuHelp 
-      Caption         =   "&Help"
-      Begin VB.Menu mnuHelpContents 
-         Caption         =   "&Contents"
-      End
-      Begin VB.Menu mnuHelpSearchForHelpOn 
-         Caption         =   "&Search For Help On..."
-      End
-      Begin VB.Menu mnuHelpBar0 
-         Caption         =   "-"
-      End
-      Begin VB.Menu mnuHelpAbout 
-         Caption         =   "&About "
-      End
-   End
-   Begin VB.Menu mnuPopComputers 
-      Caption         =   ""
-      Visible         =   0   'False
-      Begin VB.Menu mnuPopAddComputer 
-         Caption         =   "Add computer"
-      End
-      Begin VB.Menu mnuPop__ 
-         Caption         =   "-"
-      End
-      Begin VB.Menu mnuPopSortComputers 
-         Caption         =   "Sorted"
-      End
-   End
-   Begin VB.Menu mnuPopDatabases 
-      Caption         =   ""
-      Visible         =   0   'False
-      Begin VB.Menu mnuPopNewDatabase 
-         Caption         =   "New database"
-      End
-      Begin VB.Menu mnuPopSortDatabases0 
-         Caption         =   "-"
-      End
-      Begin VB.Menu mnuPopSortDatabases 
-         Caption         =   "Sorted"
-      End
-   End
-   Begin VB.Menu mnuPopComputer 
-      Caption         =   ""
-      Visible         =   0   'False
-      Begin VB.Menu mnuPopComputerName 
-         Caption         =   "ComputerName"
-         Enabled         =   0   'False
-      End
-      Begin VB.Menu mnuPopComputer0 
-         Caption         =   "-"
-      End
-      Begin VB.Menu mnuPopConnectComputer 
-         Caption         =   "Connect"
-      End
-      Begin VB.Menu mnuPopDisconnectComputer 
-         Caption         =   "Disconnect"
-      End
-      Begin VB.Menu mnuPopRemoveComputer 
-         Caption         =   "Remove"
-      End
-      Begin VB.Menu mnuComputer1 
-         Caption         =   "-"
-      End
-      Begin VB.Menu mnuPopComputerProperties 
-         Caption         =   "Properties"
-      End
-   End
-End
-Attribute VB_Name = "frmMain"
-Attribute VB_GlobalNameSpace = False
-Attribute VB_Creatable = False
-Attribute VB_PredeclaredId = True
-Attribute VB_Exposed = False
-Option Explicit
-Private Declare Function OSWinHelp% Lib "user32" Alias "WinHelpA" (ByVal hwnd&, ByVal HelpFile$, ByVal wCommand%, dwData As Any)
-
-Dim mbMoving As Boolean
-Const sglSplitLimit = 500
-Dim m_currentNode As MSComctlLib.Node
-Dim m_currentList As ListView
-
-Dim m_currentView As Integer
-Dim m_computerWidth As Integer
-Dim m_databaseWidth As Integer
-
-Dim m_currentComputer As Computer
-Dim m_currentDatabase As Database_
-
-Private Sub Form_Load()
-    tvTreeView.Nodes.Clear
-    lvComputers.ListItems.Clear
-    lvProcesses.ListItems.Clear
-    lvDatabases.ListItems.Clear
-
-    Me.Left = GetSetting(App.Title, "Settings", "MainLeft", 1000)
-    Me.Top = GetSetting(App.Title, "Settings", "MainTop", 1000)
-    Me.Width = GetSetting(App.Title, "Settings", "MainWidth", 6500)
-    Me.Height = GetSetting(App.Title, "Settings", "MainHeight", 6500)
-    
-    tvTreeView.Nodes.Add , tvwChild, "Computers", "Computers", 1, 2
-    Dim c As Computer
-    For Each c In g_computers
-        addComputer c
-    Next
-    
-    Set m_currentNode = tvTreeView.Nodes("Computers")
-    Set m_currentList = lvComputers
-    
-    tvTreeView.Nodes.Add , tvwChild, "Databases", "Databases", 1, 2
-    Dim d As Database_
-    For Each d In g_databases
-        AddDatabase d
-    Next
-    
-    lvComputers.Visible = True
-    lvProcesses.Visible = False
-    lvDatabases.Visible = False
-    lvComputers.View = lvwReport
-    lvProcesses.View = lvwReport
-    lvDatabases.View = lvwReport
-    m_computerWidth = lvProcesses.ColumnHeaders("Computer").Width
-    m_databaseWidth = lvProcesses.ColumnHeaders("Database").Width
-    lvProcesses.ColumnHeaders("Id").Width = 0
-End Sub
-
-Private Sub setComputer(ByVal f_ip As String)
-    Dim c As Computer
-    Set c = g_computers(f_ip)
-    If c Is Nothing Then
-        MsgBox "Unknown computer: " & f_ip
-        Exit Sub
-    End If
-    
-    Set m_currentComputer = c
-    
-    lblTitle(1).Caption = "Processes defined on computer: " & c.m_name
-    setProcesses c.m_processes
-    
-    If lvProcesses.ColumnHeaders("Computer").Width <> 0 Then
-        m_computerWidth = lvProcesses.ColumnHeaders("Computer").Width
-        lvProcesses.ColumnHeaders("Computer").Width = 0
-    End If
-    
-    If lvProcesses.ColumnHeaders("Database").Width = 0 Then
-        lvProcesses.ColumnHeaders("Database").Width = m_databaseWidth
-    End If
-End Sub
-
-Private Sub setDatabase(ByVal f_name As String)
-    Dim c As Database_
-    Set c = g_databases(f_name)
-    If c Is Nothing Then
-        MsgBox "Unknown database: " & f_name
-        Exit Sub
-    End If
-    
-    Set m_currentDatabase = c
-    
-    lblTitle(1).Caption = "Processes defined for database: " & c.m_name
-    setProcesses c.m_processes
-
-    If lvProcesses.ColumnHeaders("Database").Width <> 0 Then
-        m_databaseWidth = lvProcesses.ColumnHeaders("Database").Width
-        lvProcesses.ColumnHeaders("Database").Width = 0
-    End If
-    
-    If lvProcesses.ColumnHeaders("Computer").Width = 0 Then
-        lvProcesses.ColumnHeaders("Computer").Width = m_computerWidth
-    End If
-
-End Sub
-
-Private Sub setProcesses(ByRef c As Collection)
-    lvProcesses.ListItems.Clear
-    Dim p As Process
-    For Each p In c
-        Dim li As ListItem
-        Set li = lvProcesses.ListItems.Add(, "_" & p.m_computer.m_name & "_" & p.m_id, p.m_id)
-        li.SubItems(1) = p.m_computer.m_name
-        li.SubItems(2) = p.m_database
-        li.SubItems(3) = p.m_name
-        li.SubItems(4) = p.m_status
-        li.SubItems(5) = p.m_owner
-    Next
-End Sub
-
-Public Sub addComputer(ByRef c As Computer)
-    Dim icon As Integer
-    Select Case c.m_status
-    Case "No contact"
-        icon = 4
-    Case "Connected"
-        icon = 5
-    Case Else
-        icon = 3
-    End Select
-    
-    Dim li As ListItem
-    Set li = lvComputers.ListItems.Add(, "_" & c.m_name, c.m_name, icon, icon)
-    li.SubItems(1) = c.m_status
-    
-    tvTreeView.Nodes.Add "Computers", tvwChild, "_" & c.m_name, c.m_name, icon, icon
-End Sub
-
-Public Sub removeComputer(ByRef name As String)
-    lvComputers.ListItems.Remove "_" & name
-    tvTreeView.Nodes.Remove "_" & name
-    
-    '
-    ' Check if should remove database
-    Dim c As Computer
-    Set c = g_computers("_" & name)
-    Dim db As Database_
-    Dim dbs As New Collection
-    Dim p As Process
-    For Each p In c.m_processes
-        Set db = g_databases("_" & p.m_database)
-        db.m_processes.Remove "_" & p.m_computer.m_name & "_" & p.m_id
-        If Not Exists(dbs, p.m_database) Then dbs.Add db, p.m_database
-    Next
-
-    For Each db In dbs
-        If db.m_processes.Count = 0 Then
-            g_databases.Remove "_" & db.m_name
-            tvTreeView.Nodes.Remove "_" & db.m_name
-        End If
-    Next
-        
-    g_computers.Remove "_" & name
-    
-    '
-    ' Check if should remove database
-    
-    Dim n As MSComctlLib.Node
-    Set n = tvTreeView.SelectedItem
-    selectNode n
-End Sub
-
-Private Sub AddDatabase(ByRef c As Database_)
-    Dim li As ListItem
-    Set li = lvDatabases.ListItems.Add(, "_" & c.m_name, c.m_name, 9, 9)
-    li.SubItems(1) = c.m_status
-    tvTreeView.Nodes.Add "Databases", tvwChild, "_" & c.m_name, c.m_name, 9, 9
-End Sub
-
-Private Sub Form_Unload(Cancel As Integer)
-    Dim i As Integer
-
-
-    'close all sub forms
-    For i = Forms.Count - 1 To 1 Step -1
-        Unload Forms(i)
-    Next
-    If Me.WindowState <> vbMinimized Then
-        SaveSetting App.Title, "Settings", "MainLeft", Me.Left
-        SaveSetting App.Title, "Settings", "MainTop", Me.Top
-        SaveSetting App.Title, "Settings", "MainWidth", Me.Width
-        SaveSetting App.Title, "Settings", "MainHeight", Me.Height
-    End If
-End Sub
-
-Private Sub Form_Resize()
-    On Error Resume Next
-    If Me.Width < 3000 Then Me.Width = 3000
-    SizeControls imgSplitter.Left
-End Sub
-
-Private Sub imgSplitter_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
-    With imgSplitter
-        picSplitter.Move .Left, .Top, .Width \ 2, .Height - 20
-    End With
-    picSplitter.Visible = True
-    mbMoving = True
-End Sub
-
-Private Sub imgSplitter_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
-    Dim sglPos As Single
-    
-
-    If mbMoving Then
-        sglPos = X + imgSplitter.Left
-        If sglPos < sglSplitLimit Then
-            picSplitter.Left = sglSplitLimit
-        ElseIf sglPos > Me.Width - sglSplitLimit Then
-            picSplitter.Left = Me.Width - sglSplitLimit
-        Else
-            picSplitter.Left = sglPos
-        End If
-    End If
-End Sub
-
-
-Private Sub imgSplitter_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
-    SizeControls picSplitter.Left
-    picSplitter.Visible = False
-    mbMoving = False
-End Sub
-
-
-Private Sub TreeView1_DragDrop(Source As Control, X As Single, Y As Single)
-    If Source = imgSplitter Then
-        SizeControls X
-    End If
-End Sub
-
-
-Sub SizeControls(X As Single)
-    On Error Resume Next
-    
-    'set the width
-    If X < 1500 Then X = 1500
-    If X > (Me.Width - 1500) Then X = Me.Width - 1500
-    tvTreeView.Width = X
-    imgSplitter.Left = X
-    
-    Dim t_left, t_width As Integer
-    t_left = X + 40
-    t_width = Me.Width - (tvTreeView.Width + 140)
-    
-    lblTitle(0).Width = tvTreeView.Width
-    lblTitle(1).Left = t_left + 20
-    lblTitle(1).Width = t_width - 40
-
-
-    'set the top
-    If tbToolBar.Visible Then
-        tvTreeView.Top = tbToolBar.Height + picTitles.Height
-    Else
-        tvTreeView.Top = picTitles.Height
-    End If
-
-    
-    'set the height
-    If sbStatusBar.Visible Then
-        tvTreeView.Height = Me.ScaleHeight - (picTitles.Top + picTitles.Height + sbStatusBar.Height)
-    Else
-        tvTreeView.Height = Me.ScaleHeight - (picTitles.Top + picTitles.Height)
-    End If
-    
-
-    imgSplitter.Top = tvTreeView.Top
-    imgSplitter.Height = tvTreeView.Height
-    
-    setListDimensions t_left, t_width, tvTreeView.Top, tvTreeView.Height
-End Sub
-
-Private Sub setListView(ByVal f_View As Integer)
-    lvComputers.View = f_View
-    lvProcesses.View = f_View
-End Sub
-
-Private Sub setListDimensions(ByVal f_Left As Integer, ByVal f_Width As Integer, ByVal f_Top As Integer, ByVal f_Height As Integer)
-    With lvComputers
-        .Left = f_Left
-        .Width = f_Width
-        .Top = f_Top
-        .Height = f_Height
-    End With
-    With lvProcesses
-        .Left = f_Left
-        .Width = f_Width
-        .Top = f_Top
-        .Height = f_Height
-    End With
-    With lvDatabases
-        .Left = f_Left
-        .Width = f_Width
-        .Top = f_Top
-        .Height = f_Height
-    End With
-End Sub
-
-Private Sub tbToolBar_ButtonClick(ByVal Button As MSComctlLib.Button)
-    On Error Resume Next
-    Select Case Button.Key
-        Case "New database"
-            'ToDo: Add 'Back' button code.
-            mnuPopNewDatabase_Click
-        Case "Add computer"
-            'ToDo: Add 'Forward' button code.
-            frmNewComputer.Show vbModal, Me
-            Dim c As Computer
-            For Each c In frmNewComputer.m_hosts
-                addComputer c
-                g_computers.Add c, "_" & c.m_name
-            Next
-        Case "Properties"
-            mnuFileProperties_Click
-    End Select
-End Sub
-
-Private Sub mnuHelpAbout_Click()
-    frmAbout.Show vbModal, Me
-End Sub
-
-Private Sub mnuHelpSearchForHelpOn_Click()
-    Dim nRet As Integer
-
-
-    'if there is no helpfile for this project display a message to the user
-    'you can set the HelpFile for your application in the
-    'Project Properties dialog
-    If Len(App.HelpFile) = 0 Then
-        MsgBox "Unable to display Help Contents. There is no Help associated with this project.", vbInformation, Me.Caption
-    Else
-        On Error Resume Next
-        nRet = OSWinHelp(Me.hwnd, App.HelpFile, 261, 0)
-        If Err Then
-            MsgBox Err.Description
-        End If
-    End If
-
-End Sub
-
-Private Sub mnuHelpContents_Click()
-    Dim nRet As Integer
-
-
-    'if there is no helpfile for this project display a message to the user
-    'you can set the HelpFile for your application in the
-    'Project Properties dialog
-    If Len(App.HelpFile) = 0 Then
-        MsgBox "Unable to display Help Contents. There is no Help associated with this project.", vbInformation, Me.Caption
-    Else
-        On Error Resume Next
-        nRet = OSWinHelp(Me.hwnd, App.HelpFile, 3, 0)
-        If Err Then
-            MsgBox Err.Description
-        End If
-    End If
-
-End Sub
-
-
-Private Sub mnuViewWebBrowser_Click()
-    'ToDo: Add 'mnuViewWebBrowser_Click' code.
-    MsgBox "Add 'mnuViewWebBrowser_Click' code."
-End Sub
-
-Private Sub mnuViewOptions_Click()
-    frmOptions.Show vbModal, Me
-End Sub
-
-Private Sub mnuViewRefresh_Click()
-    'ToDo: Add 'mnuViewRefresh_Click' code.
-    MsgBox "Add 'mnuViewRefresh_Click' code."
-End Sub
-
-
-Private Sub mnuViewStatusBar_Click()
-    mnuViewStatusBar.Checked = Not mnuViewStatusBar.Checked
-    sbStatusBar.Visible = mnuViewStatusBar.Checked
-    SizeControls imgSplitter.Left
-End Sub
-
-Private Sub mnuViewToolbar_Click()
-    mnuViewToolbar.Checked = Not mnuViewToolbar.Checked
-    tbToolBar.Visible = mnuViewToolbar.Checked
-    SizeControls imgSplitter.Left
-End Sub
-
-Private Sub mnuEditInvertSelection_Click()
-    'ToDo: Add 'mnuEditInvertSelection_Click' code.
-    MsgBox "Add 'mnuEditInvertSelection_Click' code."
-End Sub
-
-Private Sub mnuEditSelectAll_Click()
-    'ToDo: Add 'mnuEditSelectAll_Click' code.
-    MsgBox "Add 'mnuEditSelectAll_Click' code."
-End Sub
-
-Private Sub mnuEditPasteSpecial_Click()
-    'ToDo: Add 'mnuEditPasteSpecial_Click' code.
-    MsgBox "Add 'mnuEditPasteSpecial_Click' code."
-End Sub
-
-Private Sub mnuEditPaste_Click()
-    'ToDo: Add 'mnuEditPaste_Click' code.
-    MsgBox "Add 'mnuEditPaste_Click' code."
-End Sub
-
-Private Sub mnuEditCopy_Click()
-    'ToDo: Add 'mnuEditCopy_Click' code.
-    MsgBox "Add 'mnuEditCopy_Click' code."
-End Sub
-
-Private Sub mnuEditCut_Click()
-    'ToDo: Add 'mnuEditCut_Click' code.
-    MsgBox "Add 'mnuEditCut_Click' code."
-End Sub
-
-Private Sub mnuEditUndo_Click()
-    'ToDo: Add 'mnuEditUndo_Click' code.
-    MsgBox "Add 'mnuEditUndo_Click' code."
-End Sub
-
-Private Sub mnuFileClose_Click()
-    'unload the form
-    Unload Me
-
-End Sub
-
-Private Sub mnuFileProperties_Click()
-    'ToDo: Add 'mnuFileProperties_Click' code.
-    MsgBox "Add 'mnuFileProperties_Click' code."
-End Sub
-
-Private Sub mnuFileRename_Click()
-    'ToDo: Add 'mnuFileRename_Click' code.
-    MsgBox "Add 'mnuFileRename_Click' code."
-End Sub
-
-Private Sub mnuFileDelete_Click()
-    'ToDo: Add 'mnuFileDelete_Click' code.
-    MsgBox "Add 'mnuFileDelete_Click' code."
-End Sub
-
-Private Sub mnuFileNew_Click()
-    'ToDo: Add 'mnuFileNew_Click' code.
-    MsgBox "Add 'mnuFileNew_Click' code."
-End Sub
-
-Private Sub mnuFileSendTo_Click()
-    'ToDo: Add 'mnuFileSendTo_Click' code.
-    MsgBox "Add 'mnuFileSendTo_Click' code."
-End Sub
-
-Private Sub mnuFileFind_Click()
-    'ToDo: Add 'mnuFileFind_Click' code.
-    MsgBox "Add 'mnuFileFind_Click' code."
-End Sub
-
-Private Sub mnuFileOpen_Click()
-    Dim sFile As String
-End Sub
-
-Private Sub mnuPopComputerProperties_Click()
-    mnuFileProperties_Click
-End Sub
-
-Private Sub mnuPopNewDatabase_Click()
-    frmNewDatabase1.Show vbModal, Me
-    frmNewDatabase2.Show vbModal, Me
-    frmNewDatabase3.Show vbModal, Me
-End Sub
-
-Private Sub mnuPopAddComputer_Click()
-    frmNewComputer.Show vbModal, Me
-    Dim c As Computer
-    For Each c In frmNewComputer.m_hosts
-        addComputer c
-        g_computers.Add c, "_" & c.m_name
-    Next
-End Sub
-
-Private Sub mnuPopSortComputers_Click()
-    If m_currentNode.Sorted = True Then
-        mnuPopSortComputers.Checked = False
-        m_currentNode.Sorted = False
-    Else
-        mnuPopSortComputers.Checked = True
-        m_currentNode.Sorted = True
-    End If
-End Sub
-
-Private Sub mnuPopRemoveComputer_Click()
-    Dim res As VbMsgBoxResult
-    Dim str As String
-    str = "Remove computer " & m_currentComputer.m_name
-    res = MsgBox(str, vbOKCancel, str)
-    If res = vbOK Then
-        removeComputer (m_currentComputer.m_name)
-    End If
-End Sub
-
-Private Sub mnuPopSortDatabases_Click()
-    If m_currentNode.Sorted = True Then
-        mnuPopSortDatabases.Checked = False
-        m_currentNode.Sorted = False
-    Else
-        mnuPopSortDatabases.Checked = True
-        m_currentNode.Sorted = True
-    End If
-End Sub
-
-Private Sub tvTreeView_BeforeLabelEdit(Cancel As Integer)
-    Cancel = True
-End Sub
-
-Private Sub tvTreeView_Collapse(ByVal Node As MSComctlLib.Node)
-    'MsgBox "tvTreeView_Collapse"
-End Sub
-
-Private Sub tvTreeView_Expand(ByVal Node As MSComctlLib.Node)
-    'MsgBox "tvTreeView_Expand"
-End Sub
-
-Private Sub tvTreeView_NodeClick(ByVal Node As MSComctlLib.Node)
-    selectNode Node
-End Sub
-
-Private Sub tvTreeView_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
-    'MsgBox "tvTreeView_MouseUp Button: " & Button & " Shift: " & Shift
-    Dim Node As MSComctlLib.Node
-    Dim place As Integer
-    
-    Set Node = tvTreeView.HitTest(X, Y)
-    place = selectNode(Node)
-    If Button = vbRightButton Then
-        ShowPopup place
-    End If
-End Sub
-
-Private Function selectNode(ByRef n As MSComctlLib.Node) As Integer
-    Dim list As ListView
-    Dim place As Integer
-    
-    If n Is Nothing Then
-        If Not m_currentNode Is Nothing Then
-            place = 1
-            m_currentNode.Selected = False
-        Else
-            place = 2
-        End If
-    Else
-        n.Selected = True
-        If n.Text = "Computers" Then
-            place = 3
-            Set list = lvComputers
-            lblTitle(1).Caption = "Computers"
-        ElseIf n.Text = "Databases" Then
-            place = 4
-            Set list = lvDatabases
-            lblTitle(1).Caption = "Databases"
-        ElseIf n.Parent.Text = "Computers" Then
-            place = 5
-            Set list = lvProcesses
-            setComputer (n.Key)
-        ElseIf n.Parent.Text = "Databases" Then
-            place = 6
-            Set list = lvProcesses
-            setDatabase (n.Key)
-        End If
-    
-        If m_currentList.hwnd <> list.hwnd Then
-            m_currentList.Visible = False
-            list.Visible = True
-            Set m_currentList = list
-        End If
-    End If
-    Set m_currentNode = n
-    selectNode = place
-End Function
-
-Private Sub lvComputers_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
-    Dim li As ListItem
-    Set li = lvComputers.HitTest(X, Y)
-    If Button = vbRightButton And Not li Is Nothing Then
-        Dim c As Computer
-        Set m_currentComputer = g_computers(li.Key)
-        ShowPopup 5
-    End If
-End Sub
-
-Private Sub ShowPopup(ByVal place As Integer)
-    Select Case place
-    Case 3
-        PopupMenu mnuPopComputers
-    Case 4
-        PopupMenu mnuPopDatabases
-    Case 5
-        mnuPopComputerName.Caption = m_currentComputer.m_name & ": " & m_currentComputer.m_status
-        Select Case m_currentComputer.m_status
-        Case "Connected"
-            mnuPopConnectComputer.Enabled = False
-            mnuPopDisconnectComputer.Enabled = True
-        Case "Connecting"
-            mnuPopConnectComputer.Enabled = False
-            mnuPopDisconnectComputer.Enabled = True
-        Case "Not connected"
-            mnuPopConnectComputer.Enabled = True
-            mnuPopDisconnectComputer.Enabled = False
-        Case "No contact"
-            mnuPopConnectComputer.Enabled = True
-            mnuPopDisconnectComputer.Enabled = False
-        Case Else
-            mnuPopConnectComputer.Enabled = False
-            mnuPopDisconnectComputer.Enabled = False
-        End Select
-        
-        PopupMenu mnuPopComputer, , , , mnuPopComputerName
-    End Select
-End Sub
-
-Private Sub lvComputers_BeforeLabelEdit(Cancel As Integer)
-    Cancel = True
-End Sub
-
-Private Sub lvProcesses_BeforeLabelEdit(Cancel As Integer)
-    Cancel = True
-End Sub
-
-Private Sub lvDatabases_BeforeLabelEdit(Cancel As Integer)
-    Cancel = True
-End Sub
-
-Private Sub ColumnClick(ByRef list As ListView, i As Integer)
-    i = i - 1
-    If list.SortKey = i Then
-        list.SortOrder = 1 - list.SortOrder
-    Else
-        list.SortKey = i
-    End If
-End Sub
-
-Private Sub lvComputers_ColumnClick(ByVal ColumnHeader As MSComctlLib.ColumnHeader)
-    ColumnClick lvComputers, ColumnHeader.Index
-End Sub
-
-Private Sub lvProcesses_ColumnClick(ByVal ColumnHeader As MSComctlLib.ColumnHeader)
-    ColumnClick lvProcesses, ColumnHeader.Index
-End Sub
-
-Private Sub lvDatabases_ColumnClick(ByVal ColumnHeader As MSComctlLib.ColumnHeader)
-    ColumnClick lvDatabases, ColumnHeader.Index
-End Sub
-
diff --git a/storage/ndb/src/cw/cpcc-win32/vb6/frmNewComputer.frm b/storage/ndb/src/cw/cpcc-win32/vb6/frmNewComputer.frm
deleted file mode 100644
index eae5802493c..00000000000
--- a/storage/ndb/src/cw/cpcc-win32/vb6/frmNewComputer.frm
+++ /dev/null
@@ -1,124 +0,0 @@
-VERSION 5.00
-Begin VB.Form frmNewComputer 
-   Caption         =   "Add computer"
-   ClientHeight    =   1545
-   ClientLeft      =   60
-   ClientTop       =   345
-   ClientWidth     =   4605
-   LinkTopic       =   "Form1"
-   ScaleHeight     =   1545
-   ScaleWidth      =   4605
-   StartUpPosition =   3  'Windows Default
-   Begin VB.CommandButton Command3 
-      Caption         =   "Apply"
-      Default         =   -1  'True
-      Height          =   360
-      Left            =   3240
-      TabIndex        =   4
-      Tag             =   "OK"
-      Top             =   840
-      Width           =   1140
-   End
-   Begin VB.CommandButton Command2 
-      Caption         =   "Cancel"
-      Height          =   360
-      Left            =   1920
-      TabIndex        =   3
-      Tag             =   "OK"
-      Top             =   840
-      Width           =   1140
-   End
-   Begin VB.CommandButton Command1 
-      Caption         =   "OK"
-      Height          =   360
-      Left            =   600
-      TabIndex        =   2
-      Tag             =   "OK"
-      Top             =   840
-      Width           =   1140
-   End
-   Begin VB.TextBox Text1 
-      Height          =   285
-      Left            =   1440
-      TabIndex        =   1
-      Top             =   240
-      Width           =   2925
-   End
-   Begin VB.Label lblLabels 
-      Caption         =   "Computer name:"
-      Height          =   255
-      Index           =   1
-      Left            =   120
-      TabIndex        =   0
-      Tag             =   "&User Name:"
-      Top             =   240
-      Width           =   1440
-   End
-End
-Attribute VB_Name = "frmNewComputer"
-Attribute VB_GlobalNameSpace = False
-Attribute VB_Creatable = False
-Attribute VB_PredeclaredId = True
-Attribute VB_Exposed = False
-Public m_hosts As New Collection
-
-Private Sub Form_Load()
-    If m_hosts.Count > 0 Then
-        For i = m_hosts.Count To 1 Step -1
-            m_hosts.Remove i
-        Next
-    End If
-End Sub
-
-Private Sub Command1_Click()
-    If Text1.Text = "" Then
-        MsgBox "Invalid hostname"
-        Exit Sub
-    End If
-    
-    If Exists(g_computers, "_" & Text1.Text) Then
-        MsgBox Text1.Text & " already exists"
-        Exit Sub
-    End If
-    
-    Dim c As New Computer
-    With c
-        .m_ip = ""
-        .m_name = Text1.Text
-        .m_status = "Not connected"
-        Set .m_processes = New Collection
-    End With
-    
-    m_hosts.Add c
-
-    Unload Me
-End Sub
-
-Private Sub Command2_Click()
-    Unload Me
-End Sub
-
-Private Sub Command3_Click()
-    If Text1.Text = "" Then
-        MsgBox "Invalid hostname"
-        Exit Sub
-    End If
-    
-    If Exists(g_computers, "_" & Text1.Text) Then
-        MsgBox Text1.Text & " already exists"
-        Exit Sub
-    End If
-    
-    Dim c As New Computer
-    With c
-        .m_ip = ""
-        .m_name = Text1.Text
-        .m_status = "Not connected"
-        Set .m_processes = New Collection
-    End With
-    
-    m_hosts.Add c
-
-    Text1.Text = ""
-End Sub
-
diff --git a/storage/ndb/src/cw/cpcc-win32/vb6/frmNewComputer.frx b/storage/ndb/src/cw/cpcc-win32/vb6/frmNewComputer.frx
deleted file mode 100644
index 593f4708db8..00000000000
Binary files a/storage/ndb/src/cw/cpcc-win32/vb6/frmNewComputer.frx and /dev/null differ
diff --git a/storage/ndb/src/cw/cpcc-win32/vb6/frmNewDatabase.frx b/storage/ndb/src/cw/cpcc-win32/vb6/frmNewDatabase.frx
deleted file mode 100644
index b20c2b651ae..00000000000
Binary files a/storage/ndb/src/cw/cpcc-win32/vb6/frmNewDatabase.frx and /dev/null differ
diff --git a/storage/ndb/src/cw/cpcc-win32/vb6/frmNewDatabase1.frm b/storage/ndb/src/cw/cpcc-win32/vb6/frmNewDatabase1.frm
deleted file mode 100644
index 3fa1fd4c4e8..00000000000
--- a/storage/ndb/src/cw/cpcc-win32/vb6/frmNewDatabase1.frm
+++ /dev/null
@@ -1,187 +0,0 @@
-VERSION 5.00
-Begin VB.Form frmNewDatabase1 
-   BorderStyle     =   5  'Sizable ToolWindow
-   Caption         =   "Nodes"
-   ClientHeight    =   3000
-   ClientLeft      =   2850
-   ClientTop       =   3450
-   ClientWidth     =   6240
-   LinkTopic       =   "Form1"
-   MaxButton       =   0   'False
-   MinButton       =   0   'False
-   ScaleHeight     =   3281.25
-   ScaleMode       =   0  'User
-   ScaleWidth      =   6359.712
-   ShowInTaskbar   =   0   'False
-   StartUpPosition =   2  'CenterScreen
-   Begin VB.TextBox textApiNodes 
-      Height          =   285
-      Left            =   2760
-      TabIndex        =   12
-      Text            =   "4"
-      Top             =   1665
-      Width           =   375
-   End
-   Begin VB.VScrollBar VScroll1 
-      Height          =   255
-      Left            =   3240
-      TabIndex        =   11
-      Top             =   1680
-      Width           =   135
-   End
-   Begin VB.OptionButton Option4 
-      Alignment       =   1  'Right Justify
-      Caption         =   "1"
-      Height          =   375
-      Left            =   2760
-      TabIndex        =   10
-      Top             =   1020
-      Width           =   375
-   End
-   Begin VB.OptionButton Option3 
-      Alignment       =   1  'Right Justify
-      Caption         =   "4"
-      Height          =   375
-      Left            =   3960
-      TabIndex        =   9
-      Top             =   360
-      Width           =   375
-   End
-   Begin VB.OptionButton Option2 
-      Alignment       =   1  'Right Justify
-      Caption         =   "2"
-      Height          =   375
-      Left            =   3360
-      TabIndex        =   8
-      Top             =   360
-      Width           =   375
-   End
-   Begin VB.OptionButton Option1 
-      Alignment       =   1  'Right Justify
-      Caption         =   "1"
-      Height          =   375
-      Left            =   2760
-      TabIndex        =   7
-      Top             =   360
-      Value           =   -1  'True
-      Width           =   375
-   End
-   Begin VB.CommandButton cmdCancel 
-      Cancel          =   -1  'True
-      Caption         =   "Cancel"
-      Height          =   305
-      Left            =   1320
-      TabIndex        =   3
-      Top             =   2400
-      Width           =   1140
-   End
-   Begin VB.CommandButton cmdFinish 
-      Caption         =   "Finish"
-      Enabled         =   0   'False
-      Height          =   305
-      Left            =   5040
-      TabIndex        =   2
-      Top             =   2400
-      Width           =   1140
-   End
-   Begin VB.CommandButton cmdBack 
-      Caption         =   "Back"
-      Default         =   -1  'True
-      Enabled         =   0   'False
-      Height          =   305
-      Left            =   2640
-      TabIndex        =   0
-      Top             =   2400
-      Width           =   1140
-   End
-   Begin VB.CommandButton cmdNext 
-      Caption         =   "Next"
-      Height          =   305
-      Left            =   3720
-      TabIndex        =   1
-      Top             =   2400
-      Width           =   1140
-   End
-   Begin VB.Label Label3 
-      Caption         =   "No of api nodes"
-      Height          =   255
-      Left            =   240
-      TabIndex        =   6
-      Top             =   1680
-      Width           =   2415
-   End
-   Begin VB.Label Label2 
-      Caption         =   "No of management nodes"
-      Height          =   255
-      Left            =   240
-      TabIndex        =   5
-      Top             =   1080
-      Width           =   2415
-   End
-   Begin VB.Label Label1 
-      Caption         =   "No of database nodes"
-      Height          =   255
-      Left            =   240
-      TabIndex        =   4
-      Top             =   420
-      Width           =   2415
-   End
-   Begin VB.Line Line1 
-      BorderColor     =   &H80000003&
-      X1              =   122.302
-      X2              =   6237.41
-      Y1              =   2493.75
-      Y2              =   2493.75
-   End
-End
-Attribute VB_Name = "frmNewDatabase1"
-Attribute VB_GlobalNameSpace = False
-Attribute VB_Creatable = False
-Attribute VB_PredeclaredId = True
-Attribute VB_Exposed = False
-Option Explicit
-
-Private Sub Form_Resize()
-    If Me.Width < 6375 Then Me.Width = 6375
-    cmdCancel.Left = Me.ScaleWidth - 5136 + 400
-    cmdBack.Left = Me.ScaleWidth - 3897 + 400
-    cmdNext.Left = Me.ScaleWidth - 2883 + 400
-    cmdFinish.Left = Me.ScaleWidth - 1643 + 400
-    Line1.X2 = Me.ScaleWidth - 480 + 400
-    
-    cmdCancel.Top = Me.ScaleHeight - 375
-    cmdBack.Top = Me.ScaleHeight - 375
-    cmdNext.Top = Me.ScaleHeight - 375
-    cmdFinish.Top = Me.ScaleHeight - 375
-    Line1.Y1 = Me.ScaleHeight - 475
-    Line1.Y2 = Me.ScaleHeight - 475
-End Sub
-
-Private Sub cmdCancel_Click()
-    'set the global var to false
-    'to denote a failed login
-    Unload Me
-End Sub
-
-Private Sub Option1_Click()
-    Option2.Value = False
-    Option3.Value = False
-End Sub
-
-Private Sub Option2_Click()
-    Option1.Value = False
-    Option3.Value = False
-End Sub
-
-Private Sub Option3_Click()
-    Option1.Value = False
-    Option2.Value = False
-End Sub
-
-Private Sub Option4_Click()
-    Option4.Value = True
-End Sub
-
-Private Sub textApiNodes_Validate(Cancel As Boolean)
-    'If Not isnumber(textApiNodes.Text) Then Cancel = False
-End Sub
diff --git a/storage/ndb/src/cw/cpcc-win32/vb6/frmNewDatabase2.frm b/storage/ndb/src/cw/cpcc-win32/vb6/frmNewDatabase2.frm
deleted file mode 100644
index 49806a695ea..00000000000
--- a/storage/ndb/src/cw/cpcc-win32/vb6/frmNewDatabase2.frm
+++ /dev/null
@@ -1,136 +0,0 @@
-VERSION 5.00
-Begin VB.Form frmNewDatabase2 
-   BorderStyle     =   5  'Sizable ToolWindow
-   Caption         =   "Computers"
-   ClientHeight    =   2895
-   ClientLeft      =   2850
-   ClientTop       =   3450
-   ClientWidth     =   6240
-   LinkTopic       =   "Form1"
-   MaxButton       =   0   'False
-   MinButton       =   0   'False
-   ScaleHeight     =   3166.406
-   ScaleMode       =   0  'User
-   ScaleWidth      =   6359.712
-   ShowInTaskbar   =   0   'False
-   StartUpPosition =   2  'CenterScreen
-   Begin VB.ComboBox Combo1 
-      Height          =   315
-      Left            =   2400
-      TabIndex        =   7
-      Text            =   "Combo1"
-      Top             =   360
-      Width           =   1455
-   End
-   Begin VB.VScrollBar VScroll2 
-      Height          =   255
-      Left            =   4560
-      TabIndex        =   6
-      Top             =   375
-      Width           =   135
-   End
-   Begin VB.TextBox Text1 
-      Height          =   285
-      Left            =   4080
-      TabIndex        =   5
-      Text            =   "4"
-      Top             =   360
-      Width           =   375
-   End
-   Begin VB.CommandButton cmdCancel 
-      Cancel          =   -1  'True
-      Caption         =   "Cancel"
-      Height          =   305
-      Left            =   1320
-      TabIndex        =   3
-      Top             =   2400
-      Width           =   1140
-   End
-   Begin VB.CommandButton cmdFinish 
-      Caption         =   "Finish"
-      Enabled         =   0   'False
-      Height          =   305
-      Left            =   5040
-      TabIndex        =   2
-      Top             =   2400
-      Width           =   1140
-   End
-   Begin VB.CommandButton cmdBack 
-      Caption         =   "Back"
-      Default         =   -1  'True
-      Enabled         =   0   'False
-      Height          =   305
-      Left            =   2640
-      TabIndex        =   0
-      Top             =   2400
-      Width           =   1140
-   End
-   Begin VB.CommandButton cmdNext 
-      Caption         =   "Next"
-      Height          =   305
-      Left            =   3720
-      TabIndex        =   1
-      Top             =   2400
-      Width           =   1140
-   End
-   Begin VB.Label Label5 
-      Caption         =   "Computer"
-      Height          =   255
-      Left            =   2400
-      TabIndex        =   9
-      Top             =   0
-      Width           =   975
-   End
-   Begin VB.Label Label4 
-      Caption         =   "Node id"
-      Height          =   255
-      Left            =   4080
-      TabIndex        =   8
-      Top             =   120
-      Width           =   615
-   End
-   Begin VB.Label Label1 
-      Caption         =   "Database node 1"
-      Height          =   255
-      Left            =   240
-      TabIndex        =   4
-      Top             =   420
-      Width           =   2415
-   End
-   Begin VB.Line Line1 
-      BorderColor     =   &H80000003&
-      X1              =   122.302
-      X2              =   6237.41
-      Y1              =   2493.75
-      Y2              =   2493.75
-   End
-End
-Attribute VB_Name = "frmNewDatabase2"
-Attribute VB_GlobalNameSpace = False
-Attribute VB_Creatable = False
-Attribute VB_PredeclaredId = True
-Attribute VB_Exposed = False
-Option Explicit
-
-Private Sub Form_Resize()
-    If Me.Width < 6375 Then Me.Width = 6375
-    cmdCancel.Left = Me.ScaleWidth - 5136 + 400
-    cmdBack.Left = Me.ScaleWidth - 3897 + 400
-    cmdNext.Left = Me.ScaleWidth - 2883 + 400
-    cmdFinish.Left = Me.ScaleWidth - 1643 + 400
-    Line1.X2 = Me.ScaleWidth - 480 + 400
-    
-    cmdCancel.Top = Me.ScaleHeight - 375
-    cmdBack.Top = Me.ScaleHeight - 375
-    cmdNext.Top = Me.ScaleHeight - 375
-    cmdFinish.Top = Me.ScaleHeight - 375
-    Line1.Y1 = Me.ScaleHeight - 475
-    Line1.Y2 = Me.ScaleHeight - 475
-End Sub
-
-Private Sub cmdCancel_Click()
-    'set the global var to false
-    'to denote a failed login
-    Unload Me
-End Sub
-
diff --git a/storage/ndb/src/cw/cpcc-win32/vb6/frmNewDatabase2.log b/storage/ndb/src/cw/cpcc-win32/vb6/frmNewDatabase2.log
deleted file mode 100644
index 808b21866e5..00000000000
--- a/storage/ndb/src/cw/cpcc-win32/vb6/frmNewDatabase2.log
+++ /dev/null
@@ -1 +0,0 @@
-Line 2: The Form or MDIForm name frmNewDatabase1 is already in use; cannot load this form.
diff --git a/storage/ndb/src/cw/cpcc-win32/vb6/frmNewDatabase3.frm b/storage/ndb/src/cw/cpcc-win32/vb6/frmNewDatabase3.frm
deleted file mode 100644
index ba050a58a09..00000000000
--- a/storage/ndb/src/cw/cpcc-win32/vb6/frmNewDatabase3.frm
+++ /dev/null
@@ -1,88 +0,0 @@
-VERSION 5.00
-Begin VB.Form frmNewDatabase3 
-   BorderStyle     =   5  'Sizable ToolWindow
-   Caption         =   "Database configuration"
-   ClientHeight    =   3000
-   ClientLeft      =   2850
-   ClientTop       =   3450
-   ClientWidth     =   6240
-   LinkTopic       =   "Form1"
-   MaxButton       =   0   'False
-   MinButton       =   0   'False
-   ScaleHeight     =   3281.25
-   ScaleMode       =   0  'User
-   ScaleWidth      =   6359.712
-   ShowInTaskbar   =   0   'False
-   StartUpPosition =   2  'CenterScreen
-   Begin VB.CommandButton cmdCancel 
-      Cancel          =   -1  'True
-      Caption         =   "Cancel"
-      Height          =   305
-      Left            =   1320
-      TabIndex        =   3
-      Top             =   2400
-      Width           =   1140
-   End
-   Begin VB.CommandButton cmdFinish 
-      Caption         =   "Finish"
-      Enabled         =   0   'False
-      Height          =   305
-      Left            =   5040
-      TabIndex        =   2
-      Top             =   2400
-      Width           =   1140
-   End
-   Begin VB.CommandButton cmdBack 
-      Caption         =   "Back"
-      Default         =   -1  'True
-      Enabled         =   0   'False
-      Height          =   305
-      Left            =   2640
-      TabIndex        =   0
-      Top             =   2400
-      Width           =   1140
-   End
-   Begin VB.CommandButton cmdNext 
-      Caption         =   "Next"
-      Height          =   305
-      Left            =   3720
-      TabIndex        =   1
-      Top             =   2400
-      Width           =   1140
-   End
-   Begin VB.Line Line1 
-      BorderColor     =   &H80000003&
-      X1              =   122.302
-      X2              =   6237.41
-      Y1              =   2493.75
-      Y2              =   2493.75
-   End
-End
-Attribute VB_Name = "frmNewDatabase3"
-Attribute VB_GlobalNameSpace = False
-Attribute VB_Creatable = False
-Attribute VB_PredeclaredId = True
-Attribute VB_Exposed = False
-Option Explicit
-
-Private Sub Form_Resize()
-    If Me.Width < 6375 Then Me.Width = 6375
-    cmdCancel.Left = Me.ScaleWidth - 5136 + 400
-    cmdBack.Left = Me.ScaleWidth - 3897 + 400
-    cmdNext.Left = Me.ScaleWidth - 2883 + 400
-    cmdFinish.Left = Me.ScaleWidth - 1643 + 400
-    Line1.X2 = Me.ScaleWidth - 480 + 400
-    
-    cmdCancel.Top = Me.ScaleHeight - 375
-    cmdBack.Top = Me.ScaleHeight - 375
-    cmdNext.Top = Me.ScaleHeight - 375
-    cmdFinish.Top = Me.ScaleHeight - 375
-    Line1.Y1 = Me.ScaleHeight - 475
-    Line1.Y2 = Me.ScaleHeight - 475
-End Sub
-
-Private Sub cmdCancel_Click()
-    'set the global var to false
-    'to denote a failed login
-    Unload Me
-End Sub
diff --git a/storage/ndb/src/cw/cpcc-win32/vb6/frmOptions.frm b/storage/ndb/src/cw/cpcc-win32/vb6/frmOptions.frm
deleted file mode 100644
index e526a35b3ec..00000000000
--- a/storage/ndb/src/cw/cpcc-win32/vb6/frmOptions.frm
+++ /dev/null
@@ -1,231 +0,0 @@
-VERSION 5.00
-Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
-Begin VB.Form frmOptions 
-   BorderStyle     =   3  'Fixed Dialog
-   Caption         =   "Options"
-   ClientHeight    =   5040
-   ClientLeft      =   6600
-   ClientTop       =   4575
-   ClientWidth     =   6150
-   KeyPreview      =   -1  'True
-   LinkTopic       =   "Form1"
-   MaxButton       =   0   'False
-   MinButton       =   0   'False
-   ScaleHeight     =   5040
-   ScaleWidth      =   6150
-   ShowInTaskbar   =   0   'False
-   Tag             =   "Options"
-   Begin VB.CommandButton cmdOK 
-      Caption         =   "OK"
-      Height          =   375
-      Left            =   2490
-      TabIndex        =   1
-      Tag             =   "OK"
-      Top             =   4455
-      Width           =   1095
-   End
-   Begin VB.CommandButton cmdCancel 
-      Cancel          =   -1  'True
-      Caption         =   "Cancel"
-      Height          =   375
-      Left            =   3720
-      TabIndex        =   3
-      Tag             =   "Cancel"
-      Top             =   4455
-      Width           =   1095
-   End
-   Begin VB.CommandButton cmdApply 
-      Caption         =   "&Apply"
-      Height          =   375
-      Left            =   4920
-      TabIndex        =   5
-      Tag             =   "&Apply"
-      Top             =   4455
-      Width           =   1095
-   End
-   Begin VB.PictureBox picOptions 
-      BorderStyle     =   0  'None
-      Height          =   3780
-      Index           =   3
-      Left            =   -20000
-      ScaleHeight     =   3840.968
-      ScaleMode       =   0  'User
-      ScaleWidth      =   5745.64
-      TabIndex        =   7
-      TabStop         =   0   'False
-      Top             =   480
-      Width           =   5685
-      Begin VB.Frame fraSample4 
-         Caption         =   "Sample 4"
-         Height          =   2022
-         Left            =   505
-         TabIndex        =   11
-         Tag             =   "Sample 4"
-         Top             =   502
-         Width           =   2033
-      End
-   End
-   Begin VB.PictureBox picOptions 
-      BorderStyle     =   0  'None
-      Height          =   3780
-      Index           =   2
-      Left            =   -20000
-      ScaleHeight     =   3840.968
-      ScaleMode       =   0  'User
-      ScaleWidth      =   5745.64
-      TabIndex        =   9
-      TabStop         =   0   'False
-      Top             =   480
-      Width           =   5685
-      Begin VB.Frame fraSample3 
-         Caption         =   "Sample 3"
-         Height          =   2022
-         Left            =   406
-         TabIndex        =   10
-         Tag             =   "Sample 3"
-         Top             =   403
-         Width           =   2033
-      End
-   End
-   Begin VB.PictureBox picOptions 
-      BorderStyle     =   0  'None
-      Height          =   3780
-      Index           =   1
-      Left            =   -20000
-      ScaleHeight     =   3840.968
-      ScaleMode       =   0  'User
-      ScaleWidth      =   5745.64
-      TabIndex        =   6
-      TabStop         =   0   'False
-      Top             =   480
-      Width           =   5685
-      Begin VB.Frame fraSample2 
-         Caption         =   "Sample 2"
-         Height          =   2022
-         Left            =   307
-         TabIndex        =   8
-         Tag             =   "Sample 2"
-         Top             =   305
-         Width           =   2033
-      End
-   End
-   Begin VB.PictureBox picOptions 
-      BorderStyle     =   0  'None
-      Height          =   3780
-      Index           =   0
-      Left            =   210
-      ScaleHeight     =   3840.968
-      ScaleMode       =   0  'User
-      ScaleWidth      =   5745.64
-      TabIndex        =   2
-      TabStop         =   0   'False
-      Top             =   480
-      Width           =   5685
-      Begin VB.Frame fraSample1 
-         Caption         =   "Sample 1"
-         Height          =   2022
-         Left            =   208
-         TabIndex        =   4
-         Tag             =   "Sample 1"
-         Top             =   207
-         Width           =   2033
-      End
-   End
-   Begin MSComctlLib.TabStrip tbsOptions 
-      Height          =   4245
-      Left            =   105
-      TabIndex        =   0
-      Top             =   120
-      Width           =   5895
-      _ExtentX        =   10398
-      _ExtentY        =   7488
-      _Version        =   393216
-      BeginProperty Tabs {1EFB6598-857C-11D1-B16A-00C0F0283628} 
-         NumTabs         =   4
-         BeginProperty Tab1 {1EFB659A-857C-11D1-B16A-00C0F0283628} 
-            Caption         =   "Group 1"
-            ImageVarType    =   2
-         EndProperty
-         BeginProperty Tab2 {1EFB659A-857C-11D1-B16A-00C0F0283628} 
-            Caption         =   "Group 2"
-            ImageVarType    =   2
-         EndProperty
-         BeginProperty Tab3 {1EFB659A-857C-11D1-B16A-00C0F0283628} 
-            Caption         =   "Group 3"
-            ImageVarType    =   2
-         EndProperty
-         BeginProperty Tab4 {1EFB659A-857C-11D1-B16A-00C0F0283628} 
-            Caption         =   "Group 4"
-            ImageVarType    =   2
-         EndProperty
-      EndProperty
-   End
-End
-Attribute VB_Name = "frmOptions"
-Attribute VB_GlobalNameSpace = False
-Attribute VB_Creatable = False
-Attribute VB_PredeclaredId = True
-Attribute VB_Exposed = False
-Private Sub cmdApply_Click()
-    'ToDo: Add 'cmdApply_Click' code.
-    MsgBox "Apply Code goes here to set options w/o closing dialog!"
-End Sub
-
-
-Private Sub cmdCancel_Click()
-    Unload Me
-End Sub
-
-
-Private Sub cmdOK_Click()
-    'ToDo: Add 'cmdOK_Click' code.
-    MsgBox "Code goes here to set options and close dialog!"
-    Unload Me
-End Sub
-
-
-Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
-    Dim i As Integer
-    i = tbsOptions.SelectedItem.Index
-    'handle ctrl+tab to move to the next tab
-    If (Shift And 3) = 2 And KeyCode = vbKeyTab Then
-        If i = tbsOptions.Tabs.Count Then
-            'last tab so we need to wrap to tab 1
-            Set tbsOptions.SelectedItem = tbsOptions.Tabs(1)
-        Else
-            'increment the tab
-            Set tbsOptions.SelectedItem = tbsOptions.Tabs(i + 1)
-        End If
-    ElseIf (Shift And 3) = 3 And KeyCode = vbKeyTab Then
-        If i = 1 Then
-            'last tab so we need to wrap to tab 1
-            Set tbsOptions.SelectedItem = tbsOptions.Tabs(tbsOptions.Tabs.Count)
-        Else
-            'increment the tab
-            Set tbsOptions.SelectedItem = tbsOptions.Tabs(i - 1)
-        End If
-    End If
-End Sub
-
-
-
-
-Private Sub tbsOptions_Click()
-    
-
-    Dim i As Integer
-    'show and enable the selected tab's controls
-    'and hide and disable all others
-    For i = 0 To tbsOptions.Tabs.Count - 1
-        If i = tbsOptions.SelectedItem.Index - 1 Then
-            picOptions(i).Left = 210
-            picOptions(i).Enabled = True
-        Else
-            picOptions(i).Left = -20000
-            picOptions(i).Enabled = False
-        End If
-    Next
-    
-
-End Sub
-
diff --git a/storage/ndb/src/cw/cpcc-win32/vb6/frmSplash.frx b/storage/ndb/src/cw/cpcc-win32/vb6/frmSplash.frx
deleted file mode 100644
index fee0c5c59de..00000000000
Binary files a/storage/ndb/src/cw/cpcc-win32/vb6/frmSplash.frx and /dev/null differ
diff --git a/storage/ndb/src/cw/cpcc-win32/vb6/networking.ico b/storage/ndb/src/cw/cpcc-win32/vb6/networking.ico
deleted file mode 100644
index 6bbf8022fc6..00000000000
Binary files a/storage/ndb/src/cw/cpcc-win32/vb6/networking.ico and /dev/null differ
diff --git a/storage/ndb/src/cw/cpcc-win32/vb6/open folder.ico b/storage/ndb/src/cw/cpcc-win32/vb6/open folder.ico
deleted file mode 100644
index 7bb32cc83d3..00000000000
Binary files a/storage/ndb/src/cw/cpcc-win32/vb6/open folder.ico and /dev/null differ
diff --git a/storage/ndb/src/libndb.ver.in b/storage/ndb/src/libndb.ver.in
index 72bf93d196f..c7b97876d44 100644
--- a/storage/ndb/src/libndb.ver.in
+++ b/storage/ndb/src/libndb.ver.in
@@ -1,2 +1,17 @@
+# Copyright (C) 2007 MySQL AB
+# 
+# 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
+
 libndbclient_@NDB_SHARED_LIB_MAJOR_VERSION@ { global: *; };
 
diff --git a/storage/ndb/test/ndbapi/slow_select.cpp b/storage/ndb/test/ndbapi/slow_select.cpp
index 8d615fa5771..21e3ce7400c 100644
--- a/storage/ndb/test/ndbapi/slow_select.cpp
+++ b/storage/ndb/test/ndbapi/slow_select.cpp
@@ -1,3 +1,17 @@
+/* Copyright (C) 2004, 2005 MySQL AB
+
+   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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
 #include 
 #include 
diff --git a/storage/ndb/test/ndbapi/testBitfield.cpp b/storage/ndb/test/ndbapi/testBitfield.cpp
index 41bb7b4622c..27ee870705f 100644
--- a/storage/ndb/test/ndbapi/testBitfield.cpp
+++ b/storage/ndb/test/ndbapi/testBitfield.cpp
@@ -1,3 +1,17 @@
+/* Copyright (C) 2004, 2008 MySQL AB
+
+   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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
 #include 
 #include 
diff --git a/storage/ndb/test/ndbapi/testLcp.cpp b/storage/ndb/test/ndbapi/testLcp.cpp
index 69789b0191f..d8bf1611dfb 100644
--- a/storage/ndb/test/ndbapi/testLcp.cpp
+++ b/storage/ndb/test/ndbapi/testLcp.cpp
@@ -1,3 +1,17 @@
+/* Copyright (C) 2004, 2005 MySQL AB
+
+   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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
 #include 
 #include 
diff --git a/storage/ndb/test/ndbnet/test.run b/storage/ndb/test/ndbnet/test.run
index 30042488c92..195a657aeb5 100644
--- a/storage/ndb/test/ndbnet/test.run
+++ b/storage/ndb/test/ndbnet/test.run
@@ -1,3 +1,18 @@
+# Copyright (C) 2004 MySQL AB
 #
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library 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
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the Free
+# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+# MA 02111-1307, USA
 
 system("printenv|sort");
diff --git a/storage/ndb/test/ndbnet/testError.run b/storage/ndb/test/ndbnet/testError.run
index 3cce489a3da..6ace2cbbd20 100644
--- a/storage/ndb/test/ndbnet/testError.run
+++ b/storage/ndb/test/ndbnet/testError.run
@@ -1,3 +1,20 @@
+# Copyright (C) 2004 MySQL AB
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library 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
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the Free
+# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+# MA 02111-1307, USA
+
 #
 # file : test/ndbnet/testError.run
 # usage: perl testError.run
diff --git a/storage/ndb/test/ndbnet/testMNF.run b/storage/ndb/test/ndbnet/testMNF.run
index df226cd3359..2903313f306 100644
--- a/storage/ndb/test/ndbnet/testMNF.run
+++ b/storage/ndb/test/ndbnet/testMNF.run
@@ -1,3 +1,20 @@
+# Copyright (C) 2004 MySQL AB
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library 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
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the Free
+# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+# MA 02111-1307, USA
+
 #
 # file : test/ndbnet/testError.run
 # usage: perl testError.run
diff --git a/storage/ndb/test/ndbnet/testNR.run b/storage/ndb/test/ndbnet/testNR.run
index 01a3d76266d..5019f597b42 100644
--- a/storage/ndb/test/ndbnet/testNR.run
+++ b/storage/ndb/test/ndbnet/testNR.run
@@ -1,4 +1,19 @@
+# Copyright (C) 2004 MySQL AB
 #
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library 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
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the Free
+# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+# MA 02111-1307, USA
 
 use strict;
 use NDB::Run;
diff --git a/storage/ndb/test/ndbnet/testNR1.run b/storage/ndb/test/ndbnet/testNR1.run
index 8819a92c8ca..a02b487b663 100644
--- a/storage/ndb/test/ndbnet/testNR1.run
+++ b/storage/ndb/test/ndbnet/testNR1.run
@@ -1,3 +1,20 @@
+# Copyright (C) 2004 MySQL AB
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library 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
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the Free
+# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+# MA 02111-1307, USA
+
 # Node recovery killing 1 node out of 4 at the time and waiting for recover
 
 use strict;
diff --git a/storage/ndb/test/ndbnet/testNR4.run b/storage/ndb/test/ndbnet/testNR4.run
index f7a5eef3494..378d2743145 100644
--- a/storage/ndb/test/ndbnet/testNR4.run
+++ b/storage/ndb/test/ndbnet/testNR4.run
@@ -1,3 +1,20 @@
+# Copyright (C) 2004 MySQL AB
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library 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
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the Free
+# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+# MA 02111-1307, USA
+
 # Node recovery killing 1 node out of 4 at the time and waiting for recover
 
 use strict;
diff --git a/storage/ndb/test/ndbnet/testSRhang.run b/storage/ndb/test/ndbnet/testSRhang.run
index 8cb65a75ded..570ed897eef 100644
--- a/storage/ndb/test/ndbnet/testSRhang.run
+++ b/storage/ndb/test/ndbnet/testSRhang.run
@@ -1,4 +1,19 @@
+# Copyright (C) 2004 MySQL AB
 #
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library 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
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the Free
+# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+# MA 02111-1307, USA
 
 use strict;
 use NDB::Run;
diff --git a/storage/ndb/test/ndbnet/testTR295.run b/storage/ndb/test/ndbnet/testTR295.run
index ce4250b60ae..df26000cbda 100644
--- a/storage/ndb/test/ndbnet/testTR295.run
+++ b/storage/ndb/test/ndbnet/testTR295.run
@@ -1,3 +1,20 @@
+# Copyright (C) 2004 MySQL AB
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library 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
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the Free
+# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+# MA 02111-1307, USA
+
 # testing TR295, kill non-master when recovering in phase 4
 
 use strict;
diff --git a/storage/ndb/test/run-test/16node-tests.txt b/storage/ndb/test/run-test/16node-tests.txt
index 11ade56c28c..21dd67c9b4b 100644
--- a/storage/ndb/test/run-test/16node-tests.txt
+++ b/storage/ndb/test/run-test/16node-tests.txt
@@ -1,3 +1,18 @@
+# Copyright (C) 2005 MySQL AB
+# 
+# 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
+
 # BASIC FUNCTIONALITY
 max-time: 500
 cmd: testBasic
diff --git a/storage/ndb/test/run-test/atrt-analyze-result.sh b/storage/ndb/test/run-test/atrt-analyze-result.sh
index 0fa46e918ef..9a482faee86 100755
--- a/storage/ndb/test/run-test/atrt-analyze-result.sh
+++ b/storage/ndb/test/run-test/atrt-analyze-result.sh
@@ -1,5 +1,22 @@
 #!/bin/sh
 
+# Copyright (C) 2004 MySQL AB
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library 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
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the Free
+# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+# MA 02111-1307, USA
+
 f=`find result -name 'log.out' | xargs grep "NDBT_ProgramExit: " | grep -c "Failed"`
 o=`find result -name 'log.out' | xargs grep "NDBT_ProgramExit: " | grep -c "OK"`
 
diff --git a/storage/ndb/test/run-test/atrt-clear-result.sh b/storage/ndb/test/run-test/atrt-clear-result.sh
index 57d3d43d247..7eeb54daef3 100755
--- a/storage/ndb/test/run-test/atrt-clear-result.sh
+++ b/storage/ndb/test/run-test/atrt-clear-result.sh
@@ -1,4 +1,21 @@
 #!/bin/sh
 
+# Copyright (C) 2004 MySQL AB
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library 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
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the Free
+# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+# MA 02111-1307, USA
+
 set -e
 rm -rf result
diff --git a/storage/ndb/test/run-test/atrt-gather-result.sh b/storage/ndb/test/run-test/atrt-gather-result.sh
index f2473578b41..36989d04c07 100755
--- a/storage/ndb/test/run-test/atrt-gather-result.sh
+++ b/storage/ndb/test/run-test/atrt-gather-result.sh
@@ -1,5 +1,22 @@
 #!/bin/sh
 
+# Copyright (C) 2004 MySQL AB
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library 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
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the Free
+# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+# MA 02111-1307, USA
+
 set -e
 
 mkdir -p result
diff --git a/storage/ndb/test/run-test/atrt-mysql-test-run b/storage/ndb/test/run-test/atrt-mysql-test-run
index 2ebc11b0070..55afc45bef9 100755
--- a/storage/ndb/test/run-test/atrt-mysql-test-run
+++ b/storage/ndb/test/run-test/atrt-mysql-test-run
@@ -1,5 +1,22 @@
 #!/bin/sh
 
+# Copyright (C) 2004, 2005 MySQL AB
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library 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
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the Free
+# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+# MA 02111-1307, USA
+
 set -x
 p=`pwd`
 cd $MYSQL_BASE_DIR/mysql-test 
diff --git a/storage/ndb/test/run-test/atrt-setup.sh b/storage/ndb/test/run-test/atrt-setup.sh
index aff5d4119dc..786b1d812de 100755
--- a/storage/ndb/test/run-test/atrt-setup.sh
+++ b/storage/ndb/test/run-test/atrt-setup.sh
@@ -1,5 +1,22 @@
 #!/bin/sh
 
+# Copyright (C) 2004 MySQL AB
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library 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
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the Free
+# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+# MA 02111-1307, USA
+
 set -e
 
 ssh $1 mkdir -p $3
diff --git a/storage/ndb/test/run-test/atrt-testBackup b/storage/ndb/test/run-test/atrt-testBackup
index 3ed7641a42e..2ed6f70b7aa 100755
--- a/storage/ndb/test/run-test/atrt-testBackup
+++ b/storage/ndb/test/run-test/atrt-testBackup
@@ -1,5 +1,22 @@
 #!/bin/sh
 
+# Copyright (C) 2004 MySQL AB
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library 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
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the Free
+# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+# MA 02111-1307, USA
+
 PATH=$PATH:$MYSQL_BASE_DIR/bin
 export PATH
 
diff --git a/storage/ndb/test/run-test/basic.txt b/storage/ndb/test/run-test/basic.txt
index ec9e21359e5..69555b8c587 100644
--- a/storage/ndb/test/run-test/basic.txt
+++ b/storage/ndb/test/run-test/basic.txt
@@ -1,3 +1,18 @@
+# Copyright (C) 2004, 2005 MySQL AB
+# 
+# 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
+
 # BASIC FUNCTIONALITY
 max-time: 500
 cmd: testBasic
diff --git a/storage/ndb/test/run-test/daily-basic-tests.txt b/storage/ndb/test/run-test/daily-basic-tests.txt
index 70c395fab17..84c1111bd78 100644
--- a/storage/ndb/test/run-test/daily-basic-tests.txt
+++ b/storage/ndb/test/run-test/daily-basic-tests.txt
@@ -1,3 +1,18 @@
+# Copyright (C) 2004-2008 MySQL AB
+# 
+# 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
+
 max-time: 600
 cmd: atrt-testBackup
 args: -n NFMaster T1
diff --git a/storage/ndb/test/run-test/daily-devel-tests.txt b/storage/ndb/test/run-test/daily-devel-tests.txt
index f73bd021440..dc17e31de6a 100644
--- a/storage/ndb/test/run-test/daily-devel-tests.txt
+++ b/storage/ndb/test/run-test/daily-devel-tests.txt
@@ -1,3 +1,18 @@
+# Copyright (C) 2004, 2005 MySQL AB
+# 
+# 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
+
 #
 # INDEX
 #
diff --git a/storage/ndb/test/run-test/make-config.sh b/storage/ndb/test/run-test/make-config.sh
index a5ea2e58ae6..3ce780f9551 100755
--- a/storage/ndb/test/run-test/make-config.sh
+++ b/storage/ndb/test/run-test/make-config.sh
@@ -1,5 +1,22 @@
 #!/bin/sh
 
+# Copyright (C) 2004, 2005 MySQL AB
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library 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
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the Free
+# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+# MA 02111-1307, USA
+
 baseport=""
 basedir=""
 proc_no=1
diff --git a/storage/ndb/test/run-test/make-html-reports.sh b/storage/ndb/test/run-test/make-html-reports.sh
index 67395ceba47..dc6d1225dbe 100755
--- a/storage/ndb/test/run-test/make-html-reports.sh
+++ b/storage/ndb/test/run-test/make-html-reports.sh
@@ -1,5 +1,22 @@
 #!/bin/sh
 
+# Copyright (C) 2004, 2005 MySQL AB
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library 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
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the Free
+# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+# MA 02111-1307, USA
+
 src_dir=$1
 run=$2
 date=$3
diff --git a/storage/ndb/test/run-test/make-index.sh b/storage/ndb/test/run-test/make-index.sh
index 944f0df790b..f13ac098567 100755
--- a/storage/ndb/test/run-test/make-index.sh
+++ b/storage/ndb/test/run-test/make-index.sh
@@ -1,4 +1,22 @@
 #!/bin/sh
+
+# Copyright (C) 2004 MySQL AB
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library 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
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the Free
+# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+# MA 02111-1307, USA
+
 # NAME
 #   make-index.sh
 #
diff --git a/storage/ndb/test/run-test/ndb-autotest.sh b/storage/ndb/test/run-test/ndb-autotest.sh
index 289f1045b21..a144c7a0329 100755
--- a/storage/ndb/test/run-test/ndb-autotest.sh
+++ b/storage/ndb/test/run-test/ndb-autotest.sh
@@ -1,4 +1,22 @@
 #!/bin/sh
+
+# Copyright (C) 2005, 2006 MySQL AB
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library 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
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the Free
+# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+# MA 02111-1307, USA
+
 #############################################################
 # This script created by Jonas does the following	    #
 # Cleans up clones and pevious builds, pulls new clones,    #
diff --git a/storage/ndb/test/sql/test_create_drop.pl b/storage/ndb/test/sql/test_create_drop.pl
index 7f62898b3d1..eb9d5e31dc8 100644
--- a/storage/ndb/test/sql/test_create_drop.pl
+++ b/storage/ndb/test/sql/test_create_drop.pl
@@ -1,3 +1,20 @@
+# Copyright (C) 2005 MySQL AB
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library 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
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the Free
+# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+# MA 02111-1307, USA
+
 use strict;
 use IO::Socket;
 use DBI;
diff --git a/storage/ndb/test/sql/test_range_bounds.pl b/storage/ndb/test/sql/test_range_bounds.pl
index abe1ea28298..964847044de 100644
--- a/storage/ndb/test/sql/test_range_bounds.pl
+++ b/storage/ndb/test/sql/test_range_bounds.pl
@@ -1,3 +1,20 @@
+# Copyright (C) 2005 MySQL AB
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library 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
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the Free
+# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+# MA 02111-1307, USA
+
 #
 # test range scan bounds
 # give option --all to test all cases
diff --git a/storage/ndb/tools/clean-links.sh b/storage/ndb/tools/clean-links.sh
index 01820f30616..84052a619d0 100755
--- a/storage/ndb/tools/clean-links.sh
+++ b/storage/ndb/tools/clean-links.sh
@@ -1,5 +1,20 @@
 #! /bin/sh
 
+# Copyright (C) 2004 MySQL AB
+# 
+# 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
 # 1 - Dir
 # 2 - Link dst
 
diff --git a/storage/ndb/tools/make-errors.pl b/storage/ndb/tools/make-errors.pl
index 65819209a89..ac9c7d1d58a 100644
--- a/storage/ndb/tools/make-errors.pl
+++ b/storage/ndb/tools/make-errors.pl
@@ -1,5 +1,20 @@
 #! /usr/local/bin/perl
 
+# Copyright (C) 2004 MySQL AB
+# 
+# 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
 use strict;
 use Getopt::Long;
 use XML::Parser;
diff --git a/storage/ndb/tools/make-links.sh b/storage/ndb/tools/make-links.sh
index e0c4f55986e..6008406ad6a 100755
--- a/storage/ndb/tools/make-links.sh
+++ b/storage/ndb/tools/make-links.sh
@@ -1,5 +1,20 @@
 #! /bin/sh
 
+# Copyright (C) 2004 MySQL AB
+# 
+# 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
 # 1 - Link top src
 # 2 - Link dst
 
diff --git a/storage/ndb/tools/ndb_error_reporter b/storage/ndb/tools/ndb_error_reporter
index 7ad7a2f478a..1af3bf83469 100644
--- a/storage/ndb/tools/ndb_error_reporter
+++ b/storage/ndb/tools/ndb_error_reporter
@@ -1,5 +1,20 @@
 #!/usr/bin/perl -w
 
+# Copyright (C) 2005 MySQL AB
+# 
+# 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
 use strict;
 
 if(@ARGV < 1)
diff --git a/storage/ndb/tools/rgrep b/storage/ndb/tools/rgrep
index 212b068639d..b1ed4fb6f5e 100755
--- a/storage/ndb/tools/rgrep
+++ b/storage/ndb/tools/rgrep
@@ -1,5 +1,20 @@
 #!/vobs/wds/swt/bin/perl
 
+# Copyright (C) 2004 MySQL AB
+# 
+# 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
 die "Usage: rgrep [-iredblLn] regexp filepat ...\n       rgrep -h for help\n"
     if $#ARGV < $[;
 
diff --git a/storage/perfschema/pfs_instr.cc b/storage/perfschema/pfs_instr.cc
index 904efc2aff4..a09920737c8 100644
--- a/storage/perfschema/pfs_instr.cc
+++ b/storage/perfschema/pfs_instr.cc
@@ -18,9 +18,9 @@
   Performance schema instruments (implementation).
 */
 
+#include 
 #include 
 
-#include "my_global.h"
 #include "my_sys.h"
 #include "pfs.h"
 #include "pfs_stat.h"
diff --git a/support-files/CMakeLists.txt b/support-files/CMakeLists.txt
index 2d1d1e83b8b..f8a65e75d4d 100644
--- a/support-files/CMakeLists.txt
+++ b/support-files/CMakeLists.txt
@@ -48,14 +48,7 @@ FOREACH(inifile my-huge my-innodb-heavy-4G my-large my-medium my-small)
 ENDFOREACH()
 
 IF(UNIX)
-  # XXX: again, used elsewhere (scripts/), should be standardised in
-  # XXX: install_layout.cmake
-  IF(INSTALL_LAYOUT MATCHES "STANDALONE")
-    SET(prefix ".")
-  ELSE()
-    SET(prefix ${CMAKE_INSTALL_PREFIX})
-  ENDIF()
- 
+  SET(prefix ${CMAKE_INSTALL_PREFIX})
   FOREACH(script  mysqld_multi.server mysql-log-rotate binary-configure
     config.medium.ini config.small.ini config.huge.ini ndb-config-2-node.ini)
     CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${script}.sh 
diff --git a/support-files/MacOSX/Description.plist.sh b/support-files/MacOSX/Description.plist.sh
index 03212dfdeff..a41e5891ecc 100644
--- a/support-files/MacOSX/Description.plist.sh
+++ b/support-files/MacOSX/Description.plist.sh
@@ -1,5 +1,21 @@
 
 
+
 
 
 	IFPkgDescriptionDeleteWarning
diff --git a/support-files/MacOSX/Info.plist.sh b/support-files/MacOSX/Info.plist.sh
index 7df9c5ac710..c6ec1edeac4 100644
--- a/support-files/MacOSX/Info.plist.sh
+++ b/support-files/MacOSX/Info.plist.sh
@@ -1,5 +1,21 @@
 
 
+
 
 
 	CFBundleGetInfoString
diff --git a/support-files/MacOSX/MySQLCOM b/support-files/MacOSX/MySQLCOM
index 9be5edb56f7..4d55fb44ec0 100755
--- a/support-files/MacOSX/MySQLCOM
+++ b/support-files/MacOSX/MySQLCOM
@@ -1,4 +1,20 @@
 #!/bin/sh
+
+# Copyright (C) 2003, 2004 MySQL AB
+# 
+# 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
 #
 # /Library/StartupItems/MySQLCOM/MySQLCOM
 #
diff --git a/support-files/MacOSX/StartupItem.Description.plist b/support-files/MacOSX/StartupItem.Description.plist
index e8ceb1ee062..1e0d975e0f2 100644
--- a/support-files/MacOSX/StartupItem.Description.plist
+++ b/support-files/MacOSX/StartupItem.Description.plist
@@ -1,5 +1,21 @@
 
 
+
 
 
 	IFPkgDescriptionDeleteWarning
diff --git a/support-files/MacOSX/StartupItem.Info.plist b/support-files/MacOSX/StartupItem.Info.plist
index f403fbe7e84..7e348c4adec 100644
--- a/support-files/MacOSX/StartupItem.Info.plist
+++ b/support-files/MacOSX/StartupItem.Info.plist
@@ -1,5 +1,21 @@
 
 
+
 
 
 	CFBundleGetInfoString
diff --git a/support-files/MacOSX/StartupItem.postinstall b/support-files/MacOSX/StartupItem.postinstall
index f6f6f46f211..ddbd9732a5c 100755
--- a/support-files/MacOSX/StartupItem.postinstall
+++ b/support-files/MacOSX/StartupItem.postinstall
@@ -1,4 +1,20 @@
 #!/bin/sh
+
+# Copyright (C) 2003 MySQL AB
+# 
+# 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
 #
 # postinstall script for the MySQL Startup Item Installation package
 #
diff --git a/support-files/MacOSX/StartupParameters.plist.sh b/support-files/MacOSX/StartupParameters.plist.sh
index f5620c73f5f..35bc5a4f647 100644
--- a/support-files/MacOSX/StartupParameters.plist.sh
+++ b/support-files/MacOSX/StartupParameters.plist.sh
@@ -1,5 +1,21 @@
 
 
+
 
 
 	Description
diff --git a/support-files/MacOSX/mwar-wrapper b/support-files/MacOSX/mwar-wrapper
index 4bc5153e7ef..53624931b3b 100755
--- a/support-files/MacOSX/mwar-wrapper
+++ b/support-files/MacOSX/mwar-wrapper
@@ -1,5 +1,20 @@
 #!/bin/sh
 
+# Copyright (C) 2005 MySQL AB
+# 
+# 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
 # This script can only create a library, not take it apart
 # again to AR files
 
diff --git a/support-files/MacOSX/mwcc-wrapper b/support-files/MacOSX/mwcc-wrapper
index 914578aca1d..162b2e24479 100755
--- a/support-files/MacOSX/mwcc-wrapper
+++ b/support-files/MacOSX/mwcc-wrapper
@@ -1,5 +1,20 @@
 #!/bin/sh
 
+# Copyright (C) 2005 MySQL AB
+# 
+# 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
 if [ -z "$CWINSTALL" ] ; then
     echo "ERROR: You need to source 'mwvars' to set CWINSTALL and other variables"
     exit 1
diff --git a/support-files/MacOSX/postflight.sh b/support-files/MacOSX/postflight.sh
index 451eb65e0d7..1e55c542c89 100644
--- a/support-files/MacOSX/postflight.sh
+++ b/support-files/MacOSX/postflight.sh
@@ -1,4 +1,22 @@
 #!/bin/sh
+
+# Copyright (C) 2003, 2005 MySQL AB
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library 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
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the Free
+# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+# MA 02111-1307, USA
+
 #
 # postflight - this script will be executed after the MySQL PKG
 # installation has been performed.
diff --git a/support-files/MacOSX/preflight.sh b/support-files/MacOSX/preflight.sh
index 700d0640a9e..a214008cf52 100644
--- a/support-files/MacOSX/preflight.sh
+++ b/support-files/MacOSX/preflight.sh
@@ -1,4 +1,22 @@
 #!/bin/sh
+
+# Copyright (C) 2003, 2005 MySQL AB
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library 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
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the Free
+# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+# MA 02111-1307, USA
+
 #
 # preflight - this script will be executed before the MySQL PKG
 # installation will be performed.
diff --git a/support-files/RHEL4-SElinux/mysql.fc b/support-files/RHEL4-SElinux/mysql.fc
index 0db0ccf6e68..b44795e6f8c 100644
--- a/support-files/RHEL4-SElinux/mysql.fc
+++ b/support-files/RHEL4-SElinux/mysql.fc
@@ -1,3 +1,18 @@
+# Copyright (C) 2007 MySQL AB
+#
+# 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
 # MySQL Database Server
 
 #
diff --git a/support-files/RHEL4-SElinux/mysql.te b/support-files/RHEL4-SElinux/mysql.te
index b050fa7b1a6..922389305ea 100644
--- a/support-files/RHEL4-SElinux/mysql.te
+++ b/support-files/RHEL4-SElinux/mysql.te
@@ -1,3 +1,17 @@
+# Copyright (C) 2007 MySQL AB
+#
+# 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
 policy_module(mysql,1.0.0)
 
diff --git a/support-files/compiler_warnings.supp b/support-files/compiler_warnings.supp
index c437748c770..048f74aea91 100644
--- a/support-files/compiler_warnings.supp
+++ b/support-files/compiler_warnings.supp
@@ -1,3 +1,18 @@
+# Copyright (C) 2007 MySQL AB
+#
+# 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
 #
 # This file contains compiler warnings that can
 # be ignored for various reasons.
diff --git a/tests/big_record.pl b/tests/big_record.pl
index cd80488581a..ceedb6f114a 100755
--- a/tests/big_record.pl
+++ b/tests/big_record.pl
@@ -1,5 +1,20 @@
 #!/usr/bin/perl
 
+# Copyright (C) 2000, 2003 MySQL AB
+# 
+# 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
 # This is a test with stores big records in a blob.
 # Note that for the default test the mysql server should have been
 # started with at least 'mysqld --max_allowed_packet=30M' and you should have
diff --git a/tests/drop_test.pl b/tests/drop_test.pl
index 9dcadf45c2e..272c4029e0f 100755
--- a/tests/drop_test.pl
+++ b/tests/drop_test.pl
@@ -1,4 +1,20 @@
 #!/usr/bin/perl -w
+
+# Copyright (C) 2000 MySQL AB
+# 
+# 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
 #
 # This is a test with uses processes to insert, select and drop tables.
 #
diff --git a/tests/export.pl b/tests/export.pl
index 29f0d1af8ff..d543ede8697 100755
--- a/tests/export.pl
+++ b/tests/export.pl
@@ -1,5 +1,20 @@
 #!/usr/bin/perl
 
+# Copyright (C) 2000, 2001 MySQL AB
+# 
+# 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
 # This is a test with uses two processes to a database.
 # The other inserts records in two tables, the other does a lot of joins
 # on these.
diff --git a/tests/fork2_test.pl b/tests/fork2_test.pl
index 19fab5a67d6..64e3e060b09 100755
--- a/tests/fork2_test.pl
+++ b/tests/fork2_test.pl
@@ -1,5 +1,20 @@
 #!/usr/bin/perl -w
 
+# Copyright (C) 2000, 2001 MySQL AB
+# 
+# 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
 # This is a test with uses 5 processes to insert, update and select from
 # two tables.
 # One inserts records in the tables, one updates some record in it and
diff --git a/tests/fork_big.pl b/tests/fork_big.pl
index 5c4f11b00e2..a674f7f7164 100755
--- a/tests/fork_big.pl
+++ b/tests/fork_big.pl
@@ -1,4 +1,20 @@
 #!/usr/bin/perl -w
+
+# Copyright (C) 2001 MySQL AB
+# 
+# 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
 #
 # This is a test with uses many processes to test a MySQL server.
 #
diff --git a/tests/fork_big2.pl b/tests/fork_big2.pl
index 8a0c5e317a0..0d4aee7c774 100644
--- a/tests/fork_big2.pl
+++ b/tests/fork_big2.pl
@@ -1,4 +1,20 @@
 #!/usr/bin/perl -w
+
+# Copyright (C) 2002, 2005 MySQL AB
+# 
+# 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
 #
 # This is a test with uses many processes to test a MySQL server.
 #
diff --git a/tests/grant.pl b/tests/grant.pl
index 4f2bd1a61cb..368ce0b3254 100755
--- a/tests/grant.pl
+++ b/tests/grant.pl
@@ -1,4 +1,20 @@
 #!/usr/bin/perl
+
+# Copyright (C) 2000, 2005 MySQL AB, 2009 Sun Microsystems, Inc.
+# 
+# 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
 #
 # Testing of grants.
 # Note that this will delete all table and column grants !
diff --git a/tests/index_corrupt.pl b/tests/index_corrupt.pl
index 19bf54f5d11..fa4c8151277 100755
--- a/tests/index_corrupt.pl
+++ b/tests/index_corrupt.pl
@@ -1,4 +1,20 @@
 #!/usr/bin/perl -w
+
+# Copyright (C) 2005 MySQL AB
+# 
+# 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
 #
 # This is a test for a key cache bug (bug #10167)
 # To expose the bug mysqld should be started with --key-buffer-size=64K
diff --git a/tests/insert_and_repair.pl b/tests/insert_and_repair.pl
index 1c7186bb651..00ab20f051b 100755
--- a/tests/insert_and_repair.pl
+++ b/tests/insert_and_repair.pl
@@ -1,4 +1,20 @@
 #!/usr/bin/perl -w
+
+# Copyright (C) 2000, 2001 MySQL AB
+# 
+# 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
 #
 # This is a test of insert and repair/check.
 #
diff --git a/tests/lock_test.pl b/tests/lock_test.pl
index 5daeeddad8e..a40bec681f6 100755
--- a/tests/lock_test.pl
+++ b/tests/lock_test.pl
@@ -1,5 +1,20 @@
 #!/usr/bin/perl
 
+# Copyright (C) 2000 MySQL AB
+# 
+# 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
 # This is a test with uses two processes to a database.
 # The other inserts records in two tables, the other does a lot of joins
 # on these.
diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c
index 327c3b5cad0..3861a3e1cf8 100644
--- a/tests/mysql_client_test.c
+++ b/tests/mysql_client_test.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003-2004 MySQL AB
+/* Copyright (c) 2002, 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
diff --git a/tests/pmail.pl b/tests/pmail.pl
index 02d5d60ac0f..38905832069 100755
--- a/tests/pmail.pl
+++ b/tests/pmail.pl
@@ -1,4 +1,20 @@
 #!/usr/bin/perl -w
+
+# Copyright (C) 2000, 2005 MySQL AB
+# 
+# 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
 #                                  
 # Prints mails to standard output  
 #                                  
diff --git a/tests/rename_test.pl b/tests/rename_test.pl
index edf3216a62f..23fc33c9095 100755
--- a/tests/rename_test.pl
+++ b/tests/rename_test.pl
@@ -1,4 +1,20 @@
 #!/usr/bin/perl -w
+
+# Copyright (C) 2000, 2001 MySQL AB
+# 
+# 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
 #
 # This is a test with uses processes to insert, select and drop tables.
 #
diff --git a/tests/table_types.pl b/tests/table_types.pl
index 4dbcdcb975c..23d26215abe 100755
--- a/tests/table_types.pl
+++ b/tests/table_types.pl
@@ -1,5 +1,19 @@
 #!/usr/bin/perl
-#
+
+# Copyright (C) 2000, 2003 MySQL AB
+# 
+# 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
 use DBI;
 use Benchmark;
diff --git a/tests/test_delayed_insert.pl b/tests/test_delayed_insert.pl
index c7a8f0ca4b7..5046c4fb580 100755
--- a/tests/test_delayed_insert.pl
+++ b/tests/test_delayed_insert.pl
@@ -1,5 +1,20 @@
 #!/usr/bin/perl -w
 
+# Copyright (C) 2000, 2001 MySQL AB
+# 
+# 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
 # This is a test for INSERT DELAYED
 #
 
diff --git a/tests/truncate.pl b/tests/truncate.pl
index 57b50cf96b6..85e826fd4cd 100755
--- a/tests/truncate.pl
+++ b/tests/truncate.pl
@@ -1,4 +1,20 @@
 #!/usr/bin/perl -w
+
+# Copyright (C) 2002 MySQL AB
+# 
+# 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
 #
 # This is a test with uses many processes to test a MySQL server.
 #